|
@@ -1,33 +1,33 @@
|
|
|
<?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.css.simulation.resource.model.mapper.CameraMapper" >
|
|
|
+<mapper namespace="com.css.simulation.resource.model.mapper.CameraMapper">
|
|
|
|
|
|
<resultMap id="CameraVOMap" type="api.common.pojo.vo.model.CameraVO">
|
|
|
- <id column="ID" property="id" jdbcType="VARCHAR" />
|
|
|
- <result column="sensor_code" property="sensorCode" jdbcType="VARCHAR" />
|
|
|
- <result column="sensor_name" property="sensorName" jdbcType="VARCHAR" />
|
|
|
- <result column="description" property="description" jdbcType="VARCHAR" />
|
|
|
- <result column="near_distance" property="nearDistance" jdbcType="DECIMAL" />
|
|
|
- <result column="far_distance" property="farDistance" jdbcType="DECIMAL" />
|
|
|
- <result column="fov_h" property="fovH" jdbcType="DECIMAL" />
|
|
|
- <result column="fov_v" property="fovV" jdbcType="DECIMAL" />
|
|
|
- <result column="resolution" property="resolution" jdbcType="VARCHAR" />
|
|
|
- <result column="frame_rate" property="frameRate" jdbcType="DECIMAL" />
|
|
|
- <result column="self_display" property="selfDisplay" jdbcType="VARCHAR" />
|
|
|
- <result column="share" property="share" jdbcType="VARCHAR" />
|
|
|
+ <id column="ID" property="id" jdbcType="VARCHAR"/>
|
|
|
+ <result column="sensor_code" property="sensorCode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="sensor_name" property="sensorName" jdbcType="VARCHAR"/>
|
|
|
+ <result column="description" property="description" jdbcType="VARCHAR"/>
|
|
|
+ <result column="near_distance" property="nearDistance" jdbcType="DECIMAL"/>
|
|
|
+ <result column="far_distance" property="farDistance" jdbcType="DECIMAL"/>
|
|
|
+ <result column="fov_h" property="fovH" jdbcType="DECIMAL"/>
|
|
|
+ <result column="fov_v" property="fovV" jdbcType="DECIMAL"/>
|
|
|
+ <result column="resolution" property="resolution" jdbcType="VARCHAR"/>
|
|
|
+ <result column="frame_rate" property="frameRate" jdbcType="DECIMAL"/>
|
|
|
+ <result column="self_display" property="selfDisplay" jdbcType="VARCHAR"/>
|
|
|
+ <result column="share" property="share" jdbcType="VARCHAR"/>
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="getCameraList" parameterType="api.common.pojo.param.model.CameraParam" resultMap="CameraVOMap">
|
|
|
select
|
|
|
- id,
|
|
|
- sensor_name,
|
|
|
- description,
|
|
|
- fov_h,
|
|
|
- fov_v,
|
|
|
+ id,
|
|
|
+ sensor_name,
|
|
|
+ description,
|
|
|
+ fov_h,
|
|
|
+ fov_v,
|
|
|
far_distance,
|
|
|
near_distance,
|
|
|
- share
|
|
|
+ share
|
|
|
from model_sensor_camera c
|
|
|
where c.is_deleted = '0'
|
|
|
<if test="sensorName != null and sensorName != ''">
|
|
@@ -44,29 +44,28 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getCameraInfo" parameterType="api.common.pojo.param.model.CameraParam" resultMap="CameraVOMap">
|
|
|
- select
|
|
|
- id,
|
|
|
- sensor_code,
|
|
|
- sensor_name,
|
|
|
- description,
|
|
|
- near_distance,
|
|
|
- far_distance,
|
|
|
- fov_h,
|
|
|
- fov_v,
|
|
|
- resolution,
|
|
|
- frame_rate,
|
|
|
- self_display,
|
|
|
- share
|
|
|
+ select id,
|
|
|
+ sensor_code,
|
|
|
+ sensor_name,
|
|
|
+ description,
|
|
|
+ near_distance,
|
|
|
+ far_distance,
|
|
|
+ fov_h,
|
|
|
+ fov_v,
|
|
|
+ resolution,
|
|
|
+ frame_rate,
|
|
|
+ self_display,
|
|
|
+ share
|
|
|
from model_sensor_camera c
|
|
|
where c.id = #{id,jdbcType=VARCHAR} limit 1
|
|
|
</select>
|
|
|
|
|
|
<select id="checkCameraName" parameterType="api.common.pojo.po.model.CameraPO" resultMap="CameraVOMap">
|
|
|
select
|
|
|
- id
|
|
|
+ id
|
|
|
from model_sensor_camera
|
|
|
where is_deleted = '0'
|
|
|
- and sensor_name = #{sensorName,jdbcType=VARCHAR}
|
|
|
+ and sensor_name = #{sensorName,jdbcType=VARCHAR}
|
|
|
<if test="share != null and share != ''">
|
|
|
and share = #{share,jdbcType=VARCHAR}
|
|
|
</if>
|
|
@@ -77,68 +76,64 @@
|
|
|
</select>
|
|
|
|
|
|
<insert id="insert" parameterType="api.common.pojo.po.model.CameraPO">
|
|
|
- insert into model_sensor_camera(
|
|
|
- id,
|
|
|
- sensor_code,
|
|
|
- sensor_name,
|
|
|
- description,
|
|
|
- near_distance,
|
|
|
- far_distance,
|
|
|
- fov_h,
|
|
|
- fov_v,
|
|
|
- resolution,
|
|
|
- frame_rate,
|
|
|
- self_display,
|
|
|
- share,
|
|
|
- create_time,
|
|
|
- modify_time,
|
|
|
- create_user_id,
|
|
|
- modify_user_id,
|
|
|
- is_deleted
|
|
|
- )
|
|
|
- values(
|
|
|
- #{id,jdbcType=VARCHAR},
|
|
|
- #{sensorCode,jdbcType=VARCHAR},
|
|
|
- #{sensorName,jdbcType=VARCHAR},
|
|
|
- #{description,jdbcType=VARCHAR},
|
|
|
- #{nearDistance,jdbcType=DECIMAL},
|
|
|
- #{farDistance,jdbcType=DECIMAL},
|
|
|
- #{fovH,jdbcType=DECIMAL},
|
|
|
- #{fovV,jdbcType=DECIMAL},
|
|
|
- #{resolution,jdbcType=VARCHAR},
|
|
|
- #{frameRate,jdbcType=DECIMAL},
|
|
|
- #{selfDisplay,jdbcType=VARCHAR},
|
|
|
- #{share,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
- #{createUserId,jdbcType=VARCHAR},
|
|
|
- #{modifyUserId,jdbcType=VARCHAR},
|
|
|
- #{isDeleted,jdbcType=VARCHAR}
|
|
|
- )
|
|
|
+ insert into model_sensor_camera(id,
|
|
|
+ sensor_code,
|
|
|
+ sensor_name,
|
|
|
+ description,
|
|
|
+ near_distance,
|
|
|
+ far_distance,
|
|
|
+ fov_h,
|
|
|
+ fov_v,
|
|
|
+ resolution,
|
|
|
+ frame_rate,
|
|
|
+ self_display,
|
|
|
+ share,
|
|
|
+ create_time,
|
|
|
+ modify_time,
|
|
|
+ create_user_id,
|
|
|
+ modify_user_id,
|
|
|
+ is_deleted)
|
|
|
+ values (#{id,jdbcType=VARCHAR},
|
|
|
+ #{sensorCode,jdbcType=VARCHAR},
|
|
|
+ #{sensorName,jdbcType=VARCHAR},
|
|
|
+ #{description,jdbcType=VARCHAR},
|
|
|
+ #{nearDistance,jdbcType=DECIMAL},
|
|
|
+ #{farDistance,jdbcType=DECIMAL},
|
|
|
+ #{fovH,jdbcType=DECIMAL},
|
|
|
+ #{fovV,jdbcType=DECIMAL},
|
|
|
+ #{resolution,jdbcType=VARCHAR},
|
|
|
+ #{frameRate,jdbcType=DECIMAL},
|
|
|
+ #{selfDisplay,jdbcType=VARCHAR},
|
|
|
+ #{share,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
+ #{createUserId,jdbcType=VARCHAR},
|
|
|
+ #{modifyUserId,jdbcType=VARCHAR},
|
|
|
+ #{isDeleted,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
|
|
|
<update id="update" parameterType="api.common.pojo.po.model.CameraPO">
|
|
|
- update model_sensor_camera set
|
|
|
- sensor_name = #{sensorName,jdbcType=VARCHAR},
|
|
|
- description = #{description,jdbcType=VARCHAR},
|
|
|
- near_distance = #{nearDistance,jdbcType=DECIMAL},
|
|
|
- far_distance = #{farDistance,jdbcType=DECIMAL},
|
|
|
- fov_h = #{fovH,jdbcType=DECIMAL},
|
|
|
- fov_v = #{fovV,jdbcType=DECIMAL},
|
|
|
- resolution = #{resolution,jdbcType=VARCHAR},
|
|
|
- frame_rate = #{frameRate,jdbcType=DECIMAL},
|
|
|
- self_display = #{selfDisplay,jdbcType=VARCHAR},
|
|
|
+ update model_sensor_camera
|
|
|
+ set sensor_name = #{sensorName,jdbcType=VARCHAR},
|
|
|
+ description = #{description,jdbcType=VARCHAR},
|
|
|
+ near_distance = #{nearDistance,jdbcType=DECIMAL},
|
|
|
+ far_distance = #{farDistance,jdbcType=DECIMAL},
|
|
|
+ fov_h = #{fovH,jdbcType=DECIMAL},
|
|
|
+ fov_v = #{fovV,jdbcType=DECIMAL},
|
|
|
+ resolution = #{resolution,jdbcType=VARCHAR},
|
|
|
+ frame_rate = #{frameRate,jdbcType=DECIMAL},
|
|
|
+ self_display = #{selfDisplay,jdbcType=VARCHAR},
|
|
|
|
|
|
- modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
+ modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
<update id="delCameraById" parameterType="api.common.pojo.po.model.CameraPO">
|
|
|
- update model_sensor_camera set
|
|
|
- modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
- modify_user_id = #{modifyUserId,jdbcType=VARCHAR},
|
|
|
- is_deleted = #{isDeleted,jdbcType=VARCHAR}
|
|
|
+ update model_sensor_camera
|
|
|
+ set modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
+ modify_user_id = #{modifyUserId,jdbcType=VARCHAR},
|
|
|
+ is_deleted = #{isDeleted,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
</mapper>
|