|
|
|
|
@ -5,9 +5,13 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|
|
|
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.controller.admin.mold.vo.MoldBrandPageReqVO;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.dal.dataobject.mold.MoldBrandDO;
|
|
|
|
|
import com.alibaba.excel.util.StringUtils;
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
import cn.iocoder.yudao.module.erp.controller.admin.mold.vo.*;
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 模具型号 Mapper
|
|
|
|
|
@ -18,7 +22,23 @@ import java.util.List;
|
|
|
|
|
public interface MoldBrandMapper extends BaseMapperX<MoldBrandDO> {
|
|
|
|
|
|
|
|
|
|
default PageResult<MoldBrandDO> selectPage(MoldBrandPageReqVO reqVO) {
|
|
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<MoldBrandDO>()
|
|
|
|
|
// return selectPage(reqVO, new LambdaQueryWrapperX<MoldBrandDO>()
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getCode, reqVO.getCode())
|
|
|
|
|
// .likeIfPresent(MoldBrandDO::getName, reqVO.getName())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getMoldType, reqVO.getMoldType())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getProductId, reqVO.getProductId())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getUseTime, reqVO.getUseTime())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getMaintainType, reqVO.getMaintainType())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getMaintainTime, reqVO.getMaintainTime())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getMoldSize, reqVO.getMoldSize())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getRemark, reqVO.getRemark())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getIsEnable, reqVO.getIsEnable())
|
|
|
|
|
// .eqIfPresent(MoldBrandDO::getOrgType, reqVO.getOrgType())
|
|
|
|
|
// .betweenIfPresent(MoldBrandDO::getCreateTime, reqVO.getCreateTime())
|
|
|
|
|
// .orderByDesc(MoldBrandDO::getId));
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapperX<MoldBrandDO> moldBrandDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
|
|
|
|
moldBrandDOLambdaQueryWrapperX
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getCode, reqVO.getCode())
|
|
|
|
|
.likeIfPresent(MoldBrandDO::getName, reqVO.getName())
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getMoldType, reqVO.getMoldType())
|
|
|
|
|
@ -29,8 +49,24 @@ public interface MoldBrandMapper extends BaseMapperX<MoldBrandDO> {
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getMoldSize, reqVO.getMoldSize())
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getRemark, reqVO.getRemark())
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getIsEnable, reqVO.getIsEnable())
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getOrgType, reqVO.getOrgType())
|
|
|
|
|
.betweenIfPresent(MoldBrandDO::getCreateTime, reqVO.getCreateTime())
|
|
|
|
|
.orderByDesc(MoldBrandDO::getId));
|
|
|
|
|
.orderByDesc(MoldBrandDO::getId);
|
|
|
|
|
|
|
|
|
|
// 单独处理 ids 条件
|
|
|
|
|
if (StringUtils.isNotBlank(reqVO.getIds())) {
|
|
|
|
|
List<Long> idList = Arrays.stream(reqVO.getIds().split(","))
|
|
|
|
|
.map(String::trim)
|
|
|
|
|
.map(Long::valueOf)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
moldBrandDOLambdaQueryWrapperX.in(MoldBrandDO::getId, idList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return selectPage(reqVO, moldBrandDOLambdaQueryWrapperX);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
default List<MoldBrandDO> selectBy(MoldBrandPageReqVO reqVO) {
|
|
|
|
|
return selectList(new LambdaQueryWrapperX<MoldBrandDO>()
|
|
|
|
|
@ -44,6 +80,7 @@ public interface MoldBrandMapper extends BaseMapperX<MoldBrandDO> {
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getMoldSize, reqVO.getMoldSize())
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getRemark, reqVO.getRemark())
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getIsEnable, reqVO.getIsEnable())
|
|
|
|
|
.eqIfPresent(MoldBrandDO::getOrgType, reqVO.getOrgType())
|
|
|
|
|
.betweenIfPresent(MoldBrandDO::getCreateTime, reqVO.getCreateTime())
|
|
|
|
|
.orderByDesc(MoldBrandDO::getId));
|
|
|
|
|
}
|
|
|
|
|
|