Helius
2021-05-27 a7a2cb8e71ff9694640bdcce9b78f5e1c612f93b
modify
1 files modified
6 ■■■■■ changed files
src/main/java/com/xcong/excoin/rabbit/consumer/ChatConsumer.java 6 ●●●●● patch | view | raw | blame | history
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);
    }