Jelajahi Sumber

字典获取租户

lipenghui 5 bulan lalu
induk
melakukan
e0aa64e327

+ 3 - 1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/dict/DictDataController.java

@@ -21,6 +21,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.annotation.security.PermitAll;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.IOException;
@@ -74,7 +75,8 @@ public class DictDataController {
 
     @GetMapping("/page")
     @Operation(summary = "/获得字典类型的分页列表")
-    @PreAuthorize("@ss.hasPermission('system:dict:query')")
+    //@PreAuthorize("@ss.hasPermission('system:dict:query')")
+    @PermitAll
     public CommonResult<PageResult<DictDataRespVO>> getDictTypePage(@Valid DictDataPageReqVO pageReqVO) {
         PageResult<DictDataDO> pageResult = dictDataService.getDictDataPage(pageReqVO);
         return success(BeanUtils.toBean(pageResult, DictDataRespVO.class));

+ 2 - 2
yudao-server/src/main/resources/application-dev.yaml

@@ -43,12 +43,12 @@ spring:
       primary: master
       datasource:
         master:
-          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro-fix?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
+          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro-dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
           username: root
           password: 123456
         slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
           lazy: true # 开启懒加载,保证启动速度
-          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro-fix?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
+          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro-dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
           username: root
           password: 123456
 

+ 3 - 2
yudao-server/src/main/resources/application-local.yaml

@@ -46,7 +46,7 @@ spring:
       primary: master
       datasource:
         master:
-          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
+          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro-fix?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
           #          url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
           #          url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
           #          url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
@@ -64,7 +64,7 @@ spring:
           #          password: Yudao@2024 # OpenGauss 连接的示例
         slave: # 模拟从库,可根据自己需要修改
           lazy: true # 开启懒加载,保证启动速度
-          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
+          url: jdbc:mysql://172.16.101.77:3306/ruoyi-vue-pro-fix?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
           username: root
           password: 123456
 
@@ -244,6 +244,7 @@ justauth:
       client-id: dingik345qmyhtysvs2x
       client-secret: MIF55t94hRhI2EPaymoUF8-LRhWO6RxTxevYdwE9imdRUEZzxdgpNexqoTn2AIMr
       ignore-check-redirect-uri: true
+      ignore-check-state: true
       redirect-uri: http://1.94.244.160:81
     WECHAT_ENTERPRISE: # 企业微信
       client-id: wwd411c69a39ad2e54

+ 1 - 0
yudao-server/src/main/resources/application.yaml

@@ -260,6 +260,7 @@ yudao:
       - /jmreport/* # 积木报表,无法携带租户编号
       - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号
       - /admin-api/system/auth/social-login
+      - /admin-api/system/dict-data/page
       - /system/auth/social-login
     ignore-tables:
       - system_tenant