All Downloads are FREE. Search and download functionalities are using the official Maven repository.

k.e.book.ddh.service.CcIntegralOrderService 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.CcIntegralOrderDO;
import k.e.book.ddh.entity.CcIntegralOrderQueryDTO;
import k.e.book.ddh.mapper.CcIntegralOrderMapper;
import org.springframework.stereotype.Service;

/**
 * @author kk
 * @date 2023-05-21 11:04
 */
@Service
public class CcIntegralOrderService extends ServiceImpl {

    public IPage selectProductPage(CcIntegralOrderQueryDTO dto) {
        LambdaQueryWrapper qr = new LambdaQueryWrapper<>();

        if(dto.getId() != null){
            qr.eq(CcIntegralOrderDO::getId, dto.getId());
        }
        if(dto.getOrderNo() != null){
            qr.eq(CcIntegralOrderDO::getOrderNo, dto.getOrderNo());
        }
        if(dto.getOrdercode() != null){
            qr.eq(CcIntegralOrderDO::getOrdercode, dto.getOrdercode());
        }
        if(dto.getUserId() != null){
            qr.eq(CcIntegralOrderDO::getUserId, dto.getUserId());
        }
        if(dto.getMerchantNo() != null){
            qr.eq(CcIntegralOrderDO::getMerchantNo, dto.getMerchantNo());
        }
        if(dto.getAmount() != null){
            qr.eq(CcIntegralOrderDO::getAmount, dto.getAmount());
        }
        if(dto.getScore() != null){
            qr.eq(CcIntegralOrderDO::getScore, dto.getScore());
        }
        if(dto.getPayAmount() != null){
            qr.eq(CcIntegralOrderDO::getPayAmount, dto.getPayAmount());
        }
        if(dto.getPayType() != null){
            qr.eq(CcIntegralOrderDO::getPayType, dto.getPayType());
        }
        if(dto.getPayTime() != null){
            qr.eq(CcIntegralOrderDO::getPayTime, dto.getPayTime());
        }
        if(dto.getIp() != null){
            qr.eq(CcIntegralOrderDO::getIp, dto.getIp());
        }
        if(dto.getUseragent() != null){
            qr.eq(CcIntegralOrderDO::getUseragent, dto.getUseragent());
        }
        if(dto.getMemo() != null){
            qr.eq(CcIntegralOrderDO::getMemo, dto.getMemo());
        }
        if(dto.getPayinfo() != null){
            qr.eq(CcIntegralOrderDO::getPayinfo, dto.getPayinfo());
        }
        if(dto.getTradeNo() != null){
            qr.eq(CcIntegralOrderDO::getTradeNo, dto.getTradeNo());
        }
        if(dto.getOutTradeNo() != null){
            qr.eq(CcIntegralOrderDO::getOutTradeNo, dto.getOutTradeNo());
        }
        if(dto.getStatus() != null){
            qr.eq(CcIntegralOrderDO::getStatus, dto.getStatus());
        }
        if(dto.getOverdue() != null){
            qr.eq(CcIntegralOrderDO::getOverdue, dto.getOverdue());
        }
        if(dto.getCouponId() != null){
            qr.eq(CcIntegralOrderDO::getCouponId, dto.getCouponId());
        }
        if(dto.getCreatetime() != null){
            qr.eq(CcIntegralOrderDO::getCreatetime, dto.getCreatetime());
        }
        if(dto.getUpdatetime() != null){
            qr.eq(CcIntegralOrderDO::getUpdatetime, dto.getUpdatetime());
        }
        if(dto.getDeletetime() != null){
            qr.eq(CcIntegralOrderDO::getDeletetime, dto.getDeletetime());
        }

        qr.orderByDesc(CcIntegralOrderDO::getId);
        IPage page = new Page<>();
        page.setCurrent(dto.getPage());
        page.setSize(dto.getLimit());
        return baseMapper.selectPage(page, qr);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy