diff --git a/business/jxutils/unipush/push.go b/business/jxutils/unipush/push.go index c439f5fc9..4baa74d79 100644 --- a/business/jxutils/unipush/push.go +++ b/business/jxutils/unipush/push.go @@ -16,9 +16,9 @@ import ( ) const ( - SoundsFileNewOrder = "pushsound.caf" - SoundsFileNewAfsOrder = "pushsound.caf" - SoundsFileNewCancelOrder = "pushsound.caf" + SoundsFileNewOrder = "newOrder.caf" + SoundsFileNewAfsOrder = "afsOrder.caf" + SoundsFileNewCancelOrder = "cancelOrder.caf" ) // NotifyNewOrder 推送新订单 @@ -46,7 +46,7 @@ func NotifyNewOrder(order *model.GoodsOrder) { msg.StoreTitle = storeDetail.Name msg.Context = "老板,你有新的订单了!" context, _ := json.Marshal(msg) - body := msg.Context + model.VendorChineseNames[order.VendorID] + "#" + msg.OrderSqs + body := fmt.Sprintf(msg.Context+"(%s)", model.VendorChineseNames[order.VendorID]+"#"+msg.OrderSqs) pushMsgByUniApp(storeDetail.ID, storeDetail.Name, cid, string(context), body, SoundsFileNewOrder) } @@ -74,7 +74,7 @@ func NotifyAfsOrder(afsOrder *model.AfsOrder) (err error) { msg.StoreTitle = storeDetail.Name msg.Context = "老板订单申请退款了!" context, _ := json.Marshal(msg) - body := msg.Context + model.VendorChineseNames[afsOrder.VendorID] + "#" + msg.OrderSqs + body := fmt.Sprintf(msg.Context+"(%s)", model.VendorChineseNames[afsOrder.VendorID]+"#"+msg.OrderSqs) pushMsgByUniApp(storeDetail.ID, storeDetail.Name, cid, string(context), body, SoundsFileNewAfsOrder) return err } @@ -103,7 +103,7 @@ func NotifyOrderCanceled(order *model.GoodsOrder) (err error) { msg.StoreTitle = storeDetail.Name msg.Context = "老板订单被取消了!" context, _ := json.Marshal(msg) - body := msg.Context + model.VendorChineseNames[order.VendorID] + "#" + msg.OrderSqs + body := fmt.Sprintf(msg.Context+"(%s)", model.VendorChineseNames[order.VendorID]+"#"+msg.OrderSqs) pushMsgByUniApp(storeDetail.ID, storeDetail.Name, cid, string(context), body, SoundsFileNewCancelOrder) return err }