Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
茶陵後
cskefu
提交
f69a974c
C
cskefu
项目概览
茶陵後
/
cskefu
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cskefu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f69a974c
编写于
6月 29, 2021
作者:
Y
Yu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#448 remove superadmin edit btn
上级
f2cf38f3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
9 deletion
+27
-9
contact-center/app/src/main/java/com/chatopera/cc/basic/Constants.java
...r/app/src/main/java/com/chatopera/cc/basic/Constants.java
+1
-1
contact-center/app/src/main/java/com/chatopera/cc/socketio/handler/AgentEventHandler.java
.../com/chatopera/cc/socketio/handler/AgentEventHandler.java
+18
-3
contact-center/app/src/main/resources/templates/admin/user/index.pug
...ter/app/src/main/resources/templates/admin/user/index.pug
+4
-3
contact-center/app/src/main/resources/templates/public/agentstatus.pug
...r/app/src/main/resources/templates/public/agentstatus.pug
+1
-1
contact-center/root/pom.xml
contact-center/root/pom.xml
+3
-1
未找到文件。
contact-center/app/src/main/java/com/chatopera/cc/basic/Constants.java
浏览文件 @
f69a974c
...
...
@@ -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
=
1
0
;
public
final
static
int
WEBIM_SOCKETIO_AGENT_OFFLINE_THRESHOLD
=
2
0
;
// 发送消息给访客: 接收来自路由的消息并判断渠道
public
final
static
String
INSTANT_MESSAGING_MQ_TOPIC_VISITOR
=
"cskefu.outbound.visitor"
;
...
...
contact-center/app/src/main/java/com/chatopera/cc/socketio/handler/AgentEventHandler.java
浏览文件 @
f69a974c
...
...
@@ -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
;
}
}
\ No newline at end of file
contact-center/app/src/main/resources/templates/admin/user/index.pug
浏览文件 @
f69a974c
...
...
@@ -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") ဆ
...
...
contact-center/app/src/main/resources/templates/public/agentstatus.pug
浏览文件 @
f69a974c
...
...
@@ -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
== 'not
ready'
'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;")
...
...
contact-center/root/pom.xml
浏览文件 @
f69a974c
...
...
@@ -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>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录