|
|
@ -1,13 +1,12 @@
|
|
|
|
package com.chanko.yunxi.mes.module.heli.dal.mysql.customer;
|
|
|
|
package com.chanko.yunxi.mes.module.heli.dal.mysql.customer;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
|
|
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
|
|
|
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
|
|
|
|
|
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
|
|
|
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
|
|
|
|
|
|
|
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
|
|
|
|
|
import com.chanko.yunxi.mes.module.heli.controller.admin.customer.vo.CustomerPageReqVO;
|
|
|
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
|
|
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
import com.chanko.yunxi.mes.module.heli.controller.admin.customer.vo.*;
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 客户新表 Mapper
|
|
|
|
* 客户新表 Mapper
|
|
|
@ -18,11 +17,16 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.customer.vo.*;
|
|
|
|
public interface CustomerMapper extends BaseMapperX<CustomerDO> {
|
|
|
|
public interface CustomerMapper extends BaseMapperX<CustomerDO> {
|
|
|
|
|
|
|
|
|
|
|
|
default PageResult<CustomerDO> selectPage(CustomerPageReqVO reqVO) {
|
|
|
|
default PageResult<CustomerDO> selectPage(CustomerPageReqVO reqVO) {
|
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<CustomerDO>()
|
|
|
|
LambdaQueryWrapperX<CustomerDO> query = new LambdaQueryWrapperX<CustomerDO>()
|
|
|
|
.likeIfPresent(CustomerDO::getCode, reqVO.getCode())
|
|
|
|
.likeIfPresent(CustomerDO::getCode, reqVO.getCode())
|
|
|
|
.likeIfPresent(CustomerDO::getBrief, reqVO.getBrief())
|
|
|
|
.likeIfPresent(CustomerDO::getBrief, reqVO.getBrief())
|
|
|
|
.eqIfPresent(CustomerDO::getStatus, reqVO.getStatus())
|
|
|
|
.eqIfPresent(CustomerDO::getStatus, reqVO.getStatus())
|
|
|
|
.orderByDesc(CustomerDO::getId));
|
|
|
|
.orderByDesc(CustomerDO::getId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!StringUtils.isEmpty(reqVO.getBriefOrName())){
|
|
|
|
|
|
|
|
query.and(QueryWrapper -> QueryWrapper.like(CustomerDO::getBrief, reqVO.getBriefOrName()).or().like(CustomerDO::getName, reqVO.getName()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return selectPage(reqVO, query);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|