| | |
| | | )
|
| | | select distinct * from rsd order by "dictLabel"
|
| | | </select>
|
| | | <select id="getCameraOperationByCameraId" resultType="java.lang.Boolean" parameterType="java.lang.String">
|
| | | select
|
| | | case now() > ac.operator_expired or ac.operator_expired is null
|
| | | when true then true
|
| | | when (
|
| | | case ((select cast(su.camera_priority as integer) from sys_user su
|
| | | where su.user_id = #{userId}) > (select cast(su.camera_priority as integer) from sys_user su
|
| | | inner join ard_cameras ac on su.user_id = ac.operator_id
|
| | | where ac.id = #{id} ))
|
| | | when true then true
|
| | | when false then false end) then false
|
| | | end
|
| | | from ard_cameras ac
|
| | | where ac.id = #{id}
|
| | | </select>
|
| | | <select id="getChannelByCameraId" resultType="java.util.Map" parameterType="java.lang.String">
|
| | | select * from ard_channel ac
|
| | | inner join sys_config sc on sc.config_key = 'dayNightTime'
|
| | | where ac.device_id = #{id}
|
| | | </select>
|
| | | </mapper>
|