aa
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user