<?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:2022-05-09 19:30:03
|
* @version 1.0.0
|
-->
|
<mapper namespace="cn.huge.module.meet.dao.mapper.MeetVideoMapper">
|
<!-- 结果集 -->
|
<resultMap id="dataResult" type="cn.huge.module.meet.domain.po.MeetVideo">
|
<result property="id" column="id"/>
|
<result property="caseId" column="case_id"/>
|
<result property="meetId" column="meet_id"/>
|
<result property="meetType" column="meet_type"/>
|
<result property="meetTypeName" column="meet_type_name"/>
|
<result property="coludId" column="colud_id"/>
|
<result property="roomNo" column="room_no"/>
|
<result property="vodId" column="vod_id"/>
|
<result property="videoName" column="video_name"/>
|
<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="nemoNo" column="nemo_no"/>
|
<result property="recordStatus" column="record_status"/>
|
<result property="recordStatusName" column="record_status_name"/>
|
<result property="downUrl" column="down_url"/>
|
<result property="playUrl" column="play_url"/>
|
<result property="custId" column="cust_id"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateTime" column="update_time"/>
|
</resultMap>
|
<!-- 表 -->
|
<sql id='table-name'>dyh_meet_video</sql>
|
<!-- 字段 -->
|
<sql id="column-part">
|
id,
|
case_id,
|
meet_id,
|
meet_type,
|
meet_type_name,
|
colud_id,
|
room_no,
|
vod_id,
|
video_name,
|
display_name,
|
start_time,
|
end_time,
|
file_size,
|
nemo_no,
|
record_status,
|
record_status_name,
|
down_url,
|
play_url,
|
cust_id,
|
create_time,
|
update_time
|
</sql>
|
<!-- 更新实体字段 -->
|
<sql id="set-part">
|
<if test="entity.caseId != null">case_id = #{entity.caseId},</if>
|
<if test="entity.meetId != null">meet_id = #{entity.meetId},</if>
|
<if test="entity.meetType != null">meet_type = #{entity.meetType},</if>
|
<if test="entity.meetTypeName != null">meet_type_name = #{entity.meetTypeName},</if>
|
<if test="entity.coludId != null">colud_id = #{entity.coludId},</if>
|
<if test="entity.roomNo != null">room_no = #{entity.roomNo},</if>
|
<if test="entity.vodId != null">vod_id = #{entity.vodId},</if>
|
<if test="entity.videoName != null">video_name = #{entity.videoName},</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.nemoNo != null">nemo_no = #{entity.nemoNo},</if>
|
<if test="entity.recordStatus != null">record_status = #{entity.recordStatus},</if>
|
<if test="entity.recordStatusName != null">record_status_name = #{entity.recordStatusName},</if>
|
<if test="entity.downUrl != null">down_url = #{entity.downUrl},</if>
|
<if test="entity.playUrl != null">play_url = #{entity.playUrl},</if>
|
<if test="entity.custId != null">cust_id = #{entity.custId},</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.caseId != null and terms.caseId !=''">
|
and case_id = #{terms.caseId}
|
</if>
|
<if test="terms.meetId != null and terms.meetId !=''">
|
and meet_id = #{terms.meetId}
|
</if>
|
<if test="terms.meetType != null and terms.meetType !=''">
|
and meet_type = #{terms.meetType}
|
</if>
|
<if test="terms.meetTypeName != null and terms.meetTypeName !=''">
|
and meet_type_name = #{terms.meetTypeName}
|
</if>
|
<if test="terms.coludId != null and terms.coludId !=''">
|
and colud_id = #{terms.coludId}
|
</if>
|
<if test="terms.roomNo != null and terms.roomNo !=''">
|
and room_no = #{terms.roomNo}
|
</if>
|
<if test="terms.vodId != null and terms.vodId !=''">
|
and vod_id = #{terms.vodId}
|
</if>
|
<if test="terms.videoName != null and terms.videoName !=''">
|
and video_name = #{terms.videoName}
|
</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.nemoNo != null and terms.nemoNo !=''">
|
and nemo_no = #{terms.nemoNo}
|
</if>
|
<if test="terms.recordStatus != null and terms.recordStatus !=''">
|
and record_status = #{terms.recordStatus}
|
</if>
|
<if test="terms.recordStatusName != null and terms.recordStatusName !=''">
|
and record_status_name = #{terms.recordStatusName}
|
</if>
|
<if test="terms.downUrl != null and terms.downUrl !=''">
|
and down_url = #{terms.downUrl}
|
</if>
|
<if test="terms.playUrl != null and terms.playUrl !=''">
|
and play_url = #{terms.playUrl}
|
</if>
|
<if test="terms.custId != null and terms.custId !=''">
|
and cust_id = #{terms.custId}
|
</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="updateMeetVideo">
|
update
|
<include refid="table-name"/>
|
<set>
|
<include refid="set-part"/>
|
</set>
|
<where>
|
id = #{entity.id}
|
</where>
|
</update>
|
<!-- 条件更新对象 -->
|
<update id="updateMeetVideoTerms">
|
update
|
<include refid="table-name"/>
|
<set>
|
<include refid="set-part"/>
|
</set>
|
<include refid="where-part"/>
|
</update>
|
<!-- 根据编号物理删除 -->
|
<delete id="deleteMeetVideo">
|
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>
|
|
<select id="getDownloadVideo" resultType="cn.huge.module.meet.domain.po.MeetVideo">
|
SELECT * FROM dyh_meet_video where is_download = 0
|
</select>
|
</mapper>
|