k.e.book.ddh.service.CcIntegralLuckLogService Maven / Gradle / Ivy
package k.e.book.ddh.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import k.e.book.ddh.entity.CcIntegralLuckLogDO;
import k.e.book.ddh.entity.CcIntegralLuckLogQueryDTO;
import k.e.book.ddh.mapper.CcIntegralLuckLogMapper;
import org.springframework.stereotype.Service;
/**
* @author kk
* @date 2023-05-21 11:04
*/
@Service
public class CcIntegralLuckLogService extends ServiceImpl {
public IPage selectProductPage(CcIntegralLuckLogQueryDTO dto) {
LambdaQueryWrapper qr = new LambdaQueryWrapper<>();
if(dto.getId() != null){
qr.eq(CcIntegralLuckLogDO::getId, dto.getId());
}
if(dto.getUserId() != null){
qr.eq(CcIntegralLuckLogDO::getUserId, dto.getUserId());
}
if(dto.getLuckId() != null){
qr.eq(CcIntegralLuckLogDO::getLuckId, dto.getLuckId());
}
if(dto.getType() != null){
qr.eq(CcIntegralLuckLogDO::getType, dto.getType());
}
if(dto.getNum() != null){
qr.eq(CcIntegralLuckLogDO::getNum, dto.getNum());
}
if(dto.getName() != null){
qr.eq(CcIntegralLuckLogDO::getName, dto.getName());
}
if(dto.getImage() != null){
qr.eq(CcIntegralLuckLogDO::getImage, dto.getImage());
}
if(dto.getDesc() != null){
qr.eq(CcIntegralLuckLogDO::getDesc, dto.getDesc());
}
if(dto.getRemarks() != null){
qr.eq(CcIntegralLuckLogDO::getRemarks, dto.getRemarks());
}
if(dto.getStatus() != null){
qr.eq(CcIntegralLuckLogDO::getStatus, dto.getStatus());
}
if(dto.getCouponId() != null){
qr.eq(CcIntegralLuckLogDO::getCouponId, dto.getCouponId());
}
if(dto.getCreatetime() != null){
qr.eq(CcIntegralLuckLogDO::getCreatetime, dto.getCreatetime());
}
if(dto.getUpdatetime() != null){
qr.eq(CcIntegralLuckLogDO::getUpdatetime, dto.getUpdatetime());
}
if(dto.getDeletetime() != null){
qr.eq(CcIntegralLuckLogDO::getDeletetime, dto.getDeletetime());
}
qr.orderByDesc(CcIntegralLuckLogDO::getId);
IPage page = new Page<>();
page.setCurrent(dto.getPage());
page.setSize(dto.getLimit());
return baseMapper.selectPage(page, qr);
}
}