1
This commit is contained in:
@@ -495,6 +495,8 @@ func GuessVendorIDFromVendorStoreID(vendorStoreID int64) (vendorID int) {
|
||||
// vendorID = model.VendorIDWSC
|
||||
} else if vendorStoreID > 123456 && vendorStoreID < 654321 { // 京西门店ID,6位
|
||||
vendorID = model.VendorIDJX
|
||||
} else if vendorStoreID >= 100000000 { // 饿百出现九未id
|
||||
vendorID = model.VendorIDEBAI
|
||||
}
|
||||
return vendorID
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@ func init() {
|
||||
}
|
||||
|
||||
func TestSendSMSMsg(t *testing.T) {
|
||||
err := SendVoiceMsg([]string{"18981810340"}, "tts_222871733", map[string]interface{}{
|
||||
"tel": "18981810340",
|
||||
})
|
||||
aa := map[string]interface{}{"tel": "13957767601"}
|
||||
//err := SendVoiceMsg([]string{"18981810340"}, "tts_222871733", map[string]interface{}{
|
||||
// "tel": "18981810340",
|
||||
//})
|
||||
aa := map[string]interface{}{"tel": "18981810340"}
|
||||
request := &dyvmsapiclient.SingleCallByTtsRequest{
|
||||
CalledNumber: tea.String("13957767601"),
|
||||
CalledNumber: tea.String("18981810340"),
|
||||
TtsCode: tea.String("tts_222871733"),
|
||||
TtsParam: tea.String(string(utils.MustMarshal(aa))),
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ func NotifyNewOrder(order *model.GoodsOrder) {
|
||||
msg.OrderSqs = utils.Int2Str(order.OrderSeq)
|
||||
msg.StoreTitle = storeDetail.Name
|
||||
msg.Context = "老板,你有新的订单了!"
|
||||
msg.VendorOrderId = order.VendorOrderID
|
||||
context, _ := json.Marshal(msg)
|
||||
body := fmt.Sprintf(msg.Context+"(%s)", model.VendorChineseNames[order.VendorID]+"#"+msg.OrderSqs)
|
||||
pushMsgByUniApp(storeDetail.ID, storeDetail.Name, cid, string(context), body, SoundsFileNewOrder)
|
||||
@@ -175,11 +176,12 @@ func GetStoreBoosCID(storeId int) ([]string, error) {
|
||||
}
|
||||
|
||||
type MsgContext struct {
|
||||
MsgType string `json:"msg_type"` // 订单类型[新订单/售后单/取消单]
|
||||
StoreTitle string `json:"store_title"` // 门店名称
|
||||
Context string `json:"context"` // 消息文本
|
||||
VendorName string `json:"vendor_name"` // 平台名称
|
||||
OrderSqs string `json:"order_sqs"` // 订单流水号
|
||||
MsgType string `json:"msg_type"` // 订单类型[新订单/售后单/取消单]
|
||||
StoreTitle string `json:"store_title"` // 门店名称
|
||||
Context string `json:"context"` // 消息文本
|
||||
VendorName string `json:"vendor_name"` // 平台名称
|
||||
OrderSqs string `json:"order_sqs"` // 订单流水号
|
||||
VendorOrderId string `json:"vendor_order_id"` // 订单id
|
||||
}
|
||||
|
||||
func pushMsgByUniApp(storeId int, storeName string, cID []string, msg string, body string, soundsFileName string) {
|
||||
|
||||
Reference in New Issue
Block a user