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

k.e.book.ddh.service.CcOrderAddressService 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.CcOrderAddressDO;
import k.e.book.ddh.entity.CcOrderAddressQueryDTO;
import k.e.book.ddh.mapper.CcOrderAddressMapper;
import org.springframework.stereotype.Service;

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

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

        if(dto.getId() != null){
            qr.eq(CcOrderAddressDO::getId, dto.getId());
        }
        if(dto.getOrderId() != null){
            qr.eq(CcOrderAddressDO::getOrderId, dto.getOrderId());
        }
        if(dto.getOrderType() != null){
            qr.eq(CcOrderAddressDO::getOrderType, dto.getOrderType());
        }
        if(dto.getUserId() != null){
            qr.eq(CcOrderAddressDO::getUserId, dto.getUserId());
        }
        if(dto.getCode() != null){
            qr.eq(CcOrderAddressDO::getCode, dto.getCode());
        }
        if(dto.getAddress() != null){
            qr.eq(CcOrderAddressDO::getAddress, dto.getAddress());
        }
        if(dto.getName() != null){
            qr.eq(CcOrderAddressDO::getName, dto.getName());
        }
        if(dto.getMobile() != null){
            qr.eq(CcOrderAddressDO::getMobile, dto.getMobile());
        }
        if(dto.getExchangeData() != null){
            qr.eq(CcOrderAddressDO::getExchangeData, dto.getExchangeData());
        }
        if(dto.getExpressCompanyId() != null){
            qr.eq(CcOrderAddressDO::getExpressCompanyId, dto.getExpressCompanyId());
        }
        if(dto.getExpressNo() != null){
            qr.eq(CcOrderAddressDO::getExpressNo, dto.getExpressNo());
        }
        if(dto.getCreatetime() != null){
            qr.eq(CcOrderAddressDO::getCreatetime, dto.getCreatetime());
        }
        if(dto.getUpdatetime() != null){
            qr.eq(CcOrderAddressDO::getUpdatetime, dto.getUpdatetime());
        }
        if(dto.getDeletetime() != null){
            qr.eq(CcOrderAddressDO::getDeletetime, dto.getDeletetime());
        }

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