|
|
|
|
@ -29,13 +29,20 @@ public interface ErpProductMapper extends BaseMapperX<ErpProductDO> {
|
|
|
|
|
.orderByDesc(ErpProductDO::getId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default PageResult<ErpProductDO> selectProductExist(ErpProductPageReqVO reqVO) {
|
|
|
|
|
default PageResult<ErpProductDO> selectProductCodeExist(ErpProductPageReqVO reqVO) {
|
|
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<ErpProductDO>()
|
|
|
|
|
.eqIfPresent(ErpProductDO::getName, reqVO.getName())
|
|
|
|
|
.eqIfPresent(ErpProductDO::getBarCode, reqVO.getCode())
|
|
|
|
|
.orderByAsc(ErpProductDO::getId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default PageResult<ErpProductDO> selectProductExist(ErpProductPageReqVO reqVO) {
|
|
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<ErpProductDO>()
|
|
|
|
|
.eqIfPresent(ErpProductDO::getName, reqVO.getName())
|
|
|
|
|
.eqIfPresent(ErpProductDO::getStandard, reqVO.getStandard())
|
|
|
|
|
.orderByAsc(ErpProductDO::getId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default Long selectCountByCategoryId(Long categoryId) {
|
|
|
|
|
return selectCount(ErpProductDO::getCategoryId, categoryId);
|
|
|
|
|
}
|
|
|
|
|
|