|
@@ -310,25 +310,32 @@ func GetResearchReportTypeContentInfo(researchReportTypeId, userId uint64) (resu
|
|
|
|
|
|
|
|
|
type UserViewRedisData struct {
|
|
|
- Mobile string `json:"mobile"`
|
|
|
- Email string `json:"email"`
|
|
|
- RealName string `json:"real_name"`
|
|
|
- CompanyName string `json:"company_name"`
|
|
|
- ViewTime string `json:"view_time" description:"阅读时间,格式:2022-02-17 13:06:13"`
|
|
|
- ProductId int `json:"product_id" description:"报告所属产品,ficc:1,权益:2"`
|
|
|
- CompanyId int `json:"company_id" description:"客户id"`
|
|
|
+ Mobile string `json:"mobile"`
|
|
|
+ Email string `json:"email"`
|
|
|
+ RealName string `json:"real_name"`
|
|
|
+ CompanyName string `json:"company_name"`
|
|
|
+ ViewTime string `json:"view_time" description:"阅读时间,格式:2022-02-17 13:06:13"`
|
|
|
+ ProductId int `json:"product_id" description:"报告所属产品,ficc:1,权益:2"`
|
|
|
+ CompanyId int `json:"company_id" description:"客户id"`
|
|
|
+ UserId int `json:"user_id" description:"用户id"`
|
|
|
+ ReportId int `json:"report_id" description:"报告ID"`
|
|
|
+ ReportChapterId int `json:"report_chapter_id" description:"章节ID"`
|
|
|
+ StopTime int `json:"stop_time" description:"停留时间"`
|
|
|
}
|
|
|
|
|
|
|
|
|
func PushViewRecordNewRedisData(userViewHistory *user_view_history.UserViewHistory, companyId int) bool {
|
|
|
data := &UserViewRedisData{
|
|
|
- Mobile: userViewHistory.Mobile,
|
|
|
- Email: userViewHistory.Email,
|
|
|
- RealName: userViewHistory.RealName,
|
|
|
- CompanyName: userViewHistory.CompanyName,
|
|
|
- ViewTime: userViewHistory.CreatedTime.Format(utils.FormatDateTime),
|
|
|
- ProductId: 1,
|
|
|
- CompanyId: companyId,
|
|
|
+ Mobile: userViewHistory.Mobile,
|
|
|
+ Email: userViewHistory.Email,
|
|
|
+ RealName: userViewHistory.RealName,
|
|
|
+ CompanyName: userViewHistory.CompanyName,
|
|
|
+ ViewTime: userViewHistory.CreatedTime.Format(utils.FormatDateTime),
|
|
|
+ ProductId: 1,
|
|
|
+ CompanyId: companyId,
|
|
|
+ UserId: int(userViewHistory.UserID),
|
|
|
+ ReportId: int(userViewHistory.ResearchReportID),
|
|
|
+ ReportChapterId: int(userViewHistory.ResearchReportTypeID),
|
|
|
}
|
|
|
|
|
|
if global.Redis != nil {
|