单例导出权限
This commit is contained in:
+3
-3
@@ -7,11 +7,11 @@ import (
|
||||
"work_cation/pkg/utils"
|
||||
)
|
||||
|
||||
type User struct{}
|
||||
type userRepo struct{}
|
||||
|
||||
var UserRepo *User
|
||||
var User *userRepo
|
||||
|
||||
func (*User) GetUserInfo(db *gorm.DB) *models.Users {
|
||||
func (*userRepo) GetUserInfo(db *gorm.DB) *models.Users {
|
||||
var users models.Users
|
||||
db.Find(&users)
|
||||
ip := utils.IP.Get192Ip()
|
||||
|
||||
Reference in New Issue
Block a user