zwxi 9 tháng trước cách đây
mục cha
commit
d442e869ff
1 tập tin đã thay đổi với 2 bổ sung8 xóa
  1. 2 8
      controllers/article.go

+ 2 - 8
controllers/article.go

@@ -321,6 +321,8 @@ Loop:
 		key := "CYGX_ARTICLE_READ" + strconv.Itoa(articleId) + "_" + strconv.Itoa(uid)
 		if !utils.Rc.IsExist(key) {
 			go services.ArticleUserRemind(user, detail, 1)
+			// 互动提醒
+			go services.SendWxCategoryMsgInteractive(user, "阅读报告", articleId)
 			utils.Rc.Put(key, 1, 30*time.Second)
 		}
 	}
@@ -819,14 +821,6 @@ func (this *ArticleController) AddStopTime() {
 			}
 			if hasPersion {
 				go services.ArticleHistoryStopTime(articleId, stopTime, outType, user)
-				//30分钟之内阅读同一篇文章不错二次推送
-				key := "CYGX_ARTICLE_READ" + strconv.Itoa(articleId) + "_" + strconv.Itoa(uid)
-				if !utils.Rc.IsExist(key) {
-					go services.ArticleUserRemind(user, detail, 1)
-					// 互动提醒
-					go services.SendWxCategoryMsgInteractive(user, "阅读报告", articleId)
-					utils.Rc.Put(key, 1, 30*time.Second)
-				}
 			} else { //无该行业权限
 				hasPermission = 3
 			}