|
@@ -211,9 +211,9 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(studentGoodsSell.getCouponIdList(),amount,studentGoodsSell.getType() != 1);
|
|
|
amount = studentPaymentOrder.getActualAmount();
|
|
|
// 判断金额是否正确
|
|
|
-// if (studentGoodsSell.getTotalAmount().compareTo(amount) != 0) {
|
|
|
-// throw new BizException("非法请求");
|
|
|
-// }
|
|
|
+ if (studentGoodsSell.getTotalAmount().compareTo(amount) != 0) {
|
|
|
+ throw new BizException("非法请求");
|
|
|
+ }
|
|
|
studentGoodsSell.setCouponMarketAmount(studentPaymentOrder.getCouponRemitFee());
|
|
|
studentGoodsSell.setOrganId(student.getOrganId());
|
|
|
studentGoodsSell.setTotalAmount(amount);
|
|
@@ -464,9 +464,9 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
}
|
|
|
}
|
|
|
List<Integer> couponIdList = repairInfo.getCouponIdList();
|
|
|
+ BigDecimal totalAmount = amount;
|
|
|
StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(couponIdList,amount,repairInfo.getType() != 1);
|
|
|
- amount = studentPaymentOrder.getActualAmount();
|
|
|
- amount = amount.subtract(repairInfo.getExemptionAmount());
|
|
|
+ amount = totalAmount.subtract(repairInfo.getExemptionAmount());
|
|
|
if (amount.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
throw new BizException("特权减免金额不能大于总金额");
|
|
|
}
|