system

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMenuApi

func AddMenuApi(ctx context.Context, id int, menuIds []int, loginUserId int) (err error)

func ApiTree

func ApiTree(parentNodeRes []*model.SysApiTreeOut, data []*entity.SysApi) (dataTree []*model.SysApiTreeOut)

ApiTree 生成接口树结构

func AuthorizeMenuTree

func AuthorizeMenuTree(userMenuParentNodeTreeOut []*model.AuthorizeQueryTreeOut, data []*model.AuthorizeQueryTreeOut) (dataTree []*model.AuthorizeQueryTreeOut)

AuthorizeMenuTree 重组菜单子节点

func BindUserAndPost

func BindUserAndPost(ctx context.Context, userId int, postIds []int) (err error)

BindUserAndPost 添加用户与岗位绑定关系

func BindUserAndRole

func BindUserAndRole(ctx context.Context, userId int, roleIds []int) (err error)

BindUserAndRole 添加用户与角色绑定关系

func CheckApiAddress

func CheckApiAddress(ctx context.Context, address string, tag int) *entity.SysApi

检查相同Api地址的数据是否存在

func CheckApiId

func CheckApiId(ctx context.Context, Id int, apiColumn *entity.SysApi) *entity.SysApi

检查指定ID的数据是否存在

func CheckApiName

func CheckApiName(ctx context.Context, name string, tag int) *entity.SysApi

检查相同Api名称的数据是否存在

func CheckChildrenAuthorizeMenuTree

func CheckChildrenAuthorizeMenuTree(children *model.AuthorizeQueryTreeOut, data []*model.AuthorizeQueryTreeOut) (childrenData []g.Map)

func GetAllAuthorizeQueryChildrenTree

func GetAllAuthorizeQueryChildrenTree(userMenuTreeRes []*model.AuthorizeQueryTreeOut) (childrenMenuTreeRes []*model.AuthorizeQueryTreeOut)

GetAllAuthorizeQueryChildrenTree 获取所有的子节点

func GetAllAuthorizeQueryParentTree

func GetAllAuthorizeQueryParentTree(childrenMenuTreeRes []*model.AuthorizeQueryTreeOut, userMenuTreeRes []*model.AuthorizeQueryTreeOut) (data []*model.AuthorizeQueryTreeOut)

GetAllAuthorizeQueryParentTree 获取所有的父节点

func GetAllNextDeptInfoByChildrenDept

func GetAllNextDeptInfoByChildrenDept(childrenDept []*entity.SysDept, deptInfo []*entity.SysDept, resultChildrenAll []*entity.SysDept) (data []*entity.SysDept)

GetAllNextDeptInfoByChildrenDept 根据所有的子部门获取所有下级部门信息

func GetApiTree

func GetApiTree(apiInfo []*entity.SysApi) (dataTree []*model.SysApiTreeOut, err error)

func GetAuthorizeItemsTypeTreeOut

func GetAuthorizeItemsTypeTreeOut(ctx context.Context, menuIds []int, itemsType string, authorizeMenuTreeInfo []*model.AuthorizeQueryTreeOut) (authorizeMenuTreeOut []*model.AuthorizeQueryTreeOut, err error)

GetAuthorizeItemsTypeTreeOut 根据项目类型 菜单ID封装菜单的按钮,列表字段,API接口

func GetAuthorizeMenuTree

func GetAuthorizeMenuTree(userMenuTreeOut []*model.AuthorizeQueryTreeOut) (dataTree []*model.AuthorizeQueryTreeOut)

GetAuthorizeMenuTree 获取用户菜单树结构

func GetDataWhere

func GetDataWhere(ctx context.Context, loginUserId int, entity interface{}) (where g.Map, err error)

GetDataWhere 获取数据权限条件查询

func GetDeptNameDict

func GetDeptNameDict(ctx context.Context, ids g.Slice) (dict map[int64]model.DetailDeptRes, err error)

func GetMenuInfo

func GetMenuInfo(ctx context.Context, menuIds []int) (userMenuTreeOut []*model.UserMenuTreeOut, err error)

GetMenuInfo 根据菜单ID获取指定菜单信息或者获取所有菜单信息

func GetNextDeptInfoByNowDeptId

func GetNextDeptInfoByNowDeptId(id int64, deptInfo []*entity.SysDept) (data []*entity.SysDept)

GetNextDeptInfoByNowDeptId 获取当前部门ID下一层级的部门信息

func GetRoleTree

func GetRoleTree(roleInfo []*entity.SysRole) (dataTree []*model.RoleTreeOut, err error)

GetRoleTree 获取角色树

func GetUserItemsTypeTreeOut

func GetUserItemsTypeTreeOut(ctx context.Context, menuIds []int, itemsType string, userMenuTreeInfo []*model.UserMenuTreeOut) (userMenuTreeRes []*model.UserMenuTreeOut, err error)

GetUserItemsTypeTreeOut 根据项目类型 菜单ID封装菜单的按钮,列表字段,API接口

func GetUserMenuButton

func GetUserMenuButton(menuId int, menuButtonInfo []*entity.SysMenuButton) (dataTree []*model.UserMenuButtonOut, err error)

GetUserMenuButton 获取用户可操作按钮

func GetUserMenuColumn

func GetUserMenuColumn(menuId int, menuColumnInfo []*entity.SysMenuColumn) (dataTree []*model.UserMenuColumnOut, err error)

GetUserMenuColumn 获取用户可查看列表

func GetUserMenuTree

func GetUserMenuTree(userMenuTreeRes []*model.UserMenuTreeOut) (dataTree []*model.UserMenuTreeOut)

GetUserMenuTree 获取用户菜单树结构

func GfToken

func GfToken() *gftoken.GfToken

func GfTokenOption

func GfTokenOption(options *model.TokenOptions, prefix string, model string) *gftoken.GfToken
func MenuTree(parentNodeOut []*model.SysMenuOut, data []*model.SysMenuOut) (dataTree []*model.SysMenuOut)

MenuTree 生成树结构

func New

func New() *sCaptcha

Captcha 验证码管理服务

func OrganizationTree

func OrganizationTree(parentNodeOut []*model.OrganizationOut, data []*model.OrganizationOut) (dataTree []*model.OrganizationOut)

OrganizationTree 生成树结构

func RoleTree

func RoleTree(parentNodeRes []*model.RoleTreeOut, data []*entity.SysRole) (dataTree []*model.RoleTreeOut)

RoleTree 生成角色树结构

func SysOperLog

func SysOperLog() *sSysOperLog

func SysOrganizationNew

func SysOrganizationNew() *sSysOrganization

func UserMenuButtonTree

func UserMenuButtonTree(parentMenuButtonNodeRes []*model.UserMenuButtonOut, data []*entity.SysMenuButton) (dataTree []*model.UserMenuButtonOut)

UserMenuButtonTree 生成树结构

func UserMenuColumnTree

func UserMenuColumnTree(parentMenuColumnNodeRes []*model.UserMenuColumnOut, data []*entity.SysMenuColumn) (dataTree []*model.UserMenuColumnOut)

UserMenuColumnTree 生成树结构

func UserMenuTree

func UserMenuTree(userMenuParentNodeTreeRes []*model.UserMenuTreeOut, data []*model.UserMenuTreeOut) (dataTree []*model.UserMenuTreeOut)

UserMenuTree 重组菜单子节点

Types

This section is empty.

Jump to

Keyboard shortcuts

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