diff --git a/README.md b/README.md
index c8feef6..ba16447 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-
+
-
+
@@ -186,6 +186,3 @@ Apache Licence也是对商业应用友好的许可。使用者也可以在需要
-
-## 关注我们
-![](https://images.gitee.com/uploads/images/2019/0330/065148_f0ada806_410595.jpeg)
\ No newline at end of file
diff --git a/blade-auth/pom.xml b/blade-auth/pom.xml
index c3467fe..cd348d3 100644
--- a/blade-auth/pom.xml
+++ b/blade-auth/pom.xml
@@ -8,7 +8,7 @@
SpringBlade
org.springblade
- 3.1.0
+ 3.2.0
blade-auth
diff --git a/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java b/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java
index 912a1a8..5de8370 100644
--- a/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java
+++ b/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java
@@ -61,6 +61,7 @@ public class TokenUtil {
param.put(TokenConstant.OAUTH_ID, userInfo.getOauthId());
param.put(TokenConstant.USER_ID, Func.toStr(user.getId()));
param.put(TokenConstant.ROLE_ID, user.getRoleId());
+ param.put(TokenConstant.DEPT_ID, user.getDeptId());
param.put(TokenConstant.ACCOUNT, user.getAccount());
param.put(TokenConstant.USER_NAME, user.getAccount());
param.put(TokenConstant.ROLE_NAME, Func.join(userInfo.getRoles()));
diff --git a/blade-common/pom.xml b/blade-common/pom.xml
index a167f87..2ff4b64 100644
--- a/blade-common/pom.xml
+++ b/blade-common/pom.xml
@@ -5,7 +5,7 @@
SpringBlade
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-gateway/pom.xml b/blade-gateway/pom.xml
index b5ec77e..49f2049 100644
--- a/blade-gateway/pom.xml
+++ b/blade-gateway/pom.xml
@@ -5,7 +5,7 @@
SpringBlade
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java b/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java
index 1e29459..0e5a7f0 100644
--- a/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java
+++ b/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java
@@ -61,7 +61,7 @@ public class AuthFilter implements GlobalFilter, Ordered {
ServerHttpResponse resp = exchange.getResponse();
String headerToken = exchange.getRequest().getHeaders().getFirst(AuthProvider.AUTH_KEY);
String paramToken = exchange.getRequest().getQueryParams().getFirst(AuthProvider.AUTH_KEY);
- if (StringUtils.isAllBlank(headerToken, paramToken)) {
+ if (StringUtils.isBlank(headerToken) && StringUtils.isBlank(paramToken)) {
return unAuth(resp, "缺失令牌,鉴权失败");
}
String auth = StringUtils.isBlank(headerToken) ? paramToken : headerToken;
diff --git a/blade-ops/blade-admin/pom.xml b/blade-ops/blade-admin/pom.xml
index cce71b3..f1d835c 100644
--- a/blade-ops/blade-admin/pom.xml
+++ b/blade-ops/blade-admin/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-ops/blade-develop/pom.xml b/blade-ops/blade-develop/pom.xml
index aecc99b..350af89 100644
--- a/blade-ops/blade-develop/pom.xml
+++ b/blade-ops/blade-develop/pom.xml
@@ -6,7 +6,7 @@
org.springblade
blade-ops
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-ops/blade-report/pom.xml b/blade-ops/blade-report/pom.xml
index 933269a..99ed51d 100644
--- a/blade-ops/blade-report/pom.xml
+++ b/blade-ops/blade-report/pom.xml
@@ -5,7 +5,7 @@
org.springblade
blade-ops
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-ops/blade-resource/pom.xml b/blade-ops/blade-resource/pom.xml
index 377a0bb..6d2f36a 100644
--- a/blade-ops/blade-resource/pom.xml
+++ b/blade-ops/blade-resource/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-ops/blade-seata-order/pom.xml b/blade-ops/blade-seata-order/pom.xml
index 0ce4b87..0a7e5e3 100644
--- a/blade-ops/blade-seata-order/pom.xml
+++ b/blade-ops/blade-seata-order/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-ops/blade-seata-storage/pom.xml b/blade-ops/blade-seata-storage/pom.xml
index d8cffc4..97c0ef1 100644
--- a/blade-ops/blade-seata-storage/pom.xml
+++ b/blade-ops/blade-seata-storage/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-ops/blade-swagger/pom.xml b/blade-ops/blade-swagger/pom.xml
index 7435ff0..695223e 100644
--- a/blade-ops/blade-swagger/pom.xml
+++ b/blade-ops/blade-swagger/pom.xml
@@ -5,7 +5,7 @@
blade-ops
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-ops/pom.xml b/blade-ops/pom.xml
index 06e2d85..2c8ddc0 100644
--- a/blade-ops/pom.xml
+++ b/blade-ops/pom.xml
@@ -5,13 +5,13 @@
SpringBlade
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
blade-ops
${project.artifactId}
- 3.1.0
+ 3.2.0
pom
blade-admin
diff --git a/blade-service-api/blade-demo-api/pom.xml b/blade-service-api/blade-demo-api/pom.xml
index b183541..2fca853 100644
--- a/blade-service-api/blade-demo-api/pom.xml
+++ b/blade-service-api/blade-demo-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service-api/blade-desk-api/pom.xml b/blade-service-api/blade-desk-api/pom.xml
index 240136b..9258727 100644
--- a/blade-service-api/blade-desk-api/pom.xml
+++ b/blade-service-api/blade-desk-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service-api/blade-dict-api/pom.xml b/blade-service-api/blade-dict-api/pom.xml
index 2652398..bde6b39 100644
--- a/blade-service-api/blade-dict-api/pom.xml
+++ b/blade-service-api/blade-dict-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service-api/blade-scope-api/pom.xml b/blade-service-api/blade-scope-api/pom.xml
new file mode 100644
index 0000000..43487bd
--- /dev/null
+++ b/blade-service-api/blade-scope-api/pom.xml
@@ -0,0 +1,30 @@
+
+
+
+ blade-service-api
+ org.springblade
+ 3.2.0
+
+ 4.0.0
+
+ blade-scope-api
+ ${project.artifactId}
+ ${blade.project.version}
+ jar
+
+
+
+ org.springblade
+ blade-core-secure
+ ${blade.tool.version}
+
+
+ org.springblade
+ blade-core-datascope
+ ${blade.tool.version}
+
+
+
+
diff --git a/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/cache/DataScopeCache.java b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/cache/DataScopeCache.java
new file mode 100644
index 0000000..a55a156
--- /dev/null
+++ b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/cache/DataScopeCache.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.cache;
+
+import org.springblade.core.datascope.model.DataScopeModel;
+import org.springblade.core.tool.utils.*;
+import org.springblade.system.feign.IDataScopeClient;
+
+import java.util.List;
+
+import static org.springblade.core.tool.utils.CacheUtil.SYS_CACHE;
+
+
+/**
+ * 数据权限缓存
+ *
+ * @author Chill
+ */
+public class DataScopeCache {
+
+ private static final String SCOPE_CACHE_CODE = "dataScope:code:";
+ private static final String SCOPE_CACHE_CLASS = "dataScope:class:";
+ private static final String DEPT_CACHE_ANCESTORS = "dept:ancestors:";
+
+ private static IDataScopeClient dataScopeClient;
+
+ private static IDataScopeClient getDataScopeClient() {
+ if (dataScopeClient == null) {
+ dataScopeClient = SpringUtil.getBean(IDataScopeClient.class);
+ }
+ return dataScopeClient;
+ }
+
+ /**
+ * 获取数据权限
+ *
+ * @param mapperId 数据权限mapperId
+ * @param roleId 用户角色集合
+ * @return DataScopeModel
+ */
+ public static DataScopeModel getDataScopeByMapper(String mapperId, String roleId) {
+ DataScopeModel dataScope = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_CLASS, mapperId + StringPool.COLON + roleId, DataScopeModel.class);
+ if (dataScope == null || !dataScope.getSearched()) {
+ dataScope = getDataScopeClient().getDataScopeByMapper(mapperId, roleId);
+ CacheUtil.put(SYS_CACHE, SCOPE_CACHE_CLASS, mapperId + StringPool.COLON + roleId, dataScope);
+ }
+ return StringUtil.isNotBlank(dataScope.getResourceCode()) ? dataScope : null;
+ }
+
+ /**
+ * 获取数据权限
+ *
+ * @param code 数据权限资源编号
+ * @return DataScopeModel
+ */
+ public static DataScopeModel getDataScopeByCode(String code) {
+ DataScopeModel dataScope = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_CODE, code, DataScopeModel.class);
+ if (dataScope == null || !dataScope.getSearched()) {
+ dataScope = getDataScopeClient().getDataScopeByCode(code);
+ CacheUtil.put(SYS_CACHE, SCOPE_CACHE_CODE, code, dataScope);
+ }
+ return StringUtil.isNotBlank(dataScope.getResourceCode()) ? dataScope : null;
+ }
+
+ /**
+ * 获取部门子级
+ *
+ * @param deptId 部门id
+ * @return deptIds
+ */
+ public static List getDeptAncestors(Long deptId) {
+ List ancestors = CacheUtil.get(SYS_CACHE, DEPT_CACHE_ANCESTORS, deptId, List.class);
+ if (CollectionUtil.isEmpty(ancestors)) {
+ ancestors = getDataScopeClient().getDeptAncestors(deptId);
+ CacheUtil.put(SYS_CACHE, DEPT_CACHE_ANCESTORS, deptId, ancestors);
+ }
+ return ancestors;
+ }
+}
diff --git a/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/config/ScopeConfiguration.java b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/config/ScopeConfiguration.java
new file mode 100644
index 0000000..365d5e7
--- /dev/null
+++ b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/config/ScopeConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.config;
+
+
+import lombok.AllArgsConstructor;
+import org.springblade.core.datascope.handler.ScopeModelHandler;
+import org.springblade.core.secure.config.RegistryConfiguration;
+import org.springblade.system.handler.DataScopeModelHandler;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 公共封装包配置类
+ *
+ * @author Chill
+ */
+@Configuration
+@AllArgsConstructor
+@AutoConfigureBefore(RegistryConfiguration.class)
+public class ScopeConfiguration {
+
+ @Bean
+ public ScopeModelHandler scopeModelHandler() {
+ return new DataScopeModelHandler();
+ }
+
+}
diff --git a/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/feign/IDataScopeClient.java b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/feign/IDataScopeClient.java
new file mode 100644
index 0000000..6dc5b16
--- /dev/null
+++ b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/feign/IDataScopeClient.java
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.feign;
+
+import org.springblade.core.datascope.model.DataScopeModel;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+/**
+ * 数据权限Feign接口类
+ *
+ * @author Chill
+ */
+@FeignClient(
+ value = AppConstant.APPLICATION_SYSTEM_NAME,
+ fallback = IDataScopeClientFallback.class
+)
+public interface IDataScopeClient {
+
+ String API_PREFIX = "/client/data-scope";
+ String GET_DATA_SCOPE_BY_MAPPER = API_PREFIX + "/by-mapper";
+ String GET_DATA_SCOPE_BY_CODE = API_PREFIX + "/by-code";
+ String GET_DEPT_ANCESTORS = API_PREFIX + "/dept-ancestors";
+
+ /**
+ * 获取数据权限
+ *
+ * @param mapperId 数据权限mapperId
+ * @param roleId 用户角色集合
+ * @return DataScopeModel
+ */
+ @GetMapping(GET_DATA_SCOPE_BY_MAPPER)
+ DataScopeModel getDataScopeByMapper(@RequestParam("mapperId") String mapperId, @RequestParam("roleId") String roleId);
+
+ /**
+ * 获取数据权限
+ *
+ * @param code 数据权限资源编号
+ * @return DataScopeModel
+ */
+ @GetMapping(GET_DATA_SCOPE_BY_CODE)
+ DataScopeModel getDataScopeByCode(@RequestParam("code") String code);
+
+ /**
+ * 获取部门子级
+ *
+ * @param deptId 部门id
+ * @return deptIds
+ */
+ @GetMapping(GET_DEPT_ANCESTORS)
+ List getDeptAncestors(@RequestParam("deptId") Long deptId);
+
+
+}
diff --git a/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/feign/IDataScopeClientFallback.java b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/feign/IDataScopeClientFallback.java
new file mode 100644
index 0000000..abcd35a
--- /dev/null
+++ b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/feign/IDataScopeClientFallback.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.feign;
+
+import org.springblade.core.datascope.model.DataScopeModel;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * IDataScopeClientFallback
+ *
+ * @author Chill
+ */
+@Component
+public class IDataScopeClientFallback implements IDataScopeClient {
+ @Override
+ public DataScopeModel getDataScopeByMapper(String mapperId, String roleId) {
+ return null;
+ }
+
+ @Override
+ public DataScopeModel getDataScopeByCode(String code) {
+ return null;
+ }
+
+ @Override
+ public List getDeptAncestors(Long deptId) {
+ return null;
+ }
+}
diff --git a/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/handler/DataScopeModelHandler.java b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/handler/DataScopeModelHandler.java
new file mode 100644
index 0000000..2e7cb67
--- /dev/null
+++ b/blade-service-api/blade-scope-api/src/main/java/org/springblade/system/handler/DataScopeModelHandler.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.handler;
+
+import org.springblade.core.datascope.handler.ScopeModelHandler;
+import org.springblade.core.datascope.model.DataScopeModel;
+import org.springblade.system.cache.DataScopeCache;
+
+import java.util.List;
+
+/**
+ * 通用数据权限规则
+ *
+ * @author Chill
+ */
+public class DataScopeModelHandler implements ScopeModelHandler {
+
+ /**
+ * 获取数据权限
+ *
+ * @param mapperId 数据权限mapperId
+ * @param roleId 用户角色集合
+ * @return DataScopeModel
+ */
+ @Override
+ public DataScopeModel getDataScopeByMapper(String mapperId, String roleId) {
+ return DataScopeCache.getDataScopeByMapper(mapperId, roleId);
+ }
+
+ /**
+ * 获取数据权限
+ *
+ * @param code 数据权限资源编号
+ * @return DataScopeModel
+ */
+ @Override
+ public DataScopeModel getDataScopeByCode(String code) {
+ return DataScopeCache.getDataScopeByCode(code);
+ }
+
+ /**
+ * 获取部门子级
+ *
+ * @param deptId 部门id
+ * @return deptIds
+ */
+ @Override
+ public List getDeptAncestors(Long deptId) {
+ return DataScopeCache.getDeptAncestors(deptId);
+ }
+}
diff --git a/blade-service-api/blade-system-api/pom.xml b/blade-service-api/blade-system-api/pom.xml
index 0fe4c24..c788723 100644
--- a/blade-service-api/blade-system-api/pom.xml
+++ b/blade-service-api/blade-system-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java
new file mode 100644
index 0000000..486763d
--- /dev/null
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java
@@ -0,0 +1,97 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ */
+@Data
+@TableName("blade_scope_data")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "DataScope对象", description = "DataScope对象")
+public class DataScope extends BaseEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @ApiModelProperty(value = "主键")
+ @TableId(value = "id", type = IdType.ASSIGN_ID)
+ @JsonSerialize(using = ToStringSerializer.class)
+ private Long id;
+
+ /**
+ * 菜单主键
+ */
+ @ApiModelProperty(value = "菜单主键")
+ private Long menuId;
+ /**
+ * 资源编号
+ */
+ @ApiModelProperty(value = "资源编号")
+ private String resourceCode;
+ /**
+ * 数据权限名称
+ */
+ @ApiModelProperty(value = "数据权限名称")
+ private String scopeName;
+ /**
+ * 数据权限可见字段
+ */
+ @ApiModelProperty(value = "数据权限可见字段")
+ private String scopeField;
+ /**
+ * 数据权限类名
+ */
+ @ApiModelProperty(value = "数据权限类名")
+ private String scopeClass;
+ /**
+ * 数据权限字段
+ */
+ @ApiModelProperty(value = "数据权限字段")
+ private String scopeColumn;
+ /**
+ * 数据权限类型
+ */
+ @ApiModelProperty(value = "数据权限类型")
+ private Integer scopeType;
+ /**
+ * 数据权限值域
+ */
+ @ApiModelProperty(value = "数据权限值域")
+ private String scopeValue;
+ /**
+ * 数据权限备注
+ */
+ @ApiModelProperty(value = "数据权限备注")
+ private String remark;
+
+
+}
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Dept.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Dept.java
index 9350877..367daec 100644
--- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Dept.java
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Dept.java
@@ -60,6 +60,12 @@ public class Dept implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
private Long parentId;
+ /**
+ * 祖级机构主键
+ */
+ @ApiModelProperty(value = "祖级机构主键")
+ private String ancestors;
+
/**
* 部门名
*/
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleScope.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleScope.java
new file mode 100644
index 0000000..756a015
--- /dev/null
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleScope.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 实体类
+ *
+ * @author Chill
+ */
+@Data
+@TableName("blade_role_scope")
+@ApiModel(value = "RoleScope对象", description = "RoleScope对象")
+public class RoleScope implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty(value = "主键")
+ @TableId(value = "id", type = IdType.ASSIGN_ID)
+ private Long id;
+
+ /**
+ * 权限id
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty(value = "权限id")
+ private Long scopeId;
+
+ /**
+ * 角色id
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty(value = "角色id")
+ private Long roleId;
+
+
+}
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/CheckedTreeVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/CheckedTreeVO.java
new file mode 100644
index 0000000..7156c7a
--- /dev/null
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/CheckedTreeVO.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * CheckedTreeVO
+ *
+ * @author Chill
+ */
+@Data
+public class CheckedTreeVO {
+
+ private List menu;
+
+ private List dataScope;
+
+}
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/DataScopeVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/DataScopeVO.java
new file mode 100644
index 0000000..59c8d40
--- /dev/null
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/DataScopeVO.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.system.entity.DataScope;
+
+/**
+ * 视图实体类
+ *
+ * @author Chill
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "DataScopeVO对象", description = "DataScopeVO对象")
+public class DataScopeVO extends DataScope {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 规则类型名
+ */
+ private String scopeTypeName;
+}
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantTreeVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantTreeVO.java
new file mode 100644
index 0000000..4d9c144
--- /dev/null
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantTreeVO.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * GrantTreeVO
+ *
+ * @author Chill
+ */
+@Data
+public class GrantTreeVO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private List menu;
+
+ private List dataScope;
+
+}
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java
index 79797f1..31cbc80 100644
--- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantVO.java
@@ -36,4 +36,7 @@ public class GrantVO implements Serializable {
@ApiModelProperty(value = "menuIds集合")
private List menuIds;
+ @ApiModelProperty(value = "dataScopeIds集合")
+ private List dataScopeIds;
+
}
diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/MenuVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/MenuVO.java
index b27071f..60a76ae 100644
--- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/MenuVO.java
+++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/MenuVO.java
@@ -56,6 +56,12 @@ public class MenuVO extends Menu implements INode {
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List children;
+ /**
+ * 是否有子孙节点
+ */
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
+ private Boolean hasChildren;
+
@Override
public List getChildren() {
if (this.children == null) {
diff --git a/blade-service-api/blade-user-api/pom.xml b/blade-service-api/blade-user-api/pom.xml
index be91de0..b7a50bb 100644
--- a/blade-service-api/blade-user-api/pom.xml
+++ b/blade-service-api/blade-user-api/pom.xml
@@ -5,7 +5,7 @@
blade-service-api
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service-api/pom.xml b/blade-service-api/pom.xml
index 0c47684..617c26e 100644
--- a/blade-service-api/pom.xml
+++ b/blade-service-api/pom.xml
@@ -5,13 +5,13 @@
SpringBlade
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
blade-service-api
${project.artifactId}
- 3.1.0
+ 3.2.0
pom
SpringBlade 微服务API集合
@@ -20,6 +20,7 @@
blade-dict-api
blade-system-api
blade-user-api
+ blade-scope-api
blade-demo-api
diff --git a/blade-service/blade-demo/pom.xml b/blade-service/blade-demo/pom.xml
index c9b6d2e..8c52f70 100644
--- a/blade-service/blade-demo/pom.xml
+++ b/blade-service/blade-demo/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service/blade-desk/pom.xml b/blade-service/blade-desk/pom.xml
index 3fd8813..f7304c9 100644
--- a/blade-service/blade-desk/pom.xml
+++ b/blade-service/blade-desk/pom.xml
@@ -6,7 +6,7 @@
org.springblade
blade-service
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service/blade-desk/src/test/java/BladeDemoTest.java b/blade-service/blade-desk/src/test/java/BladeDemoTest.java
index 86ed5a3..66e31da 100644
--- a/blade-service/blade-desk/src/test/java/BladeDemoTest.java
+++ b/blade-service/blade-desk/src/test/java/BladeDemoTest.java
@@ -22,7 +22,7 @@ public class BladeDemoTest {
@Test
public void contextLoads() {
- int count = noticeService.count();
+ Long count = noticeService.count();
System.out.println("notice数量:[" + count + "] 个");
}
diff --git a/blade-service/blade-log/pom.xml b/blade-service/blade-log/pom.xml
index 22cc540..67e8c3b 100644
--- a/blade-service/blade-log/pom.xml
+++ b/blade-service/blade-log/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service/blade-system/pom.xml b/blade-service/blade-system/pom.xml
index 548fb4c..201430b 100644
--- a/blade-service/blade-system/pom.xml
+++ b/blade-service/blade-system/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
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
new file mode 100644
index 0000000..214055e
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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 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.tool.api.R;
+import org.springblade.core.tool.utils.CacheUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.system.entity.DataScope;
+import org.springblade.system.service.IDataScopeService;
+import org.springblade.system.vo.DataScopeVO;
+import org.springblade.system.wrapper.DataScopeWrapper;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+import static org.springblade.core.tool.utils.CacheUtil.SYS_CACHE;
+
+/**
+ * 数据权限控制器
+ *
+ * @author BladeX
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/data-scope")
+@Api(value = "数据权限", tags = "数据权限")
+public class DataScopeController extends BladeController {
+
+ private final IDataScopeService dataScopeService;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入dataScope")
+ public R detail(DataScope dataScope) {
+ DataScope detail = dataScopeService.getOne(Condition.getQueryWrapper(dataScope));
+ return R.data(detail);
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入dataScope")
+ public R> list(DataScope dataScope, Query query) {
+ IPage pages = dataScopeService.page(Condition.getPage(query), Condition.getQueryWrapper(dataScope));
+ return R.data(DataScopeWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "新增", notes = "传入dataScope")
+ public R save(@Valid @RequestBody DataScope dataScope) {
+ CacheUtil.clear(SYS_CACHE);
+ return R.status(dataScopeService.save(dataScope));
+ }
+
+ /**
+ * 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "修改", notes = "传入dataScope")
+ public R update(@Valid @RequestBody DataScope dataScope) {
+ CacheUtil.clear(SYS_CACHE);
+ return R.status(dataScopeService.updateById(dataScope));
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "新增或修改", notes = "传入dataScope")
+ public R submit(@Valid @RequestBody DataScope dataScope) {
+ CacheUtil.clear(SYS_CACHE);
+ return R.status(dataScopeService.saveOrUpdate(dataScope));
+ }
+
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ CacheUtil.clear(SYS_CACHE);
+ return R.status(dataScopeService.deleteLogic(Func.toLongList(ids)));
+ }
+
+}
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 5e161cc..8800e96 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
@@ -96,11 +96,8 @@ public class DeptController extends BladeController {
@PostMapping("/submit")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增或修改", notes = "传入dept")
- public R submit(@Valid @RequestBody Dept dept, BladeUser user) {
- if (Func.isEmpty(dept.getId())) {
- dept.setTenantId(user.getTenantId());
- }
- return R.status(deptService.saveOrUpdate(dept));
+ public R submit(@Valid @RequestBody Dept dept) {
+ return R.status(deptService.submit(dept));
}
/**
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 aa19580..30836e8 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
@@ -28,6 +28,8 @@ import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.Menu;
import org.springblade.system.service.IMenuService;
+import org.springblade.system.vo.CheckedTreeVO;
+import org.springblade.system.vo.GrantTreeVO;
import org.springblade.system.vo.MenuVO;
import org.springblade.system.wrapper.MenuWrapper;
import org.springframework.web.bind.annotation.*;
@@ -74,17 +76,48 @@ public class MenuController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "列表", notes = "传入menu")
public R> list(@ApiIgnore @RequestParam Map menu) {
- @SuppressWarnings("unchecked")
List list = menuService.list(Condition.getQueryWrapper(menu, Menu.class).lambda().orderByAsc(Menu::getSort));
return R.data(MenuWrapper.build().listNodeVO(list));
}
+ /**
+ * 菜单列表
+ */
+ @GetMapping("/menu-list")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
+ @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
+ })
+ @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "菜单列表", notes = "传入menu")
+ public R> menuList(@ApiIgnore @RequestParam Map menu) {
+ List list = menuService.list(Condition.getQueryWrapper(menu, Menu.class).lambda().eq(Menu::getCategory, 1).orderByAsc(Menu::getSort));
+ return R.data(MenuWrapper.build().listNodeVO(list));
+ }
+
+ /**
+ * 懒加载菜单列表
+ */
+ @GetMapping("/lazy-menu-list")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
+ @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
+ })
+ @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "懒加载菜单列表", notes = "传入menu")
+ public R> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map menu) {
+ List list = menuService.lazyMenuList(parentId, menu);
+ return R.data(MenuWrapper.build().listNodeLazyVO(list));
+ }
+
/**
* 新增或修改
*/
@PostMapping("/submit")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
- @ApiOperationSupport(order = 3)
+ @ApiOperationSupport(order = 5)
@ApiOperation(value = "新增或修改", notes = "传入menu")
public R submit(@Valid @RequestBody Menu menu) {
return R.status(menuService.saveOrUpdate(menu));
@@ -96,7 +129,7 @@ public class MenuController extends BladeController {
*/
@PostMapping("/remove")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
- @ApiOperationSupport(order = 4)
+ @ApiOperationSupport(order = 6)
@ApiOperation(value = "删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(menuService.removeByIds(Func.toLongList(ids)));
@@ -106,7 +139,7 @@ public class MenuController extends BladeController {
* 前端菜单数据
*/
@GetMapping("/routes")
- @ApiOperationSupport(order = 5)
+ @ApiOperationSupport(order = 7)
@ApiOperation(value = "前端菜单数据", notes = "前端菜单数据")
public R> routes(BladeUser user) {
List list = menuService.routes((user == null || user.getUserId() == 0L) ? null : user.getRoleId());
@@ -117,7 +150,7 @@ public class MenuController extends BladeController {
* 前端按钮数据
*/
@GetMapping("/buttons")
- @ApiOperationSupport(order = 6)
+ @ApiOperationSupport(order = 8)
@ApiOperation(value = "前端按钮数据", notes = "前端按钮数据")
public R> buttons(BladeUser user) {
List list = menuService.buttons(user.getRoleId());
@@ -128,7 +161,7 @@ public class MenuController extends BladeController {
* 获取菜单树形结构
*/
@GetMapping("/tree")
- @ApiOperationSupport(order = 7)
+ @ApiOperationSupport(order = 9)
@ApiOperation(value = "树形结构", notes = "树形结构")
public R> tree() {
List tree = menuService.tree();
@@ -139,27 +172,33 @@ public class MenuController extends BladeController {
* 获取权限分配树形结构
*/
@GetMapping("/grant-tree")
- @ApiOperationSupport(order = 8)
+ @ApiOperationSupport(order = 10)
@ApiOperation(value = "权限分配树形结构", notes = "权限分配树形结构")
- public R> grantTree(BladeUser user) {
- return R.data(menuService.grantTree(user));
+ public R grantTree(BladeUser user) {
+ GrantTreeVO vo = new GrantTreeVO();
+ vo.setMenu(menuService.grantTree(user));
+ vo.setDataScope(menuService.grantDataScopeTree(user));
+ return R.data(vo);
}
/**
* 获取权限分配树形结构
*/
@GetMapping("/role-tree-keys")
- @ApiOperationSupport(order = 9)
+ @ApiOperationSupport(order = 11)
@ApiOperation(value = "角色所分配的树", notes = "角色所分配的树")
- public R> roleTreeKeys(String roleIds) {
- return R.data(menuService.roleTreeKeys(roleIds));
+ public R roleTreeKeys(String roleIds) {
+ CheckedTreeVO vo = new CheckedTreeVO();
+ vo.setMenu(menuService.roleTreeKeys(roleIds));
+ vo.setDataScope(menuService.dataScopeTreeKeys(roleIds));
+ return R.data(vo);
}
/**
* 获取配置的角色权限
*/
@GetMapping("auth-routes")
- @ApiOperationSupport(order = 10)
+ @ApiOperationSupport(order = 12)
@ApiOperation(value = "菜单的角色权限")
public R> authRoutes(BladeUser user) {
if (Func.isEmpty(user) || user.getUserId() == 0L) {
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 f9d1f71..ef365de 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.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.INode;
+import org.springblade.core.tool.utils.CacheUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.Role;
import org.springblade.system.service.IRoleService;
@@ -38,6 +39,8 @@ import javax.validation.Valid;
import java.util.List;
import java.util.Map;
+import static org.springblade.core.tool.utils.CacheUtil.SYS_CACHE;
+
/**
* 控制器
*
@@ -89,27 +92,41 @@ public class RoleController extends BladeController {
return R.data(tree);
}
+
+ /**
+ * 获取指定角色树形结构
+ */
+ @GetMapping("/tree-by-id")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "树形结构", notes = "树形结构")
+ public R> treeById(Long roleId, BladeUser bladeUser) {
+ Role role = roleService.getById(roleId);
+ List tree = roleService.tree(Func.notNull(role) ? role.getTenantId() : bladeUser.getTenantId());
+ return R.data(tree);
+ }
+
/**
* 新增或修改
*/
@PostMapping("/submit")
- @ApiOperationSupport(order = 4)
+ @ApiOperationSupport(order = 5)
@ApiOperation(value = "新增或修改", notes = "传入role")
public R submit(@Valid @RequestBody Role role, BladeUser user) {
+ CacheUtil.clear(SYS_CACHE);
if (Func.isEmpty(role.getId())) {
role.setTenantId(user.getTenantId());
}
return R.status(roleService.saveOrUpdate(role));
}
-
/**
* 删除
*/
@PostMapping("/remove")
- @ApiOperationSupport(order = 5)
+ @ApiOperationSupport(order = 6)
@ApiOperation(value = "删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ CacheUtil.clear(SYS_CACHE);
return R.status(roleService.removeByIds(Func.toLongList(ids)));
}
@@ -117,11 +134,11 @@ public class RoleController extends BladeController {
* 设置菜单权限
*/
@PostMapping("/grant")
- @ApiOperationSupport(order = 6)
+ @ApiOperationSupport(order = 7)
@ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合")
public R grant(@RequestBody GrantVO grantVO) {
- boolean temp = roleService.grant(grantVO.getRoleIds(), grantVO.getMenuIds());
+ CacheUtil.clear(SYS_CACHE);
+ boolean temp = roleService.grant(grantVO.getRoleIds(), grantVO.getMenuIds(), grantVO.getDataScopeIds());
return R.status(temp);
}
-
}
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
new file mode 100644
index 0000000..9167bc4
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DataScopeClient.java
@@ -0,0 +1,106 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+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.tool.utils.CollectionUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.jdbc.core.BeanPropertyRowMapper;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 数据权限Feign实现类
+ *
+ * @author Chill
+ */
+@ApiIgnore
+@RestController
+@RequiredArgsConstructor
+public class DataScopeClient implements IDataScopeClient {
+
+ private static final DataScopeModel SEARCHED_DATA_SCOPE_MODEL = new DataScopeModel(Boolean.TRUE);
+
+ private final JdbcTemplate jdbcTemplate;
+
+ /**
+ * 获取数据权限
+ *
+ * @param mapperId 数据权限mapperId
+ * @param roleId 用户角色集合
+ * @return DataScopeModel
+ */
+ @Override
+ @GetMapping(GET_DATA_SCOPE_BY_MAPPER)
+ public DataScopeModel getDataScopeByMapper(String mapperId, String roleId) {
+ List args = new ArrayList<>(Collections.singletonList(mapperId));
+ List roleIds = Func.toLongList(roleId);
+ args.addAll(roleIds);
+ // 增加searched字段防止未配置的参数重复读库导致缓存击穿
+ // 后续若有新增配置则会清空缓存重新加载
+ DataScopeModel dataScope;
+ List list = jdbcTemplate.query(DataScopeConstant.dataByMapper(roleIds.size()), args.toArray(), new BeanPropertyRowMapper<>(DataScopeModel.class));
+ if (CollectionUtil.isNotEmpty(list)) {
+ dataScope = list.iterator().next();
+ dataScope.setSearched(Boolean.TRUE);
+ } else {
+ dataScope = SEARCHED_DATA_SCOPE_MODEL;
+ }
+ return dataScope;
+ }
+
+ /**
+ * 获取数据权限
+ *
+ * @param code 数据权限资源编号
+ * @return DataScopeModel
+ */
+ @Override
+ @GetMapping(GET_DATA_SCOPE_BY_CODE)
+ public DataScopeModel getDataScopeByCode(String code) {
+ // 增加searched字段防止未配置的参数重复读库导致缓存击穿
+ // 后续若有新增配置则会清空缓存重新加载
+ DataScopeModel dataScope;
+ List list = jdbcTemplate.query(DataScopeConstant.DATA_BY_CODE, new Object[]{code}, new BeanPropertyRowMapper<>(DataScopeModel.class));
+ if (CollectionUtil.isNotEmpty(list)) {
+ dataScope = list.iterator().next();
+ dataScope.setSearched(Boolean.TRUE);
+ } else {
+ dataScope = SEARCHED_DATA_SCOPE_MODEL;
+ }
+ return dataScope;
+ }
+
+ /**
+ * 获取部门子级
+ *
+ * @param deptId 部门id
+ * @return deptIds
+ */
+ @Override
+ @GetMapping(GET_DEPT_ANCESTORS)
+ public List getDeptAncestors(Long deptId) {
+ return jdbcTemplate.queryForList(DataScopeConstant.DATA_BY_DEPT, new Object[]{deptId}, Long.class);
+ }
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java
new file mode 100644
index 0000000..88f0578
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.system.entity.DataScope;
+
+/**
+ * Mapper 接口
+ *
+ * @author BladeX
+ */
+public interface DataScopeMapper extends BaseMapper {
+
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.xml b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.xml
new file mode 100644
index 0000000..cbb4659
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.java
index 771bfae..b5320ab 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.java
@@ -22,6 +22,7 @@ import org.springblade.system.entity.Menu;
import org.springblade.system.vo.MenuVO;
import java.util.List;
+import java.util.Map;
/**
* Mapper 接口
@@ -39,6 +40,15 @@ public interface MenuMapper extends BaseMapper {
*/
List selectMenuPage(IPage page, MenuVO menu);
+ /**
+ * 懒加载菜单列表
+ *
+ * @param parentId
+ * @param param
+ * @return
+ */
+ List lazyMenuList(Long parentId, Map param);
+
/**
* 树形结构
*
@@ -61,6 +71,21 @@ public interface MenuMapper extends BaseMapper {
*/
List grantTreeByRole(List roleId);
+ /**
+ * 数据权限授权树形结构
+ *
+ * @return
+ */
+ List grantDataScopeTree();
+
+ /**
+ * 数据权限授权树形结构
+ *
+ * @param roleId
+ * @return
+ */
+ List grantDataScopeTreeByRole(List roleId);
+
/**
* 所有菜单
*
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml
index 260c931..e36edfe 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml
@@ -19,6 +19,23 @@
+
+
@@ -37,6 +54,35 @@
select * from blade_menu where is_deleted = 0
+
+
select id, parent_id, name as title, id as 'value', id as 'key' from blade_menu where is_deleted = 0 and category = 1
@@ -127,6 +173,104 @@
)
+
+ SELECT
+ *
+ FROM
+ (
+ SELECT
+ id,
+ parent_id,
+ NAME AS title,
+ id AS "value",
+ id AS "key"
+ FROM
+ blade_menu
+ WHERE
+ category = 1
+ AND is_deleted = 0
+ AND id IN ( SELECT menu_id FROM blade_scope_data WHERE is_deleted = 0 AND menu_id IS NOT NULL )
+ ) menu
+
+ UNION ALL
+
+ SELECT
+ id,
+ menu_id AS parent_id,
+ scope_name AS title,
+ id AS "value",
+ id AS "key"
+ FROM
+ blade_scope_data
+ WHERE
+ is_deleted = 0
+ AND menu_id IS NOT NULL
+
+
+
+ SELECT
+ *
+ FROM
+ (
+ SELECT
+ id,
+ parent_id,
+ NAME AS title,
+ id AS "value",
+ id AS "key"
+ FROM
+ blade_menu
+ WHERE
+ category = 1
+ AND is_deleted = 0
+ AND id IN ( SELECT menu_id FROM blade_scope_data WHERE is_deleted = 0 AND menu_id IS NOT NULL )
+ AND (
+ id IN (
+ select menu_id from blade_role_menu where role_id in
+
+ #{item}
+
+ )
+ OR id IN (
+ select parent_id from blade_menu where is_deleted = 0
+ and id in ( select menu_id from blade_role_menu where role_id in
+
+ #{item}
+ )
+ )
+ )
+ ) menu
+
+ UNION ALL
+
+ SELECT
+ id,
+ menu_id AS parent_id,
+ scope_name AS title,
+ id AS "value",
+ id AS "key"
+ FROM
+ blade_scope_data
+ WHERE
+ is_deleted = 0
+ AND (
+ menu_id IN (
+ select menu_id from blade_role_menu where role_id in
+
+ #{item}
+
+ )
+ OR menu_id IN (
+ select parent_id from blade_menu where is_deleted = 0
+ and id in ( select menu_id from blade_role_menu where role_id in
+
+ #{item}
+ )
+ )
+ )
+ AND menu_id IS NOT NULL
+
+
SELECT
GROUP_CONCAT(r.role_alias) as alias,
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/RoleScopeMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/RoleScopeMapper.java
new file mode 100644
index 0000000..c92be8c
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/RoleScopeMapper.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.system.entity.RoleScope;
+
+/**
+ * Mapper 接口
+ *
+ * @author Chill
+ */
+public interface RoleScopeMapper extends BaseMapper {
+
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/RoleScopeMapper.xml b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/RoleScopeMapper.xml
new file mode 100644
index 0000000..55b8fb5
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/RoleScopeMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java
new file mode 100644
index 0000000..da57ba9
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.service;
+
+import org.springblade.core.mp.base.BaseService;
+import org.springblade.system.entity.DataScope;
+
+/**
+ * 服务类
+ *
+ * @author BladeX
+ */
+public interface IDataScopeService extends BaseService {
+
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IDeptService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDeptService.java
index 5d13740..e38b040 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IDeptService.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDeptService.java
@@ -63,4 +63,12 @@ public interface IDeptService extends IService {
*/
List getDeptNames(String deptIds);
+ /**
+ * 提交
+ *
+ * @param dept
+ * @return
+ */
+ boolean submit(Dept dept);
+
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IMenuService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IMenuService.java
index aaff845..decd7ab 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IMenuService.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IMenuService.java
@@ -23,6 +23,7 @@ import org.springblade.system.entity.Menu;
import org.springblade.system.vo.MenuVO;
import java.util.List;
+import java.util.Map;
/**
* 服务类
@@ -40,6 +41,15 @@ public interface IMenuService extends IService {
*/
IPage selectMenuPage(IPage page, MenuVO menu);
+ /**
+ * 懒加载菜单列表
+ *
+ * @param parentId
+ * @param param
+ * @return
+ */
+ List lazyMenuList(Long parentId, Map param);
+
/**
* 菜单树形结构
*
@@ -71,6 +81,14 @@ public interface IMenuService extends IService {
*/
List grantTree(BladeUser user);
+ /**
+ * 数据权限授权树形结构
+ *
+ * @param user
+ * @return
+ */
+ List grantDataScopeTree(BladeUser user);
+
/**
* 默认选中节点
*
@@ -79,6 +97,14 @@ public interface IMenuService extends IService {
*/
List roleTreeKeys(String roleIds);
+ /**
+ * 默认选中节点
+ *
+ * @param roleIds
+ * @return
+ */
+ List dataScopeTreeKeys(String roleIds);
+
/**
* 获取配置的角色权限
*
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleScopeService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleScopeService.java
new file mode 100644
index 0000000..aeee80e
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleScopeService.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.system.entity.RoleScope;
+
+/**
+ * 服务类
+ *
+ * @author Chill
+ */
+public interface IRoleScopeService extends IService {
+
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleService.java
index 544fffd..48ca2d6 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleService.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleService.java
@@ -54,7 +54,7 @@ public interface IRoleService extends IService {
* @param menuIds 菜单id集合
* @return 是否成功
*/
- boolean grant(@NotEmpty List roleIds, @NotEmpty List menuIds);
+ boolean grant(@NotEmpty List roleIds, @NotEmpty List menuIds, List dataScopeIds);
/**
* 获取角色ID
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java
new file mode 100644
index 0000000..5842be6
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.service.impl;
+
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.system.entity.DataScope;
+import org.springblade.system.mapper.DataScopeMapper;
+import org.springblade.system.service.IDataScopeService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author BladeX
+ */
+@Service
+public class DataScopeServiceImpl extends BaseServiceImpl implements IDataScopeService {
+
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java
index 78ac00b..0d4298b 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DeptServiceImpl.java
@@ -18,8 +18,13 @@ package org.springblade.system.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.core.tool.utils.CacheUtil;
import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.StringPool;
import org.springblade.system.entity.Dept;
import org.springblade.system.mapper.DeptMapper;
import org.springblade.system.service.IDeptService;
@@ -61,4 +66,25 @@ public class DeptServiceImpl extends ServiceImpl implements ID
return baseMapper.getDeptNames(Func.toLongArray(deptIds));
}
+ @Override
+ public boolean submit(Dept dept) {
+ CacheUtil.clear(CacheUtil.SYS_CACHE);
+ if (Func.isEmpty(dept.getParentId())) {
+ dept.setTenantId(SecureUtil.getTenantId());
+ dept.setParentId(BladeConstant.TOP_PARENT_ID);
+ dept.setAncestors(String.valueOf(BladeConstant.TOP_PARENT_ID));
+ }
+ if (dept.getParentId() > 0) {
+ Dept parent = getById(dept.getParentId());
+ if (Func.toLong(dept.getParentId()) == Func.toLong(dept.getId())) {
+ throw new ServiceException("父节点不可选择自身!");
+ }
+ dept.setTenantId(parent.getTenantId());
+ String ancestors = parent.getAncestors() + StringPool.COMMA + dept.getParentId();
+ dept.setAncestors(ancestors);
+ }
+ dept.setIsDeleted(BladeConstant.DB_NOT_DELETED);
+ return saveOrUpdate(dept);
+ }
+
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DictServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DictServiceImpl.java
index 36dc4ba..ec42ec2 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DictServiceImpl.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DictServiceImpl.java
@@ -70,7 +70,7 @@ public class DictServiceImpl extends ServiceImpl implements ID
@CacheEvict(cacheNames = {DICT_LIST, DICT_VALUE}, allEntries = true)
public boolean submit(Dict dict) {
LambdaQueryWrapper lqw = Wrappers.query().lambda().eq(Dict::getCode, dict.getCode()).eq(Dict::getDictKey, dict.getDictKey());
- Integer cnt = baseMapper.selectCount((Func.isEmpty(dict.getId())) ? lqw : lqw.notIn(Dict::getId, dict.getId()));
+ Long cnt = baseMapper.selectCount((Func.isEmpty(dict.getId())) ? lqw : lqw.notIn(Dict::getId, dict.getId()));
if (cnt > 0) {
throw new ServiceException("当前字典键值已存在!");
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java
index 64dfe97..73d5234 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java
@@ -28,9 +28,11 @@ import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.dto.MenuDTO;
import org.springblade.system.entity.Menu;
import org.springblade.system.entity.RoleMenu;
+import org.springblade.system.entity.RoleScope;
import org.springblade.system.mapper.MenuMapper;
import org.springblade.system.service.IMenuService;
import org.springblade.system.service.IRoleMenuService;
+import org.springblade.system.service.IRoleScopeService;
import org.springblade.system.vo.MenuVO;
import org.springblade.system.wrapper.MenuWrapper;
import org.springframework.stereotype.Service;
@@ -47,13 +49,23 @@ import java.util.stream.Collectors;
@AllArgsConstructor
public class MenuServiceImpl extends ServiceImpl implements IMenuService {
- IRoleMenuService roleMenuService;
+ private final IRoleMenuService roleMenuService;
+ private final IRoleScopeService roleScopeService;
+ private final static String PARENT_ID = "parentId";
@Override
public IPage selectMenuPage(IPage page, MenuVO menu) {
return page.setRecords(baseMapper.selectMenuPage(page, menu));
}
+ @Override
+ public List lazyMenuList(Long parentId, Map param) {
+ if (Func.isEmpty(Func.toStr(param.get(PARENT_ID)))) {
+ parentId = null;
+ }
+ return baseMapper.lazyMenuList(parentId, param);
+ }
+
@Override
public List routes(String roleId) {
if (StringUtil.isBlank(roleId)) {
@@ -94,12 +106,23 @@ public class MenuServiceImpl extends ServiceImpl implements IM
return ForestNodeMerger.merge(user.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? baseMapper.grantTree() : baseMapper.grantTreeByRole(Func.toLongList(user.getRoleId())));
}
+ @Override
+ public List grantDataScopeTree(BladeUser user) {
+ return ForestNodeMerger.merge(user.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? baseMapper.grantDataScopeTree() : baseMapper.grantDataScopeTreeByRole(Func.toLongList(user.getRoleId())));
+ }
+
@Override
public List roleTreeKeys(String roleIds) {
List roleMenus = roleMenuService.list(Wrappers.query().lambda().in(RoleMenu::getRoleId, Func.toLongList(roleIds)));
return roleMenus.stream().map(roleMenu -> Func.toStr(roleMenu.getMenuId())).collect(Collectors.toList());
}
+ @Override
+ public List dataScopeTreeKeys(String roleIds) {
+ List roleScopes = roleScopeService.list(Wrappers.query().lambda().in(RoleScope::getRoleId, Func.toLongList(roleIds)));
+ return roleScopes.stream().map(roleScope -> Func.toStr(roleScope.getScopeId())).collect(Collectors.toList());
+ }
+
@Override
public List authRoutes(BladeUser user) {
if (Func.isEmpty(user)) {
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RegionServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RegionServiceImpl.java
index 16bb864..83628f2 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RegionServiceImpl.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RegionServiceImpl.java
@@ -44,7 +44,7 @@ public class RegionServiceImpl extends ServiceImpl impleme
@Override
public boolean submit(Region region) {
- Integer cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(Region::getCode, region.getCode()));
+ Long cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(Region::getCode, region.getCode()));
if (cnt > 0) {
return this.updateById(region);
}
@@ -79,7 +79,7 @@ public class RegionServiceImpl extends ServiceImpl impleme
@Override
public boolean removeRegion(String id) {
- Integer cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(Region::getParentCode, id));
+ Long cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(Region::getParentCode, id));
if (cnt > 0) {
throw new ServiceException("请先删除子节点!");
}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleScopeServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleScopeServiceImpl.java
new file mode 100644
index 0000000..2fb4ed3
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleScopeServiceImpl.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.system.entity.RoleScope;
+import org.springblade.system.mapper.RoleScopeMapper;
+import org.springblade.system.service.IRoleScopeService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 服务实现类
+ *
+ * @author Chill
+ */
+@Service
+public class RoleScopeServiceImpl extends ServiceImpl implements IRoleScopeService {
+
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java
index ee4827a..1beaf07 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java
@@ -26,8 +26,10 @@ import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.Role;
import org.springblade.system.entity.RoleMenu;
+import org.springblade.system.entity.RoleScope;
import org.springblade.system.mapper.RoleMapper;
import org.springblade.system.service.IRoleMenuService;
+import org.springblade.system.service.IRoleScopeService;
import org.springblade.system.service.IRoleService;
import org.springblade.system.vo.RoleVO;
import org.springframework.stereotype.Service;
@@ -48,7 +50,8 @@ import java.util.stream.Collectors;
@AllArgsConstructor
public class RoleServiceImpl extends ServiceImpl implements IRoleService {
- IRoleMenuService roleMenuService;
+ private final IRoleMenuService roleMenuService;
+ private final IRoleScopeService roleScopeService;
@Override
public IPage selectRolePage(IPage page, RoleVO role) {
@@ -66,7 +69,7 @@ public class RoleServiceImpl extends ServiceImpl implements IR
}
@Override
- public boolean grant(@NotEmpty List roleIds, @NotEmpty List menuIds) {
+ public boolean grant(@NotEmpty List roleIds, @NotEmpty List menuIds, List dataScopeIds) {
// 删除角色配置的菜单集合
roleMenuService.remove(Wrappers.update().lambda().in(RoleMenu::getRoleId, roleIds));
// 组装配置
@@ -78,7 +81,22 @@ public class RoleServiceImpl extends ServiceImpl implements IR
roleMenus.add(roleMenu);
}));
// 新增配置
- return roleMenuService.saveBatch(roleMenus);
+ roleMenuService.saveBatch(roleMenus);
+
+ // 删除角色配置的数据权限集合
+ roleScopeService.remove(Wrappers.update().lambda().in(RoleScope::getRoleId, roleIds));
+ // 组装配置
+ List roleDataScopes = new ArrayList<>();
+ roleIds.forEach(roleId -> dataScopeIds.forEach(scopeId -> {
+ RoleScope roleScope = new RoleScope();
+ roleScope.setRoleId(roleId);
+ roleScope.setScopeId(scopeId);
+ roleDataScopes.add(roleScope);
+ }));
+ // 新增配置
+ roleScopeService.saveBatch(roleDataScopes);
+
+ return true;
}
@Override
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DataScopeWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DataScopeWrapper.java
new file mode 100644
index 0000000..a4e0b93
--- /dev/null
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DataScopeWrapper.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springblade.system.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.system.entity.DataScope;
+import org.springblade.system.service.IDictService;
+import org.springblade.system.vo.DataScopeVO;
+
+import java.util.Objects;
+
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class DataScopeWrapper extends BaseEntityWrapper {
+
+ private static IDictService dictService;
+
+ static {
+ dictService = SpringUtil.getBean(IDictService.class);
+ }
+
+ public static DataScopeWrapper build() {
+ return new DataScopeWrapper();
+ }
+
+ @Override
+ public DataScopeVO entityVO(DataScope dataScope) {
+ DataScopeVO dataScopeVO = Objects.requireNonNull(BeanUtil.copy(dataScope, DataScopeVO.class));
+ String scopeTypeName = dictService.getValue("data_scope_type", dataScope.getScopeType());
+ dataScopeVO.setScopeTypeName(scopeTypeName);
+ return dataScopeVO;
+ }
+
+}
diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/MenuWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/MenuWrapper.java
index 1e4737c..5935308 100644
--- a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/MenuWrapper.java
+++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/MenuWrapper.java
@@ -80,4 +80,8 @@ public class MenuWrapper extends BaseEntityWrapper {
return ForestNodeMerger.merge(collect);
}
+ public List listNodeLazyVO(List list) {
+ return ForestNodeMerger.merge(list);
+ }
+
}
diff --git a/blade-service/blade-user/pom.xml b/blade-service/blade-user/pom.xml
index 35f3b4b..2841e8c 100644
--- a/blade-service/blade-user/pom.xml
+++ b/blade-service/blade-user/pom.xml
@@ -5,7 +5,7 @@
blade-service
org.springblade
- 3.1.0
+ 3.2.0
4.0.0
diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java b/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java
index d89c45b..425b285 100644
--- a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java
+++ b/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java
@@ -60,7 +60,7 @@ public class UserServiceImpl extends BaseServiceImpl implement
if (Func.isNotEmpty(user.getPassword())) {
user.setPassword(DigestUtil.encrypt(user.getPassword()));
}
- Integer cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(User::getTenantId, user.getTenantId()).eq(User::getAccount, user.getAccount()));
+ Long cnt = baseMapper.selectCount(Wrappers.query().lambda().eq(User::getTenantId, user.getTenantId()).eq(User::getAccount, user.getAccount()));
if (cnt > 0) {
throw new ServiceException("当前用户已存在!");
}
diff --git a/blade-service/pom.xml b/blade-service/pom.xml
index 6b9b9a4..d3d807f 100644
--- a/blade-service/pom.xml
+++ b/blade-service/pom.xml
@@ -7,12 +7,12 @@
org.springblade
SpringBlade
- 3.1.0
+ 3.2.0
blade-service
${project.artifactId}
- 3.1.0
+ 3.2.0
pom
SpringBlade 微服务集合
@@ -30,6 +30,11 @@
blade-common
${blade.project.version}
+
+ org.springblade
+ blade-scope-api
+ ${blade.project.version}
+
diff --git a/doc/nacos/blade-demo-dev.yaml b/doc/nacos/blade-demo-dev.yaml
index fee2be5..9487d49 100644
--- a/doc/nacos/blade-demo-dev.yaml
+++ b/doc/nacos/blade-demo-dev.yaml
@@ -10,10 +10,10 @@ blade:
datasource:
demo:
master:
- url: jdbc:mysql://localhost:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://localhost:3306/blade?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
slave:
- url: jdbc:mysql://localhost:3306/bladex_slave?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://localhost:3306/blade_slave?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
diff --git a/doc/nacos/blade.yaml b/doc/nacos/blade.yaml
index 4264c7d..e2d3864 100644
--- a/doc/nacos/blade.yaml
+++ b/doc/nacos/blade.yaml
@@ -69,7 +69,7 @@ knife4j:
swagger:
title: SpringBlade 接口文档系统
description: SpringBlade 接口文档系统
- version: 3.1.0
+ version: 3.2.0
license: Powered By SpringBlade
licenseUrl: https://bladex.vip
terms-of-service-url: https://bladex.vip
diff --git a/doc/sql/blade/blade-saber-mysql.sql b/doc/sql/blade/blade-saber-mysql.sql
index 2b1f945..45fbfba 100644
--- a/doc/sql/blade/blade-saber-mysql.sql
+++ b/doc/sql/blade/blade-saber-mysql.sql
@@ -3,29 +3,26 @@
Source Server : mysql_localhost
Source Server Type : MySQL
- Source Server Version : 50723
+ Source Server Version : 50729
Source Host : localhost:3306
Source Schema : blade
Target Server Type : MySQL
- Target Server Version : 50723
+ Target Server Version : 50729
File Encoding : 65001
- Date: 06/11/2020 17:22:50
+ Date: 02/11/2021 16:34:09
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-CREATE SCHEMA IF NOT EXISTS `blade` DEFAULT CHARACTER SET utf8mb4 ;
-USE `blade` ;
-
-- ----------------------------
-- Table structure for blade_client
-- ----------------------------
DROP TABLE IF EXISTS `blade_client`;
CREATE TABLE `blade_client` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`client_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端id',
`client_secret` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端密钥',
`resource_ids` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源集合',
@@ -37,9 +34,10 @@ CREATE TABLE `blade_client` (
`refresh_token_validity` int(11) NOT NULL COMMENT '刷新令牌过期秒数',
`additional_information` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加说明',
`autoapprove` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '自动授权',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NOT NULL COMMENT '状态',
`is_deleted` int(2) NOT NULL COMMENT '是否已删除',
@@ -50,7 +48,7 @@ CREATE TABLE `blade_client` (
-- Records of blade_client
-- ----------------------------
BEGIN;
-INSERT INTO `blade_client` VALUES (1123598811738675201, 'sword', 'sword_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8888', NULL, 3600, 604800, NULL, NULL, 1, '2019-03-24 10:40:55', 1, '2019-03-24 10:40:59', 1, 0), (1123598811738675202, 'saber', 'saber_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8080', NULL, 3600, 604800, NULL, NULL, 1, '2019-03-24 10:42:29', 1, '2019-03-24 10:42:32', 1, 0);
+INSERT INTO `blade_client` VALUES (1123598811738675201, 'sword', 'sword_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8888', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:40:55', 1, '2019-03-24 10:40:59', 1, 0), (1123598811738675202, 'saber', 'saber_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8080', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:42:29', 1, '2019-03-24 10:42:32', 1, 0);
COMMIT;
-- ----------------------------
@@ -58,8 +56,8 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_code`;
CREATE TABLE `blade_code` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `datasource_id` bigint(64) NULL DEFAULT NULL COMMENT '数据源主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `datasource_id` bigint(20) NULL DEFAULT NULL COMMENT '数据源主键',
`service_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务名称',
`code_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模块名称',
`table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表名',
@@ -86,16 +84,16 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_datasource`;
CREATE TABLE `blade_datasource` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
`driver_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '驱动类',
`url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接地址',
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
@@ -114,9 +112,10 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_dept`;
CREATE TABLE `blade_dept` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键',
+ `ancestors` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖级列表',
`dept_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名',
`full_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门全称',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
@@ -129,7 +128,7 @@ CREATE TABLE `blade_dept` (
-- Records of blade_dept
-- ----------------------------
BEGIN;
-INSERT INTO `blade_dept` VALUES (1123598813738675201, '000000', 0, '刀锋科技', '江苏刀锋科技有限公司', 1, NULL, 0), (1123598813738675202, '000000', 1123598813738675201, '常州刀锋', '常州刀锋科技有限公司', 1, NULL, 0), (1123598813738675203, '000000', 1123598813738675201, '苏州刀锋', '苏州刀锋科技有限公司', 1, NULL, 0);
+INSERT INTO `blade_dept` VALUES (1123598813738675201, '000000', 0, '0', '刀锋科技', '江苏刀锋科技有限公司', 1, NULL, 0), (1123598813738675202, '000000', 1123598813738675201, '0,1123598813738675201', '常州刀锋', '常州刀锋科技有限公司', 1, NULL, 0), (1123598813738675203, '000000', 1123598813738675201, '0,1123598813738675201', '苏州刀锋', '苏州刀锋科技有限公司', 1, NULL, 0);
COMMIT;
-- ----------------------------
@@ -137,8 +136,8 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_dict`;
CREATE TABLE `blade_dict` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典码',
`dict_key` int(2) NULL DEFAULT NULL COMMENT '字典值',
`dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称',
@@ -152,7 +151,7 @@ CREATE TABLE `blade_dict` (
-- Records of blade_dict
-- ----------------------------
BEGIN;
-INSERT INTO `blade_dict` VALUES (1123598814738675201, 0, 'sex', -1, '性别', 1, NULL, 0), (1123598814738675202, 1123598814738675201, 'sex', 1, '男', 1, NULL, 0), (1123598814738675203, 1123598814738675201, 'sex', 2, '女', 2, NULL, 0), (1123598814738675204, 0, 'notice', -1, '通知类型', 2, NULL, 0), (1123598814738675205, 1123598814738675204, 'notice', 1, '发布通知', 1, NULL, 0), (1123598814738675206, 1123598814738675204, 'notice', 2, '批转通知', 2, NULL, 0), (1123598814738675207, 1123598814738675204, 'notice', 3, '转发通知', 3, NULL, 0), (1123598814738675208, 1123598814738675204, 'notice', 4, '指示通知', 4, NULL, 0), (1123598814738675209, 1123598814738675204, 'notice', 5, '任免通知', 5, NULL, 0), (1123598814738675210, 1123598814738675204, 'notice', 6, '事务通知', 6, NULL, 0), (1123598814738675211, 0, 'menu_category', -1, '菜单类型', 3, NULL, 0), (1123598814738675212, 1123598814738675211, 'menu_category', 1, '菜单', 1, NULL, 0), (1123598814738675213, 1123598814738675211, 'menu_category', 2, '按钮', 2, NULL, 0), (1123598814738675214, 0, 'button_func', -1, '按钮功能', 4, NULL, 0), (1123598814738675215, 1123598814738675214, 'button_func', 1, '工具栏', 1, NULL, 0), (1123598814738675216, 1123598814738675214, 'button_func', 2, '操作栏', 2, NULL, 0), (1123598814738675217, 1123598814738675214, 'button_func', 3, '工具操作栏', 3, NULL, 0), (1123598814738675218, 0, 'yes_no', -1, '是否', 5, NULL, 0), (1123598814738675219, 1123598814738675218, 'yes_no', 1, '否', 1, NULL, 0), (1123598814738675220, 1123598814738675218, 'yes_no', 2, '是', 2, NULL, 0), (1123598814738777220, 0, 'post_category', -1, '岗位类型', 12, NULL, 0), (1123598814738777221, 1123598814738777220, 'post_category', 1, '高层', 1, NULL, 0), (1123598814738777222, 1123598814738777220, 'post_category', 2, '中层', 2, NULL, 0), (1123598814738777223, 1123598814738777220, 'post_category', 3, '基层', 3, NULL, 0), (1123598814738777224, 1123598814738777220, 'post_category', 4, '其他', 4, NULL, 0), (1123598814738777230, 0, 'region', -1, '行政区划', 13, NULL, 0), (1123598814738777231, 1123598814738777230, 'region', 0, '国家', 0, NULL, 0), (1123598814738777232, 1123598814738777230, 'region', 1, '省份/直辖市', 1, NULL, 0), (1123598814738777233, 1123598814738777230, 'region', 2, '地市', 2, NULL, 0), (1123598814738777234, 1123598814738777230, 'region', 3, '区县', 3, NULL, 0), (1123598814738777235, 1123598814738777230, 'region', 4, '乡镇', 4, NULL, 0), (1123598814738777236, 1123598814738777230, 'region', 5, '村委', 5, NULL, 0);
+INSERT INTO `blade_dict` VALUES (1123598814738675201, 0, 'sex', -1, '性别', 1, NULL, 0), (1123598814738675202, 1123598814738675201, 'sex', 1, '男', 1, NULL, 0), (1123598814738675203, 1123598814738675201, 'sex', 2, '女', 2, NULL, 0), (1123598814738675204, 0, 'notice', -1, '通知类型', 2, NULL, 0), (1123598814738675205, 1123598814738675204, 'notice', 1, '发布通知', 1, NULL, 0), (1123598814738675206, 1123598814738675204, 'notice', 2, '批转通知', 2, NULL, 0), (1123598814738675207, 1123598814738675204, 'notice', 3, '转发通知', 3, NULL, 0), (1123598814738675208, 1123598814738675204, 'notice', 4, '指示通知', 4, NULL, 0), (1123598814738675209, 1123598814738675204, 'notice', 5, '任免通知', 5, NULL, 0), (1123598814738675210, 1123598814738675204, 'notice', 6, '事务通知', 6, NULL, 0), (1123598814738675211, 0, 'menu_category', -1, '菜单类型', 3, NULL, 0), (1123598814738675212, 1123598814738675211, 'menu_category', 1, '菜单', 1, NULL, 0), (1123598814738675213, 1123598814738675211, 'menu_category', 2, '按钮', 2, NULL, 0), (1123598814738675214, 0, 'button_func', -1, '按钮功能', 4, NULL, 0), (1123598814738675215, 1123598814738675214, 'button_func', 1, '工具栏', 1, NULL, 0), (1123598814738675216, 1123598814738675214, 'button_func', 2, '操作栏', 2, NULL, 0), (1123598814738675217, 1123598814738675214, 'button_func', 3, '工具操作栏', 3, NULL, 0), (1123598814738675218, 0, 'yes_no', -1, '是否', 5, NULL, 0), (1123598814738675219, 1123598814738675218, 'yes_no', 1, '否', 1, NULL, 0), (1123598814738675220, 1123598814738675218, 'yes_no', 2, '是', 2, NULL, 0), (1123598814738675231, 0, 'data_scope_type', -1, '数据权限', 8, NULL, 0), (1123598814738675232, 1123598814738675231, 'data_scope_type', 1, '全部可见', 1, NULL, 0), (1123598814738675233, 1123598814738675231, 'data_scope_type', 2, '本人可见', 2, NULL, 0), (1123598814738675234, 1123598814738675231, 'data_scope_type', 3, '所在机构可见', 3, NULL, 0), (1123598814738675235, 1123598814738675231, 'data_scope_type', 4, '所在机构及子级可见', 4, NULL, 0), (1123598814738675236, 1123598814738675231, 'data_scope_type', 5, '自定义', 5, NULL, 0), (1123598814738777220, 0, 'post_category', -1, '岗位类型', 12, NULL, 0), (1123598814738777221, 1123598814738777220, 'post_category', 1, '高层', 1, NULL, 0), (1123598814738777222, 1123598814738777220, 'post_category', 2, '中层', 2, NULL, 0), (1123598814738777223, 1123598814738777220, 'post_category', 3, '基层', 3, NULL, 0), (1123598814738777224, 1123598814738777220, 'post_category', 4, '其他', 4, NULL, 0), (1123598814738777230, 0, 'region', -1, '行政区划', 13, NULL, 0), (1123598814738777231, 1123598814738777230, 'region', 0, '国家', 0, NULL, 0), (1123598814738777232, 1123598814738777230, 'region', 1, '省份/直辖市', 1, NULL, 0), (1123598814738777233, 1123598814738777230, 'region', 2, '地市', 2, NULL, 0), (1123598814738777234, 1123598814738777230, 'region', 3, '区县', 3, NULL, 0), (1123598814738777235, 1123598814738777230, 'region', 4, '乡镇', 4, NULL, 0), (1123598814738777236, 1123598814738777230, 'region', 5, '村委', 5, NULL, 0);
COMMIT;
-- ----------------------------
@@ -160,7 +159,7 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_api`;
CREATE TABLE `blade_log_api` (
- `id` bigint(64) NOT NULL COMMENT '编号',
+ `id` bigint(20) NOT NULL COMMENT '编号',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
@@ -186,7 +185,7 @@ CREATE TABLE `blade_log_api` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_error`;
CREATE TABLE `blade_log_error` (
- `id` bigint(64) NOT NULL COMMENT '编号',
+ `id` bigint(20) NOT NULL COMMENT '编号',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
@@ -215,7 +214,7 @@ CREATE TABLE `blade_log_error` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_usual`;
CREATE TABLE `blade_log_usual` (
- `id` bigint(64) NOT NULL COMMENT '编号',
+ `id` bigint(20) NOT NULL COMMENT '编号',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
@@ -242,8 +241,8 @@ CREATE TABLE `blade_log_usual` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_menu`;
CREATE TABLE `blade_menu` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父级菜单',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父级菜单',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单编号',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单别名',
@@ -262,7 +261,7 @@ CREATE TABLE `blade_menu` (
-- Records of blade_menu
-- ----------------------------
BEGIN;
-INSERT INTO `blade_menu` VALUES (1123598815738675201, 0, 'desk', '工作台', 'menu', '/desk', 'iconfont iconicon_airplay', 1, 1, 0, 1, NULL, 0), (1123598815738675202, 1123598815738675201, 'notice', '通知公告', 'menu', '/desk/notice', 'iconfont iconicon_sms', 1, 1, 0, 1, NULL, 0), (1123598815738675203, 0, 'system', '系统管理', 'menu', '/system', 'iconfont iconicon_setting', 99, 1, 0, 1, NULL, 0), (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', 'iconfont iconicon_principal', 1, 1, 0, 1, NULL, 0), (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', 'iconfont iconicon_group', 2, 1, 0, 1, NULL, 0), (1123598815738675206, 1123598815738675203, 'dict', '字典管理', 'menu', '/system/dict', 'iconfont iconicon_addresslist', 3, 1, 0, 1, NULL, 0), (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu', 'iconfont iconicon_subordinate', 4, 1, 0, 1, NULL, 0), (1123598815738675208, 1123598815738675203, 'role', '角色管理', 'menu', '/system/role', 'iconfont iconicon_boss', 5, 1, 0, 1, NULL, 0), (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param', 'iconfont iconicon_community_line', 6, 1, 0, 1, NULL, 0), (1123598815738675210, 0, 'monitor', '系统监控', 'menu', '/monitor', 'iconfont icon-yanzhengma', 3, 1, 0, 1, NULL, 0), (1123598815738675211, 1123598815738675210, 'doc', '接口文档', 'menu', 'http://localhost/doc.html', 'iconfont iconicon_study', 1, 1, 0, 2, NULL, 0), (1123598815738675212, 1123598815738675210, 'admin', '服务治理', 'menu', 'http://localhost:7002', 'iconfont icon-canshu', 2, 1, 0, 2, NULL, 0), (1123598815738675213, 1123598815738675210, 'log', '日志管理', 'menu', '/monitor/log', 'iconfont iconicon_doc', 3, 1, 0, 1, NULL, 0), (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL, 0), (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675217, 0, 'tool', '研发工具', 'menu', '/tool', 'iconfont icon-wxbgongju', 4, 1, 0, 1, NULL, 0), (1123598815738675218, 1123598815738675217, 'code', '代码生成', 'menu', '/tool/code', 'iconfont iconicon_savememo', 1, 1, 0, 1, NULL, 0), (1123598815738675219, 1123598815738675202, 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675220, 1123598815738675202, 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675221, 1123598815738675202, 'notice_delete', '删除', 'delete', '/api/blade-desk/notice/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675222, 1123598815738675202, 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/blade-user/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0), (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password', '/api/blade-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0), (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2, 1, NULL, 0), (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/blade-system/dept/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675233, 1123598815738675206, 'dict_add', '新增', 'add', '/system/dict/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675234, 1123598815738675206, 'dict_edit', '修改', 'edit', '/system/dict/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675235, 1123598815738675206, 'dict_delete', '删除', 'delete', '/api/blade-system/dict/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675236, 1123598815738675206, 'dict_view', '查看', 'view', '/system/dict/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/blade-system/menu/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675241, 1123598815738675208, 'role_add', '新增', 'add', '/system/role/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675242, 1123598815738675208, 'role_edit', '修改', 'edit', '/system/role/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675243, 1123598815738675208, 'role_delete', '删除', 'delete', '/api/blade-system/role/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675244, 1123598815738675208, 'role_view', '查看', 'view', '/system/role/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675245, 1123598815738675209, 'param_add', '新增', 'add', '/system/param/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675246, 1123598815738675209, 'param_edit', '修改', 'edit', '/system/param/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675247, 1123598815738675209, 'param_delete', '删除', 'delete', '/api/blade-system/param/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675248, 1123598815738675209, 'param_view', '查看', 'view', '/system/param/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675252, 1123598815738675218, 'code_add', '新增', 'add', '/tool/code/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675253, 1123598815738675218, 'code_edit', '修改', 'edit', '/tool/code/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675254, 1123598815738675218, 'code_delete', '删除', 'delete', '/api/blade-system/code/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675255, 1123598815738675218, 'code_view', '查看', 'view', '/tool/code/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675256, 1123598815738675203, 'tenant', '租户管理', 'menu', '/system/tenant', 'iconfont icon-quanxian', 7, 1, 0, 1, NULL, 0), (1123598815738675257, 1123598815738675256, 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675258, 1123598815738675256, 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675259, 1123598815738675256, 'tenant_delete', '删除', 'delete', '/api/blade-system/tenant/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675260, 1123598815738675256, 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675261, 1123598815738675203, 'client', '应用管理', 'menu', '/system/client', 'iconfont iconicon_mobilephone', 8, 1, 0, 1, NULL, 0), (1123598815738675262, 1123598815738675261, 'client_add', '新增', 'add', '/system/client/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675263, 1123598815738675261, 'client_edit', '修改', 'edit', '/system/client/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675264, 1123598815738675261, 'client_delete', '删除', 'delete', '/api/blade-system/client/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675265, 1123598815738675261, 'client_view', '查看', 'view', '/system/client/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1123598815738675266, 1123598815738675217, 'datasource', '数据源管理', 'menu', '/tool/datasource', 'iconfont icon-caidanguanli', 2, 1, 0, 1, NULL, 0), (1123598815738675267, 1123598815738675266, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675268, 1123598815738675266, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675269, 1123598815738675266, 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675270, 1123598815738675266, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', 'iconfont iconicon_message', 2, 1, 0, 1, NULL, 0), (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL, 0), (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1, NULL, 0), (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/blade-system/post/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1164733399668962201, 0, 'base', '基础配置', 'menu', '/base', 'iconfont iconicon_affiliations_li', 97, 1, 0, 1, NULL, 0), (1164733399668962202, 1164733399668962201, 'region', '行政区划', 'menu', '/base/region', 'iconfont icon-iframe', 1, 1, 0, 1, NULL, 0), (1164733399668962203, 1164733399668962202, 'region_add', '新增下级', 'add', '', '', 1, 2, 1, 1, NULL, 0), (1164733399668962204, 1164733399668962202, 'region_delete', '删除', 'delete', '/api/blade-system/region/remove', '', 2, 2, 2, 1, NULL, 0), (1164733399668962205, 1164733399668962202, 'region_import', '导入', 'import', '', '', 3, 2, 3, 1, NULL, 0), (1164733399668962206, 1164733399668962202, 'region_export', '导出', 'export', '', '', 4, 2, 2, 1, NULL, 0), (1164733399668962207, 1164733399668962202, 'region_debug', '调试', 'debug', '', '', 5, 2, 2, 1, NULL, 0), (1164733399669962301, 0, 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, 0), (1164733399669962302, 1164733399669962301, 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 1, NULL, 0), (1164733399669962303, 1164733399669962301, 'report_list', '报表列表', 'menu', '/report/reportlist', 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu` VALUES (1123598815738675201, 0, 'desk', '工作台', 'menu', '/desk', 'iconfont iconicon_airplay', 1, 1, 0, 1, NULL, 0), (1123598815738675202, 1123598815738675201, 'notice', '通知公告', 'menu', '/desk/notice', 'iconfont iconicon_sms', 1, 1, 0, 1, NULL, 0), (1123598815738675203, 0, 'system', '系统管理', 'menu', '/system', 'iconfont iconicon_setting', 99, 1, 0, 1, NULL, 0), (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', 'iconfont iconicon_principal', 1, 1, 0, 1, NULL, 0), (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', 'iconfont iconicon_group', 2, 1, 0, 1, NULL, 0), (1123598815738675206, 1123598815738675203, 'dict', '字典管理', 'menu', '/system/dict', 'iconfont iconicon_addresslist', 3, 1, 0, 1, NULL, 0), (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu', 'iconfont iconicon_subordinate', 4, 1, 0, 1, NULL, 0), (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param', 'iconfont iconicon_community_line', 6, 1, 0, 1, NULL, 0), (1123598815738675210, 0, 'monitor', '系统监控', 'menu', '/monitor', 'iconfont icon-yanzhengma', 3, 1, 0, 1, NULL, 0), (1123598815738675211, 1123598815738675210, 'doc', '接口文档', 'menu', 'http://localhost/doc.html', 'iconfont iconicon_study', 1, 1, 0, 2, NULL, 0), (1123598815738675212, 1123598815738675210, 'admin', '服务治理', 'menu', 'http://localhost:7002', 'iconfont icon-canshu', 2, 1, 0, 2, NULL, 0), (1123598815738675213, 1123598815738675210, 'log', '日志管理', 'menu', '/monitor/log', 'iconfont iconicon_doc', 3, 1, 0, 1, NULL, 0), (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL, 0), (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675217, 0, 'tool', '研发工具', 'menu', '/tool', 'iconfont icon-wxbgongju', 4, 1, 0, 1, NULL, 0), (1123598815738675218, 1123598815738675217, 'code', '代码生成', 'menu', '/tool/code', 'iconfont iconicon_savememo', 1, 1, 0, 1, NULL, 0), (1123598815738675219, 1123598815738675202, 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675220, 1123598815738675202, 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675221, 1123598815738675202, 'notice_delete', '删除', 'delete', '/api/blade-desk/notice/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675222, 1123598815738675202, 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/blade-user/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0), (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password', '/api/blade-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0), (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2, 1, NULL, 0), (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/blade-system/dept/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675233, 1123598815738675206, 'dict_add', '新增', 'add', '/system/dict/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675234, 1123598815738675206, 'dict_edit', '修改', 'edit', '/system/dict/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675235, 1123598815738675206, 'dict_delete', '删除', 'delete', '/api/blade-system/dict/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675236, 1123598815738675206, 'dict_view', '查看', 'view', '/system/dict/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/blade-system/menu/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675241, 1123598815738675308, 'role_add', '新增', 'add', '/authority/role/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675242, 1123598815738675308, 'role_edit', '修改', 'edit', '/authority/role/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675243, 1123598815738675308, 'role_delete', '删除', 'delete', '/api/blade-system/role/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675244, 1123598815738675308, 'role_view', '查看', 'view', '/authority/role/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675245, 1123598815738675209, 'param_add', '新增', 'add', '/system/param/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675246, 1123598815738675209, 'param_edit', '修改', 'edit', '/system/param/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675247, 1123598815738675209, 'param_delete', '删除', 'delete', '/api/blade-system/param/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675248, 1123598815738675209, 'param_view', '查看', 'view', '/system/param/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675252, 1123598815738675218, 'code_add', '新增', 'add', '/tool/code/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675253, 1123598815738675218, 'code_edit', '修改', 'edit', '/tool/code/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675254, 1123598815738675218, 'code_delete', '删除', 'delete', '/api/blade-system/code/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675255, 1123598815738675218, 'code_view', '查看', 'view', '/tool/code/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675256, 1123598815738675203, 'tenant', '租户管理', 'menu', '/system/tenant', 'iconfont icon-quanxian', 7, 1, 0, 1, NULL, 0), (1123598815738675257, 1123598815738675256, 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675258, 1123598815738675256, 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675259, 1123598815738675256, 'tenant_delete', '删除', 'delete', '/api/blade-system/tenant/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675260, 1123598815738675256, 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675261, 1123598815738675203, 'client', '应用管理', 'menu', '/system/client', 'iconfont iconicon_mobilephone', 8, 1, 0, 1, NULL, 0), (1123598815738675262, 1123598815738675261, 'client_add', '新增', 'add', '/system/client/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675263, 1123598815738675261, 'client_edit', '修改', 'edit', '/system/client/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675264, 1123598815738675261, 'client_delete', '删除', 'delete', '/api/blade-system/client/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675265, 1123598815738675261, 'client_view', '查看', 'view', '/system/client/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1123598815738675266, 1123598815738675217, 'datasource', '数据源管理', 'menu', '/tool/datasource', 'iconfont icon-caidanguanli', 2, 1, 0, 1, NULL, 0), (1123598815738675267, 1123598815738675266, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675268, 1123598815738675266, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675269, 1123598815738675266, 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675270, 1123598815738675266, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1123598815738675307, 0, 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', 98, 1, 0, 1, '', 0), (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss', 1, 1, 0, 1, NULL, 0), (1123598815738675309, 1123598815738675307, 'data_scope', '数据权限', 'menu', '/authority/datascope', 'iconfont icon-shujuzhanshi2', 2, 1, 0, 1, '', 0), (1123598815738675310, 1123598815738675309, 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', 1, 2, 2, 1, NULL, 0), (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', 'iconfont iconicon_message', 2, 1, 0, 1, NULL, 0), (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL, 0), (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1, NULL, 0), (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/blade-system/post/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1164733399668962201, 0, 'base', '基础配置', 'menu', '/base', 'iconfont iconicon_affiliations_li', 97, 1, 0, 1, NULL, 0), (1164733399668962202, 1164733399668962201, 'region', '行政区划', 'menu', '/base/region', 'iconfont icon-iframe', 1, 1, 0, 1, NULL, 0), (1164733399668962203, 1164733399668962202, 'region_add', '新增下级', 'add', '', '', 1, 2, 1, 1, NULL, 0), (1164733399668962204, 1164733399668962202, 'region_delete', '删除', 'delete', '/api/blade-system/region/remove', '', 2, 2, 2, 1, NULL, 0), (1164733399668962205, 1164733399668962202, 'region_import', '导入', 'import', '', '', 3, 2, 3, 1, NULL, 0), (1164733399668962206, 1164733399668962202, 'region_export', '导出', 'export', '', '', 4, 2, 2, 1, NULL, 0), (1164733399668962207, 1164733399668962202, 'region_debug', '调试', 'debug', '', '', 5, 2, 2, 1, NULL, 0), (1164733399669962301, 0, 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, 0), (1164733399669962302, 1164733399669962301, 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 1, NULL, 0), (1164733399669962303, 1164733399669962301, 'report_list', '报表列表', 'menu', '/report/reportlist', 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0);
COMMIT;
-- ----------------------------
@@ -270,15 +269,16 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_notice`;
CREATE TABLE `blade_notice` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`category` int(11) NULL DEFAULT NULL COMMENT '类型',
`release_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间',
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
@@ -289,7 +289,7 @@ CREATE TABLE `blade_notice` (
-- Records of blade_notice
-- ----------------------------
BEGIN;
-INSERT INTO `blade_notice` VALUES (1123598818738675223, '000000', '测试公告', 3, '2018-12-31 20:03:31', '222', 1123598821738675201, '2018-12-05 20:03:31', 1123598821738675201, '2018-12-28 11:10:51', 1, 0), (1123598818738675224, '000000', '测试公告2', 1, '2018-12-05 20:03:31', '333', 1123598821738675201, '2018-12-28 10:32:26', 1123598821738675201, '2018-12-28 11:10:34', 1, 0), (1123598818738675225, '000000', '测试公告3', 6, '2018-12-29 00:00:00', '11111', 1123598821738675201, '2018-12-28 11:03:44', 1123598821738675201, '2018-12-28 11:10:28', 1, 0);
+INSERT INTO `blade_notice` VALUES (1123598818738675223, '000000', '测试公告', 3, '2018-12-31 20:03:31', '222', 1123598821738675201, 1123598813738675201, '2018-12-05 20:03:31', 1123598821738675201, '2018-12-28 11:10:51', 1, 0), (1123598818738675224, '000000', '测试公告2', 1, '2018-12-05 20:03:31', '333', 1123598821738675201, 1123598813738675201, '2018-12-28 10:32:26', 1123598821738675201, '2018-12-28 11:10:34', 1, 0), (1123598818738675225, '000000', '测试公告3', 6, '2018-12-29 00:00:00', '11111', 1123598821738675201, 1123598813738675201, '2018-12-28 11:03:44', 1123598821738675201, '2018-12-28 11:10:28', 1, 0);
COMMIT;
-- ----------------------------
@@ -297,14 +297,15 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_param`;
CREATE TABLE `blade_param` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`param_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名',
`param_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数键',
`param_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数值',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
@@ -315,7 +316,7 @@ CREATE TABLE `blade_param` (
-- Records of blade_param
-- ----------------------------
BEGIN;
-INSERT INTO `blade_param` VALUES (1123598819738675201, '是否开启注册功能', 'account.registerUser', 'true', '开启注册', 1123598821738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0), (1123598819738675202, '账号初始密码', 'account.initPassword', '123456', '初始密码', 1123598821738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0);
+INSERT INTO `blade_param` VALUES (1123598819738675201, '是否开启注册功能', 'account.registerUser', 'true', '开启注册', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0), (1123598819738675202, '账号初始密码', 'account.initPassword', '123456', '初始密码', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0);
COMMIT;
-- ----------------------------
@@ -323,17 +324,17 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_post`;
CREATE TABLE `blade_post` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`category` int(11) NULL DEFAULT NULL COMMENT '岗位类型',
`post_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位编号',
`post_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位名称',
`sort` int(2) NULL DEFAULT NULL COMMENT '岗位排序',
`remark` varchar(255) 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 '创建部门',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
@@ -390,7 +391,7 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_report_file`;
CREATE TABLE `blade_report_file` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名',
`content` mediumblob NULL COMMENT '文件内容',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
@@ -404,9 +405,9 @@ CREATE TABLE `blade_report_file` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_role`;
CREATE TABLE `blade_role` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键',
`role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
`role_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色别名',
@@ -426,9 +427,9 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_role_menu`;
CREATE TABLE `blade_role_menu` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `menu_id` bigint(64) NULL DEFAULT NULL COMMENT '菜单id',
- `role_id` bigint(64) NULL DEFAULT NULL COMMENT '角色id',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单id',
+ `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单表';
@@ -436,24 +437,61 @@ CREATE TABLE `blade_role_menu` (
-- Records of blade_role_menu
-- ----------------------------
BEGIN;
-INSERT INTO `blade_role_menu` VALUES (1123598817738675201, 1123598815738675201, 1123598816738675201), (1123598817738675202, 1123598815738675202, 1123598816738675201), (1123598817738675203, 1123598815738675203, 1123598816738675201), (1123598817738675204, 1123598815738675204, 1123598816738675201), (1123598817738675205, 1123598815738675205, 1123598816738675201), (1123598817738675206, 1123598815738675206, 1123598816738675201), (1123598817738675207, 1123598815738675207, 1123598816738675201), (1123598817738675208, 1123598815738675208, 1123598816738675201), (1123598817738675209, 1123598815738675209, 1123598816738675201), (1123598817738675210, 1123598815738675210, 1123598816738675201), (1123598817738675211, 1123598815738675211, 1123598816738675201), (1123598817738675212, 1123598815738675212, 1123598816738675201), (1123598817738675213, 1123598815738675213, 1123598816738675201), (1123598817738675214, 1123598815738675214, 1123598816738675201), (1123598817738675215, 1123598815738675215, 1123598816738675201), (1123598817738675216, 1123598815738675216, 1123598816738675201), (1123598817738675217, 1123598815738675217, 1123598816738675201), (1123598817738675218, 1123598815738675218, 1123598816738675201), (1123598817738675219, 1123598815738675219, 1123598816738675201), (1123598817738675220, 1123598815738675220, 1123598816738675201), (1123598817738675221, 1123598815738675221, 1123598816738675201), (1123598817738675222, 1123598815738675222, 1123598816738675201), (1123598817738675223, 1123598815738675223, 1123598816738675201), (1123598817738675224, 1123598815738675224, 1123598816738675201), (1123598817738675225, 1123598815738675225, 1123598816738675201), (1123598817738675226, 1123598815738675226, 1123598816738675201), (1123598817738675227, 1123598815738675227, 1123598816738675201), (1123598817738675228, 1123598815738675228, 1123598816738675201), (1123598817738675229, 1123598815738675229, 1123598816738675201), (1123598817738675230, 1123598815738675230, 1123598816738675201), (1123598817738675231, 1123598815738675231, 1123598816738675201), (1123598817738675232, 1123598815738675232, 1123598816738675201), (1123598817738675233, 1123598815738675233, 1123598816738675201), (1123598817738675234, 1123598815738675234, 1123598816738675201), (1123598817738675235, 1123598815738675235, 1123598816738675201), (1123598817738675236, 1123598815738675236, 1123598816738675201), (1123598817738675237, 1123598815738675237, 1123598816738675201), (1123598817738675238, 1123598815738675238, 1123598816738675201), (1123598817738675239, 1123598815738675239, 1123598816738675201), (1123598817738675240, 1123598815738675240, 1123598816738675201), (1123598817738675241, 1123598815738675241, 1123598816738675201), (1123598817738675242, 1123598815738675242, 1123598816738675201), (1123598817738675243, 1123598815738675243, 1123598816738675201), (1123598817738675244, 1123598815738675244, 1123598816738675201), (1123598817738675245, 1123598815738675245, 1123598816738675201), (1123598817738675246, 1123598815738675246, 1123598816738675201), (1123598817738675247, 1123598815738675247, 1123598816738675201), (1123598817738675248, 1123598815738675248, 1123598816738675201), (1123598817738675249, 1123598815738675249, 1123598816738675201), (1123598817738675250, 1123598815738675250, 1123598816738675201), (1123598817738675251, 1123598815738675251, 1123598816738675201), (1123598817738675252, 1123598815738675252, 1123598816738675201), (1123598817738675253, 1123598815738675253, 1123598816738675201), (1123598817738675254, 1123598815738675254, 1123598816738675201), (1123598817738675255, 1123598815738675255, 1123598816738675201), (1123598817738675256, 1123598815738675256, 1123598816738675201), (1123598817738675257, 1123598815738675257, 1123598816738675201), (1123598817738675258, 1123598815738675258, 1123598816738675201), (1123598817738675259, 1123598815738675259, 1123598816738675201), (1123598817738675260, 1123598815738675260, 1123598816738675201), (1123598817738675261, 1123598815738675261, 1123598816738675201), (1123598817738675262, 1123598815738675262, 1123598816738675201), (1123598817738675263, 1123598815738675263, 1123598816738675201), (1123598817738675264, 1123598815738675264, 1123598816738675201), (1123598817738675265, 1123598815738675265, 1123598816738675201), (1123598817738675266, 1123598815738675266, 1123598816738675201), (1123598817738675267, 1123598815738675267, 1123598816738675201), (1123598817738675268, 1123598815738675268, 1123598816738675201), (1123598817738675269, 1123598815738675269, 1123598816738675201), (1123598817738675270, 1123598815738675270, 1123598816738675201), (1161272893875225001, 1164733389668962251, 1123598816738675201), (1161272893875225002, 1164733389668962252, 1123598816738675201), (1161272893875225003, 1164733389668962253, 1123598816738675201), (1161272893875225004, 1164733389668962254, 1123598816738675201), (1161272893875225005, 1164733389668962255, 1123598816738675201), (1161272893875225006, 1164733389668962256, 1123598816738675201), (1161272893875226001, 1164733399668962201, 1123598816738675201), (1161272893875226002, 1164733399668962202, 1123598816738675201), (1161272893875226003, 1164733399668962203, 1123598816738675201), (1161272893875226004, 1164733399668962204, 1123598816738675201), (1161272893875226005, 1164733399668962205, 1123598816738675201), (1161272893875226006, 1164733399668962206, 1123598816738675201), (1161272893875226007, 1164733399668962207, 1123598816738675201), (1161272893875228001, 1164733399669962301, 1123598816738675201), (1161272893875228002, 1164733399669962302, 1123598816738675201), (1161272893875228003, 1164733399669962303, 1123598816738675201), (1296030340342616066, 1123598815738675201, 1123598816738675202), (1296030340367781890, 1123598815738675202, 1123598816738675202), (1296030340384559105, 1123598815738675219, 1123598816738675202), (1296030340401336321, 1123598815738675220, 1123598816738675202), (1296030340413919233, 1123598815738675221, 1123598816738675202), (1296030340434890753, 1123598815738675222, 1123598816738675202);
+INSERT INTO `blade_role_menu` VALUES (1123598817738675201, 1123598815738675201, 1123598816738675201), (1123598817738675202, 1123598815738675202, 1123598816738675201), (1123598817738675203, 1123598815738675203, 1123598816738675201), (1123598817738675204, 1123598815738675204, 1123598816738675201), (1123598817738675205, 1123598815738675205, 1123598816738675201), (1123598817738675206, 1123598815738675206, 1123598816738675201), (1123598817738675207, 1123598815738675207, 1123598816738675201), (1123598817738675208, 1123598815738675208, 1123598816738675201), (1123598817738675209, 1123598815738675209, 1123598816738675201), (1123598817738675210, 1123598815738675210, 1123598816738675201), (1123598817738675211, 1123598815738675211, 1123598816738675201), (1123598817738675212, 1123598815738675212, 1123598816738675201), (1123598817738675213, 1123598815738675213, 1123598816738675201), (1123598817738675214, 1123598815738675214, 1123598816738675201), (1123598817738675215, 1123598815738675215, 1123598816738675201), (1123598817738675216, 1123598815738675216, 1123598816738675201), (1123598817738675217, 1123598815738675217, 1123598816738675201), (1123598817738675218, 1123598815738675218, 1123598816738675201), (1123598817738675219, 1123598815738675219, 1123598816738675201), (1123598817738675220, 1123598815738675220, 1123598816738675201), (1123598817738675221, 1123598815738675221, 1123598816738675201), (1123598817738675222, 1123598815738675222, 1123598816738675201), (1123598817738675223, 1123598815738675223, 1123598816738675201), (1123598817738675224, 1123598815738675224, 1123598816738675201), (1123598817738675225, 1123598815738675225, 1123598816738675201), (1123598817738675226, 1123598815738675226, 1123598816738675201), (1123598817738675227, 1123598815738675227, 1123598816738675201), (1123598817738675228, 1123598815738675228, 1123598816738675201), (1123598817738675229, 1123598815738675229, 1123598816738675201), (1123598817738675230, 1123598815738675230, 1123598816738675201), (1123598817738675231, 1123598815738675231, 1123598816738675201), (1123598817738675232, 1123598815738675232, 1123598816738675201), (1123598817738675233, 1123598815738675233, 1123598816738675201), (1123598817738675234, 1123598815738675234, 1123598816738675201), (1123598817738675235, 1123598815738675235, 1123598816738675201), (1123598817738675236, 1123598815738675236, 1123598816738675201), (1123598817738675237, 1123598815738675237, 1123598816738675201), (1123598817738675238, 1123598815738675238, 1123598816738675201), (1123598817738675239, 1123598815738675239, 1123598816738675201), (1123598817738675240, 1123598815738675240, 1123598816738675201), (1123598817738675241, 1123598815738675241, 1123598816738675201), (1123598817738675242, 1123598815738675242, 1123598816738675201), (1123598817738675243, 1123598815738675243, 1123598816738675201), (1123598817738675244, 1123598815738675244, 1123598816738675201), (1123598817738675245, 1123598815738675245, 1123598816738675201), (1123598817738675246, 1123598815738675246, 1123598816738675201), (1123598817738675247, 1123598815738675247, 1123598816738675201), (1123598817738675248, 1123598815738675248, 1123598816738675201), (1123598817738675249, 1123598815738675249, 1123598816738675201), (1123598817738675250, 1123598815738675250, 1123598816738675201), (1123598817738675251, 1123598815738675251, 1123598816738675201), (1123598817738675252, 1123598815738675252, 1123598816738675201), (1123598817738675253, 1123598815738675253, 1123598816738675201), (1123598817738675254, 1123598815738675254, 1123598816738675201), (1123598817738675255, 1123598815738675255, 1123598816738675201), (1123598817738675256, 1123598815738675256, 1123598816738675201), (1123598817738675257, 1123598815738675257, 1123598816738675201), (1123598817738675258, 1123598815738675258, 1123598816738675201), (1123598817738675259, 1123598815738675259, 1123598816738675201), (1123598817738675260, 1123598815738675260, 1123598816738675201), (1123598817738675261, 1123598815738675261, 1123598816738675201), (1123598817738675262, 1123598815738675262, 1123598816738675201), (1123598817738675263, 1123598815738675263, 1123598816738675201), (1123598817738675264, 1123598815738675264, 1123598816738675201), (1123598817738675265, 1123598815738675265, 1123598816738675201), (1123598817738675266, 1123598815738675266, 1123598816738675201), (1123598817738675267, 1123598815738675267, 1123598816738675201), (1123598817738675268, 1123598815738675268, 1123598816738675201), (1123598817738675269, 1123598815738675269, 1123598816738675201), (1123598817738675270, 1123598815738675270, 1123598816738675201), (1161272893875225001, 1164733389668962251, 1123598816738675201), (1161272893875225002, 1164733389668962252, 1123598816738675201), (1161272893875225003, 1164733389668962253, 1123598816738675201), (1161272893875225004, 1164733389668962254, 1123598816738675201), (1161272893875225005, 1164733389668962255, 1123598816738675201), (1161272893875225006, 1164733389668962256, 1123598816738675201), (1161272893875226001, 1164733399668962201, 1123598816738675201), (1161272893875226002, 1164733399668962202, 1123598816738675201), (1161272893875226003, 1164733399668962203, 1123598816738675201), (1161272893875226004, 1164733399668962204, 1123598816738675201), (1161272893875226005, 1164733399668962205, 1123598816738675201), (1161272893875226006, 1164733399668962206, 1123598816738675201), (1161272893875226007, 1164733399668962207, 1123598816738675201), (1161272893875228001, 1164733399669962301, 1123598816738675201), (1161272893875228002, 1164733399669962302, 1123598816738675201), (1161272893875228003, 1164733399669962303, 1123598816738675201), (1296030340342616066, 1123598815738675201, 1123598816738675202), (1296030340367781890, 1123598815738675202, 1123598816738675202), (1296030340384559105, 1123598815738675219, 1123598816738675202), (1296030340401336321, 1123598815738675220, 1123598816738675202), (1296030340413919233, 1123598815738675221, 1123598816738675202), (1296030340434890753, 1123598815738675222, 1123598816738675202), (1455363615489028098, 1123598815738675307, 1123598816738675201), (1455363615505805313, 1123598815738675309, 1123598816738675201), (1455363615518388225, 1123598815738675310, 1123598816738675201);
COMMIT;
+-- ----------------------------
+-- Table structure for blade_role_scope
+-- ----------------------------
+DROP TABLE IF EXISTS `blade_role_scope`;
+CREATE TABLE `blade_role_scope` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `scope_id` bigint(20) NULL DEFAULT NULL COMMENT '数据权限id',
+ `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
+
+-- ----------------------------
+-- Table structure for blade_scope_data
+-- ----------------------------
+DROP TABLE IF EXISTS `blade_scope_data`;
+CREATE TABLE `blade_scope_data` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单主键',
+ `resource_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编号',
+ `scope_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限名称',
+ `scope_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段',
+ `scope_class` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限类名',
+ `scope_column` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段',
+ `scope_type` int(2) NULL DEFAULT NULL COMMENT '数据权限类型',
+ `scope_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限值域',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限备注',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
+ `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
+ `status` int(2) NULL DEFAULT NULL COMMENT '状态',
+ `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据权限表';
+
-- ----------------------------
-- Table structure for blade_tenant
-- ----------------------------
DROP TABLE IF EXISTS `blade_tenant`;
CREATE TABLE `blade_tenant` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户ID',
`tenant_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称',
`domain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '域名地址',
`linkman` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
`contact_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系地址',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
@@ -464,7 +502,7 @@ CREATE TABLE `blade_tenant` (
-- Records of blade_tenant
-- ----------------------------
BEGIN;
-INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', '', 'admin', '666666', '管理组', 1123598821738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
+INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', '', 'admin', '666666', '管理组', 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
COMMIT;
-- ----------------------------
@@ -472,7 +510,7 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_user`;
CREATE TABLE `blade_user` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户编号',
`account` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号',
@@ -487,9 +525,10 @@ CREATE TABLE `blade_user` (
`role_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id',
`dept_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
`post_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位id',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
@@ -500,7 +539,7 @@ CREATE TABLE `blade_user` (
-- Records of blade_user
-- ----------------------------
BEGIN;
-INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', NULL, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', '', 'admin@bladex.vip', '22233322', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', '1123598817738675201', 1123598821738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0);
+INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', NULL, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', '', 'admin@bladex.vip', '22233322', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0);
COMMIT;
-- ----------------------------
@@ -508,10 +547,10 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_oauth`;
CREATE TABLE `blade_user_oauth` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID',
`uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第三方系统用户ID',
- `user_id` bigint(64) NULL DEFAULT NULL COMMENT '用户ID',
+ `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID',
`username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号',
`nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`avatar` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
diff --git a/doc/sql/blade/blade-sword-mysql.sql b/doc/sql/blade/blade-sword-mysql.sql
index c261e2c..6e3f047 100644
--- a/doc/sql/blade/blade-sword-mysql.sql
+++ b/doc/sql/blade/blade-sword-mysql.sql
@@ -3,15 +3,15 @@
Source Server : mysql_localhost
Source Server Type : MySQL
- Source Server Version : 50723
+ Source Server Version : 50729
Source Host : localhost:3306
Source Schema : blade
Target Server Type : MySQL
- Target Server Version : 50723
+ Target Server Version : 50729
File Encoding : 65001
- Date: 06/11/2020 17:22:55
+ Date: 02/11/2021 16:58:38
*/
SET NAMES utf8mb4;
@@ -22,7 +22,7 @@ SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
DROP TABLE IF EXISTS `blade_client`;
CREATE TABLE `blade_client` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`client_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端id',
`client_secret` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户端密钥',
`resource_ids` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源集合',
@@ -34,9 +34,10 @@ CREATE TABLE `blade_client` (
`refresh_token_validity` int(11) NOT NULL COMMENT '刷新令牌过期秒数',
`additional_information` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加说明',
`autoapprove` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '自动授权',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NOT NULL COMMENT '状态',
`is_deleted` int(2) NOT NULL COMMENT '是否已删除',
@@ -47,7 +48,7 @@ CREATE TABLE `blade_client` (
-- Records of blade_client
-- ----------------------------
BEGIN;
-INSERT INTO `blade_client` VALUES (1123598811738675201, 'sword', 'sword_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8888', NULL, 3600, 604800, NULL, NULL, 1, '2019-03-24 10:40:55', 1, '2019-03-24 10:40:59', 1, 0), (1123598811738675202, 'saber', 'saber_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8080', NULL, 3600, 604800, NULL, NULL, 1, '2019-03-24 10:42:29', 1, '2019-03-24 10:42:32', 1, 0);
+INSERT INTO `blade_client` VALUES (1123598811738675201, 'sword', 'sword_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8888', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:40:55', 1, '2019-03-24 10:40:59', 1, 0), (1123598811738675202, 'saber', 'saber_secret', NULL, 'all', 'refresh_token,password,authorization_code', 'http://localhost:8080', NULL, 3600, 604800, NULL, NULL, 1, 1123598813738675201, '2019-03-24 10:42:29', 1, '2019-03-24 10:42:32', 1, 0);
COMMIT;
-- ----------------------------
@@ -55,8 +56,8 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_code`;
CREATE TABLE `blade_code` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `datasource_id` bigint(64) NULL DEFAULT NULL COMMENT '数据源主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `datasource_id` bigint(20) NULL DEFAULT NULL COMMENT '数据源主键',
`service_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务名称',
`code_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模块名称',
`table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表名',
@@ -83,16 +84,16 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_datasource`;
CREATE TABLE `blade_datasource` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
`driver_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '驱动类',
`url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '连接地址',
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
@@ -111,9 +112,10 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_dept`;
CREATE TABLE `blade_dept` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键',
+ `ancestors` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖级列表',
`dept_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名',
`full_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门全称',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
@@ -126,7 +128,7 @@ CREATE TABLE `blade_dept` (
-- Records of blade_dept
-- ----------------------------
BEGIN;
-INSERT INTO `blade_dept` VALUES (1123598813738675201, '000000', 0, '刀锋科技', '江苏刀锋科技有限公司', 1, NULL, 0), (1123598813738675202, '000000', 1123598813738675201, '常州刀锋', '常州刀锋科技有限公司', 1, NULL, 0), (1123598813738675203, '000000', 1123598813738675201, '苏州刀锋', '苏州刀锋科技有限公司', 1, NULL, 0);
+INSERT INTO `blade_dept` VALUES (1123598813738675201, '000000', 0, '0', '刀锋科技', '江苏刀锋科技有限公司', 1, NULL, 0), (1123598813738675202, '000000', 1123598813738675201, '0,1123598813738675201', '常州刀锋', '常州刀锋科技有限公司', 1, NULL, 0), (1123598813738675203, '000000', 1123598813738675201, '0,1123598813738675201', '苏州刀锋', '苏州刀锋科技有限公司', 1, NULL, 0);
COMMIT;
-- ----------------------------
@@ -134,8 +136,8 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_dict`;
CREATE TABLE `blade_dict` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典码',
`dict_key` int(2) NULL DEFAULT NULL COMMENT '字典值',
`dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称',
@@ -149,7 +151,7 @@ CREATE TABLE `blade_dict` (
-- Records of blade_dict
-- ----------------------------
BEGIN;
-INSERT INTO `blade_dict` VALUES (1123598814738675201, 0, 'sex', -1, '性别', 1, NULL, 0), (1123598814738675202, 1123598814738675201, 'sex', 1, '男', 1, NULL, 0), (1123598814738675203, 1123598814738675201, 'sex', 2, '女', 2, NULL, 0), (1123598814738675204, 0, 'notice', -1, '通知类型', 2, NULL, 0), (1123598814738675205, 1123598814738675204, 'notice', 1, '发布通知', 1, NULL, 0), (1123598814738675206, 1123598814738675204, 'notice', 2, '批转通知', 2, NULL, 0), (1123598814738675207, 1123598814738675204, 'notice', 3, '转发通知', 3, NULL, 0), (1123598814738675208, 1123598814738675204, 'notice', 4, '指示通知', 4, NULL, 0), (1123598814738675209, 1123598814738675204, 'notice', 5, '任免通知', 5, NULL, 0), (1123598814738675210, 1123598814738675204, 'notice', 6, '事务通知', 6, NULL, 0), (1123598814738675211, 0, 'menu_category', -1, '菜单类型', 3, NULL, 0), (1123598814738675212, 1123598814738675211, 'menu_category', 1, '菜单', 1, NULL, 0), (1123598814738675213, 1123598814738675211, 'menu_category', 2, '按钮', 2, NULL, 0), (1123598814738675214, 0, 'button_func', -1, '按钮功能', 4, NULL, 0), (1123598814738675215, 1123598814738675214, 'button_func', 1, '工具栏', 1, NULL, 0), (1123598814738675216, 1123598814738675214, 'button_func', 2, '操作栏', 2, NULL, 0), (1123598814738675217, 1123598814738675214, 'button_func', 3, '工具操作栏', 3, NULL, 0), (1123598814738675218, 0, 'yes_no', -1, '是否', 5, NULL, 0), (1123598814738675219, 1123598814738675218, 'yes_no', 1, '否', 1, NULL, 0), (1123598814738675220, 1123598814738675218, 'yes_no', 2, '是', 2, NULL, 0), (1123598814738777220, 0, 'post_category', -1, '岗位类型', 12, NULL, 0), (1123598814738777221, 1123598814738777220, 'post_category', 1, '高层', 1, NULL, 0), (1123598814738777222, 1123598814738777220, 'post_category', 2, '中层', 2, NULL, 0), (1123598814738777223, 1123598814738777220, 'post_category', 3, '基层', 3, NULL, 0), (1123598814738777224, 1123598814738777220, 'post_category', 4, '其他', 4, NULL, 0), (1123598814738777230, 0, 'region', -1, '行政区划', 13, NULL, 0), (1123598814738777231, 1123598814738777230, 'region', 0, '国家', 0, NULL, 0), (1123598814738777232, 1123598814738777230, 'region', 1, '省份/直辖市', 1, NULL, 0), (1123598814738777233, 1123598814738777230, 'region', 2, '地市', 2, NULL, 0), (1123598814738777234, 1123598814738777230, 'region', 3, '区县', 3, NULL, 0), (1123598814738777235, 1123598814738777230, 'region', 4, '乡镇', 4, NULL, 0), (1123598814738777236, 1123598814738777230, 'region', 5, '村委', 5, NULL, 0);
+INSERT INTO `blade_dict` VALUES (1123598814738675201, 0, 'sex', -1, '性别', 1, NULL, 0), (1123598814738675202, 1123598814738675201, 'sex', 1, '男', 1, NULL, 0), (1123598814738675203, 1123598814738675201, 'sex', 2, '女', 2, NULL, 0), (1123598814738675204, 0, 'notice', -1, '通知类型', 2, NULL, 0), (1123598814738675205, 1123598814738675204, 'notice', 1, '发布通知', 1, NULL, 0), (1123598814738675206, 1123598814738675204, 'notice', 2, '批转通知', 2, NULL, 0), (1123598814738675207, 1123598814738675204, 'notice', 3, '转发通知', 3, NULL, 0), (1123598814738675208, 1123598814738675204, 'notice', 4, '指示通知', 4, NULL, 0), (1123598814738675209, 1123598814738675204, 'notice', 5, '任免通知', 5, NULL, 0), (1123598814738675210, 1123598814738675204, 'notice', 6, '事务通知', 6, NULL, 0), (1123598814738675211, 0, 'menu_category', -1, '菜单类型', 3, NULL, 0), (1123598814738675212, 1123598814738675211, 'menu_category', 1, '菜单', 1, NULL, 0), (1123598814738675213, 1123598814738675211, 'menu_category', 2, '按钮', 2, NULL, 0), (1123598814738675214, 0, 'button_func', -1, '按钮功能', 4, NULL, 0), (1123598814738675215, 1123598814738675214, 'button_func', 1, '工具栏', 1, NULL, 0), (1123598814738675216, 1123598814738675214, 'button_func', 2, '操作栏', 2, NULL, 0), (1123598814738675217, 1123598814738675214, 'button_func', 3, '工具操作栏', 3, NULL, 0), (1123598814738675218, 0, 'yes_no', -1, '是否', 5, NULL, 0), (1123598814738675219, 1123598814738675218, 'yes_no', 1, '否', 1, NULL, 0), (1123598814738675220, 1123598814738675218, 'yes_no', 2, '是', 2, NULL, 0), (1123598814738675231, 0, 'data_scope_type', -1, '数据权限', 8, NULL, 0), (1123598814738675232, 1123598814738675231, 'data_scope_type', 1, '全部可见', 1, NULL, 0), (1123598814738675233, 1123598814738675231, 'data_scope_type', 2, '本人可见', 2, NULL, 0), (1123598814738675234, 1123598814738675231, 'data_scope_type', 3, '所在机构可见', 3, NULL, 0), (1123598814738675235, 1123598814738675231, 'data_scope_type', 4, '所在机构及子级可见', 4, NULL, 0), (1123598814738675236, 1123598814738675231, 'data_scope_type', 5, '自定义', 5, NULL, 0), (1123598814738777220, 0, 'post_category', -1, '岗位类型', 12, NULL, 0), (1123598814738777221, 1123598814738777220, 'post_category', 1, '高层', 1, NULL, 0), (1123598814738777222, 1123598814738777220, 'post_category', 2, '中层', 2, NULL, 0), (1123598814738777223, 1123598814738777220, 'post_category', 3, '基层', 3, NULL, 0), (1123598814738777224, 1123598814738777220, 'post_category', 4, '其他', 4, NULL, 0), (1123598814738777230, 0, 'region', -1, '行政区划', 13, NULL, 0), (1123598814738777231, 1123598814738777230, 'region', 0, '国家', 0, NULL, 0), (1123598814738777232, 1123598814738777230, 'region', 1, '省份/直辖市', 1, NULL, 0), (1123598814738777233, 1123598814738777230, 'region', 2, '地市', 2, NULL, 0), (1123598814738777234, 1123598814738777230, 'region', 3, '区县', 3, NULL, 0), (1123598814738777235, 1123598814738777230, 'region', 4, '乡镇', 4, NULL, 0), (1123598814738777236, 1123598814738777230, 'region', 5, '村委', 5, NULL, 0);
COMMIT;
-- ----------------------------
@@ -157,7 +159,7 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_api`;
CREATE TABLE `blade_log_api` (
- `id` bigint(64) NOT NULL COMMENT '编号',
+ `id` bigint(20) NOT NULL COMMENT '编号',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
@@ -183,7 +185,7 @@ CREATE TABLE `blade_log_api` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_error`;
CREATE TABLE `blade_log_error` (
- `id` bigint(64) NOT NULL COMMENT '编号',
+ `id` bigint(20) NOT NULL COMMENT '编号',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
@@ -212,7 +214,7 @@ CREATE TABLE `blade_log_error` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_log_usual`;
CREATE TABLE `blade_log_usual` (
- `id` bigint(64) NOT NULL COMMENT '编号',
+ `id` bigint(20) NOT NULL COMMENT '编号',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
@@ -239,8 +241,8 @@ CREATE TABLE `blade_log_usual` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_menu`;
CREATE TABLE `blade_menu` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父级菜单',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父级菜单',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单编号',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
`alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单别名',
@@ -259,7 +261,7 @@ CREATE TABLE `blade_menu` (
-- Records of blade_menu
-- ----------------------------
BEGIN;
-INSERT INTO `blade_menu` VALUES (1123598815738675201, 0, 'desk', '工作台', 'menu', '/desk', 'desktop', 1, 1, 0, 1, NULL, 0), (1123598815738675202, 1123598815738675201, 'notice', '通知公告', 'menu', '/desk/notice', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675203, 0, 'system', '系统管理', 'menu', '/system', 'setting', 99, 1, 0, 1, NULL, 0), (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', NULL, 2, 1, 0, 1, NULL, 0), (1123598815738675206, 1123598815738675203, 'dict', '字典管理', 'menu', '/system/dict', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu', NULL, 4, 1, 0, 1, NULL, 0), (1123598815738675208, 1123598815738675203, 'role', '角色管理', 'menu', '/system/role', NULL, 5, 1, 0, 1, NULL, 0), (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param', NULL, 6, 1, 0, 1, NULL, 0), (1123598815738675210, 0, 'monitor', '系统监控', 'menu', '/monitor', 'fund', 3, 1, 0, 1, NULL, 0), (1123598815738675211, 1123598815738675210, 'doc', '接口文档', 'menu', 'http://localhost/doc.html', NULL, 1, 1, 0, 2, NULL, 0), (1123598815738675212, 1123598815738675210, 'admin', '服务治理', 'menu', 'http://localhost:7002', NULL, 2, 1, 0, 2, NULL, 0), (1123598815738675213, 1123598815738675210, 'log', '日志管理', 'menu', '/monitor/log', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL, 0), (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675217, 0, 'tool', '研发工具', 'menu', '/tool', 'tool', 4, 1, 0, 1, NULL, 0), (1123598815738675218, 1123598815738675217, 'code', '代码生成', 'menu', '/tool/code', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675219, 1123598815738675202, 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675220, 1123598815738675202, 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675221, 1123598815738675202, 'notice_delete', '删除', 'delete', '/api/blade-desk/notice/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675222, 1123598815738675202, 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/blade-user/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0), (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password', '/api/blade-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0), (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2, 1, NULL, 0), (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/blade-system/dept/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675233, 1123598815738675206, 'dict_add', '新增', 'add', '/system/dict/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675234, 1123598815738675206, 'dict_edit', '修改', 'edit', '/system/dict/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675235, 1123598815738675206, 'dict_delete', '删除', 'delete', '/api/blade-system/dict/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675236, 1123598815738675206, 'dict_view', '查看', 'view', '/system/dict/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/blade-system/menu/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675241, 1123598815738675208, 'role_add', '新增', 'add', '/system/role/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675242, 1123598815738675208, 'role_edit', '修改', 'edit', '/system/role/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675243, 1123598815738675208, 'role_delete', '删除', 'delete', '/api/blade-system/role/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675244, 1123598815738675208, 'role_view', '查看', 'view', '/system/role/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675245, 1123598815738675209, 'param_add', '新增', 'add', '/system/param/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675246, 1123598815738675209, 'param_edit', '修改', 'edit', '/system/param/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675247, 1123598815738675209, 'param_delete', '删除', 'delete', '/api/blade-system/param/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675248, 1123598815738675209, 'param_view', '查看', 'view', '/system/param/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675252, 1123598815738675218, 'code_add', '新增', 'add', '/tool/code/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675253, 1123598815738675218, 'code_edit', '修改', 'edit', '/tool/code/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675254, 1123598815738675218, 'code_delete', '删除', 'delete', '/api/blade-system/code/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675255, 1123598815738675218, 'code_view', '查看', 'view', '/tool/code/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675256, 1123598815738675203, 'tenant', '租户管理', 'menu', '/system/tenant', NULL, 7, 1, 0, 1, NULL, 0), (1123598815738675257, 1123598815738675256, 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675258, 1123598815738675256, 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675259, 1123598815738675256, 'tenant_delete', '删除', 'delete', '/api/blade-system/tenant/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675260, 1123598815738675256, 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675261, 1123598815738675203, 'client', '应用管理', 'menu', '/system/client', NULL, 8, 1, 0, 1, NULL, 0), (1123598815738675262, 1123598815738675261, 'client_add', '新增', 'add', '/system/client/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675263, 1123598815738675261, 'client_edit', '修改', 'edit', '/system/client/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675264, 1123598815738675261, 'client_delete', '删除', 'delete', '/api/blade-system/client/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675265, 1123598815738675261, 'client_view', '查看', 'view', '/system/client/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1123598815738675266, 1123598815738675217, 'datasource', '数据源管理', 'menu', '/tool/datasource', '', 2, 1, 0, 1, NULL, 0), (1123598815738675267, 1123598815738675266, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675268, 1123598815738675266, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675269, 1123598815738675266, 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675270, 1123598815738675266, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', '', 2, 1, 0, 1, NULL, 0), (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL, 0), (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1, NULL, 0), (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/blade-system/post/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1164733399668962201, 0, 'base', '基础配置', 'menu', '/base', 'sliders', 97, 1, 0, 1, NULL, 0), (1164733399668962202, 1164733399668962201, 'region', '行政区划', 'menu', '/base/region', '', 1, 1, 0, 1, NULL, 0), (1164733399668962203, 1164733399668962202, 'region_add', '新增下级', 'add', '', '', 1, 2, 1, 1, NULL, 0), (1164733399668962204, 1164733399668962202, 'region_delete', '删除', 'delete', '/api/blade-system/region/remove', '', 2, 2, 2, 1, NULL, 0), (1164733399668962205, 1164733399668962202, 'region_import', '导入', 'import', '', '', 3, 2, 3, 1, NULL, 0), (1164733399668962206, 1164733399668962202, 'region_export', '导出', 'export', '', '', 4, 2, 2, 1, NULL, 0), (1164733399668962207, 1164733399668962202, 'region_debug', '调试', 'debug', '', '', 5, 2, 2, 1, NULL, 0), (1164733399669962301, 0, 'report', '报表管理', 'menu', '/report', 'bar-chart', 5, 1, 0, 1, NULL, 0), (1164733399669962302, 1164733399669962301, 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', '', 1, 1, 0, 1, NULL, 0), (1164733399669962303, 1164733399669962301, 'report_list', '报表列表', 'menu', '/report/reportlist', '', 2, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu` VALUES (1123598815738675201, 0, 'desk', '工作台', 'menu', '/desk', 'desktop', 1, 1, 0, 1, NULL, 0), (1123598815738675202, 1123598815738675201, 'notice', '通知公告', 'menu', '/desk/notice', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675203, 0, 'system', '系统管理', 'menu', '/system', 'setting', 99, 1, 0, 1, NULL, 0), (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', NULL, 2, 1, 0, 1, NULL, 0), (1123598815738675206, 1123598815738675203, 'dict', '字典管理', 'menu', '/system/dict', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu', NULL, 4, 1, 0, 1, NULL, 0), (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param', NULL, 6, 1, 0, 1, NULL, 0), (1123598815738675210, 0, 'monitor', '系统监控', 'menu', '/monitor', 'fund', 3, 1, 0, 1, NULL, 0), (1123598815738675211, 1123598815738675210, 'doc', '接口文档', 'menu', 'http://localhost/doc.html', NULL, 1, 1, 0, 2, NULL, 0), (1123598815738675212, 1123598815738675210, 'admin', '服务治理', 'menu', 'http://localhost:7002', NULL, 2, 1, 0, 2, NULL, 0), (1123598815738675213, 1123598815738675210, 'log', '日志管理', 'menu', '/monitor/log', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL, 0), (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1, NULL, 0), (1123598815738675217, 0, 'tool', '研发工具', 'menu', '/tool', 'tool', 4, 1, 0, 1, NULL, 0), (1123598815738675218, 1123598815738675217, 'code', '代码生成', 'menu', '/tool/code', NULL, 1, 1, 0, 1, NULL, 0), (1123598815738675219, 1123598815738675202, 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675220, 1123598815738675202, 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675221, 1123598815738675202, 'notice_delete', '删除', 'delete', '/api/blade-desk/notice/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675222, 1123598815738675202, 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/blade-user/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0), (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password', '/api/blade-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0), (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2, 1, NULL, 0), (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/blade-system/dept/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675233, 1123598815738675206, 'dict_add', '新增', 'add', '/system/dict/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675234, 1123598815738675206, 'dict_edit', '修改', 'edit', '/system/dict/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675235, 1123598815738675206, 'dict_delete', '删除', 'delete', '/api/blade-system/dict/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675236, 1123598815738675206, 'dict_view', '查看', 'view', '/system/dict/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/blade-system/menu/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675241, 1123598815738675308, 'role_add', '新增', 'add', '/authority/role/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675242, 1123598815738675308, 'role_edit', '修改', 'edit', '/authority/role/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675243, 1123598815738675308, 'role_delete', '删除', 'delete', '/api/blade-system/role/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675244, 1123598815738675308, 'role_view', '查看', 'view', '/authority/role/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675245, 1123598815738675209, 'param_add', '新增', 'add', '/system/param/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675246, 1123598815738675209, 'param_edit', '修改', 'edit', '/system/param/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675247, 1123598815738675209, 'param_delete', '删除', 'delete', '/api/blade-system/param/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675248, 1123598815738675209, 'param_view', '查看', 'view', '/system/param/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675252, 1123598815738675218, 'code_add', '新增', 'add', '/tool/code/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675253, 1123598815738675218, 'code_edit', '修改', 'edit', '/tool/code/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675254, 1123598815738675218, 'code_delete', '删除', 'delete', '/api/blade-system/code/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675255, 1123598815738675218, 'code_view', '查看', 'view', '/tool/code/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675256, 1123598815738675203, 'tenant', '租户管理', 'menu', '/system/tenant', NULL, 7, 1, 0, 1, NULL, 0), (1123598815738675257, 1123598815738675256, 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675258, 1123598815738675256, 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', 2, 2, 2, 1, NULL, 0), (1123598815738675259, 1123598815738675256, 'tenant_delete', '删除', 'delete', '/api/blade-system/tenant/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1123598815738675260, 1123598815738675256, 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1123598815738675261, 1123598815738675203, 'client', '应用管理', 'menu', '/system/client', NULL, 8, 1, 0, 1, NULL, 0), (1123598815738675262, 1123598815738675261, 'client_add', '新增', 'add', '/system/client/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675263, 1123598815738675261, 'client_edit', '修改', 'edit', '/system/client/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675264, 1123598815738675261, 'client_delete', '删除', 'delete', '/api/blade-system/client/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675265, 1123598815738675261, 'client_view', '查看', 'view', '/system/client/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1123598815738675266, 1123598815738675217, 'datasource', '数据源管理', 'menu', '/tool/datasource', '', 2, 1, 0, 1, NULL, 0), (1123598815738675267, 1123598815738675266, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2, 1, 1, NULL, 0), (1123598815738675268, 1123598815738675266, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2, 2, 2, 2, NULL, 0), (1123598815738675269, 1123598815738675266, 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', 3, 2, 3, 3, NULL, 0), (1123598815738675270, 1123598815738675266, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', 4, 2, 2, 2, NULL, 0), (1123598815738675307, 0, 'authority', '权限管理', 'menu', '/authority', 'safety-certificate', 98, 1, 0, 1, '', 0), (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', '', 1, 1, 0, 1, NULL, 0), (1123598815738675309, 1123598815738675307, 'data_scope', '数据权限', 'menu', '/authority/datascope', '', 2, 1, 0, 1, '', 0), (1123598815738675310, 1123598815738675309, 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', 1, 2, 2, 1, NULL, 0), (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', '', 2, 1, 0, 1, NULL, 0), (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL, 0), (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1, NULL, 0), (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/blade-system/post/remove', 'delete', 3, 2, 3, 1, NULL, 0), (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2, 1, NULL, 0), (1164733399668962201, 0, 'base', '基础配置', 'menu', '/base', 'sliders', 97, 1, 0, 1, NULL, 0), (1164733399668962202, 1164733399668962201, 'region', '行政区划', 'menu', '/base/region', '', 1, 1, 0, 1, NULL, 0), (1164733399668962203, 1164733399668962202, 'region_add', '新增下级', 'add', '', '', 1, 2, 1, 1, NULL, 0), (1164733399668962204, 1164733399668962202, 'region_delete', '删除', 'delete', '/api/blade-system/region/remove', '', 2, 2, 2, 1, NULL, 0), (1164733399668962205, 1164733399668962202, 'region_import', '导入', 'import', '', '', 3, 2, 3, 1, NULL, 0), (1164733399668962206, 1164733399668962202, 'region_export', '导出', 'export', '', '', 4, 2, 2, 1, NULL, 0), (1164733399668962207, 1164733399668962202, 'region_debug', '调试', 'debug', '', '', 5, 2, 2, 1, NULL, 0), (1164733399669962301, 0, 'report', '报表管理', 'menu', '/report', 'bar-chart', 5, 1, 0, 1, NULL, 0), (1164733399669962302, 1164733399669962301, 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', '', 1, 1, 0, 1, NULL, 0), (1164733399669962303, 1164733399669962301, 'report_list', '报表列表', 'menu', '/report/reportlist', '', 2, 1, 0, 1, NULL, 0);
COMMIT;
-- ----------------------------
@@ -267,15 +269,16 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_notice`;
CREATE TABLE `blade_notice` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`category` int(11) NULL DEFAULT NULL COMMENT '类型',
`release_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间',
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
@@ -286,7 +289,7 @@ CREATE TABLE `blade_notice` (
-- Records of blade_notice
-- ----------------------------
BEGIN;
-INSERT INTO `blade_notice` VALUES (1123598818738675223, '000000', '测试公告', 3, '2018-12-31 20:03:31', '222', 1123598821738675201, '2018-12-05 20:03:31', 1123598821738675201, '2018-12-28 11:10:51', 1, 0), (1123598818738675224, '000000', '测试公告2', 1, '2018-12-05 20:03:31', '333', 1123598821738675201, '2018-12-28 10:32:26', 1123598821738675201, '2018-12-28 11:10:34', 1, 0), (1123598818738675225, '000000', '测试公告3', 6, '2018-12-29 00:00:00', '11111', 1123598821738675201, '2018-12-28 11:03:44', 1123598821738675201, '2018-12-28 11:10:28', 1, 0);
+INSERT INTO `blade_notice` VALUES (1123598818738675223, '000000', '测试公告', 3, '2018-12-31 20:03:31', '222', 1123598821738675201, 1123598813738675201, '2018-12-05 20:03:31', 1123598821738675201, '2018-12-28 11:10:51', 1, 0), (1123598818738675224, '000000', '测试公告2', 1, '2018-12-05 20:03:31', '333', 1123598821738675201, 1123598813738675201, '2018-12-28 10:32:26', 1123598821738675201, '2018-12-28 11:10:34', 1, 0), (1123598818738675225, '000000', '测试公告3', 6, '2018-12-29 00:00:00', '11111', 1123598821738675201, 1123598813738675201, '2018-12-28 11:03:44', 1123598821738675201, '2018-12-28 11:10:28', 1, 0);
COMMIT;
-- ----------------------------
@@ -294,14 +297,15 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_param`;
CREATE TABLE `blade_param` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`param_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名',
`param_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数键',
`param_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数值',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
@@ -312,7 +316,7 @@ CREATE TABLE `blade_param` (
-- Records of blade_param
-- ----------------------------
BEGIN;
-INSERT INTO `blade_param` VALUES (1123598819738675201, '是否开启注册功能', 'account.registerUser', 'true', '开启注册', 1123598821738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0), (1123598819738675202, '账号初始密码', 'account.initPassword', '123456', '初始密码', 1123598821738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0);
+INSERT INTO `blade_param` VALUES (1123598819738675201, '是否开启注册功能', 'account.registerUser', 'true', '开启注册', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0), (1123598819738675202, '账号初始密码', 'account.initPassword', '123456', '初始密码', 1123598821738675201, 1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0);
COMMIT;
-- ----------------------------
@@ -320,17 +324,17 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_post`;
CREATE TABLE `blade_post` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`category` int(11) NULL DEFAULT NULL COMMENT '岗位类型',
`post_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位编号',
`post_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位名称',
`sort` int(2) NULL DEFAULT NULL COMMENT '岗位排序',
`remark` varchar(255) 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 '创建部门',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
@@ -387,7 +391,7 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_report_file`;
CREATE TABLE `blade_report_file` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名',
`content` mediumblob NULL COMMENT '文件内容',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
@@ -401,9 +405,9 @@ CREATE TABLE `blade_report_file` (
-- ----------------------------
DROP TABLE IF EXISTS `blade_role`;
CREATE TABLE `blade_role` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
- `parent_id` bigint(64) NULL DEFAULT 0 COMMENT '父主键',
+ `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父主键',
`role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
`role_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色别名',
@@ -423,9 +427,9 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_role_menu`;
CREATE TABLE `blade_role_menu` (
- `id` bigint(64) NOT NULL COMMENT '主键',
- `menu_id` bigint(64) NULL DEFAULT NULL COMMENT '菜单id',
- `role_id` bigint(64) NULL DEFAULT NULL COMMENT '角色id',
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单id',
+ `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单表';
@@ -433,24 +437,61 @@ CREATE TABLE `blade_role_menu` (
-- Records of blade_role_menu
-- ----------------------------
BEGIN;
-INSERT INTO `blade_role_menu` VALUES (1123598817738675201, 1123598815738675201, 1123598816738675201), (1123598817738675202, 1123598815738675202, 1123598816738675201), (1123598817738675203, 1123598815738675203, 1123598816738675201), (1123598817738675204, 1123598815738675204, 1123598816738675201), (1123598817738675205, 1123598815738675205, 1123598816738675201), (1123598817738675206, 1123598815738675206, 1123598816738675201), (1123598817738675207, 1123598815738675207, 1123598816738675201), (1123598817738675208, 1123598815738675208, 1123598816738675201), (1123598817738675209, 1123598815738675209, 1123598816738675201), (1123598817738675210, 1123598815738675210, 1123598816738675201), (1123598817738675211, 1123598815738675211, 1123598816738675201), (1123598817738675212, 1123598815738675212, 1123598816738675201), (1123598817738675213, 1123598815738675213, 1123598816738675201), (1123598817738675214, 1123598815738675214, 1123598816738675201), (1123598817738675215, 1123598815738675215, 1123598816738675201), (1123598817738675216, 1123598815738675216, 1123598816738675201), (1123598817738675217, 1123598815738675217, 1123598816738675201), (1123598817738675218, 1123598815738675218, 1123598816738675201), (1123598817738675219, 1123598815738675219, 1123598816738675201), (1123598817738675220, 1123598815738675220, 1123598816738675201), (1123598817738675221, 1123598815738675221, 1123598816738675201), (1123598817738675222, 1123598815738675222, 1123598816738675201), (1123598817738675223, 1123598815738675223, 1123598816738675201), (1123598817738675224, 1123598815738675224, 1123598816738675201), (1123598817738675225, 1123598815738675225, 1123598816738675201), (1123598817738675226, 1123598815738675226, 1123598816738675201), (1123598817738675227, 1123598815738675227, 1123598816738675201), (1123598817738675228, 1123598815738675228, 1123598816738675201), (1123598817738675229, 1123598815738675229, 1123598816738675201), (1123598817738675230, 1123598815738675230, 1123598816738675201), (1123598817738675231, 1123598815738675231, 1123598816738675201), (1123598817738675232, 1123598815738675232, 1123598816738675201), (1123598817738675233, 1123598815738675233, 1123598816738675201), (1123598817738675234, 1123598815738675234, 1123598816738675201), (1123598817738675235, 1123598815738675235, 1123598816738675201), (1123598817738675236, 1123598815738675236, 1123598816738675201), (1123598817738675237, 1123598815738675237, 1123598816738675201), (1123598817738675238, 1123598815738675238, 1123598816738675201), (1123598817738675239, 1123598815738675239, 1123598816738675201), (1123598817738675240, 1123598815738675240, 1123598816738675201), (1123598817738675241, 1123598815738675241, 1123598816738675201), (1123598817738675242, 1123598815738675242, 1123598816738675201), (1123598817738675243, 1123598815738675243, 1123598816738675201), (1123598817738675244, 1123598815738675244, 1123598816738675201), (1123598817738675245, 1123598815738675245, 1123598816738675201), (1123598817738675246, 1123598815738675246, 1123598816738675201), (1123598817738675247, 1123598815738675247, 1123598816738675201), (1123598817738675248, 1123598815738675248, 1123598816738675201), (1123598817738675249, 1123598815738675249, 1123598816738675201), (1123598817738675250, 1123598815738675250, 1123598816738675201), (1123598817738675251, 1123598815738675251, 1123598816738675201), (1123598817738675252, 1123598815738675252, 1123598816738675201), (1123598817738675253, 1123598815738675253, 1123598816738675201), (1123598817738675254, 1123598815738675254, 1123598816738675201), (1123598817738675255, 1123598815738675255, 1123598816738675201), (1123598817738675256, 1123598815738675256, 1123598816738675201), (1123598817738675257, 1123598815738675257, 1123598816738675201), (1123598817738675258, 1123598815738675258, 1123598816738675201), (1123598817738675259, 1123598815738675259, 1123598816738675201), (1123598817738675260, 1123598815738675260, 1123598816738675201), (1123598817738675261, 1123598815738675261, 1123598816738675201), (1123598817738675262, 1123598815738675262, 1123598816738675201), (1123598817738675263, 1123598815738675263, 1123598816738675201), (1123598817738675264, 1123598815738675264, 1123598816738675201), (1123598817738675265, 1123598815738675265, 1123598816738675201), (1123598817738675266, 1123598815738675266, 1123598816738675201), (1123598817738675267, 1123598815738675267, 1123598816738675201), (1123598817738675268, 1123598815738675268, 1123598816738675201), (1123598817738675269, 1123598815738675269, 1123598816738675201), (1123598817738675270, 1123598815738675270, 1123598816738675201), (1161272893875225001, 1164733389668962251, 1123598816738675201), (1161272893875225002, 1164733389668962252, 1123598816738675201), (1161272893875225003, 1164733389668962253, 1123598816738675201), (1161272893875225004, 1164733389668962254, 1123598816738675201), (1161272893875225005, 1164733389668962255, 1123598816738675201), (1161272893875225006, 1164733389668962256, 1123598816738675201), (1161272893875226001, 1164733399668962201, 1123598816738675201), (1161272893875226002, 1164733399668962202, 1123598816738675201), (1161272893875226003, 1164733399668962203, 1123598816738675201), (1161272893875226004, 1164733399668962204, 1123598816738675201), (1161272893875226005, 1164733399668962205, 1123598816738675201), (1161272893875226006, 1164733399668962206, 1123598816738675201), (1161272893875226007, 1164733399668962207, 1123598816738675201), (1161272893875228001, 1164733399669962301, 1123598816738675201), (1161272893875228002, 1164733399669962302, 1123598816738675201), (1161272893875228003, 1164733399669962303, 1123598816738675201), (1296030666634301441, 1123598815738675201, 1123598816738675202), (1296030666659467266, 1123598815738675202, 1123598816738675202), (1296030666680438785, 1123598815738675219, 1123598816738675202), (1296030666697216001, 1123598815738675220, 1123598816738675202), (1296030666713993218, 1123598815738675221, 1123598816738675202), (1296030666726576129, 1123598815738675222, 1123598816738675202);
+INSERT INTO `blade_role_menu` VALUES (1123598817738675201, 1123598815738675201, 1123598816738675201), (1123598817738675202, 1123598815738675202, 1123598816738675201), (1123598817738675203, 1123598815738675203, 1123598816738675201), (1123598817738675204, 1123598815738675204, 1123598816738675201), (1123598817738675205, 1123598815738675205, 1123598816738675201), (1123598817738675206, 1123598815738675206, 1123598816738675201), (1123598817738675207, 1123598815738675207, 1123598816738675201), (1123598817738675208, 1123598815738675208, 1123598816738675201), (1123598817738675209, 1123598815738675209, 1123598816738675201), (1123598817738675210, 1123598815738675210, 1123598816738675201), (1123598817738675211, 1123598815738675211, 1123598816738675201), (1123598817738675212, 1123598815738675212, 1123598816738675201), (1123598817738675213, 1123598815738675213, 1123598816738675201), (1123598817738675214, 1123598815738675214, 1123598816738675201), (1123598817738675215, 1123598815738675215, 1123598816738675201), (1123598817738675216, 1123598815738675216, 1123598816738675201), (1123598817738675217, 1123598815738675217, 1123598816738675201), (1123598817738675218, 1123598815738675218, 1123598816738675201), (1123598817738675219, 1123598815738675219, 1123598816738675201), (1123598817738675220, 1123598815738675220, 1123598816738675201), (1123598817738675221, 1123598815738675221, 1123598816738675201), (1123598817738675222, 1123598815738675222, 1123598816738675201), (1123598817738675223, 1123598815738675223, 1123598816738675201), (1123598817738675224, 1123598815738675224, 1123598816738675201), (1123598817738675225, 1123598815738675225, 1123598816738675201), (1123598817738675226, 1123598815738675226, 1123598816738675201), (1123598817738675227, 1123598815738675227, 1123598816738675201), (1123598817738675228, 1123598815738675228, 1123598816738675201), (1123598817738675229, 1123598815738675229, 1123598816738675201), (1123598817738675230, 1123598815738675230, 1123598816738675201), (1123598817738675231, 1123598815738675231, 1123598816738675201), (1123598817738675232, 1123598815738675232, 1123598816738675201), (1123598817738675233, 1123598815738675233, 1123598816738675201), (1123598817738675234, 1123598815738675234, 1123598816738675201), (1123598817738675235, 1123598815738675235, 1123598816738675201), (1123598817738675236, 1123598815738675236, 1123598816738675201), (1123598817738675237, 1123598815738675237, 1123598816738675201), (1123598817738675238, 1123598815738675238, 1123598816738675201), (1123598817738675239, 1123598815738675239, 1123598816738675201), (1123598817738675240, 1123598815738675240, 1123598816738675201), (1123598817738675241, 1123598815738675241, 1123598816738675201), (1123598817738675242, 1123598815738675242, 1123598816738675201), (1123598817738675243, 1123598815738675243, 1123598816738675201), (1123598817738675244, 1123598815738675244, 1123598816738675201), (1123598817738675245, 1123598815738675245, 1123598816738675201), (1123598817738675246, 1123598815738675246, 1123598816738675201), (1123598817738675247, 1123598815738675247, 1123598816738675201), (1123598817738675248, 1123598815738675248, 1123598816738675201), (1123598817738675249, 1123598815738675249, 1123598816738675201), (1123598817738675250, 1123598815738675250, 1123598816738675201), (1123598817738675251, 1123598815738675251, 1123598816738675201), (1123598817738675252, 1123598815738675252, 1123598816738675201), (1123598817738675253, 1123598815738675253, 1123598816738675201), (1123598817738675254, 1123598815738675254, 1123598816738675201), (1123598817738675255, 1123598815738675255, 1123598816738675201), (1123598817738675256, 1123598815738675256, 1123598816738675201), (1123598817738675257, 1123598815738675257, 1123598816738675201), (1123598817738675258, 1123598815738675258, 1123598816738675201), (1123598817738675259, 1123598815738675259, 1123598816738675201), (1123598817738675260, 1123598815738675260, 1123598816738675201), (1123598817738675261, 1123598815738675261, 1123598816738675201), (1123598817738675262, 1123598815738675262, 1123598816738675201), (1123598817738675263, 1123598815738675263, 1123598816738675201), (1123598817738675264, 1123598815738675264, 1123598816738675201), (1123598817738675265, 1123598815738675265, 1123598816738675201), (1123598817738675266, 1123598815738675266, 1123598816738675201), (1123598817738675267, 1123598815738675267, 1123598816738675201), (1123598817738675268, 1123598815738675268, 1123598816738675201), (1123598817738675269, 1123598815738675269, 1123598816738675201), (1123598817738675270, 1123598815738675270, 1123598816738675201), (1161272893875225001, 1164733389668962251, 1123598816738675201), (1161272893875225002, 1164733389668962252, 1123598816738675201), (1161272893875225003, 1164733389668962253, 1123598816738675201), (1161272893875225004, 1164733389668962254, 1123598816738675201), (1161272893875225005, 1164733389668962255, 1123598816738675201), (1161272893875225006, 1164733389668962256, 1123598816738675201), (1161272893875226001, 1164733399668962201, 1123598816738675201), (1161272893875226002, 1164733399668962202, 1123598816738675201), (1161272893875226003, 1164733399668962203, 1123598816738675201), (1161272893875226004, 1164733399668962204, 1123598816738675201), (1161272893875226005, 1164733399668962205, 1123598816738675201), (1161272893875226006, 1164733399668962206, 1123598816738675201), (1161272893875226007, 1164733399668962207, 1123598816738675201), (1161272893875228001, 1164733399669962301, 1123598816738675201), (1161272893875228002, 1164733399669962302, 1123598816738675201), (1161272893875228003, 1164733399669962303, 1123598816738675201), (1296030666634301441, 1123598815738675201, 1123598816738675202), (1296030666659467266, 1123598815738675202, 1123598816738675202), (1296030666680438785, 1123598815738675219, 1123598816738675202), (1296030666697216001, 1123598815738675220, 1123598816738675202), (1296030666713993218, 1123598815738675221, 1123598816738675202), (1296030666726576129, 1123598815738675222, 1123598816738675202), (1455363615489028098, 1123598815738675307, 1123598816738675201), (1455363615505805313, 1123598815738675309, 1123598816738675201), (1455363615518388225, 1123598815738675310, 1123598816738675201);
COMMIT;
+-- ----------------------------
+-- Table structure for blade_role_scope
+-- ----------------------------
+DROP TABLE IF EXISTS `blade_role_scope`;
+CREATE TABLE `blade_role_scope` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `scope_id` bigint(20) NULL DEFAULT NULL COMMENT '数据权限id',
+ `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
+
+-- ----------------------------
+-- Table structure for blade_scope_data
+-- ----------------------------
+DROP TABLE IF EXISTS `blade_scope_data`;
+CREATE TABLE `blade_scope_data` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单主键',
+ `resource_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编号',
+ `scope_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限名称',
+ `scope_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段',
+ `scope_class` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限类名',
+ `scope_column` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段',
+ `scope_type` int(2) NULL DEFAULT NULL COMMENT '数据权限类型',
+ `scope_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限值域',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限备注',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
+ `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
+ `status` int(2) NULL DEFAULT NULL COMMENT '状态',
+ `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据权限表';
+
-- ----------------------------
-- Table structure for blade_tenant
-- ----------------------------
DROP TABLE IF EXISTS `blade_tenant`;
CREATE TABLE `blade_tenant` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户ID',
`tenant_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称',
`domain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '域名地址',
`linkman` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
`contact_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系地址',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
@@ -461,7 +502,7 @@ CREATE TABLE `blade_tenant` (
-- Records of blade_tenant
-- ----------------------------
BEGIN;
-INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', '', 'admin', '666666', '管理组', 1123598821738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
+INSERT INTO `blade_tenant` VALUES (1123598820738675201, '000000', '管理组', '', 'admin', '666666', '管理组', 1123598821738675201, 1123598813738675201, '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
COMMIT;
-- ----------------------------
@@ -469,7 +510,7 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_user`;
CREATE TABLE `blade_user` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户编号',
`account` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号',
@@ -484,9 +525,10 @@ CREATE TABLE `blade_user` (
`role_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id',
`dept_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
`post_id` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位id',
- `create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- `update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
@@ -497,7 +539,7 @@ CREATE TABLE `blade_user` (
-- Records of blade_user
-- ----------------------------
BEGIN;
-INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', NULL, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', '', 'admin@bladex.vip', '22233322', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', '1123598817738675201', 1123598821738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0);
+INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', NULL, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', '', 'admin@bladex.vip', '22233322', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0);
COMMIT;
-- ----------------------------
@@ -505,10 +547,10 @@ COMMIT;
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_oauth`;
CREATE TABLE `blade_user_oauth` (
- `id` bigint(64) NOT NULL COMMENT '主键',
+ `id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID',
`uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第三方系统用户ID',
- `user_id` bigint(64) NULL DEFAULT NULL COMMENT '用户ID',
+ `user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID',
`username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号',
`nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`avatar` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
diff --git a/doc/sql/blade/blade-update-3.1.0~3.2.0.sql b/doc/sql/blade/blade-update-3.1.0~3.2.0.sql
new file mode 100644
index 0000000..a1e770e
--- /dev/null
+++ b/doc/sql/blade/blade-update-3.1.0~3.2.0.sql
@@ -0,0 +1,115 @@
+
+-- ----------------------------
+-- 创建数据权限表
+-- ----------------------------
+CREATE TABLE `blade_scope_data` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单主键',
+ `resource_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编号',
+ `scope_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限名称',
+ `scope_field` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段',
+ `scope_class` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限类名',
+ `scope_column` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限字段',
+ `scope_type` int(2) NULL DEFAULT NULL COMMENT '数据权限类型',
+ `scope_value` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限值域',
+ `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '数据权限备注',
+ `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
+ `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
+ `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
+ `status` int(2) NULL DEFAULT NULL COMMENT '状态',
+ `is_deleted` int(2) NULL DEFAULT NULL COMMENT '是否已删除',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据权限表';
+
+
+-- ----------------------------
+-- 创建数据权限角色表
+-- ----------------------------
+DROP TABLE IF EXISTS `blade_role_scope`;
+CREATE TABLE `blade_role_scope` (
+ `id` bigint(20) NOT NULL COMMENT '主键',
+ `scope_id` bigint(20) NULL DEFAULT NULL COMMENT '数据权限id',
+ `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci;
+
+SET FOREIGN_KEY_CHECKS = 1;
+
+-- ----------------------------
+-- 部门表增加字段
+-- ----------------------------
+ALTER TABLE `blade_dept`
+ ADD COLUMN `ancestors` varchar(2000) NULL COMMENT '祖级列表' AFTER `parent_id`;
+
+UPDATE `blade_dept` SET `tenant_id` = '000000', `parent_id` = 0, `ancestors` = '0', `dept_name` = '刀锋科技', `full_name` = '江苏刀锋科技有限公司', `sort` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598813738675201;
+UPDATE `blade_dept` SET `tenant_id` = '000000', `parent_id` = 1123598813738675201, `ancestors` = '0,1123598813738675201', `dept_name` = '常州刀锋', `full_name` = '常州刀锋科技有限公司', `sort` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598813738675202;
+UPDATE `blade_dept` SET `tenant_id` = '000000', `parent_id` = 1123598813738675201, `ancestors` = '0,1123598813738675201', `dept_name` = '苏州刀锋', `full_name` = '苏州刀锋科技有限公司', `sort` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598813738675203;
+
+-- ----------------------------
+-- 增加字典项
+-- ----------------------------
+INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675231, 0, 'data_scope_type', -1, '数据权限', 8, NULL, 0);
+INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675232, 1123598814738675231, 'data_scope_type', 1, '全部可见', 1, NULL, 0);
+INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675233, 1123598814738675231, 'data_scope_type', 2, '本人可见', 2, NULL, 0);
+INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675234, 1123598814738675231, 'data_scope_type', 3, '所在机构可见', 3, NULL, 0);
+INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675235, 1123598814738675231, 'data_scope_type', 4, '所在机构及子级可见', 4, NULL, 0);
+INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_deleted`) VALUES (1123598814738675236, 1123598814738675231, 'data_scope_type', 5, '自定义', 5, NULL, 0);
+
+
+-- ----------------------------
+-- 增加权限管理模块
+-- ----------------------------
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675307, 0, 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', 98, 1, 0, 1, '', 0);
+
+-- ----------------------------
+-- 角色管理迁移至权限管理
+-- ----------------------------
+DELETE FROM `blade_menu` WHERE ID = 1123598815738675208;
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss', 1, 1, 0, 1, NULL, 0);
+UPDATE `blade_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_add', `name` = '新增', `alias` = 'add', `path` = '/authority/role/add', `source` = 'plus', `sort` = 1, `category` = 2, `action` = 1, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675241;
+UPDATE `blade_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_edit', `name` = '修改', `alias` = 'edit', `path` = '/authority/role/edit', `source` = 'form', `sort` = 2, `category` = 2, `action` = 2, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675242;
+UPDATE `blade_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_delete', `name` = '删除', `alias` = 'delete', `path` = '/api/blade-system/role/remove', `source` = 'delete', `sort` = 3, `category` = 2, `action` = 3, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675243;
+UPDATE `blade_menu` SET `parent_id` = 1123598815738675308, `code` = 'role_view', `name` = '查看', `alias` = 'view', `path` = '/authority/role/view', `source` = 'file-text', `sort` = 4, `category` = 2, `action` = 2, `is_open` = 1, `remark` = NULL, `is_deleted` = 0 WHERE `id` = 1123598815738675244;
+
+
+-- ----------------------------
+-- 增加数据权限及接口权限独立菜单
+-- ----------------------------
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675309, 1123598815738675307, 'data_scope', '数据权限', 'menu', '/authority/datascope', 'iconfont icon-shujuzhanshi2', 2, 1, 0, 1, '', 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (1123598815738675310, 1123598815738675309, 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', 1, 2, 2, 1, NULL, 0);
+
+
+-- ----------------------------
+-- 增加数据权限及菜单权限
+-- ----------------------------
+INSERT INTO `blade_role_menu`(`id`, `menu_id`, `role_id`) VALUES (1455363615489028098, 1123598815738675307, 1123598816738675201);
+INSERT INTO `blade_role_menu`(`id`, `menu_id`, `role_id`) VALUES (1455363615505805313, 1123598815738675309, 1123598816738675201);
+INSERT INTO `blade_role_menu`(`id`, `menu_id`, `role_id`) VALUES (1455363615518388225, 1123598815738675310, 1123598816738675201);
+
+
+-- ----------------------------
+-- 增加create_dept字段并赋默认值
+-- ----------------------------
+ALTER TABLE `blade_client`
+ ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`;
+ALTER TABLE `blade_notice`
+ ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`;
+ALTER TABLE `blade_param`
+ ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`;
+ALTER TABLE `blade_tenant`
+ ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`;
+ALTER TABLE `blade_user`
+ ADD COLUMN `create_dept` bigint(20) NULL COMMENT '创建部门' AFTER `create_user`;
+
+UPDATE `blade_client` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL;
+UPDATE `blade_notice` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL;
+UPDATE `blade_param` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL;
+UPDATE `blade_tenant` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL;
+UPDATE `blade_user` SET create_dept = 1123598813738675201 WHERE create_dept IS NULL;
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index bc8433d..994a15e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,29 +5,29 @@
org.springblade
SpringBlade
- 3.1.0
+ 3.2.0
pom
- 3.1.0
- 3.1.0
+ 3.2.0
+ 3.2.0
1.8
3.8.1
2.10.5
1.6.2
- 2.0.8
+ 2.0.9
1.6.0
1.6.2
2.2.6
1.2.5
2021.1
- 2.0.2
- 2.4.2
+ 2.0.3
+ 2.5.3
2.0.0.RELEASE
- 2.5.2
- 2020.0.3
+ 2.5.6
+ 2020.0.4
Cairo-SR8
diff --git a/script/docker/.env b/script/docker/.env
index 2758b24..8cece65 100644
--- a/script/docker/.env
+++ b/script/docker/.env
@@ -1,2 +1,2 @@
REGISTER=192.168.0.157/blade
-TAG=3.1.0
+TAG=3.2.0
diff --git a/script/kuboard/kuboard_spring-blade.yaml b/script/kuboard/kuboard_spring-blade.yaml
index e00b563..6d5766e 100644
--- a/script/kuboard/kuboard_spring-blade.yaml
+++ b/script/kuboard/kuboard_spring-blade.yaml
@@ -152,7 +152,7 @@ spec:
spec:
containers:
- name: blade-admin
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-admin:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-admin:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -386,7 +386,7 @@ spec:
spec:
containers:
- name: blade-auth
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-auth:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-auth:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -625,7 +625,7 @@ spec:
spec:
containers:
- name: blade-desk
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-desk:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-desk:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -864,7 +864,7 @@ spec:
spec:
containers:
- name: blade-develop
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-develop:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-develop:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1096,7 +1096,7 @@ spec:
spec:
containers:
- name: blade-gateway
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-gateway:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-gateway:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1331,7 +1331,7 @@ spec:
spec:
containers:
- name: blade-log
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-log:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-log:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1565,7 +1565,7 @@ spec:
spec:
containers:
- name: blade-report
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-report:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-report:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -1799,7 +1799,7 @@ spec:
spec:
containers:
- name: blade-resource
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-resource:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-resource:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -2033,7 +2033,7 @@ spec:
spec:
containers:
- name: blade-system
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-system:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-system:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -2267,7 +2267,7 @@ spec:
spec:
containers:
- name: blade-user
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-user:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-user:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -2496,7 +2496,7 @@ spec:
spec:
containers:
- name: saber-web
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-web:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-web:3.2.0'
ports:
- name: web
containerPort: 80
@@ -2721,7 +2721,7 @@ spec:
spec:
containers:
- name: blade-swagger
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-swagger:3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-swagger:3.2.0'
args:
- '--spring.profiles.active=${PROFILE}'
- '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}'
@@ -3749,7 +3749,7 @@ spec:
spec:
containers:
- name: mysql
- image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-db:v3.1.0'
+ image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-db:v3.2.0'
ports:
- name: mysql
containerPort: 3306