From fceab5848eaba1c83a4d94e17e80a09f2a455f43 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 21 Oct 2019 15:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=98=BF=E9=87=8C=E7=9F=AD?= =?UTF-8?q?=E4=BF=A1=E6=9C=8D=E5=8A=A1=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/auth2/authprovider/mobile/mobile.go | 2 +- business/jxcallback/auth/mobile/mobile.go | 2 +- business/jxutils/smsmsg/smsmsg.go | 6 +++--- business/jxutils/smsmsg/smsmsg_test.go | 2 +- business/partner/purchase/elm/order_legacy_urge.go | 8 ++++---- conf/app.conf | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/business/auth2/authprovider/mobile/mobile.go b/business/auth2/authprovider/mobile/mobile.go index e4d9efff2..6f3a181ee 100644 --- a/business/auth2/authprovider/mobile/mobile.go +++ b/business/auth2/authprovider/mobile/mobile.go @@ -46,7 +46,7 @@ func init() { func (a *Auther) SendVerifyCode(mobileNumber string) error { code := a.GenerateVerifyCode(mobileNumber) smsClient := aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/") - response, err := smsClient.Execute(globals.AliKey, globals.AliSecret, mobileNumber, "京西菜市", "SMS_84655036", string(utils.MustMarshal(map[string]interface{}{ + response, err := smsClient.Execute(globals.AliKey, globals.AliSecret, mobileNumber, "京西菜市", "SMS_175583158", string(utils.MustMarshal(map[string]interface{}{ "code": code, }))) a.SaveVerifyCode(mobileNumber, code) diff --git a/business/jxcallback/auth/mobile/mobile.go b/business/jxcallback/auth/mobile/mobile.go index 9ed5bbe6c..972b6af19 100644 --- a/business/jxcallback/auth/mobile/mobile.go +++ b/business/jxcallback/auth/mobile/mobile.go @@ -40,7 +40,7 @@ package mobile // globals.SugarLogger.Debugf("SendVerifyCode mobileNumber:%s, code:%s", mobileNumber, code) // smsClient := aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/") -// response, err := smsClient.Execute(globals.AliKey, globals.AliSecret, mobileNumber, "京西菜市", "SMS_84655036", string(utils.MustMarshal(map[string]interface{}{ +// response, err := smsClient.Execute(globals.AliKey, globals.AliSecret, mobileNumber, "京西菜市", "SMS_175583158", string(utils.MustMarshal(map[string]interface{}{ // "code": code, // }))) // api.Cacher.Set(mobileNumber, code, DefVerifyCodeDuration) diff --git a/business/jxutils/smsmsg/smsmsg.go b/business/jxutils/smsmsg/smsmsg.go index ee0538426..26b685331 100644 --- a/business/jxutils/smsmsg/smsmsg.go +++ b/business/jxutils/smsmsg/smsmsg.go @@ -30,7 +30,7 @@ func SendSMSMsg(mobileList []string, signName, templateCode string, templatePara for _, mobileNum := range mobileList { if mobileNum != "" { globals.SugarLogger.Debugf("SendSMSMsg mobileNum:%s, templateCode:%s", mobileNum, templateCode) - if globals.EnableStoreWrite { + if true { //globals.EnableStoreWrite { if response, err := api.SMSClient.Execute(globals.AliKey, globals.AliSecret, mobileNum, signName, templateCode, string(utils.MustMarshal(templateParam))); err != nil { globals.SugarLogger.Warnf("SendSMSMsg mobileNum:%s failed with error:%v", mobileNum, err) errList.AddErr(err) @@ -67,7 +67,7 @@ func getOrderNotifyPhone(order *model.GoodsOrder) (phoneList []string) { } func NotifyNewOrder(order *model.GoodsOrder) (err error) { - err = SendSMSMsg(getOrderNotifyPhone(order), "京西菜市", "SMS_173477895", map[string]interface{}{ + err = SendSMSMsg(getOrderNotifyPhone(order), "京西菜市", "SMS_175583150", map[string]interface{}{ "daySeq": order.OrderSeq, "consigneeName": order.ConsigneeName, "payMoney": jxutils.IntPrice2StandardString(order.ActualPayPrice), @@ -76,7 +76,7 @@ func NotifyNewOrder(order *model.GoodsOrder) (err error) { } func NotifyOrderCanceled(order *model.GoodsOrder) (err error) { - err = SendSMSMsg(getOrderNotifyPhone(order), "京西菜市", "SMS_174275301", map[string]interface{}{ + err = SendSMSMsg(getOrderNotifyPhone(order), "京西菜市", "SMS_175573134", map[string]interface{}{ "vendorName": model.VendorChineseNames[order.VendorID], "seq": order.OrderSeq, "orderID": order.VendorOrderID, diff --git a/business/jxutils/smsmsg/smsmsg_test.go b/business/jxutils/smsmsg/smsmsg_test.go index 0c6d7a34e..98382eade 100644 --- a/business/jxutils/smsmsg/smsmsg_test.go +++ b/business/jxutils/smsmsg/smsmsg_test.go @@ -14,7 +14,7 @@ func init() { } func TestSendSMSMsg(t *testing.T) { - err := SendSMSMsg([]string{"18180948107"}, "京西菜市", "SMS_173477895", map[string]interface{}{ + err := SendSMSMsg([]string{"18180948107"}, "京西菜市", "SMS_175583150", map[string]interface{}{ "daySeq": 9, "consigneeName": "购买者", "payMoney": jxutils.IntPrice2StandardString(1230), diff --git a/business/partner/purchase/elm/order_legacy_urge.go b/business/partner/purchase/elm/order_legacy_urge.go index 2013ef281..a65954d7c 100644 --- a/business/partner/purchase/elm/order_legacy_urge.go +++ b/business/partner/purchase/elm/order_legacy_urge.go @@ -1,7 +1,7 @@ package elm import ( - "github.com/KenmyZhang/aliyun-communicate" + aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/model" @@ -10,9 +10,9 @@ import ( ) const ( - ELM_SMS_SIGN_NAME = "好菜鲜生" //饿了么短信推送的签名 - ELM_SMS_REMINDERS_DAIPEISHONG_TEMPLATECODE = "SMS_135028810" //饿了么待配送模板ID - ELM_SMS_REMINDERS_PEISHOGNZHONG_TEMPLATECODE = "SMS_139225187" //饿了么配送中模板ID + ELM_SMS_SIGN_NAME = "京西菜市" //饿了么短信推送的签名 + ELM_SMS_REMINDERS_DAIPEISHONG_TEMPLATECODE = "SMS_175573181" //饿了么待配送模板ID + ELM_SMS_REMINDERS_PEISHOGNZHONG_TEMPLATECODE = "SMS_175583155" //饿了么配送中模板ID ) func (c *PurchaseHandler) ClientUrgeOrder(orderID string) (err error) { diff --git a/conf/app.conf b/conf/app.conf index 9b7c91208..362ab482a 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -31,8 +31,8 @@ enableElmStoreWrite = false enableMtwmStoreWrite = false enableWscStoreWrite = false -aliKey = "LTAI6xJUGaP6WdMQ" -aliSecret = "CLmx5T93Bgi89EGAxWM4RTAXUsiHbM" +aliKey = "LTAI4FwZN7pp4dACQHoapkZQ" +aliSecret = "NTegceUFX0FdfMovqCDzqcIKmhcoOu" qiniuAK = "bKWilgyrJlc8aXgLEpCUmRrYcxJ8OYhoKk5mO3jJ" qiniuSK = "3MNdU_lKnu22vrNtUELDcLBv23UOUWYKzc16Pmkj"