Commit a04e0846 by chenxianqi

修复未接待逻辑

parent e9811a76
......@@ -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 {
......
......@@ -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>
......
......@@ -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;
......
......@@ -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)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment