1
This commit is contained in:
@@ -45,8 +45,9 @@ func NotifyNewOrder(order *model.GoodsOrder) {
|
|||||||
msg.OrderSqs = utils.Int2Str(order.OrderSeq)
|
msg.OrderSqs = utils.Int2Str(order.OrderSeq)
|
||||||
msg.StoreTitle = storeDetail.Name
|
msg.StoreTitle = storeDetail.Name
|
||||||
msg.Context = "老板,你有新的订单了!"
|
msg.Context = "老板,你有新的订单了!"
|
||||||
|
msg.VendorOrderId = order.VendorOrderID
|
||||||
context, _ := json.Marshal(msg)
|
context, _ := json.Marshal(msg)
|
||||||
body := fmt.Sprintf(msg.Context+"(%s)", model.VendorChineseNames[order.VendorID]+"#"+msg.OrderSqs+"订单Id:"+order.VendorOrderID)
|
body := fmt.Sprintf(msg.Context+"(%s)", model.VendorChineseNames[order.VendorID]+"#"+msg.OrderSqs)
|
||||||
pushMsgByUniApp(storeDetail.ID, storeDetail.Name, cid, string(context), body, SoundsFileNewOrder)
|
pushMsgByUniApp(storeDetail.ID, storeDetail.Name, cid, string(context), body, SoundsFileNewOrder)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,11 +137,12 @@ func GetStoreBoosCID(storeId int) ([]string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type MsgContext struct {
|
type MsgContext struct {
|
||||||
MsgType string `json:"msg_type"` // 订单类型[新订单/售后单/取消单]
|
MsgType string `json:"msg_type"` // 订单类型[新订单/售后单/取消单]
|
||||||
StoreTitle string `json:"store_title"` // 门店名称
|
StoreTitle string `json:"store_title"` // 门店名称
|
||||||
Context string `json:"context"` // 消息文本
|
Context string `json:"context"` // 消息文本
|
||||||
VendorName string `json:"vendor_name"` // 平台名称
|
VendorName string `json:"vendor_name"` // 平台名称
|
||||||
OrderSqs string `json:"order_sqs"` // 订单流水号
|
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) {
|
func pushMsgByUniApp(storeId int, storeName string, cID []string, msg string, body string, soundsFileName string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user