事务去掉
This commit is contained in:
@@ -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)
|
// globals.SugarLogger.Debugf("doStoreSkuAudit return2 storeID : %v nameID: %v", storeID, skuBindInfo.NameID)
|
||||||
// return false, err
|
// 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 ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini {
|
||||||
if len(storeAudits) > 0 {
|
if len(storeAudits) > 0 {
|
||||||
storeAudits[0].DeletedAt = time.Now()
|
storeAudits[0].DeletedAt = time.Now()
|
||||||
@@ -4557,7 +4550,6 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
|
|||||||
}
|
}
|
||||||
dao.WrapAddIDCULDEntity(storeSkuAudit, ctx.GetUserName())
|
dao.WrapAddIDCULDEntity(storeSkuAudit, ctx.GetUserName())
|
||||||
err = dao.CreateEntity(db, storeSkuAudit)
|
err = dao.CreateEntity(db, storeSkuAudit)
|
||||||
dao.Commit(db)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true, err
|
return true, err
|
||||||
|
|||||||
Reference in New Issue
Block a user