1234567891011121314151617181920212223242526272829 |
- package user_service
- import (
- "github.com/casbin/casbin"
- "kpt.xdmy/apiserver/routers/restful"
- "kpt.xdmy/pkg/util"
- )
- type User struct {
- ID int
- Username string
- Password string
- Fullname string
- Deptid int
- Role int
- CreatedBy string
- ModifiedBy string
- PageNum int
- PageSize int
- Enforcer *casbin.Enforcer `inject:""`
- }
- func (a *User) Check() (bool, error) {
- return restful.CheckUser(a.Username, util.EncodeMD5(a.Password))
- }
|