...
|
...
|
@@ -227,9 +227,9 @@ public class InBoxServiceImpl implements IInBoxService { |
|
|
}
|
|
|
|
|
|
private void setInboxByRedis(ListInboxReqVO reqVO, List<InBox> inBoxes, int total) {
|
|
|
RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_LIST.generateKey(reqVO.getUid());
|
|
|
RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_VO_LIST.generateKey(reqVO.getUid());
|
|
|
redisTemplate.put(inboxKey, CacheKeyHelper.getInboxRedisHashKey(reqVO.getType(),reqVO.getPage(),reqVO.getLimit()),
|
|
|
inBoxes,CacheEnum.USERS_INBOX_LIST.getCacheTime());
|
|
|
inBoxes,CacheEnum.USERS_INBOX_VO_LIST.getCacheTime());
|
|
|
RedisKeyBuilder inboxTotalKey = CacheEnum.USERS_INBOX_LIST_TOTAL.generateKey(reqVO.getUid(),reqVO.getType() == null ?"N":reqVO.getType());
|
|
|
redisTemplate.setEx(inboxTotalKey,total,CacheEnum.USERS_INBOX_LIST_TOTAL.getCacheTime());
|
|
|
}
|
...
|
...
|
@@ -245,7 +245,7 @@ public class InBoxServiceImpl implements IInBoxService { |
|
|
|
|
|
private PageResponseVO<InBoxVO> listInboxByRedis(ListInboxReqVO reqVO) {
|
|
|
PageResponseVO<InBoxVO> response = new PageResponseVO<>();
|
|
|
RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_LIST.generateKey(reqVO.getUid());
|
|
|
RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_VO_LIST.generateKey(reqVO.getUid());
|
|
|
List<InBoxVO> inboxes = redisTemplate.getList(inboxKey, CacheKeyHelper.getInboxRedisHashKey(reqVO.getType(),reqVO.getPage(),reqVO.getLimit()),InBoxVO.class);
|
|
|
RedisKeyBuilder inboxTotalKey = CacheEnum.USERS_INBOX_LIST_TOTAL.generateKey(reqVO.getUid(),reqVO.getType() == null ?"N":reqVO.getType());
|
|
|
Integer total = redisTemplate.get(inboxTotalKey,Integer.class);
|
...
|
...
|
@@ -327,7 +327,7 @@ public class InBoxServiceImpl implements IInBoxService { |
|
|
|
|
|
private void deleteIboxsByRedis(int uid,int type){
|
|
|
log.info("deleteIboxsByRedis params uid is {} type is {}",uid,type);
|
|
|
RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_LIST.generateKey(uid);
|
|
|
RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_VO_LIST.generateKey(uid);
|
|
|
redisTemplate.delete(inboxKey);
|
|
|
RedisKeyBuilder key = CacheEnum.USERS_INBOX_TYPE_UNREADCOUNT.generateKey(uid,type);
|
|
|
redisTemplate.delete(key);
|
...
|
...
|
|