yonge 2 سال پیش
والد
کامیت
1e25de7741

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupStudentMapperDao.java

@@ -485,7 +485,7 @@ public interface ClassGroupStudentMapperDao extends BaseDAO<Long, ClassGroupStud
      * @return java.util.List<com.ym.mec.biz.dal.entity.ClassGroup>
      */
     List<ClassGroup> getStudentClassGroupWithTeacher(@Param("studentIds") Set<Integer> studentIds,
-                                                     @Param("teacherId") Integer teacherId);
+                                                     @Param("teacherId") Integer teacherId, @Param("musicGroupId") String musicGroupId);
     
     List<ClassGroupStudentMapperDto> queryByClassGroupType(@Param("musicGroupId") String musicGroupId,@Param("classGroupType") ClassGroupTypeEnum classGroupType,@Param("teacherRole") TeachTypeEnum teacherRole, @Param("studentIdList") List<Integer> studentIdList);
 }

+ 4 - 1
mec-biz/src/main/resources/config/mybatis/ClassGroupStudentMapperMapper.xml

@@ -674,7 +674,7 @@
         WHERE
             cg.del_flag_ = 0
             AND cg.lock_flag_ =0
-            AND cgsm.status_='NORMAL'
+            AND cgsm.status_='NORMAL' and cg.group_type_ = 'MUSIC'
             AND cgsm.user_id_ IN
             <foreach collection="studentIds" item="studentId" open="(" close=")" separator=",">
                 #{studentId}
@@ -682,6 +682,9 @@
             <if test="teacherId!=null">
                 AND cgtm.user_id_ = #{teacherId}
             </if>
+            <if test="musicGroupId != null and musicGroupId != ''">
+                AND cg.music_group_id_ = #{musicGroupId}
+            </if>
             AND cg.id_ IS NOT NULL
         ORDER BY cg.id_ DESC
     </select>

+ 1 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/ExtracurricularExercisesController.java

@@ -190,7 +190,7 @@ public class ExtracurricularExercisesController extends BaseController {
         List<MusicGroup> studentNormalMusicGroups = studentRegistrationDao.getStudentNormalMusicGroups(studentIds);
         result.put("musicGroups", studentNormalMusicGroups);
 
-        List<ClassGroup> classGroups = classGroupStudentMapperDao.getStudentClassGroupWithTeacher(studentIds, sysUser.getId());
+        List<ClassGroup> classGroups = classGroupStudentMapperDao.getStudentClassGroupWithTeacher(studentIds, sysUser.getId(), musicGroupId);
         result.put("classGroups", classGroups);
 
         List<Subject> studentSubjects = studentDao.getStudentSubjects(studentIds);