From 85e4513284455064e49049c0524a77548502f403 Mon Sep 17 00:00:00 2001 From: wangys <3401275564@qq.com> Date: Mon, 22 Dec 2025 11:24:30 +0800 Subject: [PATCH] mapper --- .../postgres/sql/createTableWorkcase.sql | 4 +- .../dto/TbMeetingTranscriptionDTO.java | 68 +++++++ .../api/workcase/vo/MeetingParticipantVO.java | 53 ++++++ .../workcase/vo/MeetingTranscriptionVO.java | 65 +++++++ .../workcase/mapper/TbChatMessageMapper.java | 56 ++++++ .../workcase/mapper/TbChatRoomMapper.java | 56 ++++++ .../mapper/TbChatRoomMemberMapper.java | 56 ++++++ .../mapper/TbCustomerServiceMapper.java | 56 ++++++ .../mapper/TbMeetingParticipantMapper.java | 56 ++++++ .../mapper/TbMeetingTranscriptionMapper.java | 56 ++++++ .../workcase/mapper/TbVideoMeetingMapper.java | 56 ++++++ .../resources/mapper/TbChatMessageMapper.xml | 144 +++++++++++++++ .../resources/mapper/TbChatRoomMapper.xml | 152 ++++++++++++++++ .../mapper/TbChatRoomMemberMapper.xml | 133 ++++++++++++++ .../mapper/TbCustomerServiceMapper.xml | 141 +++++++++++++++ .../mapper/TbMeetingParticipantMapper.xml | 126 +++++++++++++ .../mapper/TbMeetingTranscriptionMapper.xml | 144 +++++++++++++++ .../resources/mapper/TbVideoMeetingMapper.xml | 168 ++++++++++++++++++ .../shared/src/types/workcase/chatRoom.ts | 38 ++++ 19 files changed, 1626 insertions(+), 2 deletions(-) create mode 100644 urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/dto/TbMeetingTranscriptionDTO.java create mode 100644 urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingParticipantVO.java create mode 100644 urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingTranscriptionVO.java create mode 100644 urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatMessageMapper.java create mode 100644 urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMapper.java create mode 100644 urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMemberMapper.java create mode 100644 urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbCustomerServiceMapper.java create mode 100644 urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingParticipantMapper.java create mode 100644 urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingTranscriptionMapper.java create mode 100644 urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbVideoMeetingMapper.java create mode 100644 urbanLifelineServ/workcase/src/main/resources/mapper/TbChatMessageMapper.xml create mode 100644 urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMapper.xml create mode 100644 urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMemberMapper.xml create mode 100644 urbanLifelineServ/workcase/src/main/resources/mapper/TbCustomerServiceMapper.xml create mode 100644 urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingParticipantMapper.xml create mode 100644 urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingTranscriptionMapper.xml create mode 100644 urbanLifelineServ/workcase/src/main/resources/mapper/TbVideoMeetingMapper.xml diff --git a/urbanLifelineServ/.bin/database/postgres/sql/createTableWorkcase.sql b/urbanLifelineServ/.bin/database/postgres/sql/createTableWorkcase.sql index ddce3dc0..8e032fe3 100644 --- a/urbanLifelineServ/.bin/database/postgres/sql/createTableWorkcase.sql +++ b/urbanLifelineServ/.bin/database/postgres/sql/createTableWorkcase.sql @@ -185,8 +185,8 @@ CREATE TABLE workcase.tb_meeting_transcription( content_raw TEXT DEFAULT NULL, -- 原始转录结果(含标点前) language VARCHAR(10) DEFAULT 'zh-CN', -- 语言:zh-CN en-US等 confidence NUMERIC(3,2) DEFAULT NULL, -- 识别置信度(0-1) - start_time TIMESTAMPTZ NOT NULL, -- 语音开始时间 - end_time TIMESTAMPTZ NOT NULL, -- 语音结束时间 + speech_start_time TIMESTAMPTZ NOT NULL, -- 语音开始时间 + speech_end_time TIMESTAMPTZ NOT NULL, -- 语音结束时间 duration_ms INTEGER NOT NULL, -- 语音时长(毫秒) audio_url VARCHAR(500) DEFAULT NULL, -- 音频片段URL(可选) segment_index INTEGER NOT NULL DEFAULT 0, -- 片段序号(按时间排序) diff --git a/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/dto/TbMeetingTranscriptionDTO.java b/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/dto/TbMeetingTranscriptionDTO.java new file mode 100644 index 00000000..2c6126bc --- /dev/null +++ b/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/dto/TbMeetingTranscriptionDTO.java @@ -0,0 +1,68 @@ +package org.xyzh.api.workcase.dto; + +import java.time.OffsetDateTime; + +import org.xyzh.common.dto.BaseDTO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * @description 会议转录记录表数据对象DTO + * @filename TbMeetingTranscriptionDTO.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Data +@Schema(description = "会议转录记录表对象") +public class TbMeetingTranscriptionDTO extends BaseDTO { + private static final long serialVersionUID = 1L; + + @Schema(description = "转录记录ID") + private String transcriptionId; + + @Schema(description = "会议ID") + private String meetingId; + + @Schema(description = "说话人ID") + private String speakerId; + + @Schema(description = "说话人名称") + private String speakerName; + + @Schema(description = "说话人类型:guest-来客 agent-客服") + private String speakerType; + + @Schema(description = "转录文本内容") + private String content; + + @Schema(description = "原始转录结果") + private String contentRaw; + + @Schema(description = "语言") + private String language; + + @Schema(description = "识别置信度(0-1)") + private Double confidence; + + @Schema(description = "语音开始时间") + private OffsetDateTime speechStartTime; + + @Schema(description = "语音结束时间") + private OffsetDateTime speechEndTime; + + @Schema(description = "语音时长(毫秒)") + private Integer durationMs; + + @Schema(description = "音频片段URL") + private String audioUrl; + + @Schema(description = "片段序号") + private Integer segmentIndex; + + @Schema(description = "是否最终结果") + private Boolean isFinal; + + @Schema(description = "服务提供商") + private String serviceProvider; +} diff --git a/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingParticipantVO.java b/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingParticipantVO.java new file mode 100644 index 00000000..60192f58 --- /dev/null +++ b/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingParticipantVO.java @@ -0,0 +1,53 @@ +package org.xyzh.api.workcase.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.xyzh.common.vo.BaseVO; +import io.swagger.v3.oas.annotations.media.Schema; +import java.time.OffsetDateTime; + +/** + * 会议参与记录VO + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Schema(description = "会议参与记录VO") +public class MeetingParticipantVO extends BaseVO { + private static final long serialVersionUID = 1L; + + @Schema(description = "参与记录ID") + private String participantId; + + @Schema(description = "会议ID") + private String meetingId; + + @Schema(description = "用户ID") + private String userId; + + @Schema(description = "用户类型:guest-来客 agent-客服") + private String userType; + + @Schema(description = "用户名称") + private String userName; + + @Schema(description = "加入时间") + private OffsetDateTime joinTime; + + @Schema(description = "离开时间") + private OffsetDateTime leaveTime; + + @Schema(description = "参与时长(秒)") + private Integer durationSeconds; + + @Schema(description = "参与时长(格式化)") + private String durationFormatted; + + @Schema(description = "是否主持人") + private Boolean isModerator; + + @Schema(description = "加入方式:web-网页 mobile-移动端 desktop-桌面端") + private String joinMethod; + + @Schema(description = "设备信息") + private String deviceInfo; +} diff --git a/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingTranscriptionVO.java b/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingTranscriptionVO.java new file mode 100644 index 00000000..df76ffee --- /dev/null +++ b/urbanLifelineServ/apis/api-workcase/src/main/java/org/xyzh/api/workcase/vo/MeetingTranscriptionVO.java @@ -0,0 +1,65 @@ +package org.xyzh.api.workcase.vo; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.xyzh.common.vo.BaseVO; +import io.swagger.v3.oas.annotations.media.Schema; +import java.time.OffsetDateTime; + +/** + * 会议转录记录VO + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Schema(description = "会议转录记录VO") +public class MeetingTranscriptionVO extends BaseVO { + private static final long serialVersionUID = 1L; + + @Schema(description = "转录记录ID") + private String transcriptionId; + + @Schema(description = "会议ID") + private String meetingId; + + @Schema(description = "说话人ID") + private String speakerId; + + @Schema(description = "说话人名称") + private String speakerName; + + @Schema(description = "说话人类型:guest-来客 agent-客服") + private String speakerType; + + @Schema(description = "转录文本内容") + private String content; + + @Schema(description = "原始转录结果") + private String contentRaw; + + @Schema(description = "语言") + private String language; + + @Schema(description = "识别置信度(0-1)") + private Double confidence; + + @Schema(description = "语音开始时间") + private OffsetDateTime speechStartTime; + + @Schema(description = "语音结束时间") + private OffsetDateTime speechEndTime; + + @Schema(description = "语音时长(毫秒)") + private Integer durationMs; + + @Schema(description = "音频片段URL") + private String audioUrl; + + @Schema(description = "片段序号") + private Integer segmentIndex; + + @Schema(description = "是否最终结果") + private Boolean isFinal; + + @Schema(description = "服务提供商") + private String serviceProvider; +} diff --git a/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatMessageMapper.java b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatMessageMapper.java new file mode 100644 index 00000000..7e8dc600 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatMessageMapper.java @@ -0,0 +1,56 @@ +package org.xyzh.workcase.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.xyzh.api.workcase.dto.TbChatMessageDTO; +import org.xyzh.api.workcase.vo.ChatMessageVO; +import org.xyzh.common.core.page.PageParam; + +/** + * @description 聊天消息数据访问层 + * @filename TbChatMessageMapper.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Mapper +public interface TbChatMessageMapper { + + /** + * 插入聊天消息 + */ + int insertChatMessage(TbChatMessageDTO message); + + /** + * 更新聊天消息(只更新非null字段) + */ + int updateChatMessage(TbChatMessageDTO message); + + /** + * 删除聊天消息 + */ + int deleteChatMessage(TbChatMessageDTO message); + + /** + * 根据ID查询聊天消息 + */ + TbChatMessageDTO selectChatMessageById(@Param("messageId") String messageId); + + /** + * 查询聊天消息列表 + */ + List selectChatMessageList(@Param("filter") TbChatMessageDTO filter); + + /** + * 分页查询聊天消息 + */ + List selectChatMessagePage(@Param("filter") TbChatMessageDTO filter, @Param("pageParam") PageParam pageParam); + + /** + * 统计聊天消息数量 + */ + long countChatMessages(@Param("filter") TbChatMessageDTO filter); + +} diff --git a/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMapper.java b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMapper.java new file mode 100644 index 00000000..3fc89f76 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMapper.java @@ -0,0 +1,56 @@ +package org.xyzh.workcase.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.xyzh.api.workcase.dto.TbChatRoomDTO; +import org.xyzh.api.workcase.vo.ChatRoomVO; +import org.xyzh.common.core.page.PageParam; + +/** + * @description 聊天室数据访问层 + * @filename TbChatRoomMapper.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Mapper +public interface TbChatRoomMapper { + + /** + * 插入聊天室 + */ + int insertChatRoom(TbChatRoomDTO chatRoom); + + /** + * 更新聊天室(只更新非null字段) + */ + int updateChatRoom(TbChatRoomDTO chatRoom); + + /** + * 逻辑删除聊天室 + */ + int deleteChatRoom(TbChatRoomDTO chatRoom); + + /** + * 根据ID查询聊天室 + */ + TbChatRoomDTO selectChatRoomById(@Param("roomId") String roomId); + + /** + * 查询聊天室列表 + */ + List selectChatRoomList(@Param("filter") TbChatRoomDTO filter); + + /** + * 分页查询聊天室 + */ + List selectChatRoomPage(@Param("filter") TbChatRoomDTO filter, @Param("pageParam") PageParam pageParam); + + /** + * 统计聊天室数量 + */ + long countChatRooms(@Param("filter") TbChatRoomDTO filter); + +} diff --git a/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMemberMapper.java b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMemberMapper.java new file mode 100644 index 00000000..35314117 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbChatRoomMemberMapper.java @@ -0,0 +1,56 @@ +package org.xyzh.workcase.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.xyzh.api.workcase.dto.TbChatRoomMemberDTO; +import org.xyzh.api.workcase.vo.ChatMemberVO; +import org.xyzh.common.core.page.PageParam; + +/** + * @description 聊天室成员数据访问层 + * @filename TbChatRoomMemberMapper.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Mapper +public interface TbChatRoomMemberMapper { + + /** + * 插入聊天室成员 + */ + int insertChatRoomMember(TbChatRoomMemberDTO member); + + /** + * 更新聊天室成员(只更新非null字段) + */ + int updateChatRoomMember(TbChatRoomMemberDTO member); + + /** + * 删除聊天室成员 + */ + int deleteChatRoomMember(TbChatRoomMemberDTO member); + + /** + * 根据ID查询聊天室成员 + */ + TbChatRoomMemberDTO selectChatRoomMemberById(@Param("memberId") String memberId); + + /** + * 查询聊天室成员列表 + */ + List selectChatRoomMemberList(@Param("filter") TbChatRoomMemberDTO filter); + + /** + * 分页查询聊天室成员 + */ + List selectChatRoomMemberPage(@Param("filter") TbChatRoomMemberDTO filter, @Param("pageParam") PageParam pageParam); + + /** + * 统计聊天室成员数量 + */ + long countChatRoomMembers(@Param("filter") TbChatRoomMemberDTO filter); + +} diff --git a/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbCustomerServiceMapper.java b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbCustomerServiceMapper.java new file mode 100644 index 00000000..17a3c6dd --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbCustomerServiceMapper.java @@ -0,0 +1,56 @@ +package org.xyzh.workcase.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.xyzh.api.workcase.dto.TbCustomerServiceDTO; +import org.xyzh.api.workcase.vo.CustomerServiceVO; +import org.xyzh.common.core.page.PageParam; + +/** + * @description 客服人员配置数据访问层 + * @filename TbCustomerServiceMapper.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Mapper +public interface TbCustomerServiceMapper { + + /** + * 插入客服人员配置 + */ + int insertCustomerService(TbCustomerServiceDTO customerService); + + /** + * 更新客服人员配置(只更新非null字段) + */ + int updateCustomerService(TbCustomerServiceDTO customerService); + + /** + * 逻辑删除客服人员配置 + */ + int deleteCustomerService(TbCustomerServiceDTO customerService); + + /** + * 根据ID查询客服人员配置 + */ + TbCustomerServiceDTO selectCustomerServiceById(@Param("userId") String userId); + + /** + * 查询客服人员配置列表 + */ + List selectCustomerServiceList(@Param("filter") TbCustomerServiceDTO filter); + + /** + * 分页查询客服人员配置 + */ + List selectCustomerServicePage(@Param("filter") TbCustomerServiceDTO filter, @Param("pageParam") PageParam pageParam); + + /** + * 统计客服人员配置数量 + */ + long countCustomerServices(@Param("filter") TbCustomerServiceDTO filter); + +} diff --git a/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingParticipantMapper.java b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingParticipantMapper.java new file mode 100644 index 00000000..ed1c3ae3 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingParticipantMapper.java @@ -0,0 +1,56 @@ +package org.xyzh.workcase.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.xyzh.api.workcase.dto.TbMeetingParticipantDTO; +import org.xyzh.api.workcase.vo.MeetingParticipantVO; +import org.xyzh.common.core.page.PageParam; + +/** + * @description 会议参与记录数据访问层 + * @filename TbMeetingParticipantMapper.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Mapper +public interface TbMeetingParticipantMapper { + + /** + * 插入会议参与记录 + */ + int insertMeetingParticipant(TbMeetingParticipantDTO participant); + + /** + * 更新会议参与记录(只更新非null字段) + */ + int updateMeetingParticipant(TbMeetingParticipantDTO participant); + + /** + * 删除会议参与记录 + */ + int deleteMeetingParticipant(TbMeetingParticipantDTO participant); + + /** + * 根据ID查询会议参与记录 + */ + TbMeetingParticipantDTO selectMeetingParticipantById(@Param("participantId") String participantId); + + /** + * 查询会议参与记录列表 + */ + List selectMeetingParticipantList(@Param("filter") TbMeetingParticipantDTO filter); + + /** + * 分页查询会议参与记录 + */ + List selectMeetingParticipantPage(@Param("filter") TbMeetingParticipantDTO filter, @Param("pageParam") PageParam pageParam); + + /** + * 统计会议参与记录数量 + */ + long countMeetingParticipants(@Param("filter") TbMeetingParticipantDTO filter); + +} diff --git a/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingTranscriptionMapper.java b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingTranscriptionMapper.java new file mode 100644 index 00000000..00128631 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbMeetingTranscriptionMapper.java @@ -0,0 +1,56 @@ +package org.xyzh.workcase.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.xyzh.api.workcase.dto.TbMeetingTranscriptionDTO; +import org.xyzh.api.workcase.vo.MeetingTranscriptionVO; +import org.xyzh.common.core.page.PageParam; + +/** + * @description 会议转录记录数据访问层 + * @filename TbMeetingTranscriptionMapper.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Mapper +public interface TbMeetingTranscriptionMapper { + + /** + * 插入会议转录记录 + */ + int insertMeetingTranscription(TbMeetingTranscriptionDTO transcription); + + /** + * 更新会议转录记录(只更新非null字段) + */ + int updateMeetingTranscription(TbMeetingTranscriptionDTO transcription); + + /** + * 删除会议转录记录 + */ + int deleteMeetingTranscription(TbMeetingTranscriptionDTO transcription); + + /** + * 根据ID查询会议转录记录 + */ + TbMeetingTranscriptionDTO selectMeetingTranscriptionById(@Param("transcriptionId") String transcriptionId); + + /** + * 查询会议转录记录列表 + */ + List selectMeetingTranscriptionList(@Param("filter") TbMeetingTranscriptionDTO filter); + + /** + * 分页查询会议转录记录 + */ + List selectMeetingTranscriptionPage(@Param("filter") TbMeetingTranscriptionDTO filter, @Param("pageParam") PageParam pageParam); + + /** + * 统计会议转录记录数量 + */ + long countMeetingTranscriptions(@Param("filter") TbMeetingTranscriptionDTO filter); + +} diff --git a/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbVideoMeetingMapper.java b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbVideoMeetingMapper.java new file mode 100644 index 00000000..b228fdd0 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/java/org/xyzh/workcase/mapper/TbVideoMeetingMapper.java @@ -0,0 +1,56 @@ +package org.xyzh.workcase.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.xyzh.api.workcase.dto.TbVideoMeetingDTO; +import org.xyzh.api.workcase.vo.VideoMeetingVO; +import org.xyzh.common.core.page.PageParam; + +/** + * @description 视频会议数据访问层 + * @filename TbVideoMeetingMapper.java + * @author cascade + * @copyright xyzh + * @since 2025-12-22 + */ +@Mapper +public interface TbVideoMeetingMapper { + + /** + * 插入视频会议 + */ + int insertVideoMeeting(TbVideoMeetingDTO meeting); + + /** + * 更新视频会议(只更新非null字段) + */ + int updateVideoMeeting(TbVideoMeetingDTO meeting); + + /** + * 逻辑删除视频会议 + */ + int deleteVideoMeeting(TbVideoMeetingDTO meeting); + + /** + * 根据ID查询视频会议 + */ + TbVideoMeetingDTO selectVideoMeetingById(@Param("meetingId") String meetingId); + + /** + * 查询视频会议列表 + */ + List selectVideoMeetingList(@Param("filter") TbVideoMeetingDTO filter); + + /** + * 分页查询视频会议 + */ + List selectVideoMeetingPage(@Param("filter") TbVideoMeetingDTO filter, @Param("pageParam") PageParam pageParam); + + /** + * 统计视频会议数量 + */ + long countVideoMeetings(@Param("filter") TbVideoMeetingDTO filter); + +} diff --git a/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatMessageMapper.xml b/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatMessageMapper.xml new file mode 100644 index 00000000..43678588 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatMessageMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + message_id, optsn, room_id, sender_id, sender_type, sender_name, message_type, + content, files, content_extra, reply_to_msg_id, is_ai_message, ai_message_id, + status, read_count, send_time, creator, create_time, update_time + + + + INSERT INTO workcase.tb_chat_message ( + optsn, message_id, room_id, sender_id, sender_type, sender_name, content, creator + , message_type + , files + , content_extra + , reply_to_msg_id + , is_ai_message + , ai_message_id + , status + ) VALUES ( + #{optsn}, #{messageId}, #{roomId}, #{senderId}, #{senderType}, #{senderName}, #{content}, #{creator} + , #{messageType} + , #{files, typeHandler=org.xyzh.common.jdbc.handler.StringArrayTypeHandler} + , #{contentExtra, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler} + , #{replyToMsgId} + , #{isAiMessage} + , #{aiMessageId} + , #{status} + ) + + + + UPDATE workcase.tb_chat_message + + content = #{content}, + status = #{status}, + read_count = #{readCount}, + update_time = now() + + WHERE message_id = #{messageId} + + + + DELETE FROM workcase.tb_chat_message + WHERE message_id = #{messageId} + + + + + + + + + + + diff --git a/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMapper.xml b/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMapper.xml new file mode 100644 index 00000000..6ccf2d0b --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMapper.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + room_id, optsn, workcase_id, room_name, room_type, status, guest_id, guest_name, + ai_session_id, message_count, last_message_time, last_message, closed_by, closed_time, + creator, create_time, update_time, delete_time, deleted + + + + INSERT INTO workcase.tb_chat_room ( + optsn, room_id, workcase_id, room_name, guest_id, guest_name, creator + , room_type + , status + , ai_session_id + , message_count + , last_message_time + , last_message + ) VALUES ( + #{optsn}, #{roomId}, #{workcaseId}, #{roomName}, #{guestId}, #{guestName}, #{creator} + , #{roomType} + , #{status} + , #{aiSessionId} + , #{messageCount} + , #{lastMessageTime} + , #{lastMessage} + ) + + + + UPDATE workcase.tb_chat_room + + room_name = #{roomName}, + room_type = #{roomType}, + status = #{status}, + ai_session_id = #{aiSessionId}, + message_count = #{messageCount}, + last_message_time = #{lastMessageTime}, + last_message = #{lastMessage}, + closed_by = #{closedBy}, + closed_time = #{closedTime}, + update_time = now() + + WHERE room_id = #{roomId} AND deleted = false + + + + UPDATE workcase.tb_chat_room + SET deleted = true, delete_time = now() + WHERE room_id = #{roomId} AND deleted = false + + + + + + + + + + + diff --git a/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMemberMapper.xml b/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMemberMapper.xml new file mode 100644 index 00000000..aad225f4 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/resources/mapper/TbChatRoomMemberMapper.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + member_id, optsn, room_id, user_id, user_type, user_name, role, status, + unread_count, last_read_time, last_read_msg_id, join_time, leave_time, + creator, create_time, update_time + + + + INSERT INTO workcase.tb_chat_room_member ( + optsn, member_id, room_id, user_id, user_type, user_name, creator + , role + , status + , unread_count + ) VALUES ( + #{optsn}, #{memberId}, #{roomId}, #{userId}, #{userType}, #{userName}, #{creator} + , #{role} + , #{status} + , #{unreadCount} + ) + + + + UPDATE workcase.tb_chat_room_member + + role = #{role}, + status = #{status}, + unread_count = #{unreadCount}, + last_read_time = #{lastReadTime}, + last_read_msg_id = #{lastReadMsgId}, + leave_time = #{leaveTime}, + update_time = now() + + WHERE member_id = #{memberId} + + + + DELETE FROM workcase.tb_chat_room_member + WHERE member_id = #{memberId} + + + + + + + + + + + diff --git a/urbanLifelineServ/workcase/src/main/resources/mapper/TbCustomerServiceMapper.xml b/urbanLifelineServ/workcase/src/main/resources/mapper/TbCustomerServiceMapper.xml new file mode 100644 index 00000000..72514ae6 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/resources/mapper/TbCustomerServiceMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + user_id, optsn, username, user_code, status, skill_tags, max_concurrent, current_workload, + total_served, avg_response_time, satisfaction_score, creator, create_time, update_time, + delete_time, deleted + + + + INSERT INTO workcase.tb_customer_service ( + optsn, user_id, username, creator + , user_code + , status + , skill_tags + , max_concurrent + , current_workload + , total_served + , avg_response_time + , satisfaction_score + ) VALUES ( + #{optsn}, #{userId}, #{username}, #{creator} + , #{userCode} + , #{status} + , #{skillTags, typeHandler=org.xyzh.common.jdbc.handler.StringArrayTypeHandler} + , #{maxConcurrent} + , #{currentWorkload} + , #{totalServed} + , #{avgResponseTime} + , #{satisfactionScore} + ) + + + + UPDATE workcase.tb_customer_service + + username = #{username}, + user_code = #{userCode}, + status = #{status}, + skill_tags = #{skillTags, typeHandler=org.xyzh.common.jdbc.handler.StringArrayTypeHandler}, + max_concurrent = #{maxConcurrent}, + current_workload = #{currentWorkload}, + total_served = #{totalServed}, + avg_response_time = #{avgResponseTime}, + satisfaction_score = #{satisfactionScore}, + update_time = now() + + WHERE user_id = #{userId} AND deleted = false + + + + UPDATE workcase.tb_customer_service + SET deleted = true, delete_time = now() + WHERE user_id = #{userId} AND deleted = false + + + + + + + + + + + diff --git a/urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingParticipantMapper.xml b/urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingParticipantMapper.xml new file mode 100644 index 00000000..bde42c66 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingParticipantMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + participant_id, optsn, meeting_id, user_id, user_type, user_name, join_time, leave_time, + duration_seconds, is_moderator, join_method, device_info, create_time, update_time + + + + INSERT INTO workcase.tb_meeting_participant ( + optsn, participant_id, meeting_id, user_id, user_type, user_name + , is_moderator + , join_method + , device_info + ) VALUES ( + #{optsn}, #{participantId}, #{meetingId}, #{userId}, #{userType}, #{userName} + , #{isModerator} + , #{joinMethod} + , #{deviceInfo} + ) + + + + UPDATE workcase.tb_meeting_participant + + leave_time = #{leaveTime}, + duration_seconds = #{durationSeconds}, + is_moderator = #{isModerator}, + device_info = #{deviceInfo}, + update_time = now() + + WHERE participant_id = #{participantId} + + + + DELETE FROM workcase.tb_meeting_participant + WHERE participant_id = #{participantId} + + + + + + + + + + + diff --git a/urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingTranscriptionMapper.xml b/urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingTranscriptionMapper.xml new file mode 100644 index 00000000..39c2516c --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/resources/mapper/TbMeetingTranscriptionMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transcription_id, optsn, meeting_id, speaker_id, speaker_name, speaker_type, + content, content_raw, language, confidence, speech_start_time, speech_end_time, duration_ms, + audio_url, segment_index, is_final, service_provider, create_time + + + + INSERT INTO workcase.tb_meeting_transcription ( + optsn, transcription_id, meeting_id, speaker_id, speaker_name, speaker_type, + content, speech_start_time, speech_end_time, duration_ms + , content_raw + , language + , confidence + , audio_url + , segment_index + , is_final + , service_provider + ) VALUES ( + #{optsn}, #{transcriptionId}, #{meetingId}, #{speakerId}, #{speakerName}, #{speakerType}, + #{content}, #{speechStartTime}, #{speechEndTime}, #{durationMs} + , #{contentRaw} + , #{language} + , #{confidence} + , #{audioUrl} + , #{segmentIndex} + , #{isFinal} + , #{serviceProvider} + ) + + + + UPDATE workcase.tb_meeting_transcription + + content = #{content}, + content_raw = #{contentRaw}, + confidence = #{confidence}, + is_final = #{isFinal}, + + WHERE transcription_id = #{transcriptionId} + + + + DELETE FROM workcase.tb_meeting_transcription + WHERE transcription_id = #{transcriptionId} + + + + + + + + + + + diff --git a/urbanLifelineServ/workcase/src/main/resources/mapper/TbVideoMeetingMapper.xml b/urbanLifelineServ/workcase/src/main/resources/mapper/TbVideoMeetingMapper.xml new file mode 100644 index 00000000..4861b0b8 --- /dev/null +++ b/urbanLifelineServ/workcase/src/main/resources/mapper/TbVideoMeetingMapper.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + 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 + , meeting_password + , jwt_token + , jitsi_server_url + , status + , max_participants + , iframe_url + , config + ) VALUES ( + #{optsn}, #{meetingId}, #{roomId}, #{workcaseId}, #{meetingName}, #{jitsiRoomName}, #{creatorId}, #{creatorType}, #{creatorName}, #{creator} + , #{meetingPassword} + , #{jwtToken} + , #{jitsiServerUrl} + , #{status} + , #{maxParticipants} + , #{iframeUrl} + , #{config, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler} + ) + + + + UPDATE workcase.tb_video_meeting + + meeting_name = #{meetingName}, + meeting_password = #{meetingPassword}, + jwt_token = #{jwtToken}, + status = #{status}, + participant_count = #{participantCount}, + start_time = #{actualStartTime}, + end_time = #{actualEndTime}, + duration_seconds = #{durationSeconds}, + iframe_url = #{iframeUrl}, + config = #{config, typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler}, + update_time = now() + + WHERE meeting_id = #{meetingId} AND deleted = false + + + + UPDATE workcase.tb_video_meeting + SET deleted = true, delete_time = now() + WHERE meeting_id = #{meetingId} AND deleted = false + + + + + + + + + + + diff --git a/urbanLifelineWeb/packages/shared/src/types/workcase/chatRoom.ts b/urbanLifelineWeb/packages/shared/src/types/workcase/chatRoom.ts index ac19fc7c..8c2bb92c 100644 --- a/urbanLifelineWeb/packages/shared/src/types/workcase/chatRoom.ts +++ b/urbanLifelineWeb/packages/shared/src/types/workcase/chatRoom.ts @@ -106,6 +106,44 @@ export interface TbMeetingParticipantDTO extends BaseDTO { deviceInfo?: string } +/** + * 会议转录记录表数据对象DTO + */ +export interface TbMeetingTranscriptionDTO extends BaseDTO { + /** 转录记录ID */ + transcriptionId?: string + /** 会议ID */ + meetingId?: string + /** 说话人ID */ + speakerId?: string + /** 说话人名称 */ + speakerName?: string + /** 说话人类型:guest-来客 agent-客服 */ + speakerType?: string + /** 转录文本内容 */ + content?: string + /** 原始转录结果 */ + contentRaw?: string + /** 语言 */ + language?: string + /** 识别置信度(0-1) */ + confidence?: number + /** 语音开始时间 */ + speechStartTime?: string + /** 语音结束时间 */ + speechEndTime?: string + /** 语音时长(毫秒) */ + durationMs?: number + /** 音频片段URL */ + audioUrl?: string + /** 片段序号 */ + segmentIndex?: number + /** 是否最终结果 */ + isFinal?: boolean + /** 服务提供商 */ + serviceProvider?: string +} + // ==================== VO ==================== /**