| | |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.sxkj.system.cache.SysCache; |
| | | import org.sxkj.system.entity.Role; |
| | | import org.sxkj.system.mapper.RoleMapper; |
| | | import org.sxkj.system.service.IRoleService; |
| | | import org.sxkj.system.cache.UserCache; |
| | | import org.sxkj.system.entity.User; |
| | |
| | | public class RoleController extends BladeController { |
| | | |
| | | private final IRoleService roleService; |
| | | private final RoleMapper roleMapper; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表", notes = "传入role") |
| | | public R<List<RoleVO>> list(@ApiIgnore @RequestParam Map<String, Object> role, BladeUser bladeUser) { |
| | | QueryWrapper<Role> queryWrapper = Condition.getQueryWrapper(role, Role.class); |
| | | // 不查询超级管理员角色 |
| | | // if (!AuthUtil.isAdministrator()) { |
| | | // 使用 apply 手动指定类型转换 |
| | | queryWrapper.apply("id <> {0}::bigint", "1123598816738675201"); |
| | | // } |
| | | List<Role> list = roleService.list(queryWrapper); |
| | | String roleName = (String) role.get("roleName"); |
| | | String roleAlias = (String) role.get("roleAlias"); |
| | | String sysType = (String) role.get("sysType"); |
| | | List<Role> list = roleMapper.selectRoleList(roleName, roleAlias, sysType); |
| | | return R.data(RoleWrapper.build().listNodeVO(list)); |
| | | } |
| | | |