浏览代码

Merge branch 'online1'

yonge 3 年之前
父节点
当前提交
70924205b3
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/DegreeRegistrationServiceImpl.java

+ 8 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DegreeRegistrationServiceImpl.java

@@ -13,6 +13,7 @@ import com.ym.mec.biz.service.SysUserCashAccountService;
 import com.ym.mec.common.constant.CommonConstants;
 import com.ym.mec.common.constant.CommonConstants;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.date.DateUtil;
 
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -306,7 +307,7 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
                 deductBalance = userCashAccount.getBalance();
                 deductBalance = userCashAccount.getBalance();
             }
             }
             amount = amount.subtract(deductBalance);
             amount = amount.subtract(deductBalance);
-            sysUserCashAccountService.updateBalance(userId, deductBalance.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐团续费");
+            sysUserCashAccountService.updateBalance(userId, deductBalance.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "考级报名");
         }else{
         }else{
             studentPaymentOrder.setActualAmount(amount);
             studentPaymentOrder.setActualAmount(amount);
             studentPaymentOrder.setBalancePaymentAmount(BigDecimal.ZERO);
             studentPaymentOrder.setBalancePaymentAmount(BigDecimal.ZERO);
@@ -591,6 +592,12 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
             }
             }
         }
         }
 
 
+        if (studentPaymentOrder.getStatus() == DealStatusEnum.CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAILED) {
+            if (studentPaymentOrder.getBalancePaymentAmount() != null && studentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
+                sysUserCashAccountService.updateBalance(studentPaymentOrder.getUserId(), studentPaymentOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "支付失败-退回");
+            }
+        }
+
         if(Objects.isNull(studentPaymentOrder.getClassGroupId())){
         if(Objects.isNull(studentPaymentOrder.getClassGroupId())){
             return true;
             return true;
         }
         }