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()));
|
MainContext.AgentUserStatusEnum.END.toString()));
|
||||||
|
|
||||||
AgentService agentService = agentServiceList.get(0);
|
AgentService agentService = agentServiceList.get(0);
|
||||||
if (StringUtils.isNotBlank(agentservice)) {
|
if (StringUtils.isNotEmpty(agentservice)) {
|
||||||
for (AgentService as : agentServiceList) {
|
for (AgentService as : agentServiceList) {
|
||||||
if (as.getId().equals(agentservice)) {
|
if (as.getId().equals(agentservice)) {
|
||||||
agentService = as;
|
agentService = as;
|
||||||
break;
|
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) {
|
if (agentService != null) {
|
||||||
List<AgentServiceSummary> summaries = serviceSummaryRes.findByAgentserviceid(
|
List<AgentServiceSummary> summaries = serviceSummaryRes.findByAgentserviceid(agentService.getId());
|
||||||
agentService.getId());
|
|
||||||
if (summaries.size() > 0) {
|
if (summaries.size() > 0) {
|
||||||
map.put("summary", summaries.get(0));
|
map.put("summary", summaries.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
agentUserContactsRes.findOneByUserid(
|
agentUserContactsRes.findOneByUserid(userid).ifPresent(p -> {
|
||||||
userid).ifPresent(p -> {
|
if (p.getContactsid() != null) {
|
||||||
map.put("contacts", contactsRes.findById(p.getContactsid()).orElse(null));
|
map.put("contacts", contactsRes.findById(p.getContactsid()).orElse(null));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
AgentService service = agentServiceRes.findById(agentservice).orElse(null);
|
|
||||||
if (service != null) {
|
map.put("summaryTags", tagRes.findByTagtype(MainContext.ModelType.SUMMARY.toString()));
|
||||||
map.addAttribute(
|
|
||||||
"tags", tagRes.findByTagtypeAndSkill(MainContext.ModelType.USER.toString(), service.getSkill()));
|
|
||||||
}
|
|
||||||
map.put(
|
|
||||||
"summaryTags",
|
|
||||||
tagRes.findByTagtype(MainContext.ModelType.SUMMARY.toString()));
|
|
||||||
map.put("curAgentService", agentService);
|
map.put("curAgentService", agentService);
|
||||||
|
|
||||||
|
map.put("agentUserMessageList", chatMessageRepository.findByAgentserviceid(agentService.getId(),
|
||||||
map.put(
|
PageRequest.of(0, 50, Direction.DESC, "updatetime")));
|
||||||
"agentUserMessageList",
|
|
||||||
chatMessageRepository.findByAgentserviceid(agentService.getId(),
|
|
||||||
PageRequest.of(
|
|
||||||
0, 50, Direction.DESC,
|
|
||||||
"updatetime")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MainContext.ChannelType.WEIXIN.toString().equals(channel)) {
|
if (MainContext.ChannelType.WEIXIN.toString().equals(channel)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user