1
This commit is contained in:
parent
b029be9a48
commit
9465588fb7
@ -1,6 +1,7 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"gorm.io/plugin/soft_delete"
|
"gorm.io/plugin/soft_delete"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -20,6 +21,8 @@ type ApprovalCopy struct {
|
|||||||
func BatchCopySave(users CopyUsers, approvalId uint64) error {
|
func BatchCopySave(users CopyUsers, approvalId uint64) error {
|
||||||
var insertRaws []*ApprovalCopy
|
var insertRaws []*ApprovalCopy
|
||||||
|
|
||||||
|
fmt.Println("是否会被过滤")
|
||||||
|
fmt.Println(users == nil || len(users) == 0)
|
||||||
if users == nil || len(users) == 0 {
|
if users == nil || len(users) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -36,6 +39,12 @@ func BatchCopySave(users CopyUsers, approvalId uint64) error {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println("是否会被过滤")
|
||||||
|
|
||||||
|
if len(insertRaws) <= 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
return DB.Create(&insertRaws).Error
|
return DB.Create(&insertRaws).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user