瀏覽代碼

feat:p510 bigmember 超级订阅保存画像记录

fuwencai 1 年之前
父節點
當前提交
ae92fc5add
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go

+ 12 - 0
src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go

@@ -49,6 +49,18 @@ func (this *SubVipPortrait) SubVipEntDetail() {
 		if entId == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
+		if userId != "" {
+			// p510 保存浏览记录
+			if userId != "" {
+				entName := entity.GetEntNameById(entId)
+				if entName != "" {
+					go func() {
+						redisKey := util.HistoryRedisKeyMap[util.TypeEntView]
+						util.SaveHistory(fmt.Sprintf("%s_%s", entName, this.GetString("entId")), userId, redisKey)
+					}()
+				}
+			}
+		}
 		cepm, equity, err, _ := entity.CreateSubVipPortraitManager(userId, "entDetail", entId, true, this.Session())
 		if err != nil {
 			return nil, err