Commit e7c3f42b by guojuxing

权限集回显修复

parent ad01b5a7
......@@ -55,31 +55,25 @@ public class RoleController {
menuIdList.add(Integer.parseInt(menuId));
}
ServiceResponse<List<MenuDTO>> menuListResult = menuApiService.listByMenuIdList(menuIdList);
ServiceResponse<List<MenuDTO>> gicResult = menuApiService
.listMenuTreeForRole(MenuProjectConstants.DEFAULT_PROJECT);
Map<String, Object> gicMap = new HashMap<>(16);
if (gicResult.isSuccess()) {
List<MenuDTO> gicMenuList = gicResult.getResult();
for (MenuDTO menuDTO : gicMenuList) {
if (menuListResult.isSuccess()) {
List<MenuDTO> menuDTOList = menuListResult.getResult();
for (MenuDTO menuDTO : menuDTOList) {
gicMap.put(menuDTO.getMenuId().toString(), 1);
}
}
vo.setGicMap(changeListToSelectTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, menuListResult.getResult(),
ServiceResponse<List<MenuDTO>> gicResult = menuApiService
.listMenuTreeForRole(MenuProjectConstants.DEFAULT_PROJECT);
vo.setGicMap(changeListToSelectTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, gicResult.getResult(),
gicMap));
//app已购买应用
ServiceResponse<List<MenuDTO>> appResult = menuApiService
.listAppPageOfHasBuy(UserDetailUtils.getUserDetail().getEnterpriseId());
Map<String, Object> appMap = new HashMap<>(16);
if (gicResult.isSuccess()) {
List<MenuDTO> appMenuList = appResult.getResult();
for (MenuDTO menuDTO : appMenuList) {
appMap.put(menuDTO.getMenuId().toString(), 1);
}
}
vo.setAppMap(changeListToSelectTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, menuListResult.getResult(),
appMap));
vo.setAppMap(changeListToSelectTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, appResult.getResult(),
gicMap));
return RestResponse.success(vo);
}
return EnterpriseRestResponse.failure(roleResult);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment