From b5528bfc15e2765bfeba0537656bb46669d209f4 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 9 Jul 2024 15:21:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?MALL-KEFU:=20=E5=8F=91=E9=80=81=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=80=9A=E7=9F=A5=E6=89=80=E6=9C=89=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E6=9B=B4=E6=96=B0=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/service/kefu/KeFuMessageServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java index 125628347..b47cd9004 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java @@ -66,8 +66,10 @@ public class KeFuMessageServiceImpl implements KeFuMessageService { // 2.2 更新会话消息冗余 conversationService.updateConversationLastMessage(kefuMessage); - // 3. 发送消息 + // 3.1 发送消息给会员 getSelf().sendAsyncMessageToMember(conversation.getUserId(), KEFU_MESSAGE_TYPE, kefuMessage); + // 3.2 通知所有管理员更新对话 + getSelf().sendAsyncMessageToAdmin(KEFU_MESSAGE_TYPE, kefuMessage); return kefuMessage.getId(); } @@ -82,7 +84,7 @@ public class KeFuMessageServiceImpl implements KeFuMessageService { // 2. 更新会话消息冗余 conversationService.updateConversationLastMessage(kefuMessage); - // 3. 发送消息 + // 3. 通知所有管理员更新对话 getSelf().sendAsyncMessageToAdmin(KEFU_MESSAGE_TYPE, kefuMessage); return kefuMessage.getId(); } From ebfcec4cfe3565ba5b8ab4f84562d695d2e5b06f Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 9 Jul 2024 17:32:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?MALL-KEFU:=20=E8=81=8A=E5=A4=A9=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=AD=97=E6=AE=B5=E9=95=BF=E5=BA=A6=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/mall-promotion-kefu.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/mysql/mall-promotion-kefu.sql b/sql/mysql/mall-promotion-kefu.sql index 67054cbb1..83742e4a8 100644 --- a/sql/mysql/mall-promotion-kefu.sql +++ b/sql/mysql/mall-promotion-kefu.sql @@ -3,7 +3,7 @@ CREATE TABLE `promotion_kefu_conversation` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', `user_id` bigint NOT NULL COMMENT '会话所属用户', `last_message_time` datetime NOT NULL COMMENT '最后聊天时间', - `last_message_content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '最后聊天内容', + `last_message_content` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '最后聊天内容', `last_message_content_type` int NOT NULL COMMENT '最后发送的消息类型', `admin_pinned` bit(1) NOT NULL DEFAULT b'0' COMMENT '管理端置顶', `user_deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '用户是否可见', @@ -27,7 +27,7 @@ CREATE TABLE `promotion_kefu_message` ( `receiver_id` bigint DEFAULT NULL COMMENT '接收人编号', `receiver_type` int DEFAULT NULL COMMENT '接收人类型', `content_type` int NOT NULL COMMENT '消息类型', - `content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消息', + `content` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消息', `read_status` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已读', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',