Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
pxw_boy
cskefu
提交
c0a0f54d
C
cskefu
项目概览
pxw_boy
/
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 搜索 >>
提交
c0a0f54d
编写于
5月 19, 2020
作者:
Chatopera 研发团队
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
https://github.com/chatopera/cosin/issues/329
enable baidu tongji
上级
9292e8ef
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
62 addition
and
14 deletion
+62
-14
contact-center/app/src/main/java/com/chatopera/cc/controller/ApplicationController.java
...va/com/chatopera/cc/controller/ApplicationController.java
+10
-0
contact-center/app/src/main/java/com/chatopera/cc/controller/LoginController.java
...ain/java/com/chatopera/cc/controller/LoginController.java
+18
-8
contact-center/app/src/main/resources/application.properties
contact-center/app/src/main/resources/application.properties
+11
-1
contact-center/app/src/main/resources/templates/apps/index.html
...t-center/app/src/main/resources/templates/apps/index.html
+9
-0
contact-center/app/src/main/resources/templates/login.html
contact-center/app/src/main/resources/templates/login.html
+11
-4
docker-compose.yml
docker-compose.yml
+1
-0
sample.env
sample.env
+2
-1
未找到文件。
contact-center/app/src/main/java/com/chatopera/cc/controller/ApplicationController.java
浏览文件 @
c0a0f54d
...
...
@@ -54,6 +54,10 @@ public class ApplicationController extends Handler {
@Autowired
private
Cache
cache
;
@Value
(
"${tongji.baidu.sitekey}"
)
private
String
tongjiBaiduSiteKey
;
@RequestMapping
(
"/"
)
public
ModelAndView
admin
(
HttpServletRequest
request
)
{
// logger.info("[admin] path {} queryString {}", request.getPathInfo(),request.getQueryString());
...
...
@@ -85,6 +89,12 @@ public class ApplicationController extends Handler {
}
}
view
.
addObject
(
"agentStatus"
,
cache
.
findOneAgentStatusByAgentnoAndOrig
(
logined
.
getId
(),
logined
.
getOrgi
()));
if
(
StringUtils
.
isNotBlank
(
tongjiBaiduSiteKey
)
&&
!
StringUtils
.
equalsIgnoreCase
(
tongjiBaiduSiteKey
,
"placeholder"
))
{
logger
.
info
(
"tongjiBaiduSiteKey: {}"
,
tongjiBaiduSiteKey
);
view
.
addObject
(
"tongjiBaiduSiteKey"
,
tongjiBaiduSiteKey
);
}
return
view
;
}
...
...
contact-center/app/src/main/java/com/chatopera/cc/controller/LoginController.java
浏览文件 @
c0a0f54d
...
...
@@ -39,6 +39,7 @@ import org.jasypt.exceptions.EncryptionOperationNotPossibleException;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -90,6 +91,9 @@ public class LoginController extends Handler {
@Autowired
private
ACDWorkMonitor
acdWorkMonitor
;
@Value
(
"${tongji.baidu.sitekey}"
)
private
String
tongjiBaiduSiteKey
;
/**
* 登录页面
*
...
...
@@ -149,6 +153,12 @@ public class LoginController extends Handler {
if
(
systemConfig
!=
null
)
{
view
.
addObject
(
"systemConfig"
,
systemConfig
);
}
if
(
StringUtils
.
isNotBlank
(
tongjiBaiduSiteKey
)
&&
!
StringUtils
.
equalsIgnoreCase
(
tongjiBaiduSiteKey
,
"placeholder"
))
{
logger
.
info
(
"tongjiBaiduSiteKey: {}"
,
tongjiBaiduSiteKey
);
view
.
addObject
(
"tongjiBaiduSiteKey"
,
tongjiBaiduSiteKey
);
}
return
view
;
}
...
...
@@ -211,14 +221,14 @@ public class LoginController extends Handler {
// 工作状态记录
acdWorkMonitor
.
recordAgentStatus
(
agentStatus
.
getAgentno
(),
agentStatus
.
getUsername
(),
agentStatus
.
getAgentno
(),
user
.
isAdmin
(),
// 0代表admin
agentStatus
.
getAgentno
(),
MainContext
.
AgentStatusEnum
.
OFFLINE
.
toString
(),
MainContext
.
AgentStatusEnum
.
READY
.
toString
(),
MainContext
.
AgentWorkType
.
MEIDIACHAT
.
toString
(),
orgi
,
null
);
agentStatus
.
getUsername
(),
agentStatus
.
getAgentno
(),
user
.
isAdmin
(),
// 0代表admin
agentStatus
.
getAgentno
(),
MainContext
.
AgentStatusEnum
.
OFFLINE
.
toString
(),
MainContext
.
AgentStatusEnum
.
READY
.
toString
(),
MainContext
.
AgentWorkType
.
MEIDIACHAT
.
toString
(),
orgi
,
null
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"[login] set agent status"
,
e
);
...
...
contact-center/app/src/main/resources/application.properties
浏览文件 @
c0a0f54d
...
...
@@ -228,4 +228,14 @@ endpoints.loggers.enabled=false
endpoints.configprops.enabled
=
false
endpoints.mappings.enabled
=
false
endpoints.shutdown.enabled
=
false
endpoints.trace.enabled
=
false
\ No newline at end of file
endpoints.trace.enabled
=
false
##############################################
# 百度统计 Key
# https://tongji.baidu.com/
# 汇总使用情况:登录,打开页面,etc.
# 登录 -> 管理 -> 新增网站 -> 代码获取 -> 拷贝SiteKey
# hm.src = "https://hm.baidu.com/hm.js?YOUR_SITE_KEY";
# 加入后在百度统计内点击:代码安装检查,代码检查成功表示安装成功;注意网站域名等一致,数据收集有延迟。
##############################################
tongji.baidu.sitekey
=
\ No newline at end of file
contact-center/app/src/main/resources/templates/apps/index.html
浏览文件 @
c0a0f54d
...
...
@@ -143,6 +143,15 @@
}
}
<
#
if
tongjiBaiduSiteKey
??
>
var
_hmt
=
_hmt
||
[];
(
function
()
{
var
hm
=
document
.
createElement
(
"
script
"
);
hm
.
src
=
"
https://hm.baidu.com/hm.js?${tongjiBaiduSiteKey}
"
;
var
s
=
document
.
getElementsByTagName
(
"
script
"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
})();
<
/#if
>
</script>
</head>
...
...
contact-center/app/src/main/resources/templates/login.html
浏览文件 @
c0a0f54d
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
http-equiv=
"Cache-Control"
content=
"no-siteapp"
/>
...
...
@@ -14,6 +12,7 @@
<link
rel=
"stylesheet"
href=
"/css/login.css"
>
<link
rel=
"stylesheet"
href=
"/css/flexboxgrid.min.css"
>
<script
src=
"/layui.js"
></script>
<script
language=
"javascript"
>
if
((
window
.
frameElement
&&
window
.
frameElement
.
id
||
''
)
!=
""
){
top
.
location
.
href
=
"
/login.html
"
;
...
...
@@ -42,13 +41,21 @@
document
.
getElementById
(
"
username
"
).
value
=
uid
;
}
}
<
#
if
tongjiBaiduSiteKey
??
>
var
_hmt
=
_hmt
||
[];
(
function
()
{
var
hm
=
document
.
createElement
(
"
script
"
);
hm
.
src
=
"
https://hm.baidu.com/hm.js?${tongjiBaiduSiteKey}
"
;
var
s
=
document
.
getElementsByTagName
(
"
script
"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
})();
<
/#if
>
</script>
</head>
<body
class=
"login"
>
<div
class=
"login-box"
>
<div
class=
"login-logo"
>
<a>
<img
src=
"<#if systemConfig?? && systemConfig.loginlogo?? && systemConfig.loginlogo != ''>/res/image.html?id=${systemConfig.loginlogo?url}<#else>images/logo2.png</#if>"
style=
"height:60px;width:220px;"
>
</a>
...
...
docker-compose.yml
浏览文件 @
c0a0f54d
...
...
@@ -51,6 +51,7 @@ services:
-
BOT_THRESHOLD_FAQ_BEST_REPLY=${BOT_THRESHOLD_FAQ_BEST_REPLY:-0.9}
-
BOT_THRESHOLD_FAQ_SUGG_REPLY=${BOT_THRESHOLD_FAQ_SUGG_REPLY:-0.3}
-
CSKEFU_SETTINGS_WEBIM_VISITOR_SEPARATE=false
-
TONGJI_BAIDU_SITEKEY=${TONGJI_BAIDU_SITEKEY:-placeholder}
depends_on
:
-
mysql
-
redis
...
...
sample.env
浏览文件 @
c0a0f54d
...
...
@@ -12,4 +12,5 @@ ACTIVEMQ_PORT3=8053
DB_PASSWD=123456
LOG_LEVEL=INFO
BOT_THRESHOLD_FAQ_BEST_REPLY=0.8
BOT_THRESHOLD_FAQ_SUGG_REPLY=0.6
\ No newline at end of file
BOT_THRESHOLD_FAQ_SUGG_REPLY=0.6
TONGJI_BAIDU_SITEKEY=placeholder
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录