连续加减方法运用

This commit is contained in:
Chopper 2022-01-10 09:48:44 +08:00
parent 11f9ddaeb6
commit 643e8c8157
4 changed files with 3 additions and 4 deletions

View File

@ -35,7 +35,6 @@ public final class CurrencyUtil {
}
return result.doubleValue();
}
/**
* 提供精确的加法运算
*

View File

@ -170,7 +170,7 @@ public class PriceDetailDTO implements Serializable {
billPrice = settlementPrice;
} else {
//如果是普通订单最终结算金额 = flowPrice - platFormCommission - distributionCommission 流水金额-平台佣金-分销佣金
billPrice = CurrencyUtil.sub(CurrencyUtil.sub(flowPrice, platFormCommission), distributionCommission);
billPrice = CurrencyUtil.sub(flowPrice, platFormCommission, distributionCommission);
}
}

View File

@ -160,7 +160,7 @@ public class StoreFlowServiceImpl extends ServiceImpl<StoreFlowMapper, StoreFlow
//流水金额
storeFlow.setFinalPrice(afterSale.getActualRefundPrice());
//最终结算金额
storeFlow.setBillPrice(CurrencyUtil.add(CurrencyUtil.add(storeFlow.getFinalPrice(), storeFlow.getDistributionRebate()), storeFlow.getCommissionPrice()));
storeFlow.setBillPrice(CurrencyUtil.add(storeFlow.getFinalPrice(), storeFlow.getDistributionRebate(), storeFlow.getCommissionPrice()));
//获取第三方支付流水号
RefundLog refundLog = refundLogService.queryByAfterSaleSn(afterSale.getSn());
storeFlow.setTransactionId(refundLog.getReceivableNo());

View File

@ -99,7 +99,7 @@ public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements Bi
bill.setPointSettlementPrice(orderBill.getPointSettlementPrice());
bill.setKanjiaSettlementPrice(orderBill.getKanjiaSettlementPrice());
//入账金额=订单金额+积分商品+砍价商品
orderPrice = CurrencyUtil.add(CurrencyUtil.add(orderBill.getBillPrice(), orderBill.getPointSettlementPrice()),
orderPrice = CurrencyUtil.add(orderBill.getBillPrice(), orderBill.getPointSettlementPrice(),
orderBill.getKanjiaSettlementPrice());
}