From ce4703b72068a6cf1cad91c175c3d627047961c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 20 Dec 2019 16:58:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=90=84=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E5=95=86=E5=93=81=E9=97=A8=E5=BA=97=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 4abb9b8ff..907485274 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -2528,9 +2528,10 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int, taskFunc := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { vendorStoreID := batchItemList[0].(string) var ( - inStoreSkuList []*partner.StoreSkuInfo - storeDetail *dao.StoreDetail - inStoreSku = &partner.StoreSkuInfo{} + inStoreSkuList []*partner.StoreSkuInfo + storeDetail *dao.StoreDetail + inStoreSku = &partner.StoreSkuInfo{} + outStoreSkuList []*partner.StoreSkuInfo ) db := dao.GetDB() skuNameList, err := dao.GetSkus(db, []int{skuID}, nil, nil, nil) @@ -2548,8 +2549,13 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int, storeDetail, err = singleHandler.ReadStore(ctx, v, vendorStoreID) inStoreSku.SkuID = skuID } + storeDetail2, err := dao.GetStoreDetail2(db, 0, vendorStoreID, vendorID) + if storeDetail2 != nil { + outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, storeDetail2.ID, vendorStoreID, inStoreSkuList) + } else { + outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, 0, vendorStoreID, inStoreSkuList) + } inStoreSkuList = append(inStoreSkuList, inStoreSku) - outStoreSkuList, err := handler.GetStoreSkusBareInfo(ctx, v, task, 0, vendorStoreID, inStoreSkuList) if storeDetail != nil { if len(outStoreSkuList) == 0 { data := DataVendorStoreSkuPrice{ From 5e932275466316b7cab555d954a05615806bb0e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 20 Dec 2019 17:24:36 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E9=97=A8=E5=BA=97=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 907485274..478a1507f 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -2549,13 +2549,13 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int, storeDetail, err = singleHandler.ReadStore(ctx, v, vendorStoreID) inStoreSku.SkuID = skuID } + inStoreSkuList = append(inStoreSkuList, inStoreSku) storeDetail2, err := dao.GetStoreDetail2(db, 0, vendorStoreID, vendorID) if storeDetail2 != nil { outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, storeDetail2.ID, vendorStoreID, inStoreSkuList) } else { outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, 0, vendorStoreID, inStoreSkuList) } - inStoreSkuList = append(inStoreSkuList, inStoreSku) if storeDetail != nil { if len(outStoreSkuList) == 0 { data := DataVendorStoreSkuPrice{ From 693be23ca09aeb9d39a869856036f785295be341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 20 Dec 2019 17:59:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=90=84=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E9=97=A8=E5=BA=97=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 478a1507f..dd3ac73b5 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -2550,7 +2550,7 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int, inStoreSku.SkuID = skuID } inStoreSkuList = append(inStoreSkuList, inStoreSku) - storeDetail2, err := dao.GetStoreDetail2(db, 0, vendorStoreID, vendorID) + storeDetail2, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID) if storeDetail2 != nil { outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, storeDetail2.ID, vendorStoreID, inStoreSkuList) } else {