@@ -158,6 +158,8 @@ func (this *ReportController) Detail() {
if err != nil {
go utils.SendEmail(utils.APPNAME+"失败提醒", "新增报告阅读记录失败:Err:"+err.Error(), utils.EmailSendToUsers)
}
+ //修改联系人最后一次阅读报告时间
+ go models.SetWxUserReportLastViewTime(user.UserId)
reportType := 0
if report.ClassifyNameFirst == "权益研报" {
@@ -20,4 +20,10 @@ func AddReportViewRecord(item *ReportViewRecord) (err error) {
return
-//修改最新阅读时间
+//修改最新阅读时间
+func SetWxUserReportLastViewTime(uid int) (err error) {
+ o := orm.NewOrm()
+ sql := `UPDATE wx_user SET report_last_view_time=NOW() WHERE user_id=? `
+ _, err = o.Raw(sql, uid).Exec()
+ return
+}