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.GuapaishenqingDao;
import com.entity.GuapaishenqingEntity;
import com.service.GuapaishenqingService;
import com.entity.vo.GuapaishenqingVO;
import com.entity.view.GuapaishenqingView;

@Service("guapaishenqingService")
public class GuapaishenqingServiceImpl extends ServiceImpl<GuapaishenqingDao, GuapaishenqingEntity> implements GuapaishenqingService {
	
	
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<GuapaishenqingEntity> page = this.selectPage(
                new Query<GuapaishenqingEntity>(params).getPage(),
                new EntityWrapper<GuapaishenqingEntity>()
        );
        return new PageUtils(page);
    }
    
    @Override
	public PageUtils queryPage(Map<String, Object> params, Wrapper<GuapaishenqingEntity> wrapper) {
		  Page<GuapaishenqingView> page =new Query<GuapaishenqingView>(params).getPage();
	        page.setRecords(baseMapper.selectListView(page,wrapper));
	    	PageUtils pageUtil = new PageUtils(page);
	    	return pageUtil;
 	}

    
    @Override
	public List<GuapaishenqingVO> selectListVO(Wrapper<GuapaishenqingEntity> wrapper) {
 		return baseMapper.selectListVO(wrapper);
	}
	
	@Override
	public GuapaishenqingVO selectVO(Wrapper<GuapaishenqingEntity> wrapper) {
 		return baseMapper.selectVO(wrapper);
	}
	
	@Override
	public List<GuapaishenqingView> selectListView(Wrapper<GuapaishenqingEntity> wrapper) {
		return baseMapper.selectListView(wrapper);
	}

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


}
