users

package
v0.0.0-...-cf39114 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDeparts

func AddDeparts(updDep Departs) error

func AddNotices

func AddNotices(updDep Notices) error

func AddPermissions

func AddPermissions(updDep UsersPermissions) error

func AddPositions

func AddPositions(updPos Positions) error

func AddProfile

func AddProfile(updPro UsersProfile) error

添加个人信息

func AddUserProfile

func AddUserProfile(updUser Users, updPro UsersProfile) error

添加用户

func ChangeDepartStatus

func ChangeDepartStatus(id int64, status int) error

更改用户状态

func ChangeNoticeStatus

func ChangeNoticeStatus(id int64, status int) error

更改状态

func ChangePositionStatus

func ChangePositionStatus(id int64, status int) error

更改用户状态

func ChangeUserAvatar

func ChangeUserAvatar(id int64, avatar string) error

更改用户头像

func ChangeUserStatus

func ChangeUserStatus(id int64, status int) error

更改用户状态

func CountDeparts

func CountDeparts(condArr map[string]string) int64

统计数量

func CountNotices

func CountNotices(condArr map[string]string) int64

统计数量

func CountPositions

func CountPositions(condArr map[string]string) int64

统计数量

func CountUser

func CountUser(condArr map[string]string) int64

统计数量

func DeleteNotice

func DeleteNotice(id int64) error

func GetAvatarUserid

func GetAvatarUserid(id int64) string

func GetDepartmentsNameForUserid

func GetDepartmentsNameForUserid(id int64) string

func GetDepartsName

func GetDepartsName(id int64) string

func GetPermissions

func GetPermissions(id int64) string

func GetPositionsName

func GetPositionsName(id int64) string

func GetPositionsNameForUserid

func GetPositionsNameForUserid(id int64) string

func GetRealname

func GetRealname(id int64) string

func GetUserEmail

func GetUserEmail(id int64) string

func UpdateDeparts

func UpdateDeparts(id int64, updDep Departs) error

func UpdateNotices

func UpdateNotices(id int64, upd Notices) error

func UpdatePassword

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

修改密码

func UpdatePermissions

func UpdatePermissions(id int64, updDep UsersPermissions) error

func UpdatePositions

func UpdatePositions(id int64, updPos Positions) error

func UpdateProfile

func UpdateProfile(id int64, updPro UsersProfile) error

修改个人信息

func UpdateUser

func UpdateUser(id int64, updUser Users) error

修改用户

Types

type Departs

type Departs struct {
	Id     int64 `orm:"pk;column(departid);"`
	Name   string
	Desc   string
	Status int
}

func GetDeparts

func GetDeparts(id int64) (Departs, error)

func ListDeparts

func ListDeparts(condArr map[string]string, page int, offset int) (num int64, err error, dep []Departs)

func (*Departs) TableName

func (this *Departs) TableName() string

type Notices

type Notices struct {
	Id      int64 `orm:"pk;column(noticeid);"`
	Title   string
	Content string
	Created int64
	Status  int
}

func GetNotices

func GetNotices(id int64) (Notices, error)

func ListNotices

func ListNotices(condArr map[string]string, page int, offset int) (num int64, err error, dep []Notices)

func (*Notices) TableName

func (this *Notices) TableName() string

type Positions

type Positions struct {
	Id     int64 `orm:"pk;column(positionid);"`
	Name   string
	Desc   string
	Status int
}

func GetPositions

func GetPositions(id int64) (Positions, error)

func ListPositions

func ListPositions(condArr map[string]string, page int, offset int) (num int64, err error, pos []Positions)

func (*Positions) TableName

func (this *Positions) TableName() string

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 UsersPermissions

type UsersPermissions struct {
	Id         int64 `orm:"pk;column(userid);"`
	Permission string
	Model      string
	Modelc     string
}

func GetPermissionsAllOld

func GetPermissionsAllOld(id int64) (UsersPermissions, error)

func (*UsersPermissions) TableName

func (this *UsersPermissions) TableName() string

type UsersPermissionsAll

type UsersPermissionsAll struct {
	Permission string
	Groupid    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
	Departid    int64
	Positionid  int64
	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