|
|
@@ -406,14 +406,14 @@ public class KwpGoodsService {
|
|
|
return "价格梯度不能为空!";
|
|
|
}
|
|
|
for (GoodsPriceRanges e : priceRanges) {
|
|
|
- if (Objects.isNull(e.getStartAmount()) || e.getStartAmount().compareTo(BigDecimal.ZERO) < 0) {
|
|
|
- return "起售量不能为空且最小为零!";
|
|
|
+ if (Objects.isNull(e.getStartAmount()) || e.getStartAmount().compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ return "起售量不能为空且必须大于零!";
|
|
|
}
|
|
|
if (Objects.isNull(e.getEndAmount()) || e.getEndAmount().compareTo(new BigDecimal("-1.00")) < 0) {
|
|
|
- return "上限售量不能为空且最小为零!";
|
|
|
+ return "上限售量不能为空且必须大于零!";
|
|
|
}
|
|
|
- if (Objects.isNull(e.getPrice()) || e.getStartAmount().compareTo(BigDecimal.ZERO) < 0) {
|
|
|
- return "含税价不能为空且最低为零!";
|
|
|
+ if (Objects.isNull(e.getPrice()) || e.getStartAmount().compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ return "含税价不能为空且必须大于零!";
|
|
|
}
|
|
|
if (Objects.isNull(e.getSort())) {
|
|
|
return "价格梯度顺序不能为空!";
|
|
|
@@ -1008,4 +1008,18 @@ public class KwpGoodsService {
|
|
|
Long count = kwpGoodsMapper.selectCount(wrapper);
|
|
|
return Objects.nonNull(count) && count > 0L;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc: 根据供应企业id获取未删除非草稿的商品数量
|
|
|
+ * @author: yzc
|
|
|
+ * @date: 2023-08-29 9:51
|
|
|
+ * @Param supplyEntId: 供应企业id
|
|
|
+ * @return: java.lang.Long
|
|
|
+ */
|
|
|
+ public Long getCountBySupplyEnt(Long supplyEntId) {
|
|
|
+ LambdaQueryWrapper<KwpGoods> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(KwpGoods::getSupplyEntId,supplyEntId).eq(KwpGoods::getDelFlag, Global.NO).
|
|
|
+ ne(KwpGoods::getStatus, GoodsStatusEnum.SAVED.getCode());
|
|
|
+ return kwpGoodsMapper.selectCount(wrapper);
|
|
|
+ }
|
|
|
}
|