From cd74b557c19fcfd135bf055ace6aa0c75a898c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Thu, 5 Nov 2020 14:07:50 +0800 Subject: [PATCH 1/5] fix --- src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java index e722f2e7..ab61ede1 100644 --- a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java +++ b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java @@ -57,10 +57,6 @@ public class OAuth2Filter extends AuthenticatingFilter { protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { //获取请求token,如果token不存在,直接返回401 String token = getRequestToken((HttpServletRequest) request); - String profile = SpringContextUtils.getActiveProfile(); - if(!"prod".equals(profile) ){ - return true; - } if(StringUtils.isBlank(token)){ HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.setHeader("Access-Control-Allow-Credentials", "true"); From ff9be7b0f748aef15a6dc1fc8cdffdbe158c4828 Mon Sep 17 00:00:00 2001 From: quyixiao <2621048238@qq.com> Date: Thu, 5 Nov 2020 15:18:06 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lz/config/ShiroConfig.java | 1 + src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/lz/config/ShiroConfig.java b/src/main/java/com/lz/config/ShiroConfig.java index 0eae9bdf..36fedbc9 100644 --- a/src/main/java/com/lz/config/ShiroConfig.java +++ b/src/main/java/com/lz/config/ShiroConfig.java @@ -52,6 +52,7 @@ public class ShiroConfig { Map filterMap = new LinkedHashMap<>(); filterMap.put("/webjars/**", "anon"); filterMap.put("/file/**", "anon"); + filterMap.put("/user/lzstaffrole/role/**", "anon"); filterMap.put("/test/**", "anon"); filterMap.put("/druid/**", "anon"); filterMap.put("/app/**", "anon"); diff --git a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java index e722f2e7..ef3aecd5 100644 --- a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java +++ b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java @@ -58,9 +58,6 @@ public class OAuth2Filter extends AuthenticatingFilter { //获取请求token,如果token不存在,直接返回401 String token = getRequestToken((HttpServletRequest) request); String profile = SpringContextUtils.getActiveProfile(); - if(!"prod".equals(profile) ){ - return true; - } if(StringUtils.isBlank(token)){ HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.setHeader("Access-Control-Allow-Credentials", "true"); From 492df7f53fe512f316ae9e883a841a0d296be531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Thu, 5 Nov 2020 15:25:05 +0800 Subject: [PATCH 3/5] fix --- src/main/resources/mapper/app/ResultRecordMapper.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/mapper/app/ResultRecordMapper.xml b/src/main/resources/mapper/app/ResultRecordMapper.xml index 35ccc982..a5ddf451 100644 --- a/src/main/resources/mapper/app/ResultRecordMapper.xml +++ b/src/main/resources/mapper/app/ResultRecordMapper.xml @@ -466,6 +466,7 @@ ) + order by r.id desc