外呼接口功能对接
This commit is contained in:
parent
fe87e0e54f
commit
b57c6658bb
|
|
@ -0,0 +1,97 @@
|
||||||
|
<?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.dkl.large.mapper.KafkaMessageMapper">
|
||||||
|
<resultMap id="KafkaMessageResult" type="KafkaMessage" >
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="argName" column="arg_name" />
|
||||||
|
<result property="cameraCode" column="camera_code" />
|
||||||
|
<result property="cameraName" column="camera_name" />
|
||||||
|
<result property="eventName" column="event_name" />
|
||||||
|
<result property="imageUrl" column="image_url" />
|
||||||
|
<result property="installSite" column="install_site" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectKafkaMessageVo">
|
||||||
|
select id, arg_name, camera_code, camera_name, event_name, image_url, install_site, create_by, create_time, update_by, update_time, del_flag from kafka_message
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectKafkaMessageList" parameterType="KafkaMessage" resultMap="KafkaMessageResult">
|
||||||
|
<include refid="selectKafkaMessageVo"/>
|
||||||
|
where
|
||||||
|
1 = 1
|
||||||
|
<if test="argName != null and argName != ''"> and arg_name like concat('%', #{argName}, '%')</if>
|
||||||
|
<if test="cameraCode != null and cameraCode != ''"> and camera_code = #{cameraCode}</if>
|
||||||
|
<if test="cameraName != null and cameraName != ''"> and camera_name like concat('%', #{cameraName}, '%')</if>
|
||||||
|
<if test="eventName != null and eventName != ''"> and event_name like concat('%', #{eventName}, '%')</if>
|
||||||
|
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
||||||
|
<if test="installSite != null and installSite != ''"> and install_site = #{installSite}</if>
|
||||||
|
order by create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectKafkaMessageById" parameterType="Long" resultMap="KafkaMessageResult">
|
||||||
|
<include refid="selectKafkaMessageVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertKafkaMessage" parameterType="KafkaMessage" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into kafka_message
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="argName != null">arg_name,</if>
|
||||||
|
<if test="cameraCode != null">camera_code,</if>
|
||||||
|
<if test="cameraName != null">camera_name,</if>
|
||||||
|
<if test="eventName != null">event_name,</if>
|
||||||
|
<if test="imageUrl != null">image_url,</if>
|
||||||
|
<if test="installSite != null">install_site,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="argName != null">#{argName},</if>
|
||||||
|
<if test="cameraCode != null">#{cameraCode},</if>
|
||||||
|
<if test="cameraName != null">#{cameraName},</if>
|
||||||
|
<if test="eventName != null">#{eventName},</if>
|
||||||
|
<if test="imageUrl != null">#{imageUrl},</if>
|
||||||
|
<if test="installSite != null">#{installSite},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateKafkaMessage" parameterType="KafkaMessage">
|
||||||
|
update kafka_message
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="argName != null">arg_name = #{argName},</if>
|
||||||
|
<if test="cameraCode != null">camera_code = #{cameraCode},</if>
|
||||||
|
<if test="cameraName != null">camera_name = #{cameraName},</if>
|
||||||
|
<if test="eventName != null">event_name = #{eventName},</if>
|
||||||
|
<if test="imageUrl != null">image_url = #{imageUrl},</if>
|
||||||
|
<if test="installSite != null">install_site = #{installSite},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteKafkaMessageById" parameterType="Long">
|
||||||
|
update kafka_message set del_flag = 2 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteKafkaMessageByIds" parameterType="String">
|
||||||
|
update kafka_message set del_flag = 2 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,162 @@
|
||||||
|
<?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.dkl.large.mapper.VideoStorageInformationMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.dkl.large.domain.VideoStorageInformation" id="VideoStorageInformationResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="types" column="types" />
|
||||||
|
<result property="resolution" column="resolution" />
|
||||||
|
<result property="duration" column="duration" />
|
||||||
|
<result property="deviceId" column="device_id" />
|
||||||
|
<result property="productId" column="product_id" />
|
||||||
|
<result property="channelNumber" column="channel_number" />
|
||||||
|
<result property="filePath" column="file_path" />
|
||||||
|
<result property="standby" column="standby" />
|
||||||
|
<result property="standby1" column="standby1" />
|
||||||
|
<result property="standby2" column="standby2" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="activityId" column="activity_id" />
|
||||||
|
<result property="lng" column="lng" />
|
||||||
|
<result property="lat" column="lat" />
|
||||||
|
<result property="address" column="address" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectVideoStorageInformationVo">
|
||||||
|
select dv.id, dv.name, dv.types, dv.resolution, dv.duration, dv.device_id, dv.product_id, dv.channel_number, dv.file_path,
|
||||||
|
dv.standby, dv.standby1, dv.standby2, dv.create_by, dv.create_time, dv.update_by, dv.update_time,
|
||||||
|
dv.activity_id,dv.lng, dv.lat, dv.address ,da.activity_name AS activityName ,sdd.dict_label AS typesName from dkl_video dv
|
||||||
|
left join sys_dept d on dv.dept_id = d.dept_id
|
||||||
|
left join dkl_activity da on da.id = dv.activity_id
|
||||||
|
left join sys_dict_data sdd on sdd.dict_value = dv.types and sdd.dict_type ='monitoring_type'
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectVideoStorageInformationList" parameterType="com.dkl.large.domain.VideoStorageInformation" resultMap="VideoStorageInformationResult">
|
||||||
|
<include refid="selectVideoStorageInformationVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and dv.name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="types != null and types != ''"> and dv.types = #{types}</if>
|
||||||
|
<if test="resolution != null and resolution != ''"> and dv.resolution = #{resolution}</if>
|
||||||
|
<if test="duration != null and duration != ''"> and dv.duration = #{duration}</if>
|
||||||
|
<if test="deviceId != null and deviceId != ''"> and dv.device_id = #{deviceId}</if>
|
||||||
|
<if test="productId != null and productId != ''"> and dv.product_id = #{productId}</if>
|
||||||
|
<if test="channelNumber != null and channelNumber != ''"> and dv.channel_number = #{channelNumber}</if>
|
||||||
|
<if test="filePath != null and filePath != ''"> and dv.file_path = #{filePath}</if>
|
||||||
|
<if test="standby != null and standby != ''"> and dv.standby = #{standby}</if>
|
||||||
|
<if test="standby1 != null and standby1 != ''"> and dv.standby1 = #{standby1}</if>
|
||||||
|
<if test="standby2 != null and standby2 != ''"> and dv.standby2 = #{standby2}</if>
|
||||||
|
<if test="activityId != null and activityId != ''"> and dv.activity_id = #{activityId}</if>
|
||||||
|
<if test="lng != null and lng != ''"> and dv.lng = #{lng}</if>
|
||||||
|
<if test="lat != null and lat != ''"> and dv.lat = #{lat}</if>
|
||||||
|
<if test="address != null and address != ''"> and dv.address = #{address}</if>
|
||||||
|
<if test="delFlag != null and delFlag != ''"> and dv.del_flag = #{delFlag}</if>
|
||||||
|
<if test="deptId != null "> and dv.dept_id = #{deptId}</if>
|
||||||
|
<if test="startTime != null and endTime != null">
|
||||||
|
AND dv.create_time BETWEEN #{startTime} and #{endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
order by create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectVideoStorageInformationById" parameterType="int" resultMap="VideoStorageInformationResult">
|
||||||
|
<include refid="selectVideoStorageInformationVo"/>
|
||||||
|
where dv.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertVideoStorageInformation" parameterType="VideoStorageInformation">
|
||||||
|
insert into dkl_video
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="types != null">types,</if>
|
||||||
|
<if test="resolution != null">resolution,</if>
|
||||||
|
<if test="duration != null">duration,</if>
|
||||||
|
<if test="deviceId != null">device_id,</if>
|
||||||
|
<if test="productId != null">product_id,</if>
|
||||||
|
<if test="channelNumber != null">channel_number,</if>
|
||||||
|
<if test="filePath != null">file_path,</if>
|
||||||
|
<if test="standby != null">standby,</if>
|
||||||
|
<if test="standby1 != null">standby1,</if>
|
||||||
|
<if test="standby2 != null">standby2,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="activityId != null">activity_id,</if>
|
||||||
|
<if test="lng != null">lng,</if>
|
||||||
|
<if test="lat != null">lat,</if>
|
||||||
|
<if test="address != null">address,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="types != null">#{types},</if>
|
||||||
|
<if test="resolution != null">#{resolution},</if>
|
||||||
|
<if test="duration != null">#{duration},</if>
|
||||||
|
<if test="deviceId != null">#{deviceId},</if>
|
||||||
|
<if test="productId != null">#{productId},</if>
|
||||||
|
<if test="channelNumber != null">#{channelNumber},</if>
|
||||||
|
<if test="filePath != null">#{filePath},</if>
|
||||||
|
<if test="standby != null">#{standby},</if>
|
||||||
|
<if test="standby1 != null">#{standby1},</if>
|
||||||
|
<if test="standby2 != null">#{standby2},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="activityId != null">#{activityId},</if>
|
||||||
|
<if test="lng != null">#{lng},</if>
|
||||||
|
<if test="lat != null">#{lat},</if>
|
||||||
|
<if test="address != null">#{address},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateVideoStorageInformation" parameterType="VideoStorageInformation">
|
||||||
|
update dkl_video
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="types != null">types = #{types},</if>
|
||||||
|
<if test="resolution != null">resolution = #{resolution},</if>
|
||||||
|
<if test="duration != null">duration = #{duration},</if>
|
||||||
|
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||||
|
<if test="productId != null">product_id = #{productId},</if>
|
||||||
|
<if test="channelNumber != null">channel_number = #{channelNumber},</if>
|
||||||
|
<if test="filePath != null">file_path = #{filePath},</if>
|
||||||
|
<if test="standby != null">standby = #{standby},</if>
|
||||||
|
<if test="standby1 != null">standby1 = #{standby1},</if>
|
||||||
|
<if test="standby2 != null">standby2 = #{standby2},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="activityId != null">activity_id = #{activityId},</if>
|
||||||
|
<if test="lng != null">lng = #{lng},</if>
|
||||||
|
<if test="lat != null">lat = #{lat},</if>
|
||||||
|
<if test="address != null">address = #{address},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteVideoStorageInformationById" parameterType="int">
|
||||||
|
update dkl_video set del_flag = 2 where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteVideoStorageInformationByIds" parameterType="int">
|
||||||
|
update dkl_video set del_flag = 2 where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<select id="getVideoStorageInformationCount" parameterType="string">
|
||||||
|
SELECT COUNT(*) FROM dkl_video WHERE del_flag = '0'
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue