将京西菜市名字(及其它一些硬编码)做成配置项目

This commit is contained in:
gazebo
2020-02-18 19:11:47 +08:00
parent ae2056c64e
commit b935ef3462
12 changed files with 46 additions and 34 deletions

View File

@@ -10,7 +10,6 @@ import (
)
const (
ELM_SMS_SIGN_NAME = "京西菜市" //饿了么短信推送的签名
ELM_SMS_REMINDERS_DAIPEISHONG_TEMPLATECODE = "SMS_175573181" //饿了么待配送模板ID
ELM_SMS_REMINDERS_PEISHOGNZHONG_TEMPLATECODE = "SMS_175583155" //饿了么配送中模板ID
)
@@ -41,7 +40,7 @@ func (c *PurchaseHandler) ClientUrgeOrder(orderID string) (err error) {
if templateCode != "" {
smsClient := aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")
if globals.ReallyCallPlatformAPI {
_, err = smsClient.Execute(globals.AliKey, globals.AliSecret, order.ConsigneeMobile, ELM_SMS_SIGN_NAME, templateCode, string(utils.MustMarshal(templateParams)))
_, err = smsClient.Execute(globals.AliKey, globals.AliSecret, order.ConsigneeMobile, globals.SMSSignName, templateCode, string(utils.MustMarshal(templateParams)))
}
}
}