|
|
@@ -3,6 +3,7 @@ package com.izouma.nineth.service.netease;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.izouma.nineth.config.RedisKeys;
|
|
|
+import com.izouma.nineth.domain.netease.NeteaseMessage;
|
|
|
import com.izouma.nineth.domain.netease.Team;
|
|
|
import com.izouma.nineth.dto.PageQuery;
|
|
|
import com.izouma.nineth.exception.BusinessException;
|
|
|
@@ -52,6 +53,7 @@ public class TeamService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ team.setLastMsg(getTeamLastMessage(team.getTid()));
|
|
|
team.setUnread(getUnreadCount(userId.toString(), team.getTid().toString()));
|
|
|
team.setInTeam(inTeam);
|
|
|
newContent.add(team);
|
|
|
@@ -119,4 +121,8 @@ public class TeamService {
|
|
|
}
|
|
|
return unreadCount;
|
|
|
}
|
|
|
+
|
|
|
+ public NeteaseMessage getTeamLastMessage(Long tid) {
|
|
|
+ return neteaseMessageRepo.findFirstByToIdAndOpeOrderByCreatedAtDesc(tid.toString(), 1);
|
|
|
+ }
|
|
|
}
|