|
|
@@ -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());
|