|
@@ -120,7 +120,7 @@ func GetResearchReportInfo(researchReportId, userId uint64) (result ResearchRepo
|
|
}
|
|
}
|
|
|
|
|
|
//添加阅读日志的数据加入到redis
|
|
//添加阅读日志的数据加入到redis
|
|
- go PushViewRecordNewRedisData(userViewHistory)
|
|
|
|
|
|
+ go PushViewRecordNewRedisData(userViewHistory, int(wxUserInfo.CompanyID))
|
|
|
|
|
|
result = ResearchReportInfo{
|
|
result = ResearchReportInfo{
|
|
ResearchReportInfo: reportInfo,
|
|
ResearchReportInfo: reportInfo,
|
|
@@ -245,7 +245,7 @@ func GetResearchReportTypeContentInfo(researchReportTypeId, userId uint64) (resu
|
|
}
|
|
}
|
|
|
|
|
|
//添加阅读日志的数据加入到redis
|
|
//添加阅读日志的数据加入到redis
|
|
- go PushViewRecordNewRedisData(userViewHistory)
|
|
|
|
|
|
+ go PushViewRecordNewRedisData(userViewHistory, int(wxUserInfo.CompanyID))
|
|
|
|
|
|
result = ResearchReportTypeContentInfo{
|
|
result = ResearchReportTypeContentInfo{
|
|
ResearchReportTypeContentList: researchReportTypeContentList,
|
|
ResearchReportTypeContentList: researchReportTypeContentList,
|
|
@@ -263,10 +263,11 @@ type UserViewRedisData struct {
|
|
CompanyName string `json:"company_name"`
|
|
CompanyName string `json:"company_name"`
|
|
ViewTime string `json:"view_time" description:"阅读时间,格式:2022-02-17 13:06:13"`
|
|
ViewTime string `json:"view_time" description:"阅读时间,格式:2022-02-17 13:06:13"`
|
|
ProductId int `json:"product_id" description:"报告所属产品,ficc:1,权益:2"`
|
|
ProductId int `json:"product_id" description:"报告所属产品,ficc:1,权益:2"`
|
|
|
|
+ CompanyId int `json:"company_id" description:"客户id"`
|
|
}
|
|
}
|
|
|
|
|
|
// PushViewRecordNewRedisData 阅读数据加入到redis
|
|
// PushViewRecordNewRedisData 阅读数据加入到redis
|
|
-func PushViewRecordNewRedisData(userViewHistory *user_view_history.UserViewHistory) bool {
|
|
|
|
|
|
+func PushViewRecordNewRedisData(userViewHistory *user_view_history.UserViewHistory, companyId int) bool {
|
|
data := &UserViewRedisData{
|
|
data := &UserViewRedisData{
|
|
Mobile: userViewHistory.Mobile,
|
|
Mobile: userViewHistory.Mobile,
|
|
Email: userViewHistory.Email,
|
|
Email: userViewHistory.Email,
|
|
@@ -274,6 +275,7 @@ func PushViewRecordNewRedisData(userViewHistory *user_view_history.UserViewHisto
|
|
CompanyName: userViewHistory.CompanyName,
|
|
CompanyName: userViewHistory.CompanyName,
|
|
ViewTime: userViewHistory.CreatedTime.Format(utils.FormatDateTime),
|
|
ViewTime: userViewHistory.CreatedTime.Format(utils.FormatDateTime),
|
|
ProductId: 1,
|
|
ProductId: 1,
|
|
|
|
+ CompanyId: companyId,
|
|
}
|
|
}
|
|
|
|
|
|
if global.Redis != nil {
|
|
if global.Redis != nil {
|