169 lines
11 KiB
XML
169 lines
11 KiB
XML
|
|
<?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="org.xyzh.workcase.mapper.TbVideoMeetingMapper">
|
||
|
|
|
||
|
|
<resultMap id="BaseResultMap" type="org.xyzh.api.workcase.dto.TbVideoMeetingDTO">
|
||
|
|
<id column="meeting_id" property="meetingId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||
|
|
<result column="room_id" property="roomId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="workcase_id" property="workcaseId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="meeting_name" property="meetingName" jdbcType="VARCHAR"/>
|
||
|
|
<result column="meeting_password" property="meetingPassword" jdbcType="VARCHAR"/>
|
||
|
|
<result column="jwt_token" property="jwtToken" jdbcType="VARCHAR"/>
|
||
|
|
<result column="jitsi_room_name" property="jitsiRoomName" jdbcType="VARCHAR"/>
|
||
|
|
<result column="jitsi_server_url" property="jitsiServerUrl" jdbcType="VARCHAR"/>
|
||
|
|
<result column="status" property="status" jdbcType="VARCHAR"/>
|
||
|
|
<result column="creator_id" property="creatorId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="creator_type" property="creatorType" jdbcType="VARCHAR"/>
|
||
|
|
<result column="creator_name" property="creatorName" jdbcType="VARCHAR"/>
|
||
|
|
<result column="participant_count" property="participantCount" jdbcType="INTEGER"/>
|
||
|
|
<result column="max_participants" property="maxParticipants" jdbcType="INTEGER"/>
|
||
|
|
<result column="start_time" property="actualStartTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="end_time" property="actualEndTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="duration_seconds" property="durationSeconds" jdbcType="INTEGER"/>
|
||
|
|
<result column="iframe_url" property="iframeUrl" jdbcType="VARCHAR"/>
|
||
|
|
<result column="config" property="config" jdbcType="OTHER" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
|
||
|
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<resultMap id="VOResultMap" type="org.xyzh.api.workcase.vo.VideoMeetingVO">
|
||
|
|
<id column="meeting_id" property="meetingId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||
|
|
<result column="room_id" property="roomId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="workcase_id" property="workcaseId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="meeting_name" property="meetingName" jdbcType="VARCHAR"/>
|
||
|
|
<result column="meeting_password" property="meetingPassword" jdbcType="VARCHAR"/>
|
||
|
|
<result column="jwt_token" property="jwtToken" jdbcType="VARCHAR"/>
|
||
|
|
<result column="jitsi_room_name" property="jitsiRoomName" jdbcType="VARCHAR"/>
|
||
|
|
<result column="jitsi_server_url" property="jitsiServerUrl" jdbcType="VARCHAR"/>
|
||
|
|
<result column="status" property="status" jdbcType="VARCHAR"/>
|
||
|
|
<result column="creator_id" property="creatorId" jdbcType="VARCHAR"/>
|
||
|
|
<result column="creator_type" property="creatorType" jdbcType="VARCHAR"/>
|
||
|
|
<result column="creator_name" property="creatorName" jdbcType="VARCHAR"/>
|
||
|
|
<result column="participant_count" property="participantCount" jdbcType="INTEGER"/>
|
||
|
|
<result column="max_participants" property="maxParticipants" jdbcType="INTEGER"/>
|
||
|
|
<result column="start_time" property="actualStartTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="end_time" property="actualEndTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="duration_seconds" property="durationSeconds" jdbcType="INTEGER"/>
|
||
|
|
<result column="iframe_url" property="iframeUrl" jdbcType="VARCHAR"/>
|
||
|
|
<result column="config" property="config" jdbcType="OTHER" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
|
||
|
|
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="delete_time" property="deleteTime" jdbcType="TIMESTAMP"/>
|
||
|
|
<result column="deleted" property="deleted" jdbcType="BOOLEAN"/>
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="Base_Column_List">
|
||
|
|
meeting_id, optsn, room_id, workcase_id, meeting_name, meeting_password, jwt_token,
|
||
|
|
jitsi_room_name, jitsi_server_url, status, creator_id, creator_type, creator_name,
|
||
|
|
participant_count, max_participants, start_time, end_time, duration_seconds, iframe_url,
|
||
|
|
config, creator, create_time, update_time, delete_time, deleted
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<insert id="insertVideoMeeting" parameterType="org.xyzh.api.workcase.dto.TbVideoMeetingDTO">
|
||
|
|
INSERT INTO workcase.tb_video_meeting (
|
||
|
|
optsn, meeting_id, room_id, workcase_id, meeting_name, jitsi_room_name, creator_id, creator_type, creator_name, creator
|
||
|
|
<if test="meetingPassword != null">, meeting_password</if>
|
||
|
|
<if test="jwtToken != null">, jwt_token</if>
|
||
|
|
<if test="jitsiServerUrl != null">, jitsi_server_url</if>
|
||
|
|
<if test="status != null">, status</if>
|
||
|
|
<if test="maxParticipants != null">, max_participants</if>
|
||
|
|
<if test="iframeUrl != null">, iframe_url</if>
|
||
|
|
<if test="config != null">, config</if>
|
||
|
|
) VALUES (
|
||
|
|
#{optsn}, #{meetingId}, #{roomId}, #{workcaseId}, #{meetingName}, #{jitsiRoomName}, #{creatorId}, #{creatorType}, #{creatorName}, #{creator}
|
||
|
|
<if test="meetingPassword != null">, #{meetingPassword}</if>
|
||
|
|
<if test="jwtToken != null">, #{jwtToken}</if>
|
||
|
|
<if test="jitsiServerUrl != null">, #{jitsiServerUrl}</if>
|
||
|
|
<if test="status != null">, #{status}</if>
|
||
|
|
<if test="maxParticipants != null">, #{maxParticipants}</if>
|
||
|
|
<if test="iframeUrl != null">, #{iframeUrl}</if>
|
||
|
|
<if test="config != null">, #{config, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler}</if>
|
||
|
|
)
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateVideoMeeting" parameterType="org.xyzh.api.workcase.dto.TbVideoMeetingDTO">
|
||
|
|
UPDATE workcase.tb_video_meeting
|
||
|
|
<set>
|
||
|
|
<if test="meetingName != null and meetingName != ''">meeting_name = #{meetingName},</if>
|
||
|
|
<if test="meetingPassword != null">meeting_password = #{meetingPassword},</if>
|
||
|
|
<if test="jwtToken != null">jwt_token = #{jwtToken},</if>
|
||
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
||
|
|
<if test="participantCount != null">participant_count = #{participantCount},</if>
|
||
|
|
<if test="actualStartTime != null">start_time = #{actualStartTime},</if>
|
||
|
|
<if test="actualEndTime != null">end_time = #{actualEndTime},</if>
|
||
|
|
<if test="durationSeconds != null">duration_seconds = #{durationSeconds},</if>
|
||
|
|
<if test="iframeUrl != null">iframe_url = #{iframeUrl},</if>
|
||
|
|
<if test="config != null">config = #{config, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},</if>
|
||
|
|
update_time = now()
|
||
|
|
</set>
|
||
|
|
WHERE meeting_id = #{meetingId} AND deleted = false
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<update id="deleteVideoMeeting" parameterType="org.xyzh.api.workcase.dto.TbVideoMeetingDTO">
|
||
|
|
UPDATE workcase.tb_video_meeting
|
||
|
|
SET deleted = true, delete_time = now()
|
||
|
|
WHERE meeting_id = #{meetingId} AND deleted = false
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<select id="selectVideoMeetingById" resultMap="BaseResultMap">
|
||
|
|
SELECT <include refid="Base_Column_List"/>
|
||
|
|
FROM workcase.tb_video_meeting
|
||
|
|
WHERE meeting_id = #{meetingId} AND deleted = false
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectVideoMeetingList" resultMap="VOResultMap">
|
||
|
|
SELECT <include refid="Base_Column_List"/>
|
||
|
|
FROM workcase.tb_video_meeting
|
||
|
|
<where>
|
||
|
|
<if test="filter.meetingId != null and filter.meetingId != ''">AND meeting_id = #{filter.meetingId}</if>
|
||
|
|
<if test="filter.roomId != null and filter.roomId != ''">AND room_id = #{filter.roomId}</if>
|
||
|
|
<if test="filter.workcaseId != null and filter.workcaseId != ''">AND workcase_id = #{filter.workcaseId}</if>
|
||
|
|
<if test="filter.meetingName != null and filter.meetingName != ''">AND meeting_name LIKE CONCAT('%', #{filter.meetingName}, '%')</if>
|
||
|
|
<if test="filter.status != null and filter.status != ''">AND status = #{filter.status}</if>
|
||
|
|
<if test="filter.creatorId != null and filter.creatorId != ''">AND creator_id = #{filter.creatorId}</if>
|
||
|
|
<if test="filter.creatorType != null and filter.creatorType != ''">AND creator_type = #{filter.creatorType}</if>
|
||
|
|
AND deleted = false
|
||
|
|
</where>
|
||
|
|
ORDER BY create_time DESC
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectVideoMeetingPage" resultMap="VOResultMap">
|
||
|
|
SELECT <include refid="Base_Column_List"/>
|
||
|
|
FROM workcase.tb_video_meeting
|
||
|
|
<where>
|
||
|
|
<if test="filter.meetingId != null and filter.meetingId != ''">AND meeting_id = #{filter.meetingId}</if>
|
||
|
|
<if test="filter.roomId != null and filter.roomId != ''">AND room_id = #{filter.roomId}</if>
|
||
|
|
<if test="filter.workcaseId != null and filter.workcaseId != ''">AND workcase_id = #{filter.workcaseId}</if>
|
||
|
|
<if test="filter.meetingName != null and filter.meetingName != ''">AND meeting_name LIKE CONCAT('%', #{filter.meetingName}, '%')</if>
|
||
|
|
<if test="filter.status != null and filter.status != ''">AND status = #{filter.status}</if>
|
||
|
|
<if test="filter.creatorId != null and filter.creatorId != ''">AND creator_id = #{filter.creatorId}</if>
|
||
|
|
<if test="filter.creatorType != null and filter.creatorType != ''">AND creator_type = #{filter.creatorType}</if>
|
||
|
|
AND deleted = false
|
||
|
|
</where>
|
||
|
|
ORDER BY create_time DESC
|
||
|
|
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="countVideoMeetings" resultType="long">
|
||
|
|
SELECT COUNT(*)
|
||
|
|
FROM workcase.tb_video_meeting
|
||
|
|
<where>
|
||
|
|
<if test="filter.meetingId != null and filter.meetingId != ''">AND meeting_id = #{filter.meetingId}</if>
|
||
|
|
<if test="filter.roomId != null and filter.roomId != ''">AND room_id = #{filter.roomId}</if>
|
||
|
|
<if test="filter.workcaseId != null and filter.workcaseId != ''">AND workcase_id = #{filter.workcaseId}</if>
|
||
|
|
<if test="filter.meetingName != null and filter.meetingName != ''">AND meeting_name LIKE CONCAT('%', #{filter.meetingName}, '%')</if>
|
||
|
|
<if test="filter.status != null and filter.status != ''">AND status = #{filter.status}</if>
|
||
|
|
<if test="filter.creatorId != null and filter.creatorId != ''">AND creator_id = #{filter.creatorId}</if>
|
||
|
|
<if test="filter.creatorType != null and filter.creatorType != ''">AND creator_type = #{filter.creatorType}</if>
|
||
|
|
AND deleted = false
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|