|
@@ -2,6 +2,7 @@ package controllers
|
|
|
|
|
|
import (
|
|
import (
|
|
"encoding/json"
|
|
"encoding/json"
|
|
|
|
+ "hongze/hongze_api/cache"
|
|
"hongze/hongze_api/models"
|
|
"hongze/hongze_api/models"
|
|
"hongze/hongze_api/services"
|
|
"hongze/hongze_api/services"
|
|
"hongze/hongze_api/utils"
|
|
"hongze/hongze_api/utils"
|
|
@@ -210,6 +211,10 @@ func (this *ReportController) Detail() {
|
|
if err != nil {
|
|
if err != nil {
|
|
go utils.SendEmail(utils.APPNAME+"失败提醒", "新增报告阅读记录失败:Err:"+err.Error(), utils.EmailSendToUsers)
|
|
go utils.SendEmail(utils.APPNAME+"失败提醒", "新增报告阅读记录失败:Err:"+err.Error(), utils.EmailSendToUsers)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 添加阅读日志的数据加入到redis
|
|
|
|
+ go cache.PushViewRecordNewRedisData(record)
|
|
|
|
+
|
|
//修改联系人最后一次阅读报告时间
|
|
//修改联系人最后一次阅读报告时间
|
|
go models.SetWxUserReportLastViewTime(user.UserId)
|
|
go models.SetWxUserReportLastViewTime(user.UserId)
|
|
}
|
|
}
|
|
@@ -517,6 +522,10 @@ func (this *ReportController) AddViewRecordReport() {
|
|
br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取数据失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 添加阅读日志的数据加入到redis
|
|
|
|
+ go cache.PushViewRecordNewRedisData(record)
|
|
|
|
+
|
|
//修改联系人最后一次阅读报告时间
|
|
//修改联系人最后一次阅读报告时间
|
|
go models.SetWxUserReportLastViewTime(user.UserId)
|
|
go models.SetWxUserReportLastViewTime(user.UserId)
|
|
|
|
|