<?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.aibrain.mapper.AiVideoFileMapper">
|
|
<resultMap type="AiVideoFile" id="AiVideoFileResult">
|
<result property="id" column="id" />
|
<result property="cameraId" column="camera_id" />
|
<result property="region" column="region" />
|
<result property="videoType" column="video_type" />
|
<result property="fileName" column="file_name" />
|
<result property="filePath" column="file_path" />
|
<result property="videoDate" column="video_date" />
|
<result property="videoTime" column="video_time" />
|
<result property="createDate" column="create_date" />
|
</resultMap>
|
|
<sql id="selectAiVideoFileVo">
|
select id, camera_id, region, video_type, file_name, file_path, video_date, video_time, create_date from ai_video_file
|
</sql>
|
|
<select id="selectAiVideoFileList" parameterType="AiVideoFile" resultMap="AiVideoFileResult">
|
<include refid="selectAiVideoFileVo"/>
|
<where>
|
<if test="cameraId != null and cameraId != ''"> and camera_id = #{cameraId}</if>
|
<if test="region != null and region != ''"> and region = #{region}</if>
|
<if test="videoType != null and videoType != ''"> and video_type = #{videoType}</if>
|
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
<if test="filePath != null and filePath != ''"> and file_path = #{filePath}</if>
|
<if test="videoDate != null and videoDate != ''"> and video_date like concat('%', #{videoDate}, '%')</if>
|
<if test="videoTime != null and videoTime != ''"> and video_time like concat('%', #{videoTime}, '%')</if>
|
<if test="params.beginCreateDate != null and params.beginCreateDate != '' and params.endCreateDate != null and params.endCreateDate != ''"> and create_date between #{params.beginCreateDate} and #{params.endCreateDate}</if>
|
</where>
|
</select>
|
|
<select id="selectAiVideoFileById" parameterType="Long" resultMap="AiVideoFileResult">
|
<include refid="selectAiVideoFileVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertAiVideoFile" parameterType="AiVideoFile" useGeneratedKeys="true" keyProperty="id">
|
insert into ai_video_file
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="cameraId != null">camera_id,</if>
|
<if test="region != null">region,</if>
|
<if test="videoType != null">video_type,</if>
|
<if test="fileName != null">file_name,</if>
|
<if test="filePath != null">file_path,</if>
|
<if test="videoDate != null">video_date,</if>
|
<if test="videoTime != null">video_time,</if>
|
<if test="createDate != null">create_date,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="cameraId != null">#{cameraId},</if>
|
<if test="region != null">#{region},</if>
|
<if test="videoType != null">#{videoType},</if>
|
<if test="fileName != null">#{fileName},</if>
|
<if test="filePath != null">#{filePath},</if>
|
<if test="videoDate != null">#{videoDate},</if>
|
<if test="videoTime != null">#{videoTime},</if>
|
<if test="createDate != null">#{createDate},</if>
|
</trim>
|
</insert>
|
|
<update id="updateAiVideoFile" parameterType="AiVideoFile">
|
update ai_video_file
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="cameraId != null">camera_id = #{cameraId},</if>
|
<if test="region != null">region = #{region},</if>
|
<if test="videoType != null">video_type = #{videoType},</if>
|
<if test="fileName != null">file_name = #{fileName},</if>
|
<if test="filePath != null">file_path = #{filePath},</if>
|
<if test="videoDate != null">video_date = #{videoDate},</if>
|
<if test="videoTime != null">video_time = #{videoTime},</if>
|
<if test="createDate != null">create_date = #{createDate},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteAiVideoFileById" parameterType="Long">
|
delete from ai_video_file where id = #{id}
|
</delete>
|
|
<delete id="deleteAiVideoFileByIds" parameterType="String">
|
delete from ai_video_file where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|