From 83394a8f35f7aa21ae7a470b48d6e72432a147c8 Mon Sep 17 00:00:00 2001 From: zhongzb <972627721@qq.com> Date: Mon, 16 Oct 2023 21:07:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/common/event/listener/MessageMarkListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mallchat-chat-server/src/main/java/com/abin/mallchat/common/common/event/listener/MessageMarkListener.java b/mallchat-chat-server/src/main/java/com/abin/mallchat/common/common/event/listener/MessageMarkListener.java index 8e9e8db1..21896d0d 100644 --- a/mallchat-chat-server/src/main/java/com/abin/mallchat/common/common/event/listener/MessageMarkListener.java +++ b/mallchat-chat-server/src/main/java/com/abin/mallchat/common/common/event/listener/MessageMarkListener.java @@ -10,8 +10,8 @@ import com.abin.mallchat.common.common.event.MessageMarkEvent; import com.abin.mallchat.common.user.domain.enums.ItemEnum; import com.abin.mallchat.common.user.service.IUserBackpackService; -import com.abin.mallchat.common.user.service.WebSocketService; import com.abin.mallchat.common.user.service.adapter.WSAdapter; +import com.abin.mallchat.common.user.service.impl.PushService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; @@ -35,7 +35,7 @@ public class MessageMarkListener { @Autowired private IUserBackpackService iUserBackpackService; @Autowired - private WebSocketService webSocketService; + private PushService pushService; @Async @TransactionalEventListener(classes = MessageMarkEvent.class, fallbackExecution = true) @@ -61,7 +61,7 @@ public void changeMsgType(MessageMarkEvent event) { public void notifyAll(MessageMarkEvent event) {//后续可做合并查询,目前异步影响不大 ChatMessageMarkDTO dto = event.getDto(); Integer markCount = messageMarkDao.getMarkCount(dto.getMsgId(), dto.getMarkType()); - webSocketService.sendToAllOnline(WSAdapter.buildMsgMarkSend(dto, markCount), dto.getUid()); + pushService.sendPushMsg(WSAdapter.buildMsgMarkSend(dto, markCount)); } }