mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 10:58:35 +08:00
【新增】部门岗位租户功能
This commit is contained in:
@@ -38,8 +38,12 @@ func (r *RoleApi) GetRoleList(rc *ctx.ReqCtx) {
|
||||
status := rc.GinCtx.Query("status")
|
||||
roleName := rc.GinCtx.Query("roleName")
|
||||
roleKey := rc.GinCtx.Query("roleKey")
|
||||
|
||||
role := entity.SysRole{Status: status, RoleName: roleName, RoleKey: roleKey}
|
||||
|
||||
if !IsTenantAdmin(rc.LoginAccount.TenantId) {
|
||||
role.TenantId = rc.LoginAccount.TenantId
|
||||
}
|
||||
|
||||
list, total := r.RoleApp.FindListPage(pageNum, pageSize, role)
|
||||
|
||||
rc.ResData = map[string]any{
|
||||
@@ -199,8 +203,12 @@ func (p *RoleApi) ExportRole(rc *ctx.ReqCtx) {
|
||||
status := rc.GinCtx.Query("status")
|
||||
roleName := rc.GinCtx.Query("roleName")
|
||||
roleKey := rc.GinCtx.Query("roleKey")
|
||||
role := entity.SysRole{Status: status, RoleName: roleName, RoleKey: roleKey}
|
||||
if !IsTenantAdmin(rc.LoginAccount.TenantId) {
|
||||
role.TenantId = rc.LoginAccount.TenantId
|
||||
}
|
||||
list := p.RoleApp.FindList(role)
|
||||
|
||||
list := p.RoleApp.FindList(entity.SysRole{Status: status, RoleName: roleName, RoleKey: roleKey})
|
||||
fileName := utils.GetFileName(global.Conf.Server.ExcelDir, filename)
|
||||
utils.InterfaceToExcel(*list, fileName)
|
||||
rc.Download(fileName)
|
||||
|
||||
Reference in New Issue
Block a user