|
@@ -149,11 +149,14 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
|
|
}
|
|
}
|
|
if (studentPaymentOrder.getStatus() == DealStatusEnum.CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAILED) {
|
|
if (studentPaymentOrder.getStatus() == DealStatusEnum.CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAILED) {
|
|
if (info.getMaxAmount() != null && info.getPaidAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
if (info.getMaxAmount() != null && info.getPaidAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
- info.setPaidAmount(info.getPaidAmount().subtract(studentPaymentOrder.getActualAmount()));
|
|
|
|
- info.setUpdateTime(new Date());
|
|
|
|
- int update = sporadicChargeInfoDao.update(info);
|
|
|
|
- if (update <= 0) {
|
|
|
|
- throw new BizException("已收金额更新失败,请重试");
|
|
|
|
|
|
+ List<SporadicChargeInfo> activeInfos = sporadicChargeInfoDao.getOrganActiveInfo(info.getOrganId(), 12);
|
|
|
|
+ for (SporadicChargeInfo activeInfo : activeInfos) {
|
|
|
|
+ activeInfo.setPaidAmount(activeInfo.getPaidAmount().subtract(info.getAmount()));
|
|
|
|
+ activeInfo.setUpdateTime(new Date());
|
|
|
|
+ int update = sporadicChargeInfoDao.update(activeInfo);
|
|
|
|
+ if (update <= 0) {
|
|
|
|
+ throw new BizException("已收金额更新失败,请重试");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (info.getOrganId().equals(42) && info.getChargeType().equals(SporadicChargeTypeEnum.LEVEL)) {
|
|
if (info.getOrganId().equals(42) && info.getChargeType().equals(SporadicChargeTypeEnum.LEVEL)) {
|