Ver Fonte

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

dzx há 1 ano atrás
pai
commit
afbd0b1641
1 ficheiros alterados com 3 adições e 0 exclusões
  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>