This commit is contained in:
苏尹岚
2021-01-07 14:28:56 +08:00
parent ccf6902020
commit f20b816f56
3 changed files with 24 additions and 2 deletions

View File

@@ -62,10 +62,29 @@ func getOrderNotifyPhone(order *model.GoodsOrder) (phoneList []string) {
func NotifyNewOrder(order *model.GoodsOrder) (err error) {
if isPushSMS(order) {
err = SendSMSMsg(getOrderNotifyPhone(order), globals.SMSSignName, globals.SMSNewOrderTemplate, map[string]interface{}{
temp := ""
var price int64
store, _ := dao.GetStoreDetail(dao.GetDB(), jxutils.GetSaleStoreIDFromOrder(order), order.VendorID, order.VendorOrgCode)
if store.VendorPayPercentage < 50 && store.VendorPayPercentage != 0 {
temp = globals.SMSNewOrderTemplate
price = order.ActualPayPrice
} else if store.VendorPayPercentage > 50 {
temp = globals.SMSNewOrderTemplateQ
price = order.ShopPrice
} else if store.VendorPayPercentage == 0 {
if store.PayPercentage > 50 {
temp = globals.SMSNewOrderTemplateQ
price = order.ShopPrice
} else {
temp = globals.SMSNewOrderTemplate
price = order.ActualPayPrice
}
}
err = SendSMSMsg(getOrderNotifyPhone(order), globals.SMSSignName, temp, map[string]interface{}{
"daySeq": order.OrderSeq,
"consigneeName": order.ConsigneeName,
"payMoney": jxutils.IntPrice2StandardString(order.ActualPayPrice),
"payMoney": jxutils.IntPrice2StandardString(price),
}, order)
}
return err