|
@@ -211,9 +211,9 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(studentGoodsSell.getCouponIdList(),amount,studentGoodsSell.getType() != 1);
|
|
StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(studentGoodsSell.getCouponIdList(),amount,studentGoodsSell.getType() != 1);
|
|
amount = studentPaymentOrder.getActualAmount();
|
|
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.setCouponMarketAmount(studentPaymentOrder.getCouponRemitFee());
|
|
studentGoodsSell.setOrganId(student.getOrganId());
|
|
studentGoodsSell.setOrganId(student.getOrganId());
|
|
studentGoodsSell.setTotalAmount(amount);
|
|
studentGoodsSell.setTotalAmount(amount);
|
|
@@ -464,13 +464,12 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<Integer> couponIdList = repairInfo.getCouponIdList();
|
|
List<Integer> couponIdList = repairInfo.getCouponIdList();
|
|
- BigDecimal totalAmount = amount;
|
|
|
|
- StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(couponIdList,amount,repairInfo.getType() != 1);
|
|
|
|
- amount = totalAmount.subtract(repairInfo.getExemptionAmount());
|
|
|
|
|
|
+ amount = amount.subtract(repairInfo.getExemptionAmount());
|
|
if (amount.compareTo(BigDecimal.ZERO) < 0) {
|
|
if (amount.compareTo(BigDecimal.ZERO) < 0) {
|
|
throw new BizException("特权减免金额不能大于总金额");
|
|
throw new BizException("特权减免金额不能大于总金额");
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(couponIdList,amount,repairInfo.getType() != 1);
|
|
|
|
+ amount = studentPaymentOrder.getActualAmount();
|
|
if(couponIdList != null && couponIdList.size() > 0){
|
|
if(couponIdList != null && couponIdList.size() > 0){
|
|
repairInfo.setCouponIds(StringUtils.join(couponIdList,","));
|
|
repairInfo.setCouponIds(StringUtils.join(couponIdList,","));
|
|
}
|
|
}
|
|
@@ -642,8 +641,8 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
studentRepairDao.update(studentRepair);
|
|
studentRepairDao.update(studentRepair);
|
|
|
|
|
|
String channelType = "";
|
|
String channelType = "";
|
|
-
|
|
|
|
- StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(studentRepair.getCouponIdList(),amount,true);
|
|
|
|
|
|
+ List<Integer> couponIdList = Arrays.stream(studentRepair.getCouponIds().split(",")).mapToInt(Integer::valueOf).boxed().collect(Collectors.toList());
|
|
|
|
+ StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(couponIdList,amount,true);
|
|
amount = studentPaymentOrder.getActualAmount();
|
|
amount = studentPaymentOrder.getActualAmount();
|
|
studentPaymentOrder.setUserId(studentRepair.getStudentId());
|
|
studentPaymentOrder.setUserId(studentRepair.getStudentId());
|
|
studentPaymentOrder.setGroupType(GroupType.REPAIR);
|
|
studentPaymentOrder.setGroupType(GroupType.REPAIR);
|