修复分配学院宿舍人数问题
This commit is contained in:
@@ -616,13 +616,13 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listViewDormInfoByIds" parameterType="List" resultType="DmsDormitory">
|
<select id="listViewDormInfoByIds" parameterType="List" resultType="DmsDormitory">
|
||||||
select a.*,
|
SELECT a.*,
|
||||||
case b.occupancy
|
CASE
|
||||||
when b.occupancy is not null then b.occupancy
|
WHEN b.occupancy IS NOT NULL THEN b.occupancy
|
||||||
else 0
|
ELSE 0
|
||||||
end
|
END AS occupancy
|
||||||
as occupancy from view_dorm_info as a
|
FROM view_dorm_info AS a
|
||||||
left join view_dorm_stu_count as b on a.id = b.dormitory_id
|
LEFT JOIN view_dorm_stu_count AS b ON a.id = b.dormitory_id
|
||||||
where a.id in
|
where a.id in
|
||||||
<foreach item="item" collection="ids" open="(" separator="," close=")">
|
<foreach item="item" collection="ids" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
|
|||||||
Reference in New Issue
Block a user