Commit b648c373 authored by 周健威's avatar 周健威

修改退款问题

parent 1455e501
......@@ -650,17 +650,20 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
).map(OrderAccountDeduction::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal toExtendDeduction = oad.getOriginOrderAmount().subtract(toOdDeduction);
BigDecimal residueOrderAmount = oad.getOriginOrderAmount().subtract(toOdDeduction);
//如果订单原款 - 扣费 小于零,则押金有额外扣费
if(toExtendDeduction.compareTo(BigDecimal.ZERO) < 0) {
//置反
//置反 去用押金抵扣
toExtendDeduction = BigDecimal.ZERO.subtract(toExtendDeduction);
residueOrderAmount = BigDecimal.ZERO;
}else {
//否则 则置为零
toExtendDeduction = BigDecimal.ZERO;
}
oad.setDepositAmount(oad.getOriginDepositAmount().subtract(toDeduction).subtract(toExtendDeduction));
oad.setOrderAmount(residueOrderAmount);
}
private void handleViolateDetail(DeductionTypeEnum dte, OrderAccountDetail oad, DedDetailDTO vio, CancelStartedVO csv) {
......
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