From 9b7be294413e5b73642bbf307bea40ea7b4efcb2 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 14 Oct 2019 09:57:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGetStoresSkusNew=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E5=9C=A8=E5=85=A8=E5=8F=96=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=8E=B7=E5=8F=96=E6=B4=BB=E5=8A=A8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 87fc6ef99..f77357e6c 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -371,9 +371,7 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo return nil, err } pageSize = jxutils.FormalizePageSize(pageSize) - if offset < 0 { - offset = 0 - } + offset = jxutils.FormalizePageOffset(offset) sqlOffset := offset sqlPageSize := pageSize isSaleInfo := params["stFromTime"] != nil @@ -396,7 +394,7 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo } skuNamesInfo = &StoreSkuNamesInfo{} - if !isBySku && sqlPageSize < 1000 { + if !isBySku && sqlPageSize != model.UnlimitedPageSize { sql2 := ` SELECT SQL_CALC_FOUND_ROWS t3.id store_id, t1.id name_id @@ -481,7 +479,7 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo globals.SugarLogger.Debugf("GetStoresSkusNew updateSaleInfo4StoreSkuName:%v", time.Now().Sub(beginTime)) } if err == nil { - if !(offset == 0 && pageSize == model.UnlimitedPageSize) { + if true { //!(offset == 0 && pageSize == model.UnlimitedPageSize) { storeIDs, skuIDs = GetStoreAndSkuIDsFromInfo(skuNamesInfo) } beginTime := time.Now()