Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -615,4 +615,29 @@
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="listViewDormInfoByIds" parameterType="List" resultType="DmsDormitory">
|
||||
select a.*,
|
||||
case b.occupancy
|
||||
when b.occupancy is not null then b.occupancy
|
||||
else 0
|
||||
end
|
||||
as occupancy from view_dorm_info as a
|
||||
left join view_dorm_stu_count as b on a.id = b.dormitory_id
|
||||
where a.id in
|
||||
<foreach item="item" collection="ids" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getDormitoryById" parameterType="Long" resultType="DmsDormitory">
|
||||
select a.*,
|
||||
case b.occupancy
|
||||
when b.occupancy is not null then b.occupancy
|
||||
else 0
|
||||
end
|
||||
as occupancy from view_dorm_info as a
|
||||
left join view_dorm_stu_count as b on a.id = b.dormitory_id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
where a2.apply_status != 1
|
||||
) as t1
|
||||
<where>
|
||||
t1.apply_status = 1 or t1.apply_status = 2 or t1.apply_status = 3
|
||||
<if test="stuNo != null and stuNo != ''">and t1.stu_no = #{stuNo}</if>
|
||||
<if test="roomId != null ">and t1.room_id = #{roomId}</if>
|
||||
<if test="startDate != null ">and t1.start_date = #{startDate}</if>
|
||||
|
||||
Reference in New Issue
Block a user