This commit is contained in:
@@ -5,25 +5,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="org.dromara.property.mapper.TbRoomMapper">
|
||||
|
||||
<select id="queryRoomName" resultType="java.lang.String">
|
||||
select
|
||||
concat(c.community_name,b.building_name,u.unit_name,f.floor_name,r.room_number)
|
||||
from tb_room r
|
||||
inner join tb_floor f on r.floor_id=f.id
|
||||
inner join tb_unit u on r.unit_id=u.id
|
||||
inner join tb_building b on r.building_id=b.id
|
||||
inner join tb_community c on r.community_id=c.id
|
||||
SELECT
|
||||
concat(c.community_name, b.building_name, u.unit_name, f.floor_name, r.room_number)
|
||||
FROM
|
||||
tb_room r
|
||||
INNER JOIN tb_floor f ON r.floor_id = f.id
|
||||
INNER JOIN tb_unit u ON f.unit_id = u.id
|
||||
INNER JOIN tb_building b ON u.building_id = b.id
|
||||
INNER JOIN tb_community c ON b.community_id = c.id
|
||||
where r.id=#{roomId}
|
||||
</select>
|
||||
|
||||
<select id="queryRoomNameList" resultType="java.util.Map">
|
||||
select
|
||||
r.id,
|
||||
concat(c.community_name,b.building_name,u.unit_name,f.floor_name,r.room_number)
|
||||
from tb_room r
|
||||
inner join tb_floor f on r.floor_id=f.id
|
||||
inner join tb_unit u on r.unit_id=u.id
|
||||
inner join tb_building b on r.building_id=b.id
|
||||
inner join tb_community c on r.community_id=c.id
|
||||
SELECT
|
||||
concat(c.community_name, b.building_name, u.unit_name, f.floor_name, r.room_number)
|
||||
FROM
|
||||
tb_room r
|
||||
INNER JOIN tb_floor f ON r.floor_id = f.id
|
||||
INNER JOIN tb_unit u ON f.unit_id = u.id
|
||||
INNER JOIN tb_building b ON u.building_id = b.id
|
||||
INNER JOIN tb_community c ON b.community_id = c.id
|
||||
where r.id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
|
Reference in New Issue
Block a user