Jelajahi Sumber

fix:多添加几个字段

Roc 1 tahun lalu
induk
melakukan
6adc6016eb
2 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 2 0
      logic/report/research_report.go
  2. 1 0
      services/report/report_view_record.go

+ 2 - 0
logic/report/research_report.go

@@ -321,6 +321,7 @@ type UserViewRedisData struct {
 	ReportId        int    `json:"report_id" description:"报告ID"`
 	ReportChapterId int    `json:"report_chapter_id" description:"章节ID"`
 	StopTime        int    `json:"stop_time" description:"停留时间"`
+	OutId           int    `json:"out_id" description:"章节ID"`
 }
 
 // PushViewRecordNewRedisData 阅读数据加入到redis
@@ -336,6 +337,7 @@ func PushViewRecordNewRedisData(userViewHistory *user_view_history.UserViewHisto
 		UserId:          int(userViewHistory.UserID),
 		ReportId:        int(userViewHistory.ResearchReportID),
 		ReportChapterId: int(userViewHistory.ResearchReportTypeID),
+		OutId:           int(userViewHistory.ViewHistoryID),
 	}
 
 	if global.Redis != nil {

+ 1 - 0
services/report/report_view_record.go

@@ -43,6 +43,7 @@ func AddViewRecord(userInfo user.UserInfo, reportId int, classifyName string, re
 
 	//新增redis阅读记录
 	userViewHistory := &user_view_history.UserViewHistory{
+		ViewHistoryID:        uint64(record.Id),
 		Mobile:               userInfo.Mobile,
 		Email:                userInfo.Email,
 		RealName:             userInfo.RealName,