You've already forked FrameTour-BE
查询景区信息和机位接口实现
This commit is contained in:
@ -58,4 +58,18 @@
|
||||
from device d
|
||||
where d.scenic_id = #{scenicId}
|
||||
</select>
|
||||
<select id="deviceCountByScenicId" resultType="com.ycwl.basic.model.mobile.scenic.ScenicDeviceCountVO">
|
||||
select ifnull(a.totalDeviceCount,0) as totalDeviceCount,ifnull(b.shotDeviceCount,0) as shotDeviceCount
|
||||
from (
|
||||
select count(1) totalDeviceCount,scenic_id
|
||||
from device
|
||||
where scenic_id = #{scenicId} and status = 1
|
||||
)a
|
||||
left join (
|
||||
select count(1) shotDeviceCount,scenic_id
|
||||
from source
|
||||
where scenic_id = #{scenicId}
|
||||
group by device_id
|
||||
)b on a.scenic_id = b.scenic_id
|
||||
</select>
|
||||
</mapper>
|
@ -117,12 +117,41 @@
|
||||
left join scenic_config c on s.id = c.id
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
<select id="appList" resultType="com.ycwl.basic.model.mobile.scenic.ScenicAppVO">
|
||||
select s.id, `name`, `phone`, introduction, longitude, latitude, radius, province, city, area, address
|
||||
from scenic s
|
||||
where
|
||||
`status` = 1
|
||||
<if test="name!=null and name!=''">
|
||||
and locate(#{name},`name`) > 0
|
||||
</if>
|
||||
<if test="province!=null and province!=''">
|
||||
and locate(#{province},`province`) > 0
|
||||
</if>
|
||||
<if test="city!=null and city!=''">
|
||||
and locate(#{city},`city`) > 0
|
||||
</if>
|
||||
<if test="area!=null and area!=''">
|
||||
and locate(#{area},`area`) > 0
|
||||
</if>
|
||||
<if test="startTime!=null">
|
||||
and s.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and s.create_time <= #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAppById" resultType="com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO">
|
||||
select s.id, `name`, `phone`, introduction, longitude, latitude, radius, province, city, area, address
|
||||
from scenic s
|
||||
where `status` = 1 and s.id = #{id}
|
||||
</select>
|
||||
|
||||
<resultMap id="scenicAndConfig" type="com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
|
Reference in New Issue
Block a user