|
@@ -3482,6 +3482,16 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if(Objects.isNull(vipGroup)){
|
|
if(Objects.isNull(vipGroup)){
|
|
throw new BizException("未找到指定的vip课程");
|
|
throw new BizException("未找到指定的vip课程");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupCategoryId());
|
|
|
|
+
|
|
|
|
+ if(vipGroupCategory == null){
|
|
|
|
+ throw new BizException("请修改VIP课课程形式");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(vipGroupCategory.getStudentNum() < studentCoursePriceMap.size()){
|
|
|
|
+ throw new BizException("学生人数超过{}人,请调整", vipGroupCategory.getStudentNum());
|
|
|
|
+ }
|
|
|
|
|
|
ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
|
|
ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
|
|
|
|
|
|
@@ -3491,7 +3501,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
throw new BizException("已有学员购买了该课程组,无法添加,请走学员购买流程!");
|
|
throw new BizException("已有学员购买了该课程组,无法添加,请走学员购买流程!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = vipGroupDefaultClassesUnitPriceDao.getByVipGroup(vipGroup.getId());
|
|
VipGroupDefaultClassesUnitPrice vipGroupDefaultClassesUnitPrice = vipGroupDefaultClassesUnitPriceDao.getByVipGroup(vipGroup.getId());
|
|
if(Objects.isNull(vipGroupDefaultClassesUnitPrice)){
|
|
if(Objects.isNull(vipGroupDefaultClassesUnitPrice)){
|
|
throw new BizException("课程单价设置错误");
|
|
throw new BizException("课程单价设置错误");
|