新生报到宿舍分配代码调整
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>
|
||||
|
||||
Reference in New Issue
Block a user