|
|
@@ -736,14 +736,14 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
|
|
|
// 交易后已使用额度
|
|
|
afterBalance = beforeBalance.add(money);
|
|
|
if (payCredit != null) {
|
|
|
- if (afterBalance.compareTo(payCredit) > 0) {
|
|
|
- if(originTradeType == DistributorTradeTypeEnum.BALANCE_TRANS.getType()){
|
|
|
- throw exception0(11_028, "余额不足,交易失败!");
|
|
|
- }else {
|
|
|
- throw exception(CREDIT_INSUFFICIENT_FUNDS);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+// if (afterBalance.compareTo(payCredit) > 0) {
|
|
|
+// if(originTradeType == DistributorTradeTypeEnum.BALANCE_TRANS.getType()){
|
|
|
+// throw exception0(11_028, "余额不足,交易失败!");
|
|
|
+// }else {
|
|
|
+// throw exception(CREDIT_INSUFFICIENT_FUNDS);
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
BigDecimal creditRemained = payCredit.subtract(afterBalance);
|
|
|
tradeName = "授信消费金额:" + money + "元,授信总额度" + payCredit + "元,消费后剩余额度" + creditRemained + "元;已用额度" + afterBalance + "元";
|
|
|
} else {
|
|
|
@@ -784,7 +784,7 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
|
|
|
respDTO.setTradeId(tradeId);
|
|
|
respDTO.setRechargeType(tradeType);
|
|
|
} else {
|
|
|
- if(!(tradeType == DistributorTradeTypeEnum.CREDIT_RECHARGE.getType() && rechargeReqDTO.getStoreId()!=null)){
|
|
|
+ if(!((tradeType == DistributorTradeTypeEnum.CREDIT_RECHARGE.getType() || tradeType == DistributorTradeTypeEnum.CREDIT_TRANS.getType() )&& rechargeReqDTO.getStoreId()!=null)){
|
|
|
throw exception(DISTRIBUTOR_PAY_FAILED);
|
|
|
}
|
|
|
}
|