From 8a812e214bf4c33fb5eea206694dfbe660c63987 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 9 Aug 2019 14:47:59 +0800 Subject: [PATCH] =?UTF-8?q?-=20GetStoresSkus=E5=BF=85=E9=A1=BB=E6=8C=87?= =?UTF-8?q?=E5=AE=9AstoreIDs=E6=88=96skuIDs=E6=88=96=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index dad96c0a5..75dc56fea 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -311,6 +311,9 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo if !isFocus && !isBySku && (len(storeIDs) > 1 || len(storeIDs) == 0) { return nil, fmt.Errorf("未关注按SkuName只能查询单店") } + if len(storeIDs) == 0 && len(skuIDs) == 0 && pageSize == -1 { + return nil, fmt.Errorf("GetStoresSkus必须指定storeIDs或skuIDs或分页") + } db := dao.GetDB() sql, sqlParams, err := getGetStoresSkusBaseSQL(db, storeIDs, skuIDs, isFocus, keyword, isBySku, params) if err != nil {