Browse Source

Merge branch 'feature_HW_20230331' of http://git.dayaedu.com/yonge/mec into master_saas

zouxuan 2 years ago
parent
commit
5407af4c97

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentLessonExaminationServiceImpl.java

@@ -56,13 +56,13 @@ public class StudentLessonExaminationServiceImpl extends ServiceImpl<StudentLess
     @Transactional(rollbackFor = Exception.class)
     public List<Integer> save(Long lessonExaminationId, List<StudentLessonExaminationSaveDto> studentLessonExaminationSaveDtos) {
         List<StudentLessonExamination> studentLessonExaminations = new ArrayList<>();
-        List<Integer> studentIdList = Collections.EMPTY_LIST;
+        List<Integer> studentIdList = new ArrayList<>();
         for (StudentLessonExaminationSaveDto dto : studentLessonExaminationSaveDtos) {
             String[] studentIds = dto.getStudentIds().split(",");
             for (String studentId : studentIds) {
                 StudentLessonExamination studentLessonExamination = new StudentLessonExamination();
                 studentLessonExamination.setLessonExaminationId(lessonExaminationId);
-                int parseInt = Integer.parseInt(studentId);
+                Integer parseInt = Integer.parseInt(studentId);
                 studentIdList.add(parseInt);
                 studentLessonExamination.setUserId(parseInt);
                 studentLessonExamination.setSubjectId(dto.getSubjectId());

+ 3 - 6
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -4153,8 +4153,8 @@
         left join course_homework ch on cs.id_ = ch.course_schedule_id_
 
         <where>
-            <if test="param.musicGroupId != null">
-                and #{param.musicGroupId} = cs.music_group_id_
+            <if test="param.teacherId != null">
+                and (cs.teacher_id_ = #{param.teacherId} or cs.actual_teacher_id_ = #{param.teacherId})
             </if>
             <if test="param.classType != null">
                 and cs.type_ = #{param.classType}
@@ -4183,9 +4183,6 @@
                 and (ch.version_tag_ = #{param.versionTag} or ch.version_tag_ is null)
             </if>
 
-            <if test="param.teacherId != null">
-                and cs.teacher_id_ = #{param.teacherId}
-            </if>
         </where>
         <if test="param.offset != null">
             limit #{param.offset},#{param.rows}
@@ -4200,7 +4197,7 @@
 
         <where>
             <if test="param.teacherId != null">
-                and cs.teacher_id_ = #{param.teacherId}
+                and (cs.teacher_id_ = #{param.teacherId} or cs.actual_teacher_id_ = #{param.teacherId})
             </if>
             <if test="param.musicGroupId != null">
                 and #{param.musicGroupId} = cs.music_group_id_