Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
kefu_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a04e0846
authored
Apr 19, 2020
by
chenxianqi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复未接待逻辑
parent
e9811a76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
services/services_statistical_service.go
ui/kefu_admin/src/views/home/index.vue
ui/kefu_client/src/views/kefu.vue
utils/message_into.go
services/services_statistical_service.go
View file @
a04e0846
...
...
@@ -156,7 +156,7 @@ func (r *StatisticalRepository) CheckIsReplyAndSetReply(userAccount int64, servi
err
:=
r
.
q
.
Filter
(
"user_account"
,
userAccount
)
.
Filter
(
"service_account"
,
serviceAccount
)
.
Filter
(
"is_reception"
,
0
)
.
Filter
(
"platform"
,
userPlatform
)
.
Filter
(
"create_at__gte"
,
maxTime
)
.
One
(
&
servicesStatistical
)
if
err
!=
nil
{
logs
.
Warn
(
"CheckIsReplyAndSetReply cehck is reply and set reply Filter------------"
,
err
)
}
else
{
}
else
if
servicesStatistical
.
IsReception
==
0
{
servicesStatistical
.
IsReception
=
1
_
,
err
:=
r
.
o
.
Update
(
&
servicesStatistical
)
if
err
!=
nil
{
...
...
ui/kefu_admin/src/views/home/index.vue
View file @
a04e0846
...
...
@@ -33,7 +33,7 @@
</el-col>
<el-col
:span=
"6.5"
>
<div
class=
"online-count"
>
当天
累积访问用户
<span>
{{
todayStatisticalTableDataCount
}}
</span>
当前在线用户
<span>
{{
onlines
}}
</span>
{{
optionsDate
[
selectDateValue
].
label
}}
累积访问用户
<span>
{{
todayStatisticalTableDataCount
}}
</span>
当前在线用户
<span>
{{
onlines
}}
</span>
</div>
</el-col>
</el-row>
...
...
ui/kefu_client/src/views/kefu.vue
View file @
a04e0846
...
...
@@ -740,10 +740,7 @@ export default {
sendTextMessage
()
{
// 当前用户是否上线
if
(
this
.
userInfo
.
online
==
0
)
{
Toast
({
message
:
"您貌似掉线了"
});
return
;
this
.
userInfo
.
login
();
}
var
chatValue
=
this
.
chatValue
.
trim
();
if
(
chatValue
==
""
)
return
;
...
...
utils/message_into.go
View file @
a04e0846
...
...
@@ -49,8 +49,14 @@ func MessageInto(message models.Message) {
if
user
.
IsWindow
==
0
{
message
.
Read
=
1
}
// 处理是否已回复
services
.
GetStatisticalRepositoryInstance
()
.
CheckIsReplyAndSetReply
(
user
.
ID
,
message
.
FromAccount
,
user
.
Platform
)
admin
:=
services
.
GetAdminRepositoryInstance
()
.
GetAdmin
(
message
.
FromAccount
)
payload
,
_
:=
base64
.
StdEncoding
.
DecodeString
(
message
.
Payload
)
if
admin
!=
nil
&&
admin
.
AutoReply
!=
string
(
payload
)
{
services
.
GetStatisticalRepositoryInstance
()
.
CheckIsReplyAndSetReply
(
user
.
ID
,
message
.
FromAccount
,
user
.
Platform
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment