浏览代码

no message

xingzai 1 年之前
父节点
当前提交
b27223b38a
共有 2 个文件被更改,包括 25 次插入25 次删除
  1. 0 25
      services/industrial_management.go
  2. 25 0
      services/user_label.go

+ 0 - 25
services/industrial_management.go

@@ -304,31 +304,6 @@ func init() {
 	//UserLabelLogReduce()
 }
 
-// 1:文章阅读、 2产业关注、3:活动到会、4系列关注、5专项调研活动到会。
-func IndustryFllowUserLabelLogAdd(industrialManagementId, count, uid int) (err error) {
-	var isFllow int
-	if count == 0 {
-		isFllow = 1
-	} else {
-		isFllow = 0
-	}
-	defer func() {
-		if err != nil {
-			fmt.Println(err)
-			msg := fmt.Sprint("industrialManagementId:", industrialManagementId, "isFllow:", isFllow, "userId:", uid)
-			go utils.SendAlarmMsg("用户关注产业更新相关标签,写入Redis队列消息失败:"+err.Error()+msg, 2)
-		}
-	}()
-	log := &models.CygxUserLabelLogRedis{UserId: uid, SourceId: industrialManagementId, SourceType: 2, IsFllow: isFllow, CreateTime: time.Now()}
-	if utils.Re == nil {
-		err := utils.Rc.LPush(utils.CYGX_USER_KEY_LABEL, log)
-		if err != nil {
-			fmt.Println("RecordNewLogs LPush Err:" + err.Error())
-		}
-	}
-	return
-}
-
 // GetIndustryNewLabelMap 获取产业【新】标签Map
 func GetIndustryNewLabelMap(industryIds []int) (labelMap map[int]bool, err error) {
 	labelMap = make(map[int]bool, 0)

+ 25 - 0
services/user_label.go

@@ -42,6 +42,31 @@ func ArticleHistoryUserLabelLogAdd(articleId, uid int) (err error) {
 	return
 }
 
+// 添加用户2产业关注标签到Redis
+func IndustryFllowUserLabelLogAdd(industrialManagementId, count, uid int) (err error) {
+	var isFllow int
+	if count == 0 {
+		isFllow = 1
+	} else {
+		isFllow = 0
+	}
+	defer func() {
+		if err != nil {
+			fmt.Println(err)
+			msg := fmt.Sprint("industrialManagementId:", industrialManagementId, "isFllow:", isFllow, "userId:", uid)
+			go utils.SendAlarmMsg("用户关注产业更新相关标签,写入Redis队列消息失败:"+err.Error()+msg, 2)
+		}
+	}()
+	log := &models.CygxUserLabelLogRedis{UserId: uid, SourceId: industrialManagementId, SourceType: 2, IsFllow: isFllow, CreateTime: time.Now()}
+	if utils.Re == nil {
+		err := utils.Rc.LPush(utils.CYGX_USER_KEY_LABEL, log)
+		if err != nil {
+			fmt.Println("RecordNewLogs LPush Err:" + err.Error())
+		}
+	}
+	return
+}
+
 // 添加用户活动到会标签到Redis
 func ActivityUserLabelLogAdd(activityId int, mobileArr []string) (err error) {
 	defer func() {