| | |
| | | package com.ruoyi.system.controller; |
| | | |
| | | import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.text.Convert; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | @GetMapping("/roleInfoFromUserId") |
| | | public AjaxResult<List<SysMenus>> roleInfoFromUserId( @RequestParam Long userId) |
| | | { |
| | | System.err.println("进入"); |
| | | try { |
| | | SysUserRole one = sysUserRoleService.getOne(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId)); |
| | | Long id =one.getRoleId(); |
| | | // 获取当前角色的菜单id |
| | |
| | | menus.setChildren(collect); |
| | | } |
| | | return AjaxResult.success(s1); |
| | | |
| | | }catch (Exception e){ |
| | | System.err.println("捕获"); |
| | | e.printStackTrace(); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |