| | |
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.utils.ServletUtils;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.common.utils.poi.ExcelUtil;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | |
| | | @GetMapping(value = "/{roleId}")
|
| | | public AjaxResult getInfo(@PathVariable Long roleId)
|
| | | {
|
| | | roleService.checkRoleDataScope(roleId);
|
| | | return AjaxResult.success(roleService.selectRoleById(roleId));
|
| | | }
|
| | |
|
| | |
| | | if (roleService.updateRole(role) > 0)
|
| | | {
|
| | | // 更新缓存用户权限
|
| | | LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
| | | LoginUser loginUser = getLoginUser();
|
| | | if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
|
| | | {
|
| | | loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
|