From 2a82fc69754d652eeb623eb2528ba8076f2e5d0c Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 16 Nov 2018 15:48:20 +0800 Subject: [PATCH] - don't send weixin msg when ebai order - don't return ebai orders in GetStoreOrderInfo and GetStoreOrderCountInfo --- business/jxcallback/orderman/orderman_ext.go | 4 ++-- business/jxutils/weixinmsg/weixinmsg.go | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 413727f82..4f94072a1 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -48,7 +48,7 @@ func (c *OrderManager) GetStoreOrderInfo(ctx *jxcontext.Context, storeID string, t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at FROM goods_order t1 LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id - WHERE IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ? + WHERE t1.vendor_id <> 3 AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ? AND t1.order_created_at >= ? AND t1.Status >= ? AND t1.Status <= ? ORDER BY t1.status, t1.order_created_at @@ -73,7 +73,7 @@ func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID st _, err = db.Raw(` SELECT t1.status, COUNT(*) count FROM goods_order t1 - WHERE IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ? + WHERE t1.vendor_id <> 3 AND IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ? AND t1.order_created_at >= ? GROUP BY 1 ORDER BY 1 diff --git a/business/jxutils/weixinmsg/weixinmsg.go b/business/jxutils/weixinmsg/weixinmsg.go index ecfb4b4cc..f3701f3df 100644 --- a/business/jxutils/weixinmsg/weixinmsg.go +++ b/business/jxutils/weixinmsg/weixinmsg.go @@ -113,6 +113,10 @@ func SendMsgToStore(storeID int, templateID, downloadURL string, data interface{ func NotifyNewOrder(order *model.GoodsOrder) (err error) { globals.SugarLogger.Debugf("NotifyNewOrder orderID:%s", order.VendorOrderID) + if order.VendorID == model.VendorIDEBAI { + return nil + } + if !model.IsOrderSolid(order) { globals.SugarLogger.Infof("NotifyNewOrder orderID:%s is not solid", order.VendorOrderID) return nil @@ -161,6 +165,10 @@ func NotifyNewOrder(order *model.GoodsOrder) (err error) { func NotifyWaybillStatus(bill *model.Waybill, order *model.GoodsOrder) error { globals.SugarLogger.Debugf("NotifyWaybillStatus orderID:%s bill:%v", order.VendorOrderID, bill) + if order.VendorID == model.VendorIDEBAI { + return nil + } + if !model.IsOrderSolid(order) { globals.SugarLogger.Infof("NotifyWaybillStatus orderID:%s is not solid", order.VendorOrderID) return nil