fix:修复bug
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"ArmedPolice/config"
|
||||
"ArmedPolice/serve/orm"
|
||||
"ArmedPolice/utils"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type synchronized struct {
|
||||
@ -78,7 +79,14 @@ func initModel() {
|
||||
_ = db.Migrator().CreateTable(v.iModel)
|
||||
|
||||
if v.iValues != nil && v.iValues() != nil {
|
||||
db.Table(v.iModel.TableName()).Create(v.iValues())
|
||||
err := db.Table(v.iModel.TableName()).Create(v.iValues()).Error
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("=======================================")
|
||||
fmt.Println(err)
|
||||
fmt.Println("=======================================")
|
||||
}
|
||||
|
||||
}
|
||||
} else if v.Catch != nil && v.Catch() != nil {
|
||||
v.Catch()
|
||||
|
||||
Reference in New Issue
Block a user