|
@@ -1187,9 +1187,15 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
throw new BizException("指定的课程不存在");
|
|
|
}
|
|
|
if(vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL)){
|
|
|
- throw new BizException("不能已进行的课程进行此操作");
|
|
|
+ throw new BizException("不能对已停止的课程进行此操作");
|
|
|
}
|
|
|
- ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
|
|
|
+
|
|
|
+ List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
|
|
|
+ if(!CollectionUtils.isEmpty(studentApplyRefunds)){
|
|
|
+ throw new BizException("此学生存在退课申请,请到系统日志中查看");
|
|
|
+ }
|
|
|
+
|
|
|
+ ClassGroup classGroup = classGroupDao.findByVipGroup(vipGroupId, null);
|
|
|
|
|
|
ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.query(classGroup.getId(),
|
|
|
studentId);
|
|
@@ -1310,6 +1316,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
|
ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.query(studentPaymentOrder.getClassGroupId(),
|
|
|
studentPaymentOrder.getUserId());
|
|
|
|
|
|
+ if(Objects.isNull(classStudentMapperByUserIdAndClassGroupId)){
|
|
|
+ throw new BizException("此学员不在指定班级上");
|
|
|
+ }
|
|
|
+
|
|
|
classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT);
|
|
|
classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
|
|
|
|