|
@@ -633,12 +633,14 @@ func SendActivitieSignCategoryTemplateMsg(user *models.WxUserItem, activityDetai
|
|
|
|
|
|
// 文章互动相关类目模版消息
|
|
|
func SendWxCategoryMsgInteractive(user *models.WxUserItem, interactive string, articleId int, title string) (err error) {
|
|
|
- //30秒内阅读同一篇报告不做重复推送
|
|
|
- key := "CYGX_" + utils.CYGX_OBJ_RESEARCHSUMMARY + "_READ" + strconv.Itoa(articleId) + "_" + strconv.Itoa(user.UserId)+ "_CATEGORY"
|
|
|
- if utils.Rc.IsExist(key) {
|
|
|
- return
|
|
|
+ if interactive == "阅读报告" {
|
|
|
+ //30秒内阅读同一篇报告不做重复推送
|
|
|
+ key := "CYGX_" + utils.CYGX_OBJ_RESEARCHSUMMARY + "_READ" + strconv.Itoa(articleId) + "_" + strconv.Itoa(user.UserId)+ "_CATEGORY"
|
|
|
+ if utils.Rc.IsExist(key) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ utils.Rc.Put(key, 1, 30*time.Second)
|
|
|
}
|
|
|
- utils.Rc.Put(key, 1, 30*time.Second)
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
go utils.SendAlarmMsg(fmt.Sprint("文章互动相关,类目模板消息推送 ,SendWxCategoryMsgInteractive"+err.Error(), "userId:", user.UserId, "互动类型:", interactive), 2)
|