mirror of
https://github.com/chatopera/cosin.git
synced 2025-06-16 18:30:03 +08:00
parent
fe6ca09a21
commit
f595d6eeb9
@ -112,45 +112,37 @@ public class OnlineUserController extends Handler {
|
||||
MainContext.AgentUserStatusEnum.END.toString()));
|
||||
|
||||
AgentService agentService = agentServiceList.get(0);
|
||||
if (StringUtils.isNotBlank(agentservice)) {
|
||||
if (StringUtils.isNotEmpty(agentservice)) {
|
||||
for (AgentService as : agentServiceList) {
|
||||
if (as.getId().equals(agentservice)) {
|
||||
agentService = as;
|
||||
break;
|
||||
}
|
||||
}
|
||||
AgentService service = agentServiceRes.findById(agentservice).orElse(null);
|
||||
if (service != null) {
|
||||
map.addAttribute("tags", tagRes.findByTagtypeAndSkill(MainContext.ModelType.USER.toString(), service.getSkill()));
|
||||
}
|
||||
}
|
||||
|
||||
if (agentService != null) {
|
||||
List<AgentServiceSummary> summaries = serviceSummaryRes.findByAgentserviceid(
|
||||
agentService.getId());
|
||||
List<AgentServiceSummary> summaries = serviceSummaryRes.findByAgentserviceid(agentService.getId());
|
||||
if (summaries.size() > 0) {
|
||||
map.put("summary", summaries.get(0));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
agentUserContactsRes.findOneByUserid(
|
||||
userid).ifPresent(p -> {
|
||||
map.put("contacts", contactsRes.findById(p.getContactsid()).orElse(null));
|
||||
agentUserContactsRes.findOneByUserid(userid).ifPresent(p -> {
|
||||
if (p.getContactsid() != null) {
|
||||
map.put("contacts", contactsRes.findById(p.getContactsid()).orElse(null));
|
||||
}
|
||||
});
|
||||
AgentService service = agentServiceRes.findById(agentservice).orElse(null);
|
||||
if (service != null) {
|
||||
map.addAttribute(
|
||||
"tags", tagRes.findByTagtypeAndSkill(MainContext.ModelType.USER.toString(), service.getSkill()));
|
||||
}
|
||||
map.put(
|
||||
"summaryTags",
|
||||
tagRes.findByTagtype(MainContext.ModelType.SUMMARY.toString()));
|
||||
|
||||
map.put("summaryTags", tagRes.findByTagtype(MainContext.ModelType.SUMMARY.toString()));
|
||||
map.put("curAgentService", agentService);
|
||||
|
||||
|
||||
map.put(
|
||||
"agentUserMessageList",
|
||||
chatMessageRepository.findByAgentserviceid(agentService.getId(),
|
||||
PageRequest.of(
|
||||
0, 50, Direction.DESC,
|
||||
"updatetime")));
|
||||
map.put("agentUserMessageList", chatMessageRepository.findByAgentserviceid(agentService.getId(),
|
||||
PageRequest.of(0, 50, Direction.DESC, "updatetime")));
|
||||
}
|
||||
|
||||
if (MainContext.ChannelType.WEIXIN.toString().equals(channel)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user