| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.device.camera.mapper.ArdCamerasMapper"> |
| | | |
| | | <resultMap type="ArdCameras" id="ArdCamerasResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="name" column="name" /> |
| | | <result property="ip" column="ip" /> |
| | | <result property="port" column="port" /> |
| | | <result property="rtspPort" column="rtsp_port" /> |
| | | <result property="username" column="username" /> |
| | | <result property="password" column="password" /> |
| | | <result property="gdtype" column="gdtype" /> |
| | | <result property="channel" column="channel" /> |
| | | <result property="longitude" column="longitude" /> |
| | | <result property="latitude" column="latitude" /> |
| | | <result property="altitude" column="altitude" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="camHeading" column="cam_heading" /> |
| | | <result property="camPitch" column="cam_pitch" /> |
| | | <result property="camRoll" column="cam_roll" /> |
| | | <result property="camNear" column="cam_near" /> |
| | | <result property="camFar" column="cam_far" /> |
| | | <result property="camAspectratio" column="cam_aspectratio" /> |
| | | <result property="camDepth" column="cam_depth" /> |
| | | <result property="camFov" column="cam_fov" /> |
| | | <result property="loginId" column="login_id" /> |
| | | <result property="operatorId" column="operator_id" /> |
| | | <result property="operatorExpired" column="operator_expired" /> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="ip" column="ip"/> |
| | | <result property="port" column="port"/> |
| | | <result property="rtspPort" column="rtsp_port"/> |
| | | <result property="username" column="username"/> |
| | | <result property="password" column="password"/> |
| | | <result property="gdtype" column="gdtype"/> |
| | | <result property="channel" column="channel"/> |
| | | <result property="longitude" column="longitude"/> |
| | | <result property="latitude" column="latitude"/> |
| | | <result property="altitude" column="altitude"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="camHeading" column="cam_heading"/> |
| | | <result property="camPitch" column="cam_pitch"/> |
| | | <result property="camRoll" column="cam_roll"/> |
| | | <result property="camNear" column="cam_near"/> |
| | | <result property="camFar" column="cam_far"/> |
| | | <result property="camAspectratio" column="cam_aspectratio"/> |
| | | <result property="camDepth" column="cam_depth"/> |
| | | <result property="camFov" column="cam_fov"/> |
| | | <result property="loginId" column="login_id"/> |
| | | <result property="operatorId" column="operator_id"/> |
| | | <result property="operatorExpired" column="operator_expired"/> |
| | | </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 |
| | | left join sys_dept d on d.dept_id = c.dept_id |
| | | left join sys_user u on u.user_id = c.user_id |
| | | </sql> |
| | | |
| | | <select id="selectArdCamerasList" parameterType="ArdCameras" 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> |
| | | <if test="ip != null and ip != ''"> and c.ip = #{ip}</if> |
| | | <if test="port != null "> and c.port = #{port}</if> |
| | | <if test="rtspPort != null "> and c.rtsp_port = #{rtspPort}</if> |
| | | <if test="username != null and username != ''"> and c.username like '%'||#{username}||'%'</if> |
| | | <if test="password != null and password != ''"> and c.password = #{password}</if> |
| | | <if test="gdtype != null and gdtype != ''"> and c.gdtype = #{gdtype}</if> |
| | | <if test="channel != null "> and c.channel = #{channel}</if> |
| | | <if test="longitude != null "> and c.longitude = #{longitude}</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="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="camNear != null "> and c.cam_near = #{camNear}</if> |
| | | <if test="camFar != null "> and c.cam_far = #{camFar}</if> |
| | | <if test="camAspectratio != null "> and c.cam_aspectratio = #{camAspectratio}</if> |
| | | <if test="camDepth != null "> and c.cam_depth = #{camDepth}</if> |
| | | <if test="camFov != null "> and c.cam_fov = #{camFov}</if> |
| | | <if test="loginId != null "> and c.login_id = #{loginId}</if> |
| | | <if test="id != null and id != ''">and c.id = #{id}</if> |
| | | <if test="name != null and name != ''">and c.name like '%'||#{name}||'%'</if> |
| | | <if test="ip != null and ip != ''">and c.ip = #{ip}</if> |
| | | <if test="port != null ">and c.port = #{port}</if> |
| | | <if test="rtspPort != null ">and c.rtsp_port = #{rtspPort}</if> |
| | | <if test="username != null and username != ''">and c.username like '%'||#{username}||'%'</if> |
| | | <if test="password != null and password != ''">and c.password = #{password}</if> |
| | | <if test="gdtype != null and gdtype != ''">and c.gdtype = #{gdtype}</if> |
| | | <if test="channel != null ">and c.channel = #{channel}</if> |
| | | <if test="longitude != null ">and c.longitude = #{longitude}</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="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="camNear != null ">and c.cam_near = #{camNear}</if> |
| | | <if test="camFar != null ">and c.cam_far = #{camFar}</if> |
| | | <if test="camAspectratio != null ">and c.cam_aspectratio = #{camAspectratio}</if> |
| | | <if test="camDepth != null ">and c.cam_depth = #{camDepth}</if> |
| | | <if test="camFov != null ">and c.cam_fov = #{camFov}</if> |
| | | <if test="loginId != null ">and c.login_id = #{loginId}</if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </where> |
| | |
| | | <select id="selectArdCamerasListNoDataScope" parameterType="ArdCameras" 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> |
| | | <if test="ip != null and ip != ''"> and c.ip = #{ip}</if> |
| | | <if test="port != null "> and c.port = #{port}</if> |
| | | <if test="rtspPort != null "> and c.rtsp_port = #{rtspPort}</if> |
| | | <if test="username != null and username != ''"> and c.username like '%'||#{username}||'%'</if> |
| | | <if test="password != null and password != ''"> and c.password = #{password}</if> |
| | | <if test="gdtype != null and gdtype != ''"> and c.gdtype = #{gdtype}</if> |
| | | <if test="channel != null "> and c.channel = #{channel}</if> |
| | | <if test="longitude != null "> and c.longitude = #{longitude}</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="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="camNear != null "> and c.cam_near = #{camNear}</if> |
| | | <if test="camFar != null "> and c.cam_far = #{camFar}</if> |
| | | <if test="camAspectratio != null "> and c.cam_aspectratio = #{camAspectratio}</if> |
| | | <if test="camDepth != null "> and c.cam_depth = #{camDepth}</if> |
| | | <if test="camFov != null "> and c.cam_fov = #{camFov}</if> |
| | | <if test="loginId != null "> and c.login_id = #{loginId}</if> |
| | | <if test="id != null and id != ''">and c.id = #{id}</if> |
| | | <if test="name != null and name != ''">and c.name like '%'||#{name}||'%'</if> |
| | | <if test="ip != null and ip != ''">and c.ip = #{ip}</if> |
| | | <if test="port != null ">and c.port = #{port}</if> |
| | | <if test="rtspPort != null ">and c.rtsp_port = #{rtspPort}</if> |
| | | <if test="username != null and username != ''">and c.username like '%'||#{username}||'%'</if> |
| | | <if test="password != null and password != ''">and c.password = #{password}</if> |
| | | <if test="gdtype != null and gdtype != ''">and c.gdtype = #{gdtype}</if> |
| | | <if test="channel != null ">and c.channel = #{channel}</if> |
| | | <if test="longitude != null ">and c.longitude = #{longitude}</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="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="camNear != null ">and c.cam_near = #{camNear}</if> |
| | | <if test="camFar != null ">and c.cam_far = #{camFar}</if> |
| | | <if test="camAspectratio != null ">and c.cam_aspectratio = #{camAspectratio}</if> |
| | | <if test="camDepth != null ">and c.cam_depth = #{camDepth}</if> |
| | | <if test="camFov != null ">and c.cam_fov = #{camFov}</if> |
| | | <if test="loginId != null ">and c.login_id = #{loginId}</if> |
| | | </where> |
| | | </select> |
| | | <select id="selectArdCamerasById" parameterType="String" resultMap="ArdCamerasResult"> |
| | | <include refid="selectArdCamerasVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertArdCameras" parameterType="ArdCameras"> |
| | | insert into ard_cameras |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | </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"> |
| | | delete from ard_cameras where id in |
| | | delete from ard_cameras where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{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> |