Переглянути джерело

Merge remote-tracking branch 'origin/dev' into dev

phoenix 1 рік тому
батько
коміт
8f9daac7c4
1 змінених файлів з 5 додано та 1 видалено
  1. 5 1
      src/main/resources/mapper/room/RoomBedMapper.xml

+ 5 - 1
src/main/resources/mapper/room/RoomBedMapper.xml

@@ -222,7 +222,11 @@
             and t2.floor_number = #{dto.floorNumber}
         </if>
         <if test="dto.classId != null">
-            and t7.class_id = #{dto.classId}
+            AND t2.id IN (
+            SELECT DISTINCT c1.room_id FROM room_bed c1
+            INNER JOIN base_student_school_roll c2 ON c1.student_user_id = c2.user_id
+            WHERE c2.class_id = #{dto.classId}
+            )
         </if>
         <if test="dto.buildId != null">
             and t3.id = #{dto.buildId}