|
@@ -4,6 +4,7 @@ import com.xhkjedu.slive.mapper.gradeclass.ClassTeacherMapper;
|
4
|
4
|
import com.xhkjedu.slive.mapper.gradeclass.SchoolMapper;
|
5
|
5
|
import com.xhkjedu.slive.mapper.liveplay.CourseClassMapper;
|
6
|
6
|
import com.xhkjedu.slive.mapper.liveplay.CourseMapper;
|
|
7
|
+import com.xhkjedu.slive.mapper.liveplay.CourseSectionMapper;
|
7
|
8
|
import com.xhkjedu.slive.mapper.system.UserMapper;
|
8
|
9
|
import com.xhkjedu.slive.model.gradeclass.TClass;
|
9
|
10
|
import com.xhkjedu.slive.model.gradeclass.TClassTeacher;
|
|
@@ -50,6 +51,8 @@ public class CourseService {
|
50
|
51
|
private UserMapper userMapper;
|
51
|
52
|
@Resource
|
52
|
53
|
private CourseClassMapper courseClassMapper;
|
|
54
|
+ @Resource
|
|
55
|
+ private CourseSectionMapper courseSectionMapper;
|
53
|
56
|
|
54
|
57
|
//添加
|
55
|
58
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -315,6 +318,12 @@ public class CourseService {
|
315
|
318
|
return new ResultVo(1, "没有结课权限");
|
316
|
319
|
}
|
317
|
320
|
|
|
321
|
+ //结课时判断是否有进行中的直播课,如果有就提示
|
|
322
|
+ Integer jxznum = courseSectionMapper.getJxzSectionNum(course.getCourseid());
|
|
323
|
+ if(N_Utils.isTrueInteger(jxznum)){
|
|
324
|
+ return new ResultVo(1,"有进行中的课程,暂不能结课");
|
|
325
|
+ }
|
|
326
|
+
|
318
|
327
|
//如果课程状态变成已结束,则班级变成结束直播班类型
|
319
|
328
|
classService.updateClasstype(c.getClassid(),99);
|
320
|
329
|
}
|