|
@@ -75,6 +75,8 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
|
|
private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
@Autowired
|
|
@Autowired
|
|
private SysTenantAccountService sysTenantAccountService;
|
|
private SysTenantAccountService sysTenantAccountService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private StudentDao studentDao;
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory
|
|
private static final Logger LOGGER = LoggerFactory
|
|
.getLogger(PracticeGroupService.class);
|
|
.getLogger(PracticeGroupService.class);
|
|
@@ -108,6 +110,8 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
|
|
throw new BizException("请填写课程数量");
|
|
throw new BizException("请填写课程数量");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ studentDao.lockUser(courseGroup.getTeacherId());
|
|
|
|
+
|
|
//总课程时长
|
|
//总课程时长
|
|
Integer totalCourseTime=courseCycleInfo.getCourseCount()*courseCycleInfo.getSingleClassMinutes();
|
|
Integer totalCourseTime=courseCycleInfo.getCourseCount()*courseCycleInfo.getSingleClassMinutes();
|
|
SysTenantAccount sysTenantAccount = sysTenantAccountService.get(courseGroup.getTeacherId());
|
|
SysTenantAccount sysTenantAccount = sysTenantAccountService.get(courseGroup.getTeacherId());
|
|
@@ -306,14 +310,20 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
|
|
if(Objects.isNull(courseGroupId)){
|
|
if(Objects.isNull(courseGroupId)){
|
|
throw new BizException("请指定课程组");
|
|
throw new BizException("请指定课程组");
|
|
}
|
|
}
|
|
- List<ClassGroupStudentMapper> groupStudents = classGroupStudentMapperDao.findGroupStudents(courseGroupId.toString(), GroupType.COMM, userId, null);
|
|
|
|
- if(!CollectionUtils.isEmpty(groupStudents)){
|
|
|
|
- throw new BizException("您已购买过此课程组");
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ studentDao.lockUser(userId);
|
|
|
|
+
|
|
CoursesGroup coursesGroup = coursesGroupDao.get(courseGroupId);
|
|
CoursesGroup coursesGroup = coursesGroupDao.get(courseGroupId);
|
|
if(Objects.isNull(coursesGroup)){
|
|
if(Objects.isNull(coursesGroup)){
|
|
throw new BizException("此课程组不存在");
|
|
throw new BizException("此课程组不存在");
|
|
}
|
|
}
|
|
|
|
+ if(coursesGroup.getStatus().equals(GroupStatusEnum.CANCEL)){
|
|
|
|
+ throw new BizException("此课程组已关闭");
|
|
|
|
+ }
|
|
|
|
+ List<ClassGroupStudentMapper> groupStudents = classGroupStudentMapperDao.findGroupStudents(courseGroupId.toString(), GroupType.COMM, userId, null);
|
|
|
|
+ if(!CollectionUtils.isEmpty(groupStudents)){
|
|
|
|
+ throw new BizException("您已购买过此课程组");
|
|
|
|
+ }
|
|
|
|
|
|
Date now=new Date();
|
|
Date now=new Date();
|
|
|
|
|