InitVendorCategory中改用批量插入
This commit is contained in:
@@ -275,9 +275,9 @@ func InitVendorCategory(ctx *jxcontext.Context, vendorID int, isAsync bool) (hin
|
||||
}
|
||||
for _, cat := range cats {
|
||||
dao.WrapAddIDCULEntity(cat, ctx.GetUserName())
|
||||
if err = dao.CreateEntity(db, cat); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if err = dao.CreateMultiEntities(db, cats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dao.Commit(db)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user