|
@@ -1530,9 +1530,7 @@ func DoArticleOnenIdWxTemplateMsg(articleId int) (err error) {
|
|
|
}
|
|
|
|
|
|
//获取提交过推送规则的用户的 openid 并推送模版消息
|
|
|
- openIditem := new(models.OpenIdList)
|
|
|
- first := "您关注的赛道,有新的报告发布/更新,欢迎查看"
|
|
|
- keyword1 := "所属赛道:" + industryName
|
|
|
+
|
|
|
//mapActivityUserId := make(map[int]string)
|
|
|
//if articleInfo.IsSummary == 1 {
|
|
|
// sliceSubjectId, _ := models.GetSubjectIds(articleId)
|
|
@@ -1565,24 +1563,28 @@ func DoArticleOnenIdWxTemplateMsg(articleId int) (err error) {
|
|
|
// // mapAlreadySend[openIditem.UserId] = openIditem.UserId
|
|
|
// //}
|
|
|
//}
|
|
|
- var ids []string
|
|
|
- for k, _ := range mapUserIdChooseSendTypeNoPermission {
|
|
|
- ids = append(ids, strconv.Itoa(k))
|
|
|
- }
|
|
|
- if len(ids) > 0 {
|
|
|
- idStr := strings.Join(ids, ",")
|
|
|
- openidIlist, err := models.GetCygxXzsChooseSendOpenIdByUserIds(idStr)
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
- for _, item := range openidIlist {
|
|
|
- openIditem.OpenId = item.OpenId
|
|
|
- openIditem.UserId = item.UserId
|
|
|
- if _, ok := mapAlreadySend[openIditem.UserId]; !ok {
|
|
|
- SendWxMsgWithArticleUpdate(first, keyword1, keyword2, keyword3, keyword4, openIditem, articleId)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ //openIditem := new(models.OpenIdList)
|
|
|
+ //first := "您关注的赛道,有新的报告发布/更新,欢迎查看"
|
|
|
+ //keyword1 := "所属赛道:" + industryName
|
|
|
+ //var ids []string
|
|
|
+ //for k, _ := range mapUserIdChooseSendTypeNoPermission {
|
|
|
+ // ids = append(ids, strconv.Itoa(k))
|
|
|
+ //}
|
|
|
+ //if len(ids) > 0 {
|
|
|
+ // idStr := strings.Join(ids, ",")
|
|
|
+ // openidIlist, err := models.GetCygxXzsChooseSendOpenIdByUserIds(idStr)
|
|
|
+ // if err != nil {
|
|
|
+ // return err
|
|
|
+ // }
|
|
|
+ // for _, item := range openidIlist {
|
|
|
+ // openIditem.OpenId = item.OpenId
|
|
|
+ // openIditem.UserId = item.UserId
|
|
|
+ // if _, ok := mapAlreadySend[openIditem.UserId]; !ok {
|
|
|
+ // SendWxMsgWithArticleUpdate(first, keyword1, keyword2, keyword3, keyword4, openIditem, articleId)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
}
|
|
|
utils.Rc.Put(cacheKey, articleId, time.Hour*12)
|
|
|
return
|