From 337ea5ce69490400afd92411ff088d9929d52ab9 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, 6 Mar 2020 17:10:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E9=97=A8=E5=BA=97=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=A4=87=E4=BB=BD=E8=A1=A8=E4=BC=98=E5=8C=96?= 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, 8 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 8b1dc6770..838aac8b0 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -3863,13 +3863,6 @@ func BackUpStoreSkuBind(ctx *jxcontext.Context, isAsync, isContinueWhenError boo func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { store := batchItemList[0].(*model.Store) storeSku, err := dao.GetStoresSkusInfo(db, []int{store.ID}, nil) - dao.Begin(db) - defer func() { - if r := recover(); r != nil { - dao.Rollback(db) - panic(r) - } - }() for _, v := range storeSku { storeSkuBindHis := &model.StoreSkuBindHistory{} storeSkuBindHis.StoreSkuBind = *v @@ -3877,7 +3870,6 @@ func BackUpStoreSkuBind(ctx *jxcontext.Context, isAsync, isContinueWhenError boo storeSkuBindHis.SnapshotAt = snapshotAt dao.CreateEntity(db, storeSkuBindHis) } - dao.Commit(db) return retVal, err }, storeList) tasksch.HandleTask(task, nil, true).Run()