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

床位分配,第二部,根据传入性别查询寝室

dzx 1 рік тому
батько
коміт
afbd0b1641
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      src/main/resources/mapper/room/RoomBedMapper.xml

+ 3 - 0
src/main/resources/mapper/room/RoomBedMapper.xml

@@ -126,6 +126,9 @@
                 WHERE delete_mark = 0 AND room_id = t1.id
                   AND student_user_id IS NOT NULL
             ) != t1.bed_count
+        <if test="dto.gender != null and dto.gender != ''">
+            and t1.gender = #{dto.gender}
+        </if>
         ORDER BY t1.sort_code
     </select>