Commit 1f3877e1 by jianan

预计发佣查询结算币种10

parent be769707
......@@ -380,10 +380,12 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
JSONObject announcementRatio = announcementRatioList.get(0, JSONObject.class);
String currency = announcementRatio.getStr("currency");
log.info("默认结算币种:{}", currency);
log.info("结算币种:{}", currency);
BigDecimal exchangeRate = queryExchangeRateByFeign(queryPolicyAndBrokerDto.getCurrency(), currency);
log.info("结算汇率:{}", exchangeRate);
for (ExpectedFortune expectedFortune : expectedFortuneList) {
//设置结算货币
expectedFortune.setCurrency(currency);
......@@ -392,11 +394,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
//设置港币金额(标准发佣金额 * 默认结算汇率)
expectedFortune.setHkdAmount(expectedFortune.getAmount().multiply(exchangeRate));
iExpectedFortuneService.lambdaUpdate()
.set(ExpectedFortune::getCurrency, currency)
.set(ExpectedFortune::getDefaultExchangeRate, exchangeRate)
.set(ExpectedFortune::getHkdAmount, expectedFortune.getHkdAmount())
.eq(ExpectedFortune::getId, expectedFortune.getId());
iExpectedFortuneService.updateById(expectedFortune);
}
} else {
log.error("查询结算币种失败,未查询到默认结算汇率->入参request:{},出参result:{}", JSON.toJSONString(request), JSON.toJSONString(result));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment