Ver Fonte

销售订单 电子钱包取预付可用额

xucaiqin há 2 anos atrás
pai
commit
f83117a9ec

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

@@ -461,7 +461,7 @@ public class KwoTradeOrderService {
             if (CollectionUtils.isEmpty(data)) {
                 throw new BusinessException("检测尚未创建对应预付款清单,请先创建!");
             }
-            long money = data.get(0).getMoney();
+            long money = data.get(0).getApMoney();
             if (money < advancePrice.multiply(new BigDecimal("100")).longValueExact()) {
                 throw new BusinessException("您的预付清单可用余额不足,请先充值!");
             }
@@ -502,7 +502,7 @@ public class KwoTradeOrderService {
             throw new BusinessException(updateResult.getMsg());
         }
         //冻结金额
-        if (param.getTrading().startsWith("1")){
+        if (param.getTrading().startsWith("1")) {
             HttpResult freezeResult = paymentDubboService.freezeMoney(orderCheck.getProcureTopEntId(),
                     ChannelEnum.getByTrading(param.getTrading()), orderCheck.getSupplyTopEntId(), param.getPrice(), order.getId());
             if (!Objects.equals(HttpStatus.SUCCESS_CODE, freezeResult.getCode())) {
@@ -929,7 +929,7 @@ public class KwoTradeOrderService {
         orderCheck.setGoodsId(goods.getGoodsId()).setAmount(amount);
         orderCheck(orderCheck, true);
         //冻结金额
-        if (param.getTrading().startsWith("1")){
+        if (param.getTrading().startsWith("1")) {
             HttpResult freezeResult = paymentDubboService.freezeMoney(orderCheck.getProcureTopEntId(),
                     ChannelEnum.getByTrading(param.getTrading()), orderCheck.getSupplyTopEntId(), param.getPrice(), order.getId());
             if (!Objects.equals(HttpStatus.SUCCESS_CODE, freezeResult.getCode())) {

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

@@ -1047,7 +1047,7 @@ public class KwpGoodsService {
         if (CollectionUtils.isEmpty(data)) {
             throw new BusinessException("检测尚未创建对应预付款清单,请先创建!");
         }
-        long money = data.get(0).getMoney();
+        long money = data.get(0).getApMoney();
         BigDecimal divide = new BigDecimal(money).divide(param.getUtilPrice().multiply(new BigDecimal("100")), 2, RoundingMode.HALF_UP);
         return amount.compareTo(divide) < 0 ? amount : divide;
     }