From c98b9a83b4e3d04f43458c34849050d3433b21dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 9 Jul 2020 10:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95updatestoresskus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 5bc5529ee..9f9f57add 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -1060,11 +1060,9 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs for _, storeID := range storeIDs { // todo 可以考虑在需要更新价格再获取 storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDJX) - if err != nil { - dao.Rollback(db) - return nil, err + if err != nil || storeDetail == nil { + continue } - fmt.Println("test22222222222222222222222222222222222222222") scaleFactor := float64(1) if isScale { scaleFactor = 100 / float64(jxutils.ConstrainPayPercentage(storeDetail.PayPercentage)) @@ -1306,7 +1304,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs } } } else { - fmt.Println("test3333333333333333333333333333333333333333") dao.Rollback(db) return nil, err }