From b065c79ec3ef0d65aa0302373fe926f40e0647a7 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 19 Apr 2019 15:26:13 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=8E=BB=E6=8E=89OrderStatusDelivered?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/scheduler/defsch/defsch.go | 2 +- business/jxstore/cms/store_sku.go | 3 +-- business/model/const.go | 8 +++----- business/partner/purchase/mtwm/order.go | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index 87af55f11..61f20cdfe 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -263,7 +263,7 @@ func (s *DefScheduler) OnOrderStatusChanged(status *model.OrderStatus, isPending var curWaybill *model.Waybill if !(status.Status == model.OrderStatusCanceled) { // 订单取消时,取消所有运单 curWaybill = savedOrderInfo.waybills[savedOrderInfo.order.WaybillVendorID] - if status.Status == model.OrderStatusDelivered || status.Status == model.OrderStatusFinished { + if status.Status == model.OrderStatusFinished { if curWaybill != nil && curWaybill.WaybillVendorID != curWaybill.OrderVendorID { globals.SugarLogger.Infof("OnOrderStatusChanged [运营2]订单orderID:%s可能被手动点击送达,会对程序状态产生不利影响,请通知门店不要这样操作!", status.VendorOrderID) } diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index b753c317a..0b030011a 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -399,7 +399,7 @@ func GetStoresSkusSaleInfo(ctx *jxcontext.Context, storeIDs []int, skuIDs []int, sql := ` SELECT IF(t2.jx_store_id <> 0, jx_store_id, store_id) store_id, t1.sku_id, COUNT(*) times, SUM(count) count FROM order_sku t1 - JOIN goods_order t2 ON t1.vendor_order_id = t2.vendor_order_id AND t1.vendor_id = t2.vendor_id AND t2.status IN (?, ?) + JOIN goods_order t2 ON t1.vendor_order_id = t2.vendor_order_id AND t1.vendor_id = t2.vendor_id AND t2.status = ? WHERE t1.order_created_at >= ? AND t1.order_created_at <= ? AND IF(t2.jx_store_id <> 0, jx_store_id, store_id) IN (` + dao.GenQuestionMarks(len(storeIDs)) + `) ` @@ -407,7 +407,6 @@ func GetStoresSkusSaleInfo(ctx *jxcontext.Context, storeIDs []int, skuIDs []int, toTime = time.Now() } sqlParams := []interface{}{ - model.OrderStatusDelivered, model.OrderStatusFinished, fromTime, toTime, diff --git a/business/model/const.go b/business/model/const.go index ffd2c7337..6e65d06ae 100644 --- a/business/model/const.go +++ b/business/model/const.go @@ -83,7 +83,6 @@ var ( OrderStatusAccepted: "已接单", OrderStatusFinishedPickup: "已拣货", OrderStatusDelivering: "配送中", - OrderStatusDelivered: "送达", OrderStatusFinished: "完成", OrderStatusCanceled: "取消", } @@ -175,10 +174,9 @@ const ( OrderStatusFinishedPickup = 15 // 拣货完成 OrderStatusDelivering = 20 // 开始配送,配送员已取货,从这里开始就是运单消息了 - OrderStatusEndBegin = 100 // 以下的状态就是结束状态 - OrderStatusDelivered = 105 // 妥投 - OrderStatusFinished = 110 // 订单已完成 - OrderStatusCanceled = 115 // 订单已取消 + OrderStatusEndBegin = 100 // 以下的状态就是结束状态 + OrderStatusFinished = 110 // 订单已完成 + OrderStatusCanceled = 115 // 订单已取消 ) const ( diff --git a/business/partner/purchase/mtwm/order.go b/business/partner/purchase/mtwm/order.go index 936b2b244..f42dcc43b 100644 --- a/business/partner/purchase/mtwm/order.go +++ b/business/partner/purchase/mtwm/order.go @@ -373,8 +373,7 @@ func (c *PurchaseHandler) AdjustOrder(ctx *jxcontext.Context, order *model.Goods func isOrderFinished(vendorOrderID int64) bool { if status, err := api.MtwmAPI.OrderViewStatus(vendorOrderID); err == nil { strStatus := utils.Int2Str(status) - return strStatus == mtwmapi.OrderStatusDelivered || - strStatus == mtwmapi.OrderStatusFinished || + return strStatus == mtwmapi.OrderStatusFinished || strStatus == mtwmapi.OrderStatusCanceled } return false