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

k.e.book.ddh.service.CcBoxMarketService 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.CcBoxMarketDO;
import k.e.book.ddh.entity.CcBoxMarketQueryDTO;
import k.e.book.ddh.mapper.CcBoxMarketMapper;
import org.springframework.stereotype.Service;

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

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

        if(dto.getId() != null){
            qr.eq(CcBoxMarketDO::getId, dto.getId());
        }
        if(dto.getUserBoxId() != null){
            qr.eq(CcBoxMarketDO::getUserBoxId, dto.getUserBoxId());
        }
        if(dto.getBoxId() != null){
            qr.eq(CcBoxMarketDO::getBoxId, dto.getBoxId());
        }
        if(dto.getUserId() != null){
            qr.eq(CcBoxMarketDO::getUserId, dto.getUserId());
        }
        if(dto.getOrderid() != null){
            qr.eq(CcBoxMarketDO::getOrderid, dto.getOrderid());
        }
        if(dto.getUserBoxDetailId() != null){
            qr.eq(CcBoxMarketDO::getUserBoxDetailId, dto.getUserBoxDetailId());
        }
        if(dto.getItemId() != null){
            qr.eq(CcBoxMarketDO::getItemId, dto.getItemId());
        }
        if(dto.getAmount() != null){
            qr.eq(CcBoxMarketDO::getAmount, dto.getAmount());
        }
        if(dto.getQuantity() != null){
            qr.eq(CcBoxMarketDO::getQuantity, dto.getQuantity());
        }
        if(dto.getCreatetime() != null){
            qr.eq(CcBoxMarketDO::getCreatetime, dto.getCreatetime());
        }
        if(dto.getUpdatetime() != null){
            qr.eq(CcBoxMarketDO::getUpdatetime, dto.getUpdatetime());
        }
        if(dto.getDeletetime() != null){
            qr.eq(CcBoxMarketDO::getDeletetime, dto.getDeletetime());
        }
        if(dto.getServiceFee() != null){
            qr.eq(CcBoxMarketDO::getServiceFee, dto.getServiceFee());
        }
        if(dto.getCopyrightFee() != null){
            qr.eq(CcBoxMarketDO::getCopyrightFee, dto.getCopyrightFee());
        }
        if(dto.getPaymentFee() != null){
            qr.eq(CcBoxMarketDO::getPaymentFee, dto.getPaymentFee());
        }
        if(dto.getWithdrawFee() != null){
            qr.eq(CcBoxMarketDO::getWithdrawFee, dto.getWithdrawFee());
        }
        if(dto.getPaidAmount() != null){
            qr.eq(CcBoxMarketDO::getPaidAmount, dto.getPaidAmount());
        }
        if(dto.getPaidStatus() != null){
            qr.eq(CcBoxMarketDO::getPaidStatus, dto.getPaidStatus());
        }
        if(dto.getSettleAccount() != null){
            qr.eq(CcBoxMarketDO::getSettleAccount, dto.getSettleAccount());
        }
        if(dto.getStatus() != null){
            qr.eq(CcBoxMarketDO::getStatus, dto.getStatus());
        }
        if(dto.getCreatedAt() != null){
            qr.eq(CcBoxMarketDO::getCreatedAt, dto.getCreatedAt());
        }
        if(dto.getUpdatedAt() != null){
            qr.eq(CcBoxMarketDO::getUpdatedAt, dto.getUpdatedAt());
        }
        if(dto.getDeletedAt() != null){
            qr.eq(CcBoxMarketDO::getDeletedAt, dto.getDeletedAt());
        }

        qr.orderByDesc(CcBoxMarketDO::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