users

package
v0.0.0-...-1489327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2022 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProfile

func AddProfile(updPro UsersProfile) error

添加个人信息

func AddUserProfile

func AddUserProfile(updUser Users, updPro UsersProfile) (int64, error)

添加用户

func ChangeUserAvatar

func ChangeUserAvatar(id int64, avatar string) error

更改用户头像

func ChangeUserStatus

func ChangeUserStatus(id int64, status int) error

更改用户状态

func CountUser

func CountUser(condArr map[string]string) int64

统计数量

func DeleteUsers

func DeleteUsers(ids string) error

删除用户

func GetAvatarUserid

func GetAvatarUserid(id int64) string

func GetRealname

func GetRealname(id int64) string

func GetUserEmail

func GetUserEmail(id int64) string

func ResetUserPassword

func ResetUserPassword(id string) (error, string)

重置用户密码

func UpdatePassword

func UpdatePassword(id int64, oldPawd string, newPwd string) error

修改密码

func UpdateProfile

func UpdateProfile(id int64, updPro UsersProfile) error

修改个人信息

func UpdateUser

func UpdateUser(id int64, updUser Users) error

修改用户

Types

type Users

type Users struct {
	Id       int64         `orm:"pk;column(userid);"`
	Profile  *UsersProfile `orm:"rel(one);"`
	Username string
	Password string
	Avatar   string
	Status   int
}

func GetUser

func GetUser(id int64) (Users, error)

得到用户信息

func ListUser

func ListUser(condArr map[string]string, page int, offset int) (num int64, err error, user []Users)

用户列表

func LoginUser

func LoginUser(username, password string) (err error, user Users)

登录

func (*Users) TableName

func (this *Users) TableName() string

type UsersFind

type UsersFind struct {
	Userid   int64
	Realname string
	Avatar   string
	Position string
}

func ListUserFind

func ListUserFind() (num int64, err error, user []UsersFind)

显示所有用户

type UsersPermissionsAll

type UsersPermissionsAll struct {
	Permission string
	Roleid     string
}

func GetPermissionsAll

func GetPermissionsAll(id int64) (UsersPermissionsAll, error)

type UsersProfile

type UsersProfile struct {
	Id          int64 `orm:"pk;column(userid);"`
	Realname    string
	Sex         int
	Birth       string
	Email       string
	Webchat     string
	Qq          string
	Phone       string
	Tel         string
	Address     string
	Emercontact string
	Emerphone   string
	Lognum      int
	Ip          string
	Lasted      int64
}

func GetProfile

func GetProfile(id int64) (UsersProfile, error)

得到用户详情信息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL