|
@@ -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)
|