| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.model.node.ZTreeNode; |
| | | import com.dsh.guns.config.UserExt; |
| | |
| | | @ResponseBody |
| | | public List<ZTreeNode> menuTreeListByRoleId(@PathVariable Integer roleId) { |
| | | List<Long> menuIds = this.menuService.getMenuIdsByRoleId(roleId); |
| | | if (Objects.isNull(menuIds)) { |
| | | System.out.println("=====menuIds==========="+menuIds); |
| | | if (CollectionUtil.isEmpty(menuIds)) { |
| | | System.out.println("=====menuIds1==========="+menuIds); |
| | | |
| | | List<ZTreeNode> roleTreeList = this.menuService.menuTreeList(); |
| | | return roleTreeList; |
| | | } else { |
| | | |
| | | // List<ZTreeNode> roleTreeList = this.menuService.menuTreeList(); |
| | | List<ZTreeNode> roleTreeListByUserId = this.menuService.menuTreeListByMenuIds(menuIds); |
| | | return roleTreeListByUserId; |