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>
|
Reference in New Issue
Block a user