diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go index 825ea6d48..5ed6e73b8 100644 --- a/pkg/common/db/relation/user_model.go +++ b/pkg/common/db/relation/user_model.go @@ -9,11 +9,11 @@ import ( ) type UserGorm struct { - DB *gorm.DB + DB gorm.DB } func NewUserGorm(DB *gorm.DB) relation.UserModelInterface { - return &UserGorm{DB: DB.Model(&relation.UserModel{})} + return &UserGorm{DB: *DB.Model(&relation.UserModel{})} } // 插入多条