Ver código fonte

班级课表限制

zhaoy 6 anos atrás
pai
commit
7b371cafda

+ 2 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/basic/service/impl/GradeServiceImpl.java

@@ -230,12 +230,12 @@ public class GradeServiceImpl implements GradeService{
         if (check > 0) {
             throw new BizException(BizExceptionCode.EXISTS_TEACHER);
         }
-        //课表检测
+        //检测课表发布
         check = sysStudentMapper.repeatCurriculum(id);
         if (check > 0) {
             throw new BizException(BizExceptionCode.EXISTS_CURRICULUM);
         }
-        //检测科目
+        //检测作业发布
         check = homeWorkMapper.homeWorkRelease(id);
         if(check > 0){
             throw new BizException(BizExceptionCode.HOMEWORK_RELEASE);

+ 1 - 1
applications/school/school-server/src/main/resources/mapper/SysStudentMapper.xml

@@ -479,7 +479,7 @@
   </select>
 
   <select id="repeatCurriculum" parameterType="long" resultType="integer">
-    select count(1) from clazz_curriculum where clazz_id = #{id} and clazz_curriculum.cur_status=1
+    select count(1) from clazz_main_curriculum where clazz_id = #{id} and clazz_main_curriculum.mcur_status=1
   </select>
 
   <select id="count" resultType="int">