|
@@ -239,8 +239,11 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
.or().like("pi", ProductInfo::getCode, dto.getKeyword())//产品编号
|
|
.or().like("pi", ProductInfo::getCode, dto.getKeyword())//产品编号
|
|
.or().like("c.name", dto.getKeyword()));//客户名称
|
|
.or().like("c.name", dto.getKeyword()));//客户名称
|
|
}
|
|
}
|
|
|
|
+ //根据客户id过滤
|
|
|
|
+ wrapper.eq("c.id", dto.getCustomerId());
|
|
//根据产品分类id过滤
|
|
//根据产品分类id过滤
|
|
wrapper.eq("pi", ProductInfo::getProductClassifyId, dto.getProductClassifyId());
|
|
wrapper.eq("pi", ProductInfo::getProductClassifyId, dto.getProductClassifyId());
|
|
|
|
+ wrapper.orderByDesc("pi", ProductInfo::getCreateTime);
|
|
|
|
|
|
Page<ProductInfoVo> page = baseMapper.getCustomerProductList(dto.getPage(), wrapper);
|
|
Page<ProductInfoVo> page = baseMapper.getCustomerProductList(dto.getPage(), wrapper);
|
|
List<ProductInfoVo> records = page.getRecords();
|
|
List<ProductInfoVo> records = page.getRecords();
|
|
@@ -435,7 +438,7 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
// 排除名称重复
|
|
// 排除名称重复
|
|
this.nameDuplication(ProductInfo::getName, productInfoDto.getName(), productInfoDto.getId(), "产品名称重复");
|
|
this.nameDuplication(ProductInfo::getName, productInfoDto.getName(), productInfoDto.getId(), "产品名称重复");
|
|
// 排除自定义编码重复
|
|
// 排除自定义编码重复
|
|
- this.nameDuplication(ProductInfo::getCustomCode, productInfoDto.getCustomCode(),productInfoDto.getId(), "产品自定义编码重复");
|
|
|
|
|
|
+ this.nameDuplication(ProductInfo::getCustomCode, productInfoDto.getCustomCode(), productInfoDto.getId(), "产品自定义编码重复");
|
|
this.updateById(productInfoDto);
|
|
this.updateById(productInfoDto);
|
|
ObsFileUtil.editFile(productInfoDto.getFileList(), productInfoDto.getId());
|
|
ObsFileUtil.editFile(productInfoDto.getFileList(), productInfoDto.getId());
|
|
}
|
|
}
|