|
|
@ -155,15 +155,18 @@ public class AuthController extends CoreBaseController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@GetMapping(value = "/menu/find-module-list/{parentId}")
|
|
|
|
@GetMapping(value = "/menu/find-module-list/{parentId}")
|
|
|
|
@ApiOperation(value = "获取登录用户功能权限信息", notes = "获取首页权限信息")
|
|
|
|
@ApiOperation(value = "获取登录用户功能权限信息", notes = "获取首页权限信息")
|
|
|
|
public ResultBean findMenuModuleList(@PathVariable("parentId") String parentId) {
|
|
|
|
public ResultBean findMenuModuleList(@PathVariable("parentId") String parentId, Integer menuSort) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ValidatorBean.checkIsNumber(parentId, "父节点不能为空");
|
|
|
|
ValidatorBean.checkIsNumber(parentId, "父节点不能为空");
|
|
|
|
|
|
|
|
|
|
|
|
List<SysMenu> result = memTreeService.packTreeSysMenuByUserIdAndParentId(getSessionUser().getUser().getId(), Long.parseLong(parentId));
|
|
|
|
List<SysMenu> result = memTreeService.packTreeSysMenuByUserIdAndParentId(getSessionUser().getUser().getId(), Long.parseLong(parentId));
|
|
|
|
for (SysMenu sysMenu : result) {
|
|
|
|
//如果menuSort为0,则不用通过menuSort字段进行排序
|
|
|
|
sysMenu.setChildList(sysMenu.getChildList().stream().sorted(Comparator.comparing(SysMenu::getMenuSort)).collect(Collectors.toList()));
|
|
|
|
if (menuSort != 0) {
|
|
|
|
|
|
|
|
for (SysMenu sysMenu : result) {
|
|
|
|
|
|
|
|
sysMenu.setChildList(sysMenu.getChildList().stream().sorted(Comparator.comparing(SysMenu::getMenuSort)).collect(Collectors.toList()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
result = result.stream().sorted(Comparator.comparing(SysMenu::getMenuSort)).collect(Collectors.toList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
result = result.stream().sorted(Comparator.comparing(SysMenu::getMenuSort)).collect(Collectors.toList());
|
|
|
|
|
|
|
|
result = sysMenuService.setLanguageSysMenuName(AuthUtil.getSessionUser().getLanguageCode(), result);
|
|
|
|
result = sysMenuService.setLanguageSysMenuName(AuthUtil.getSessionUser().getLanguageCode(), result);
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(result);
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(result);
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|