package com.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;


import com.dao.FafangpaizhaoDao;
import com.entity.FafangpaizhaoEntity;
import com.service.FafangpaizhaoService;
import com.entity.vo.FafangpaizhaoVO;
import com.entity.view.FafangpaizhaoView;

@Service("fafangpaizhaoService")
public class FafangpaizhaoServiceImpl extends ServiceImpl<FafangpaizhaoDao, FafangpaizhaoEntity> implements FafangpaizhaoService {
	
	
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<FafangpaizhaoEntity> page = this.selectPage(
                new Query<FafangpaizhaoEntity>(params).getPage(),
                new EntityWrapper<FafangpaizhaoEntity>()
        );
        return new PageUtils(page);
    }
    
    @Override
	public PageUtils queryPage(Map<String, Object> params, Wrapper<FafangpaizhaoEntity> wrapper) {
		  Page<FafangpaizhaoView> page =new Query<FafangpaizhaoView>(params).getPage();
	        page.setRecords(baseMapper.selectListView(page,wrapper));
	    	PageUtils pageUtil = new PageUtils(page);
	    	return pageUtil;
 	}

    
    @Override
	public List<FafangpaizhaoVO> selectListVO(Wrapper<FafangpaizhaoEntity> wrapper) {
 		return baseMapper.selectListVO(wrapper);
	}
	
	@Override
	public FafangpaizhaoVO selectVO(Wrapper<FafangpaizhaoEntity> wrapper) {
 		return baseMapper.selectVO(wrapper);
	}
	
	@Override
	public List<FafangpaizhaoView> selectListView(Wrapper<FafangpaizhaoEntity> wrapper) {
		return baseMapper.selectListView(wrapper);
	}

	@Override
	public FafangpaizhaoView selectView(Wrapper<FafangpaizhaoEntity> wrapper) {
		return baseMapper.selectView(wrapper);
	}


}
