xingzai 9 месяцев назад
Родитель
Сommit
07615af1c2
2 измененных файлов с 9 добавлено и 6 удалено
  1. 7 4
      services/wechat_send_category_template_msg.go
  2. 2 2
      utils/config.go

+ 7 - 4
services/wechat_send_category_template_msg.go

@@ -203,7 +203,6 @@ func SendWxCategoryMsgSpecialFollow(specialId int) (err error) {
 	return
 }
 
-
 // SendReviewCategoryTemplateMsgAdmin 提交审核时给王芳,汪洋发消息
 func SendReviewCategoryTemplateMsgAdmin(specialId int) (err error) {
 	defer func() {
@@ -212,11 +211,15 @@ func SendReviewCategoryTemplateMsgAdmin(specialId int) (err error) {
 		}
 	}()
 	//王芳、葛琳和沈涛
-	openIdList, e := models.GetMfyxUserRecordListByMobile(12, utils.WxMsgTemplateIdYXSpecialReview)
-	if e != nil && e.Error() != utils.ErrNoRow() {
+	mobile := utils.WxMsgTemplateIdAskMsgMobilePublic + utils.RAI_MOBILE_GE_LIN_WEN
+	openIdList, e := models.GetMfyxWxOpenIdByMobileList(mobile)
+	if e != nil {
 		err = errors.New("GetUserRecordListByMobile, Err: " + e.Error())
 		return err
 	}
+	if len(openIdList) == 0 {
+		return
+	}
 	specialItem, e := models.GetYanxuanSpecialItemById(specialId)
 	if e != nil {
 		err = errors.New("GetYanxuanSpecialFollowUserById, Err: " + e.Error())
@@ -259,4 +262,4 @@ func SendReviewCategoryTemplateMsgAdmin(specialId int) (err error) {
 		return
 	}
 	return
-}
+}

+ 2 - 2
utils/config.go

@@ -111,8 +111,8 @@ func init() {
 	WxAppId = "wxcc32b61f96720d2f"
 	WxAppSecret = "06894933fafb24dafead7eaae09c08e0"
 	WxMsgTemplateIdAskMsgMobileAll = "15557270714,18767183922,18621268829"
-	WxMsgTemplateIdAskMsgMobilePublic = "15557270714,18767183922,18621268829"
-	WxMsgTemplateIdYXSpecialReview = "18621268829,18258485832,18767183922" // 王芳、葛琳和沈涛
+	WxMsgTemplateIdAskMsgMobilePublic = "15557270714,18767183922,18621268829" // 王芳沈涛张传星
+	WxMsgTemplateIdYXSpecialReview = "18621268829,18258485832,18767183922"    // 王芳、葛琳和沈涛
 	if RunMode == "release" {
 		WxPublicAppId = "wxb7cb8a15abad5b8e"                                          //查研观向小助手
 		WxPublicAppSecret = "f425ba2863084249722af1e2a5cfffd3"                        //查研观向小助手