From 747a5f33264cc760e100428da9985f676560cef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 6 Apr 2023 18:39:05 +0800 Subject: [PATCH] 1 --- business/jxutils/unipush/push.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/business/jxutils/unipush/push.go b/business/jxutils/unipush/push.go index 38d3f6409..a71d8bff5 100644 --- a/business/jxutils/unipush/push.go +++ b/business/jxutils/unipush/push.go @@ -45,8 +45,9 @@ 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+"订单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) } @@ -136,11 +137,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) {