增加小程序前台显示租户发送的未读消息,
This commit is contained in:
parent
80c41b4662
commit
7731bcd6cb
@ -68,7 +68,7 @@ public interface XhpcMessageBoardService {
|
||||
QueryUserListResponse queryUserList(QueryUserListRequest param) throws Exception;
|
||||
|
||||
/**
|
||||
* 平台查询用户发送过来的信息,与用户查看它自己的信息一致
|
||||
* 平台查询用户发送过来的信息,与用户查看它自己的信息逻辑是一致的
|
||||
*
|
||||
* @param userQueryCondition 要查询的用户的信息
|
||||
* @return 返回用户与平台用户的一个月的聊天记录
|
||||
|
||||
@ -154,7 +154,15 @@ public class XhpcMessageBoardServiceImpl implements XhpcMessageBoardService {
|
||||
platformRequest.setTenantId(sysUser.getTenantId());
|
||||
platformRequest.setTenantType(0);
|
||||
messageBoardMapper.insertPlatformMessage(platformRequest);
|
||||
|
||||
//往Redis中放置用户未读数量
|
||||
String userNotReadCount = "userNotReadMessageCount:" + platformRequest.getSenderType() + ":" + platformRequest.getSenderAccount() + ":" + "0:" + sysUser.getTenantId();
|
||||
Object cacheObject1 = redisService.getCacheObject(userNotReadCount);
|
||||
if (cacheObject1 == null) {
|
||||
redisService.setCacheObject(userNotReadCount, 1);
|
||||
} else {
|
||||
Integer userNotReadNum = (Integer) cacheObject1 + 1;
|
||||
redisService.setCacheObject(userNotReadCount, userNotReadNum);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user