yzc 2 лет назад
Родитель
Сommit
dc3e0ccb67

+ 2 - 2
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTradeOrderService.java

@@ -298,10 +298,10 @@ public class KwoTradeOrderService {
         }
         BigDecimal advancePrice = goods.getAdvancePrice().multiply(new BigDecimal("10000"));
         //直接采购下单才校验预付款限额
-        if (Objects.equals(param.getOrderSource(), DictEnum.TORDER_SOURCE_1.getValue()) && trading.startsWith("0") && price.compareTo(advancePrice) < 0) {
+        if (Objects.equals(param.getOrderSource(), DictEnum.TORDER_SOURCE_1.getValue()) && trading.startsWith("1") && price.compareTo(advancePrice) < 0) {
             throw new BusinessException("您的订单总额未达到预付限额,请确认");
         }
-        if (trading.startsWith("0")) {
+        if (trading.startsWith("1")) {
             R<List<WalletDto>> wallet = payCenterDubboService.wallet(param.getProcureTopEntId(), ChannelEnum.getByCode(trading), param.getSupplyTopEntId());
             if (Objects.isNull(wallet) || Objects.equals(wallet.getCode(), 0)) {
                 throw new BusinessException("校验预付钱包异常,请联系管理员!");

+ 3 - 3
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -96,7 +96,7 @@ public class KwpGoodsService {
      */
     @Transactional(rollbackFor = Exception.class)
     public void addShelves(AddGoodsParam addGoodsParam) {
-        if (addGoodsParam.getTrading().startsWith("0") && Objects.isNull(addGoodsParam.getAdvancePrice())) {
+        if (addGoodsParam.getTrading().startsWith("1") && Objects.isNull(addGoodsParam.getAdvancePrice())) {
             throw new BusinessException("交易方式为预付款时,预付款最低限额不能为空!");
         }
         Long entId = LoginUserHolder.getEntId();
@@ -322,7 +322,7 @@ public class KwpGoodsService {
         if (StringUtils.isBlank(param.getTrading())) {
             throw new BusinessException("交易方式不能为空!");
         }
-        if (param.getTrading().startsWith("0") && Objects.isNull(param.getAdvancePrice())) {
+        if (param.getTrading().startsWith("1") && Objects.isNull(param.getAdvancePrice())) {
             throw new BusinessException("交易方式为预付款时,预付款最低限额不能为空!");
         }
 
@@ -839,7 +839,7 @@ public class KwpGoodsService {
             throw new BusinessException("商品不存在或已下架!");
         }
         BigDecimal amount = goods.getAmount();
-        if (!goods.getTrading().startsWith("0")) {
+        if (!goods.getTrading().startsWith("1")) {
             return amount;
         }
         if (Objects.isNull(param.getProcureEntId()) || Objects.isNull(param.getSupplyEntId())) {