master
yixian 7 years ago
parent 0d7b31696b
commit 2502a96da6

@ -567,7 +567,7 @@ public class TradeLogServiceImpl implements TradeLogService {
parmerters.put("actual_fee", takeDecimalOrDefault(analysis, "actual_fee", BigDecimal.ZERO));
parmerters.put("totalSettledAmount", takeDecimalOrDefault(analysis, "total_settle_amount", BigDecimal.ZERO));
parmerters.put("royalpay_charge", takeDecimalOrDefault(analysis, "total_royal_surcharge", BigDecimal.ZERO));
parmerters.put("total_fee", takeDecimalOrDefault(analysis, "total_surcharge", BigDecimal.ZERO) + "(GST Inclusive)");
parmerters.put("total_fee", takeDecimalOrDefault(analysis, "total_surcharge", BigDecimal.ZERO));
parmerters.put("alipay_fee", takeDecimalOrDefault(analysis, "alipay_fee", BigDecimal.ZERO));
parmerters.put("wechat_fee", takeDecimalOrDefault(analysis, "wechat_fee", BigDecimal.ZERO));
parmerters.put("bestpay_fee", takeDecimalOrDefault(analysis, "bestpay_fee", BigDecimal.ZERO));
@ -608,9 +608,9 @@ public class TradeLogServiceImpl implements TradeLogService {
obj.put(key, CurrencyAmountUtils.scale(decimal, currency));
}
private String takeDecimalOrDefault(JSONObject analysis, String key, BigDecimal defaultVal) {
private BigDecimal takeDecimalOrDefault(JSONObject analysis, String key, BigDecimal defaultVal) {
BigDecimal decimal = analysis.containsKey(key) ? analysis.getBigDecimal(key) : defaultVal;
return CurrencyAmountUtils.scale(decimal, PlatformEnvironment.getEnv().getForeignCurrency()).toPlainString();
return CurrencyAmountUtils.scale(decimal, PlatformEnvironment.getEnv().getForeignCurrency());
}
@Override

Loading…
Cancel
Save