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.CheliangdanganDao;
import com.entity.CheliangdanganEntity;
import com.service.CheliangdanganService;
import com.entity.vo.CheliangdanganVO;
import com.entity.view.CheliangdanganView;

@Service("cheliangdanganService")
public class CheliangdanganServiceImpl extends ServiceImpl<CheliangdanganDao, CheliangdanganEntity> implements CheliangdanganService {
	
	
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<CheliangdanganEntity> page = this.selectPage(
                new Query<CheliangdanganEntity>(params).getPage(),
                new EntityWrapper<CheliangdanganEntity>()
        );
        return new PageUtils(page);
    }
    
    @Override
	public PageUtils queryPage(Map<String, Object> params, Wrapper<CheliangdanganEntity> wrapper) {
		  Page<CheliangdanganView> page =new Query<CheliangdanganView>(params).getPage();
	        page.setRecords(baseMapper.selectListView(page,wrapper));
	    	PageUtils pageUtil = new PageUtils(page);
	    	return pageUtil;
 	}

    
    @Override
	public List<CheliangdanganVO> selectListVO(Wrapper<CheliangdanganEntity> wrapper) {
 		return baseMapper.selectListVO(wrapper);
	}
	
	@Override
	public CheliangdanganVO selectVO(Wrapper<CheliangdanganEntity> wrapper) {
 		return baseMapper.selectVO(wrapper);
	}
	
	@Override
	public List<CheliangdanganView> selectListView(Wrapper<CheliangdanganEntity> wrapper) {
		return baseMapper.selectListView(wrapper);
	}

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


}
