Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_54624550
cskefu
提交
25d67d6f
C
cskefu
项目概览
weixin_54624550
/
cskefu
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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 搜索 >>
提交
25d67d6f
编写于
8月 25, 2020
作者:
Chatopera 研发团队
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Closed
https://github.com/chatopera/cosin/issues/340
fix agent not show up in skill group
上级
0b9dbec7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
40 deletion
+37
-40
contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java
...n/java/com/chatopera/cc/controller/apps/IMController.java
+1
-1
contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/StatsController.java
...chatopera/cc/controller/apps/service/StatsController.java
+2
-2
contact-center/app/src/main/java/com/chatopera/cc/proxy/OnlineUserProxy.java
...src/main/java/com/chatopera/cc/proxy/OnlineUserProxy.java
+33
-36
contact-center/app/src/main/resources/templates/apps/im/point.html
...enter/app/src/main/resources/templates/apps/im/point.html
+1
-1
未找到文件。
contact-center/app/src/main/java/com/chatopera/cc/controller/apps/IMController.java
浏览文件 @
25d67d6f
...
...
@@ -281,7 +281,7 @@ public class IMController extends Handler {
/**
* 查询坐席 , 缓存?
*/
view
.
addObject
(
"agentList"
,
OnlineUserProxy
.
agents
(
MainContext
.
SYSTEM_ORGI
,
true
));
view
.
addObject
(
"agentList"
,
OnlineUserProxy
.
agents
(
MainContext
.
SYSTEM_ORGI
));
}
view
.
addObject
(
"traceid"
,
userHistory
.
getId
());
...
...
contact-center/app/src/main/java/com/chatopera/cc/controller/apps/service/StatsController.java
浏览文件 @
25d67d6f
...
...
@@ -100,7 +100,7 @@ public class StatsController extends Handler {
/**
* 查询坐席 , 缓存?
*/
map
.
addAttribute
(
"agentList"
,
OnlineUserProxy
.
agents
(
super
.
getOrgi
(
request
)
,
true
));
map
.
addAttribute
(
"agentList"
,
OnlineUserProxy
.
agents
(
super
.
getOrgi
(
request
)));
return
request
(
super
.
createAppsTempletResponse
(
"/apps/service/stats/coment"
));
}
...
...
@@ -154,7 +154,7 @@ public class StatsController extends Handler {
/**
* 查询坐席 , 缓存?
*/
map
.
addAttribute
(
"agentList"
,
OnlineUserProxy
.
agents
(
super
.
getOrgi
(
request
)
,
true
));
map
.
addAttribute
(
"agentList"
,
OnlineUserProxy
.
agents
(
super
.
getOrgi
(
request
)));
return
request
(
super
.
createAppsTempletResponse
(
"/apps/service/stats/consult"
));
}
...
...
contact-center/app/src/main/java/com/chatopera/cc/proxy/OnlineUserProxy.java
浏览文件 @
25d67d6f
...
...
@@ -63,6 +63,7 @@ public class OnlineUserProxy {
private
static
AgentUserContactsRepository
agentUserContactsRes
;
private
static
ContactsRepository
contactsRes
;
private
static
UserProxy
userProxy
;
private
static
OrganRepository
organRes
;
/**
* @param id
...
...
@@ -325,47 +326,36 @@ public class OnlineUserProxy {
/**
* @param orgi
* @param isJudgeShare
* @param orgi 一个坐席可以添加到多个组织,原租户共享功能废弃
* @return
*/
@SuppressWarnings
(
"unchecked"
)
public
static
List
<
User
>
agents
(
String
orgi
,
boolean
isJudgeShare
)
{
public
static
List
<
User
>
agents
(
String
orgi
)
{
String
origOrig
=
orgi
;
boolean
isShare
=
false
;
if
(
isJudgeShare
)
{
SystemConfig
systemConfig
=
MainUtils
.
getSystemConfig
();
if
(
systemConfig
!=
null
&&
systemConfig
.
isEnabletneant
()
&&
systemConfig
.
isTenantshare
())
{
orgi
=
MainContext
.
SYSTEM_ORGI
;
isShare
=
true
;
}
}
List
<
User
>
agentList
=
getCache
().
findOneSystemByIdAndOrgi
(
Constants
.
CACHE_AGENT
+
origOrig
,
origOrig
);
List
<
User
>
agentTempList
=
null
;
if
(
agentList
==
null
)
{
agentList
=
getUserRes
().
findByOrgiAndAgentAndDatastatus
(
orgi
,
true
,
false
);
agentTempList
=
new
ArrayList
<
User
>();
// 共享的话 查出绑定的组织
if
(
isShare
)
{
List
<
OrgiSkillRel
>
orgiSkillRelList
=
getOrgiSkillRelRes
().
findByOrgi
(
origOrig
);
if
(!
orgiSkillRelList
.
isEmpty
())
{
for
(
User
user
:
agentList
)
{
// TODO 此处的查询处理比较多,应使用缓存
// 一个用户可隶属于多个组织
getUserProxy
().
attachOrgansPropertiesForUser
(
user
);
for
(
OrgiSkillRel
rel
:
orgiSkillRelList
)
{
if
(
user
.
getOrgans
().
size
()
>
0
&&
user
.
inAffiliates
(
rel
.
getSkillid
()))
{
agentTempList
.
add
(
user
);
}
}
List
<
User
>
agentList
=
getUserRes
().
findByOrgiAndAgentAndDatastatus
(
orgi
,
true
,
false
);
List
<
User
>
agentTempList
=
new
ArrayList
<
User
>();
List
<
Organ
>
skillOrgansByOrgi
=
getOrganRes
().
findByOrgiAndSkill
(
origOrig
,
true
);
if
(!
skillOrgansByOrgi
.
isEmpty
())
{
for
(
User
user
:
agentList
)
{
// 跳过管理员角色用户,不显示在技能组列表
if
(
user
.
isAdmin
()
||
user
.
isSuperadmin
())
continue
;
// 只显示在线的客服,跳过离线的客服
if
(
getCache
().
findOneAgentStatusByAgentnoAndOrig
(
user
.
getId
(),
origOrig
)
==
null
)
continue
;
// 一个用户可隶属于多个组织
getUserProxy
().
attachOrgansPropertiesForUser
(
user
);
for
(
Organ
organ
:
skillOrgansByOrgi
)
{
if
(
user
.
getOrgans
().
size
()
>
0
&&
user
.
inAffiliates
(
organ
.
getId
()))
{
agentTempList
.
add
(
user
);
}
}
agentList
=
agentTempList
;
}
if
(
agentList
.
size
()
>
0
)
{
getCache
().
putSystemListByIdAndOrgi
(
Constants
.
CACHE_AGENT
+
origOrig
,
origOrig
,
agentList
);
}
}
agentList
=
agentTempList
;
return
agentList
;
}
...
...
@@ -508,7 +498,7 @@ public class OnlineUserProxy {
onlineUser
.
setOlduser
(
"1"
);
}
onlineUser
.
setMobile
(
MobileDevice
.
isMobile
(
request
.
getHeader
(
"User-Agent"
))
?
"1"
:
"0"
);
.
getHeader
(
"User-Agent"
))
?
"1"
:
"0"
);
// onlineUser.setSource(user.getId());
...
...
@@ -546,10 +536,10 @@ public class OnlineUserProxy {
onlineUser
.
setCity
(
ipdata
.
getCity
());
onlineUser
.
setIsp
(
ipdata
.
getIsp
());
onlineUser
.
setRegion
(
ipdata
.
toString
()
+
"("
+
ip
+
")"
);
+
ip
+
")"
);
onlineUser
.
setDatestr
(
new
SimpleDateFormat
(
"yyyMMdd"
)
.
format
(
now
));
.
format
(
now
));
onlineUser
.
setHostname
(
ip
);
onlineUser
.
setSessionid
(
sessionid
);
...
...
@@ -1030,6 +1020,13 @@ public class OnlineUserProxy {
return
userRes
;
}
private
static
OrganRepository
getOrganRes
()
{
if
(
organRes
==
null
)
{
organRes
=
MainContext
.
getContext
().
getBean
(
OrganRepository
.
class
);
}
return
organRes
;
}
private
static
OrgiSkillRelRepository
getOrgiSkillRelRes
()
{
if
(
orgiSkillRelRes
==
null
)
{
orgiSkillRelRes
=
MainContext
.
getContext
().
getBean
(
OrgiSkillRelRepository
.
class
);
...
...
contact-center/app/src/main/resources/templates/apps/im/point.html
浏览文件 @
25d67d6f
...
...
@@ -268,7 +268,7 @@ var cskefu = {
<
#if
inviteData.consult_skill_numbers =
=
0
||
skill_index
lt
inviteData.consult_skill_numbers
>
<
#assign
skillNum =
0
>
<
#list
agentList
as
agent
>
<
#if
agent.
organ
??
&&
agent.organ =
=
skill.id
>
<
#if
agent.
skills
??
&&
agent.skills
[
skill.id
]??
>
<
#assign
skillNum =
skillNum+1
>
</
#
if>
</
#
list>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录