From 65bef990de33f90d4d4509f327ba200e8958018d Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 22 Mar 2019 15:23:11 +0800 Subject: [PATCH] - weixin ws templateid --- business/jxutils/weixinmsg/weixinmsg.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/business/jxutils/weixinmsg/weixinmsg.go b/business/jxutils/weixinmsg/weixinmsg.go index 9c1573e02..1b1b95f6e 100644 --- a/business/jxutils/weixinmsg/weixinmsg.go +++ b/business/jxutils/weixinmsg/weixinmsg.go @@ -47,6 +47,10 @@ const ( WX_DADA_DELIVERY_DONE_TEMPLATE_ID = "YXdCrQAHZlcZX1htYUiarrLmtkmKAjp7rynjwObgODo" //微信达达众包配送员配送完成推送 WX_SALE_BILL_TEMPLATE_ID = "eTUuFZMWH7IsVBfcxNMpmaHYaxRkUaD6zG8wSGJDcic" + + WX_NORMAL_STORE_MSG_TEMPLATE_ID = "7ngcTFYiUFw66BMzIYntM1tpy-xZkJwlcCT5pVtXwtw" + WX_CHANGE_APPROVED_TEMPLATE_ID = "gIG2olBZtQbjXmp6doNB_dESu60By5xuXYOGxksLv3Y" + WX_CHANGE_REJECTED_TEMPLATE_ID = "tn2QXWi4HtSIwaztmtN6Bb2uzNL-jBxWltCZTDNJuYE" ) var ( @@ -340,7 +344,7 @@ func NotifyStoreOpRequestStatus(isAccepted bool, storeID, nameID int, spuName st fileURL := fmt.Sprintf("%s%d", WX_TO_STORE_SKU_PAGE_URL, storeID) data := make(map[string]interface{}) if isAccepted { - templateID = "gIG2olBZtQbjXmp6doNB_dESu60By5xuXYOGxksLv3Y" + templateID = WX_CHANGE_APPROVED_TEMPLATE_ID data = map[string]interface{}{ "first": map[string]interface{}{ "value": fmt.Sprintf("%s%s元,修改为%s元,已经通过审核。^_^", spuName, jxutils.IntPrice2StandardString(int64(originalUnitPrice)), jxutils.IntPrice2StandardString(int64(unitPrice))), @@ -359,7 +363,7 @@ func NotifyStoreOpRequestStatus(isAccepted bool, storeID, nameID int, spuName st }, } } else { - templateID = "tn2QXWi4HtSIwaztmtN6Bb2uzNL-jBxWltCZTDNJuYE" + templateID = WX_CHANGE_REJECTED_TEMPLATE_ID data = map[string]interface{}{ "first": map[string]interface{}{ "value": fmt.Sprintf("您好!抱歉的通知您。%s%s元,修改为%s元,未通过审核。原因:%s", spuName, jxutils.IntPrice2StandardString(int64(originalUnitPrice)), jxutils.IntPrice2StandardString(int64(unitPrice)), rejectReason), @@ -383,7 +387,7 @@ func NotifyStoreOpRequestStatus(isAccepted bool, storeID, nameID int, spuName st func NotifyStoreMessage(storeID, msgID, msgStatusID int, title, content string) (err error) { globals.SugarLogger.Debugf("NotifyStoreMessage storeID:%d, msgID:%d, title:%s, content:%s", storeID, msgID, title, content) - templateID := "7ngcTFYiUFw66BMzIYntM1tpy-xZkJwlcCT5pVtXwtw" + templateID := WX_NORMAL_STORE_MSG_TEMPLATE_ID fileURL := fmt.Sprintf(WX_TO_SHOW_MSG, msgID, msgStatusID) data := map[string]interface{}{ "first": map[string]interface{}{