接口鉴权通过

master
cheney 2 years ago
parent 9a1c599124
commit 6826d59ad7
  1. 1
      src/main/java/com/huoran/iasf/common/shiro/ShiroConfig.java
  2. 2
      src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java
  3. 2
      src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java
  4. 8
      src/main/resources/application-dev.yml

@ -141,6 +141,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sysColumn/getTheFullArticleByColumn", "anon"); filterChainDefinitionMap.put("/sysColumn/getTheFullArticleByColumn", "anon");
filterChainDefinitionMap.put("/sys/exportFailure", "anon"); filterChainDefinitionMap.put("/sys/exportFailure", "anon");
filterChainDefinitionMap.put("/sysColumnLongPage/getRedisCache", "anon"); filterChainDefinitionMap.put("/sysColumnLongPage/getRedisCache", "anon");
filterChainDefinitionMap.put("/content/classification/allTheQuery", "anon");
/*filterChainDefinitionMap.put("/index/**", "anon"); /*filterChainDefinitionMap.put("/index/**", "anon");
filterChainDefinitionMap.put("/doc.html", "anon"); filterChainDefinitionMap.put("/doc.html", "anon");
filterChainDefinitionMap.put("/swagger-resources/**", "anon"); filterChainDefinitionMap.put("/swagger-resources/**", "anon");

@ -95,7 +95,7 @@ public class SysColumnServiceImpl extends ServiceImpl<SysColumnMapper, SysColumn
if(column.getRole()==null){ if(column.getRole()==null){
}else if (column.getRole()!=null||column.getRole().equals("admin") || ObjectUtil.isNotNull(column.isIsadmin()) || column.isIsadmin()){ }else if (column.getRole()!=null&&column.getRole().equals("admin") || ObjectUtil.isNotNull(column.isIsadmin()) && column.isIsadmin()){
throw new IllegalArgumentException("参数名不能包含admin"); throw new IllegalArgumentException("参数名不能包含admin");
} }
//查询所有栏目 //查询所有栏目

@ -77,7 +77,7 @@ public class SysContentServiceImpl extends ServiceImpl<SysContentMapper, SysCont
public R newlyPublishedArticles(PageContentReqVO reqVO) { public R newlyPublishedArticles(PageContentReqVO reqVO) {
if(reqVO.getRole()==null){ if(reqVO.getRole()==null){
}else if (reqVO.getRole()!=null||reqVO.getRole().equals("admin") || ObjectUtil.isNotNull(reqVO.isIsadmin()) || reqVO.isIsadmin()){ }else if (reqVO.getRole()!=null&&reqVO.getRole().equals("admin") || ObjectUtil.isNotNull(reqVO.isIsadmin()) && reqVO.isIsadmin()){
throw new IllegalArgumentException("参数名不能包含admin"); throw new IllegalArgumentException("参数名不能包含admin");
} }
Page<PageContentRespVO> page = new Page<PageContentRespVO>(reqVO.getPageNum(), reqVO.getPageSize()); Page<PageContentRespVO> page = new Page<PageContentRespVO>(reqVO.getPageNum(), reqVO.getPageSize());

@ -6,11 +6,11 @@ spring:
datasource: datasource:
master: master:
username: root username: root
password: 123456 # password: 123456
# password: iasf#2022 password: iasf#2022
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 url: jdbc:mysql://127.0.0.1:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8
url: jdbc:mysql://192.168.31.136:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8 # url: jdbc:mysql://192.168.31.136:3306/iasf?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=GMT%2b8
cache: cache:
type: redis type: redis
redis: redis:

Loading…
Cancel
Save