From c586ee6f9b60e14633537d4a1898044fa6abff56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 21 Sep 2020 17:49:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=94=AE=E5=90=8E=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/scheduler/defsch/defsch.go | 1 + business/jxutils/unipush/push.go | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index fe42e4bf0..88c29c18d 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -1492,6 +1492,7 @@ func (s *DefScheduler) notifyOrderCanceled(order *model.GoodsOrder) { order = setFakeActualPayPrice(order) weixinmsg.NotifyOrderCanceled(order) smsmsg.NotifyOrderCanceled(order) + push.NotifyOrderCanceled(order) }) } } diff --git a/business/jxutils/unipush/push.go b/business/jxutils/unipush/push.go index eb73b8547..32aac9f6c 100644 --- a/business/jxutils/unipush/push.go +++ b/business/jxutils/unipush/push.go @@ -1,6 +1,7 @@ package push import ( + "fmt" "strings" "git.rosy.net.cn/baseapi/platformapi/unipushapi" @@ -83,3 +84,9 @@ func NotifyAfsOrder(afsOrder *model.AfsOrder) (err error) { pushToSingle("老板,您有新的售后单,请尽快处理!", "京西菜市售后单推送", jxutils.GetSaleStoreIDFromAfsOrder(afsOrder)) return err } + +func NotifyOrderCanceled(order *model.GoodsOrder) (err error) { + title := fmt.Sprintf("老板,您的订单%s第%d号订单, %s被取消了!", model.VendorChineseNames[order.VendorID], order.OrderSeq, order.VendorOrderID) + pushToSingle(title, "京西菜市取消单推送", jxutils.GetSaleStoreIDFromOrder(order)) + return err +}