service

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseOpenService

type BaseOpenService struct {
	*dzhCore.Service
}

func NewBaseOpenService

func NewBaseOpenService() *BaseOpenService

func (*BaseOpenService) AdminEPS

func (s *BaseOpenService) AdminEPS(ctx g.Ctx) (result *g.Var, err error)

AdminEPS 获取eps

func (*BaseOpenService) AppEPS

func (s *BaseOpenService) AppEPS(ctx g.Ctx) (result *g.Var, err error)

AdminEPS 获取eps

type BaseSysConfService

type BaseSysConfService struct {
	*dzhCore.Service
}

func NewBaseSysConfService

func NewBaseSysConfService() *BaseSysConfService

func (*BaseSysConfService) GetValue

func (s *BaseSysConfService) GetValue(cKey string) string

GetValue 获取配置值

func (*BaseSysConfService) UpdateValue

func (s *BaseSysConfService) UpdateValue(cKey, cValue string) error

UpdateValue 更新配置值

type BaseSysDepartmentService

type BaseSysDepartmentService struct {
	*dzhCore.Service
}

func NewBaseSysDepartmentService

func NewBaseSysDepartmentService() *BaseSysDepartmentService

NewBaseSysDepartmentService 创建一个BaseSysDepartmentService实例

func (*BaseSysDepartmentService) GetByRoleIds

func (s *BaseSysDepartmentService) GetByRoleIds(roleIds []string, isAdmin bool) (res []uint)

GetByRoleIds 获取部门

func (*BaseSysDepartmentService) Order

func (s *BaseSysDepartmentService) Order(ctx g.Ctx) (err error)

Order 排序部门

type BaseSysLogService

type BaseSysLogService struct {
	*dzhCore.Service
}

func NewBaseSysLogService

func NewBaseSysLogService() *BaseSysLogService

func (*BaseSysLogService) Clear

func (s *BaseSysLogService) Clear(isAll bool) (err error)

Clear 清除日志

func (*BaseSysLogService) Record

func (s *BaseSysLogService) Record(ctx g.Ctx)

Record 记录日志

type BaseSysLoginService

type BaseSysLoginService struct {
	*dzhCore.Service
}

func NewBaseSysLoginService

func NewBaseSysLoginService() *BaseSysLoginService

NewBaseSysLoginService 创建一个新的BaseSysLoginService

func (*BaseSysLoginService) Captcha

func (*BaseSysLoginService) Captcha(req *v1.BaseOpenCaptchaReq) (interface{}, error)

Captcha 图形验证码

func (*BaseSysLoginService) Login

func (s *BaseSysLoginService) Login(ctx context.Context, req *v1.BaseOpenLoginReq) (result *TokenResult, err error)

Login 登录

func (*BaseSysLoginService) Logout

func (*BaseSysLoginService) Logout(ctx context.Context) (err error)

Logout 退出登录

func (*BaseSysLoginService) RefreshToken

func (s *BaseSysLoginService) RefreshToken(ctx context.Context, token string) (result *TokenResult, err error)

RefreshToken 刷新token

type BaseSysMenuService

type BaseSysMenuService struct {
	*dzhCore.Service
}

func NewBaseSysMenuService

func NewBaseSysMenuService() *BaseSysMenuService

NewBaseSysMenuService 创建一个BaseSysMenuService实例

func (*BaseSysMenuService) GetMenus

func (s *BaseSysMenuService) GetMenus(roleIds []string, isAdmin bool) (result gdb.Result)

GetMenus 获取菜单

func (*BaseSysMenuService) GetPerms

func (s *BaseSysMenuService) GetPerms(roleIds []string) []string

GetPerms 获取菜单的权限

func (*BaseSysMenuService) ModifyAfter

func (s *BaseSysMenuService) ModifyAfter(ctx context.Context, method string, param g.MapStrAny) (err error)

ModifyAfter 修改后

func (*BaseSysMenuService) ServiceAdd

func (s *BaseSysMenuService) ServiceAdd(ctx context.Context, req *dzhCore.AddReq) (data interface{}, err error)

