소스 검색

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

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>