From c48ebb4bd7d08033a45bbac9f651f2d374219545 Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 14 Aug 2019 10:04:54 +0800 Subject: [PATCH] =?UTF-8?q?-=20GetOrders=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/orderman_ext.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index c68ed69c2..84a5581bf 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -352,8 +352,12 @@ func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku bool, from return nil, 0, err } if len(storeIDs) > 0 { - sqlWhere += " AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")" - sqlParams = append(sqlParams, model.VendorIDWSC, storeIDs) + if storeIDs[0] == 0 { // 容错 + sqlWhere += " AND 1 = 0" + } else { + sqlWhere += " AND IF(t1.vendor_id = ?, t1.store_id, IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) ) IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")" + sqlParams = append(sqlParams, model.VendorIDWSC, storeIDs) + } } } if params["statuss"] != nil {