提交 f69a974c 编写于 作者: Y Yu

#448 remove superadmin edit btn

上级 f2cf38f3
...@@ -116,7 +116,7 @@ public class Constants { ...@@ -116,7 +116,7 @@ public class Constants {
// 黑名单 // 黑名单
public final static String WEBIM_SOCKETIO_ONLINE_USER_BLACKLIST = "cskefu.im.onlineuser.blacklist"; public final static String WEBIM_SOCKETIO_ONLINE_USER_BLACKLIST = "cskefu.im.onlineuser.blacklist";
// 坐席socketio断开到判定为离线的时长 // 坐席socketio断开到判定为离线的时长
public final static int WEBIM_SOCKETIO_AGENT_OFFLINE_THRESHOLD = 10; public final static int WEBIM_SOCKETIO_AGENT_OFFLINE_THRESHOLD = 20;
// 发送消息给访客: 接收来自路由的消息并判断渠道 // 发送消息给访客: 接收来自路由的消息并判断渠道
public final static String INSTANT_MESSAGING_MQ_TOPIC_VISITOR = "cskefu.outbound.visitor"; public final static String INSTANT_MESSAGING_MQ_TOPIC_VISITOR = "cskefu.outbound.visitor";
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.chatopera.cc.socketio.handler; package com.chatopera.cc.socketio.handler;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.chatopera.cc.acd.ACDAgentService;
import com.chatopera.cc.activemq.BrokerPublisher; import com.chatopera.cc.activemq.BrokerPublisher;
import com.chatopera.cc.basic.Constants; import com.chatopera.cc.basic.Constants;
import com.chatopera.cc.basic.MainContext; import com.chatopera.cc.basic.MainContext;
...@@ -65,6 +66,7 @@ public class AgentEventHandler { ...@@ -65,6 +66,7 @@ public class AgentEventHandler {
private static AgentProxy agentProxy; private static AgentProxy agentProxy;
private static AgentSessionProxy agentSessionProxy; private static AgentSessionProxy agentSessionProxy;
private static UserProxy userProxy; private static UserProxy userProxy;
private static ACDAgentService acdAgentService;
@OnConnect @OnConnect
public void onConnect(SocketIOClient client) { public void onConnect(SocketIOClient client) {
...@@ -109,9 +111,14 @@ public class AgentEventHandler { ...@@ -109,9 +111,14 @@ public class AgentEventHandler {
workSessionRepository.save( workSessionRepository.save(
MainUtils.createWorkSession(userid, MainUtils.getContextID(client.getSessionId().toString()), MainUtils.createWorkSession(userid, MainUtils.getContextID(client.getSessionId().toString()),
session, orgi, ip, address.getHostName(), admin, count == 0)); session, orgi, ip, address.getHostName(), admin, count == 0));
NettyClients.getInstance().putAgentEventClient(userid, client); NettyClients.getInstance().putAgentEventClient(userid, client);
final AgentStatus agentStatus = MainContext.getCache().findOneAgentStatusByAgentnoAndOrig(userid, orgi);
if (agentStatus != null && agentStatus.isConnected() && StringUtils.equals(agentStatus.getStatus(), MainContext.AgentStatusEnum.READY.toString())) {
getACDAgentService().assignVisitors(userid, orgi);
}
} }
} }
...@@ -151,8 +158,8 @@ public class AgentEventHandler { ...@@ -151,8 +158,8 @@ public class AgentEventHandler {
payload.put("orgi", orgi); payload.put("orgi", orgi);
payload.put("isAdmin", StringUtils.isNotBlank(admin) && admin.equalsIgnoreCase("true")); payload.put("isAdmin", StringUtils.isNotBlank(admin) && admin.equalsIgnoreCase("true"));
getBrokerPublisher().send(Constants.WEBIM_SOCKETIO_AGENT_DISCONNECT, payload.toJSONString(), getBrokerPublisher().send(Constants.WEBIM_SOCKETIO_AGENT_DISCONNECT, payload.toJSONString(),
false, false,
Constants.WEBIM_SOCKETIO_AGENT_OFFLINE_THRESHOLD); Constants.WEBIM_SOCKETIO_AGENT_OFFLINE_THRESHOLD);
} }
} }
...@@ -377,4 +384,12 @@ public class AgentEventHandler { ...@@ -377,4 +384,12 @@ public class AgentEventHandler {
} }
return userProxy; return userProxy;
} }
public static ACDAgentService getACDAgentService() {
if (acdAgentService == null) {
acdAgentService = MainContext.getContext().getBean(ACDAgentService.class);
}
return acdAgentService;
}
} }
\ No newline at end of file
...@@ -70,9 +70,10 @@ block content ...@@ -70,9 +70,10 @@ block content
else else
i.layui-icon(style="color:#19a55d") ဆ i.layui-icon(style="color:#19a55d") ဆ
td(style="white-space:nowrap;" nowrap="nowrap") td(style="white-space:nowrap;" nowrap="nowrap")
a(href='/admin/user/edit.html?id=' + user.id, data-toggle="ajax" data-width="750" data-height="540" data-title="编辑用户信息") if !user.superadmin && user.datastatus != true
i.layui-icon  a(href='/admin/user/edit.html?id=' + user.id, data-toggle="ajax" data-width="750" data-height="540" data-title="编辑用户信息")
| 编辑 i.layui-icon 
| 编辑
if !user.admin && user.datastatus != true if !user.admin && user.datastatus != true
a(href='/admin/user/delete.html?id=' + user.id, style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除记录?") a(href='/admin/user/delete.html?id=' + user.id, style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除记录?")
i.layui-icon(style="color:red") ဆ i.layui-icon(style="color:red") ဆ
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
| 服务中的人数:#{agentStatusReport.users}人,当前排队人数:#{agentStatusReport.inquene}人,在线坐席数:#{agentStatusReport.agents}人,坐席忙:#{agentStatusReport.busy}人 | 服务中的人数:#{agentStatusReport.users}人,当前排队人数:#{agentStatusReport.inquene}人,在线坐席数:#{agentStatusReport.agents}人,坐席忙:#{agentStatusReport.busy}人
#agentstatus.layui-unselect.layui-form-switch.checkStatus.lay-filter(class={ #agentstatus.layui-unselect.layui-form-switch.checkStatus.lay-filter(class={
'layui-form-onswitch': agentStatus.status == 'ready', 'layui-form-onswitch': agentStatus.status == 'ready',
'layui-form-offswitch': agentStatus.status == 'notready' 'layui-form-offswitch': agentStatus.status != 'ready'
}) })
i.checkStatusI i.checkStatusI
a.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="首页" data-href="/apps/content.html" data-id="maincontent" data-type="tabChange" style="display: none;") a.iframe_btn(href="javascript:void(0)" onclick="return false;" data-title="首页" data-href="/apps/content.html" data-id="maincontent" data-type="tabChange" style="display: none;")
......
...@@ -55,10 +55,12 @@ ...@@ -55,10 +55,12 @@
</dependency> </dependency>
<!-- pugjs, template engine surpass freemarker https://pugjs.org/ --> <!-- pugjs, template engine surpass freemarker https://pugjs.org/ -->
<!-- host with Chatopera Nexus -->
<!-- https://gitlab.chatopera.com/cskefu/spring-pug4j -->
<dependency> <dependency>
<groupId>de.neuland-bfi</groupId> <groupId>de.neuland-bfi</groupId>
<artifactId>spring-pug4j</artifactId> <artifactId>spring-pug4j</artifactId>
<version>2.0.0-alpha-2</version> <version>2.0.0-alpha-4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册