diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go index 7b1a33efb..e7a5f2a8e 100644 --- a/pkg/common/db/relation/user_model.go +++ b/pkg/common/db/relation/user_model.go @@ -16,9 +16,9 @@ func NewUserGorm(db *gorm.DB) relation.UserModelInterface { return &UserGorm{DB: db.Model(&relation.UserModel{})} } -func (u *UserGorm) db() gorm.DB { +func (u *UserGorm) db() *gorm.DB { newDB := *u.DB - return newDB + return &newDB } // 插入多条