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

k.e.book.ddh.service.CcRechargeOrderRefundService 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.CcRechargeOrderRefundDO;
import k.e.book.ddh.entity.CcRechargeOrderRefundQueryDTO;
import k.e.book.ddh.mapper.CcRechargeOrderRefundMapper;
import org.springframework.stereotype.Service;

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

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

        if(dto.getId() != null){
            qr.eq(CcRechargeOrderRefundDO::getId, dto.getId());
        }
        if(dto.getUserId() != null){
            qr.eq(CcRechargeOrderRefundDO::getUserId, dto.getUserId());
        }
        if(dto.getOrderId() != null){
            qr.eq(CcRechargeOrderRefundDO::getOrderId, dto.getOrderId());
        }
        if(dto.getOrderNo() != null){
            qr.eq(CcRechargeOrderRefundDO::getOrderNo, dto.getOrderNo());
        }
        if(dto.getRefundNo() != null){
            qr.eq(CcRechargeOrderRefundDO::getRefundNo, dto.getRefundNo());
        }
        if(dto.getMerchantNo() != null){
            qr.eq(CcRechargeOrderRefundDO::getMerchantNo, dto.getMerchantNo());
        }
        if(dto.getRefundAmount() != null){
            qr.eq(CcRechargeOrderRefundDO::getRefundAmount, dto.getRefundAmount());
        }
        if(dto.getUniqueRefundNo() != null){
            qr.eq(CcRechargeOrderRefundDO::getUniqueRefundNo, dto.getUniqueRefundNo());
        }
        if(dto.getRefundAccountDetail() != null){
            qr.eq(CcRechargeOrderRefundDO::getRefundAccountDetail, dto.getRefundAccountDetail());
        }
        if(dto.getStatus() != null){
            qr.eq(CcRechargeOrderRefundDO::getStatus, dto.getStatus());
        }
        if(dto.getRefundTime() != null){
            qr.eq(CcRechargeOrderRefundDO::getRefundTime, dto.getRefundTime());
        }
        if(dto.getCreatetime() != null){
            qr.eq(CcRechargeOrderRefundDO::getCreatetime, dto.getCreatetime());
        }
        if(dto.getUpdatetime() != null){
            qr.eq(CcRechargeOrderRefundDO::getUpdatetime, dto.getUpdatetime());
        }
        if(dto.getCreatedAt() != null){
            qr.eq(CcRechargeOrderRefundDO::getCreatedAt, dto.getCreatedAt());
        }
        if(dto.getUpdatedAt() != null){
            qr.eq(CcRechargeOrderRefundDO::getUpdatedAt, dto.getUpdatedAt());
        }
        if(dto.getDeletedAt() != null){
            qr.eq(CcRechargeOrderRefundDO::getDeletedAt, dto.getDeletedAt());
        }

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