|
@@ -82,3 +82,22 @@ func ActivityVivoWxUserRaiLabelRedisAdd(sourceId, uid int, createTime time.Time)
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// 添加用户阅读图表标签到Redis
|
|
|
+func KeyChartWxUserRaiLabelRedisAdd(sourceId, uid int, label string) (err error) {
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ msg := fmt.Sprint("sourceId:", sourceId, "userId:", uid)
|
|
|
+ go utils.SendAlarmMsg("用户关注产业更新相关标签,写入Redis队列消息失败:"+err.Error()+msg, 2)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ log := &models.WxUserRaiLabelRedis{UserId: uid, SourceId: sourceId, SourceType: 10, Label: label, CreateTime: time.Now(), RegisterPlatform: utils.REGISTER_PLATFORM}
|
|
|
+ if utils.Re == nil {
|
|
|
+ err := utils.Rc.LPush(utils.WX_USER_RAI_LABEL_KEY, log)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("WxUserRaiLabelRedis LPush Err:" + err.Error())
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return
|
|
|
+}
|