From a0ca1e6e7223d6341dfb783879c405137a9ce36e Mon Sep 17 00:00:00 2001 From: smallchill Date: Tue, 4 Aug 2020 23:31:42 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20=E5=A2=9E=E5=8A=A0=E5=A4=9A=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E6=95=B0=E6=8D=AE=E5=BA=93=E9=9A=94=E7=A6=BB=E3=80=81?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=95=B0=E6=8D=AE=E6=BA=90=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/endpoint/BladeSocialEndpoint.java | 2 ++ .../auth/endpoint/BladeTokenEndPoint.java | 2 ++ .../develop/controller/CodeController.java | 2 ++ .../controller/DatasourceController.java | 4 +++- .../business/controller/WorkController.java | 4 +++- .../flow/business/feign/FlowClient.java | 2 ++ .../controller/FlowFollowController.java | 4 +++- .../controller/FlowManagerController.java | 2 ++ .../controller/FlowModelController.java | 2 ++ .../controller/FlowProcessController.java | 2 ++ .../core/log/controller/LogApiController.java | 2 ++ .../log/controller/LogErrorController.java | 2 ++ .../log/controller/LogUsualController.java | 2 ++ .../springblade/core/log/feign/LogClient.java | 6 +++-- .../resource/controller/AttachController.java | 2 ++ .../resource/controller/OssController.java | 2 ++ .../resource/controller/SmsController.java | 2 ++ .../resource/endpoint/OssEndpoint.java | 2 ++ .../resource/endpoint/SmsEndpoint.java | 2 ++ .../springblade/resource/feign/SmsClient.java | 2 ++ .../org/springblade/system/entity/Tenant.java | 5 ++++ .../desk/controller/DashBoardController.java | 4 +++- .../desk/controller/LeaveController.java | 2 ++ .../desk/controller/NoticeController.java | 2 ++ .../springblade/desk/feign/NoticeClient.java | 2 ++ .../system/controller/ApiScopeController.java | 2 ++ .../controller/AuthClientController.java | 4 +++- .../controller/DataScopeController.java | 2 ++ .../system/controller/DeptController.java | 2 ++ .../system/controller/DictBizController.java | 2 ++ .../system/controller/DictController.java | 2 ++ .../system/controller/MenuController.java | 2 ++ .../system/controller/ParamController.java | 2 ++ .../system/controller/PostController.java | 2 ++ .../system/controller/RegionController.java | 2 ++ .../system/controller/RoleController.java | 2 ++ .../system/controller/TenantController.java | 24 ++++++++++++++++--- .../system/controller/TopMenuController.java | 2 ++ .../system/feign/ApiScopeClient.java | 2 ++ .../system/feign/DataScopeClient.java | 2 ++ .../system/feign/DictBizClient.java | 2 ++ .../springblade/system/feign/DictClient.java | 2 ++ .../springblade/system/feign/SysClient.java | 2 ++ .../user/controller/UserController.java | 2 ++ .../system/user/feign/UserClient.java | 2 ++ doc/nacos/blade.yaml | 4 ++++ doc/sql/db/database-info.md | 1 + doc/sql/mysql/bladex-saber-mysql.sql | 3 ++- doc/sql/mysql/bladex-sword-mysql.sql | 3 ++- doc/sql/oracle/bladex-saber-oracle.sql | 4 +++- doc/sql/oracle/bladex-sword-oracle.sql | 2 ++ .../postgresql/bladex-saber-postgresql.sql | 4 +++- .../postgresql/bladex-sword-postgresql.sql | 4 +++- doc/sql/sqlserver/bladex-saber-sqlserver.sql | 10 +++++++- doc/sql/sqlserver/bladex-sword-sqlserver.sql | 10 +++++++- doc/sql/update/mysql-update-2.5.1~2.5.2.sql | 6 +++++ doc/sql/update/oracle-update-2.5.1~2.5.2.sql | 7 ++++++ .../update/postgresql-update-2.5.1~2.5.2.sql | 7 ++++++ 58 files changed, 177 insertions(+), 17 deletions(-) diff --git a/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeSocialEndpoint.java b/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeSocialEndpoint.java index 11add91d..eea704fa 100644 --- a/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeSocialEndpoint.java +++ b/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeSocialEndpoint.java @@ -24,6 +24,7 @@ import me.zhyd.oauth.request.AuthRequest; import me.zhyd.oauth.utils.AuthStateUtils; import org.springblade.core.social.props.SocialProperties; import org.springblade.core.social.utils.SocialUtil; +import org.springblade.core.tenant.annotation.NonDS; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @@ -37,6 +38,7 @@ import java.io.IOException; * * @author Chill */ +@NonDS @Slf4j @RestController @AllArgsConstructor diff --git a/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java b/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java index 3b8fe977..85356c2d 100644 --- a/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java +++ b/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java @@ -28,6 +28,7 @@ import org.springblade.core.launch.constant.TokenConstant; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.support.Kv; import org.springblade.core.tool.utils.StringUtil; @@ -43,6 +44,7 @@ import java.time.Duration; * * @author Chill */ +@NonDS @Slf4j @RestController @AllArgsConstructor diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java index 43251f84..84ecd9dd 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java @@ -24,6 +24,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; @@ -44,6 +45,7 @@ import java.util.Map; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/code") diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java index 68f28f24..7956a865 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java @@ -17,14 +17,15 @@ package org.springblade.develop.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.develop.entity.Datasource; @@ -39,6 +40,7 @@ import java.util.List; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/datasource") diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java index 22889f24..a2c36d2b 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java @@ -17,14 +17,15 @@ package org.springblade.flow.business.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.flowable.engine.TaskService; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.flow.business.service.FlowBusinessService; import org.springblade.flow.core.entity.BladeFlow; @@ -38,6 +39,7 @@ import org.springframework.web.bind.annotation.*; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("work") diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java index 5097c7e4..f204b293 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java @@ -21,6 +21,7 @@ import org.flowable.engine.IdentityService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; import org.flowable.engine.runtime.ProcessInstance; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.support.Kv; import org.springblade.core.tool.utils.Func; @@ -40,6 +41,7 @@ import java.util.Map; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor public class FlowClient implements IFlowClient { diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java index 3b8635b7..c2abaf47 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java @@ -17,13 +17,14 @@ package org.springblade.flow.engine.controller; import com.baomidou.mybatisplus.core.metadata.IPage; -import io.swagger.annotations.ApiOperation; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.flow.engine.entity.FlowExecution; @@ -35,6 +36,7 @@ import org.springframework.web.bind.annotation.*; * * @author Chill */ +@NonDS @RestController @RequestMapping("follow") @AllArgsConstructor diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java index 144dc72f..2604b5de 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java @@ -25,6 +25,7 @@ import lombok.AllArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.support.Kv; @@ -43,6 +44,7 @@ import java.util.Objects; * * @author Chill */ +@NonDS @RestController @RequestMapping("manager") @AllArgsConstructor diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java index d34d6b0b..d8987df0 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java @@ -26,6 +26,7 @@ import lombok.AllArgsConstructor; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; @@ -41,6 +42,7 @@ import java.util.Map; * * @author Chill */ +@NonDS @RestController @RequestMapping("model") @AllArgsConstructor diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java index 2aaf0a68..2c1a06a1 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java @@ -26,6 +26,7 @@ import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.image.ProcessDiagramGenerator; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.StringUtil; import org.springblade.flow.core.entity.BladeFlow; @@ -47,6 +48,7 @@ import java.util.List; * * @author Chill */ +@NonDS @Slf4j @RestController @AllArgsConstructor diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java index 056a9f36..6f7ca94e 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java @@ -23,6 +23,7 @@ import org.springblade.core.log.model.LogApi; import org.springblade.core.log.service.ILogApiService; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -37,6 +38,7 @@ import java.util.Map; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/api") diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java index 4a25c579..5dd1a292 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java @@ -23,6 +23,7 @@ import org.springblade.core.log.model.LogError; import org.springblade.core.log.service.ILogErrorService; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -37,6 +38,7 @@ import java.util.Map; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/error") diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java index e1528b7c..aeaee60e 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java @@ -23,6 +23,7 @@ import org.springblade.core.log.model.LogUsual; import org.springblade.core.log.service.ILogUsualService; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -37,6 +38,7 @@ import java.util.Map; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/usual") diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java index 905442fc..c232c993 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java @@ -18,11 +18,12 @@ package org.springblade.core.log.feign; import lombok.AllArgsConstructor; import org.springblade.core.log.model.LogApi; -import org.springblade.core.log.model.LogUsual; import org.springblade.core.log.model.LogError; +import org.springblade.core.log.model.LogUsual; import org.springblade.core.log.service.ILogApiService; -import org.springblade.core.log.service.ILogUsualService; import org.springblade.core.log.service.ILogErrorService; +import org.springblade.core.log.service.ILogUsualService; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -33,6 +34,7 @@ import org.springframework.web.bind.annotation.RestController; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor public class LogClient implements ILogClient { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/AttachController.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/AttachController.java index c85aed83..1a45a3f2 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/AttachController.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/AttachController.java @@ -25,6 +25,7 @@ import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.resource.entity.Attach; @@ -39,6 +40,7 @@ import javax.validation.Valid; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/attach") diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java index 09b6cc87..e510c3e7 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java @@ -27,6 +27,7 @@ import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; @@ -46,6 +47,7 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE; * * @author BladeX */ +@NonDS @ApiIgnore @RestController @AllArgsConstructor diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java index 5ee51786..940e28d3 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java @@ -27,6 +27,7 @@ import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; @@ -46,6 +47,7 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE; * * @author BladeX */ +@NonDS @ApiIgnore @RestController @AllArgsConstructor diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java index de7b365b..e662d5d6 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java @@ -22,6 +22,7 @@ import lombok.SneakyThrows; import org.springblade.core.oss.model.BladeFile; import org.springblade.core.oss.model.OssFile; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.FileUtil; @@ -37,6 +38,7 @@ import org.springframework.web.multipart.MultipartFile; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/oss/endpoint") diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java index 734c64d2..9dbcb37f 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java @@ -22,6 +22,7 @@ import lombok.SneakyThrows; import org.springblade.core.sms.model.SmsCode; import org.springblade.core.sms.model.SmsData; import org.springblade.core.sms.model.SmsResponse; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.jackson.JsonUtil; import org.springblade.core.tool.utils.Func; @@ -41,6 +42,7 @@ import static org.springblade.resource.utils.SmsUtil.*; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/sms/endpoint") diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java index 5c1847c4..691258c3 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java @@ -20,6 +20,7 @@ import lombok.AllArgsConstructor; import org.springblade.core.sms.model.SmsCode; import org.springblade.core.sms.model.SmsData; import org.springblade.core.sms.model.SmsResponse; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.jackson.JsonUtil; import org.springblade.core.tool.utils.Func; @@ -36,6 +37,7 @@ import static org.springblade.resource.utils.SmsUtil.*; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor public class SmsClient implements ISmsClient { diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java index 6f6bda15..4ef7e13d 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java @@ -88,6 +88,11 @@ public class Tenant extends BaseEntity { @JsonFormat(pattern = DateUtil.PATTERN_DATETIME) @ApiModelProperty(value = "过期时间") private Date expireTime; + /** + * 数据源ID + */ + @ApiModelProperty(value = "数据源ID") + private Long datasourceId; /** * 授权码 */ diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java index 3a139617..52ccc9d1 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java @@ -1,9 +1,10 @@ package org.springblade.desk.controller; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import lombok.AllArgsConstructor; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.support.Kv; import org.springframework.web.bind.annotation.GetMapping; @@ -19,6 +20,7 @@ import java.util.Map; * * @author zhuangqian */ +@NonDS @RestController @AllArgsConstructor @Api(value = "首页", tags = "首页") diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java index aa830a23..85639bef 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java @@ -19,6 +19,7 @@ package org.springblade.desk.controller; import lombok.AllArgsConstructor; import org.springblade.common.cache.CacheNames; import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.desk.entity.ProcessLeave; import org.springblade.desk.service.ILeaveService; @@ -31,6 +32,7 @@ import springfox.documentation.annotations.ApiIgnore; * * @author Chill */ +@NonDS @ApiIgnore @RestController @RequestMapping("/process/leave") diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java index 9b7f621e..4d857428 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java @@ -24,6 +24,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.TenantDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.desk.entity.Notice; @@ -41,6 +42,7 @@ import java.util.Map; * * @author Chill */ +@TenantDS @RestController @RequestMapping("notice") @AllArgsConstructor diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java index b3ad8db6..c612d8f6 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java @@ -21,6 +21,7 @@ import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.desk.entity.Notice; import org.springblade.desk.service.INoticeService; import org.springframework.web.bind.annotation.GetMapping; @@ -32,6 +33,7 @@ import springfox.documentation.annotations.ApiIgnore; * * @author Chill */ +@NonDS @ApiIgnore() @RestController @AllArgsConstructor diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java index 31825cb3..8137c938 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java @@ -26,6 +26,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.ApiScope; @@ -43,6 +44,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; * * @author BladeX */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("api-scope") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java index 72208188..91c9ffdf 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java @@ -17,15 +17,16 @@ package org.springblade.system.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; @@ -41,6 +42,7 @@ import javax.validation.Valid; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/client") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java index 913b60ce..ca96aa5e 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java @@ -26,6 +26,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.DataScope; @@ -43,6 +44,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; * * @author BladeX */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("data-scope") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java index 87ba872a..249ee5bc 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java @@ -25,6 +25,7 @@ import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.RoleConstant; @@ -50,6 +51,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/dept") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java index 3849737b..50f85d6e 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java @@ -24,6 +24,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.system.entity.DictBiz; import org.springblade.system.service.IDictBizService; @@ -43,6 +44,7 @@ import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/dict-biz") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java index 62eb8351..a8ecbc15 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java @@ -24,6 +24,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.system.entity.Dict; import org.springblade.system.service.IDictService; @@ -44,6 +45,7 @@ import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/dict") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java index 9b30ea0c..c456f71e 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java @@ -25,6 +25,7 @@ import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.support.Kv; @@ -52,6 +53,7 @@ import static org.springblade.core.cache.constant.CacheConstant.MENU_CACHE; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/menu") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java index cd9a606b..8ef51ac2 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java @@ -24,6 +24,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.Param; @@ -41,6 +42,7 @@ import static org.springblade.core.cache.constant.CacheConstant.PARAM_CACHE; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/param") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java index 90dd9e7c..020ab9d7 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java @@ -28,6 +28,7 @@ import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.Post; @@ -46,6 +47,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/post") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java index 770c1266..6f583210 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java @@ -26,6 +26,7 @@ import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.DateUtil; import org.springblade.system.entity.Region; @@ -49,6 +50,7 @@ import java.util.Map; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/region") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java index 28cb3cbb..8f7b4eea 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java @@ -25,6 +25,7 @@ import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.RoleConstant; @@ -48,6 +49,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/role") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java index 0756b9fe..58b16e5d 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java @@ -23,10 +23,12 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.*; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.RoleConstant; @@ -42,15 +44,19 @@ import java.util.Date; import java.util.List; import java.util.Map; +import static org.springblade.core.tenant.constant.TenantBaseConstant.TENANT_DATASOURCE_CACHE; +import static org.springblade.core.tenant.constant.TenantBaseConstant.TENANT_DATASOURCE_EXIST_KEY; + /** * 控制器 * * @author Chill */ +@NonDS +@ApiIgnore @RestController @AllArgsConstructor @RequestMapping("/tenant") -@ApiIgnore @Api(value = "租户管理", tags = "接口") public class TenantController extends BladeController { @@ -145,13 +151,25 @@ public class TenantController extends BladeController { return R.status(tenantService.setting(accountNumber, expireTime, ids)); } + /** + * 数据源配置 + */ + @PostMapping("datasource") + @ApiOperationSupport(order = 8) + @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) + @ApiOperation(value = "数据源配置", notes = "传入datasource_id") + public R datasource(@ApiParam(value = "租户ID", required = true) @RequestParam String tenantId, @ApiParam(value = "数据源ID", required = true) @RequestParam Long datasourceId){ + CacheUtil.evict(TENANT_DATASOURCE_CACHE, TENANT_DATASOURCE_EXIST_KEY, tenantId, Boolean.FALSE); + return R.status(tenantService.update(Wrappers.update().lambda().set(Tenant::getDatasourceId, datasourceId).eq(Tenant::getTenantId, tenantId))); + } + /** * 根据名称查询列表 * * @param name 租户名称 */ @GetMapping("/find-by-name") - @ApiOperationSupport(order = 8) + @ApiOperationSupport(order = 9) @ApiOperation(value = "详情", notes = "传入tenant") @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public R> findByName(String name) { @@ -165,7 +183,7 @@ public class TenantController extends BladeController { * @param domain 域名 */ @GetMapping("/info") - @ApiOperationSupport(order = 9) + @ApiOperationSupport(order = 10) @ApiOperation(value = "配置信息", notes = "传入domain") public R info(String domain) { Tenant tenant = tenantService.getOne(Wrappers.query().lambda().eq(Tenant::getDomain, domain)); diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java index 6d780a8f..0cf752e9 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java @@ -27,6 +27,7 @@ import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.annotation.PreAuth; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; @@ -44,6 +45,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; * * @author BladeX */ +@NonDS @RestController @AllArgsConstructor @RequestMapping("/topmenu") diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/ApiScopeClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/ApiScopeClient.java index 8f25819e..76433f18 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/ApiScopeClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/ApiScopeClient.java @@ -17,6 +17,7 @@ package org.springblade.system.feign; import lombok.RequiredArgsConstructor; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.utils.Func; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.web.bind.annotation.GetMapping; @@ -35,6 +36,7 @@ import static org.springblade.core.secure.constant.PermissionConstant.permission * * @author Chill */ +@NonDS @ApiIgnore @RestController @RequiredArgsConstructor diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DataScopeClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DataScopeClient.java index 417af195..5e82c008 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DataScopeClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DataScopeClient.java @@ -19,6 +19,7 @@ package org.springblade.system.feign; import lombok.RequiredArgsConstructor; import org.springblade.core.datascope.constant.DataScopeConstant; import org.springblade.core.datascope.model.DataScopeModel; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.Func; import org.springframework.jdbc.core.BeanPropertyRowMapper; @@ -36,6 +37,7 @@ import java.util.List; * * @author Chill */ +@NonDS @ApiIgnore @RestController @RequiredArgsConstructor diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java index 874087c3..feda97a9 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java @@ -18,6 +18,7 @@ package org.springblade.system.feign; import lombok.AllArgsConstructor; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.system.entity.DictBiz; import org.springblade.system.service.IDictBizService; @@ -33,6 +34,7 @@ import java.util.List; * * @author Chill */ +@NonDS @ApiIgnore @RestController @AllArgsConstructor diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java index 94f4f487..d35d6171 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java @@ -18,6 +18,7 @@ package org.springblade.system.feign; import lombok.AllArgsConstructor; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.system.entity.Dict; import org.springblade.system.service.IDictService; @@ -33,6 +34,7 @@ import java.util.List; * * @author Chill */ +@NonDS @ApiIgnore @RestController @AllArgsConstructor diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java index b63984f6..e41430a5 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java @@ -17,6 +17,7 @@ package org.springblade.system.feign; import lombok.AllArgsConstructor; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.system.entity.*; import org.springblade.system.service.*; @@ -31,6 +32,7 @@ import java.util.List; * * @author Chill */ +@NonDS @ApiIgnore @RestController @AllArgsConstructor diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java b/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java index 56c3208e..8c5342ca 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java +++ b/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java @@ -32,6 +32,7 @@ import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.annotation.PreAuth; import org.springblade.core.secure.utils.AuthUtil; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.RoleConstant; @@ -60,6 +61,7 @@ import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE; * * @author Chill */ +@NonDS @RestController @RequestMapping @AllArgsConstructor diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java b/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java index e4038f96..1a95c1ca 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java +++ b/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java @@ -18,6 +18,7 @@ package org.springblade.system.user.feign; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.AllArgsConstructor; +import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.system.user.entity.User; @@ -34,6 +35,7 @@ import org.springframework.web.bind.annotation.RestController; * * @author Chill */ +@NonDS @RestController @AllArgsConstructor public class UserClient implements IUserClient { diff --git a/doc/nacos/blade.yaml b/doc/nacos/blade.yaml index 4fbdd4ae..d8e2901f 100644 --- a/doc/nacos/blade.yaml +++ b/doc/nacos/blade.yaml @@ -127,6 +127,10 @@ blade: enhance: true #多租户授权保护 license: false + #动态数据源功能 + dynamic-datasource: false + #动态数据源全局扫描 + dynamic-global: false #多租户字段名 column: tenant_id #排除多租户逻辑 diff --git a/doc/sql/db/database-info.md b/doc/sql/db/database-info.md index 94f162d2..c5165ef5 100644 --- a/doc/sql/db/database-info.md +++ b/doc/sql/db/database-info.md @@ -437,6 +437,7 @@ Table: blade_tenant(租户表) | address | VARCHAR(255) | YES | | | 联系地址 | | account_number | INT(10) | YES | | -1 | 账号额度 | | expire_time | DATETIME(19) | YES | | | 过期时间 | +| datasource | BIGINT(19) | YES | | | 数据源ID | | license_key | VARCHAR(1000) | YES | | | 授权码 | | create_user | BIGINT(19) | YES | | | 创建人 | | create_dept | BIGINT(19) | YES | | | 创建部门 | diff --git a/doc/sql/mysql/bladex-saber-mysql.sql b/doc/sql/mysql/bladex-saber-mysql.sql index 634a59c7..880e5602 100644 --- a/doc/sql/mysql/bladex-saber-mysql.sql +++ b/doc/sql/mysql/bladex-saber-mysql.sql @@ -623,6 +623,7 @@ CREATE TABLE `blade_tenant` ( `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系地址', `account_number` int(11) NULL DEFAULT -1 COMMENT '账号额度', `expire_time` datetime(0) NULL DEFAULT NULL COMMENT '过期时间', + `datasource_id` bigint(64) NULL DEFAULT NULL COMMENT '数据源ID', `license_key` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '授权码', `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人', `create_dept` bigint(64) NULL DEFAULT NULL COMMENT '创建部门', @@ -638,7 +639,7 @@ CREATE TABLE `blade_tenant` ( -- Records of blade_tenant -- ---------------------------- BEGIN; -INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); +INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); COMMIT; -- ---------------------------- diff --git a/doc/sql/mysql/bladex-sword-mysql.sql b/doc/sql/mysql/bladex-sword-mysql.sql index acd3d6c7..31275553 100644 --- a/doc/sql/mysql/bladex-sword-mysql.sql +++ b/doc/sql/mysql/bladex-sword-mysql.sql @@ -623,6 +623,7 @@ CREATE TABLE `blade_tenant` ( `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系地址', `account_number` int(11) NULL DEFAULT -1 COMMENT '账号额度', `expire_time` datetime(0) NULL DEFAULT NULL COMMENT '过期时间', + `datasource_id` bigint(64) NULL DEFAULT NULL COMMENT '数据源ID', `license_key` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '授权码', `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人', `create_dept` bigint(64) NULL DEFAULT NULL COMMENT '创建部门', @@ -638,7 +639,7 @@ CREATE TABLE `blade_tenant` ( -- Records of blade_tenant -- ---------------------------- BEGIN; -INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); +INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); COMMIT; -- ---------------------------- diff --git a/doc/sql/oracle/bladex-saber-oracle.sql b/doc/sql/oracle/bladex-saber-oracle.sql index 449bd729..572b6f57 100644 --- a/doc/sql/oracle/bladex-saber-oracle.sql +++ b/doc/sql/oracle/bladex-saber-oracle.sql @@ -4992,6 +4992,7 @@ CREATE TABLE "BLADE_TENANT" ( "ADDRESS" NVARCHAR2(255) , "ACCOUNT_NUMBER" NUMBER DEFAULT -1 , "EXPIRE_TIME" DATE , + "DATASOURCE_ID" NUMBER(20) , "LICENSE_KEY" VARCHAR2(1000 BYTE) , "CREATE_USER" NUMBER(20) , "CREATE_DEPT" NUMBER(20) , @@ -5027,6 +5028,7 @@ COMMENT ON COLUMN "BLADE_TENANT"."CONTACT_NUMBER" IS '联系电话'; COMMENT ON COLUMN "BLADE_TENANT"."ADDRESS" IS '联系地址'; COMMENT ON COLUMN "BLADE_TENANT"."ACCOUNT_NUMBER" IS '账号额度'; COMMENT ON COLUMN "BLADE_TENANT"."EXPIRE_TIME" IS '过期时间'; +COMMENT ON COLUMN "BLADE_TENANT"."DATASOURCE_ID" IS '数据源ID'; COMMENT ON COLUMN "BLADE_TENANT"."LICENSE_KEY" IS '授权码'; COMMENT ON COLUMN "BLADE_TENANT"."CREATE_USER" IS '创建人'; COMMENT ON COLUMN "BLADE_TENANT"."CREATE_DEPT" IS '创建部门'; @@ -5040,7 +5042,7 @@ COMMENT ON TABLE "BLADE_TENANT" IS '租户表'; -- ---------------------------- -- Records of BLADE_TENANT -- ---------------------------- -INSERT INTO "BLADE_TENANT" VALUES ('1123598820738675201', '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', '-1', NULL, NULL, '1123598821738675201', '1123598813738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); +INSERT INTO "BLADE_TENANT" VALUES ('1123598820738675201', '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', '-1', NULL, NULL, NULL, '1123598821738675201', '1123598813738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-01-01 00:00:39', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0'); COMMIT; -- ---------------------------- diff --git a/doc/sql/oracle/bladex-sword-oracle.sql b/doc/sql/oracle/bladex-sword-oracle.sql index d825fd08..746ee8f2 100644 --- a/doc/sql/oracle/bladex-sword-oracle.sql +++ b/doc/sql/oracle/bladex-sword-oracle.sql @@ -4990,6 +4990,7 @@ CREATE TABLE "BLADE_TENANT" ( "ADDRESS" NVARCHAR2(255) , "ACCOUNT_NUMBER" NUMBER DEFAULT -1 , "EXPIRE_TIME" DATE , + "DATASOURCE_ID" NUMBER(20) , "LICENSE_KEY" VARCHAR2(1000 BYTE) , "CREATE_USER" NUMBER(20) , "CREATE_DEPT" NUMBER(20) , @@ -5025,6 +5026,7 @@ COMMENT ON COLUMN "BLADE_TENANT"."CONTACT_NUMBER" IS '联系电话'; COMMENT ON COLUMN "BLADE_TENANT"."ADDRESS" IS '联系地址'; COMMENT ON COLUMN "BLADE_TENANT"."ACCOUNT_NUMBER" IS '账号额度'; COMMENT ON COLUMN "BLADE_TENANT"."EXPIRE_TIME" IS '过期时间'; +COMMENT ON COLUMN "BLADE_TENANT"."DATASOURCE_ID" IS '数据源ID'; COMMENT ON COLUMN "BLADE_TENANT"."LICENSE_KEY" IS '授权码'; COMMENT ON COLUMN "BLADE_TENANT"."CREATE_USER" IS '创建人'; COMMENT ON COLUMN "BLADE_TENANT"."CREATE_DEPT" IS '创建部门'; diff --git a/doc/sql/postgresql/bladex-saber-postgresql.sql b/doc/sql/postgresql/bladex-saber-postgresql.sql index e31f455e..26b087c9 100644 --- a/doc/sql/postgresql/bladex-saber-postgresql.sql +++ b/doc/sql/postgresql/bladex-saber-postgresql.sql @@ -4664,6 +4664,7 @@ CREATE TABLE "blade_tenant" ( "address" varchar(255) COLLATE "pg_catalog"."default", "account_number" int2 DEFAULT '-1'::integer, "expire_time" timestamp(6), + "datasource_id" int8, "license_key" varchar(1000) COLLATE "pg_catalog"."default", "create_user" int8, "create_dept" int8, @@ -4684,6 +4685,7 @@ COMMENT ON COLUMN "blade_tenant"."contact_number" IS '联系电话'; COMMENT ON COLUMN "blade_tenant"."address" IS '联系地址'; COMMENT ON COLUMN "blade_tenant"."account_number" IS '账号额度'; COMMENT ON COLUMN "blade_tenant"."expire_time" IS '过期时间'; +COMMENT ON COLUMN "blade_tenant"."datasource_id" IS '数据源ID'; COMMENT ON COLUMN "blade_tenant"."license_key" IS '授权码'; COMMENT ON COLUMN "blade_tenant"."create_user" IS '创建人'; COMMENT ON COLUMN "blade_tenant"."create_dept" IS '创建部门'; @@ -4698,7 +4700,7 @@ COMMENT ON TABLE "blade_tenant" IS '租户表'; -- Records of blade_tenant -- ---------------------------- BEGIN; -INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); +INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); COMMIT; -- ---------------------------- diff --git a/doc/sql/postgresql/bladex-sword-postgresql.sql b/doc/sql/postgresql/bladex-sword-postgresql.sql index cd8f7de7..4f3d80d0 100644 --- a/doc/sql/postgresql/bladex-sword-postgresql.sql +++ b/doc/sql/postgresql/bladex-sword-postgresql.sql @@ -4662,6 +4662,7 @@ CREATE TABLE "blade_tenant" ( "address" varchar(255) COLLATE "pg_catalog"."default", "account_number" int2 DEFAULT '-1'::integer, "expire_time" timestamp(6), + "datasource_id" int8, "license_key" varchar(1000) COLLATE "pg_catalog"."default", "create_user" int8, "create_dept" int8, @@ -4682,6 +4683,7 @@ COMMENT ON COLUMN "blade_tenant"."contact_number" IS '联系电话'; COMMENT ON COLUMN "blade_tenant"."address" IS '联系地址'; COMMENT ON COLUMN "blade_tenant"."account_number" IS '账号额度'; COMMENT ON COLUMN "blade_tenant"."expire_time" IS '过期时间'; +COMMENT ON COLUMN "blade_tenant"."datasource_id" IS '数据源ID'; COMMENT ON COLUMN "blade_tenant"."license_key" IS '授权码'; COMMENT ON COLUMN "blade_tenant"."create_user" IS '创建人'; COMMENT ON COLUMN "blade_tenant"."create_dept" IS '创建部门'; @@ -4696,7 +4698,7 @@ COMMENT ON TABLE "blade_tenant" IS '租户表'; -- Records of blade_tenant -- ---------------------------- BEGIN; -INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); +INSERT INTO "blade_tenant" VALUES (1123598820738675201, '000000', '管理组', NULL, NULL, 'admin', '666666', '管理组', -1, NULL, NULL, NULL, 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0); COMMIT; -- ---------------------------- diff --git a/doc/sql/sqlserver/bladex-saber-sqlserver.sql b/doc/sql/sqlserver/bladex-saber-sqlserver.sql index 76da9235..c074b867 100644 --- a/doc/sql/sqlserver/bladex-saber-sqlserver.sql +++ b/doc/sql/sqlserver/bladex-saber-sqlserver.sql @@ -3187,6 +3187,7 @@ CREATE TABLE [dbo].[blade_tenant] ( [address] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL, [account_number] int NULL, [expire_time] datetime2(0) NULL, + [datasource_id] bigint NULL, [license_key] nvarchar(1000) COLLATE Chinese_PRC_CI_AS NULL, [create_user] bigint NULL, [create_dept] bigint NULL, @@ -3271,6 +3272,13 @@ EXEC sp_addextendedproperty 'COLUMN', N'expire_time' GO +EXEC sp_addextendedproperty +'MS_Description', N'数据源ID', +'SCHEMA', N'dbo', +'TABLE', N'blade_tenant', +'COLUMN', N'datasource_id' +GO + EXEC sp_addextendedproperty 'MS_Description', N'授权码', 'SCHEMA', N'dbo', @@ -3340,7 +3348,7 @@ GO BEGIN TRANSACTION GO -INSERT INTO [dbo].[blade_tenant] VALUES (N'1123598820738675201', N'000000', N'管理组', NULL, NULL, N'admin', N'666666', N'管理组', N'-1', NULL, NULL, N'1123598821738675201', N'1123598813738675201', N'2019-01-01 00:00:39', N'1123598821738675201', N'2019-01-01 00:00:39', N'1', N'0') +INSERT INTO [dbo].[blade_tenant] VALUES (N'1123598820738675201', N'000000', N'管理组', NULL, NULL, N'admin', N'666666', N'管理组', N'-1', NULL, NULL, NULL, N'1123598821738675201', N'1123598813738675201', N'2019-01-01 00:00:39', N'1123598821738675201', N'2019-01-01 00:00:39', N'1', N'0') GO COMMIT diff --git a/doc/sql/sqlserver/bladex-sword-sqlserver.sql b/doc/sql/sqlserver/bladex-sword-sqlserver.sql index 37315bcd..564b54f4 100644 --- a/doc/sql/sqlserver/bladex-sword-sqlserver.sql +++ b/doc/sql/sqlserver/bladex-sword-sqlserver.sql @@ -3187,6 +3187,7 @@ CREATE TABLE [dbo].[blade_tenant] ( [address] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL, [account_number] int NULL, [expire_time] datetime2(0) NULL, + [datasource_id] bigint NULL, [license_key] nvarchar(1000) COLLATE Chinese_PRC_CI_AS NULL, [create_user] bigint NULL, [create_dept] bigint NULL, @@ -3271,6 +3272,13 @@ EXEC sp_addextendedproperty 'COLUMN', N'expire_time' GO +EXEC sp_addextendedproperty +'MS_Description', N'数据源ID', +'SCHEMA', N'dbo', +'TABLE', N'blade_tenant', +'COLUMN', N'datasource_id' +GO + EXEC sp_addextendedproperty 'MS_Description', N'授权码', 'SCHEMA', N'dbo', @@ -3340,7 +3348,7 @@ GO BEGIN TRANSACTION GO -INSERT INTO [dbo].[blade_tenant] VALUES (N'1123598820738675201', N'000000', N'管理组', NULL, NULL, N'admin', N'666666', N'管理组', N'-1', NULL, NULL, N'1123598821738675201', N'1123598813738675201', N'2019-01-01 00:00:39', N'1123598821738675201', N'2019-01-01 00:00:39', N'1', N'0') +INSERT INTO [dbo].[blade_tenant] VALUES (N'1123598820738675201', N'000000', N'管理组', NULL, NULL, N'admin', N'666666', N'管理组', N'-1', NULL, NULL, NULL, N'1123598821738675201', N'1123598813738675201', N'2019-01-01 00:00:39', N'1123598821738675201', N'2019-01-01 00:00:39', N'1', N'0') GO COMMIT diff --git a/doc/sql/update/mysql-update-2.5.1~2.5.2.sql b/doc/sql/update/mysql-update-2.5.1~2.5.2.sql index b69ca521..a9ddac7a 100644 --- a/doc/sql/update/mysql-update-2.5.1~2.5.2.sql +++ b/doc/sql/update/mysql-update-2.5.1~2.5.2.sql @@ -4,6 +4,12 @@ ALTER TABLE `blade_user_oauth` ADD COLUMN `uuid` varchar(64) NULL COMMENT '第三方系统用户ID' AFTER `tenant_id`; +-- ---------------------------- +-- 租户数据源ID +-- ---------------------------- +ALTER TABLE `blade_tenant` + ADD COLUMN `datasource_id` bigint(64) NULL COMMENT '数据源' AFTER `expire_time`; + -- ---------------------------- -- 附件表 -- ---------------------------- diff --git a/doc/sql/update/oracle-update-2.5.1~2.5.2.sql b/doc/sql/update/oracle-update-2.5.1~2.5.2.sql index 047ccb8a..5ee4bf48 100644 --- a/doc/sql/update/oracle-update-2.5.1~2.5.2.sql +++ b/doc/sql/update/oracle-update-2.5.1~2.5.2.sql @@ -5,6 +5,13 @@ ALTER TABLE "BLADE_USER_OAUTH" ADD ("UUID" VARCHAR2(64) ); COMMENT ON COLUMN "BLADE_USER_OAUTH"."UUID" IS '第三方系统用户ID'; +-- ---------------------------- +-- 租户数据源ID +-- ---------------------------- +ALTER TABLE "BLADE_TENANT" + ADD ("DATASOURCE_ID" NUMBER(20) ); +COMMENT ON COLUMN "BLADE_TENANT"."DATASOURCE_ID" IS '数据源ID' + -- ---------------------------- -- 附件表 -- ---------------------------- diff --git a/doc/sql/update/postgresql-update-2.5.1~2.5.2.sql b/doc/sql/update/postgresql-update-2.5.1~2.5.2.sql index 8db58f27..63e2b86d 100644 --- a/doc/sql/update/postgresql-update-2.5.1~2.5.2.sql +++ b/doc/sql/update/postgresql-update-2.5.1~2.5.2.sql @@ -5,6 +5,13 @@ ALTER TABLE "blade_user_oauth" ADD COLUMN "uuid" varchar(64) COLLATE "pg_catalog"."default"; COMMENT ON COLUMN "blade_user_oauth"."uuid" IS '第三方系统用户ID'; +-- ---------------------------- +-- 租户数据源ID +-- ---------------------------- +ALTER TABLE "blade_tenant" + ADD COLUMN "datasource_id" int8; +COMMENT ON COLUMN "blade_tenant"."datasource_id" IS '数据源ID'; + -- ---------------------------- -- 附件表 -- ----------------------------