From 4385b06801ad4c50bf4fc58bee992ef9de9fb260 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 27 May 2021 18:34:25 +0800
Subject: [PATCH] Merge branch 'otc' of http://120.27.238.55:7000/r/exchange into otc
---
src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java | 2 +-
src/main/java/com/xcong/excoin/rabbit/consumer/ChatConsumer.java | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java b/src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java
index 9cbe9cf..b2788cb 100644
--- a/src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java
+++ b/src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java
@@ -83,7 +83,7 @@
if (targetChannel != null) {
chat.setIsSelf(2);
ResponseBean toRes = ResponseBean.ok(chat);
- res.setType(2);
+ toRes.setType(2);
targetChannel.writeAndFlush(NettyTools.webSocketJson(toRes));
} else {
// 在redis中保存用户未在线时,给该用户发送的消息条数
diff --git a/src/main/java/com/xcong/excoin/rabbit/consumer/ChatConsumer.java b/src/main/java/com/xcong/excoin/rabbit/consumer/ChatConsumer.java
index 0507e7b..2305fb6 100644
--- a/src/main/java/com/xcong/excoin/rabbit/consumer/ChatConsumer.java
+++ b/src/main/java/com/xcong/excoin/rabbit/consumer/ChatConsumer.java
@@ -6,6 +6,7 @@
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.common.contants.AppContants;
import com.xcong.excoin.configurations.RabbitMqConfig;
+import com.xcong.excoin.modules.member.dao.MemberSettingDao;
import com.xcong.excoin.modules.otc.dao.OtcMsgHistoryDao;
import com.xcong.excoin.modules.otc.dao.OtcMsgUserListDao;
import com.xcong.excoin.modules.otc.entity.OtcMsgHistoryEntity;
@@ -34,6 +35,9 @@
@Autowired
private RedisUtils redisUtils;
+
+ @Autowired
+ private MemberSettingDao memberSettingDao;
@RabbitListener(queues = RabbitMqConfig.QUEUE_MSG_HISTORY)
@Transactional(rollbackFor = Exception.class)
@@ -91,6 +95,8 @@
fromHistory.setIsSelf(OtcMsgHistoryEntity.ISSELF_ONE);
fromHistory.setMemberId(fromId);
+ memberSettingDao.updateMessageReminderByMemberId(toId);
+
otcMsgHistoryDao.insert(fromHistory);
otcMsgHistoryDao.insert(toHistory);
}
--
Gitblit v1.9.1