| <?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"> | 
| <mapper namespace="com.ruoyi.device.cameracalibration.mapper.ArdCamerasCalibrationMapper"> | 
|   | 
|     <resultMap type="ArdCamerasCalibration" id="ArdCamerasCalibrationResult"> | 
|         <result property="id"    column="id"    /> | 
|         <result property="cameraId"    column="camera_id"    /> | 
|         <result property="name"    column="name"    /> | 
|         <result property="targetLongitude"    column="target_longitude"    /> | 
|         <result property="targetLatitude"    column="target_latitude"    /> | 
|         <result property="pan"    column="pan"    /> | 
|         <result property="tilt"    column="tilt"    /> | 
|         <result property="zoom"    column="zoom"    /> | 
|         <result property="panDiff"    column="pan_diff"    /> | 
|         <result property="tiltDiff"    column="tilt_diff"    /> | 
|     </resultMap> | 
|   | 
|     <sql id="selectArdCamerasCalibrationVo"> | 
|         select id, camera_id, name, target_longitude, target_latitude, pan, tilt, zoom, pan_diff, tilt_diff from ard_cameras_calibration | 
|     </sql> | 
|   | 
|     <select id="selectArdCamerasCalibrationList" parameterType="ArdCamerasCalibration" resultMap="ArdCamerasCalibrationResult"> | 
|         <include refid="selectArdCamerasCalibrationVo"/> | 
|         <where> | 
|             <if test="cameraId != null  and cameraId != ''"> and camera_id = #{cameraId}</if> | 
|             <if test="name != null  and name != ''"> and name like '%'||#{name}||'%'</if> | 
|             <if test="targetLongitude != null  and targetLongitude != ''"> and target_longitude = #{targetLongitude}</if> | 
|             <if test="targetLatitude != null  and targetLatitude != ''"> and target_latitude = #{targetLatitude}</if> | 
|             <if test="pan != null  and pan != ''"> and pan = #{pan}</if> | 
|             <if test="tilt != null  and tilt != ''"> and tilt = #{tilt}</if> | 
|             <if test="zoom != null  and zoom != ''"> and zoom = #{zoom}</if> | 
|             <if test="panDiff != null  and panDiff != ''"> and pan_diff = #{panDiff}</if> | 
|             <if test="tiltDiff != null  and tiltDiff != ''"> and tilt_diff = #{tiltDiff}</if> | 
|         </where> | 
|     </select> | 
|   | 
|     <select id="selectArdCamerasCalibrationById" parameterType="String" resultMap="ArdCamerasCalibrationResult"> | 
|         <include refid="selectArdCamerasCalibrationVo"/> | 
|         where id = #{id} | 
|     </select> | 
|   | 
|     <insert id="insertArdCamerasCalibration" parameterType="ArdCamerasCalibration"> | 
|         insert into ard_cameras_calibration | 
|         <trim prefix="(" suffix=")" suffixOverrides=","> | 
|             <if test="id != null">id,</if> | 
|             <if test="cameraId != null">camera_id,</if> | 
|             <if test="name != null">name,</if> | 
|             <if test="targetLongitude != null">target_longitude,</if> | 
|             <if test="targetLatitude != null">target_latitude,</if> | 
|             <if test="pan != null">pan,</if> | 
|             <if test="tilt != null">tilt,</if> | 
|             <if test="zoom != null">zoom,</if> | 
|             <if test="panDiff != null">pan_diff,</if> | 
|             <if test="tiltDiff != null">tilt_diff,</if> | 
|         </trim> | 
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | 
|             <if test="id != null">#{id},</if> | 
|             <if test="cameraId != null">#{cameraId},</if> | 
|             <if test="name != null">#{name},</if> | 
|             <if test="targetLongitude != null">#{targetLongitude},</if> | 
|             <if test="targetLatitude != null">#{targetLatitude},</if> | 
|             <if test="pan != null">#{pan},</if> | 
|             <if test="tilt != null">#{tilt},</if> | 
|             <if test="zoom != null">#{zoom},</if> | 
|             <if test="panDiff != null">#{panDiff},</if> | 
|             <if test="tiltDiff != null">#{tiltDiff},</if> | 
|         </trim> | 
|     </insert> | 
|   | 
|     <update id="updateArdCamerasCalibration" parameterType="ArdCamerasCalibration"> | 
|         update ard_cameras_calibration | 
|         <trim prefix="SET" suffixOverrides=","> | 
|             <if test="cameraId != null">camera_id = #{cameraId},</if> | 
|             <if test="name != null">name = #{name},</if> | 
|             <if test="targetLongitude != null">target_longitude = #{targetLongitude},</if> | 
|             <if test="targetLatitude != null">target_latitude = #{targetLatitude},</if> | 
|             <if test="pan != null">pan = #{pan},</if> | 
|             <if test="tilt != null">tilt = #{tilt},</if> | 
|             <if test="zoom != null">zoom = #{zoom},</if> | 
|             <if test="panDiff != null">pan_diff = #{panDiff},</if> | 
|             <if test="tiltDiff != null">tilt_diff = #{tiltDiff},</if> | 
|         </trim> | 
|         where id = #{id} | 
|     </update> | 
|   | 
|     <delete id="deleteArdCamerasCalibrationById" parameterType="String"> | 
|         delete from ard_cameras_calibration where id = #{id} | 
|     </delete> | 
|   | 
|     <delete id="deleteArdCamerasCalibrationByIds" parameterType="String"> | 
|         delete from ard_cameras_calibration where id in | 
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | 
|             #{id} | 
|         </foreach> | 
|     </delete> | 
| </mapper> |