mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-24 08:31:45 +08:00
#448 remove superadmin edit btn
This commit is contained in:
parent
f2cf38f3cc
commit
f69a974c23
@ -116,7 +116,7 @@ public class Constants {
|
||||
// 黑名单
|
||||
public final static String WEBIM_SOCKETIO_ONLINE_USER_BLACKLIST = "cskefu.im.onlineuser.blacklist";
|
||||
// 坐席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";
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
package com.chatopera.cc.socketio.handler;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chatopera.cc.acd.ACDAgentService;
|
||||
import com.chatopera.cc.activemq.BrokerPublisher;
|
||||
import com.chatopera.cc.basic.Constants;
|
||||
import com.chatopera.cc.basic.MainContext;
|
||||
@ -65,6 +66,7 @@ public class AgentEventHandler {
|
||||
private static AgentProxy agentProxy;
|
||||
private static AgentSessionProxy agentSessionProxy;
|
||||
private static UserProxy userProxy;
|
||||
private static ACDAgentService acdAgentService;
|
||||
|
||||
@OnConnect
|
||||
public void onConnect(SocketIOClient client) {
|
||||
@ -109,9 +111,14 @@ public class AgentEventHandler {
|
||||
|
||||
workSessionRepository.save(
|
||||
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);
|
||||
|
||||
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 {
|
||||
payload.put("orgi", orgi);
|
||||
payload.put("isAdmin", StringUtils.isNotBlank(admin) && admin.equalsIgnoreCase("true"));
|
||||
getBrokerPublisher().send(Constants.WEBIM_SOCKETIO_AGENT_DISCONNECT, payload.toJSONString(),
|
||||
false,
|
||||
Constants.WEBIM_SOCKETIO_AGENT_OFFLINE_THRESHOLD);
|
||||
false,
|
||||
Constants.WEBIM_SOCKETIO_AGENT_OFFLINE_THRESHOLD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -377,4 +384,12 @@ public class AgentEventHandler {
|
||||
}
|
||||
return userProxy;
|
||||
}
|
||||
|
||||
public static ACDAgentService getACDAgentService() {
|
||||
if (acdAgentService == null) {
|
||||
acdAgentService = MainContext.getContext().getBean(ACDAgentService.class);
|
||||
}
|
||||
return acdAgentService;
|
||||
}
|
||||
|
||||
}
|
@ -70,9 +70,10 @@ block content
|
||||
else
|
||||
i.layui-icon(style="color:#19a55d") ဆ
|
||||
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="编辑用户信息")
|
||||
i.layui-icon 
|
||||
| 编辑
|
||||
if !user.superadmin && user.datastatus != true
|
||||
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
|
||||
a(href='/admin/user/delete.html?id=' + user.id, style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除记录?")
|
||||
i.layui-icon(style="color:red") ဆ
|
||||
|
@ -2,7 +2,7 @@
|
||||
| 服务中的人数:#{agentStatusReport.users}人,当前排队人数:#{agentStatusReport.inquene}人,在线坐席数:#{agentStatusReport.agents}人,坐席忙:#{agentStatusReport.busy}人
|
||||
#agentstatus.layui-unselect.layui-form-switch.checkStatus.lay-filter(class={
|
||||
'layui-form-onswitch': agentStatus.status == 'ready',
|
||||
'layui-form-offswitch': agentStatus.status == 'notready'
|
||||
'layui-form-offswitch': agentStatus.status != 'ready'
|
||||
})
|
||||
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;")
|
||||
|
@ -55,10 +55,12 @@
|
||||
</dependency>
|
||||
|
||||
<!-- pugjs, template engine surpass freemarker https://pugjs.org/ -->
|
||||
<!-- host with Chatopera Nexus -->
|
||||
<!-- https://gitlab.chatopera.com/cskefu/spring-pug4j -->
|
||||
<dependency>
|
||||
<groupId>de.neuland-bfi</groupId>
|
||||
<artifactId>spring-pug4j</artifactId>
|
||||
<version>2.0.0-alpha-2</version>
|
||||
<version>2.0.0-alpha-4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
Loading…
x
Reference in New Issue
Block a user