事务去掉

This commit is contained in:
苏尹岚
2020-06-03 11:32:07 +08:00
parent 66ec7fc874
commit 2d86677b94

View File

@@ -4497,13 +4497,6 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
// globals.SugarLogger.Debugf("doStoreSkuAudit return2 storeID : %v nameID: %v", storeID, skuBindInfo.NameID)
// return false, err
// }
dao.Begin(db)
defer func() {
if r := recover(); r != nil {
dao.Rollback(db)
panic(r)
}
}()
if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini {
if len(storeAudits) > 0 {
storeAudits[0].DeletedAt = time.Now()
@@ -4557,7 +4550,6 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
}
dao.WrapAddIDCULDEntity(storeSkuAudit, ctx.GetUserName())
err = dao.CreateEntity(db, storeSkuAudit)
dao.Commit(db)
}
}
return true, err