From 601db3f0ce68cd1199e982882c71f79e3e0fdad1 Mon Sep 17 00:00:00 2001 From: gazebo Date: Sun, 29 Sep 2019 16:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E7=94=B5=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/waybill.go | 2 ++ business/partner/purchase/jd/order.go | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/waybill.go b/business/jxcallback/orderman/waybill.go index 246db13c5..d795ac4f6 100644 --- a/business/jxcallback/orderman/waybill.go +++ b/business/jxcallback/orderman/waybill.go @@ -5,6 +5,7 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxcallback/scheduler" + "git.rosy.net.cn/jx-callback/business/jxutils" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" "git.rosy.net.cn/jx-callback/globals" @@ -84,6 +85,7 @@ func (w *OrderManager) onWaybillNew(bill2 *model.Waybill, db *dao.DaoDB) (isDupl func (w *OrderManager) OnWaybillStatusChanged(bill *model.Waybill) (err error) { var isDuplicated bool + bill.CourierMobile = jxutils.FormalizeMobile(bill.CourierMobile) db := dao.GetDB() dao.Begin(db) defer func() { diff --git a/business/partner/purchase/jd/order.go b/business/partner/purchase/jd/order.go index dbbfa0756..cad01ed81 100644 --- a/business/partner/purchase/jd/order.go +++ b/business/partner/purchase/jd/order.go @@ -304,7 +304,12 @@ func (c *PurchaseHandler) AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptI c.postFakeMsg(order.VendorOrderID, jdapi.StatusIDWaitOutStore) } } else { - c.postFakeMsg(order.VendorOrderID, jdapi.StatusIDWaitOutStore) + if isAcceptIt { + c.postFakeMsg(order.VendorOrderID, jdapi.StatusIDWaitOutStore) + } else { + + c.postFakeMsg(order.VendorOrderID, jdapi.OrderStatusCanceled) + } } return err }