k.e.book.ddh.service.CcIntegralOrderGoodsService 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.CcIntegralOrderGoodsDO;
import k.e.book.ddh.entity.CcIntegralOrderGoodsQueryDTO;
import k.e.book.ddh.mapper.CcIntegralOrderGoodsMapper;
import org.springframework.stereotype.Service;
/**
* @author kk
* @date 2023-05-21 11:04
*/
@Service
public class CcIntegralOrderGoodsService extends ServiceImpl {
public IPage selectProductPage(CcIntegralOrderGoodsQueryDTO dto) {
LambdaQueryWrapper qr = new LambdaQueryWrapper<>();
if(dto.getId() != null){
qr.eq(CcIntegralOrderGoodsDO::getId, dto.getId());
}
if(dto.getOrderId() != null){
qr.eq(CcIntegralOrderGoodsDO::getOrderId, dto.getOrderId());
}
if(dto.getOrderNo() != null){
qr.eq(CcIntegralOrderGoodsDO::getOrderNo, dto.getOrderNo());
}
if(dto.getUserId() != null){
qr.eq(CcIntegralOrderGoodsDO::getUserId, dto.getUserId());
}
if(dto.getGoodsId() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsId, dto.getGoodsId());
}
if(dto.getOrderAmount() != null){
qr.eq(CcIntegralOrderGoodsDO::getOrderAmount, dto.getOrderAmount());
}
if(dto.getOrderScore() != null){
qr.eq(CcIntegralOrderGoodsDO::getOrderScore, dto.getOrderScore());
}
if(dto.getType() != null){
qr.eq(CcIntegralOrderGoodsDO::getType, dto.getType());
}
if(dto.getGoodsProductId() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsProductId, dto.getGoodsProductId());
}
if(dto.getGoodsName() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsName, dto.getGoodsName());
}
if(dto.getGoodsImage() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsImage, dto.getGoodsImage());
}
if(dto.getGoodsLongimage() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsLongimage, dto.getGoodsLongimage());
}
if(dto.getGoodsSourcefile() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsSourcefile, dto.getGoodsSourcefile());
}
if(dto.getGoodsCerturl() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsCerturl, dto.getGoodsCerturl());
}
if(dto.getGoodsCerttxhash() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsCerttxhash, dto.getGoodsCerttxhash());
}
if(dto.getGoodsSubject() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsSubject, dto.getGoodsSubject());
}
if(dto.getGoodsAmount() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsAmount, dto.getGoodsAmount());
}
if(dto.getGoodsScore() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsScore, dto.getGoodsScore());
}
if(dto.getGoodsModel3d() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsModel3d, dto.getGoodsModel3d());
}
if(dto.getGoodsModel3dsquare() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsModel3dsquare, dto.getGoodsModel3dsquare());
}
if(dto.getGoodsModel3dfile() != null){
qr.eq(CcIntegralOrderGoodsDO::getGoodsModel3dfile, dto.getGoodsModel3dfile());
}
if(dto.getCreatetime() != null){
qr.eq(CcIntegralOrderGoodsDO::getCreatetime, dto.getCreatetime());
}
if(dto.getUpdatetime() != null){
qr.eq(CcIntegralOrderGoodsDO::getUpdatetime, dto.getUpdatetime());
}
if(dto.getDeletetime() != null){
qr.eq(CcIntegralOrderGoodsDO::getDeletetime, dto.getDeletetime());
}
qr.orderByDesc(CcIntegralOrderGoodsDO::getId);
IPage page = new Page<>();
page.setCurrent(dto.getPage());
page.setSize(dto.getLimit());
return baseMapper.selectPage(page, qr);
}
}