Prechádzať zdrojové kódy

fixed 付款结算问题

fushengqian 6 mesiacov pred
rodič
commit
8dd1a86f7b

+ 3 - 2
fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java

@@ -478,9 +478,9 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
             if (userInfo != null && userInfo.getGradeId() != null && orderDto.getIsVisitor().equals(YesOrNoEnum.NO.getKey())) {
                 if (percent.compareTo(new BigDecimal("0")) > 0) {
                     // 会员折扣
-                    BigDecimal payAmountDiscount = mtOrder.getPayAmount().multiply(percent);
+                    BigDecimal payAmountDiscount = mtOrder.getAmount().multiply(percent);
                     if (payAmountDiscount.compareTo(new BigDecimal("0")) > 0) {
-                        mtOrder.setDiscount(mtOrder.getDiscount().add(mtOrder.getPayAmount().subtract(payAmountDiscount)));
+                        mtOrder.setDiscount(mtOrder.getDiscount().add(mtOrder.getAmount().subtract(payAmountDiscount)));
                         mtOrder.setPayAmount(payAmountDiscount);
                     } else {
                         mtOrder.setPayAmount(new BigDecimal("0"));
@@ -807,6 +807,7 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
             orderDto.setAmount(new BigDecimal(payAmount));
             orderDto.setPayAmount(new BigDecimal(payAmount));
             orderDto.setDiscount(new BigDecimal("0"));
+            orderDto.setDeliveryFee(new BigDecimal("0"));
         }
 
         // 会员升级订单

+ 1 - 1
fuint-application/src/main/java/com/fuint/common/service/impl/SendSmsServiceImpl.java

@@ -86,7 +86,7 @@ public class SendSmsServiceImpl implements SendSmsService {
         Map<Boolean, List<String>> result = new HashMap<>();
         Integer mode = Integer.parseInt(env.getProperty("aliyun.sms.mode"));
         MtSetting mtSetting = settingService.querySettingByName(merchantId, SettingTypeEnum.SMS_CONFIG.getKey(), SmsSettingEnum.IS_CLOSE.getKey());
-        if (mtSetting != null && StringUtil.isNotEmpty(mtSetting.getValue())) {
+        if (mode.intValue() == 1 && mtSetting != null && StringUtil.isNotEmpty(mtSetting.getValue())) {
             mode = Integer.parseInt(mtSetting.getValue());
             logger.info("商户短信设置 mtSetting = {}", JSON.toJSONString(mtSetting));
         }