fix: 批量5000异常
This commit is contained in:
@@ -166,7 +166,7 @@ func (r *RepoUdmAuthUser) ClearAndInsert(neID string, authArr []model.UdmAuthUse
|
|||||||
}
|
}
|
||||||
|
|
||||||
n := len(authArr)
|
n := len(authArr)
|
||||||
batchSize := 5000
|
batchSize := 2000
|
||||||
for i := 0; i < n; i += batchSize {
|
for i := 0; i < n; i += batchSize {
|
||||||
end := i + batchSize
|
end := i + batchSize
|
||||||
if end > n {
|
if end > n {
|
||||||
@@ -198,7 +198,7 @@ func (r *RepoUdmAuthUser) Insert(authUser model.UdmAuthUser) int64 {
|
|||||||
func (r *RepoUdmAuthUser) Inserts(authUsers []model.UdmAuthUser) int64 {
|
func (r *RepoUdmAuthUser) Inserts(authUsers []model.UdmAuthUser) int64 {
|
||||||
var num int64
|
var num int64
|
||||||
n := len(authUsers)
|
n := len(authUsers)
|
||||||
batchSize := 5000
|
batchSize := 2000
|
||||||
for i := 0; i < n; i += batchSize {
|
for i := 0; i < n; i += batchSize {
|
||||||
end := i + batchSize
|
end := i + batchSize
|
||||||
if end > n {
|
if end > n {
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ func (r *RepoUdmSubUser) ClearAndInsert(neID string, subArr []model.UdmSubUser)
|
|||||||
}
|
}
|
||||||
|
|
||||||
n := len(subArr)
|
n := len(subArr)
|
||||||
batchSize := 5000
|
batchSize := 2000
|
||||||
for i := 0; i < n; i += batchSize {
|
for i := 0; i < n; i += batchSize {
|
||||||
end := i + batchSize
|
end := i + batchSize
|
||||||
if end > n {
|
if end > n {
|
||||||
@@ -225,7 +225,7 @@ func (r *RepoUdmSubUser) Insert(subUser model.UdmSubUser) int64 {
|
|||||||
func (r *RepoUdmSubUser) Inserts(subUser []model.UdmSubUser) int64 {
|
func (r *RepoUdmSubUser) Inserts(subUser []model.UdmSubUser) int64 {
|
||||||
var num int64
|
var num int64
|
||||||
n := len(subUser)
|
n := len(subUser)
|
||||||
batchSize := 5000
|
batchSize := 2000
|
||||||
for i := 0; i < n; i += batchSize {
|
for i := 0; i < n; i += batchSize {
|
||||||
end := i + batchSize
|
end := i + batchSize
|
||||||
if end > n {
|
if end > n {
|
||||||
|
|||||||
Reference in New Issue
Block a user