Przeglądaj źródła

Merge branch 'fix/split_db' into debug

Roc 1 rok temu
rodzic
commit
51385e764a

+ 2 - 0
logic/report/research_report.go

@@ -321,6 +321,7 @@ type UserViewRedisData struct {
 	ReportId        int    `json:"report_id" description:"报告ID"`
 	ReportId        int    `json:"report_id" description:"报告ID"`
 	ReportChapterId int    `json:"report_chapter_id" description:"章节ID"`
 	ReportChapterId int    `json:"report_chapter_id" description:"章节ID"`
 	StopTime        int    `json:"stop_time" description:"停留时间"`
 	StopTime        int    `json:"stop_time" description:"停留时间"`
+	OutId           int    `json:"out_id" description:"章节ID"`
 }
 }
 
 
 // PushViewRecordNewRedisData 阅读数据加入到redis
 // PushViewRecordNewRedisData 阅读数据加入到redis
@@ -336,6 +337,7 @@ func PushViewRecordNewRedisData(userViewHistory *user_view_history.UserViewHisto
 		UserId:          int(userViewHistory.UserID),
 		UserId:          int(userViewHistory.UserID),
 		ReportId:        int(userViewHistory.ResearchReportID),
 		ReportId:        int(userViewHistory.ResearchReportID),
 		ReportChapterId: int(userViewHistory.ResearchReportTypeID),
 		ReportChapterId: int(userViewHistory.ResearchReportTypeID),
+		OutId:           int(userViewHistory.ViewHistoryID),
 	}
 	}
 
 
 	if global.Redis != nil {
 	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阅读记录
 	//新增redis阅读记录
 	userViewHistory := &user_view_history.UserViewHistory{
 	userViewHistory := &user_view_history.UserViewHistory{
+		ViewHistoryID:        uint64(record.Id),
 		Mobile:               userInfo.Mobile,
 		Mobile:               userInfo.Mobile,
 		Email:                userInfo.Email,
 		Email:                userInfo.Email,
 		RealName:             userInfo.RealName,
 		RealName:             userInfo.RealName,