修复权限校验bug

This commit is contained in:
TinyAnts 2022-08-01 11:00:03 +08:00
parent 9d756089ec
commit 61b877528f
2 changed files with 6 additions and 6 deletions

View File

@ -36,11 +36,11 @@ public class LikeAdminInterceptor implements HandlerInterceptor {
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
// 404拦截
response.setContentType("application/json;charset=utf-8");
// if (response.getStatus() == 404) {
// AjaxResult result = AjaxResult.failed(HttpEnum.REQUEST_404_ERROR.getCode(), HttpEnum.REQUEST_404_ERROR.getMsg());
// response.getWriter().print(JSON.toJSONString(result));
// return false;
// }
if (response.getStatus() == 404) {
AjaxResult result = AjaxResult.failed(HttpEnum.REQUEST_404_ERROR.getCode(), HttpEnum.REQUEST_404_ERROR.getMsg());
response.getWriter().print(JSON.toJSONString(result));
return false;
}
// 判断请求接口
if (!(handler instanceof HandlerMethod)) {

View File

@ -109,7 +109,7 @@ public class SystemRoleMenuServiceImpl implements ISystemRoleMenuService {
if (menuIds.size() > 0) {
List<SystemMenu> systemMenus = systemMenuMapper.selectList(new QueryWrapper<SystemMenu>()
.select("id,perms")
.eq("is_show", 0)
.eq("is_disable", 0)
.in("id", menuIds)
.in("menu_type", Arrays.asList("C", "A"))
.orderByAsc(Arrays.asList("menu_sort", "id")));