- GetStoresSkus必须指定storeIDs或skuIDs或分页

This commit is contained in:
gazebo
2019-08-09 14:47:59 +08:00
parent 87f69c553f
commit 8a812e214b

View File

@@ -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 {