| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdCamerasVo"> |
| | | select c.id, c.name, c.ip, c.port,c.rtsp_port, c.username, c.password, c.gdtype, c.channel, c.longitude, c.latitude, c.altitude, c.user_id, c.dept_id, |
| | | c.cam_heading, c.cam_pitch, c.cam_roll, c.cam_near, c.cam_far, c.cam_aspectratio, c.cam_depth, c.cam_fov,c.operator_id,c.operator_expired |
| | | select c.id, |
| | | c.name, |
| | | c.ip, |
| | | c.port, |
| | | c.rtsp_port, |
| | | c.username, |
| | | c.password, |
| | | c.gdtype, |
| | | c.channel, |
| | | c.longitude, |
| | | c.latitude, |
| | | c.altitude, |
| | | c.user_id, |
| | | c.dept_id, |
| | | c.cam_heading, |
| | | c.cam_pitch, |
| | | c.cam_roll, |
| | | c.cam_near, |
| | | c.cam_far, |
| | | c.cam_aspectratio, |
| | | c.cam_depth, |
| | | c.cam_fov, |
| | | c.operator_id, |
| | | c.operator_expired |
| | | from ard_cameras c |
| | | left join sys_dept d on d.dept_id=c.dept_id |
| | | left join sys_user u on u.user_id=c.user_id |
| | |
| | | <if test="latitude != null "> and c.latitude = #{latitude}</if> |
| | | <if test="altitude != null "> and c.altitude = #{altitude}</if> |
| | | <if test="userId != null and userId != ''"> and c.user_id = #{userId}</if> |
| | | <if test="deptId != null "> and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) ))</if> |
| | | <if test="deptId != null ">and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <if test="camHeading != null "> and c.cam_heading = #{camHeading}</if> |
| | | <if test="camPitch != null "> and c.cam_pitch = #{camPitch}</if> |
| | | <if test="camRoll != null "> and c.cam_roll = #{camRoll}</if> |
| | |
| | | <if test="latitude != null "> and c.latitude = #{latitude}</if> |
| | | <if test="altitude != null "> and c.altitude = #{altitude}</if> |
| | | <if test="userId != null and userId != ''"> and c.user_id = #{userId}</if> |
| | | <if test="deptId != null "> and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) ))</if> |
| | | <if test="deptId != null ">and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <if test="camHeading != null "> and c.cam_heading = #{camHeading}</if> |
| | | <if test="camPitch != null "> and c.cam_pitch = #{camPitch}</if> |
| | | <if test="camRoll != null "> and c.cam_roll = #{camRoll}</if> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteArdCamerasById" parameterType="String"> |
| | | delete from ard_cameras where id = #{id} |
| | | delete |
| | | from ard_cameras |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdCamerasByIds" parameterType="String"> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | |
| | | <select id="findOptions" parameterType="String" resultMap="ArdCamerasResult"> |
| | | <include refid="selectArdCamerasVo"/> |
| | | <where> |
| | | <if test="id != null and id != ''">and c.id = #{id}</if> |
| | | <if test="name != null and name != ''">and c.name like '%'||#{name}||'%'</if> |
| | | </where> |
| | | </select> |
| | | </mapper> |