| | |
| | | for (SysRole record : page.getRecords()) { |
| | | List<Integer> data = roleSiteClient.getSiteIds(record.getRoleId()).getData(); |
| | | List<Site> sites = siteClient.getSiteByIds(data).getData(); |
| | | List<String> collect = sites.stream().map(Site::getName).collect(Collectors.toList()); |
| | | record.setSiteNames(collect); |
| | | if(null != sites){ |
| | | List<String> collect = sites.stream().map(Site::getName).collect(Collectors.toList()); |
| | | record.setSiteNames(collect); |
| | | } |
| | | } |
| | | return AjaxResult.success(page); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @GetMapping(value = "/getSysRoleByIds") |
| | | @PostMapping(value = "/getSysRoleByIds") |
| | | public R<List<SysRole>> getSysRoleByIds(@RequestBody GetSysRoleByIds ids){ |
| | | List<SysRole> sysRoleByIds = roleService.getSysRoleByIds(ids.getIds()); |
| | | return R.ok(sysRoleByIds); |