<?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">
|
<!--
|
* @title: 小鱼云会议录制视频记录表
|
* @description: 自定义sql,请自行实现业务逻辑
|
* @company: hugeinfo
|
* @author: liyj
|
* @time:2023-08-18 14:59:39
|
* @version 1.0.0
|
-->
|
<mapper namespace="cn.huge.module.xylink.dao.mapper.XylinkVideoMapper">
|
<!-- 结果集 -->
|
<resultMap id="dataResult" type="cn.huge.module.xylink.domain.po.XylinkVideo">
|
<result property="id" column="id"/>
|
<result property="vodId" column="vod_id"/>
|
<result property="displayName" column="display_name"/>
|
<result property="startTime" column="start_time"/>
|
<result property="endTime" column="end_time"/>
|
<result property="fileSize" column="file_size"/>
|
<result property="meetingRoomNumber" column="meeting_room_number"/>
|
<result property="nemoNumber" column="nemo_number"/>
|
<result property="vodMetadataType" column="vod_metadata_type"/>
|
<result property="transcriptionId" column="transcription_id"/>
|
<result property="transcriptionTxtFileUrl" column="transcription_txt_file_url"/>
|
<result property="playUrl" column="play_url"/>
|
<result property="downloadUrl" column="download_url"/>
|
<result property="dyhShowUrl" column="dyh_show_url"/>
|
<result property="storage" column="storage"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateTime" column="update_time"/>
|
</resultMap>
|
<!-- 表 -->
|
<sql id='table-name'>dyh_xylink_video</sql>
|
<!-- 字段 -->
|
<sql id="column-part">
|
id,
|
vod_id,
|
display_name,
|
start_time,
|
end_time,
|
file_size,
|
meeting_room_number,
|
nemo_number,
|
vod_metadata_type,
|
transcription_id,
|
transcription_txt_file_url,
|
play_url,
|
download_url,
|
dyh_show_url,
|
storage,
|
create_time,
|
update_time
|
</sql>
|
<!-- 更新实体字段 -->
|
<sql id="set-part">
|
<if test="entity.vodId != null">vod_id = #{entity.vodId},</if>
|
<if test="entity.displayName != null">display_name = #{entity.displayName},</if>
|
<if test="entity.startTime != null">start_time = #{entity.startTime},</if>
|
<if test="entity.endTime != null">end_time = #{entity.endTime},</if>
|
<if test="entity.fileSize != null">file_size = #{entity.fileSize},</if>
|
<if test="entity.meetingRoomNumber != null">meeting_room_number = #{entity.meetingRoomNumber},</if>
|
<if test="entity.nemoNumber != null">nemo_number = #{entity.nemoNumber},</if>
|
<if test="entity.vodMetadataType != null">vod_metadata_type = #{entity.vodMetadataType},</if>
|
<if test="entity.transcriptionId != null">transcription_id = #{entity.transcriptionId},</if>
|
<if test="entity.transcriptionTxtFileUrl != null">transcription_txt_file_url = #{entity.transcriptionTxtFileUrl},</if>
|
<if test="entity.playUrl != null">play_url = #{entity.playUrl},</if>
|
<if test="entity.downloadUrl != null">download_url = #{entity.downloadUrl},</if>
|
<if test="entity.dyhShowUrl != null">dyh_show_url = #{entity.dyhShowUrl},</if>
|
<if test="entity.storage != null">storage = #{entity.storage},</if>
|
<if test="entity.createTime != null">create_time = #{entity.createTime},</if>
|
<if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
|
</sql>
|
<!-- 条件 -->
|
<sql id="where-part">
|
<if test="terms != null">
|
<where>
|
<if test="terms.id != null and terms.id !=''">
|
and id = #{terms.id}
|
</if>
|
<if test="terms.vodId != null and terms.vodId !=''">
|
and vod_id = #{terms.vodId}
|
</if>
|
<if test="terms.displayName != null and terms.displayName !=''">
|
and display_name = #{terms.displayName}
|
</if>
|
<if test="terms.startTime != null and terms.startTime !=''">
|
and start_time = #{terms.startTime}
|
</if>
|
<if test="terms.endTime != null and terms.endTime !=''">
|
and end_time = #{terms.endTime}
|
</if>
|
<if test="terms.fileSize != null and terms.fileSize !=''">
|
and file_size = #{terms.fileSize}
|
</if>
|
<if test="terms.meetingRoomNumber != null and terms.meetingRoomNumber !=''">
|
and meeting_room_number = #{terms.meetingRoomNumber}
|
</if>
|
<if test="terms.nemoNumber != null and terms.nemoNumber !=''">
|
and nemo_number = #{terms.nemoNumber}
|
</if>
|
<if test="terms.vodMetadataType != null and terms.vodMetadataType !=''">
|
and vod_metadata_type = #{terms.vodMetadataType}
|
</if>
|
<if test="terms.transcriptionId != null and terms.transcriptionId !=''">
|
and transcription_id = #{terms.transcriptionId}
|
</if>
|
<if test="terms.transcriptionTxtFileUrl != null and terms.transcriptionTxtFileUrl !=''">
|
and transcription_txt_file_url = #{terms.transcriptionTxtFileUrl}
|
</if>
|
<if test="terms.playUrl != null and terms.playUrl !=''">
|
and play_url = #{terms.playUrl}
|
</if>
|
<if test="terms.downloadUrl != null and terms.downloadUrl !=''">
|
and download_url = #{terms.downloadUrl}
|
</if>
|
<if test="terms.dyhShowUrl != null and terms.dyhShowUrl !=''">
|
and dyh_show_url = #{terms.dyhShowUrl}
|
</if>
|
<if test="terms.storage != null and terms.storage !=''">
|
and storage = #{terms.storage}
|
</if>
|
<if test="terms.createTime != null and terms.createTime !=''">
|
and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
|
</if>
|
<if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
|
and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
|
and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
|
</if>
|
<if test="terms.updateTime != null and terms.updateTime !=''">
|
and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
|
</if>
|
<if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
|
and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
|
and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
|
</if>
|
</where>
|
</if>
|
</sql>
|
<!-- 更新对象 -->
|
<update id="updateXylinkVideo">
|
update
|
<include refid="table-name"/>
|
<set>
|
<include refid="set-part"/>
|
</set>
|
<where>
|
id = #{entity.id}
|
</where>
|
</update>
|
<!-- 条件更新对象 -->
|
<update id="updateXylinkVideoTerms">
|
update
|
<include refid="table-name"/>
|
<set>
|
<include refid="set-part"/>
|
</set>
|
<include refid="where-part"/>
|
</update>
|
<!-- 根据编号物理删除 -->
|
<delete id="deleteXylinkVideo">
|
delete from
|
<include refid="table-name" />
|
where id = #{id}
|
</delete>
|
<!-- 根据条件查询 -->
|
<select id="listTerms" resultMap="dataResult">
|
select
|
<include refid="column-part"/>
|
from
|
<include refid="table-name" />
|
<include refid="where-part"/>
|
</select>
|
<!-- 根据条件统计 -->
|
<select id="countTerms" resultType="java.lang.Long">
|
select
|
COUNT(1)
|
from
|
<include refid="table-name" />
|
<include refid="where-part"/>
|
</select>
|
<!-- 根据条件分页查询 -->
|
<select id="pageTerms" resultMap="dataResult">
|
SELECT
|
<include refid="column-part"/>
|
FROM
|
<include refid="table-name" />
|
<include refid="where-part"/>
|
<if test="page.sort != null">
|
<foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
|
${s.property} ${s.direction}
|
</foreach>
|
</if>
|
<if test="page.sort == null">
|
order by create_time desc
|
</if>
|
limit #{page.offset}, #{page.size}
|
</select>
|
|
</mapper>
|