ServiceAdd 添加

type BaseSysParamService

type BaseSysParamService struct {
	*dzhCore.Service
}

func NewBaseSysParamService

func NewBaseSysParamService() *BaseSysParamService

func (*BaseSysParamService) DataByKey

func (s *BaseSysParamService) DataByKey(ctx context.Context, key string) (data string, err error)

DataByKey 根据配置参数key获取数据

func (*BaseSysParamService) HtmlByKey

func (s *BaseSysParamService) HtmlByKey(key string) string

HtmlByKey 根据配置参数key获取网页内容(富文本)

func (*BaseSysParamService) ModifyAfter

func (s *BaseSysParamService) ModifyAfter(ctx context.Context, method string, param g.MapStrAny) (err error)

ModifyAfter 修改后

type BaseSysPermsService

type BaseSysPermsService struct {
}

func NewBaseSysPermsService

func NewBaseSysPermsService() *BaseSysPermsService

func (*BaseSysPermsService) Permmenu

func (c *BaseSysPermsService) Permmenu(ctx context.Context, roleIds []string) (res interface{})

permmenu 方法

func (*BaseSysPermsService) RefreshPerms

func (c *BaseSysPermsService) RefreshPerms(ctx context.Context, userId uint) (err error)

refreshPerms(userId)

type BaseSysRoleService

type BaseSysRoleService struct {
	*dzhCore.Service
}

func NewBaseSysRoleService

func NewBaseSysRoleService() *BaseSysRoleService

NewBaseSysRoleService create a new BaseSysRoleService

func (*BaseSysRoleService) GetByUser

func (s *BaseSysRoleService) GetByUser(userId uint) []string

GetByUser get array roleId by userId

func (*BaseSysRoleService) ModifyAfter

func (s *BaseSysRoleService) ModifyAfter(ctx context.Context, method string, param g.MapStrAny) (err error)

ModifyAfter modify after

func (*BaseSysRoleService) ServiceInfo

func (s *BaseSysRoleService) ServiceInfo(ctx context.Context, req *dzhCore.InfoReq) (data interface{}, err error)

BaseSysRoleService Info 方法重构

type BaseSysUserService

type BaseSysUserService struct {
	*dzhCore.Service
}

func NewBaseSysUserService

func NewBaseSysUserService() *BaseSysUserService

NewBaseSysUserService 创建一个新的BaseSysUserService实例

func (*BaseSysUserService) ModifyAfter

func (s *BaseSysUserService) ModifyAfter(ctx context.Context, method string, param g.MapStrAny) (err error)

func (*BaseSysUserService) ModifyBefore

func (s *BaseSysUserService) ModifyBefore(ctx context.Context, method string, param g.MapStrAny) (err error)

func (*BaseSysUserService) Move

func (s *BaseSysUserService) Move(ctx g.Ctx) (err error)

Move 移动用户部门

func (*BaseSysUserService) Person

func (s *BaseSysUserService) Person(userId uint) (res gdb.Record, err error)

Person 方法 返回不带密码的用户信息

func (*BaseSysUserService) ServiceAdd

func (s *BaseSysUserService) ServiceAdd(ctx context.Context, req *dzhCore.AddReq) (data interface{}, err error)

ServiceAdd 方法 添加用户

func (*BaseSysUserService) ServiceInfo

func (s *BaseSysUserService) ServiceInfo(ctx g.Ctx, req *dzhCore.InfoReq) (data interface{}, err error)

ServiceInfo 方法 返回服务信息

func (*BaseSysUserService) ServiceUpdate

func (s *BaseSysUserService) ServiceUpdate(ctx context.Context, req *dzhCore.UpdateReq) (data interface{}, err error)

ServiceUpdate 方法 更新用户信息

type TokenResult

type TokenResult struct {
	Expire        uint   `json:"expire"`
	Token         string `json:"token"`
	RefreshExpire uint   `json:"refreshExpire"`
	RefreshToken  string `json:"refreshToken"`
}

Jump to

Keyboard shortcuts

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