|
@@ -753,14 +753,15 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if(Objects.isNull(classGroup)){
|
|
if(Objects.isNull(classGroup)){
|
|
throw new BizException("课程信息错误");
|
|
throw new BizException("课程信息错误");
|
|
}
|
|
}
|
|
- if(classGroup.getStudentNum()>=classGroup.getExpectStudentNum()){
|
|
|
|
- throw new BizException("该课程人数已达上限");
|
|
|
|
- }
|
|
|
|
|
|
|
|
StudentPaymentOrder byStudentVipGroup = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(),
|
|
StudentPaymentOrder byStudentVipGroup = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(),
|
|
user.getId(),
|
|
user.getId(),
|
|
DealStatusEnum.ING.getCode());
|
|
DealStatusEnum.ING.getCode());
|
|
|
|
|
|
|
|
+ if(classGroup.getStudentNum()>=classGroup.getExpectStudentNum()&&Objects.nonNull(byStudentVipGroup)){
|
|
|
|
+ throw new BizException("该课程人数已达上限");
|
|
|
|
+ }
|
|
|
|
+
|
|
if(Objects.nonNull(byStudentVipGroup)){
|
|
if(Objects.nonNull(byStudentVipGroup)){
|
|
byStudentVipGroup.setStatus(DealStatusEnum.CLOSE);
|
|
byStudentVipGroup.setStatus(DealStatusEnum.CLOSE);
|
|
studentPaymentOrderDao.update(byStudentVipGroup);
|
|
studentPaymentOrderDao.update(byStudentVipGroup);
|