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