|
@@ -0,0 +1,58 @@
|
|
|
+<?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" >
|
|
|
+
|
|
|
+ <resultMap id="CameraVOMap" type="api.common.pojo.vo.model.CameraVO">
|
|
|
+ <id column="ID" property="id" jdbcType="VARCHAR" />
|
|
|
+ <result column="sensor_id" property="sensorId" 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,
|
|
|
+ share
|
|
|
+ from model_sensor_camera c
|
|
|
+ where c.is_deleted = '0'
|
|
|
+ <if test="sensorName != null and sensorName != ''">
|
|
|
+ and c.sensor_name like CONCAT('%',#{sensorName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="share != null and share != ''">
|
|
|
+ and c.create_user_id = #{createUserId,jdbcType=VARCHAR}
|
|
|
+ and c.share = '0'
|
|
|
+ </if>
|
|
|
+ <if test="share == null or share == ''">
|
|
|
+ and (c.create_user_id = #{createUserId,jdbcType=VARCHAR} or c.share = '1')
|
|
|
+ </if>
|
|
|
+ order by c.create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCameraInfo" parameterType="api.common.pojo.param.model.CameraParam" resultMap="CameraVOMap">
|
|
|
+ select
|
|
|
+ id,
|
|
|
+ sensor_id,
|
|
|
+ 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>
|
|
|
+</mapper>
|