|
@@ -2649,7 +2649,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if (result.getCode() != 200) {
|
|
|
return result;
|
|
|
}
|
|
|
- classGroupDao.modifyStudentNum(classGroup.getId(),-1);
|
|
|
+ if(groupType == GroupType.VIP){
|
|
|
+ classGroupDao.modifyStudentNum(classGroup.getId(),-1);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
Date date = new Date();
|
|
@@ -2680,8 +2682,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
throw new BizException("您无法购买此课程");
|
|
|
}
|
|
|
}
|
|
|
- //增加学员数
|
|
|
- classGroupDao.modifyStudentNum(classGroup.getId(),1);
|
|
|
+ if(groupType == GroupType.VIP){
|
|
|
+ //增加学员数
|
|
|
+ classGroupDao.modifyStudentNum(classGroup.getId(),1);
|
|
|
+ }
|
|
|
|
|
|
List<CourseSchedule> courseSchedules = JSON.parseArray(vipGroup.getCourseSchedulesJson(), CourseSchedule.class);
|
|
|
courseScheduleService.checkNewCourseSchedules(courseSchedules, false, false);
|
|
@@ -2796,6 +2800,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
if("LIVE".equals(vipGroup.getGroupType())){
|
|
|
groupType = GroupType.LIVE;
|
|
|
messageTypeEnum = MessageTypeEnum.STUDENT_PUSH_LIVE_BUY;
|
|
|
+ classGroupDao.modifyStudentNum(classGroup.getId(),1);
|
|
|
}
|
|
|
if (vipGroup.getStatus() == VipGroupStatusEnum.DELETE ||
|
|
|
vipGroup.getStatus() == VipGroupStatusEnum.CANCEL ||
|
|
@@ -2964,7 +2969,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- classGroup.setStudentNum(classGroup.getStudentNum() - 1);
|
|
|
+ if("VIP".equals(vipGroup.getGroupType())){
|
|
|
+ classGroupDao.modifyStudentNum(classGroup.getId(),-1);
|
|
|
+ }
|
|
|
if (order.getBalancePaymentAmount() != null && order.getBalancePaymentAmount().doubleValue() > 0) {
|
|
|
sysUserCashAccountService.updateBalance(userId, order.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS,
|
|
|
"小课购买失败");
|