Sfoglia il codice sorgente

优化: 分开提现利率

linxk 2 settimane fa
parent
commit
bb5d1cecdf

+ 1 - 1
cif-service/src/main/java/com/txz/cif/service/impl/WithdrawRecordServiceImpl.java

@@ -114,7 +114,7 @@ public class WithdrawRecordServiceImpl extends AbstractService<WithdrawRecord> i
                                         .payApplydate(now.toString())
                                         // 如需测试改成502
                                         // .payChannelcode("502")
-                                        .payChannelcode(getPayChannelcode(w.getChannel(),paymentChannel))
+                                        .payChannelcode(getPayChannelcode(w.getBank(),paymentChannel))
                                         .payNotifyurl(paymentChannel.getWithdrawNotifyUrl())
                                         .payAmount(w.getAmount().subtract(w.getFee()).toString())
                                         .payProductname("提现")

+ 8 - 3
cif-service/src/main/java/com/txz/cif/web/WithdrawRecordApiController.java

@@ -140,8 +140,13 @@ public class WithdrawRecordApiController {
             if (param.getAmount().compareTo(new BigDecimal(20000)) > 0) {
                 return ResultGenerator.genFailResult(ResultCode.AMOUNT_OUT_MAX);
             }
-            
-            com.txz.operating.result.Result<ConfigDTO> openRedEnvelopeRate = operatingConfigDubboServiceClient.getConfigByCode("withdraw_rate");
+            String key = "";
+            if (param.getAccountType() == 1){
+                key = "withdraw_rate";
+            } else {
+                key = "earning_withdraw_rate";
+            }
+            com.txz.operating.result.Result<ConfigDTO> openRedEnvelopeRate = operatingConfigDubboServiceClient.getConfigByCode(key);
             String rate = openRedEnvelopeRate.getData().getValueInfo();
             BigDecimal fee = param.getAmount().multiply(new BigDecimal(rate)).divide(BigDecimal.valueOf(100), 2, RoundingMode.DOWN);
             
@@ -167,7 +172,7 @@ public class WithdrawRecordApiController {
             withdrawRecord.setBank(user.getBank());
             withdrawRecord.setBankAccount(user.getBankAccount());
             withdrawRecord.setBankAccountName(user.getBankAccountName());
-             withdrawRecord.setChannel(param.getChannel());
+//             withdrawRecord.setChannel(param.getChannel());
             withdrawRecord.setCurrency(param.getCurrency());
             withdrawRecord.setAmount(param.getAmount());
             withdrawRecord.setCreateTime(DateUtil.date());