|
@@ -14,10 +14,11 @@ type UserViewRedisData struct {
|
|
|
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"`
|
|
|
}
|
|
|
|
|
|
// PushViewRecordNewRedisData 阅读数据加入到redis
|
|
|
-func PushViewRecordNewRedisData(reportViewRecord *models.ReportViewRecord) bool {
|
|
|
+func PushViewRecordNewRedisData(reportViewRecord *models.ReportViewRecord,companyId int) bool {
|
|
|
data := &UserViewRedisData{
|
|
|
Mobile: reportViewRecord.Mobile,
|
|
|
Email: reportViewRecord.Email,
|
|
@@ -25,6 +26,7 @@ func PushViewRecordNewRedisData(reportViewRecord *models.ReportViewRecord) bool
|
|
|
CompanyName: reportViewRecord.CompanyName,
|
|
|
ViewTime: reportViewRecord.CreateTime.Format(utils.FormatDateTime),
|
|
|
ProductId: 1,
|
|
|
+ CompanyId: companyId
|
|
|
}
|
|
|
if utils.Re == nil {
|
|
|
err := utils.Rc.LPush(utils.CACHE_KEY_USER_VIEW, data)
|