This commit is contained in:
邹宗楠
2025-05-14 17:42:18 +08:00
parent 33f2ec1e2d
commit 66306fbc0d
6 changed files with 8 additions and 3 deletions

View File

@@ -53,6 +53,7 @@ func NotifyNewOrder(order *model.GoodsOrder) {
msg.Context = "老板,你有新的订单了!"
msg.VendorOrderId = order.VendorOrderID
msg.StoreId = storeId
msg.BusinessType = order.BusinessType
context, _ := json.Marshal(msg)
body := msg.Context + fmt.Sprintf("门店ID:%d(%s)", storeId, model.VendorChineseNames[order.VendorID]+"#"+msg.OrderSqs+"号订单")
pushMsgByUniApp(storeDetail.ID, storeDetail.Name, cid, string(context), body, SoundsFileNewOrder, FlagOrder)
@@ -213,6 +214,7 @@ type MsgContext struct {
VendorName string `json:"vendor_name"` // 平台名称
OrderSqs string `json:"order_sqs"` // 订单流水号
VendorOrderId string `json:"vendor_order_id"` // 订单id
BusinessType int `json:"business_type"` // 是否为预定单
}
func pushMsgByUniApp(storeId int, storeName string, cID []string, msg string, body string, soundsFileName string, flag int) {