utils

package
v0.0.0-...-a5c0f30 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Node    = 0 // 无资源权限
	Self    = 1 // 仅自己
	Current = 2 // 当前部门
	Deep    = 3 // 当前部门及以下
	All     = 4 // 所有
)

Variables

This section is empty.

Functions

func GetAllOrg

func GetAllOrg() []model.Organization

获取所有部门

func GetAllOrgID

func GetAllOrgID() []uint

获取所有部门ID

func GetAllUserIDs

func GetAllUserIDs() []uint

获取所有用户ID

func GetBoolPointer

func GetBoolPointer(t bool) *bool

func GetCurrentUserIDs

func GetCurrentUserIDs(id uint) []uint

获取当前部门的用户id

func GetDeepOrg

func GetDeepOrg(id uint) []uint

获取当前部门及以下部门id

func GetDeepUserIDs

func GetDeepUserIDs(id uint) []uint

获取当前部门及以下的用户id

func GetOrgIDS

func GetOrgIDS(c *gin.Context) []uint

自动获取当前用户拥有的权限的部门ID

func GetSelfOrg

func GetSelfOrg(id uint) []uint

获取当前部门ID

func GetUserIDS

func GetUserIDS(c *gin.Context) []uint

自动获取当前用户拥有的权限的用户ID

func GetUsersByOrgIds

func GetUsersByOrgIds(orgIds []uint) []uint

根据部门获取部门下用户ID

func Uniq

func Uniq(array []uint) []uint

uint 去重方法

Types

This section is empty.

Jump to

Keyboard shortcuts

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