|
@@ -45,7 +45,8 @@ func SendWxMsgWithFrequency(keyword2, activityName, reserveResults, activityTime
|
|
|
}
|
|
|
|
|
|
// 专项调研活动预开始消息通知
|
|
|
-func SendWxMsgWithFrequencySpecial(first, activityName, reserveResults, activityTime, activityAddress, remark string, openIdList []*models.OpenIdList, activityId int) (err error) {
|
|
|
+// func SendWxMsgWithFrequencySpecial(first, activityName, reserveResults, activityTime, activityAddress, remark string, openIdList []*models.OpenIdList, activityId int) (err error) {
|
|
|
+func SendWxMsgWithFrequencySpecial(first, keyword1, keyword2, keyword3, keyword4, remark string, openIdList []*models.OpenIdList, activityId int) (err error) {
|
|
|
var msg string
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -53,38 +54,6 @@ func SendWxMsgWithFrequencySpecial(first, activityName, reserveResults, activity
|
|
|
utils.FileLog.Info("发送模版消息失败,Err:%s", err.Error())
|
|
|
}
|
|
|
}()
|
|
|
- //accessToken, err := models.GetWxAccessTokenByXzs()
|
|
|
- //if err != nil {
|
|
|
- // msg = "GetWxAccessToken Err:" + err.Error()
|
|
|
- // return
|
|
|
- //}
|
|
|
- //if accessToken == "" {
|
|
|
- // msg = "accessToken is empty"
|
|
|
- // return
|
|
|
- //}
|
|
|
- //
|
|
|
- //sendUrl := "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + accessToken
|
|
|
- //templateId := utils.WxMsgTemplateIdActivityApplyXzs
|
|
|
- //sendMap := make(map[string]interface{})
|
|
|
- //sendData := make(map[string]interface{})
|
|
|
- //sendMap["template_id"] = templateId
|
|
|
- //sendMap["miniprogram"] = map[string]interface{}{"appid": utils.WxAppId, "pagepath": utils.WX_MSG_PATH_ACTIVITY_SPECIAL_DETAIL + strconv.Itoa(activityId)}
|
|
|
- //sendData["first"] = map[string]interface{}{"value": first, "color": "#173177"}
|
|
|
- //sendData["keyword1"] = map[string]interface{}{"value": activityName, "color": "#173177"}
|
|
|
- //sendData["keyword2"] = map[string]interface{}{"value": activityTime, "color": "#173177"}
|
|
|
- //sendData["remark"] = map[string]interface{}{"value": remark, "color": "#173177"}
|
|
|
- //sendMap["data"] = sendData
|
|
|
- //WxSendTemplateMsg(sendUrl, sendMap, openIdList, strconv.Itoa(activityId), utils.TEMPLATE_MSG_CYGX_ACTIVITY_ADD)
|
|
|
-
|
|
|
- //var first string
|
|
|
- var keyword1 string
|
|
|
- var keyword2 string
|
|
|
- var keyword3 string
|
|
|
- var keyword4 string
|
|
|
-
|
|
|
- first = ""
|
|
|
- keyword1 = activityName
|
|
|
- keyword3 = activityTime
|
|
|
openIdArr := make([]string, 0)
|
|
|
for _, v := range openIdList {
|
|
|
openIdArr = append(openIdArr, v.OpenId)
|
|
@@ -104,7 +73,6 @@ func SendWxMsgWithFrequencySpecial(first, activityName, reserveResults, activity
|
|
|
sendInfo.SendType = utils.TEMPLATE_MSG_CYGX_ACTIVITY_ADD
|
|
|
sendInfo.OpenIdArr = openIdArr
|
|
|
err = PublicSendTemplateMsg(sendInfo)
|
|
|
-
|
|
|
return
|
|
|
}
|
|
|
|