Commit a04e0846 by chenxianqi

修复未接待逻辑

parent e9811a76
...@@ -156,7 +156,7 @@ func (r *StatisticalRepository) CheckIsReplyAndSetReply(userAccount int64, servi ...@@ -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) 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 { if err != nil {
logs.Warn("CheckIsReplyAndSetReply cehck is reply and set reply Filter------------", err) logs.Warn("CheckIsReplyAndSetReply cehck is reply and set reply Filter------------", err)
} else { } else if servicesStatistical.IsReception == 0 {
servicesStatistical.IsReception = 1 servicesStatistical.IsReception = 1
_, err := r.o.Update(&servicesStatistical) _, err := r.o.Update(&servicesStatistical)
if err != nil { if err != nil {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</el-col> </el-col>
<el-col :span="6.5"> <el-col :span="6.5">
<div class="online-count"> <div class="online-count">
当天累积访问用户<span>{{todayStatisticalTableDataCount}}</span> 当前在线用户<span>{{onlines}}</span> {{optionsDate[selectDateValue].label}}累积访问用户<span>{{todayStatisticalTableDataCount}}</span> 当前在线用户<span>{{onlines}}</span>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -740,10 +740,7 @@ export default { ...@@ -740,10 +740,7 @@ export default {
sendTextMessage() { sendTextMessage() {
// 当前用户是否上线 // 当前用户是否上线
if (this.userInfo.online == 0) { if (this.userInfo.online == 0) {
Toast({ this.userInfo.login();
message: "您貌似掉线了"
});
return;
} }
var chatValue = this.chatValue.trim(); var chatValue = this.chatValue.trim();
if (chatValue == "") return; if (chatValue == "") return;
......
...@@ -49,12 +49,18 @@ func MessageInto(message models.Message) { ...@@ -49,12 +49,18 @@ func MessageInto(message models.Message) {
if user.IsWindow == 0 { if user.IsWindow == 0 {
message.Read = 1 message.Read = 1
} }
// 处理是否已回复 // 处理是否已回复
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) services.GetStatisticalRepositoryInstance().CheckIsReplyAndSetReply(user.ID, message.FromAccount, user.Platform)
} }
} }
}
// message.BizType == "end" is not read // message.BizType == "end" is not read
if message.BizType == "end" || message.BizType == "timeout" { if message.BizType == "end" || message.BizType == "timeout" {
message.Read = 0 message.Read = 0
......
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