|
@@ -361,15 +361,15 @@ func (this *ActivityCoAntroller) ActivityList() {
|
|
|
keyWordItem.CreateTime = time.Now()
|
|
|
go models.AddUserSearchKeyWord(keyWordItem)
|
|
|
|
|
|
- cacheKey := fmt.Sprint("Search_uid:", user.UserId, "_KeyWord:", keyWord, "_Source:", 6)
|
|
|
- isExist := utils.Rc.IsExist(cacheKey)
|
|
|
- if !isExist {
|
|
|
- setNX := utils.Rc.SetNX(cacheKey, keyWord, time.Minute*1)
|
|
|
- if !setNX {
|
|
|
- go utils.SendAlarmMsg("记录用户搜索活动关键词失败,设置Redis Key 过期时间失败:key"+cacheKey, 3)
|
|
|
- }
|
|
|
- go services.AddUserSearchLog(user, keyWord, 6)
|
|
|
- }
|
|
|
+ //cacheKey := fmt.Sprint("Search_uid:", user.UserId, "_KeyWord:", keyWordSearch, "_Source:", 6)
|
|
|
+ //isExist := utils.Rc.IsExist(cacheKey)
|
|
|
+ //if !isExist {
|
|
|
+ // setNX := utils.Rc.SetNX(cacheKey, keyWordSearch, time.Minute*1)
|
|
|
+ // if !setNX {
|
|
|
+ // go utils.SendAlarmMsg("记录用户搜索活动关键词失败,设置Redis Key 过期时间失败:key"+cacheKey, 3)
|
|
|
+ // }
|
|
|
+ // go services.AddUserSearchLog(user, keyWordSearch, 6)
|
|
|
+ //}
|
|
|
}
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
resp := new(models.GetCygxActivityListRep)
|
|
@@ -2861,6 +2861,23 @@ func (this *ActivityCoAntroller) ActivityListNew() {
|
|
|
resp.Label = detail.ActivityTypeName
|
|
|
}
|
|
|
}
|
|
|
+ if label != "" {
|
|
|
+ keyWordItem := new(models.CygxUserSearchKeyWord)
|
|
|
+ keyWordItem.UserId = user.UserId
|
|
|
+ keyWordItem.KeyWord = label
|
|
|
+ keyWordItem.PageType = "ActivitSearch"
|
|
|
+ keyWordItem.CreateTime = time.Now()
|
|
|
+ go models.AddUserSearchKeyWord(keyWordItem)
|
|
|
+ cacheKey := fmt.Sprint("Search_uid:", user.UserId, "_KeyWord:", label, "_Source:", 6)
|
|
|
+ isExist := utils.Rc.IsExist(cacheKey)
|
|
|
+ if !isExist {
|
|
|
+ setNX := utils.Rc.SetNX(cacheKey, label, time.Minute*1)
|
|
|
+ if !setNX {
|
|
|
+ go utils.SendAlarmMsg("记录用户搜索活动关键词失败,设置Redis Key 过期时间失败:key"+cacheKey, 3)
|
|
|
+ }
|
|
|
+ go services.AddUserSearchLog(user, label, 6)
|
|
|
+ }
|
|
|
+ }
|
|
|
resp.List = list
|
|
|
resp.Paging = page
|
|
|
br.Ret = 200
|