Authored by Lixiaodi

转账相关代码

... ... @@ -501,6 +501,9 @@ public class PaymentServiceImpl implements IPaymentService {
logger.info("transferMon插入初始化转账信息成功,接下来计算费用");
// 算费
BigDecimal transferAmount = calcTransferAmount(sellerOrder.getUid(), sellerOrder.getSkup(), transferType);
transfer.setAmount(transferAmount);
record.setAmount(transferAmount);
logger.info("transferMon计算费用结果为 {}", transferAmount);
if (transferAmount == null || transferAmount.compareTo(new BigDecimal("0.1")) < 0) {
logger.warn("transferMonErr transferMon计算费用结果为 {}, 不合法的金额", transferAmount);
... ... @@ -508,8 +511,6 @@ public class PaymentServiceImpl implements IPaymentService {
addTradeBills(record);
throw new ServiceException(400, "不合法的金额:" + transferAmount);
}
transfer.setAmount(transferAmount);
record.setAmount(transferAmount);
// 因为转账支付宝扣费累计计算,使用转账额
record.setSystemAmount(transferAmount.multiply(new BigDecimal("-1")));
... ...