diff --git a/.gitignore b/.gitignore index 83e50754..5850020e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,7 @@ Thumbs.db *.war *.ear /target + +# Flattened pom +.flattened-pom.xml +/**/.flattened-pom.xml diff --git a/LICENSE b/LICENSE index 55336630..bee99db2 100644 --- a/LICENSE +++ b/LICENSE @@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 BladeX (https://bladex.vip) + Copyright 2023 BladeX (https://bladex.cn) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index b121f996..f64f14a0 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,45 @@

- Downloads - Build Status + Downloads + Build Status Build Status - Coverage Status - Downloads - + Coverage Status + Downloads + Downloads - + Downloads

## SpringBlade微服务开发平台 * 采用前后端分离的模式,前端开源两个框架:[Sword](https://gitee.com/smallc/Sword) (基于 React、Ant Design)、[Saber](https://gitee.com/smallc/Saber) (基于 Vue、Element-UI) -* 后端采用SpringCloud全家桶,并同时对其基础组件做了高度的封装,单独开源出一个框架:[BladeTool](https://github.com/chillzhuang/blade-tool) +* 后端采用SpringCloud全家桶,并同时对其基础组件做了高度的封装,单独开源出一个框架:[BladeTool](https://gitee.com/smallc/blade-tool) * [BladeTool](https://github.com/chillzhuang/blade-tool)已推送至Maven中央库,直接引入即可,减少了工程的臃肿,也可更注重于业务开发 * 集成Sentinel从流量控制、熔断降级、系统负载等多个维度保护服务的稳定性。 * 注册中心、配置中心选型Nacos,为工程瘦身的同时加强各模块之间的联动。 -* 使用Traefik进行反向代理,监听后台变化自动化应用新的配置文件。 * 极简封装了多租户底层,用更少的代码换来拓展性更强的SaaS多租户系统。 -* 借鉴OAuth2,实现了多终端认证系统,可控制子系统的token权限互相隔离。 -* 借鉴Security,封装了Secure模块,采用JWT做Token认证,可拓展集成Redis等细颗粒度控制方案。 -* 稳定生产了两年,经历了从Camden -> Hoxton的技术架构,也经历了从fat jar -> docker -> k8s + jenkins的部署架构 +* 借鉴OAuth2,自研多终端认证系统,可控制子系统的token权限互相隔离。 +* 借鉴Security,自研Secure模块,采用JWT做Token认证,可拓展集成Redis等细颗粒度控制方案。 +* 稳定生产了六年,经历了从 Camden -> Hoxton -> 2023 的技术架构,也经历了从fat jar -> docker -> k8s + jenkins的部署架构。 * 项目分包明确,规范微服务的开发模式,使包与包之间的分工清晰。 ## 架构图 - + + +## 核心技术栈 + +| 技术栈 | 版本 | +|----------------------|------------| +| Java | 17+ | +| NodeJS | 18+ | +| Spring | 6.1.15 | +| Spring Boot | 3.2.12 | +| Spring Cloud | 2023.0.3 | +| Spring Cloud Alibaba | 2023.0.1.2 | +| Nacos Alibaba | 2.3.2 | +| Mybatis Plus | 3.5.8 | + ## 工程结构 ``` @@ -43,8 +56,7 @@ SpringBlade ├── blade-service -- 业务模块 ├ ├── blade-desk -- 工作台模块 ├ ├── blade-log -- 日志模块 -├ ├── blade-system -- 系统模块 -├ └── blade-user -- 用户模块 +├ └── blade-system -- 系统模块 ├── blade-service-api -- 业务模块api封装 ├ ├── blade-desk-api -- 工作台api ├ ├── blade-dict-api -- 字典api @@ -52,135 +64,80 @@ SpringBlade └── └── blade-user-api -- 用户api ``` -## 官网 -* 官网地址:[https://bladex.vip](https://bladex.vip) -* 问答社区:[https://sns.bladex.vip](https://sns.bladex.vip) -* 会员计划:[SpringBlade会员计划](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade会员计划) -* 交流一群:`477853168`(满) -* 交流二群:`751253339`(满) -* 交流三群:`784729540`(满) -* 交流四群:`1034621754`(满) -* 交流五群:`946350912` - -## 在线演示 -* Saber-基于Vue:[https://saber.bladex.vip](https://saber.bladex.vip) -* Sword-基于React:[https://sword.bladex.vip](https://sword.bladex.vip) -* Archer-全能代码生成系统:[https://archer.bladex.vip](https://archer.bladex.vip) -* Caster-数据大屏展示系统:[https://data.avuejs.com](https://data.avuejs.com) +## 官方信息 -## 技术文档 -* [SpringBlade开发手册一览](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册) -* [常见问题集锦](https://sns.bladex.vip/article-14966.html) - -## 项目地址 -* 后端Gitee地址:[https://gitee.com/smallc/SpringBlade](https://gitee.com/smallc/SpringBlade) -* 后端Github地址:[https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade) -* 后端SpringBoot版:[https://gitee.com/smallc/SpringBlade/tree/2.0-boot/](https://gitee.com/smallc/SpringBlade/tree/2.0-boot/) -* 前端框架Sword(基于React):[https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword) -* 前端框架Saber(基于Vue):[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber) -* 核心框架项目地址:[https://github.com/chillzhuang/blade-tool](https://github.com/chillzhuang/blade-tool) - -# 开源协议 -Apache Licence 2.0 ([英文原文](http://www.apache.org/licenses/LICENSE-2.0.html)) -Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,同样鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再发布(作为开源或商业软件)。 -需要满足的条件如下: -* 需要给代码的用户一份Apache Licence -* 如果你修改了代码,需要在被修改的文件中说明。 -* 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议,商标,专利声明和其他原来作者规定需要包含的说明。 -* 如果再发布的产品中包含一个Notice文件,则在Notice文件中需要带有Apache Licence。你可以在Notice中增加自己的许可,但不可以表现为对Apache Licence构成更改。 -Apache Licence也是对商业应用友好的许可。使用者也可以在需要的时候修改代码来满足需要并作为开源或商业产品发布/销售。 +| 简介 | 内容 | +|------|-------------------------------------------------------------------------------| +| 官网地址 | [https://bladex.cn](https://bladex.cn) | +| 问答社区 | [https://sns.bladex.cn](https://sns.bladex.cn) | +| 会员计划 | [SpringBlade会员计划](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade会员计划) | +| 交流一群 | `477853168` (满) | +| 交流二群 | `751253339` (满) | +| 交流三群 | `784729540` (满) | +| 交流四群 | `1034621754` (满) | +| 交流五群 | `946350912` (满) | +| 交流六群 | `511624269` (满) | +| 交流七群 | `298061704` | -## 用户权益 -* 允许免费用于学习、毕设、公司项目、私活等。 -* 对未经过授权和不遵循 Apache 2.0 协议二次开源或者商业化我们将追究到底。 -* 参考请注明:参考自 SpringBlade:https://gitee.com/smallc/SpringBlade 。另请遵循 Apache 2.0 协议。 -* `注意`:若禁止条款被发现有权追讨 **19999** 的授权费。 +## 官方产品 -# 界面 +| 简介 | 演示地址 | +|-----------------|------------------------------------------------------| +| BladeX企业级开发平台 | [https://saber3.bladex.cn](https://saber3.bladex.cn) | +| BladeX可视化数据大屏 | [https://data.bladex.cn](https://data.bladex.cn) | +| BladeX物联网开发平台 | [https://iot.bladex.cn](https://iot.bladex.cn) | +| BladeXAI大模型平台 | [https://aigc.bladex.cn/](https://aigc.bladex.cn/) | -## [BladeX](https://bladex.vip/#/vip) 工作流一览 - - - - - - - - - - - - - -
+## 前端项目 -## [Sword](https://gitee.com/smallc/Sword) 界面一览 - - - - - - - - - - - - - - - - - - - - - -
+| 简介 | 地址 | +|--------------------|------------------------------------------------------------------------------| +| 前端框架Saber3(基于Vue3) | [https://gitee.com/smallc/Saber3](https://gitee.com/smallc/Saber) | +| 前端框架Saber(基于Vue2) | [https://gitee.com/smallc/Saber2](https://gitee.com/smallc/Saber/tree/vue2/) | +| 前端框架Sword(基于React) | [https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword) | -## [Saber](https://gitee.com/smallc/Saber) 界面一览 - - - - - - - - - - - - - -
+## 后端项目 +| 简介 | 地址 | +|---------------|----------------------------------------------------------------------------------------------------| +| 核心框架项目地址 | [https://gitee.com/smallc/blade-tool](https://gitee.com/smallc/blade-tool) | +| 后端Gitee地址 | [https://gitee.com/smallc/SpringBlade](https://gitee.com/smallc/SpringBlade) | +| 后端Github地址 | [https://github.com/chillzhuang/SpringBlade](https://github.com/chillzhuang/SpringBlade) | +| 后端SpringBoot版 | [https://gitee.com/smallc/SpringBlade/tree/boot/](https://gitee.com/smallc/SpringBlade/tree/boot/) | + +## 安全手册 +| 简介 | 地址 | +|-----------|----------------------------------------------------------------------------------------------------| +| Blade安全手册 | [https://www.kancloud.cn/smallchill/blade-safety](https://www.kancloud.cn/smallchill/blade-safety) | -## 监控界面一览 +## 技术文档 + +| 简介 | 地址 | +|---------------------------|--------------------------------------------------------------------------------------------------------------------------| +| SpringBlade开发手册一览 | [https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册) | +| SpringBlade常见问题集锦 | [https://sns.bladex.cn/article-14966.html](https://sns.bladex.cn/article-14966.html) | +| SpringBlade基于Kuboard部署K8S | [https://kuboard.cn/learning/k8s-practice/spring-blade/](https://kuboard.cn/learning/k8s-practice/spring-blade/) | +| SpringBlade基于Rainbond部署 | [https://www.rainbond.com/docs/micro-service/example/blade](https://www.rainbond.com/docs/micro-service/example/blade) | + + +## 免费公开课 - - - - - - - - - - - - - - - - - - - - - - + +
-## 关注我们 -![](https://images.gitee.com/uploads/images/2019/0330/065148_f0ada806_410595.jpeg) \ No newline at end of file +## 开源协议 +Apache Licence 2.0 ([英文原文](http://www.apache.org/licenses/LICENSE-2.0.html)) +Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,同样鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再发布(作为开源或商业软件)。 +需要满足的条件如下: +* 需要给代码的用户一份Apache Licence +* 如果你修改了代码,需要在被修改的文件中说明。 +* 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议,商标,专利声明和其他原来作者规定需要包含的说明。 +* 如果再发布的产品中包含一个Notice文件,则在Notice文件中需要带有Apache Licence。你可以在Notice中增加自己的许可,但不可以表现为对Apache Licence构成更改。 + Apache Licence也是对商业应用友好的许可。使用者也可以在需要的时候修改代码来满足需要并作为开源或商业产品发布/销售。 + +## 用户权益 +* 允许免费用于学习、毕设、公司项目、私活等,但请保留源码作者信息。 +* 对未经过授权和不遵循 Apache 2.0 协议二次开源或者商业化我们将追究到底。 +* 参考请注明:参考自 SpringBlade:https://gitee.com/smallc/SpringBlade。 \ No newline at end of file diff --git a/blade-auth/Dockerfile b/blade-auth/Dockerfile index d95904e3..2cce55ab 100644 --- a/blade-auth/Dockerfile +++ b/blade-auth/Dockerfile @@ -1,6 +1,8 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +# 网络问题无法下载可以改为阿里云镜像 +# FROM registry.cn-hangzhou.aliyuncs.com/bladex-repo/alpine-java:openjdk17_cn_slim +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/auth @@ -10,6 +12,6 @@ EXPOSE 8010 ADD ./target/blade-auth.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-auth/pom.xml b/blade-auth/pom.xml index 26c23552..411d9d0b 100644 --- a/blade-auth/pom.xml +++ b/blade-auth/pom.xml @@ -8,12 +8,11 @@ SpringBlade org.springblade - 2.8.0 + ${revision} blade-auth ${project.artifactId} - ${blade.project.version} jar @@ -21,55 +20,50 @@ org.springblade blade-common - ${blade.project.version} org.springblade blade-core-cloud - ${blade.tool.version} org.springblade blade-core-secure - ${blade.tool.version} org.springblade - blade-core-log - ${blade.tool.version} + blade-starter-log org.springblade - blade-core-social - ${blade.tool.version} + blade-starter-social + + + org.springblade + blade-starter-redis org.springblade blade-user-api - ${blade.project.version} org.springblade - blade-core-swagger - ${blade.tool.version} + blade-starter-swagger + + + com.baomidou + mybatis-plus-spring-boot-autoconfigure com.github.whvcse easy-captcha - ${captcha.version} - mysql - mysql-connector-java + com.mysql + mysql-connector-j runtime - - @@ -97,22 +91,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-auth/src/main/java/org/springblade/auth/AuthApplication.java b/blade-auth/src/main/java/org/springblade/auth/AuthApplication.java index b9aa7123..3811301b 100644 --- a/blade-auth/src/main/java/org/springblade/auth/AuthApplication.java +++ b/blade-auth/src/main/java/org/springblade/auth/AuthApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,18 +16,16 @@ package org.springblade.auth; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; /** * 用户认证服务器 * * @author Chill */ -@SpringCloudApplication -@EnableFeignClients(AppConstant.BASE_PACKAGES) +@BladeCloudApplication public class AuthApplication { public static void main(String[] args) { diff --git a/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java b/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java index 529264b3..6c0a7aa6 100644 --- a/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java +++ b/blade-auth/src/main/java/org/springblade/auth/controller/AuthController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,20 +16,20 @@ package org.springblade.auth.controller; import com.wf.captcha.SpecCaptcha; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import org.springblade.auth.granter.ITokenGranter; import org.springblade.auth.granter.TokenGranterBuilder; import org.springblade.auth.granter.TokenParameter; import org.springblade.auth.utils.TokenUtil; import org.springblade.common.cache.CacheNames; +import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.AuthInfo; import org.springblade.core.tool.api.R; import org.springblade.core.tool.support.Kv; import org.springblade.core.tool.utils.Func; -import org.springblade.core.tool.utils.RedisUtil; import org.springblade.core.tool.utils.WebUtil; import org.springblade.system.user.entity.UserInfo; import org.springframework.web.bind.annotation.GetMapping; @@ -47,18 +47,18 @@ */ @RestController @AllArgsConstructor -@Api(value = "用户授权认证", tags = "授权接口") +@Tag(name = "用户授权认证", description = "授权接口") public class AuthController { - private RedisUtil redisUtil; + private BladeRedis bladeRedis; @PostMapping("token") - @ApiOperation(value = "获取认证token", notes = "传入租户ID:tenantId,账号:account,密码:password") - public R token(@ApiParam(value = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType, - @ApiParam(value = "刷新令牌") @RequestParam(required = false) String refreshToken, - @ApiParam(value = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId, - @ApiParam(value = "账号") @RequestParam(required = false) String account, - @ApiParam(value = "密码") @RequestParam(required = false) String password) { + @Operation(summary = "获取认证token", description = "传入租户ID:tenantId,账号:account,密码:password") + public R token(@Parameter(description = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType, + @Parameter(description = "刷新令牌") @RequestParam(required = false) String refreshToken, + @Parameter(description = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId, + @Parameter(description = "账号") @RequestParam(required = false) String account, + @Parameter(description = "密码") @RequestParam(required = false) String password) { String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE); @@ -81,15 +81,22 @@ public R token(@ApiParam(value = "授权类型", required = true) @Req } @GetMapping("/captcha") - @ApiOperation(value = "获取验证码") + @Operation(summary = "获取验证码") public R captcha() { SpecCaptcha specCaptcha = new SpecCaptcha(130, 48, 5); String verCode = specCaptcha.text().toLowerCase(); String key = UUID.randomUUID().toString(); // 存入redis并设置过期时间为30分钟 - redisUtil.set(CacheNames.CAPTCHA_KEY + key, verCode, 30L, TimeUnit.MINUTES); + bladeRedis.setEx(CacheNames.CAPTCHA_KEY + key, verCode, 30L, TimeUnit.MINUTES); // 将key和base64返回给前端 return R.data(Kv.init().set("key", key).set("image", specCaptcha.toBase64())); } + @PostMapping("/logout") + @Operation(summary = "登出") + public R logout() { + // 登出预留逻辑 + return R.data(Kv.init().set("code", "200").set("msg", "操作成功")); + } + } diff --git a/blade-auth/src/main/java/org/springblade/auth/controller/SocialController.java b/blade-auth/src/main/java/org/springblade/auth/controller/SocialController.java index e231dd67..3955b27a 100644 --- a/blade-auth/src/main/java/org/springblade/auth/controller/SocialController.java +++ b/blade-auth/src/main/java/org/springblade/auth/controller/SocialController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,8 @@ */ package org.springblade.auth.controller; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.zhyd.oauth.model.AuthCallback; @@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; /** @@ -42,7 +42,7 @@ @RestController @AllArgsConstructor @ConditionalOnProperty(value = "social.enabled", havingValue = "true") -@Api(value = "第三方登陆", tags = "第三方登陆端点") +@Tag(name = "第三方登陆", description = "第三方登陆端点") public class SocialController { private final SocialProperties socialProperties; @@ -50,7 +50,7 @@ public class SocialController { /** * 授权完毕跳转 */ - @ApiOperation(value = "授权完毕跳转") + @Operation(summary = "授权完毕跳转") @RequestMapping("/oauth/render/{source}") public void renderAuth(@PathVariable("source") String source, HttpServletResponse response) throws IOException { AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); @@ -61,7 +61,7 @@ public void renderAuth(@PathVariable("source") String source, HttpServletRespons /** * 获取认证信息 */ - @ApiOperation(value = "获取认证信息") + @Operation(summary = "获取认证信息") @RequestMapping("/oauth/callback/{source}") public Object login(@PathVariable("source") String source, AuthCallback callback) { AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); @@ -71,7 +71,7 @@ public Object login(@PathVariable("source") String source, AuthCallback callback /** * 撤销授权 */ - @ApiOperation(value = "撤销授权") + @Operation(summary = "撤销授权") @RequestMapping("/oauth/revoke/{source}/{token}") public Object revokeAuth(@PathVariable("source") String source, @PathVariable("token") String token) { AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); @@ -81,7 +81,7 @@ public Object revokeAuth(@PathVariable("source") String source, @PathVariable("t /** * 续期accessToken */ - @ApiOperation(value = "续期令牌") + @Operation(summary = "续期令牌") @RequestMapping("/oauth/refresh/{source}") public Object refreshAuth(@PathVariable("source") String source, String token) { AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); diff --git a/blade-auth/src/main/java/org/springblade/auth/enums/BladeUserEnum.java b/blade-auth/src/main/java/org/springblade/auth/enums/BladeUserEnum.java index 4d0d538a..2b218d54 100644 --- a/blade-auth/src/main/java/org/springblade/auth/enums/BladeUserEnum.java +++ b/blade-auth/src/main/java/org/springblade/auth/enums/BladeUserEnum.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java b/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java index a3d9e7ca..a0781970 100644 --- a/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java +++ b/blade-auth/src/main/java/org/springblade/auth/granter/CaptchaTokenGranter.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,31 +16,40 @@ package org.springblade.auth.granter; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springblade.auth.enums.BladeUserEnum; import org.springblade.auth.utils.TokenUtil; import org.springblade.common.cache.CacheNames; import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.redis.cache.BladeRedis; +import org.springblade.core.secure.props.BladeAuthProperties; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.*; import org.springblade.system.user.entity.UserInfo; import org.springblade.system.user.feign.IUserClient; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; + +import java.time.Duration; /** * 验证码TokenGranter * * @author Chill */ +@Slf4j @Component @AllArgsConstructor public class CaptchaTokenGranter implements ITokenGranter { public static final String GRANT_TYPE = "captcha"; + public static final Integer FAIL_COUNT = 5; private IUserClient userClient; - private RedisUtil redisUtil; + private BladeRedis bladeRedis; + + private BladeAuthProperties authProperties; @Override public UserInfo grant(TokenParameter tokenParameter) { @@ -49,7 +58,7 @@ public UserInfo grant(TokenParameter tokenParameter) { String key = request.getHeader(TokenUtil.CAPTCHA_HEADER_KEY); String code = request.getHeader(TokenUtil.CAPTCHA_HEADER_CODE); // 获取验证码 - String redisCode = String.valueOf(redisUtil.get(CacheNames.CAPTCHA_KEY + key)); + String redisCode = Func.toStr(bladeRedis.getAndDel(CacheNames.CAPTCHA_KEY + key)); // 判断验证码 if (code == null || !StringUtil.equalsIgnoreCase(redisCode, code)) { throw new ServiceException(TokenUtil.CAPTCHA_NOT_CORRECT); @@ -58,21 +67,40 @@ public UserInfo grant(TokenParameter tokenParameter) { String tenantId = tokenParameter.getArgs().getStr("tenantId"); String account = tokenParameter.getArgs().getStr("account"); String password = tokenParameter.getArgs().getStr("password"); + + // 判断登录是否锁定 + int cnt = Func.toInt(bladeRedis.get(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, account)), 0); + if (cnt >= FAIL_COUNT) { + log.error("用户登录失败次数过多, 账号:{}, IP:{}", account, WebUtil.getIP()); + throw new ServiceException(TokenUtil.USER_HAS_TOO_MANY_FAILS); + } + UserInfo userInfo = null; if (Func.isNoneBlank(account, password)) { // 获取用户类型 String userType = tokenParameter.getArgs().getStr("userType"); + // 解密密码 + String decryptPassword = TokenUtil.decryptPassword(password, authProperties.getPublicKey(), authProperties.getPrivateKey()); + // 定义返回结果 R result; // 根据不同用户类型调用对应的接口返回数据,用户可自行拓展 if (userType.equals(BladeUserEnum.WEB.getName())) { - result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password)); + result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword)); } else if (userType.equals(BladeUserEnum.APP.getName())) { - result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password)); + result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword)); } else { - result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password)); + result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword)); } userInfo = result.isSuccess() ? result.getData() : null; } + + if (userInfo == null || userInfo.getUser() == null) { + // 增加错误锁定次数 + bladeRedis.setEx(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, account), cnt + 1, Duration.ofMinutes(30)); + } else { + // 成功则清除登录缓存 + bladeRedis.del(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, account)); + } return userInfo; } diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/ITokenGranter.java b/blade-auth/src/main/java/org/springblade/auth/granter/ITokenGranter.java index b2ec7318..9649e9d5 100644 --- a/blade-auth/src/main/java/org/springblade/auth/granter/ITokenGranter.java +++ b/blade-auth/src/main/java/org/springblade/auth/granter/ITokenGranter.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java b/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java index 9572a6a5..201d8094 100644 --- a/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java +++ b/blade-auth/src/main/java/org/springblade/auth/granter/PasswordTokenGranter.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,47 +16,80 @@ package org.springblade.auth.granter; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springblade.auth.enums.BladeUserEnum; +import org.springblade.auth.utils.TokenUtil; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.redis.cache.BladeRedis; +import org.springblade.core.secure.props.BladeAuthProperties; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.DigestUtil; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.WebUtil; import org.springblade.system.user.entity.UserInfo; import org.springblade.system.user.feign.IUserClient; import org.springframework.stereotype.Component; +import java.time.Duration; + /** * PasswordTokenGranter * * @author Chill */ +@Slf4j @Component @AllArgsConstructor public class PasswordTokenGranter implements ITokenGranter { public static final String GRANT_TYPE = "password"; + public static final Integer FAIL_COUNT = 5; private IUserClient userClient; + private BladeRedis bladeRedis; + + private BladeAuthProperties authProperties; @Override public UserInfo grant(TokenParameter tokenParameter) { String tenantId = tokenParameter.getArgs().getStr("tenantId"); String account = tokenParameter.getArgs().getStr("account"); String password = tokenParameter.getArgs().getStr("password"); + + // 判断登录是否锁定 + int cnt = Func.toInt(bladeRedis.get(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, account)), 0); + if (cnt >= FAIL_COUNT) { + log.error("用户登录失败次数过多, 账号:{}, IP:{}", account, WebUtil.getIP()); + throw new ServiceException(TokenUtil.USER_HAS_TOO_MANY_FAILS); + } + UserInfo userInfo = null; if (Func.isNoneBlank(account, password)) { // 获取用户类型 String userType = tokenParameter.getArgs().getStr("userType"); + // 解密密码 + String decryptPassword = TokenUtil.decryptPassword(password, authProperties.getPublicKey(), authProperties.getPrivateKey()); + // 定义返回结果 R result; // 根据不同用户类型调用对应的接口返回数据,用户可自行拓展 if (userType.equals(BladeUserEnum.WEB.getName())) { - result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password)); + result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword)); } else if (userType.equals(BladeUserEnum.APP.getName())) { - result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password)); + result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword)); } else { - result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password)); + result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(decryptPassword)); } userInfo = result.isSuccess() ? result.getData() : null; } + + if (userInfo == null || userInfo.getUser() == null) { + // 增加错误锁定次数 + bladeRedis.setEx(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, account), cnt + 1, Duration.ofMinutes(30)); + } else { + // 成功则清除登录缓存 + bladeRedis.del(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, account)); + } return userInfo; } diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/RefreshTokenGranter.java b/blade-auth/src/main/java/org/springblade/auth/granter/RefreshTokenGranter.java index 95fd95fe..f5b86f1b 100644 --- a/blade-auth/src/main/java/org/springblade/auth/granter/RefreshTokenGranter.java +++ b/blade-auth/src/main/java/org/springblade/auth/granter/RefreshTokenGranter.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/SocialTokenGranter.java b/blade-auth/src/main/java/org/springblade/auth/granter/SocialTokenGranter.java index 905312d6..ff1513b3 100644 --- a/blade-auth/src/main/java/org/springblade/auth/granter/SocialTokenGranter.java +++ b/blade-auth/src/main/java/org/springblade/auth/granter/SocialTokenGranter.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ import org.springblade.system.user.feign.IUserClient; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Objects; /** @@ -79,7 +79,7 @@ public UserInfo grant(TokenParameter tokenParameter) { } // 组装数据 - UserOauth userOauth = Objects.requireNonNull(BeanUtil.copy(authUser, UserOauth.class)); + UserOauth userOauth = Objects.requireNonNull(BeanUtil.copyProperties(authUser, UserOauth.class)); userOauth.setSource(authUser.getSource()); userOauth.setTenantId(tenantId); userOauth.setUuid(authUser.getUuid()); diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/TokenGranterBuilder.java b/blade-auth/src/main/java/org/springblade/auth/granter/TokenGranterBuilder.java index e8700f7d..d872128b 100644 --- a/blade-auth/src/main/java/org/springblade/auth/granter/TokenGranterBuilder.java +++ b/blade-auth/src/main/java/org/springblade/auth/granter/TokenGranterBuilder.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-auth/src/main/java/org/springblade/auth/granter/TokenParameter.java b/blade-auth/src/main/java/org/springblade/auth/granter/TokenParameter.java index 368c83ef..e992b969 100644 --- a/blade-auth/src/main/java/org/springblade/auth/granter/TokenParameter.java +++ b/blade-auth/src/main/java/org/springblade/auth/granter/TokenParameter.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 912a1a83..daf67948 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,9 @@ import org.springblade.core.secure.TokenInfo; import org.springblade.core.secure.utils.SecureUtil; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.SM2Util; +import org.springblade.core.tool.utils.StringPool; +import org.springblade.core.tool.utils.StringUtil; import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.UserInfo; @@ -43,7 +46,9 @@ public class TokenUtil { public final static String USER_NOT_FOUND = "用户名或密码错误"; public final static String HEADER_KEY = "Authorization"; public final static String HEADER_PREFIX = "Basic "; - public final static String DEFAULT_AVATAR = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"; + public final static String ENCRYPT_PREFIX = "04"; + public final static String USER_HAS_TOO_MANY_FAILS = "用户登录失败次数过多"; + public final static String DEFAULT_AVATAR = "https://bladex.cn/images/logo.png"; /** * 创建认证token @@ -61,6 +66,7 @@ public static AuthInfo createAuthInfo(UserInfo userInfo) { 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())); @@ -96,4 +102,31 @@ private static TokenInfo createRefreshToken(UserInfo userInfo) { return SecureUtil.createJWT(param, "audience", "issuser", TokenConstant.REFRESH_TOKEN); } + /** + * 解析国密sm2加密密码 + * + * @param rawPassword 请求时提交的原密码 + * @param publicKey 公钥 + * @param privateKey 私钥 + * @return 解密后的密码 + */ + public static String decryptPassword(String rawPassword, String publicKey, String privateKey) { + // 其中有空则匹配失败 + if (StringUtil.isAnyBlank(publicKey, privateKey)) { + return StringPool.EMPTY; + } + // 处理部分工具类加密不带04前缀的情况 + if (!StringUtil.startsWithIgnoreCase(rawPassword, ENCRYPT_PREFIX)) { + rawPassword = ENCRYPT_PREFIX + rawPassword; + } + // 解密密码 + String decryptPassword = SM2Util.decrypt(rawPassword, privateKey); + // 签名校验 + boolean isVerified = SM2Util.verify(decryptPassword, SM2Util.sign(decryptPassword, privateKey), publicKey); + if (!isVerified) { + return StringPool.EMPTY; + } + return decryptPassword; + } + } diff --git a/blade-auth/src/test/java/org/springblade/test/SignKeyGenerator.java b/blade-auth/src/test/java/org/springblade/test/SignKeyGenerator.java new file mode 100644 index 00000000..0878fc35 --- /dev/null +++ b/blade-auth/src/test/java/org/springblade/test/SignKeyGenerator.java @@ -0,0 +1,24 @@ +package org.springblade.test; + +import org.springblade.core.tool.utils.AesUtil; +import org.springblade.core.tool.utils.RandomType; +import org.springblade.core.tool.utils.StringUtil; + +/** + * signKey生成器 + * + * @author Chill + */ +public class SignKeyGenerator { + + public static void main(String[] args) { + System.out.println("=========== blade.token.sign-key 配置如下 =============="); + System.out.println("#blade配置\n" + + "blade:\n" + + " token:\n" + + " sign-key: " + StringUtil.random(32, RandomType.ALL) +"\n" + + " aes-key: " + AesUtil.genAesKey() ); + System.out.println("======================================================="); + } + +} diff --git a/blade-auth/src/test/java/org/springblade/test/Sm2KeyGenerator.java b/blade-auth/src/test/java/org/springblade/test/Sm2KeyGenerator.java new file mode 100644 index 00000000..e527cbf6 --- /dev/null +++ b/blade-auth/src/test/java/org/springblade/test/Sm2KeyGenerator.java @@ -0,0 +1,46 @@ +package org.springblade.test; + +import org.bouncycastle.crypto.AsymmetricCipherKeyPair; +import org.bouncycastle.util.encoders.Hex; +import org.springblade.core.tool.utils.SM2Util; +import org.springblade.core.tool.utils.StringPool; + +/** + * signKey生成器 + * + * @author Chill + */ +public class Sm2KeyGenerator { + + public static void main(String[] args) { + System.out.println("================ blade.auth 配置如下 ================="); + AsymmetricCipherKeyPair keyPair = SM2Util.generateKeyPair(); + String publicKey = SM2Util.getPublicKeyString(keyPair); + String privateKey = SM2Util.getPrivateKeyString(keyPair); + System.out.println("#blade配置 \n" + + "blade:\n" + + " auth:\n" + + " public-key: " + publicKey + "\n" + + " private-key: " + privateKey); + System.out.println("======================================================="); + System.out.println(StringPool.EMPTY); + System.out.println("============== saber website.js 配置如下 ==============="); + System.out.println("//saber配置\n" + + "auth: {\n" + + " publicKey: '" + publicKey + "',\n" + + "}"); + System.out.println("======================================================="); + System.out.println(StringPool.EMPTY); + System.out.println("============== 密码:[admin] 加密流程如下 ================"); + String password = "admin"; + byte[] encryptedData = SM2Util.encrypt(password, publicKey); + String decryptedText = SM2Util.decrypt(encryptedData, privateKey); + System.out.println("加密前: " + password); + System.out.println("加密后: " + Hex.toHexString(encryptedData)); + System.out.println("解密后: " + decryptedText); + System.out.println("请注意: 此密文为前端加密后调用token接口的密码参数"); + System.out.println("======================================================="); + + } + +} diff --git a/blade-common/pom.xml b/blade-common/pom.xml index 2e7fee04..4f014b10 100644 --- a/blade-common/pom.xml +++ b/blade-common/pom.xml @@ -5,25 +5,26 @@ SpringBlade org.springblade - 2.8.0 + ${revision} 4.0.0 blade-common ${project.artifactId} - ${blade.project.version} jar org.springblade blade-core-launch - ${blade.tool.version} + + + org.springblade + blade-starter-loadbalancer net.dreamlu mica-auto - ${mica.auto.version} provided diff --git a/blade-common/src/main/java/org/springblade/common/cache/CacheNames.java b/blade-common/src/main/java/org/springblade/common/cache/CacheNames.java index 7fbb0072..36408961 100644 --- a/blade-common/src/main/java/org/springblade/common/cache/CacheNames.java +++ b/blade-common/src/main/java/org/springblade/common/cache/CacheNames.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,26 @@ public interface CacheNames { String DICT_VALUE = "dict:value"; String DICT_LIST = "dict:list"; - String CAPTCHA_KEY = "blade:auth::captcha:"; + /** + * 验证码key + */ + String CAPTCHA_KEY = "blade:auth::blade:captcha:"; + + /** + * 登录失败key + */ + String USER_FAIL_KEY = "blade:user::blade:fail:"; + + /** + * 返回租户格式的key + * + * @param tenantId 租户编号 + * @param cacheKey 缓存key + * @param cacheKeyValue 缓存key值 + * @return tenantKey + */ + static String tenantKey(String tenantId, String cacheKey, String cacheKeyValue) { + return tenantId.concat(":").concat(cacheKey).concat(cacheKeyValue); + } } diff --git a/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java b/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java index e8bfb1ab..ed34ca23 100644 --- a/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java +++ b/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ * * @author Chill */ -@Configuration +@Configuration(proxyBeanMethods = false) @AllArgsConstructor public class BladeCommonConfiguration { diff --git a/blade-common/src/main/java/org/springblade/common/constant/LauncherConstant.java b/blade-common/src/main/java/org/springblade/common/constant/LauncherConstant.java index abc21078..4be51473 100644 --- a/blade-common/src/main/java/org/springblade/common/constant/LauncherConstant.java +++ b/blade-common/src/main/java/org/springblade/common/constant/LauncherConstant.java @@ -9,6 +9,16 @@ */ public interface LauncherConstant { + /** + * nacos 用户名 + */ + String NACOS_USERNAME = "nacos"; + + /** + * nacos 密码 + */ + String NACOS_PASSWORD = "nacos"; + /** * nacos namespace id */ diff --git a/blade-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java b/blade-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java index 150c14cb..8a090e98 100644 --- a/blade-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java +++ b/blade-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,9 @@ */ package org.springblade.common.launch; -import org.springblade.common.constant.CommonConstant; import org.springblade.common.constant.LauncherConstant; import org.springblade.core.launch.service.LauncherService; +import org.springblade.core.launch.utils.PropsUtil; import org.springframework.boot.builder.SpringApplicationBuilder; import java.util.Properties; @@ -32,10 +32,12 @@ public class LauncherServiceImpl implements LauncherService { @Override public void launcher(SpringApplicationBuilder builder, String appName, String profile) { Properties props = System.getProperties(); - props.setProperty("spring.cloud.nacos.discovery.server-addr", LauncherConstant.nacosAddr(profile)); - props.setProperty("spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile)); - props.setProperty("spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); - props.setProperty("spring.zipkin.base-url", LauncherConstant.zipkinAddr(profile)); + PropsUtil.setProperty(props, "spring.cloud.nacos.username", LauncherConstant.NACOS_USERNAME); + PropsUtil.setProperty(props, "spring.cloud.nacos.password", LauncherConstant.NACOS_PASSWORD); + PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.server-addr", LauncherConstant.nacosAddr(profile)); + PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile)); + PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); + PropsUtil.setProperty(props, "spring.zipkin.base-url", LauncherConstant.zipkinAddr(profile)); } } diff --git a/blade-common/src/main/java/org/springblade/common/tool/CommonUtil.java b/blade-common/src/main/java/org/springblade/common/tool/CommonUtil.java index 4fd9d10e..5785606b 100644 --- a/blade-common/src/main/java/org/springblade/common/tool/CommonUtil.java +++ b/blade-common/src/main/java/org/springblade/common/tool/CommonUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/UserApplication.java b/blade-common/src/main/java/org/springblade/common/tool/PropsUtil.java similarity index 50% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/UserApplication.java rename to blade-common/src/main/java/org/springblade/common/tool/PropsUtil.java index 938a342e..0801fb22 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/UserApplication.java +++ b/blade-common/src/main/java/org/springblade/common/tool/PropsUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,24 +13,30 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user; +package org.springblade.common.tool; -import org.springblade.core.launch.BladeApplication; -import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.util.StringUtils; + +import java.util.Properties; /** - * 用户启动器 + * 配置工具类 * * @author Chill */ -@SpringCloudApplication -@EnableFeignClients(AppConstant.BASE_PACKAGES) -public class UserApplication { +public class PropsUtil { - public static void main(String[] args) { - BladeApplication.run(AppConstant.APPLICATION_USER_NAME, UserApplication.class, args); + /** + * 设置配置值,已存在则跳过 + * + * @param props property + * @param key key + * @param value value + */ + public static void setProperty(Properties props, String key, String value) { + if (StringUtils.isEmpty(props.getProperty(key))) { + props.setProperty(key, value); + } } } diff --git a/blade-gateway/Dockerfile b/blade-gateway/Dockerfile index e0ae9f9c..8d53271a 100644 --- a/blade-gateway/Dockerfile +++ b/blade-gateway/Dockerfile @@ -1,6 +1,6 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/gateway @@ -10,6 +10,6 @@ EXPOSE 80 ADD ./target/blade-gateway.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-gateway/pom.xml b/blade-gateway/pom.xml index 5e7b147c..caccfdeb 100644 --- a/blade-gateway/pom.xml +++ b/blade-gateway/pom.xml @@ -5,13 +5,12 @@ SpringBlade org.springblade - 2.8.0 + ${revision} 4.0.0 blade-gateway ${project.artifactId} - ${blade.project.version} jar @@ -19,7 +18,6 @@ org.springblade blade-core-launch - ${blade.tool.version} org.springframework.boot @@ -34,7 +32,6 @@ org.springblade blade-common - ${blade.project.version} org.springblade @@ -54,67 +51,34 @@ de.codecentric spring-boot-admin-starter-client - ${spring.boot.admin.version} org.springframework.cloud - spring-cloud-starter-netflix-hystrix - - - commons-logging - commons-logging - - + spring-cloud-starter-loadbalancer - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - ${alibaba.cloud.version} + org.springframework.cloud + spring-cloud-starter-bootstrap + com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - ${alibaba.cloud.version} + spring-cloud-starter-alibaba-sentinel + + + + com.github.xiaoymin + knife4j-gateway-spring-boot-starter io.jsonwebtoken jjwt-impl - 0.11.2 io.jsonwebtoken jjwt-jackson - 0.11.2 - - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - io.swagger - swagger-models - - - - - io.swagger - swagger-models - ${swagger.models.version} - - - com.github.xiaoymin - knife4j-spring-ui - ${knife4j.version} - @@ -142,22 +106,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-gateway/src/main/java/org/springblade/gateway/GateWayApplication.java b/blade-gateway/src/main/java/org/springblade/gateway/GateWayApplication.java index 28959390..5e9e6c9c 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/GateWayApplication.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/GateWayApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,20 +15,18 @@ */ package org.springblade.gateway; -import org.springblade.core.launch.constant.AppConstant; import org.springblade.core.launch.BladeApplication; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.netflix.hystrix.EnableHystrix; -import org.springframework.scheduling.annotation.EnableScheduling; +import org.springblade.core.launch.constant.AppConstant; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * 项目启动 * * @author Chill */ -@EnableHystrix -@EnableScheduling -@SpringCloudApplication +@EnableDiscoveryClient +@SpringBootApplication public class GateWayApplication { public static void main(String[] args) { diff --git a/blade-gateway/src/main/java/org/springblade/gateway/config/ErrorHandlerConfiguration.java b/blade-gateway/src/main/java/org/springblade/gateway/config/ErrorHandlerConfiguration.java deleted file mode 100644 index 8caaccef..00000000 --- a/blade-gateway/src/main/java/org/springblade/gateway/config/ErrorHandlerConfiguration.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * 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.gateway.config; - - -import org.springblade.gateway.handler.ErrorExceptionHandler; -import org.springframework.beans.factory.ObjectProvider; -import org.springframework.boot.autoconfigure.web.ResourceProperties; -import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.web.reactive.error.ErrorAttributes; -import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.Ordered; -import org.springframework.core.annotation.Order; -import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.web.reactive.result.view.ViewResolver; - -import java.util.Collections; -import java.util.List; - -/** - * 异常处理配置类 - * - * @author Chill - */ -@Configuration -@EnableConfigurationProperties({ServerProperties.class, ResourceProperties.class}) -public class ErrorHandlerConfiguration { - - private final ServerProperties serverProperties; - - private final ApplicationContext applicationContext; - - private final ResourceProperties resourceProperties; - - private final List viewResolvers; - - private final ServerCodecConfigurer serverCodecConfigurer; - - public ErrorHandlerConfiguration(ServerProperties serverProperties, - ResourceProperties resourceProperties, - ObjectProvider> viewResolversProvider, - ServerCodecConfigurer serverCodecConfigurer, - ApplicationContext applicationContext) { - this.serverProperties = serverProperties; - this.applicationContext = applicationContext; - this.resourceProperties = resourceProperties; - this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList); - this.serverCodecConfigurer = serverCodecConfigurer; - } - - @Bean - @Order(Ordered.HIGHEST_PRECEDENCE) - public ErrorWebExceptionHandler errorWebExceptionHandler(ErrorAttributes errorAttributes) { - ErrorExceptionHandler exceptionHandler = new ErrorExceptionHandler( - errorAttributes, - this.resourceProperties, - this.serverProperties.getError(), - this.applicationContext); - exceptionHandler.setViewResolvers(this.viewResolvers); - exceptionHandler.setMessageWriters(this.serverCodecConfigurer.getWriters()); - exceptionHandler.setMessageReaders(this.serverCodecConfigurer.getReaders()); - return exceptionHandler; - } - -} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/config/JwtConfiguration.java b/blade-gateway/src/main/java/org/springblade/gateway/config/JwtConfiguration.java new file mode 100644 index 00000000..45b35262 --- /dev/null +++ b/blade-gateway/src/main/java/org/springblade/gateway/config/JwtConfiguration.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.gateway.config; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.gateway.props.JwtProperties; +import org.springblade.gateway.utils.JwtUtil; +import org.springframework.beans.factory.SmartInitializingSingleton; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * JWT配置信息 + * + * @author Chill + */ +@Slf4j +@Configuration(proxyBeanMethods = false) +@AllArgsConstructor +@EnableConfigurationProperties({JwtProperties.class}) +public class JwtConfiguration implements SmartInitializingSingleton { + + private final JwtProperties properties; + + @Override + public void afterSingletonsInstantiated() { + JwtUtil.setJwtProperties(properties); + } +} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/config/RouterFunctionConfiguration.java b/blade-gateway/src/main/java/org/springblade/gateway/config/RouterFunctionConfiguration.java index ed519825..e2ef767c 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/config/RouterFunctionConfiguration.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/config/RouterFunctionConfiguration.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,18 +18,13 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springblade.gateway.handler.SwaggerResourceHandler; -import org.springblade.gateway.handler.SwaggerSecurityHandler; -import org.springblade.gateway.handler.SwaggerUiHandler; +import org.springblade.gateway.filter.GatewayFilter; import org.springblade.gateway.props.AuthProperties; -import org.springblade.gateway.props.RouteProperties; +import org.springblade.gateway.props.RequestProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.MediaType; -import org.springframework.web.reactive.function.server.RequestPredicates; -import org.springframework.web.reactive.function.server.RouterFunction; -import org.springframework.web.reactive.function.server.RouterFunctions; +import org.springframework.web.server.WebFilter; /** * 路由配置信息 @@ -37,23 +32,17 @@ * @author Chill */ @Slf4j -@Configuration +@Configuration(proxyBeanMethods = false) @AllArgsConstructor -@EnableConfigurationProperties({RouteProperties.class, AuthProperties.class}) +@EnableConfigurationProperties({AuthProperties.class, RequestProperties.class}) public class RouterFunctionConfiguration { - private final SwaggerResourceHandler swaggerResourceHandler; - private final SwaggerSecurityHandler swaggerSecurityHandler; - private final SwaggerUiHandler swaggerUiHandler; - + /** + * 全局配置 + */ @Bean - public RouterFunction routerFunction() { - return RouterFunctions.route(RequestPredicates.GET("/swagger-resources") - .and(RequestPredicates.accept(MediaType.ALL)), swaggerResourceHandler) - .andRoute(RequestPredicates.GET("/swagger-resources/configuration/ui") - .and(RequestPredicates.accept(MediaType.ALL)), swaggerUiHandler) - .andRoute(RequestPredicates.GET("/swagger-resources/configuration/security") - .and(RequestPredicates.accept(MediaType.ALL)), swaggerSecurityHandler); + public WebFilter gatewayFilter(RequestProperties requestProperties) { + return new GatewayFilter(requestProperties); } } diff --git a/blade-gateway/src/main/java/org/springblade/gateway/controller/DiscoveryClientController.java b/blade-gateway/src/main/java/org/springblade/gateway/controller/DiscoveryClientController.java index 4568fe93..478785d9 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/controller/DiscoveryClientController.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/controller/DiscoveryClientController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 47adfaea..cef89b25 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,15 +15,17 @@ */ package org.springblade.gateway.filter; +import com.alibaba.nacos.common.utils.StringUtils; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.jsonwebtoken.Claims; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; +import org.springblade.core.launch.props.BladeProperties; import org.springblade.gateway.props.AuthProperties; import org.springblade.gateway.provider.AuthProvider; import org.springblade.gateway.provider.ResponseProvider; +import org.springblade.gateway.utils.JwtCrypto; import org.springblade.gateway.utils.JwtUtil; import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org.springframework.cloud.gateway.filter.GlobalFilter; @@ -32,12 +34,15 @@ import org.springframework.http.HttpStatus; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.stereotype.Component; +import org.springframework.util.AntPathMatcher; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.nio.charset.StandardCharsets; +import static org.springblade.gateway.utils.JwtCrypto.BLADE_CRYPTO_AES_KEY; + /** * 鉴权认证 * @@ -47,8 +52,10 @@ @Component @AllArgsConstructor public class AuthFilter implements GlobalFilter, Ordered { - private AuthProperties authProperties; - private ObjectMapper objectMapper; + private final AuthProperties authProperties; + private final ObjectMapper objectMapper; + private final BladeProperties bladeProperties; + private final AntPathMatcher antPathMatcher = new AntPathMatcher(); @Override public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { @@ -59,11 +66,15 @@ public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { 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; String token = JwtUtil.getToken(auth); + //校验 加密Token 合法性 + if (JwtUtil.isCrypto(auth)) { + token = JwtCrypto.decryptToString(token, bladeProperties.getEnvironment().getProperty(BLADE_CRYPTO_AES_KEY)); + } Claims claims = JwtUtil.parseJWT(token); if (claims == null) { return unAuth(resp, "请求未授权"); @@ -72,8 +83,8 @@ public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { } private boolean isSkip(String path) { - return AuthProvider.getDefaultSkipUrl().stream().map(url -> url.replace(AuthProvider.TARGET, AuthProvider.REPLACEMENT)).anyMatch(path::contains) - || authProperties.getSkipUrl().stream().map(url -> url.replace(AuthProvider.TARGET, AuthProvider.REPLACEMENT)).anyMatch(path::contains); + return AuthProvider.getDefaultSkipUrl().stream().anyMatch(pattern -> antPathMatcher.match(pattern, path)) + || authProperties.getSkipUrl().stream().anyMatch(pattern -> antPathMatcher.match(pattern, path)); } private Mono unAuth(ServerHttpResponse resp, String msg) { diff --git a/blade-gateway/src/main/java/org/springblade/gateway/filter/GatewayFilter.java b/blade-gateway/src/main/java/org/springblade/gateway/filter/GatewayFilter.java new file mode 100644 index 00000000..3867f9ab --- /dev/null +++ b/blade-gateway/src/main/java/org/springblade/gateway/filter/GatewayFilter.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.gateway.filter; + +import lombok.RequiredArgsConstructor; +import org.springblade.gateway.props.RequestProperties; +import org.springframework.core.Ordered; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.http.server.reactive.ServerHttpResponse; +import org.springframework.lang.NonNull; +import org.springframework.util.AntPathMatcher; +import org.springframework.util.PatternMatchUtils; +import org.springframework.web.cors.reactive.CorsUtils; +import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.server.WebFilter; +import org.springframework.web.server.WebFilterChain; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Objects; + +/** + * 全局拦截器 + * + * @author Chill + */ +@RequiredArgsConstructor +public class GatewayFilter implements WebFilter, Ordered { + + /** + * 请求配置 + */ + private final RequestProperties requestProperties; + /** + * 路径匹配 + */ + private final AntPathMatcher antPathMatcher = new AntPathMatcher(); + + /** + * 默认拦截地址 + */ + private final List defaultBlockUrl = List.of("/**/actuator/**", "/health/**"); + /** + * 默认白名单 + */ + private final List defaultWhiteList = List.of("127.0.0.1", "172.30.*.*", "192.168.*.*", "10.*.*.*", "0:0:0:0:0:0:0:1"); + /** + * 默认提示信息 + */ + private final static String DEFAULT_MESSAGE = "当前请求被拒绝,请联系管理员!"; + + /** + * 这里为支持的请求头,如果有自定义的header字段请自己添加 + */ + private static final String ALLOWED_HEADERS = "X-Requested-With, Tenant-Id, Blade-Auth, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, username, client, knfie4j-gateway-request, knife4j-gateway-code, request-origion"; + private static final String ALLOWED_METHODS = "GET,POST,PUT,DELETE,OPTIONS,HEAD"; + private static final String ALLOWED_ORIGIN = "*"; + private static final String ALLOWED_EXPOSE = "*"; + private static final String MAX_AGE = "18000L"; + + + @NonNull + @Override + public Mono filter(@NonNull ServerWebExchange exchange, @NonNull WebFilterChain chain) { + ServerHttpRequest request = exchange.getRequest(); + // 处理跨域请求 + if (CorsUtils.isCorsRequest(request)) { + ServerHttpResponse response = exchange.getResponse(); + HttpHeaders headers = response.getHeaders(); + headers.add("Access-Control-Allow-Headers", ALLOWED_HEADERS); + headers.add("Access-Control-Allow-Methods", ALLOWED_METHODS); + headers.add("Access-Control-Allow-Origin", ALLOWED_ORIGIN); + headers.add("Access-Control-Expose-Headers", ALLOWED_EXPOSE); + headers.add("Access-Control-Max-Age", MAX_AGE); + headers.add("Access-Control-Allow-Credentials", "true"); + if (request.getMethod() == HttpMethod.OPTIONS) { + response.setStatusCode(HttpStatus.OK); + return Mono.empty(); + } + } + // 处理黑白名单与拦截请求 + if (requestProperties.getEnabled()) { + String path = request.getPath().value(); + String ip = Objects.requireNonNull(request.getRemoteAddress()).getHostString(); + if (isRequestBlock(path, ip)) { + throw new RuntimeException(DEFAULT_MESSAGE); + } + } + return chain.filter(exchange); + } + + + /** + * 是否白名单 + * + * @param ip ip地址 + * @return boolean + */ + private boolean isWhiteList(String ip) { + List whiteList = requestProperties.getWhiteList(); + String[] defaultWhiteIps = defaultWhiteList.toArray(new String[0]); + String[] whiteIps = whiteList.toArray(new String[0]); + return PatternMatchUtils.simpleMatch(defaultWhiteIps, ip) || PatternMatchUtils.simpleMatch(whiteIps, ip); + } + + /** + * 是否黑名单 + * + * @param ip ip地址 + * @return boolean + */ + private boolean isBlackList(String ip) { + List blackList = requestProperties.getBlackList(); + String[] blackIps = blackList.toArray(new String[0]); + return PatternMatchUtils.simpleMatch(blackIps, ip); + } + + /** + * 是否禁用请求访问 + * + * @param path 请求路径 + * @return boolean + */ + private boolean isRequestBlock(String path) { + List blockUrl = requestProperties.getBlockUrl(); + return defaultBlockUrl.stream().anyMatch(pattern -> antPathMatcher.match(pattern, path)) || + blockUrl.stream().anyMatch(pattern -> antPathMatcher.match(pattern, path)); + } + + /** + * 是否拦截请求 + * + * @param path 请求路径 + * @param ip ip地址 + * @return boolean + */ + private boolean isRequestBlock(String path, String ip) { + return (isRequestBlock(path) && !isWhiteList(ip)) || isBlackList(ip); + } + + @Override + public int getOrder() { + return Ordered.HIGHEST_PRECEDENCE; + } +} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/filter/RequestFilter.java b/blade-gateway/src/main/java/org/springblade/gateway/filter/RequestFilter.java new file mode 100644 index 00000000..bb66e9df --- /dev/null +++ b/blade-gateway/src/main/java/org/springblade/gateway/filter/RequestFilter.java @@ -0,0 +1,45 @@ +package org.springblade.gateway.filter; + +import org.springframework.cloud.gateway.filter.GatewayFilterChain; +import org.springframework.cloud.gateway.filter.GlobalFilter; +import org.springframework.core.Ordered; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Mono; + +import java.util.Arrays; +import java.util.stream.Collectors; + +import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR; +import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.addOriginalRequestUrl; + +/** + * request过滤器 + * + * @author lengleng + */ +@Component +public class RequestFilter implements GlobalFilter, Ordered { + + @Override + public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { + ServerHttpRequest request = exchange.getRequest(); + addOriginalRequestUrl(exchange, request.getURI()); + String rawPath = request.getURI().getRawPath(); + String newPath = "/" + Arrays.stream(StringUtils.tokenizeToStringArray(rawPath, "/")) + .skip(1L).collect(Collectors.joining("/")); + ServerHttpRequest newRequest = request.mutate() + .path(newPath) + .build(); + exchange.getAttributes().put(GATEWAY_REQUEST_URL_ATTR, newRequest.getURI()); + return chain.filter(exchange.mutate().request(newRequest.mutate().build()).build()); + } + + @Override + public int getOrder() { + return -1000; + } + +} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/handler/ErrorExceptionHandler.java b/blade-gateway/src/main/java/org/springblade/gateway/handler/ErrorExceptionHandler.java index 29afa0e4..8746849f 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/handler/ErrorExceptionHandler.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/handler/ErrorExceptionHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,17 +13,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springblade.gateway.handler; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.RequiredArgsConstructor; import org.springblade.gateway.provider.ResponseProvider; -import org.springframework.boot.autoconfigure.web.ErrorProperties; -import org.springframework.boot.autoconfigure.web.ResourceProperties; -import org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler; -import org.springframework.boot.web.reactive.error.ErrorAttributes; -import org.springframework.cloud.gateway.support.NotFoundException; -import org.springframework.context.ApplicationContext; -import org.springframework.web.reactive.function.server.*; +import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.annotation.Order; +import org.springframework.core.io.buffer.DataBufferFactory; +import org.springframework.http.MediaType; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.web.server.ResponseStatusException; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Mono; import java.util.Map; @@ -32,62 +38,51 @@ * * @author Chill */ -public class ErrorExceptionHandler extends DefaultErrorWebExceptionHandler { +@Order(-1) +@Configuration(proxyBeanMethods = false) +@RequiredArgsConstructor +public class ErrorExceptionHandler implements ErrorWebExceptionHandler { - public ErrorExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties, - ErrorProperties errorProperties, ApplicationContext applicationContext) { - super(errorAttributes, resourceProperties, errorProperties, applicationContext); - } + private final ObjectMapper objectMapper; - /** - * 获取异常属性 - */ @Override - protected Map getErrorAttributes(ServerRequest request, boolean includeStackTrace) { - int code = 500; - Throwable error = super.getError(request); - if (error instanceof NotFoundException) { - code = 404; + public Mono handle(ServerWebExchange exchange, Throwable ex) { + ServerHttpRequest request = exchange.getRequest(); + ServerHttpResponse response = exchange.getResponse(); + + if (response.isCommitted()) { + return Mono.error(ex); } - if (error instanceof ResponseStatusException) { - code = ((ResponseStatusException) error).getStatus().value(); + + response.getHeaders().setContentType(MediaType.APPLICATION_JSON); + if (ex instanceof ResponseStatusException) { + response.setStatusCode(((ResponseStatusException) ex).getStatusCode()); } - return ResponseProvider.response(code, this.buildMessage(request, error)); - } - /** - * 指定响应处理方法为JSON处理的方法 - * - * @param errorAttributes - */ - @Override - protected RouterFunction getRoutingFunction(ErrorAttributes errorAttributes) { - return RouterFunctions.route(RequestPredicates.all(), this::renderErrorResponse); + return response.writeWith(Mono.fromSupplier(() -> { + DataBufferFactory bufferFactory = response.bufferFactory(); + try { + int status = 500; + if (response.getStatusCode() != null) { + status = response.getStatusCode().value(); + } + Map result = ResponseProvider.response(status, this.buildMessage(request, ex)); + return bufferFactory.wrap(objectMapper.writeValueAsBytes(result)); + } catch (JsonProcessingException e) { + return bufferFactory.wrap(new byte[0]); + } + })); } - /** - * 根据code获取对应的HttpStatus - * - * @param errorAttributes - * @return - */ - @Override - protected int getHttpStatus(Map errorAttributes) { - return (int) errorAttributes.get("code"); - } /** * 构建异常信息 - * - * @param request - * @param ex - * @return */ - private String buildMessage(ServerRequest request, Throwable ex) { + private String buildMessage(ServerHttpRequest request, Throwable ex) { StringBuilder message = new StringBuilder("Failed to handle request ["); - message.append(request.methodName()); + message.append(request.getMethod().name()); message.append(" "); - message.append(request.uri()); + message.append(request.getURI()); message.append("]"); if (ex != null) { message.append(": "); @@ -96,4 +91,5 @@ private String buildMessage(ServerRequest request, Throwable ex) { return message.toString(); } + } diff --git a/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerResourceHandler.java b/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerResourceHandler.java deleted file mode 100644 index 2885b31f..00000000 --- a/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerResourceHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * 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.gateway.handler; - -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Component; -import org.springframework.web.reactive.function.BodyInserters; -import org.springframework.web.reactive.function.server.HandlerFunction; -import org.springframework.web.reactive.function.server.ServerRequest; -import org.springframework.web.reactive.function.server.ServerResponse; -import reactor.core.publisher.Mono; -import springfox.documentation.swagger.web.SwaggerResourcesProvider; - -/** - * SwaggerResourceHandler - * - * @author lengleng - */ -@Slf4j -@Component -@RequiredArgsConstructor -public class SwaggerResourceHandler implements HandlerFunction { - private final SwaggerResourcesProvider swaggerResources; - - /** - * Handle the given request. - * - * @param request the request to handler - * @return the response - */ - @Override - public Mono handle(ServerRequest request) { - return ServerResponse.status(HttpStatus.OK) - .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(swaggerResources.get())); - } -} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerSecurityHandler.java b/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerSecurityHandler.java deleted file mode 100644 index d30f477f..00000000 --- a/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerSecurityHandler.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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.gateway.handler; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Component; -import org.springframework.web.reactive.function.BodyInserters; -import org.springframework.web.reactive.function.server.HandlerFunction; -import org.springframework.web.reactive.function.server.ServerRequest; -import org.springframework.web.reactive.function.server.ServerResponse; -import reactor.core.publisher.Mono; -import springfox.documentation.swagger.web.SecurityConfigurationBuilder; - -/** - * SwaggerSecurityHandler - * - * @author lengleng - */ -@Slf4j -@Component -public class SwaggerSecurityHandler implements HandlerFunction { - - /** - * Handle the given request. - * - * @param request the request to handler - * @return the response - */ - @Override - public Mono handle(ServerRequest request) { - return ServerResponse.status(HttpStatus.OK) - .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(SecurityConfigurationBuilder.builder().build())); - } -} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerUiHandler.java b/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerUiHandler.java deleted file mode 100644 index 8bb78af1..00000000 --- a/blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerUiHandler.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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.gateway.handler; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Component; -import org.springframework.web.reactive.function.BodyInserters; -import org.springframework.web.reactive.function.server.HandlerFunction; -import org.springframework.web.reactive.function.server.ServerRequest; -import org.springframework.web.reactive.function.server.ServerResponse; -import reactor.core.publisher.Mono; -import springfox.documentation.swagger.web.UiConfigurationBuilder; - -/** - * SwaggerUiHandler - * - * @author lengleng - */ -@Slf4j -@Component -public class SwaggerUiHandler implements HandlerFunction { - - /** - * Handle the given request. - * - * @param request the request to handler - * @return the response - */ - @Override - public Mono handle(ServerRequest request) { - return ServerResponse.status(HttpStatus.OK) - .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(UiConfigurationBuilder.builder().build())); - } -} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/props/AuthProperties.java b/blade-gateway/src/main/java/org/springblade/gateway/props/AuthProperties.java index 38a924db..2f77c8b0 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/props/AuthProperties.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/props/AuthProperties.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-gateway/src/main/java/org/springblade/gateway/props/JwtProperties.java b/blade-gateway/src/main/java/org/springblade/gateway/props/JwtProperties.java new file mode 100644 index 00000000..7baef528 --- /dev/null +++ b/blade-gateway/src/main/java/org/springblade/gateway/props/JwtProperties.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.gateway.props; + +import io.jsonwebtoken.JwtException; +import lombok.Data; +import org.springblade.core.launch.constant.TokenConstant; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * JWT配置 + * + * @author Chill + */ +@Data +@ConfigurationProperties("blade.token") +public class JwtProperties { + + /** + * token是否有状态 + */ + private Boolean state = Boolean.FALSE; + + /** + * 是否只可同时在线一人 + */ + private Boolean single = Boolean.FALSE; + + /** + * token签名 + */ + private String signKey = ""; + + /** + * 获取签名规则 + */ + public String getSignKey() { + if (this.signKey.length() < TokenConstant.SIGN_KEY_LENGTH) { + throw new JwtException("请配置 blade.token.sign-key 的值, 长度32位以上"); + } + return this.signKey; + } + +} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/props/RequestProperties.java b/blade-gateway/src/main/java/org/springblade/gateway/props/RequestProperties.java new file mode 100644 index 00000000..3250e008 --- /dev/null +++ b/blade-gateway/src/main/java/org/springblade/gateway/props/RequestProperties.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.gateway.props; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.ArrayList; +import java.util.List; + +/** + * Request配置类 + * + * @author Chill + */ +@Data +@ConfigurationProperties("blade.request") +public class RequestProperties { + + /** + * 开启自定义request + */ + private Boolean enabled = true; + + /** + * 放行url + */ + private List skipUrl = new ArrayList<>(); + + /** + * 禁用url + */ + private List blockUrl = new ArrayList<>(); + + /** + * 白名单,支持通配符,例如:10.20.0.8*、10.20.0.* + */ + private List whiteList = new ArrayList<>(); + + /** + * 黑名单,支持通配符,例如:10.20.0.8*、10.20.0.* + */ + private List blackList = new ArrayList<>(); + +} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java b/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java index 5be38628..7756bf00 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,34 +27,32 @@ */ public class AuthProvider { - public static String TARGET = "/**"; - public static String REPLACEMENT = ""; public static String AUTH_KEY = TokenConstant.HEADER; - private static List defaultSkipUrl = new ArrayList<>(); + private static final List DEFAULT_SKIP_URL = new ArrayList<>(); static { - defaultSkipUrl.add("/example"); - defaultSkipUrl.add("/token/**"); - defaultSkipUrl.add("/captcha/**"); - defaultSkipUrl.add("/actuator/health/**"); - defaultSkipUrl.add("/v2/api-docs/**"); - defaultSkipUrl.add("/auth/**"); - defaultSkipUrl.add("/oauth/**"); - defaultSkipUrl.add("/log/**"); - defaultSkipUrl.add("/menu/routes"); - defaultSkipUrl.add("/menu/auth-routes"); - defaultSkipUrl.add("/tenant/info"); - defaultSkipUrl.add("/order/create/**"); - defaultSkipUrl.add("/storage/deduct/**"); - defaultSkipUrl.add("/error/**"); - defaultSkipUrl.add("/assets/**"); + DEFAULT_SKIP_URL.add("/example"); + DEFAULT_SKIP_URL.add("/token/**"); + DEFAULT_SKIP_URL.add("/captcha/**"); + DEFAULT_SKIP_URL.add("/actuator/health/**"); + DEFAULT_SKIP_URL.add("/v3/api-docs/**"); + DEFAULT_SKIP_URL.add("/auth/**"); + DEFAULT_SKIP_URL.add("/oauth/**"); + DEFAULT_SKIP_URL.add("/log/**"); + DEFAULT_SKIP_URL.add("/menu/routes"); + DEFAULT_SKIP_URL.add("/menu/auth-routes"); + DEFAULT_SKIP_URL.add("/tenant/info"); + DEFAULT_SKIP_URL.add("/order/create/**"); + DEFAULT_SKIP_URL.add("/storage/deduct/**"); + DEFAULT_SKIP_URL.add("/error/**"); + DEFAULT_SKIP_URL.add("/assets/**"); } /** * 默认无需鉴权的API */ public static List getDefaultSkipUrl() { - return defaultSkipUrl; + return DEFAULT_SKIP_URL; } } diff --git a/blade-gateway/src/main/java/org/springblade/gateway/provider/ResponseProvider.java b/blade-gateway/src/main/java/org/springblade/gateway/provider/ResponseProvider.java index cf4eb429..676a6882 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/provider/ResponseProvider.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/provider/ResponseProvider.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,7 +75,7 @@ public static Map error(String message) { public static Map response(int status, String message) { Map map = new HashMap<>(16); map.put("code", status); - map.put("message", message); + map.put("msg", message); map.put("data", null); return map; } diff --git a/blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java b/blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java deleted file mode 100644 index c4700f2e..00000000 --- a/blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * 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.gateway.provider; - -import lombok.AllArgsConstructor; -import org.springblade.gateway.props.RouteProperties; -import org.springblade.gateway.props.RouteResource; -import org.springframework.context.annotation.Primary; -import org.springframework.stereotype.Component; -import springfox.documentation.swagger.web.SwaggerResource; -import springfox.documentation.swagger.web.SwaggerResourcesProvider; - -import java.util.ArrayList; -import java.util.List; - -/** - * 聚合接口文档注册 - * - * @author Chill - */ -@Primary -@Component -@AllArgsConstructor -public class SwaggerProvider implements SwaggerResourcesProvider { - private static final String API_URI = "/v2/api-docs"; - - private RouteProperties routeProperties; - - @Override - public List get() { - List resources = new ArrayList<>(); - List routeResources = routeProperties.getResources(); - routeResources.forEach(routeResource -> resources.add(swaggerResource(routeResource))); - return resources; - } - - private SwaggerResource swaggerResource(RouteResource routeResource) { - SwaggerResource swaggerResource = new SwaggerResource(); - swaggerResource.setName(routeResource.getName()); - swaggerResource.setLocation(routeResource.getLocation().concat(API_URI)); - swaggerResource.setSwaggerVersion(routeResource.getVersion()); - return swaggerResource; - } - -} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/utils/JwtCrypto.java b/blade-gateway/src/main/java/org/springblade/gateway/utils/JwtCrypto.java new file mode 100644 index 00000000..30f7fe68 --- /dev/null +++ b/blade-gateway/src/main/java/org/springblade/gateway/utils/JwtCrypto.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.gateway.utils; + +import lombok.SneakyThrows; +import org.springframework.util.Assert; +import org.springframework.util.StringUtils; +import reactor.util.annotation.Nullable; + +import javax.crypto.Cipher; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.Base64; +import java.util.Objects; + +/** + * JwtCrypto + * + * @author Chill + */ +public class JwtCrypto { + + public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8; + public static final String BLADE_CRYPTO_AES_KEY = "blade.token.aes-key"; + + + /** + * Base64加密 + * + * @param content 文本内容 + * @param aesTextKey 文本密钥 + * @return {String} + */ + public static String encryptToString(String content, String aesTextKey) { + return Base64.getEncoder().encodeToString(encrypt(content, aesTextKey)); + } + + /** + * Base64加密 + * + * @param content 内容 + * @param aesTextKey 文本密钥 + * @return {String} + */ + public static String encryptToString(byte[] content, String aesTextKey) { + return Base64.getEncoder().encodeToString(encrypt(content, aesTextKey)); + } + + /** + * 加密 + * + * @param content 文本内容 + * @param aesTextKey 文本密钥 + * @return byte[] + */ + public static byte[] encrypt(String content, String aesTextKey) { + return encrypt(content.getBytes(DEFAULT_CHARSET), aesTextKey); + } + + /** + * 加密 + * + * @param content 文本内容 + * @param charset 编码 + * @param aesTextKey 文本密钥 + * @return byte[] + */ + public static byte[] encrypt(String content, Charset charset, String aesTextKey) { + return encrypt(content.getBytes(charset), aesTextKey); + } + + /** + * 加密 + * + * @param content 内容 + * @param aesTextKey 文本密钥 + * @return byte[] + */ + public static byte[] encrypt(byte[] content, String aesTextKey) { + return encrypt(content, Objects.requireNonNull(aesTextKey).getBytes(DEFAULT_CHARSET)); + } + + /** + * Base64解密 + * + * @param content 文本内容 + * @param aesTextKey 文本密钥 + * @return {String} + */ + @Nullable + public static String decryptToString(@Nullable String content, @Nullable String aesTextKey) { + if (!StringUtils.hasText(content) || !StringUtils.hasText(aesTextKey)) { + return null; + } + byte[] hexBytes = decrypt(Base64.getDecoder().decode(content.getBytes(DEFAULT_CHARSET)), aesTextKey); + return new String(hexBytes, DEFAULT_CHARSET); + } + + + /** + * 解密 + * + * @param content 内容 + * @param aesTextKey 文本密钥 + * @return byte[] + */ + public static byte[] decrypt(byte[] content, String aesTextKey) { + return decrypt(content, Objects.requireNonNull(aesTextKey).getBytes(DEFAULT_CHARSET)); + } + + + /** + * 解密 + * + * @param content 内容 + * @param aesKey 密钥 + * @return byte[] + */ + public static byte[] encrypt(byte[] content, byte[] aesKey) { + return aes(Pkcs7Encoder.encode(content), aesKey, Cipher.ENCRYPT_MODE); + } + + /** + * 加密 + * + * @param encrypted 内容 + * @param aesKey 密钥 + * @return byte[] + */ + public static byte[] decrypt(byte[] encrypted, byte[] aesKey) { + return Pkcs7Encoder.decode(aes(encrypted, aesKey, Cipher.DECRYPT_MODE)); + } + + /** + * ase加密 + * + * @param encrypted 内容 + * @param aesKey 密钥 + * @param mode 模式 + * @return byte[] + */ + @SneakyThrows + private static byte[] aes(byte[] encrypted, byte[] aesKey, int mode) { + Assert.isTrue(aesKey.length == 32, "IllegalAesKey, aesKey's length must be 32"); + Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); + SecretKeySpec keySpec = new SecretKeySpec(aesKey, "AES"); + IvParameterSpec iv = new IvParameterSpec(Arrays.copyOfRange(aesKey, 0, 16)); + cipher.init(mode, keySpec, iv); + return cipher.doFinal(encrypted); + } + + /** + * 提供基于PKCS7算法的加解密接口. + */ + private static class Pkcs7Encoder { + private static final int BLOCK_SIZE = 32; + + private static byte[] encode(byte[] src) { + int count = src.length; + // 计算需要填充的位数 + int amountToPad = BLOCK_SIZE - (count % BLOCK_SIZE); + // 获得补位所用的字符 + byte pad = (byte) (amountToPad & 0xFF); + byte[] pads = new byte[amountToPad]; + for (int index = 0; index < amountToPad; index++) { + pads[index] = pad; + } + int length = count + amountToPad; + byte[] dest = new byte[length]; + System.arraycopy(src, 0, dest, 0, count); + System.arraycopy(pads, 0, dest, count, amountToPad); + return dest; + } + + private static byte[] decode(byte[] decrypted) { + int pad = decrypted[decrypted.length - 1]; + if (pad < 1 || pad > BLOCK_SIZE) { + pad = 0; + } + if (pad > 0) { + return Arrays.copyOfRange(decrypted, 0, decrypted.length - pad); + } + return decrypted; + } + } +} diff --git a/blade-gateway/src/main/java/org/springblade/gateway/utils/JwtUtil.java b/blade-gateway/src/main/java/org/springblade/gateway/utils/JwtUtil.java index 2d05163d..5c374aab 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/utils/JwtUtil.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/utils/JwtUtil.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,9 @@ import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; +import lombok.Getter; import org.springblade.core.launch.constant.TokenConstant; +import org.springblade.gateway.props.JwtProperties; import java.nio.charset.StandardCharsets; import java.util.Base64; @@ -29,27 +31,68 @@ */ public class JwtUtil { - public static String SIGN_KEY = TokenConstant.SIGN_KEY; public static String BEARER = TokenConstant.BEARER; + public static String CRYPTO = TokenConstant.CRYPTO; public static Integer AUTH_LENGTH = 7; - public static String BASE64_SECURITY = Base64.getEncoder().encodeToString(SIGN_KEY.getBytes(StandardCharsets.UTF_8)); + /** + * jwt配置 + */ + @Getter + private static JwtProperties jwtProperties; + + public static void setJwtProperties(JwtProperties properties) { + if (JwtUtil.jwtProperties == null) { + JwtUtil.jwtProperties = properties; + } + } /** - * 获取token串 + * 签名加密 + */ + public static String getBase64Security() { + return Base64.getEncoder().encodeToString(getJwtProperties().getSignKey().getBytes(StandardCharsets.UTF_8)); + } + + /** + * 获取请求传递的token串 * * @param auth token * @return String */ public static String getToken(String auth) { + if (isBearer(auth) || isCrypto(auth)) { + return auth.substring(AUTH_LENGTH); + } + return null; + } + + /** + * 判断token类型为bearer + * + * @param auth token + * @return String + */ + public static Boolean isBearer(String auth) { if ((auth != null) && (auth.length() > AUTH_LENGTH)) { String headStr = auth.substring(0, 6).toLowerCase(); - if (headStr.compareTo(BEARER) == 0) { - auth = auth.substring(7); - } - return auth; + return headStr.compareTo(BEARER) == 0; } - return null; + return false; + } + + /** + * 判断token类型为crypto + * + * @param auth token + * @return String + */ + public static Boolean isCrypto(String auth) { + if ((auth != null) && (auth.length() > AUTH_LENGTH)) { + String headStr = auth.substring(0, 6).toLowerCase(); + return headStr.compareTo(CRYPTO) == 0; + } + return false; } /** @@ -61,7 +104,7 @@ public static String getToken(String auth) { public static Claims parseJWT(String jsonWebToken) { try { return Jwts.parserBuilder() - .setSigningKey(Base64.getDecoder().decode(JwtUtil.BASE64_SECURITY)).build() + .setSigningKey(Base64.getDecoder().decode(getBase64Security())).build() .parseClaimsJws(jsonWebToken).getBody(); } catch (Exception ex) { return null; diff --git a/blade-gateway/src/main/resources/application-dev.yml b/blade-gateway/src/main/resources/application-dev.yml new file mode 100644 index 00000000..b8eaf546 --- /dev/null +++ b/blade-gateway/src/main/resources/application-dev.yml @@ -0,0 +1,11 @@ +blade: + #多团队协作服务配置 + loadbalancer: + #开启配置 + enabled: true + #灰度版本 + #version: 3.0.0 + #负载均衡优先调用的ip段 + prior-ip-pattern: + - 192.168.0.* + - 127.0.0.1 diff --git a/blade-gateway/src/main/resources/application.yml b/blade-gateway/src/main/resources/application.yml new file mode 100644 index 00000000..d0c33710 --- /dev/null +++ b/blade-gateway/src/main/resources/application.yml @@ -0,0 +1,16 @@ +knife4j: + gateway: + enabled: true + tags-sorter: order + operations-sorter: order + # 指定服务发现的模式聚合微服务文档,并且是默认`default`分组 + strategy: discover + discover: + enabled: true + # 指定版本号(Swagger2|OpenAPI3) + version : openapi3 + # 需要排除的微服务(eg:网关服务) + excluded-services: + - blade-admin + - blade-gateway + - blade-log diff --git a/blade-gateway/src/main/resources/bootstrap.yml b/blade-gateway/src/main/resources/bootstrap.yml index e875240d..4172f5d6 100644 --- a/blade-gateway/src/main/resources/bootstrap.yml +++ b/blade-gateway/src/main/resources/bootstrap.yml @@ -3,9 +3,6 @@ server: spring: cloud: - discovery: - reactive: - enabled: false gateway: discovery: locator: @@ -14,15 +11,4 @@ spring: retry: enabled: true -# 聚合文档配置 -blade: - document: - resources: - - name: 授权模块 - location: /blade-auth - - name: 工作台模块 - location: /blade-desk - - name: 系统模块 - location: /blade-system - diff --git a/blade-ops/blade-admin/Dockerfile b/blade-ops/blade-admin/Dockerfile index 67119b9b..61e5f627 100644 --- a/blade-ops/blade-admin/Dockerfile +++ b/blade-ops/blade-admin/Dockerfile @@ -1,6 +1,6 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/admin @@ -10,6 +10,6 @@ EXPOSE 7002 ADD ./target/blade-admin.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-ops/blade-admin/pom.xml b/blade-ops/blade-admin/pom.xml index 39eaf49a..9c150af2 100644 --- a/blade-ops/blade-admin/pom.xml +++ b/blade-ops/blade-admin/pom.xml @@ -5,13 +5,12 @@ blade-ops org.springblade - 2.8.0 + ${revision} 4.0.0 blade-admin ${project.artifactId} - ${blade.project.version} jar @@ -19,22 +18,18 @@ org.springblade blade-common - ${blade.project.version} org.springblade blade-core-launch - ${blade.tool.version} org.springblade blade-core-tool - ${blade.tool.version} org.springblade blade-core-cloud - ${blade.tool.version} org.springblade @@ -46,7 +41,6 @@ de.codecentric spring-boot-admin-starter-server - ${spring.boot.admin.version} @@ -75,22 +69,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-ops/blade-admin/src/main/java/org/springblade/admin/AdminApplication.java b/blade-ops/blade-admin/src/main/java/org/springblade/admin/AdminApplication.java index 4e4ece61..f5769a2b 100644 --- a/blade-ops/blade-admin/src/main/java/org/springblade/admin/AdminApplication.java +++ b/blade-ops/blade-admin/src/main/java/org/springblade/admin/AdminApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,9 @@ package org.springblade.admin; import de.codecentric.boot.admin.server.config.EnableAdminServer; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; /** * admin启动器 @@ -26,7 +26,7 @@ * @author Chill */ @EnableAdminServer -@SpringCloudApplication +@BladeCloudApplication public class AdminApplication { public static void main(String[] args) { diff --git a/blade-ops/blade-develop/Dockerfile b/blade-ops/blade-develop/Dockerfile new file mode 100644 index 00000000..37c0333b --- /dev/null +++ b/blade-ops/blade-develop/Dockerfile @@ -0,0 +1,15 @@ +FROM bladex/alpine-java:openjdk17_cn_slim + +MAINTAINER bladejava@qq.com + +RUN mkdir -p /blade/develop + +WORKDIR /blade/develop + +EXPOSE 7007 + +ADD ./target/blade-develop.jar ./app.jar + +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] + +CMD ["--spring.profiles.active=test"] diff --git a/blade-ops/blade-develop/pom.xml b/blade-ops/blade-develop/pom.xml index ab6b6fbf..3d8ecea8 100644 --- a/blade-ops/blade-develop/pom.xml +++ b/blade-ops/blade-develop/pom.xml @@ -6,14 +6,13 @@ org.springblade blade-ops - 2.8.0 + ${revision} 4.0.0 blade-develop ${project.artifactId} - ${blade.project.version} jar @@ -21,39 +20,18 @@ org.springblade blade-core-boot - ${blade.tool.version} org.springblade blade-common - ${blade.project.version} org.springblade - blade-core-develop - ${blade.tool.version} - - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - io.swagger - swagger-models - - - - - io.swagger - swagger-models - ${swagger.models.version} + blade-starter-develop org.springblade blade-dict-api - ${blade.project.version} @@ -64,28 +42,24 @@ docker-maven-plugin ${docker.plugin.version} - true + ${docker.registry.url}/blade/${project.artifactId}:${project.version} + ${project.basedir} + ${docker.registry.host} + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + ${docker.registry.url} + ${docker.registry.url} + true org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/DevelopApplication.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/DevelopApplication.java index 1c894544..a38357c2 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/DevelopApplication.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/DevelopApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,16 @@ */ package org.springblade.develop; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; /** * Develop启动器 * * @author Chill */ -@SpringCloudApplication -@EnableFeignClients(AppConstant.BASE_PACKAGES) +@BladeCloudApplication public class DevelopApplication { public static void main(String[] args) { diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java index 2e6908ed..867b7e19 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; @@ -32,9 +39,7 @@ import org.springblade.develop.service.IDatasourceService; import org.springblade.develop.support.BladeCodeGenerator; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.Collection; import java.util.Map; @@ -43,11 +48,11 @@ * * @author Chill */ -@ApiIgnore +@Hidden @RestController @AllArgsConstructor @RequestMapping("/code") -@Api(value = "代码生成", tags = "代码生成") +@Tag(name = "代码生成", description = "代码生成") @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public class CodeController extends BladeController { @@ -59,7 +64,7 @@ public class CodeController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入code") + @Operation(summary = "详情", description = "传入code") public R detail(Code code) { Code detail = codeService.getOne(Condition.getQueryWrapper(code)); return R.data(detail); @@ -69,14 +74,14 @@ public R detail(Code code) { * 分页 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "codeName", value = "模块名", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "tableName", value = "表名", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "modelName", value = "实体名", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "codeName", description = "模块名", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "tableName", description = "表名", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "modelName", description = "实体名", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入code") - public R> list(@ApiIgnore @RequestParam Map code, Query query) { + @Operation(summary = "分页", description = "传入code") + public R> list(@Parameter(hidden = true) @RequestParam Map code, Query query) { IPage pages = codeService.page(Condition.getPage(query), Condition.getQueryWrapper(code, Code.class)); return R.data(pages); } @@ -86,7 +91,7 @@ public R> list(@ApiIgnore @RequestParam Map code, Qu */ @PostMapping("/submit") @ApiOperationSupport(order = 3) - @ApiOperation(value = "新增或修改", notes = "传入code") + @Operation(summary = "新增或修改", description = "传入code") public R submit(@Valid @RequestBody Code code) { return R.status(codeService.submit(code)); } @@ -97,8 +102,8 @@ public R submit(@Valid @RequestBody Code code) { */ @PostMapping("/remove") @ApiOperationSupport(order = 4) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(codeService.removeByIds(Func.toLongList(ids))); } @@ -107,8 +112,8 @@ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam */ @PostMapping("/copy") @ApiOperationSupport(order = 5) - @ApiOperation(value = "复制", notes = "传入id") - public R copy(@ApiParam(value = "主键", required = true) @RequestParam Long id) { + @Operation(summary = "复制", description = "传入id") + public R copy(@Parameter(description = "主键", required = true) @RequestParam Long id) { Code code = codeService.getById(id); code.setId(null); code.setCodeName(code.getCodeName() + "-copy"); @@ -120,8 +125,8 @@ public R copy(@ApiParam(value = "主键", required = true) @RequestParam Long id */ @PostMapping("/gen-code") @ApiOperationSupport(order = 6) - @ApiOperation(value = "代码生成", notes = "传入ids") - public R genCode(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) { + @Operation(summary = "代码生成", description = "传入ids") + public R genCode(@Parameter(description = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "saber3") String system) { Collection codes = codeService.listByIds(Func.toLongList(ids)); codes.forEach(code -> { BladeCodeGenerator generator = new BladeCodeGenerator(); diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java index 4ca5a887..4677ac66 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ 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 io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; @@ -30,7 +30,7 @@ import org.springblade.develop.service.IDatasourceService; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; +import jakarta.validation.Valid; import java.util.List; /** @@ -41,7 +41,7 @@ @RestController @AllArgsConstructor @RequestMapping("/datasource") -@Api(value = "数据源配置表", tags = "数据源配置表接口") +@Tag(name = "数据源配置表", description = "数据源配置表接口") public class DatasourceController extends BladeController { private IDatasourceService datasourceService; @@ -51,7 +51,7 @@ public class DatasourceController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入datasource") + @Operation(summary = "详情", description = "传入datasource") public R detail(Datasource datasource) { Datasource detail = datasourceService.getOne(Condition.getQueryWrapper(datasource)); return R.data(detail); @@ -62,7 +62,7 @@ public R detail(Datasource datasource) { */ @GetMapping("/list") @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入datasource") + @Operation(summary = "分页", description = "传入datasource") public R> list(Datasource datasource, Query query) { IPage pages = datasourceService.page(Condition.getPage(query), Condition.getQueryWrapper(datasource)); return R.data(pages); @@ -73,7 +73,7 @@ public R> list(Datasource datasource, Query query) { */ @PostMapping("/save") @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增", notes = "传入datasource") + @Operation(summary = "新增", description = "传入datasource") public R save(@Valid @RequestBody Datasource datasource) { return R.status(datasourceService.save(datasource)); } @@ -83,7 +83,7 @@ public R save(@Valid @RequestBody Datasource datasource) { */ @PostMapping("/update") @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入datasource") + @Operation(summary = "修改", description = "传入datasource") public R update(@Valid @RequestBody Datasource datasource) { return R.status(datasourceService.updateById(datasource)); } @@ -93,7 +93,7 @@ public R update(@Valid @RequestBody Datasource datasource) { */ @PostMapping("/submit") @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入datasource") + @Operation(summary = "新增或修改", description = "传入datasource") public R submit(@Valid @RequestBody Datasource datasource) { datasource.setUrl(datasource.getUrl().replace("&", "&")); return R.status(datasourceService.saveOrUpdate(datasource)); @@ -105,8 +105,8 @@ public R submit(@Valid @RequestBody Datasource datasource) { */ @PostMapping("/remove") @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(datasourceService.deleteLogic(Func.toLongList(ids))); } @@ -115,7 +115,7 @@ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam */ @GetMapping("/select") @ApiOperationSupport(order = 8) - @ApiOperation(value = "下拉数据源", notes = "查询列表") + @Operation(summary = "下拉数据源", description = "查询列表") public R> select() { List list = datasourceService.list(); return R.data(list); diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Code.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Code.java index 390aee27..b04c3374 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Code.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Code.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -34,15 +34,16 @@ */ @Data @TableName("blade_code") -@ApiModel(value = "Code对象", description = "Code对象") +@Schema(description = "Code对象") public class Code implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,75 +51,75 @@ public class Code implements Serializable { /** * 数据源主键 */ - @ApiModelProperty(value = "数据源主键") + @Schema(description = "数据源主键") @JsonSerialize(using = ToStringSerializer.class) private Long datasourceId; /** * 模块名称 */ - @ApiModelProperty(value = "服务名称") + @Schema(description = "服务名称") private String serviceName; /** * 模块名称 */ - @ApiModelProperty(value = "模块名称") + @Schema(description = "模块名称") private String codeName; /** * 表名 */ - @ApiModelProperty(value = "表名") + @Schema(description = "表名") private String tableName; /** * 实体名 */ - @ApiModelProperty(value = "表前缀") + @Schema(description = "表前缀") private String tablePrefix; /** * 主键名 */ - @ApiModelProperty(value = "主键名") + @Schema(description = "主键名") private String pkName; /** * 基础业务模式 */ - @ApiModelProperty(value = "基础业务模式") + @Schema(description = "基础业务模式") private Integer baseMode; /** * 包装器模式 */ - @ApiModelProperty(value = "包装器模式") + @Schema(description = "包装器模式") private Integer wrapMode; /** * 后端包名 */ - @ApiModelProperty(value = "后端包名") + @Schema(description = "后端包名") private String packageName; /** * 后端路径 */ - @ApiModelProperty(value = "后端路径") + @Schema(description = "后端路径") private String apiPath; /** * 前端路径 */ - @ApiModelProperty(value = "前端路径") + @Schema(description = "前端路径") private String webPath; /** * 是否已删除 */ @TableLogic - @ApiModelProperty(value = "是否已删除") + @Schema(description = "是否已删除") private Integer isDeleted; diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Datasource.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Datasource.java index c48085c1..1ea5e15a 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Datasource.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/entity/Datasource.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,13 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import java.io.Serial; + /** * 数据源配置表实体类 * @@ -34,15 +35,16 @@ @Data @TableName("blade_datasource") @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "Datasource对象", description = "数据源配置表") +@Schema(description = "Datasource对象") public class Datasource extends BaseEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,32 +52,32 @@ public class Datasource extends BaseEntity { /** * 名称 */ - @ApiModelProperty(value = "名称") + @Schema(description = "名称") private String name; /** * 驱动类 */ - @ApiModelProperty(value = "驱动类") + @Schema(description = "驱动类") private String driverClass; /** * 连接地址 */ - @ApiModelProperty(value = "连接地址") + @Schema(description = "连接地址") private String url; /** * 用户名 */ - @ApiModelProperty(value = "用户名") + @Schema(description = "用户名") private String username; /** * 密码 */ - @ApiModelProperty(value = "密码") + @Schema(description = "密码") private String password; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/CodeMapper.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/CodeMapper.java index ac38043b..8ed52191 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/CodeMapper.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/CodeMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/DatasourceMapper.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/DatasourceMapper.java index 3f3be53c..bb816518 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/DatasourceMapper.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/mapper/DatasourceMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/ICodeService.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/ICodeService.java index 38e25a77..49e0574e 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/ICodeService.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/ICodeService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/IDatasourceService.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/IDatasourceService.java index d8109f3e..0321b49d 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/IDatasourceService.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/IDatasourceService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/CodeServiceImpl.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/CodeServiceImpl.java index 83aaa96a..44f1c7f3 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/CodeServiceImpl.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/CodeServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/DatasourceServiceImpl.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/DatasourceServiceImpl.java index c14222e8..5d7cc075 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/DatasourceServiceImpl.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/service/impl/DatasourceServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm b/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm index 58762e2d..3862210a 100644 --- a/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm +++ b/blade-ops/blade-develop/src/main/resources/templates/controller.java.vm @@ -1,11 +1,11 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

- * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; * 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 + * http://www.gnu.org/licenses/lgpl.html *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,12 +15,12 @@ */ package $!{package.Controller}; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; @@ -35,14 +35,15 @@ import $!{package.Entity}.$!{entity}; #set($voPackage=$package.Entity.replace("entity","vo")) import $!{voPackage}.$!{entity}VO; #set($wrapperPackage=$package.Entity.replace("entity","wrapper")) +#if($!{hasWrapper}) import $!{wrapperPackage}.$!{entity}Wrapper; +#end import $!{package.Service}.$!{table.serviceName}; #if($!{superControllerClassPackage}) import $!{superControllerClassPackage}; #end #if(!$!{superEntityClass}) #end -import java.util.List; /** * $!{table.comment} 控制器 @@ -52,8 +53,8 @@ import java.util.List; */ @RestController @AllArgsConstructor -@RequestMapping("#if($!{package.ModuleName})/$!{package.ModuleName}#end/$!{cfg.entityKey}") -@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口") +@RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}") +@Tag(name = "$!{table.comment}", description = "$!{table.comment}接口") #if($!{superControllerClass}) public class $!{table.controllerName} extends $!{superControllerClass} { #else @@ -62,65 +63,90 @@ public class $!{table.controllerName} { private $!{table.serviceName} $!{table.entityPath}Service; +#if($!{hasWrapper}) /** - * 详情 - */ + * 详情 + */ @GetMapping("/detail") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入$!{table.entityPath}") public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) { $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); return R.data($!{entity}Wrapper.build().entityVO(detail)); } /** - * 分页 $!{table.comment} - */ + * 分页 $!{table.comment} + */ @GetMapping("/list") - @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入$!{table.entityPath}") public R> list($!{entity} $!{table.entityPath}, Query query) { IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); return R.data($!{entity}Wrapper.build().pageVO(pages)); } +#else + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入$!{table.entityPath}") + public R<$!{entity}> detail($!{entity} $!{table.entityPath}) { + $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); + return R.data(detail); + } + + /** + * 分页 $!{table.comment} + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入$!{table.entityPath}") + public R> list($!{entity} $!{table.entityPath}, Query query) { + IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); + return R.data(pages); + } +#end + /** - * 自定义分页 $!{table.comment} - */ + * 自定义分页 $!{table.comment} + */ @GetMapping("/page") - @ApiOperationSupport(order = 3) - @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 3) + @Operation(summary = "分页", description = "传入$!{table.entityPath}") public R> page($!{entity}VO $!{table.entityPath}, Query query) { IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath}); return R.data(pages); } /** - * 新增 $!{table.comment} - */ + * 新增 $!{table.comment} + */ @PostMapping("/save") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 4) + @Operation(summary = "新增", description = "传入$!{table.entityPath}") public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) { return R.status($!{table.entityPath}Service.save($!{table.entityPath})); } /** - * 修改 $!{table.comment} - */ + * 修改 $!{table.comment} + */ @PostMapping("/update") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 5) + @Operation(summary = "修改", description = "传入$!{table.entityPath}") public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) { return R.status($!{table.entityPath}Service.updateById($!{table.entityPath})); } /** - * 新增或修改 $!{table.comment} - */ + * 新增或修改 $!{table.comment} + */ @PostMapping("/submit") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 6) + @Operation(summary = "新增或修改", description = "传入$!{table.entityPath}") public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) { return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath})); } @@ -128,24 +154,24 @@ public class $!{table.controllerName} { #if($!{superEntityClass}) /** - * 删除 $!{table.comment} - */ + * 删除 $!{table.comment} + */ @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @ApiOperationSupport(order = 7) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids))); } #else /** - * 删除 $!{table.comment} - */ + * 删除 $!{table.comment} + */ @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @ApiOperationSupport(order = 8) + @Operation(summary = "删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids))); } diff --git a/blade-ops/blade-develop/src/main/resources/templates/wrapper.java.vm b/blade-ops/blade-develop/src/main/resources/templates/wrapper.java.vm index 64a8b015..4c331cd7 100644 --- a/blade-ops/blade-develop/src/main/resources/templates/wrapper.java.vm +++ b/blade-ops/blade-develop/src/main/resources/templates/wrapper.java.vm @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ public class $!{entity}Wrapper extends BaseEntityWrapper<$!{entity}, $!{entity}V @Override public $!{entity}VO entityVO($!{entity} $!{table.entityPath}) { - $!{entity}VO $!{table.entityPath}VO = BeanUtil.copy($!{table.entityPath}, $!{entity}VO.class); + $!{entity}VO $!{table.entityPath}VO = BeanUtil.copyProperties($!{table.entityPath}, $!{entity}VO.class); return $!{table.entityPath}VO; } diff --git a/blade-ops/blade-develop/src/test/java/org/springblade/test/CodeGenerator.java b/blade-ops/blade-develop/src/test/java/org/springblade/test/CodeGenerator.java index 6cb84af7..373ac259 100644 --- a/blade-ops/blade-develop/src/test/java/org/springblade/test/CodeGenerator.java +++ b/blade-ops/blade-develop/src/test/java/org/springblade/test/CodeGenerator.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm b/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm index 58762e2d..3862210a 100644 --- a/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm +++ b/blade-ops/blade-develop/src/test/resources/templates/controller.java.vm @@ -1,11 +1,11 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

- * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; * 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 + * http://www.gnu.org/licenses/lgpl.html *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,12 +15,12 @@ */ package $!{package.Controller}; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; -import javax.validation.Valid; +import jakarta.validation.Valid; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; @@ -35,14 +35,15 @@ import $!{package.Entity}.$!{entity}; #set($voPackage=$package.Entity.replace("entity","vo")) import $!{voPackage}.$!{entity}VO; #set($wrapperPackage=$package.Entity.replace("entity","wrapper")) +#if($!{hasWrapper}) import $!{wrapperPackage}.$!{entity}Wrapper; +#end import $!{package.Service}.$!{table.serviceName}; #if($!{superControllerClassPackage}) import $!{superControllerClassPackage}; #end #if(!$!{superEntityClass}) #end -import java.util.List; /** * $!{table.comment} 控制器 @@ -52,8 +53,8 @@ import java.util.List; */ @RestController @AllArgsConstructor -@RequestMapping("#if($!{package.ModuleName})/$!{package.ModuleName}#end/$!{cfg.entityKey}") -@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口") +@RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}") +@Tag(name = "$!{table.comment}", description = "$!{table.comment}接口") #if($!{superControllerClass}) public class $!{table.controllerName} extends $!{superControllerClass} { #else @@ -62,65 +63,90 @@ public class $!{table.controllerName} { private $!{table.serviceName} $!{table.entityPath}Service; +#if($!{hasWrapper}) /** - * 详情 - */ + * 详情 + */ @GetMapping("/detail") - @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入$!{table.entityPath}") public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) { $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); return R.data($!{entity}Wrapper.build().entityVO(detail)); } /** - * 分页 $!{table.comment} - */ + * 分页 $!{table.comment} + */ @GetMapping("/list") - @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入$!{table.entityPath}") public R> list($!{entity} $!{table.entityPath}, Query query) { IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); return R.data($!{entity}Wrapper.build().pageVO(pages)); } +#else + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入$!{table.entityPath}") + public R<$!{entity}> detail($!{entity} $!{table.entityPath}) { + $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); + return R.data(detail); + } + + /** + * 分页 $!{table.comment} + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入$!{table.entityPath}") + public R> list($!{entity} $!{table.entityPath}, Query query) { + IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); + return R.data(pages); + } +#end + /** - * 自定义分页 $!{table.comment} - */ + * 自定义分页 $!{table.comment} + */ @GetMapping("/page") - @ApiOperationSupport(order = 3) - @ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 3) + @Operation(summary = "分页", description = "传入$!{table.entityPath}") public R> page($!{entity}VO $!{table.entityPath}, Query query) { IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath}); return R.data(pages); } /** - * 新增 $!{table.comment} - */ + * 新增 $!{table.comment} + */ @PostMapping("/save") - @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 4) + @Operation(summary = "新增", description = "传入$!{table.entityPath}") public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) { return R.status($!{table.entityPath}Service.save($!{table.entityPath})); } /** - * 修改 $!{table.comment} - */ + * 修改 $!{table.comment} + */ @PostMapping("/update") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 5) + @Operation(summary = "修改", description = "传入$!{table.entityPath}") public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) { return R.status($!{table.entityPath}Service.updateById($!{table.entityPath})); } /** - * 新增或修改 $!{table.comment} - */ + * 新增或修改 $!{table.comment} + */ @PostMapping("/submit") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入$!{table.entityPath}") + @ApiOperationSupport(order = 6) + @Operation(summary = "新增或修改", description = "传入$!{table.entityPath}") public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) { return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath})); } @@ -128,24 +154,24 @@ public class $!{table.controllerName} { #if($!{superEntityClass}) /** - * 删除 $!{table.comment} - */ + * 删除 $!{table.comment} + */ @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @ApiOperationSupport(order = 7) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids))); } #else /** - * 删除 $!{table.comment} - */ + * 删除 $!{table.comment} + */ @PostMapping("/remove") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @ApiOperationSupport(order = 8) + @Operation(summary = "删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids))); } diff --git a/blade-ops/blade-develop/src/test/resources/templates/wrapper.java.vm b/blade-ops/blade-develop/src/test/resources/templates/wrapper.java.vm index 64a8b015..4c331cd7 100644 --- a/blade-ops/blade-develop/src/test/resources/templates/wrapper.java.vm +++ b/blade-ops/blade-develop/src/test/resources/templates/wrapper.java.vm @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ public class $!{entity}Wrapper extends BaseEntityWrapper<$!{entity}, $!{entity}V @Override public $!{entity}VO entityVO($!{entity} $!{table.entityPath}) { - $!{entity}VO $!{table.entityPath}VO = BeanUtil.copy($!{table.entityPath}, $!{entity}VO.class); + $!{entity}VO $!{table.entityPath}VO = BeanUtil.copyProperties($!{table.entityPath}, $!{entity}VO.class); return $!{table.entityPath}VO; } diff --git a/blade-ops/blade-report/Dockerfile b/blade-ops/blade-report/Dockerfile index a85a7910..3fae63ff 100644 --- a/blade-ops/blade-report/Dockerfile +++ b/blade-ops/blade-report/Dockerfile @@ -1,6 +1,6 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/report @@ -10,6 +10,6 @@ EXPOSE 8108 ADD ./target/blade-report.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-ops/blade-report/pom.xml b/blade-ops/blade-report/pom.xml index b4e7e302..b72fbf3c 100644 --- a/blade-ops/blade-report/pom.xml +++ b/blade-ops/blade-report/pom.xml @@ -5,14 +5,13 @@ org.springblade blade-ops - 2.8.0 + ${revision} 4.0.0 blade-report ${project.artifactId} - ${blade.project.version} jar @@ -20,18 +19,44 @@ org.springblade blade-core-boot - ${blade.tool.version} org.springblade - blade-core-report - ${blade.tool.version} + blade-starter-report org.springblade blade-common - ${blade.project.version} + + + + com.spotify + docker-maven-plugin + ${docker.plugin.version} + + ${docker.registry.url}/blade/${project.artifactId}:${project.version} + ${project.basedir} + ${docker.registry.host} + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + ${docker.registry.url} + ${docker.registry.url} + true + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + diff --git a/blade-ops/blade-report/src/main/java/org/springblade/report/ReportApplication.java b/blade-ops/blade-report/src/main/java/org/springblade/report/ReportApplication.java index 696a2cd4..02281b87 100644 --- a/blade-ops/blade-report/src/main/java/org/springblade/report/ReportApplication.java +++ b/blade-ops/blade-report/src/main/java/org/springblade/report/ReportApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,16 +15,16 @@ */ package org.springblade.report; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; /** * UReport启动器 * * @author Chill */ -@SpringCloudApplication +@BladeCloudApplication public class ReportApplication { public static void main(String[] args) { diff --git a/blade-ops/blade-report/src/main/java/org/springblade/report/config/BladeReportConfiguration.java b/blade-ops/blade-report/src/main/java/org/springblade/report/config/BladeReportConfiguration.java index 28171a91..10122bfe 100644 --- a/blade-ops/blade-report/src/main/java/org/springblade/report/config/BladeReportConfiguration.java +++ b/blade-ops/blade-report/src/main/java/org/springblade/report/config/BladeReportConfiguration.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ * * @author Chill */ -@Configuration +@Configuration(proxyBeanMethods = false) @ConditionalOnProperty(value = "report.enabled", havingValue = "true", matchIfMissing = true) public class BladeReportConfiguration { diff --git a/blade-ops/blade-resource/Dockerfile b/blade-ops/blade-resource/Dockerfile index 72ee5432..ca95c3dc 100644 --- a/blade-ops/blade-resource/Dockerfile +++ b/blade-ops/blade-resource/Dockerfile @@ -1,6 +1,6 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/resource @@ -10,6 +10,6 @@ EXPOSE 8010 ADD ./target/blade-resource.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-ops/blade-resource/pom.xml b/blade-ops/blade-resource/pom.xml index e31e735f..7dc3b602 100644 --- a/blade-ops/blade-resource/pom.xml +++ b/blade-ops/blade-resource/pom.xml @@ -5,30 +5,26 @@ blade-ops org.springblade - 2.8.0 + ${revision} 4.0.0 blade-resource ${project.artifactId} - ${blade.project.version} jar org.springblade blade-common - ${blade.project.version} org.springblade blade-core-tool - ${blade.tool.version} org.springblade blade-core-cloud - ${blade.tool.version} org.springblade @@ -38,8 +34,11 @@ org.springblade - blade-core-oss - ${blade.tool.version} + blade-starter-oss + + + org.springblade + blade-starter-swagger @@ -68,22 +67,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/ResourceApplication.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/ResourceApplication.java index c233c387..a044c17e 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/ResourceApplication.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/ResourceApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,16 +15,16 @@ */ package org.springblade.resource; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; /** * 资源启动器 * * @author Chill */ -@SpringCloudApplication +@BladeCloudApplication public class ResourceApplication { public static void main(String[] args) { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java index 7cddd8f8..952528fb 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ package org.springblade.resource.endpoint; -import io.swagger.annotations.Api; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import lombok.SneakyThrows; import org.springblade.core.oss.QiniuTemplate; @@ -34,7 +34,7 @@ @RestController @AllArgsConstructor @RequestMapping("/oss/endpoint") -@Api(value = "对象存储端点", tags = "对象存储端点") +@Tag(name = "对象存储端点", description = "对象存储端点") public class OssEndpoint { private QiniuTemplate qiniuTemplate; diff --git a/blade-ops/blade-seata-order/pom.xml b/blade-ops/blade-seata-order/pom.xml index 401dad8f..3d9a9c69 100644 --- a/blade-ops/blade-seata-order/pom.xml +++ b/blade-ops/blade-seata-order/pom.xml @@ -5,31 +5,44 @@ blade-ops org.springblade - 2.8.0 + ${revision} 4.0.0 blade-seata-order ${project.artifactId} - ${blade.project.version} jar org.springblade blade-common - ${blade.project.version} org.springblade blade-core-boot - ${blade.tool.version} org.springblade - blade-core-transaction - ${blade.tool.version} + blade-starter-transaction + + + + com.spotify + docker-maven-plugin + ${docker.plugin.version} + + true + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + diff --git a/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/SeataOrderApplication.java b/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/SeataOrderApplication.java index f277f031..bff38d2a 100644 --- a/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/SeataOrderApplication.java +++ b/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/SeataOrderApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/entity/Order.java b/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/entity/Order.java index 8ccac26a..48ac3976 100644 --- a/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/entity/Order.java +++ b/blade-ops/blade-seata-order/src/main/java/org/springblade/seata/order/entity/Order.java @@ -6,6 +6,7 @@ import lombok.Data; import lombok.experimental.Accessors; +import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; @@ -19,6 +20,7 @@ @TableName("tb_order") public class Order implements Serializable { + @Serial private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) diff --git a/blade-ops/blade-seata-storage/pom.xml b/blade-ops/blade-seata-storage/pom.xml index 9dead690..42014a4e 100644 --- a/blade-ops/blade-seata-storage/pom.xml +++ b/blade-ops/blade-seata-storage/pom.xml @@ -5,32 +5,44 @@ blade-ops org.springblade - 2.8.0 + ${revision} 4.0.0 blade-seata-storage ${project.artifactId} - ${blade.project.version} jar org.springblade blade-common - ${blade.project.version} org.springblade blade-core-boot - ${blade.tool.version} org.springblade - blade-core-transaction - ${blade.tool.version} + blade-starter-transaction + + + + com.spotify + docker-maven-plugin + ${docker.plugin.version} + + true + + + + org.apache.maven.plugins + maven-antrun-plugin + + + diff --git a/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/SeataStorageApplication.java b/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/SeataStorageApplication.java index 5f8686df..431f07c9 100644 --- a/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/SeataStorageApplication.java +++ b/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/SeataStorageApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/entity/Storage.java b/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/entity/Storage.java index 73e4935e..b1e80ac6 100644 --- a/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/entity/Storage.java +++ b/blade-ops/blade-seata-storage/src/main/java/org/springblade/seata/storage/entity/Storage.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -15,6 +16,7 @@ @TableName("tb_storage") public class Storage implements Serializable { + @Serial private static final long serialVersionUID = 1L; private Long id; diff --git a/blade-ops/pom.xml b/blade-ops/pom.xml index d1395992..650a1676 100644 --- a/blade-ops/pom.xml +++ b/blade-ops/pom.xml @@ -5,11 +5,12 @@ SpringBlade org.springblade - 2.8.0 + ${revision} 4.0.0 blade-ops + ${project.artifactId} pom blade-admin diff --git a/blade-service-api/blade-demo-api/pom.xml b/blade-service-api/blade-demo-api/pom.xml index e3aa90e2..fee8cfea 100644 --- a/blade-service-api/blade-demo-api/pom.xml +++ b/blade-service-api/blade-demo-api/pom.xml @@ -5,13 +5,12 @@ blade-service-api org.springblade - 2.8.0 + ${revision} 4.0.0 blade-demo-api ${project.artifactId} - ${blade.project.version} jar diff --git a/blade-service-api/blade-demo-api/src/main/java/com/example/demo/entity/Notice.java b/blade-service-api/blade-demo-api/src/main/java/com/example/demo/entity/Notice.java index b158dfeb..84c38731 100644 --- a/blade-service-api/blade-demo-api/src/main/java/com/example/demo/entity/Notice.java +++ b/blade-service-api/blade-demo-api/src/main/java/com/example/demo/entity/Notice.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,12 @@ 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.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import java.io.Serial; import java.util.Date; /** @@ -37,12 +38,13 @@ @EqualsAndHashCode(callSuper = true) public class Notice extends BaseEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键id */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,25 +52,25 @@ public class Notice extends BaseEntity { /** * 标题 */ - @ApiModelProperty(value = "标题") + @Schema(description = "标题") private String title; /** * 通知类型 */ - @ApiModelProperty(value = "通知类型") + @Schema(description = "通知类型") private Integer category; /** * 发布日期 */ - @ApiModelProperty(value = "发布日期") + @Schema(description = "发布日期") private Date releaseTime; /** * 内容 */ - @ApiModelProperty(value = "内容") + @Schema(description = "内容") private String content; diff --git a/blade-service-api/blade-demo-api/src/main/java/com/example/demo/feign/INoticeClient.java b/blade-service-api/blade-demo-api/src/main/java/com/example/demo/feign/INoticeClient.java index 911be4d7..19410c0f 100644 --- a/blade-service-api/blade-demo-api/src/main/java/com/example/demo/feign/INoticeClient.java +++ b/blade-service-api/blade-demo-api/src/main/java/com/example/demo/feign/INoticeClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service-api/blade-demo-api/src/main/java/com/example/demo/vo/NoticeVO.java b/blade-service-api/blade-demo-api/src/main/java/com/example/demo/vo/NoticeVO.java index dfb0a660..f8a200e4 100644 --- a/blade-service-api/blade-demo-api/src/main/java/com/example/demo/vo/NoticeVO.java +++ b/blade-service-api/blade-demo-api/src/main/java/com/example/demo/vo/NoticeVO.java @@ -1,6 +1,6 @@ package com.example.demo.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import com.example.demo.entity.Notice; @@ -14,7 +14,7 @@ @EqualsAndHashCode(callSuper = true) public class NoticeVO extends Notice { - @ApiModelProperty(value = "通知类型名") + @Schema(description = "通知类型名") private String categoryName; } diff --git a/blade-service-api/blade-desk-api/pom.xml b/blade-service-api/blade-desk-api/pom.xml index 6cf838b9..f9e538e3 100644 --- a/blade-service-api/blade-desk-api/pom.xml +++ b/blade-service-api/blade-desk-api/pom.xml @@ -5,13 +5,12 @@ blade-service-api org.springblade - 2.8.0 + ${revision} 4.0.0 blade-desk-api ${project.artifactId} - ${blade.project.version} jar diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/entity/Notice.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/entity/Notice.java index ee07c335..1cdde926 100644 --- a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/entity/Notice.java +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/entity/Notice.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,12 @@ 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.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import java.io.Serial; import java.util.Date; /** @@ -37,12 +38,13 @@ @TableName("blade_notice") public class Notice extends BaseEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键id */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,25 +52,25 @@ public class Notice extends BaseEntity { /** * 标题 */ - @ApiModelProperty(value = "标题") + @Schema(description = "标题") private String title; /** * 通知类型 */ - @ApiModelProperty(value = "通知类型") + @Schema(description = "通知类型") private Integer category; /** * 发布日期 */ - @ApiModelProperty(value = "发布日期") + @Schema(description = "发布日期") private Date releaseTime; /** * 内容 */ - @ApiModelProperty(value = "内容") + @Schema(description = "内容") private String content; diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/feign/INoticeClient.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/feign/INoticeClient.java index 1c964004..3d174e85 100644 --- a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/feign/INoticeClient.java +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/feign/INoticeClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/vo/NoticeVO.java b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/vo/NoticeVO.java index 49e23748..958ca6f5 100644 --- a/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/vo/NoticeVO.java +++ b/blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/vo/NoticeVO.java @@ -1,6 +1,6 @@ package org.springblade.desk.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.desk.entity.Notice; @@ -14,7 +14,7 @@ @EqualsAndHashCode(callSuper = true) public class NoticeVO extends Notice { - @ApiModelProperty(value = "通知类型名") + @Schema(description = "通知类型名") private String categoryName; } diff --git a/blade-service-api/blade-dict-api/pom.xml b/blade-service-api/blade-dict-api/pom.xml index 50e5a9fa..31d0a38b 100644 --- a/blade-service-api/blade-dict-api/pom.xml +++ b/blade-service-api/blade-dict-api/pom.xml @@ -5,13 +5,12 @@ blade-service-api org.springblade - 2.8.0 + ${revision} 4.0.0 blade-dict-api ${project.artifactId} - ${blade.project.version} jar diff --git a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/dto/DictDTO.java b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/dto/DictDTO.java index cc09a0d3..ad023065 100644 --- a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/dto/DictDTO.java +++ b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/dto/DictDTO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ import lombok.EqualsAndHashCode; import org.springblade.system.entity.Dict; +import java.io.Serial; + /** * 数据传输对象实体类 * @@ -28,6 +30,7 @@ @Data @EqualsAndHashCode(callSuper = true) public class DictDTO extends Dict { + @Serial private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/entity/Dict.java b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/entity/Dict.java index ea05ce27..1ca169c0 100644 --- a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/entity/Dict.java +++ b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/entity/Dict.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -35,15 +35,16 @@ */ @Data @TableName("blade_dict") -@ApiModel(value = "Dict对象", description = "Dict对象") +@Schema(description = "Dict对象") public class Dict implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -51,45 +52,45 @@ public class Dict implements Serializable { /** * 父主键 */ - @ApiModelProperty(value = "父主键") + @Schema(description = "父主键") @JsonSerialize(using = ToStringSerializer.class) private Long parentId; /** * 字典码 */ - @ApiModelProperty(value = "字典码") + @Schema(description = "字典码") private String code; /** * 字典值 */ - @ApiModelProperty(value = "字典值") + @Schema(description = "字典值") private Integer dictKey; /** * 字典名称 */ - @ApiModelProperty(value = "字典名称") + @Schema(description = "字典名称") private String dictValue; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private Integer sort; /** * 字典备注 */ - @ApiModelProperty(value = "字典备注") + @Schema(description = "字典备注") private String remark; /** * 是否已删除 */ @TableLogic - @ApiModelProperty(value = "是否已删除") + @Schema(description = "是否已删除") private Integer isDeleted; diff --git a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClient.java b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClient.java index 9aeabeeb..ade68aa4 100644 --- a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClient.java +++ b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClientFallback.java b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClientFallback.java index 82f671de..b5483123 100644 --- a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClientFallback.java +++ b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/feign/IDictClientFallback.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/vo/DictVO.java b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/vo/DictVO.java index 739d87e3..a7e2e9f9 100644 --- a/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/vo/DictVO.java +++ b/blade-service-api/blade-dict-api/src/main/java/org/springblade/system/vo/DictVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tool.node.INode; import org.springblade.system.entity.Dict; +import java.io.Serial; import java.util.ArrayList; import java.util.List; @@ -35,8 +36,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "DictVO对象", description = "DictVO对象") -public class DictVO extends Dict implements INode { +@Schema(description = "DictVO对象") +public class DictVO extends Dict implements INode { + @Serial private static final long serialVersionUID = 1L; /** * 主键ID @@ -54,10 +56,10 @@ public class DictVO extends Dict implements INode { * 子孙节点 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; + private List children; @Override - public List getChildren() { + public List getChildren() { if (this.children == null) { this.children = new ArrayList<>(); } 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 00000000..3eef2c73 --- /dev/null +++ b/blade-service-api/blade-scope-api/pom.xml @@ -0,0 +1,27 @@ + + + + blade-service-api + org.springblade + ${revision} + + 4.0.0 + + blade-scope-api + ${project.artifactId} + jar + + + + org.springblade + blade-core-secure + + + org.springblade + blade-starter-datascope + + + + 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 00000000..456423a5 --- /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-2099, Chill Zhuang 庄骞 (bladejava@qq.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 00000000..0b8df115 --- /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-2099, Chill Zhuang 庄骞 (bladejava@qq.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(proxyBeanMethods = false) +@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 00000000..fef9adde --- /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-2099, Chill Zhuang 庄骞 (bladejava@qq.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 00000000..68a14abe --- /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-2099, Chill Zhuang 庄骞 (bladejava@qq.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 00000000..64857d98 --- /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-2099, Chill Zhuang 庄骞 (bladejava@qq.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 6cf8c1af..683da46f 100644 --- a/blade-service-api/blade-system-api/pom.xml +++ b/blade-service-api/blade-system-api/pom.xml @@ -5,13 +5,12 @@ blade-service-api org.springblade - 2.8.0 + ${revision} 4.0.0 blade-system-api ${project.artifactId} - ${blade.project.version} jar diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/DeptDTO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/DeptDTO.java index 70ca4285..ca73baff 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/DeptDTO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/DeptDTO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ import lombok.EqualsAndHashCode; import org.springblade.system.entity.Dept; +import java.io.Serial; + /** * 数据传输对象实体类 * @@ -27,6 +29,7 @@ @Data @EqualsAndHashCode(callSuper = true) public class DeptDTO extends Dept { + @Serial private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/MenuDTO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/MenuDTO.java index 80513cef..899ca500 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/MenuDTO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/MenuDTO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -26,6 +27,7 @@ */ @Data public class MenuDTO implements Serializable { + @Serial private static final long serialVersionUID = 1L; private String alias; private String path; diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/ParamDTO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/ParamDTO.java index c5b9631e..893cd192 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/ParamDTO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/ParamDTO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ import lombok.EqualsAndHashCode; import org.springblade.system.entity.Param; +import java.io.Serial; + /** * 数据传输对象实体类 * @@ -27,6 +29,7 @@ @Data @EqualsAndHashCode(callSuper = true) public class ParamDTO extends Param { + @Serial private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleDTO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleDTO.java index c1c8dc14..066d5aa1 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleDTO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleDTO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ import lombok.EqualsAndHashCode; import org.springblade.system.entity.Role; +import java.io.Serial; + /** * 数据传输对象实体类 * @@ -27,6 +29,7 @@ @Data @EqualsAndHashCode(callSuper = true) public class RoleDTO extends Role { + @Serial private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleMenuDTO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleMenuDTO.java index 2d7e8990..c37aec17 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleMenuDTO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/dto/RoleMenuDTO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ import lombok.EqualsAndHashCode; import org.springblade.system.entity.RoleMenu; +import java.io.Serial; + /** * 数据传输对象实体类 * @@ -27,6 +29,7 @@ @Data @EqualsAndHashCode(callSuper = true) public class RoleMenuDTO extends RoleMenu { + @Serial private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java index 0d2cee13..136d84ff 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,13 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import java.io.Serial; + /** * 实体类 * @@ -35,15 +36,16 @@ @Data @TableName("blade_client") @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "Client对象", description = "Client对象") +@Schema(description = "Client对象") public class AuthClient extends BaseEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键id */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -51,57 +53,57 @@ public class AuthClient extends BaseEntity { /** * 客户端id */ - @ApiModelProperty(value = "客户端id") + @Schema(description = "客户端id") private String clientId; /** * 客户端密钥 */ - @ApiModelProperty(value = "客户端密钥") + @Schema(description = "客户端密钥") private String clientSecret; /** * 资源集合 */ - @ApiModelProperty(value = "资源集合") + @Schema(description = "资源集合") private String resourceIds; /** * 授权范围 */ - @ApiModelProperty(value = "授权范围") + @Schema(description = "授权范围") private String scope; /** * 授权类型 */ - @ApiModelProperty(value = "授权类型") + @Schema(description = "授权类型") private String authorizedGrantTypes; /** * 回调地址 */ - @ApiModelProperty(value = "回调地址") + @Schema(description = "回调地址") private String webServerRedirectUri; /** * 权限 */ - @ApiModelProperty(value = "权限") + @Schema(description = "权限") private String authorities; /** * 令牌过期秒数 */ - @ApiModelProperty(value = "令牌过期秒数") + @Schema(description = "令牌过期秒数") private Integer accessTokenValidity; /** * 刷新令牌过期秒数 */ - @ApiModelProperty(value = "刷新令牌过期秒数") + @Schema(description = "刷新令牌过期秒数") private Integer refreshTokenValidity; /** * 附加说明 */ - @ApiModelProperty(value = "附加说明") + @Schema(description = "附加说明") private String additionalInformation; /** * 自动授权 */ - @ApiModelProperty(value = "自动授权") + @Schema(description = "自动授权") private String autoapprove; 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 00000000..b08d8930 --- /dev/null +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.io.Serial; + +/** + * 实体类 + * + * @author BladeX + */ +@Data +@TableName("blade_scope_data") +@EqualsAndHashCode(callSuper = true) +@Schema(description = "DataScope对象") +public class DataScope extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @Schema(description = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** + * 菜单主键 + */ + @Schema(description = "菜单主键") + private Long menuId; + /** + * 资源编号 + */ + @Schema(description = "资源编号") + private String resourceCode; + /** + * 数据权限名称 + */ + @Schema(description = "数据权限名称") + private String scopeName; + /** + * 数据权限可见字段 + */ + @Schema(description = "数据权限可见字段") + private String scopeField; + /** + * 数据权限类名 + */ + @Schema(description = "数据权限类名") + private String scopeClass; + /** + * 数据权限字段 + */ + @Schema(description = "数据权限字段") + private String scopeColumn; + /** + * 数据权限类型 + */ + @Schema(description = "数据权限类型") + private Integer scopeType; + /** + * 数据权限值域 + */ + @Schema(description = "数据权限值域") + private String scopeValue; + /** + * 数据权限备注 + */ + @Schema(description = "数据权限备注") + 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 9350877f..48c1040b 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -34,15 +34,16 @@ */ @Data @TableName("blade_dept") -@ApiModel(value = "Dept对象", description = "Dept对象") +@Schema(description = "Dept对象") public class Dept implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,45 +51,51 @@ public class Dept implements Serializable { /** * 租户ID */ - @ApiModelProperty(value = "租户ID") + @Schema(description = "租户ID") private String tenantId; /** * 父主键 */ - @ApiModelProperty(value = "父主键") + @Schema(description = "父主键") @JsonSerialize(using = ToStringSerializer.class) private Long parentId; + /** + * 祖级机构主键 + */ + @Schema(description = "祖级机构主键") + private String ancestors; + /** * 部门名 */ - @ApiModelProperty(value = "部门名") + @Schema(description = "部门名") private String deptName; /** * 部门全称 */ - @ApiModelProperty(value = "部门全称") + @Schema(description = "部门全称") private String fullName; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private Integer sort; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; /** * 是否已删除 */ @TableLogic - @ApiModelProperty(value = "是否已删除") + @Schema(description = "是否已删除") private Integer isDeleted; diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Menu.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Menu.java index f0448976..ec61d889 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Menu.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Menu.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,13 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springblade.core.tool.utils.Func; +import java.io.Serial; import java.io.Serializable; +import java.util.Objects; /** * 实体类 @@ -35,15 +36,16 @@ */ @Data @TableName("blade_menu") -@ApiModel(value = "Menu对象", description = "Menu对象") +@Schema(description = "Menu对象") public class Menu implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -51,75 +53,75 @@ public class Menu implements Serializable { /** * 菜单父主键 */ - @ApiModelProperty(value = "父主键") + @Schema(description = "父主键") @JsonSerialize(using = ToStringSerializer.class) private Long parentId; /** * 菜单编号 */ - @ApiModelProperty(value = "菜单编号") + @Schema(description = "菜单编号") private String code; /** * 菜单名称 */ - @ApiModelProperty(value = "菜单名称") + @Schema(description = "菜单名称") private String name; /** * 菜单别名 */ - @ApiModelProperty(value = "菜单别名") + @Schema(description = "菜单别名") private String alias; /** * 请求地址 */ - @ApiModelProperty(value = "请求地址") + @Schema(description = "请求地址") private String path; /** * 菜单资源 */ - @ApiModelProperty(value = "菜单资源") + @Schema(description = "菜单资源") private String source; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private Integer sort; /** * 菜单类型 */ - @ApiModelProperty(value = "菜单类型") + @Schema(description = "菜单类型") private Integer category; /** * 操作按钮类型 */ - @ApiModelProperty(value = "操作按钮类型") + @Schema(description = "操作按钮类型") private Integer action; /** * 是否打开新页面 */ - @ApiModelProperty(value = "是否打开新页面") + @Schema(description = "是否打开新页面") private Integer isOpen; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; /** * 是否已删除 */ @TableLogic - @ApiModelProperty(value = "是否已删除") + @Schema(description = "是否已删除") private Integer isDeleted; @@ -132,10 +134,12 @@ public boolean equals(Object obj) { return false; } Menu other = (Menu) obj; - if (Func.equals(this.getId(), other.getId())) { - return true; - } - return false; + return Func.equals(this.getId(), other.getId()); + } + + @Override + public int hashCode() { + return Objects.hash(id, parentId, code); } } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Param.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Param.java index 18cd575d..59df84f1 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Param.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Param.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,13 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import java.io.Serial; + /** * 实体类 * @@ -34,15 +35,16 @@ @Data @TableName("blade_param") @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "Param对象", description = "Param对象") +@Schema(description = "Param对象") public class Param extends BaseEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键id */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,25 +52,25 @@ public class Param extends BaseEntity { /** * 参数名 */ - @ApiModelProperty(value = "参数名") + @Schema(description = "参数名") private String paramName; /** * 参数键 */ - @ApiModelProperty(value = "参数键") + @Schema(description = "参数键") private String paramKey; /** * 参数值 */ - @ApiModelProperty(value = "参数值") + @Schema(description = "参数值") private String paramValue; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Post.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Post.java index 782dd94f..66dc2548 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Post.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Post.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,13 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.TenantEntity; +import java.io.Serial; + /** * 岗位表实体类 * @@ -34,15 +35,16 @@ @Data @TableName("blade_post") @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "Post对象", description = "岗位表") +@Schema(description = "Post对象") public class Post extends TenantEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键id */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,27 +52,27 @@ public class Post extends TenantEntity { /** * 类型 */ - @ApiModelProperty(value = "类型") + @Schema(description = "类型") private Integer category; /** * 岗位编号 */ - @ApiModelProperty(value = "岗位编号") + @Schema(description = "岗位编号") private String postCode; /** * 岗位名称 */ - @ApiModelProperty(value = "岗位名称") + @Schema(description = "岗位名称") private String postName; /** * 岗位排序 */ - @ApiModelProperty(value = "岗位排序") + @Schema(description = "岗位排序") private Integer sort; /** * 岗位描述 */ - @ApiModelProperty(value = "岗位描述") + @Schema(description = "岗位描述") private String remark; diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Region.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Region.java index 2447890e..7e1e49b6 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Region.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Region.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,10 +18,10 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -31,96 +31,97 @@ */ @Data @TableName("blade_region") -@ApiModel(value = "Region对象", description = "行政区划表") +@Schema(description = "Region对象") public class Region implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 区划编号 */ @TableId(value = "code", type = IdType.INPUT) - @ApiModelProperty(value = "区划编号") + @Schema(description = "区划编号") private String code; /** * 父区划编号 */ - @ApiModelProperty(value = "父区划编号") + @Schema(description = "父区划编号") private String parentCode; /** * 祖区划编号 */ - @ApiModelProperty(value = "祖区划编号") + @Schema(description = "祖区划编号") private String ancestors; /** * 区划名称 */ - @ApiModelProperty(value = "区划名称") + @Schema(description = "区划名称") private String name; /** * 省级区划编号 */ - @ApiModelProperty(value = "省级区划编号") + @Schema(description = "省级区划编号") private String provinceCode; /** * 省级名称 */ - @ApiModelProperty(value = "省级名称") + @Schema(description = "省级名称") private String provinceName; /** * 市级区划编号 */ - @ApiModelProperty(value = "市级区划编号") + @Schema(description = "市级区划编号") private String cityCode; /** * 市级名称 */ - @ApiModelProperty(value = "市级名称") + @Schema(description = "市级名称") private String cityName; /** * 区级区划编号 */ - @ApiModelProperty(value = "区级区划编号") + @Schema(description = "区级区划编号") private String districtCode; /** * 区级名称 */ - @ApiModelProperty(value = "区级名称") + @Schema(description = "区级名称") private String districtName; /** * 镇级区划编号 */ - @ApiModelProperty(value = "镇级区划编号") + @Schema(description = "镇级区划编号") private String townCode; /** * 镇级名称 */ - @ApiModelProperty(value = "镇级名称") + @Schema(description = "镇级名称") private String townName; /** * 村级区划编号 */ - @ApiModelProperty(value = "村级区划编号") + @Schema(description = "村级区划编号") private String villageCode; /** * 村级名称 */ - @ApiModelProperty(value = "村级名称") + @Schema(description = "村级名称") private String villageName; /** * 层级 */ - @ApiModelProperty(value = "层级") + @Schema(description = "层级") private Integer level; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private Integer sort; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Role.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Role.java index d83cd7d5..642e45aa 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Role.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Role.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,10 +21,10 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -34,15 +34,16 @@ */ @Data @TableName("blade_role") -@ApiModel(value = "Role对象", description = "Role对象") +@Schema(description = "Role对象") public class Role implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,39 +51,39 @@ public class Role implements Serializable { /** * 租户ID */ - @ApiModelProperty(value = "租户ID") + @Schema(description = "租户ID") private String tenantId; /** * 父主键 */ - @ApiModelProperty(value = "父主键") + @Schema(description = "父主键") @JsonSerialize(using = ToStringSerializer.class) private Long parentId; /** * 角色名 */ - @ApiModelProperty(value = "角色名") + @Schema(description = "角色名") private String roleName; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private Integer sort; /** * 角色别名 */ - @ApiModelProperty(value = "角色别名") + @Schema(description = "角色别名") private String roleAlias; /** * 是否已删除 */ @TableLogic - @ApiModelProperty(value = "是否已删除") + @Schema(description = "是否已删除") private Integer isDeleted; diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleMenu.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleMenu.java index 66d9eaea..e7470cc2 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleMenu.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleMenu.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,10 +20,10 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -33,15 +33,16 @@ */ @Data @TableName("blade_role_menu") -@ApiModel(value = "RoleMenu对象", description = "RoleMenu对象") +@Schema(description = "RoleMenu对象") public class RoleMenu implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -49,14 +50,14 @@ public class RoleMenu implements Serializable { /** * 菜单id */ - @ApiModelProperty(value = "菜单id") + @Schema(description = "菜单id") @JsonSerialize(using = ToStringSerializer.class) private Long menuId; /** * 角色id */ - @ApiModelProperty(value = "角色id") + @Schema(description = "角色id") @JsonSerialize(using = ToStringSerializer.class) private Long roleId; 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 00000000..50af1a54 --- /dev/null +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/RoleScope.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 实体类 + * + * @author Chill + */ +@Data +@TableName("blade_role_scope") +@Schema(description = "RoleScope对象") +public class RoleScope implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @JsonSerialize(using = ToStringSerializer.class) + @Schema(description = "主键") + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** + * 权限id + */ + @JsonSerialize(using = ToStringSerializer.class) + @Schema(description = "权限id") + private Long scopeId; + + /** + * 角色id + */ + @JsonSerialize(using = ToStringSerializer.class) + @Schema(description = "角色id") + private Long roleId; + + +} diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java index a9b6915b..6272bb55 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/Tenant.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,13 @@ 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 io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; +import java.io.Serial; + /** * 实体类 * @@ -34,15 +35,16 @@ @Data @TableName("blade_tenant") @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "Tenant对象", description = "Tenant对象") +@Schema(description = "Tenant对象") public class Tenant extends BaseEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键id */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; @@ -50,32 +52,32 @@ public class Tenant extends BaseEntity { /** * 租户ID */ - @ApiModelProperty(value = "租户ID") + @Schema(description = "租户ID") private String tenantId; /** * 租户名称 */ - @ApiModelProperty(value = "租户名称") + @Schema(description = "租户名称") private String tenantName; /** * 域名地址 */ - @ApiModelProperty(value = "域名地址") + @Schema(description = "域名地址") private String domain; /** * 联系人 */ - @ApiModelProperty(value = "联系人") + @Schema(description = "联系人") private String linkman; /** * 联系电话 */ - @ApiModelProperty(value = "联系电话") + @Schema(description = "联系电话") private String contactNumber; /** * 联系地址 */ - @ApiModelProperty(value = "联系地址") + @Schema(description = "联系地址") private String address; diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java index 302b5f25..1bd27dac 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java index f4578ab1..83958bab 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-gateway/src/main/java/org/springblade/gateway/props/RouteResource.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/CheckedTreeVO.java similarity index 60% rename from blade-gateway/src/main/java/org/springblade/gateway/props/RouteResource.java rename to blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/CheckedTreeVO.java index a279a400..23a074ed 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/props/RouteResource.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/CheckedTreeVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,32 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.gateway.props; +package org.springblade.system.vo; import lombok.Data; -import org.springblade.core.launch.constant.AppConstant; + +import java.util.List; /** - * Swagger聚合文档属性 + * CheckedTreeVO * * @author Chill */ @Data -public class RouteResource { - - /** - * 文档名 - */ - private String name; +public class CheckedTreeVO { - /** - * 文档所在服务地址 - */ - private String location; + private List menu; - /** - * 文档版本 - */ - private String version = AppConstant.APPLICATION_VERSION; + 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 00000000..f6b1b6ea --- /dev/null +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/DataScopeVO.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.system.entity.DataScope; + +import java.io.Serial; + +/** + * 视图实体类 + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Schema(description = "DataScopeVO对象") +public class DataScopeVO extends DataScope { + @Serial + 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/DeptVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/DeptVO.java index 80bcb39b..511d1900 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/DeptVO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/DeptVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tool.node.INode; import org.springblade.system.entity.Dept; +import java.io.Serial; import java.util.ArrayList; import java.util.List; @@ -34,8 +35,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "DeptVO对象", description = "DeptVO对象") -public class DeptVO extends Dept implements INode { +@Schema(description = "DeptVO对象") +public class DeptVO extends Dept implements INode { + @Serial private static final long serialVersionUID = 1L; /** @@ -54,10 +56,10 @@ public class DeptVO extends Dept implements INode { * 子孙节点 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; + private List children; @Override - public List getChildren() { + public List getChildren() { if (this.children == null) { this.children = new ArrayList<>(); } diff --git a/blade-gateway/src/main/java/org/springblade/gateway/props/RouteProperties.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantTreeVO.java similarity index 58% rename from blade-gateway/src/main/java/org/springblade/gateway/props/RouteProperties.java rename to blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantTreeVO.java index 9b7aa5d6..6a19c5fa 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/props/RouteProperties.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/GrantTreeVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,25 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.gateway.props; +package org.springblade.system.vo; import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import java.util.ArrayList; +import java.io.Serial; +import java.io.Serializable; import java.util.List; /** - * 路由配置类 + * GrantTreeVO * * @author Chill */ @Data -@RefreshScope -@ConfigurationProperties("blade.document") -public class RouteProperties { +public class GrantTreeVO implements Serializable { + @Serial + private static final long serialVersionUID = 1L; - private final List resources = new ArrayList<>(); + 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 79797f13..a781e797 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,10 @@ */ package org.springblade.system.vo; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; import java.util.List; @@ -28,12 +29,16 @@ */ @Data public class GrantVO implements Serializable { + @Serial private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "roleIds集合") + @Schema(description = "roleIds集合") private List roleIds; - @ApiModelProperty(value = "menuIds集合") + @Schema(description = "menuIds集合") private List menuIds; + @Schema(description = "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 b27071f0..b90d4925 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tool.node.INode; import org.springblade.system.entity.Menu; +import java.io.Serial; import java.util.ArrayList; import java.util.List; @@ -34,8 +35,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "MenuVO对象", description = "MenuVO对象") -public class MenuVO extends Menu implements INode { +@Schema(description = "MenuVO对象") +public class MenuVO extends Menu implements INode { + @Serial private static final long serialVersionUID = 1L; /** @@ -54,10 +56,16 @@ public class MenuVO extends Menu implements INode { * 子孙节点 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; + private List children; + + /** + * 是否有子孙节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Boolean hasChildren; @Override - public List getChildren() { + public List getChildren() { if (this.children == null) { this.children = new ArrayList<>(); } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/ParamVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/ParamVO.java index b8c063e5..a00bee5e 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/ParamVO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/ParamVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,13 @@ */ package org.springblade.system.vo; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.system.entity.Param; +import java.io.Serial; + /** * 视图实体类 * @@ -27,8 +29,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "ParamVO对象", description = "ParamVO对象") +@Schema(description = "ParamVO对象") public class ParamVO extends Param { + @Serial private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/PostVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/PostVO.java index dff4c498..55bcff67 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/PostVO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/PostVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,13 @@ */ package org.springblade.system.vo; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.system.entity.Post; +import java.io.Serial; + /** * 岗位表视图实体类 * @@ -27,8 +29,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "PostVO对象", description = "岗位表") +@Schema(description = "PostVO对象") public class PostVO extends Post { + @Serial private static final long serialVersionUID = 1L; /** diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RegionVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RegionVO.java index 9ff9259b..4ebcdba3 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RegionVO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RegionVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tool.node.INode; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.Region; +import java.io.Serial; import java.util.ArrayList; import java.util.List; @@ -35,8 +36,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "RegionVO对象", description = "行政区划表") -public class RegionVO extends Region implements INode { +@Schema(description = "RegionVO对象") +public class RegionVO extends Region implements INode { + @Serial private static final long serialVersionUID = 1L; /** @@ -66,7 +68,7 @@ public class RegionVO extends Region implements INode { * 子孙节点 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; + private List children; @Override public Long getId() { @@ -79,7 +81,7 @@ public Long getParentId() { } @Override - public List getChildren() { + public List getChildren() { if (this.children == null) { this.children = new ArrayList<>(); } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleMenuVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleMenuVO.java index d8099a10..e736500a 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleMenuVO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleMenuVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,13 @@ */ package org.springblade.system.vo; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.system.entity.RoleMenu; +import java.io.Serial; + /** * 视图实体类 * @@ -27,8 +29,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "RoleMenuVO对象", description = "RoleMenuVO对象") +@Schema(description = "RoleMenuVO对象") public class RoleMenuVO extends RoleMenu { + @Serial private static final long serialVersionUID = 1L; } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleVO.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleVO.java index 53f7bec4..e5e9a073 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleVO.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/vo/RoleVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.tool.node.INode; import org.springblade.system.entity.Role; +import java.io.Serial; import java.util.ArrayList; import java.util.List; @@ -34,8 +35,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "RoleVO对象", description = "RoleVO对象") -public class RoleVO extends Role implements INode { +@Schema(description = "RoleVO对象") +public class RoleVO extends Role implements INode { + @Serial private static final long serialVersionUID = 1L; /** @@ -54,10 +56,10 @@ public class RoleVO extends Role implements INode { * 子孙节点 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; + private List children; @Override - public List getChildren() { + public List getChildren() { if (this.children == null) { this.children = new ArrayList<>(); } diff --git a/blade-service-api/blade-user-api/pom.xml b/blade-service-api/blade-user-api/pom.xml index 1a02abc0..5a6c5f8e 100644 --- a/blade-service-api/blade-user-api/pom.xml +++ b/blade-service-api/blade-user-api/pom.xml @@ -5,13 +5,12 @@ blade-service-api org.springblade - 2.8.0 + ${revision} 4.0.0 blade-user-api ${project.artifactId} - ${blade.project.version} jar diff --git a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/User.java b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/User.java index a38d1b24..e68756cf 100644 --- a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/User.java +++ b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/User.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,12 @@ 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.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.TenantEntity; +import java.io.Serial; import java.util.Date; /** @@ -37,12 +38,13 @@ @EqualsAndHashCode(callSuper = true) public class User extends TenantEntity { + @Serial private static final long serialVersionUID = 1L; /** * 主键id */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; diff --git a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserInfo.java b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserInfo.java index bb171c6e..5290b21a 100644 --- a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserInfo.java +++ b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserInfo.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,10 @@ */ package org.springblade.system.user.entity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; import java.util.List; @@ -28,33 +28,34 @@ * @author Chill */ @Data -@ApiModel(description = "用户信息") +@Schema(description = "用户信息") public class UserInfo implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** * 用户基础信息 */ - @ApiModelProperty(value = "用户") + @Schema(description = "用户") private User user; /** * 权限标识集合 */ - @ApiModelProperty(value = "权限集合") + @Schema(description = "权限集合") private List permissions; /** * 角色集合 */ - @ApiModelProperty(value = "角色集合") + @Schema(description = "角色集合") private List roles; /** * 第三方授权id */ - @ApiModelProperty(value = "第三方授权id") + @Schema(description = "第三方授权id") private String oauthId; } diff --git a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserOauth.java b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserOauth.java index e6c45fd0..81dfbbda 100644 --- a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserOauth.java +++ b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserOauth.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,10 @@ 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.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serial; import java.io.Serializable; /** @@ -34,6 +35,7 @@ @TableName("blade_user_oauth") public class UserOauth implements Serializable { + @Serial private static final long serialVersionUID = 1L; @@ -41,7 +43,7 @@ public class UserOauth implements Serializable { * 主键 */ @JsonSerialize(using = ToStringSerializer.class) - @ApiModelProperty(value = "主键") + @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) private Long id; @@ -59,7 +61,7 @@ public class UserOauth implements Serializable { * 用户ID */ @JsonSerialize(using = ToStringSerializer.class) - @ApiModelProperty(value = "用户主键") + @Schema(description = "用户主键") private Long userId; /** diff --git a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClient.java b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClient.java index d23693a2..f85e1ed1 100644 --- a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClient.java +++ b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ * @author Chill */ @FeignClient( - value = AppConstant.APPLICATION_USER_NAME, + value = AppConstant.APPLICATION_SYSTEM_NAME, fallback = IUserClientFallback.class ) public interface IUserClient { diff --git a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClientFallback.java b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClientFallback.java index 25a28517..61ea8d97 100644 --- a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClientFallback.java +++ b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/feign/IUserClientFallback.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java index 0f4f7673..92fb693b 100644 --- a/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java +++ b/blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,13 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import io.swagger.annotations.ApiModel; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springblade.system.user.entity.User; +import java.io.Serial; + /** * 视图实体类 * @@ -29,8 +31,9 @@ */ @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "UserVO对象", description = "UserVO对象") +@Schema(description = "UserVO对象") public class UserVO extends User { + @Serial private static final long serialVersionUID = 1L; /** diff --git a/blade-service-api/pom.xml b/blade-service-api/pom.xml index 887d7423..b8d623a2 100644 --- a/blade-service-api/pom.xml +++ b/blade-service-api/pom.xml @@ -5,13 +5,12 @@ SpringBlade org.springblade - 2.8.0 + ${revision} 4.0.0 blade-service-api ${project.artifactId} - 2.8.0 pom SpringBlade 微服务API集合 @@ -20,39 +19,22 @@ blade-dict-api blade-system-api blade-user-api + blade-scope-api blade-demo-api org.springblade - blade-core-mybatis - ${blade.tool.version} + blade-starter-mybatis org.springframework.cloud spring-cloud-starter-openfeign - - io.springfox - springfox-swagger2 - ${swagger.version} - - - io.swagger - swagger-models - - - - - io.swagger - swagger-models - ${swagger.models.version} - net.dreamlu mica-auto - ${mica.auto.version} provided diff --git a/blade-service/blade-demo/pom.xml b/blade-service/blade-demo/pom.xml index 5b0e44cf..d1a2cb1b 100644 --- a/blade-service/blade-demo/pom.xml +++ b/blade-service/blade-demo/pom.xml @@ -5,35 +5,30 @@ blade-service org.springblade - 2.8.0 + ${revision} 4.0.0 blade-demo ${project.artifactId} - ${blade.project.version} jar org.springblade blade-core-boot - ${blade.tool.version} org.springblade - blade-core-swagger - ${blade.tool.version} + blade-starter-swagger org.springblade blade-demo-api - ${blade.project.version} com.baomidou - dynamic-datasource-spring-boot-starter - 2.5.6 + dynamic-datasource-spring-boot3-starter diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/DemoApplication.java b/blade-service/blade-demo/src/main/java/com/example/demo/DemoApplication.java index c8e7acd0..4d7cae4b 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/DemoApplication.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/DemoApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,15 +15,15 @@ */ package com.example.demo; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; -import org.springframework.cloud.client.SpringCloudApplication; /** * Demo启动器 * * @author Chill */ -@SpringCloudApplication +@BladeCloudApplication public class DemoApplication { public static void main(String[] args) { diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/config/DemoConfiguration.java b/blade-service/blade-demo/src/main/java/com/example/demo/config/DemoConfiguration.java index 16295150..d54045c1 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/config/DemoConfiguration.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/config/DemoConfiguration.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ * * @author Chill */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableFeignClients({"org.springblade", "com.example"}) @MapperScan({"org.springblade.**.mapper.**", "com.example.**.mapper.**"}) @EnableConfigurationProperties(DemoProperties.class) diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java index 62106fe7..4e0eeeb4 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ package com.example.demo.controller; import com.example.demo.props.DemoProperties; -import io.swagger.annotations.Api; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.web.bind.annotation.GetMapping; @@ -31,10 +31,10 @@ @RefreshScope @RestController @RequestMapping("demo") -@Api(value = "配置接口", tags = "即时刷新配置") +@Tag(name = "配置接口", description = "即时刷新配置") public class DemoController { - @Value("${demo.name}") + @Value("${demo.name:1}") private String name; private final DemoProperties properties; diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DynamicController.java b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DynamicController.java index 6ba52cdd..8375cc19 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DynamicController.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DynamicController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import com.example.demo.entity.Notice; import com.example.demo.service.IDynamicService; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.GetMapping; @@ -36,7 +36,7 @@ @RestController @AllArgsConstructor @RequestMapping("dynamic") -@Api(value = "多数据源接口", tags = "多数据源") +@Tag(name = "多数据源接口", description = "多数据源") public class DynamicController { private IDynamicService dynamicService; @@ -46,7 +46,7 @@ public class DynamicController { */ @GetMapping("/master-list") @ApiOperationSupport(order = 1) - @ApiOperation(value = "master列表", notes = "master列表") + @Operation(summary = "master列表", description = "master列表") public R> masterList() { List list = dynamicService.masterList(); return R.data(list); @@ -57,7 +57,7 @@ public R> masterList() { */ @GetMapping("/slave-list") @ApiOperationSupport(order = 1) - @ApiOperation(value = "slave列表", notes = "slave列表") + @Operation(summary = "slave列表", description = "slave列表") public R> slaveList() { List list = dynamicService.slaveList(); return R.data(list); diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java b/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java index 3736d7b4..02f919e6 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/controller/NoticeController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,12 @@ import com.example.demo.entity.Notice; import com.example.demo.service.INoticeService; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import org.springblade.common.cache.CacheNames; import org.springblade.core.boot.ctrl.BladeController; @@ -28,7 +33,6 @@ import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; import java.util.Map; @@ -40,7 +44,7 @@ @RestController @RequestMapping("notice") @AllArgsConstructor -@Api(value = "用户博客", tags = "博客接口") +@Tag(name = "用户博客", description = "博客接口") public class NoticeController extends BladeController implements CacheNames { private INoticeService noticeService; @@ -50,7 +54,7 @@ public class NoticeController extends BladeController implements CacheNames { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入notice") + @Operation(summary = "详情", description = "传入notice") public R detail(Notice notice) { Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice)); return R.data(detail); @@ -60,13 +64,13 @@ public R detail(Notice notice) { * 分页 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), - @ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "category", description = "公告类型", in = ParameterIn.QUERY, schema = @Schema(type = "integer")), + @Parameter(name = "title", description = "公告标题", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入notice") - public R> list(@ApiIgnore @RequestParam Map notice, Query query) { + @Operation(summary = "分页", description = "传入notice") + public R> list(@Parameter(hidden = true) @RequestParam Map notice, Query query) { IPage pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class)); return R.data(pages); } @@ -76,7 +80,7 @@ public R> list(@ApiIgnore @RequestParam Map notice */ @PostMapping("/save") @ApiOperationSupport(order = 3) - @ApiOperation(value = "新增", notes = "传入notice") + @Operation(summary = "新增", description = "传入notice") public R save(@RequestBody Notice notice) { return R.status(noticeService.save(notice)); } @@ -86,7 +90,7 @@ public R save(@RequestBody Notice notice) { */ @PostMapping("/update") @ApiOperationSupport(order = 4) - @ApiOperation(value = "修改", notes = "传入notice") + @Operation(summary = "修改", description = "传入notice") public R update(@RequestBody Notice notice) { return R.status(noticeService.updateById(notice)); } @@ -96,7 +100,7 @@ public R update(@RequestBody Notice notice) { */ @PostMapping("/submit") @ApiOperationSupport(order = 5) - @ApiOperation(value = "新增或修改", notes = "传入notice") + @Operation(summary = "新增或修改", description = "传入notice") public R submit(@RequestBody Notice notice) { return R.status(noticeService.saveOrUpdate(notice)); } @@ -106,8 +110,8 @@ public R submit(@RequestBody Notice notice) { */ @PostMapping("/remove") @ApiOperationSupport(order = 6) - @ApiOperation(value = "逻辑删除", notes = "传入notice") - public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + @Operation(summary = "逻辑删除", description = "传入notice") + public R remove(@Parameter(description = "主键集合") @RequestParam String ids) { boolean temp = noticeService.deleteLogic(Func.toLongList(ids)); return R.status(temp); } diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/feign/NoticeClient.java b/blade-service/blade-demo/src/main/java/com/example/demo/feign/NoticeClient.java index b87b54fd..05e0f60e 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/feign/NoticeClient.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/feign/NoticeClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; +import io.swagger.v3.oas.annotations.Hidden; import java.util.List; @@ -30,7 +30,7 @@ * * @author Chill */ -@ApiIgnore() +@Hidden @RestController @AllArgsConstructor public class NoticeClient implements INoticeClient { diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/launcher/DemoLauncherServiceImpl.java b/blade-service/blade-demo/src/main/java/com/example/demo/launcher/DemoLauncherServiceImpl.java index c1f967d4..8f2b0ea3 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/launcher/DemoLauncherServiceImpl.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/launcher/DemoLauncherServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,8 @@ public void launcher(SpringApplicationBuilder builder, String appName, String pr PropsUtil.setProperty(props, "spring.cloud.nacos.config.ext-config[0].data-id", NacosConstant.dataId("blade-demo", profile)); PropsUtil.setProperty(props, "spring.cloud.nacos.config.ext-config[0].group", NacosConstant.NACOS_CONFIG_GROUP); PropsUtil.setProperty(props, "spring.cloud.nacos.config.ext-config[0].refresh", NacosConstant.NACOS_CONFIG_REFRESH); + // 开启多数据源 + PropsUtil.setProperty(props, "spring.datasource.dynamic.enabled", "true"); // 自定义命名空间 // PropsUtil.setProperty(props, "spring.cloud.nacos.config.namespace", LauncherConstant.NACOS_NAMESPACE); // PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.namespace", LauncherConstant.NACOS_NAMESPACE); diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/mapper/NoticeMapper.java b/blade-service/blade-demo/src/main/java/com/example/demo/mapper/NoticeMapper.java index a69dbd8d..3f45a87c 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/mapper/NoticeMapper.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/mapper/NoticeMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/service/IDynamicService.java b/blade-service/blade-demo/src/main/java/com/example/demo/service/IDynamicService.java index 5eb5a141..4f8a3542 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/service/IDynamicService.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/service/IDynamicService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/service/INoticeService.java b/blade-service/blade-demo/src/main/java/com/example/demo/service/INoticeService.java index 1bf17fd5..a423a44f 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/service/INoticeService.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/service/INoticeService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/service/impl/NoticeServiceImpl.java b/blade-service/blade-demo/src/main/java/com/example/demo/service/impl/NoticeServiceImpl.java index d31519c1..2e1b4696 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/service/impl/NoticeServiceImpl.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/service/impl/NoticeServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-demo/src/main/resources/application-dev.yml b/blade-service/blade-demo/src/main/resources/application-dev.yml index 38426fa1..600cbdcc 100644 --- a/blade-service/blade-demo/src/main/resources/application-dev.yml +++ b/blade-service/blade-demo/src/main/resources/application-dev.yml @@ -12,7 +12,7 @@ server: spring: #排除DruidDataSourceAutoConfigure autoconfigure: - exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure + exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure datasource: dynamic: #设置默认的数据源或者数据源组,默认值即为master diff --git a/blade-service/blade-demo/src/main/resources/application-prod.yml b/blade-service/blade-demo/src/main/resources/application-prod.yml index da892629..053bf056 100644 --- a/blade-service/blade-demo/src/main/resources/application-prod.yml +++ b/blade-service/blade-demo/src/main/resources/application-prod.yml @@ -12,7 +12,7 @@ server: spring: #排除DruidDataSourceAutoConfigure autoconfigure: - exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure + exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure datasource: dynamic: #设置默认的数据源或者数据源组,默认值即为master diff --git a/blade-service/blade-demo/src/main/resources/application-test.yml b/blade-service/blade-demo/src/main/resources/application-test.yml index 4b4e157a..42ce581e 100644 --- a/blade-service/blade-demo/src/main/resources/application-test.yml +++ b/blade-service/blade-demo/src/main/resources/application-test.yml @@ -12,7 +12,7 @@ server: spring: #排除DruidDataSourceAutoConfigure autoconfigure: - exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure + exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure datasource: dynamic: #设置默认的数据源或者数据源组,默认值即为master diff --git a/blade-service/blade-desk/Dockerfile b/blade-service/blade-desk/Dockerfile index 728663e8..a50a739e 100644 --- a/blade-service/blade-desk/Dockerfile +++ b/blade-service/blade-desk/Dockerfile @@ -1,6 +1,6 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/desk @@ -10,6 +10,6 @@ EXPOSE 8105 ADD ./target/blade-desk.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-service/blade-desk/pom.xml b/blade-service/blade-desk/pom.xml index e0240bdd..aaf44d55 100644 --- a/blade-service/blade-desk/pom.xml +++ b/blade-service/blade-desk/pom.xml @@ -6,41 +6,35 @@ org.springblade blade-service - 2.8.0 + ${revision} 4.0.0 blade-desk ${project.artifactId} - ${blade.project.version} jar org.springblade blade-core-boot - ${blade.tool.version} org.springblade - blade-core-swagger - ${blade.tool.version} + blade-starter-swagger org.springblade blade-desk-api - ${blade.project.version} org.springblade blade-dict-api - ${blade.project.version} org.springblade blade-core-test - ${blade.tool.version} test @@ -50,22 +44,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/DeskApplication.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/DeskApplication.java index 2728d1cf..41b031a2 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/DeskApplication.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/DeskApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,16 @@ */ package org.springblade.desk; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; /** * Desk启动器 * * @author Chill */ -@SpringCloudApplication -@EnableFeignClients(AppConstant.BASE_PACKAGES) +@BladeCloudApplication public class DeskApplication { public static void main(String[] args) { diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java index 6f5b4e49..988d8e9d 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java @@ -1,7 +1,7 @@ package org.springblade.desk.controller; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import org.springblade.core.tool.api.R; import org.springblade.core.tool.support.Kv; @@ -22,7 +22,7 @@ @RestController @RequestMapping("dashboard") @AllArgsConstructor -@Api(value = "首页", tags = "首页") +@Tag(name = "首页", description = "首页") public class DashBoardController { /** @@ -31,7 +31,7 @@ public class DashBoardController { * @return */ @GetMapping("/activities") - @ApiOperation(value = "活跃用户", notes = "活跃用户") + @Operation(summary = "活跃用户", description = "活跃用户") public R activities() { List> list = new ArrayList<>(); @@ -55,4 +55,124 @@ public R activities() { return R.data(list); } + + /** + * 获取消息 + * + * @return + */ + @GetMapping("/notices") + @Operation(summary = "消息", description = "消息") + public R notices() { + List> list = new ArrayList<>(); + Map map1 = new HashMap<>(16); + map1.put("logo", "https://spring.io/img/homepage/icon-spring-framework.svg"); + map1.put("title", "SpringBoot"); + map1.put("description", "现在的web项目几乎都会用到spring框架,而要使用spring难免需要配置大量的xml配置文件,而 springboot的出现解 决了这一问题,一个项目甚至不用部署到服务器上直接开跑,真像springboot所说:“just run”。"); + map1.put("member", "Chill"); + map1.put("href", "http://spring.io/projects/spring-boot"); + list.add(map1); + + Map map2 = new HashMap<>(16); + map2.put("logo", "https://spring.io/img/homepage/icon-spring-cloud.svg"); + map2.put("title", "SpringCloud"); + map2.put("description", "SpringCloud是基于SpringBoot的一整套实现微服务的框架。他提供了微服务开发所需的配置管理、服务发现、断路器、智能路由、微代理、控制总线、全局锁、决策竞选、分布式会话和集群状态管理等组件。"); + map2.put("member", "Chill"); + map2.put("href", "http://spring.io/projects/spring-cloud"); + list.add(map2); + + Map map3 = new HashMap<>(16); + map3.put("logo", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1546359961068&di=05ff9406e6675ca9a58a525a7e7950b9&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D575314515%2C4268715674%26fm%3D214%26gp%3D0.jpg"); + map3.put("title", "Mybatis"); + map3.put("description", "MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集。MyBatis 可以使用简单的 XML 或注解来配置和映射原生信息,将接口和 Java 的 POJOs(Plain Old Java Objects,普通的 Java对象)映射成数据库中的记录。"); + map3.put("member", "Chill"); + map3.put("href", "http://www.mybatis.org/mybatis-3/getting-started.html"); + list.add(map3); + + Map map4 = new HashMap<>(16); + map4.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png"); + map4.put("title", "React"); + map4.put("description", "React 起源于 Facebook 的内部项目,因为该公司对市场上所有 JavaScript MVC 框架,都不满意,就决定自己写一套,用来架设Instagram 的网站。做出来以后,发现这套东西很好用,就在2013年5月开源了。"); + map4.put("member", "Chill"); + map4.put("href", "https://reactjs.org/"); + list.add(map4); + + Map map5 = new HashMap<>(16); + map5.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png"); + map5.put("title", "Ant Design"); + map5.put("description", "蚂蚁金服体验技术部经过大量的项目实践和总结,沉淀出设计语言 Ant Design,这可不单纯只是设计原则、控件规范和视觉尺寸,还配套有前端代码实现方案。也就是说采用Ant Design后,UI设计和前端界面研发可同步完成,效率大大提升。"); + map5.put("member", "Chill"); + map5.put("href", "https://ant.design/docs/spec/introduce-cn"); + list.add(map5); + + Map map6 = new HashMap<>(16); + map6.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png"); + map6.put("title", "Ant Design Pro"); + map6.put("description", "Ant Design Pro 是一个企业级开箱即用的中后台前端/设计解决方案。符合阿里追求的'敏捷的前端+强大的中台'的思想。"); + map6.put("member", "Chill"); + map6.put("href", "https://pro.ant.design"); + list.add(map6); + + return R.data(list); + } + + /** + * 获取我的消息 + * + * @return + */ + @GetMapping("/my-notices") + @Operation(summary = "消息", description = "消息") + public R myNotices() { + List> list = new ArrayList<>(); + Map map1 = new HashMap<>(16); + map1.put("id", "000000001"); + map1.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"); + map1.put("title", "你收到了 14 份新周报"); + map1.put("datetime", "2018-08-09"); + map1.put("type", "notification"); + list.add(map1); + + Map map2 = new HashMap<>(16); + map2.put("id", "000000002"); + map2.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png"); + map2.put("title", "你推荐的 曲妮妮 已通过第三轮面试"); + map2.put("datetime", "2018-08-08"); + map2.put("type", "notification"); + list.add(map2); + + + Map map3 = new HashMap<>(16); + map3.put("id", "000000003"); + map3.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg"); + map3.put("title", "曲丽丽 评论了你"); + map3.put("description", "描述信息描述信息描述信息"); + map3.put("datetime", "2018-08-07"); + map3.put("type", "message"); + map3.put("clickClose", "true"); + list.add(map3); + + + Map map4 = new HashMap<>(16); + map4.put("id", "000000004"); + map4.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg"); + map4.put("title", "朱偏右 回复了你"); + map4.put("description", "这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像"); + map4.put("type", "message"); + map4.put("datetime", "2018-08-07"); + map4.put("clickClose", "true"); + list.add(map4); + + + Map map5 = new HashMap<>(16); + map5.put("id", "000000005"); + map5.put("title", "任务名称"); + map5.put("description", "任务需要在 2018-01-12 20:00 前启动"); + map5.put("extra", "未开始"); + map5.put("status", "todo"); + map5.put("type", "event"); + list.add(map5); + + return R.data(list); + } } diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java index cbdf267c..326d3d75 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import org.springblade.common.cache.CacheNames; import org.springblade.core.boot.ctrl.BladeController; @@ -30,11 +35,7 @@ import org.springblade.desk.vo.NoticeVO; import org.springblade.desk.wrapper.NoticeWrapper; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; import java.util.Map; /** @@ -46,7 +47,7 @@ @RestController @RequestMapping("notice") @AllArgsConstructor -@Api(value = "用户博客", tags = "博客接口") +@Tag(name = "用户博客", description = "博客接口") public class NoticeController extends BladeController implements CacheNames { private INoticeService noticeService; @@ -56,7 +57,7 @@ public class NoticeController extends BladeController implements CacheNames { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入notice") + @Operation(summary = "详情", description = "传入notice") public R detail(Notice notice) { Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice)); return R.data(NoticeWrapper.build().entityVO(detail)); @@ -66,13 +67,13 @@ public R detail(Notice notice) { * 分页 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), - @ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "category", description = "公告类型", in = ParameterIn.QUERY, schema = @Schema(type = "integer")), + @Parameter(name = "title", description = "公告标题", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入notice") - public R> list(@ApiIgnore @RequestParam Map notice, Query query) { + @Operation(summary = "分页", description = "传入notice") + public R> list(@Parameter(hidden = true) @RequestParam Map notice, Query query) { IPage pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class)); return R.data(NoticeWrapper.build().pageVO(pages)); } @@ -82,7 +83,7 @@ public R> list(@ApiIgnore @RequestParam Map noti */ @PostMapping("/save") @ApiOperationSupport(order = 3) - @ApiOperation(value = "新增", notes = "传入notice") + @Operation(summary = "新增", description = "传入notice") public R save(@RequestBody Notice notice) { return R.status(noticeService.save(notice)); } @@ -92,7 +93,7 @@ public R save(@RequestBody Notice notice) { */ @PostMapping("/update") @ApiOperationSupport(order = 4) - @ApiOperation(value = "修改", notes = "传入notice") + @Operation(summary = "修改", description = "传入notice") public R update(@RequestBody Notice notice) { return R.status(noticeService.updateById(notice)); } @@ -102,7 +103,7 @@ public R update(@RequestBody Notice notice) { */ @PostMapping("/submit") @ApiOperationSupport(order = 5) - @ApiOperation(value = "新增或修改", notes = "传入notice") + @Operation(summary = "新增或修改", description = "传入notice") public R submit(@RequestBody Notice notice) { return R.status(noticeService.saveOrUpdate(notice)); } @@ -112,131 +113,10 @@ public R submit(@RequestBody Notice notice) { */ @PostMapping("/remove") @ApiOperationSupport(order = 6) - @ApiOperation(value = "逻辑删除", notes = "传入notice") - public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + @Operation(summary = "逻辑删除", description = "传入notice") + public R remove(@Parameter(description = "主键集合") @RequestParam String ids) { boolean temp = noticeService.deleteLogic(Func.toLongList(ids)); return R.status(temp); } - /** - * 获取消息 - * - * @return - */ - @GetMapping("/notices") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "消息", notes = "消息") - public R notices() { - List> list = new ArrayList<>(); - Map map1 = new HashMap<>(16); - map1.put("logo", "https://spring.io/img/homepage/icon-spring-framework.svg"); - map1.put("title", "SpringBoot"); - map1.put("description", "现在的web项目几乎都会用到spring框架,而要使用spring难免需要配置大量的xml配置文件,而 springboot的出现解 决了这一问题,一个项目甚至不用部署到服务器上直接开跑,真像springboot所说:“just run”。"); - map1.put("member", "Chill"); - map1.put("href", "http://spring.io/projects/spring-boot"); - list.add(map1); - - Map map2 = new HashMap<>(16); - map2.put("logo", "https://spring.io/img/homepage/icon-spring-cloud.svg"); - map2.put("title", "SpringCloud"); - map2.put("description", "SpringCloud是基于SpringBoot的一整套实现微服务的框架。他提供了微服务开发所需的配置管理、服务发现、断路器、智能路由、微代理、控制总线、全局锁、决策竞选、分布式会话和集群状态管理等组件。"); - map2.put("member", "Chill"); - map2.put("href", "http://spring.io/projects/spring-cloud"); - list.add(map2); - - Map map3 = new HashMap<>(16); - map3.put("logo", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1546359961068&di=05ff9406e6675ca9a58a525a7e7950b9&imgtype=jpg&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D575314515%2C4268715674%26fm%3D214%26gp%3D0.jpg"); - map3.put("title", "Mybatis"); - map3.put("description", "MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集。MyBatis 可以使用简单的 XML 或注解来配置和映射原生信息,将接口和 Java 的 POJOs(Plain Old Java Objects,普通的 Java对象)映射成数据库中的记录。"); - map3.put("member", "Chill"); - map3.put("href", "http://www.mybatis.org/mybatis-3/getting-started.html"); - list.add(map3); - - Map map4 = new HashMap<>(16); - map4.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/kZzEzemZyKLKFsojXItE.png"); - map4.put("title", "React"); - map4.put("description", "React 起源于 Facebook 的内部项目,因为该公司对市场上所有 JavaScript MVC 框架,都不满意,就决定自己写一套,用来架设Instagram 的网站。做出来以后,发现这套东西很好用,就在2013年5月开源了。"); - map4.put("member", "Chill"); - map4.put("href", "https://reactjs.org/"); - list.add(map4); - - Map map5 = new HashMap<>(16); - map5.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png"); - map5.put("title", "Ant Design"); - map5.put("description", "蚂蚁金服体验技术部经过大量的项目实践和总结,沉淀出设计语言 Ant Design,这可不单纯只是设计原则、控件规范和视觉尺寸,还配套有前端代码实现方案。也就是说采用Ant Design后,UI设计和前端界面研发可同步完成,效率大大提升。"); - map5.put("member", "Chill"); - map5.put("href", "https://ant.design/docs/spec/introduce-cn"); - list.add(map5); - - Map map6 = new HashMap<>(16); - map6.put("logo", "https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png"); - map6.put("title", "Ant Design Pro"); - map6.put("description", "Ant Design Pro 是一个企业级开箱即用的中后台前端/设计解决方案。符合阿里追求的'敏捷的前端+强大的中台'的思想。"); - map6.put("member", "Chill"); - map6.put("href", "https://pro.ant.design"); - list.add(map6); - - return R.data(list); - } - - /** - * 获取我的消息 - * - * @return - */ - @GetMapping("/my-notices") - @ApiOperation(value = "消息", notes = "消息") - public R myNotices() { - List> list = new ArrayList<>(); - Map map1 = new HashMap<>(16); - map1.put("id", "000000001"); - map1.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"); - map1.put("title", "你收到了 14 份新周报"); - map1.put("datetime", "2018-08-09"); - map1.put("type", "notification"); - list.add(map1); - - Map map2 = new HashMap<>(16); - map2.put("id", "000000002"); - map2.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png"); - map2.put("title", "你推荐的 曲妮妮 已通过第三轮面试"); - map2.put("datetime", "2018-08-08"); - map2.put("type", "notification"); - list.add(map2); - - - Map map3 = new HashMap<>(16); - map3.put("id", "000000003"); - map3.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg"); - map3.put("title", "曲丽丽 评论了你"); - map3.put("description", "描述信息描述信息描述信息"); - map3.put("datetime", "2018-08-07"); - map3.put("type", "message"); - map3.put("clickClose", "true"); - list.add(map3); - - - Map map4 = new HashMap<>(16); - map4.put("id", "000000004"); - map4.put("avatar", "https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg"); - map4.put("title", "朱偏右 回复了你"); - map4.put("description", "这种模板用于提醒谁与你发生了互动,左侧放『谁』的头像"); - map4.put("type", "message"); - map4.put("datetime", "2018-08-07"); - map4.put("clickClose", "true"); - list.add(map4); - - - Map map5 = new HashMap<>(16); - map5.put("id", "000000005"); - map5.put("title", "任务名称"); - map5.put("description", "任务需要在 2018-01-12 20:00 前启动"); - map5.put("extra", "未开始"); - map5.put("status", "todo"); - map5.put("type", "event"); - list.add(map5); - - return R.data(list); - } - } diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java index 41d7ebd9..99d0e139 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import org.springblade.desk.entity.Notice; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; +import io.swagger.v3.oas.annotations.Hidden; import java.util.List; @@ -30,7 +30,7 @@ * * @author Chill */ -@ApiIgnore() +@Hidden @RestController @AllArgsConstructor public class NoticeClient implements INoticeClient { diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/mapper/NoticeMapper.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/mapper/NoticeMapper.java index daed99a6..14f22f87 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/mapper/NoticeMapper.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/mapper/NoticeMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/service/INoticeService.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/service/INoticeService.java index 05f235ad..3b0b774c 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/service/INoticeService.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/service/INoticeService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/NoticeServiceImpl.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/NoticeServiceImpl.java index 576dc515..e9459e65 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/NoticeServiceImpl.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/NoticeServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/wrapper/NoticeWrapper.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/wrapper/NoticeWrapper.java index 70fe7f7c..c96ea7e2 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/wrapper/NoticeWrapper.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/wrapper/NoticeWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ public static NoticeWrapper build() { @Override public NoticeVO entityVO(Notice notice) { - NoticeVO noticeVO = BeanUtil.copy(notice, NoticeVO.class); + NoticeVO noticeVO = BeanUtil.copyProperties(notice, NoticeVO.class); R dict = dictClient.getValue("notice", noticeVO.getCategory()); if (dict.isSuccess()) { String categoryName = dict.getData(); diff --git a/blade-service/blade-desk/src/test/java/BladeDemoTest.java b/blade-service/blade-desk/src/test/java/BladeDemoTest.java index be632a43..66e31dad 100644 --- a/blade-service/blade-desk/src/test/java/BladeDemoTest.java +++ b/blade-service/blade-desk/src/test/java/BladeDemoTest.java @@ -1,7 +1,7 @@ -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.springblade.core.test.BladeBootTest; -import org.springblade.core.test.BladeSpringRunner; +import org.springblade.core.test.BladeSpringExtension; import org.springblade.desk.DeskApplication; import org.springblade.desk.service.INoticeService; import org.springframework.beans.factory.annotation.Autowired; @@ -12,7 +12,7 @@ * * @author Chill */ -@RunWith(BladeSpringRunner.class) +@ExtendWith(BladeSpringExtension.class) @SpringBootTest(classes = DeskApplication.class) @BladeBootTest(appName = "blade-desk", profile = "test", enableLoader = true) public class BladeDemoTest { @@ -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-desk/src/test/java/org/springblade/desk/test/launcher/DemoTestLauncherServiceImpl.java b/blade-service/blade-desk/src/test/java/org/springblade/desk/test/launcher/DemoTestLauncherServiceImpl.java index 495d7b0e..bac5bd2a 100644 --- a/blade-service/blade-desk/src/test/java/org/springblade/desk/test/launcher/DemoTestLauncherServiceImpl.java +++ b/blade-service/blade-desk/src/test/java/org/springblade/desk/test/launcher/DemoTestLauncherServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/Dockerfile b/blade-service/blade-log/Dockerfile index 5f5181e3..391d7613 100644 --- a/blade-service/blade-log/Dockerfile +++ b/blade-service/blade-log/Dockerfile @@ -1,6 +1,6 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/log @@ -10,6 +10,6 @@ EXPOSE 8103 ADD ./target/blade-log.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-service/blade-log/pom.xml b/blade-service/blade-log/pom.xml index e87e923e..686ba7e8 100644 --- a/blade-service/blade-log/pom.xml +++ b/blade-service/blade-log/pom.xml @@ -5,13 +5,12 @@ blade-service org.springblade - 2.8.0 + ${revision} 4.0.0 blade-log ${project.artifactId} - ${blade.project.version} jar @@ -19,7 +18,6 @@ org.springblade blade-core-boot - ${blade.tool.version} @@ -28,22 +26,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/LogApplication.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/LogApplication.java index 3a486f38..cc9607d6 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/LogApplication.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/LogApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,16 @@ */ package org.springblade.core.log; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; /** * 日志服务 * * @author Chill */ -@SpringCloudApplication -@EnableFeignClients(AppConstant.BASE_PACKAGES) +@BladeCloudApplication public class LogApplication { public static void main(String[] args) { diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java index 162a99cc..e0a019c9 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,26 +17,25 @@ import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Parameter; import lombok.AllArgsConstructor; import org.springblade.core.log.model.LogApi; -import org.springblade.core.log.model.LogApiVo; +import org.springblade.core.log.pojo.LogApiVO; import org.springblade.core.log.service.ILogApiService; +import org.springblade.core.log.wrapper.LogApiWrapper; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.annotation.PreAuth; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.StringPool; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; -import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** * 控制器 @@ -44,6 +43,7 @@ * @author Chill * @since 2018-09-26 */ +@Hidden @RestController @AllArgsConstructor @RequestMapping("/api") @@ -55,26 +55,22 @@ public class LogApiController { * 查询单条 */ @GetMapping("/detail") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public R detail(LogApi log) { - return R.data(logService.getOne(Condition.getQueryWrapper(log))); + LogApi logApi = logService.getOne(Condition.getQueryWrapper(log)); + return R.data(LogApiWrapper.build().entity(logApi)); } /** * 查询多条(分页) */ @GetMapping("/list") - public R> list(@ApiIgnore @RequestParam Map log, Query query) { + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R> list(@Parameter(hidden = true) @RequestParam Map log, Query query) { query.setAscs("create_time"); query.setDescs(StringPool.EMPTY); IPage pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogApi.class)); - List records = pages.getRecords().stream().map(logApi -> { - LogApiVo vo = BeanUtil.copy(logApi, LogApiVo.class); - vo.setStrId(Func.toStr(logApi.getId())); - return vo; - }).collect(Collectors.toList()); - IPage pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); - pageVo.setRecords(records); - return R.data(pageVo); + return R.data(LogApiWrapper.build().pageVO(pages)); } } diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java index d15d59ac..b35ffd9a 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,26 +17,25 @@ import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Parameter; import lombok.AllArgsConstructor; import org.springblade.core.log.model.LogError; -import org.springblade.core.log.model.LogErrorVo; +import org.springblade.core.log.pojo.LogErrorVO; import org.springblade.core.log.service.ILogErrorService; +import org.springblade.core.log.wrapper.LogErrorWrapper; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.annotation.PreAuth; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.StringPool; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; -import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** * 控制器 @@ -44,6 +43,7 @@ * @author Chill * @since 2018-09-26 */ +@Hidden @RestController @AllArgsConstructor @RequestMapping("/error") @@ -55,26 +55,22 @@ public class LogErrorController { * 查询单条 */ @GetMapping("/detail") - public R detail(LogError logError) { - return R.data(errorLogService.getOne(Condition.getQueryWrapper(logError))); + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R detail(LogError log) { + LogError logError = errorLogService.getOne(Condition.getQueryWrapper(log)); + return R.data(LogErrorWrapper.build().entity(logError)); } /** * 查询多条(分页) */ @GetMapping("/list") - public R> list(@ApiIgnore @RequestParam Map logError, Query query) { + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R> list(@Parameter(hidden = true) @RequestParam Map logError, Query query) { query.setAscs("create_time"); query.setDescs(StringPool.EMPTY); IPage pages = errorLogService.page(Condition.getPage(query), Condition.getQueryWrapper(logError, LogError.class)); - List records = pages.getRecords().stream().map(logApi -> { - LogErrorVo vo = BeanUtil.copy(logApi, LogErrorVo.class); - vo.setStrId(Func.toStr(logApi.getId())); - return vo; - }).collect(Collectors.toList()); - IPage pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); - pageVo.setRecords(records); - return R.data(pageVo); + return R.data(LogErrorWrapper.build().pageVO(pages)); } } diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java index ba1f7f87..a0548ad8 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,26 +17,25 @@ import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Parameter; import lombok.AllArgsConstructor; import org.springblade.core.log.model.LogUsual; -import org.springblade.core.log.model.LogUsualVo; +import org.springblade.core.log.pojo.LogUsualVO; import org.springblade.core.log.service.ILogUsualService; +import org.springblade.core.log.wrapper.LogUsualWrapper; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.annotation.PreAuth; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.StringPool; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; -import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** * 控制器 @@ -44,6 +43,7 @@ * @author Chill * @since 2018-10-12 */ +@Hidden @RestController @AllArgsConstructor @RequestMapping("/usual") @@ -55,26 +55,22 @@ public class LogUsualController { * 查询单条 */ @GetMapping("/detail") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public R detail(LogUsual log) { - return R.data(logService.getOne(Condition.getQueryWrapper(log))); + LogUsual logUsual = logService.getOne(Condition.getQueryWrapper(log)); + return R.data(LogUsualWrapper.build().entity(logUsual)); } /** * 查询多条(分页) */ @GetMapping("/list") - public R> list(@ApiIgnore @RequestParam Map log, Query query) { + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R> list(@Parameter(hidden = true) @RequestParam Map log, Query query) { query.setAscs("create_time"); query.setDescs(StringPool.EMPTY); IPage pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogUsual.class)); - List records = pages.getRecords().stream().map(logApi -> { - LogUsualVo vo = BeanUtil.copy(logApi, LogUsualVo.class); - vo.setStrId(Func.toStr(logApi.getId())); - return vo; - }).collect(Collectors.toList()); - IPage pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); - pageVo.setRecords(records); - return R.data(pageVo); + return R.data(LogUsualWrapper.build().pageVO(pages)); } } diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java index 0fe99a1f..f0ebaeac 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ */ package org.springblade.core.log.feign; +import io.swagger.v3.oas.annotations.Hidden; import lombok.AllArgsConstructor; import org.springblade.core.log.model.LogApi; import org.springblade.core.log.model.LogUsual; @@ -32,6 +33,7 @@ * * @author Chill */ +@Hidden @RestController @AllArgsConstructor public class LogClient implements ILogClient { diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogApiMapper.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogApiMapper.java index f927ae2a..7076ba76 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogApiMapper.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogApiMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogErrorMapper.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogErrorMapper.java index d7bcc4a1..d9c2fcca 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogErrorMapper.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogErrorMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogUsualMapper.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogUsualMapper.java index a64d6a15..3bc908dd 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogUsualMapper.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/mapper/LogUsualMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogApiVO.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogApiVO.java new file mode 100644 index 00000000..91fa9fe6 --- /dev/null +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogApiVO.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.core.log.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.log.model.LogApi; + +import java.io.Serial; + +/** + * LogApiVO + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class LogApiVO extends LogApi { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 操作提交的数据 + */ + @JsonIgnore + private String params; + + +} diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogErrorVO.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogErrorVO.java new file mode 100644 index 00000000..39ae29ba --- /dev/null +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogErrorVO.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.core.log.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.log.model.LogError; + +import java.io.Serial; + +/** + * LogErrorVO + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class LogErrorVO extends LogError { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 操作提交的数据 + */ + @JsonIgnore + private String params; + + /** + * 堆栈信息 + */ + @JsonIgnore + private String stackTrace; + + /** + * 异常消息 + */ + @JsonIgnore + private String message; +} diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogUsualVO.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogUsualVO.java new file mode 100644 index 00000000..5bc2b164 --- /dev/null +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/LogUsualVO.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.core.log.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.log.model.LogUsual; + +import java.io.Serial; + +/** + * LogUsualVO + * + * @author Chill + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class LogUsualVO extends LogUsual { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 操作提交的数据 + */ + @JsonIgnore + private String params; + + /** + * 日志数据 + */ + @JsonIgnore + private String logData; +} diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/package-info.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/package-info.java new file mode 100644 index 00000000..1340f814 --- /dev/null +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/pojo/package-info.java @@ -0,0 +1,6 @@ +/** + * Created by Blade. + * + * @author zhuangqian + */ +package org.springblade.core.log.pojo; diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogApiService.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogApiService.java index a75f6624..3d573534 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogApiService.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogApiService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogErrorService.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogErrorService.java index ca1ad972..d596f7d2 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogErrorService.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogErrorService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogUsualService.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogUsualService.java index 560bf941..12900092 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogUsualService.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/ILogUsualService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogApiServiceImpl.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogApiServiceImpl.java index b875de5f..b394412d 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogApiServiceImpl.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogApiServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogErrorServiceImpl.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogErrorServiceImpl.java index 5188eff7..26468428 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogErrorServiceImpl.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogErrorServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogUsualServiceImpl.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogUsualServiceImpl.java index 2c04c672..66e6b1b7 100644 --- a/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogUsualServiceImpl.java +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/service/impl/LogUsualServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogApiWrapper.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogApiWrapper.java new file mode 100644 index 00000000..0259fd27 --- /dev/null +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogApiWrapper.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.core.log.wrapper; + +import org.springblade.core.log.model.LogApi; +import org.springblade.core.log.pojo.LogApiVO; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.sensitive.SensitiveUtil; +import org.springblade.core.tool.sensitive.SensitiveWord; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.StringUtil; + +import java.util.Objects; + +/** + * Log包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class LogApiWrapper extends BaseEntityWrapper { + + public static LogApiWrapper build() { + return new LogApiWrapper(); + } + + @Override + public LogApiVO entityVO(LogApi logApi) { + return Objects.requireNonNull(BeanUtil.copyProperties(logApi, LogApiVO.class)); + } + + public LogApi entity(LogApi logApi) { + String params = logApi.getParams(); + if (StringUtil.isNotBlank(params)) { + logApi.setParams(SensitiveUtil.processWithWords(params, SensitiveWord.SECURE.getWords())); + } + return logApi; + } + +} diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogErrorWrapper.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogErrorWrapper.java new file mode 100644 index 00000000..c75485dc --- /dev/null +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogErrorWrapper.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.core.log.wrapper; + +import org.springblade.core.log.model.LogError; +import org.springblade.core.log.pojo.LogErrorVO; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.sensitive.SensitiveUtil; +import org.springblade.core.tool.sensitive.SensitiveWord; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.StringUtil; + +import java.util.Objects; + +/** + * Log包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class LogErrorWrapper extends BaseEntityWrapper { + + public static LogErrorWrapper build() { + return new LogErrorWrapper(); + } + + @Override + public LogErrorVO entityVO(LogError logError) { + return Objects.requireNonNull(BeanUtil.copyProperties(logError, LogErrorVO.class)); + } + + public LogError entity(LogError logError) { + String params = logError.getParams(); + String stackTrace = logError.getStackTrace(); + String message = logError.getMessage(); + if (StringUtil.isNotBlank(params)) { + logError.setParams(SensitiveUtil.processWithWords(params, SensitiveWord.SECURE.getWords())); + } + if (StringUtil.isNotBlank(stackTrace)) { + logError.setStackTrace(SensitiveUtil.processWithWords(stackTrace, SensitiveWord.SECURE.getWords())); + } + if (StringUtil.isNotBlank(message)) { + logError.setMessage(SensitiveUtil.processWithWords(message, SensitiveWord.SECURE.getWords())); + } + return logError; + } +} diff --git a/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogUsualWrapper.java b/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogUsualWrapper.java new file mode 100644 index 00000000..aa5e7297 --- /dev/null +++ b/blade-service/blade-log/src/main/java/org/springblade/core/log/wrapper/LogUsualWrapper.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.core.log.wrapper; + +import org.springblade.core.log.model.LogUsual; +import org.springblade.core.log.pojo.LogUsualVO; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.sensitive.SensitiveUtil; +import org.springblade.core.tool.sensitive.SensitiveWord; +import org.springblade.core.tool.utils.BeanUtil; +import org.springblade.core.tool.utils.StringUtil; + +import java.util.Objects; + +/** + * Log包装类,返回视图层所需的字段 + * + * @author Chill + */ +public class LogUsualWrapper extends BaseEntityWrapper { + + public static LogUsualWrapper build() { + return new LogUsualWrapper(); + } + + @Override + public LogUsualVO entityVO(LogUsual logUsual) { + return Objects.requireNonNull(BeanUtil.copyProperties(logUsual, LogUsualVO.class)); + } + + public LogUsual entity(LogUsual logUsual) { + String params = logUsual.getParams(); + String logData = logUsual.getLogData(); + if (StringUtil.isNotBlank(params)) { + logUsual.setParams(SensitiveUtil.processWithWords(params, SensitiveWord.SECURE.getWords())); + } + if (StringUtil.isNotBlank(logData)) { + logUsual.setLogData(SensitiveUtil.processWithWords(logData, SensitiveWord.SECURE.getWords())); + } + return logUsual; + } + +} diff --git a/blade-service/blade-system/Dockerfile b/blade-service/blade-system/Dockerfile index f657a7d2..4d8c2508 100644 --- a/blade-service/blade-system/Dockerfile +++ b/blade-service/blade-system/Dockerfile @@ -1,6 +1,6 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited +FROM bladex/alpine-java:openjdk17_cn_slim -MAINTAINER smallchill@163.com +MAINTAINER bladejava@qq.com RUN mkdir -p /blade/system @@ -10,6 +10,6 @@ EXPOSE 8106 ADD ./target/blade-system.jar ./app.jar -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] +ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] CMD ["--spring.profiles.active=test"] diff --git a/blade-service/blade-system/pom.xml b/blade-service/blade-system/pom.xml index a2eb18d8..5401468c 100644 --- a/blade-service/blade-system/pom.xml +++ b/blade-service/blade-system/pom.xml @@ -5,41 +5,55 @@ blade-service org.springblade - 2.8.0 + ${revision} 4.0.0 blade-system ${project.artifactId} - ${blade.project.version} jar org.springblade blade-core-boot - ${blade.tool.version} org.springblade blade-dict-api - ${blade.project.version} org.springblade blade-system-api - ${blade.project.version} org.springblade blade-user-api - ${blade.project.version} - - + + com.alibaba + easyexcel + + + org.apache.poi + poi + + + org.apache.poi + poi-ooxml + + + org.apache.poi + poi-ooxml-schemas + + + org.apache.poi + poi-scratchpad + + + org.apache.poi + ooxml-schemas + @@ -47,22 +61,6 @@ org.apache.maven.plugins maven-antrun-plugin - - - package - - run - - - - - - - - - diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java b/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java index d1b30779..05182c76 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/SystemApplication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,17 +15,15 @@ */ package org.springblade.system; +import org.springblade.core.cloud.client.BladeCloudApplication; import org.springblade.core.launch.BladeApplication; import org.springblade.core.launch.constant.AppConstant; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; /** * 系统模块启动器 * @author Chill */ -@SpringCloudApplication -@EnableFeignClients(AppConstant.BASE_PACKAGES) +@BladeCloudApplication public class SystemApplication { public static void main(String[] args) { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java index 6d4e3464..a63791b4 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,9 @@ 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 io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; @@ -31,9 +31,9 @@ import org.springblade.system.entity.AuthClient; import org.springblade.system.service.IAuthClientService; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; +import io.swagger.v3.oas.annotations.Hidden; -import javax.validation.Valid; +import jakarta.validation.Valid; /** * 应用管理控制器 @@ -43,8 +43,8 @@ @RestController @AllArgsConstructor @RequestMapping("/client") -@ApiIgnore -@Api(value = "应用管理", tags = "接口") +@Hidden +@Tag(name = "应用管理", description = "接口") @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public class AuthClientController extends BladeController { @@ -55,7 +55,7 @@ public class AuthClientController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入client") + @Operation(summary = "详情", description = "传入client") public R detail(AuthClient authClient) { AuthClient detail = clientService.getOne(Condition.getQueryWrapper(authClient)); return R.data(detail); @@ -66,7 +66,7 @@ public R detail(AuthClient authClient) { */ @GetMapping("/list") @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入client") + @Operation(summary = "分页", description = "传入client") public R> list(AuthClient authClient, Query query) { IPage pages = clientService.page(Condition.getPage(query), Condition.getQueryWrapper(authClient)); return R.data(pages); @@ -77,7 +77,7 @@ public R> list(AuthClient authClient, Query query) { */ @PostMapping("/save") @ApiOperationSupport(order = 3) - @ApiOperation(value = "新增", notes = "传入client") + @Operation(summary = "新增", description = "传入client") public R save(@Valid @RequestBody AuthClient authClient) { return R.status(clientService.save(authClient)); } @@ -87,7 +87,7 @@ public R save(@Valid @RequestBody AuthClient authClient) { */ @PostMapping("/update") @ApiOperationSupport(order = 4) - @ApiOperation(value = "修改", notes = "传入client") + @Operation(summary = "修改", description = "传入client") public R update(@Valid @RequestBody AuthClient authClient) { return R.status(clientService.updateById(authClient)); } @@ -97,7 +97,7 @@ public R update(@Valid @RequestBody AuthClient authClient) { */ @PostMapping("/submit") @ApiOperationSupport(order = 5) - @ApiOperation(value = "新增或修改", notes = "传入client") + @Operation(summary = "新增或修改", description = "传入client") public R submit(@Valid @RequestBody AuthClient authClient) { return R.status(clientService.saveOrUpdate(authClient)); } @@ -108,8 +108,8 @@ public R submit(@Valid @RequestBody AuthClient authClient) { */ @PostMapping("/remove") @ApiOperationSupport(order = 6) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(clientService.deleteLogic(Func.toLongList(ids))); } 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 00000000..5bfd1ecf --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java @@ -0,0 +1,120 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +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 jakarta.validation.Valid; + +import static org.springblade.core.tool.utils.CacheUtil.SYS_CACHE; + +/** + * 数据权限控制器 + * + * @author BladeX + */ +@RestController +@AllArgsConstructor +@RequestMapping("/data-scope") +@Tag(name = "数据权限", description = "数据权限") +public class DataScopeController extends BladeController { + + private final IDataScopeService dataScopeService; + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @Operation(summary = "详情", description = "传入dataScope") + public R detail(DataScope dataScope) { + DataScope detail = dataScopeService.getOne(Condition.getQueryWrapper(dataScope)); + return R.data(detail); + } + + /** + * 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @Operation(summary = "分页", description = "传入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) + @Operation(summary = "新增", description = "传入dataScope") + public R save(@Valid @RequestBody DataScope dataScope) { + CacheUtil.clear(SYS_CACHE); + return R.status(dataScopeService.save(dataScope)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 4) + @Operation(summary = "修改", description = "传入dataScope") + public R update(@Valid @RequestBody DataScope dataScope) { + CacheUtil.clear(SYS_CACHE); + return R.status(dataScopeService.updateById(dataScope)); + } + + /** + * 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 5) + @Operation(summary = "新增或修改", description = "传入dataScope") + public R submit(@Valid @RequestBody DataScope dataScope) { + CacheUtil.clear(SYS_CACHE); + return R.status(dataScopeService.saveOrUpdate(dataScope)); + } + + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", 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 5e161cc1..b79a2e1e 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,23 +17,26 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; 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.Func; import org.springblade.system.entity.Dept; import org.springblade.system.service.IDeptService; import org.springblade.system.vo.DeptVO; import org.springblade.system.wrapper.DeptWrapper; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.List; import java.util.Map; @@ -45,7 +48,7 @@ @RestController @AllArgsConstructor @RequestMapping("/dept") -@Api(value = "部门", tags = "部门") +@Tag(name = "部门", description = "部门") public class DeptController extends BladeController { private IDeptService deptService; @@ -55,7 +58,7 @@ public class DeptController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入dept") + @Operation(summary = "详情", description = "传入dept") public R detail(Dept dept) { Dept detail = deptService.getOne(Condition.getQueryWrapper(dept)); return R.data(DeptWrapper.build().entityVO(detail)); @@ -65,13 +68,13 @@ public R detail(Dept dept) { * 列表 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "deptName", value = "部门名称", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "fullName", value = "部门全称", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "deptName", description = "部门名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "fullName", description = "部门全称", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 2) - @ApiOperation(value = "列表", notes = "传入dept") - public R> list(@ApiIgnore @RequestParam Map dept, BladeUser bladeUser) { + @Operation(summary = "列表", description = "传入dept") + public R> list(@Parameter(hidden = true) @RequestParam Map dept, BladeUser bladeUser) { QueryWrapper queryWrapper = Condition.getQueryWrapper(dept, Dept.class); List list = deptService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Dept::getTenantId, bladeUser.getTenantId()) : queryWrapper); return R.data(DeptWrapper.build().listNodeVO(list)); @@ -84,7 +87,7 @@ public R> list(@ApiIgnore @RequestParam Map dept, Bl */ @GetMapping("/tree") @ApiOperationSupport(order = 3) - @ApiOperation(value = "树形结构", notes = "树形结构") + @Operation(summary = "树形结构", description = "树形结构") public R> tree(String tenantId, BladeUser bladeUser) { List tree = deptService.tree(Func.toStr(tenantId, bladeUser.getTenantId())); return R.data(tree); @@ -95,12 +98,9 @@ public R> tree(String tenantId, BladeUser bladeUser) { */ @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)); + @Operation(summary = "新增或修改", description = "传入dept") + public R submit(@Valid @RequestBody Dept dept) { + return R.status(deptService.submit(dept)); } /** @@ -108,8 +108,8 @@ public R submit(@Valid @RequestBody Dept dept, BladeUser user) { */ @PostMapping("/remove") @ApiOperationSupport(order = 5) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(deptService.removeByIds(Func.toLongList(ids))); } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java index fcd39262..f46071bc 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,17 @@ package org.springblade.system.controller; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.tool.api.R; -import org.springblade.core.tool.node.INode; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.Dict; import org.springblade.system.service.IDictService; @@ -29,9 +34,7 @@ import org.springblade.system.wrapper.DictWrapper; import org.springframework.cache.annotation.CacheEvict; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.List; import java.util.Map; @@ -46,7 +49,7 @@ @RestController @AllArgsConstructor @RequestMapping("/dict") -@Api(value = "字典", tags = "字典") +@Tag(name = "字典", description = "字典") public class DictController extends BladeController { private IDictService dictService; @@ -56,7 +59,7 @@ public class DictController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入dict") + @Operation(summary = "详情", description = "传入dict") public R detail(Dict dict) { Dict detail = dictService.getOne(Condition.getQueryWrapper(dict)); return R.data(DictWrapper.build().entityVO(detail)); @@ -66,14 +69,13 @@ public R detail(Dict dict) { * 列表 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "字典编号", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "dictValue", value = "字典名称", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "code", description = "字典编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "dictValue", description = "字典名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 2) - @ApiOperation(value = "列表", notes = "传入dict") - public R> list(@ApiIgnore @RequestParam Map dict) { - @SuppressWarnings("unchecked") + @Operation(summary = "列表", description = "传入dict") + public R> list(@Parameter(hidden = true) @RequestParam Map dict) { List list = dictService.list(Condition.getQueryWrapper(dict, Dict.class).lambda().orderByAsc(Dict::getSort)); return R.data(DictWrapper.build().listNodeVO(list)); } @@ -85,7 +87,7 @@ public R> list(@ApiIgnore @RequestParam Map dict) { */ @GetMapping("/tree") @ApiOperationSupport(order = 3) - @ApiOperation(value = "树形结构", notes = "树形结构") + @Operation(summary = "树形结构", description = "树形结构") public R> tree() { List tree = dictService.tree(); return R.data(tree); @@ -96,7 +98,7 @@ public R> tree() { */ @PostMapping("/submit") @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增或修改", notes = "传入dict") + @Operation(summary = "新增或修改", description = "传入dict") public R submit(@Valid @RequestBody Dict dict) { return R.status(dictService.submit(dict)); } @@ -108,8 +110,8 @@ public R submit(@Valid @RequestBody Dict dict) { @PostMapping("/remove") @CacheEvict(cacheNames = {DICT_LIST, DICT_VALUE}, allEntries = true) @ApiOperationSupport(order = 5) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(dictService.removeByIds(Func.toLongList(ids))); } @@ -120,7 +122,7 @@ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam */ @GetMapping("/dictionary") @ApiOperationSupport(order = 6) - @ApiOperation(value = "获取字典", notes = "获取字典") + @Operation(summary = "获取字典", description = "获取字典") public R> dictionary(String code) { List tree = dictService.getList(code); return R.data(tree); 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 aa19580e..f508668f 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,13 @@ package org.springblade.system.controller; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; @@ -28,12 +34,12 @@ 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.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.List; import java.util.Map; @@ -45,7 +51,7 @@ @RestController @AllArgsConstructor @RequestMapping("/menu") -@Api(value = "菜单", tags = "菜单") +@Tag(name = "菜单", description = "菜单") public class MenuController extends BladeController { private IMenuService menuService; @@ -56,7 +62,7 @@ public class MenuController extends BladeController { @GetMapping("/detail") @PreAuth(RoleConstant.HAS_ROLE_ADMIN) @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入menu") + @Operation(summary = "详情", description = "传入menu") public R detail(Menu menu) { Menu detail = menuService.getOne(Condition.getQueryWrapper(menu)); return R.data(MenuWrapper.build().entityVO(detail)); @@ -66,26 +72,57 @@ public R detail(Menu menu) { * 列表 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @PreAuth(RoleConstant.HAS_ROLE_ADMIN) @ApiOperationSupport(order = 2) - @ApiOperation(value = "列表", notes = "传入menu") - public R> list(@ApiIgnore @RequestParam Map menu) { - @SuppressWarnings("unchecked") + @Operation(summary = "列表", description = "传入menu") + public R> list(@Parameter(hidden = true) @RequestParam Map menu) { List

list = menuService.list(Condition.getQueryWrapper(menu, Menu.class).lambda().orderByAsc(Menu::getSort)); return R.data(MenuWrapper.build().listNodeVO(list)); } + /** + * 菜单列表 + */ + @GetMapping("/menu-list") + @Parameters({ + @Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")) + }) + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 3) + @Operation(summary = "菜单列表", description = "传入menu") + public R> menuList(@Parameter(hidden = true) @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") + @Parameters({ + @Parameter(name = "code", description = "菜单编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "name", description = "菜单名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")) + }) + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @ApiOperationSupport(order = 4) + @Operation(summary = "懒加载菜单列表", description = "传入menu") + public R> lazyMenuList(Long parentId, @Parameter(hidden = true) @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) - @ApiOperation(value = "新增或修改", notes = "传入menu") + @ApiOperationSupport(order = 5) + @Operation(summary = "新增或修改", description = "传入menu") public R submit(@Valid @RequestBody Menu menu) { return R.status(menuService.saveOrUpdate(menu)); } @@ -96,9 +133,9 @@ public R submit(@Valid @RequestBody Menu menu) { */ @PostMapping("/remove") @PreAuth(RoleConstant.HAS_ROLE_ADMIN) - @ApiOperationSupport(order = 4) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @ApiOperationSupport(order = 6) + @Operation(summary = "删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(menuService.removeByIds(Func.toLongList(ids))); } @@ -106,8 +143,8 @@ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam * 前端菜单数据 */ @GetMapping("/routes") - @ApiOperationSupport(order = 5) - @ApiOperation(value = "前端菜单数据", notes = "前端菜单数据") + @ApiOperationSupport(order = 7) + @Operation(summary = "前端菜单数据", description = "前端菜单数据") public R> routes(BladeUser user) { List list = menuService.routes((user == null || user.getUserId() == 0L) ? null : user.getRoleId()); return R.data(list); @@ -117,8 +154,8 @@ public R> routes(BladeUser user) { * 前端按钮数据 */ @GetMapping("/buttons") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "前端按钮数据", notes = "前端按钮数据") + @ApiOperationSupport(order = 8) + @Operation(summary = "前端按钮数据", description = "前端按钮数据") public R> buttons(BladeUser user) { List list = menuService.buttons(user.getRoleId()); return R.data(list); @@ -128,8 +165,8 @@ public R> buttons(BladeUser user) { * 获取菜单树形结构 */ @GetMapping("/tree") - @ApiOperationSupport(order = 7) - @ApiOperation(value = "树形结构", notes = "树形结构") + @ApiOperationSupport(order = 9) + @Operation(summary = "树形结构", description = "树形结构") public R> tree() { List tree = menuService.tree(); return R.data(tree); @@ -139,28 +176,34 @@ public R> tree() { * 获取权限分配树形结构 */ @GetMapping("/grant-tree") - @ApiOperationSupport(order = 8) - @ApiOperation(value = "权限分配树形结构", notes = "权限分配树形结构") - public R> grantTree(BladeUser user) { - return R.data(menuService.grantTree(user)); + @ApiOperationSupport(order = 10) + @Operation(summary = "权限分配树形结构", description = "权限分配树形结构") + 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) - @ApiOperation(value = "角色所分配的树", notes = "角色所分配的树") - public R> roleTreeKeys(String roleIds) { - return R.data(menuService.roleTreeKeys(roleIds)); + @ApiOperationSupport(order = 11) + @Operation(summary = "角色所分配的树", description = "角色所分配的树") + 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) - @ApiOperation(value = "菜单的角色权限") + @ApiOperationSupport(order = 12) + @Operation(summary = "菜单的角色权限") public R> authRoutes(BladeUser user) { if (Func.isEmpty(user) || user.getUserId() == 0L) { return null; diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java index 120f4c7e..956437bf 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,19 +17,25 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.annotation.PreAuth; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; import org.springblade.system.entity.Param; import org.springblade.system.service.IParamService; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.Map; /** @@ -40,7 +46,7 @@ @RestController @AllArgsConstructor @RequestMapping("/param") -@Api(value = "参数管理", tags = "接口") +@Tag(name = "参数管理", description = "接口") public class ParamController extends BladeController { private IParamService paramService; @@ -50,7 +56,7 @@ public class ParamController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入param") + @Operation(summary = "详情", description = "传入param") public R detail(Param param) { Param detail = paramService.getOne(Condition.getQueryWrapper(param)); return R.data(detail); @@ -60,14 +66,15 @@ public R detail(Param param) { * 分页 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "paramName", value = "参数名称", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "paramKey", value = "参数键名", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "paramValue", value = "参数键值", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "paramName", description = "参数名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "paramKey", description = "参数键名", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "paramValue", description = "参数键值", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入param") - public R> list(@ApiIgnore @RequestParam Map param, Query query) { + @Operation(summary = "分页", description = "传入param") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R> list(@Parameter(hidden = true) @RequestParam Map param, Query query) { IPage pages = paramService.page(Condition.getPage(query), Condition.getQueryWrapper(param, Param.class)); return R.data(pages); } @@ -77,7 +84,7 @@ public R> list(@ApiIgnore @RequestParam Map param, */ @PostMapping("/submit") @ApiOperationSupport(order = 3) - @ApiOperation(value = "新增或修改", notes = "传入param") + @Operation(summary = "新增或修改", description = "传入param") public R submit(@Valid @RequestBody Param param) { return R.status(paramService.saveOrUpdate(param)); } @@ -88,8 +95,8 @@ public R submit(@Valid @RequestBody Param param) { */ @PostMapping("/remove") @ApiOperationSupport(order = 4) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(paramService.deleteLogic(Func.toLongList(ids))); } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java index 88ea440e..f5f82f30 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; @@ -35,7 +35,7 @@ import org.springblade.system.wrapper.PostWrapper; import org.springframework.web.bind.annotation.*; -import javax.validation.Valid; +import jakarta.validation.Valid; import java.util.List; /** @@ -46,7 +46,7 @@ @RestController @AllArgsConstructor @RequestMapping("/post") -@Api(value = "岗位表", tags = "岗位表接口") +@Tag(name = "岗位表", description = "岗位表接口") public class PostController extends BladeController { private IPostService postService; @@ -56,7 +56,7 @@ public class PostController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入post") + @Operation(summary = "详情", description = "传入post") public R detail(Post post) { Post detail = postService.getOne(Condition.getQueryWrapper(post)); return R.data(PostWrapper.build().entityVO(detail)); @@ -67,7 +67,7 @@ public R detail(Post post) { */ @GetMapping("/list") @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入post") + @Operation(summary = "分页", description = "传入post") public R> list(Post post, Query query) { IPage pages = postService.page(Condition.getPage(query), Condition.getQueryWrapper(post)); return R.data(PostWrapper.build().pageVO(pages)); @@ -79,7 +79,7 @@ public R> list(Post post, Query query) { */ @GetMapping("/page") @ApiOperationSupport(order = 3) - @ApiOperation(value = "分页", notes = "传入post") + @Operation(summary = "分页", description = "传入post") public R> page(PostVO post, Query query) { IPage pages = postService.selectPostPage(Condition.getPage(query), post); return R.data(pages); @@ -90,7 +90,7 @@ public R> page(PostVO post, Query query) { */ @PostMapping("/save") @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增", notes = "传入post") + @Operation(summary = "新增", description = "传入post") public R save(@Valid @RequestBody Post post) { return R.status(postService.save(post)); } @@ -100,7 +100,7 @@ public R save(@Valid @RequestBody Post post) { */ @PostMapping("/update") @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入post") + @Operation(summary = "修改", description = "传入post") public R update(@Valid @RequestBody Post post) { return R.status(postService.updateById(post)); } @@ -110,7 +110,7 @@ public R update(@Valid @RequestBody Post post) { */ @PostMapping("/submit") @ApiOperationSupport(order = 6) - @ApiOperation(value = "新增或修改", notes = "传入post") + @Operation(summary = "新增或修改", description = "传入post") public R submit(@Valid @RequestBody Post post) { post.setTenantId(SecureUtil.getTenantId()); return R.status(postService.saveOrUpdate(post)); @@ -122,8 +122,8 @@ public R submit(@Valid @RequestBody Post post) { */ @PostMapping("/remove") @ApiOperationSupport(order = 7) - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(postService.deleteLogic(Func.toLongList(ids))); } @@ -132,7 +132,7 @@ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam */ @GetMapping("/select") @ApiOperationSupport(order = 8) - @ApiOperation(value = "下拉数据源", notes = "传入post") + @Operation(summary = "下拉数据源", description = "传入post") public R> select(String tenantId, BladeUser bladeUser) { List list = postService.list(Wrappers.query().lambda().eq(Post::getTenantId, Func.toStr(tenantId, bladeUser.getTenantId()))); return R.data(list); diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java index c5bc9711..4b543198 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RegionController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,21 +18,24 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; 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.node.INode; import org.springblade.system.entity.Region; import org.springblade.system.service.IRegionService; import org.springblade.system.vo.RegionVO; import org.springblade.system.wrapper.RegionWrapper; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.List; import java.util.Map; @@ -44,7 +47,7 @@ @RestController @AllArgsConstructor @RequestMapping("/region") -@Api(value = "行政区划表", tags = "行政区划表接口") +@Tag(name = "行政区划表", description = "行政区划表接口") public class RegionController extends BladeController { private final IRegionService regionService; @@ -54,7 +57,7 @@ public class RegionController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入region") + @Operation(summary = "详情", description = "传入region") public R detail(Region region) { Region detail = regionService.getOne(Condition.getQueryWrapper(region)); return R.data(RegionWrapper.build().entityVO(detail)); @@ -65,7 +68,7 @@ public R detail(Region region) { */ @GetMapping("/list") @ApiOperationSupport(order = 2) - @ApiOperation(value = "分页", notes = "传入region") + @Operation(summary = "分页", description = "传入region") public R> list(Region region, Query query) { IPage pages = regionService.page(Condition.getPage(query), Condition.getQueryWrapper(region)); return R.data(pages); @@ -75,14 +78,14 @@ public R> list(Region region, Query query) { * 懒加载列表 */ @GetMapping("/lazy-list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "区划编号", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "name", value = "区划名称", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "code", description = "区划编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "name", description = "区划名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 3) - @ApiOperation(value = "懒加载列表", notes = "传入menu") - public R> lazyList(String parentCode, @ApiIgnore @RequestParam Map menu) { - List list = regionService.lazyList(parentCode, menu); + @Operation(summary = "懒加载列表", description = "传入menu") + public R> lazyList(String parentCode, @Parameter(hidden = true) @RequestParam Map menu) { + List list = regionService.lazyList(parentCode, menu); return R.data(RegionWrapper.build().listNodeLazyVO(list)); } @@ -90,14 +93,14 @@ public R> lazyList(String parentCode, @ApiIgnore @RequestParam Map> lazyTree(String parentCode, @ApiIgnore @RequestParam Map menu) { - List list = regionService.lazyTree(parentCode, menu); + @Operation(summary = "懒加载列表", description = "传入menu") + public R> lazyTree(String parentCode, @Parameter(hidden = true) @RequestParam Map menu) { + List list = regionService.lazyTree(parentCode, menu); return R.data(RegionWrapper.build().listNodeLazyVO(list)); } @@ -106,7 +109,7 @@ public R> lazyTree(String parentCode, @ApiIgnore @RequestParam Map> select(@RequestParam(required = false, defaultValue = "00") String code) { List list = regionService.list(Wrappers.query().lambda().eq(Region::getParentCode, code)); return R.data(list); 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 f9d1f712..43d8c103 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,20 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; 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; @@ -32,12 +38,12 @@ import org.springblade.system.vo.RoleVO; import org.springblade.system.wrapper.RoleWrapper; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.List; import java.util.Map; +import static org.springblade.core.tool.utils.CacheUtil.SYS_CACHE; + /** * 控制器 * @@ -46,7 +52,7 @@ @RestController @AllArgsConstructor @RequestMapping("/role") -@Api(value = "角色", tags = "角色") +@Tag(name = "角色", description = "角色") public class RoleController extends BladeController { private IRoleService roleService; @@ -56,7 +62,7 @@ public class RoleController extends BladeController { */ @GetMapping("/detail") @ApiOperationSupport(order = 1) - @ApiOperation(value = "详情", notes = "传入role") + @Operation(summary = "详情", description = "传入role") public R detail(Role role) { Role detail = roleService.getOne(Condition.getQueryWrapper(role)); return R.data(RoleWrapper.build().entityVO(detail)); @@ -66,13 +72,13 @@ public R detail(Role role) { * 列表 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "roleName", value = "参数名称", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "roleAlias", value = "角色别名", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "roleName", description = "参数名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "roleAlias", description = "角色别名", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 2) - @ApiOperation(value = "列表", notes = "传入role") - public R> list(@ApiIgnore @RequestParam Map role, BladeUser bladeUser) { + @Operation(summary = "列表", description = "传入role") + public R> list(@Parameter(hidden = true) @RequestParam Map role, BladeUser bladeUser) { QueryWrapper queryWrapper = Condition.getQueryWrapper(role, Role.class); List list = roleService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Role::getTenantId, bladeUser.getTenantId()) : queryWrapper); return R.data(RoleWrapper.build().listNodeVO(list)); @@ -83,33 +89,47 @@ public R> list(@ApiIgnore @RequestParam Map role, Bl */ @GetMapping("/tree") @ApiOperationSupport(order = 3) - @ApiOperation(value = "树形结构", notes = "树形结构") + @Operation(summary = "树形结构", description = "树形结构") public R> tree(String tenantId, BladeUser bladeUser) { List tree = roleService.tree(Func.toStr(tenantId, bladeUser.getTenantId())); return R.data(tree); } + + /** + * 获取指定角色树形结构 + */ + @GetMapping("/tree-by-id") + @ApiOperationSupport(order = 4) + @Operation(summary = "树形结构", description = "树形结构") + 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) - @ApiOperation(value = "新增或修改", notes = "传入role") + @ApiOperationSupport(order = 5) + @Operation(summary = "新增或修改", description = "传入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) - @ApiOperation(value = "删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @ApiOperationSupport(order = 6) + @Operation(summary = "删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { + CacheUtil.clear(SYS_CACHE); return R.status(roleService.removeByIds(Func.toLongList(ids))); } @@ -117,11 +137,11 @@ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam * 设置菜单权限 */ @PostMapping("/grant") - @ApiOperationSupport(order = 6) - @ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合") + @ApiOperationSupport(order = 7) + @Operation(summary = "权限设置", description = "传入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/controller/TenantController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java index 5341b11c..754b4585 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import io.swagger.annotations.*; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.mp.support.Condition; @@ -31,9 +38,7 @@ import org.springblade.system.entity.Tenant; import org.springblade.system.service.ITenantService; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; -import javax.validation.Valid; import java.util.List; import java.util.Map; @@ -45,8 +50,8 @@ @RestController @AllArgsConstructor @RequestMapping("/tenant") -@ApiIgnore -@Api(value = "租户管理", tags = "接口") +@Hidden +@Tag(name = "租户管理", description = "接口") public class TenantController extends BladeController { private ITenantService tenantService; @@ -55,7 +60,7 @@ public class TenantController extends BladeController { * 详情 */ @GetMapping("/detail") - @ApiOperation(value = "详情", notes = "传入tenant") + @Operation(summary = "详情", description = "传入tenant") public R detail(Tenant tenant) { Tenant detail = tenantService.getOne(Condition.getQueryWrapper(tenant)); return R.data(detail); @@ -65,13 +70,13 @@ public R detail(Tenant tenant) { * 分页 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "tenantId", value = "参数名称", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "tenantName", value = "角色别名", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "contactNumber", value = "联系电话", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "tenantId", description = "参数名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "tenantName", description = "角色别名", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "contactNumber", description = "联系电话", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) - @ApiOperation(value = "分页", notes = "传入tenant") - public R> list(@ApiIgnore @RequestParam Map tenant, Query query, BladeUser bladeUser) { + @Operation(summary = "分页", description = "传入tenant") + public R> list(@Parameter(hidden = true) @RequestParam Map tenant, Query query, BladeUser bladeUser) { QueryWrapper queryWrapper = Condition.getQueryWrapper(tenant, Tenant.class); IPage pages = tenantService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Tenant::getTenantId, bladeUser.getTenantId()) : queryWrapper); return R.data(pages); @@ -81,7 +86,7 @@ public R> list(@ApiIgnore @RequestParam Map tenant * 下拉数据源 */ @GetMapping("/select") - @ApiOperation(value = "下拉数据源", notes = "传入tenant") + @Operation(summary = "下拉数据源", description = "传入tenant") public R> select(Tenant tenant, BladeUser bladeUser) { QueryWrapper queryWrapper = Condition.getQueryWrapper(tenant); List list = tenantService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Tenant::getTenantId, bladeUser.getTenantId()) : queryWrapper); @@ -92,7 +97,7 @@ public R> select(Tenant tenant, BladeUser bladeUser) { * 自定义分页 */ @GetMapping("/page") - @ApiOperation(value = "分页", notes = "传入tenant") + @Operation(summary = "分页", description = "传入tenant") public R> page(Tenant tenant, Query query) { IPage pages = tenantService.selectTenantPage(Condition.getPage(query), tenant); return R.data(pages); @@ -102,7 +107,7 @@ public R> page(Tenant tenant, Query query) { * 新增或修改 */ @PostMapping("/submit") - @ApiOperation(value = "新增或修改", notes = "传入tenant") + @Operation(summary = "新增或修改", description = "传入tenant") public R submit(@Valid @RequestBody Tenant tenant) { return R.status(tenantService.saveTenant(tenant)); } @@ -112,8 +117,8 @@ public R submit(@Valid @RequestBody Tenant tenant) { * 删除 */ @PostMapping("/remove") - @ApiOperation(value = "逻辑删除", notes = "传入ids") - public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + @Operation(summary = "逻辑删除", description = "传入ids") + public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(tenantService.deleteLogic(Func.toLongList(ids))); } @@ -123,7 +128,7 @@ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam * @param domain 域名 */ @GetMapping("/info") - @ApiOperation(value = "配置信息", notes = "传入domain") + @Operation(summary = "配置信息", description = "传入domain") public R info(String domain) { Tenant tenant = tenantService.getOne(Wrappers.query().lambda().eq(Tenant::getDomain, domain)); Kv kv = Kv.init(); diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/UserController.java similarity index 57% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java rename to blade-service/blade-system/src/main/java/org/springblade/system/controller/UserController.java index 939bdb4d..dc5c35e7 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/UserController.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,45 +13,51 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.controller; +package org.springblade.system.controller; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.read.builder.ExcelReaderBuilder; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; import lombok.AllArgsConstructor; import lombok.SneakyThrows; -import org.apache.commons.codec.Charsets; +import org.springblade.common.cache.CacheNames; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; +import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.annotation.PreAuth; import org.springblade.core.secure.utils.SecureUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; +import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.utils.Func; +import org.springblade.core.tool.utils.StringUtil; import org.springblade.system.user.entity.User; -import org.springblade.system.user.excel.UserExcel; -import org.springblade.system.user.excel.UserImportListener; -import org.springblade.system.user.service.IUserService; +import org.springblade.system.excel.UserExcel; +import org.springblade.system.excel.UserImportListener; +import org.springblade.system.service.IUserService; import org.springblade.system.user.vo.UserVO; -import org.springblade.system.user.wrapper.UserWrapper; +import org.springblade.system.wrapper.UserWrapper; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import springfox.documentation.annotations.ApiIgnore; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -62,18 +68,20 @@ * @author Chill */ @RestController -@RequestMapping +@RequestMapping("/user") @AllArgsConstructor public class UserController { private IUserService userService; + private BladeRedis bladeRedis; /** * 查询单条 */ @ApiOperationSupport(order = 1) - @ApiOperation(value = "查看详情", notes = "传入id") + @Operation(summary = "查看详情", description = "传入id") @GetMapping("/detail") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public R detail(User user) { User detail = userService.getOne(Condition.getQueryWrapper(user)); return R.data(UserWrapper.build().entityVO(detail)); @@ -82,8 +90,8 @@ public R detail(User user) { /** * 查询单条 */ - @ApiOperationSupport(order =2) - @ApiOperation(value = "查看详情", notes = "传入id") + @ApiOperationSupport(order = 2) + @Operation(summary = "查看详情", description = "传入id") @GetMapping("/info") public R info(BladeUser user) { User detail = userService.getById(user.getUserId()); @@ -94,13 +102,14 @@ public R info(BladeUser user) { * 用户列表 */ @GetMapping("/list") - @ApiImplicitParams({ - @ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"), - @ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string") + @Parameters({ + @Parameter(name = "account", description = "账号名", in = ParameterIn.QUERY, schema = @Schema(type = "string")), + @Parameter(name = "realName", description = "姓名", in = ParameterIn.QUERY, schema = @Schema(type = "string")) }) @ApiOperationSupport(order = 3) - @ApiOperation(value = "列表", notes = "传入account和realName") - public R> list(@ApiIgnore @RequestParam Map user, Query query, BladeUser bladeUser) { + @Operation(summary = "列表", description = "传入account和realName") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R> list(@Parameter(hidden = true) @RequestParam Map user, Query query, BladeUser bladeUser) { QueryWrapper queryWrapper = Condition.getQueryWrapper(user, User.class); IPage pages = userService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()) : queryWrapper); return R.data(UserWrapper.build().pageVO(pages)); @@ -111,7 +120,8 @@ public R> list(@ApiIgnore @RequestParam Map user, */ @PostMapping("/submit") @ApiOperationSupport(order = 4) - @ApiOperation(value = "新增或修改", notes = "传入User") + @Operation(summary = "新增或修改", description = "传入User") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public R submit(@Valid @RequestBody User user) { return R.status(userService.submit(user)); } @@ -121,7 +131,8 @@ public R submit(@Valid @RequestBody User user) { */ @PostMapping("/update") @ApiOperationSupport(order = 5) - @ApiOperation(value = "修改", notes = "传入User") + @Operation(summary = "修改", description = "传入User") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public R update(@Valid @RequestBody User user) { return R.status(userService.updateById(user)); } @@ -131,7 +142,8 @@ public R update(@Valid @RequestBody User user) { */ @PostMapping("/remove") @ApiOperationSupport(order = 6) - @ApiOperation(value = "删除", notes = "传入地基和") + @Operation(summary = "删除", description = "传入地基和") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public R remove(@RequestParam String ids) { return R.status(userService.deleteLogic(Func.toLongList(ids))); } @@ -146,17 +158,19 @@ public R remove(@RequestParam String ids) { */ @PostMapping("/grant") @ApiOperationSupport(order = 7) - @ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合") - public R grant(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds, - @ApiParam(value = "roleId集合", required = true) @RequestParam String roleIds) { + @Operation(summary = "权限设置", description = "传入roleId集合以及menuId集合") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R grant(@Parameter(description = "userId集合", required = true) @RequestParam String userIds, + @Parameter(description = "roleId集合", required = true) @RequestParam String roleIds) { boolean temp = userService.grant(userIds, roleIds); return R.status(temp); } @PostMapping("/reset-password") @ApiOperationSupport(order = 8) - @ApiOperation(value = "初始化密码", notes = "传入userId集合") - public R resetPassword(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds) { + @Operation(summary = "初始化密码", description = "传入userId集合") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R resetPassword(@Parameter(description = "userId集合", required = true) @RequestParam String userIds) { boolean temp = userService.resetPassword(userIds); return R.status(temp); } @@ -171,10 +185,10 @@ public R resetPassword(@ApiParam(value = "userId集合", required = true) @Reque */ @PostMapping("/update-password") @ApiOperationSupport(order = 9) - @ApiOperation(value = "修改密码", notes = "传入密码") - public R updatePassword(BladeUser user, @ApiParam(value = "旧密码", required = true) @RequestParam String oldPassword, - @ApiParam(value = "新密码", required = true) @RequestParam String newPassword, - @ApiParam(value = "新密码", required = true) @RequestParam String newPassword1) { + @Operation(summary = "修改密码", description = "传入密码") + public R updatePassword(BladeUser user, @Parameter(description = "旧密码", required = true) @RequestParam String oldPassword, + @Parameter(description = "新密码", required = true) @RequestParam String newPassword, + @Parameter(description = "新密码", required = true) @RequestParam String newPassword1) { boolean temp = userService.updatePassword(user.getUserId(), oldPassword, newPassword, newPassword1); return R.status(temp); } @@ -187,10 +201,11 @@ public R updatePassword(BladeUser user, @ApiParam(value = "旧密码", required */ @GetMapping("/user-list") @ApiOperationSupport(order = 10) - @ApiOperation(value = "用户列表", notes = "传入user") - public R> userList(User user) { + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + @Operation(summary = "用户列表", description = "传入user") + public R> userList(User user) { List list = userService.list(Condition.getQueryWrapper(user)); - return R.data(list); + return R.data(UserWrapper.build().listVO(list)); } @@ -199,10 +214,10 @@ public R> userList(User user) { */ @PostMapping("import-user") @ApiOperationSupport(order = 12) - @ApiOperation(value = "导入用户", notes = "传入excel") + @Operation(summary = "导入用户", description = "传入excel") public R importUser(MultipartFile file, Integer isCovered) { String filename = file.getOriginalFilename(); - if (StringUtils.isEmpty(filename)) { + if (StringUtil.isBlank(filename)) { throw new RuntimeException("请上传文件!"); } if ((!StringUtils.endsWithIgnoreCase(filename, ".xls") && !StringUtils.endsWithIgnoreCase(filename, ".xlsx"))) { @@ -226,17 +241,18 @@ public R importUser(MultipartFile file, Integer isCovered) { @SneakyThrows @GetMapping("export-user") @ApiOperationSupport(order = 13) - @ApiOperation(value = "导出用户", notes = "传入user") - public void exportUser(@ApiIgnore @RequestParam Map user, BladeUser bladeUser, HttpServletResponse response) { + @Operation(summary = "导出用户", description = "传入user") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public void exportUser(@Parameter(hidden = true) @RequestParam Map user, BladeUser bladeUser, HttpServletResponse response) { QueryWrapper queryWrapper = Condition.getQueryWrapper(user, User.class); - if (!SecureUtil.isAdministrator()){ + if (!SecureUtil.isAdministrator()) { queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()); } queryWrapper.lambda().eq(User::getIsDeleted, BladeConstant.DB_NOT_DELETED); List list = userService.exportUser(queryWrapper); response.setContentType("application/vnd.ms-excel"); - response.setCharacterEncoding(Charsets.UTF_8.name()); - String fileName = URLEncoder.encode("用户数据导出", Charsets.UTF_8.name()); + response.setCharacterEncoding(StandardCharsets.UTF_8.name()); + String fileName = URLEncoder.encode("用户数据导出", StandardCharsets.UTF_8); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); EasyExcel.write(response.getOutputStream(), UserExcel.class).sheet("用户数据表").doWrite(list); } @@ -247,12 +263,12 @@ public void exportUser(@ApiIgnore @RequestParam Map user, BladeU @SneakyThrows @GetMapping("export-template") @ApiOperationSupport(order = 14) - @ApiOperation(value = "导出模板") + @Operation(summary = "导出模板") public void exportUser(HttpServletResponse response) { List list = new ArrayList<>(); response.setContentType("application/vnd.ms-excel"); - response.setCharacterEncoding(Charsets.UTF_8.name()); - String fileName = URLEncoder.encode("用户数据模板", Charsets.UTF_8.name()); + response.setCharacterEncoding(StandardCharsets.UTF_8.name()); + String fileName = URLEncoder.encode("用户数据模板", StandardCharsets.UTF_8); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); EasyExcel.write(response.getOutputStream(), UserExcel.class).sheet("用户数据表").doWrite(list); } @@ -262,10 +278,26 @@ public void exportUser(HttpServletResponse response) { */ @PostMapping("/register-guest") @ApiOperationSupport(order = 15) - @ApiOperation(value = "第三方注册用户", notes = "传入user") + @Operation(summary = "第三方注册用户", description = "传入user") public R registerGuest(User user, Long oauthId) { return R.status(userService.registerGuest(user, oauthId)); } + /** + * 用户解锁 + */ + @PostMapping("/unlock") + @ApiOperationSupport(order = 16) + @Operation(summary = "账号解锁") + @PreAuth(RoleConstant.HAS_ROLE_ADMIN) + public R unlock(String userIds) { + if (StringUtil.isBlank(userIds)) { + return R.fail("请至少选择一个用户"); + } + List userList = userService.list(Wrappers.lambdaQuery().in(User::getId, Func.toLongList(userIds))); + userList.forEach(user -> bladeRedis.del(CacheNames.tenantKey(user.getTenantId(), CacheNames.USER_FAIL_KEY, user.getAccount()))); + return R.success("操作成功"); + } + } diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/excel/UserExcel.java b/blade-service/blade-system/src/main/java/org/springblade/system/excel/UserExcel.java similarity index 93% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/excel/UserExcel.java rename to blade-service/blade-system/src/main/java/org/springblade/system/excel/UserExcel.java index aee68b5a..5b9dbb56 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/excel/UserExcel.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/excel/UserExcel.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.excel; +package org.springblade.system.excel; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; @@ -22,6 +22,7 @@ import com.alibaba.excel.annotation.write.style.HeadRowHeight; import lombok.Data; +import java.io.Serial; import java.io.Serializable; import java.util.Date; @@ -35,6 +36,7 @@ @HeadRowHeight(20) @ContentRowHeight(18) public class UserExcel implements Serializable { + @Serial private static final long serialVersionUID = 1L; @ColumnWidth(15) diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/excel/UserImportListener.java b/blade-service/blade-system/src/main/java/org/springblade/system/excel/UserImportListener.java similarity index 92% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/excel/UserImportListener.java rename to blade-service/blade-system/src/main/java/org/springblade/system/excel/UserImportListener.java index f2a204e6..4accba52 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/excel/UserImportListener.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/excel/UserImportListener.java @@ -1,11 +1,11 @@ -package org.springblade.system.user.excel; +package org.springblade.system.excel; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.RequiredArgsConstructor; -import org.springblade.system.user.service.IUserService; +import org.springblade.system.service.IUserService; import java.util.ArrayList; import java.util.List; 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 00000000..d2a8179a --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DataScopeClient.java @@ -0,0 +1,106 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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 io.swagger.v3.oas.annotations.Hidden; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * 数据权限Feign实现类 + * + * @author Chill + */ +@Hidden +@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/feign/DictClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java index b10e0b13..b040ac4a 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import org.springblade.system.service.IDictService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; +import io.swagger.v3.oas.annotations.Hidden; import java.util.List; @@ -32,7 +32,7 @@ * * @author Chill */ -@ApiIgnore +@Hidden @RestController @AllArgsConstructor public class DictClient implements IDictClient { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java index add563a6..c73dc3b4 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ import org.springblade.system.service.ITenantService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; +import io.swagger.v3.oas.annotations.Hidden; import java.util.List; @@ -35,7 +35,7 @@ * * @author Chill */ -@ApiIgnore +@Hidden @RestController @AllArgsConstructor public class SysClient implements ISysClient { diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/UserClient.java similarity index 86% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java rename to blade-service/blade-system/src/main/java/org/springblade/system/feign/UserClient.java index ccda47b3..b2638f41 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/UserClient.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,14 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.feign; +package org.springblade.system.feign; +import io.swagger.v3.oas.annotations.Hidden; import lombok.AllArgsConstructor; import org.springblade.core.tool.api.R; +import org.springblade.system.service.IUserService; import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.UserInfo; import org.springblade.system.user.entity.UserOauth; -import org.springblade.system.user.service.IUserService; +import org.springblade.system.user.feign.IUserClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; @@ -30,6 +32,7 @@ * * @author Chill */ +@Hidden @RestController @AllArgsConstructor public class UserClient implements IUserClient { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/AuthClientMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/AuthClientMapper.java index adcc699f..4006a0ce 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/AuthClientMapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/AuthClientMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 00000000..2b50c077 --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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 00000000..cbb46594 --- /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/DeptMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.java index 2ac6f77b..f30acc4e 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DeptMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictMapper.java index 1a511ffd..41edd464 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictMapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DictMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 771bfae4..9208ab42 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ 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 260c9311..e36edfef 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 + + @@ -127,6 +173,104 @@ ) + + + + - SELECT id, tenant_id, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment} diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOauthMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/UserOauthMapper.java similarity index 87% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOauthMapper.java rename to blade-service/blade-system/src/main/java/org/springblade/system/mapper/UserOauthMapper.java index 350236e7..f9486b0b 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOauthMapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/UserOauthMapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.mapper; +package org.springblade.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springblade.system.user.entity.UserOauth; diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOauthMapper.xml b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/UserOauthMapper.xml similarity index 93% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOauthMapper.xml rename to blade-service/blade-system/src/main/java/org/springblade/system/mapper/UserOauthMapper.xml index c1ccf8da..84cbf92a 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOauthMapper.xml +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/UserOauthMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IAuthClientService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IAuthClientService.java index 38b2160d..35aa18ba 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IAuthClientService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IAuthClientService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 00000000..c1efaa68 --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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 5d137408..cdb80e30 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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/IDictService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDictService.java index 7ba84a85..edf9c8e8 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IDictService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDictService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 aaff8453..0e49dc94 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ 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/IParamService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IParamService.java index 14f012d3..694e548d 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IParamService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IParamService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IPostService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IPostService.java index d0f2d5b7..b628c8e2 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IPostService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IPostService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IRegionService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRegionService.java index 6f05bea7..75d7af46 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IRegionService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRegionService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ package org.springblade.system.service; import com.baomidou.mybatisplus.extension.service.IService; -import org.springblade.core.tool.node.INode; import org.springblade.system.entity.Region; +import org.springblade.system.vo.RegionVO; import java.util.List; import java.util.Map; @@ -52,7 +52,7 @@ public interface IRegionService extends IService { * @param param * @return */ - List lazyList(String parentCode, Map param); + List lazyList(String parentCode, Map param); /** * 懒加载列表 @@ -61,6 +61,6 @@ public interface IRegionService extends IService { * @param param * @return */ - List lazyTree(String parentCode, Map param); + List lazyTree(String parentCode, Map param); } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleMenuService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleMenuService.java index 8d44de34..7275e5b4 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleMenuService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleMenuService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 00000000..5cda1750 --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IRoleScopeService.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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 544fffd9..52f81cc2 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import org.springblade.system.entity.Role; import org.springblade.system.vo.RoleVO; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; import java.util.List; /** @@ -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/ITenantService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/ITenantService.java index 1783df15..6fdc8a7e 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/ITenantService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/ITenantService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserOauthService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IUserOauthService.java similarity index 87% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserOauthService.java rename to blade-service/blade-system/src/main/java/org/springblade/system/service/IUserOauthService.java index dc5f06d2..791c2dc8 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserOauthService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IUserOauthService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.service; +package org.springblade.system.service; import com.baomidou.mybatisplus.extension.service.IService; diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IUserService.java similarity index 94% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserService.java rename to blade-service/blade-system/src/main/java/org/springblade/system/service/IUserService.java index 7ec72819..793e2d89 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IUserService.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.service; +package org.springblade.system.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; @@ -22,7 +22,7 @@ import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.UserInfo; import org.springblade.system.user.entity.UserOauth; -import org.springblade.system.user.excel.UserExcel; +import org.springblade.system.excel.UserExcel; import java.util.List; diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/AuthClientServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/AuthClientServiceImpl.java index e75e5efb..2e260a4f 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/AuthClientServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/AuthClientServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 00000000..abe2b1ef --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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 78ac00bf..7606df04 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,13 @@ 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 List getDeptNames(String deptIds) { 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 671b7488..ba23ced3 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.exceptions.ApiException; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.tool.node.ForestNodeMerger; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringPool; @@ -70,9 +70,9 @@ public List getList(String code) { @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 ApiException("当前字典键值已存在!"); + throw new ServiceException("当前字典键值已存在!"); } return saveOrUpdate(dict); } 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 64dfe971..1a9d6a88 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,9 +28,11 @@ 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 @@ @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 List grantTree(BladeUser user) { 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/ParamServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ParamServiceImpl.java index 9cbd6239..d17f8b52 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ParamServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ParamServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/PostServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/PostServiceImpl.java index 6c57028d..decb61b9 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/PostServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/PostServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 16bb8642..cef6a484 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,12 @@ 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.tool.node.INode; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringPool; import org.springblade.system.entity.Region; import org.springblade.system.mapper.RegionMapper; import org.springblade.system.service.IRegionService; +import org.springblade.system.vo.RegionVO; import org.springframework.stereotype.Service; import java.util.List; @@ -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 boolean submit(Region region) { @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("请先删除子节点!"); } @@ -87,12 +87,12 @@ public boolean removeRegion(String id) { } @Override - public List lazyList(String parentCode, Map param) { + public List lazyList(String parentCode, Map param) { return baseMapper.lazyList(parentCode, param); } @Override - public List lazyTree(String parentCode, Map param) { + public List lazyTree(String parentCode, Map param) { return baseMapper.lazyTree(parentCode, param); } } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleMenuServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleMenuServiceImpl.java index 2217cd2c..89dc2b0d 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleMenuServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleMenuServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. 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 00000000..af2b830b --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleScopeServiceImpl.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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 ee4827a3..85315fad 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,14 +26,16 @@ 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; import org.springframework.validation.annotation.Validated; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -48,7 +50,8 @@ @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 List tree(String tenantId) { } @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 boolean grant(@NotEmpty List roleIds, @NotEmpty List menuIds) 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/service/impl/TenantServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TenantServiceImpl.java index 0751bd06..ac69c6a3 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TenantServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TenantServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +18,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.AllArgsConstructor; -import org.springblade.core.boot.tenant.TenantId; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.tenant.TenantId; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.utils.DigestUtil; diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserOauthServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/UserOauthServiceImpl.java similarity index 80% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserOauthServiceImpl.java rename to blade-service/blade-system/src/main/java/org/springblade/system/service/impl/UserOauthServiceImpl.java index d0fdb7af..ceb71d5b 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserOauthServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/UserOauthServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.service.impl; +package org.springblade.system.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.AllArgsConstructor; import org.springblade.system.user.entity.UserOauth; -import org.springblade.system.user.mapper.UserOauthMapper; -import org.springblade.system.user.service.IUserOauthService; +import org.springblade.system.mapper.UserOauthMapper; +import org.springblade.system.service.IUserOauthService; import org.springframework.stereotype.Service; /** diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/UserServiceImpl.java similarity index 89% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java rename to blade-service/blade-system/src/main/java/org/springblade/system/service/impl/UserServiceImpl.java index 278cdc77..1f4f8ddf 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/UserServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,13 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.service.impl; +package org.springblade.system.service.impl; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.exceptions.ApiException; import lombok.AllArgsConstructor; import org.springblade.common.constant.CommonConstant; import org.springblade.core.log.exception.ServiceException; @@ -31,10 +30,10 @@ import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.UserInfo; import org.springblade.system.user.entity.UserOauth; -import org.springblade.system.user.excel.UserExcel; -import org.springblade.system.user.mapper.UserMapper; -import org.springblade.system.user.service.IUserOauthService; -import org.springblade.system.user.service.IUserService; +import org.springblade.system.excel.UserExcel; +import org.springblade.system.mapper.UserMapper; +import org.springblade.system.service.IUserOauthService; +import org.springblade.system.service.IUserService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -61,9 +60,9 @@ public boolean submit(User user) { 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 ApiException("当前用户已存在!"); + throw new ServiceException("当前用户已存在!"); } return saveOrUpdate(user); } @@ -161,7 +160,7 @@ public List getDeptName(String deptIds) { @Override public void importUser(List data) { data.forEach(userExcel -> { - User user = Objects.requireNonNull(BeanUtil.copy(userExcel, User.class)); + User user = Objects.requireNonNull(BeanUtil.copyProperties(userExcel, User.class)); // 设置部门ID user.setDeptId(sysClient.getDeptIds(userExcel.getTenantId(), userExcel.getDeptName())); // 设置岗位ID @@ -191,11 +190,11 @@ public boolean registerGuest(User user, Long oauthId) { R result = sysClient.getTenant(user.getTenantId()); Tenant tenant = result.getData(); if (!result.isSuccess() || tenant == null || tenant.getId() == null) { - throw new ApiException("租户信息错误!"); + throw new ServiceException("租户信息错误!"); } UserOauth userOauth = userOauthService.getById(oauthId); if (userOauth == null || userOauth.getId() == null) { - throw new ApiException("第三方登陆信息错误!"); + throw new ServiceException("第三方登陆信息错误!"); } user.setRealName(user.getName()); user.setAvatar(userOauth.getAvatar()); 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 00000000..80c0b513 --- /dev/null +++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DataScopeWrapper.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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.copyProperties(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/DeptWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DeptWrapper.java index a393f43f..d158fa64 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DeptWrapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DeptWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ import org.springblade.common.constant.CommonConstant; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.node.ForestNodeMerger; -import org.springblade.core.tool.node.INode; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.SpringUtil; @@ -48,7 +47,7 @@ public static DeptWrapper build() { @Override public DeptVO entityVO(Dept dept) { - DeptVO deptVO = BeanUtil.copy(dept, DeptVO.class); + DeptVO deptVO = BeanUtil.copyProperties(dept, DeptVO.class); if (Func.equals(dept.getParentId(), CommonConstant.TOP_PARENT_ID)) { deptVO.setParentName(CommonConstant.TOP_PARENT_NAME); } else { @@ -58,8 +57,8 @@ public DeptVO entityVO(Dept dept) { return deptVO; } - public List listNodeVO(List list) { - List collect = list.stream().map(dept -> BeanUtil.copy(dept, DeptVO.class)).collect(Collectors.toList()); + public List listNodeVO(List list) { + List collect = list.stream().map(dept -> BeanUtil.copyProperties(dept, DeptVO.class)).collect(Collectors.toList()); return ForestNodeMerger.merge(collect); } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DictWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DictWrapper.java index 39a20c3b..6f8e8cb5 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DictWrapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/DictWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ import org.springblade.common.constant.CommonConstant; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.node.ForestNodeMerger; -import org.springblade.core.tool.node.INode; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.SpringUtil; @@ -48,7 +47,7 @@ public static DictWrapper build() { @Override public DictVO entityVO(Dict dict) { - DictVO dictVO = BeanUtil.copy(dict, DictVO.class); + DictVO dictVO = BeanUtil.copyProperties(dict, DictVO.class); if (Func.equals(dict.getParentId(), CommonConstant.TOP_PARENT_ID)) { dictVO.setParentName(CommonConstant.TOP_PARENT_NAME); } else { @@ -58,8 +57,8 @@ public DictVO entityVO(Dict dict) { return dictVO; } - public List listNodeVO(List list) { - List collect = list.stream().map(dict -> BeanUtil.copy(dict, DictVO.class)).collect(Collectors.toList()); + public List listNodeVO(List list) { + List collect = list.stream().map(dict -> BeanUtil.copyProperties(dict, DictVO.class)).collect(Collectors.toList()); return ForestNodeMerger.merge(collect); } 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 1e4737c6..de3bc21d 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 @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ public static MenuWrapper build() { @Override public MenuVO entityVO(Menu menu) { - MenuVO menuVO = BeanUtil.copy(menu, MenuVO.class); + MenuVO menuVO = BeanUtil.copyProperties(menu, MenuVO.class); if (Func.equals(menu.getParentId(), CommonConstant.TOP_PARENT_ID)) { menuVO.setParentName(CommonConstant.TOP_PARENT_NAME); } else { @@ -76,8 +76,12 @@ public MenuVO entityVO(Menu menu) { public List listNodeVO(List

list) { - List collect = list.stream().map(menu -> BeanUtil.copy(menu, MenuVO.class)).collect(Collectors.toList()); + List collect = list.stream().map(menu -> BeanUtil.copyProperties(menu, MenuVO.class)).collect(Collectors.toList()); return ForestNodeMerger.merge(collect); } + public List listNodeLazyVO(List list) { + return ForestNodeMerger.merge(list); + } + } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/PostWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/PostWrapper.java index 6707aaa5..ded28e82 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/PostWrapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/PostWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ public static PostWrapper build() { @Override public PostVO entityVO(Post post) { - PostVO postVO = Objects.requireNonNull(BeanUtil.copy(post, PostVO.class)); + PostVO postVO = Objects.requireNonNull(BeanUtil.copyProperties(post, PostVO.class)); String categoryName = dictService.getValue("post_category", post.getCategory()); postVO.setCategoryName(categoryName); return postVO; diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RegionWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RegionWrapper.java index 97f73ac4..03db63f5 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RegionWrapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RegionWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.node.ForestNodeMerger; -import org.springblade.core.tool.node.INode; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.SpringUtil; import org.springblade.system.entity.Region; @@ -46,13 +45,13 @@ public static RegionWrapper build() { @Override public RegionVO entityVO(Region region) { - RegionVO regionVO = Objects.requireNonNull(BeanUtil.copy(region, RegionVO.class)); + RegionVO regionVO = Objects.requireNonNull(BeanUtil.copyProperties(region, RegionVO.class)); Region parentRegion = regionService.getById(region.getParentCode()); regionVO.setParentName(parentRegion.getName()); return regionVO; } - public List listNodeLazyVO(List list) { + public List listNodeLazyVO(List list) { return ForestNodeMerger.merge(list); } diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RoleWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RoleWrapper.java index b7bdeb93..ed48eadd 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RoleWrapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/RoleWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ import org.springblade.common.constant.CommonConstant; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.node.ForestNodeMerger; -import org.springblade.core.tool.node.INode; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.SpringUtil; @@ -48,7 +47,7 @@ public static RoleWrapper build() { @Override public RoleVO entityVO(Role role) { - RoleVO roleVO = BeanUtil.copy(role, RoleVO.class); + RoleVO roleVO = BeanUtil.copyProperties(role, RoleVO.class); if (Func.equals(role.getParentId(), CommonConstant.TOP_PARENT_ID)) { roleVO.setParentName(CommonConstant.TOP_PARENT_NAME); } else { @@ -58,8 +57,8 @@ public RoleVO entityVO(Role role) { return roleVO; } - public List listNodeVO(List list) { - List collect = list.stream().map(this::entityVO).collect(Collectors.toList()); + public List listNodeVO(List list) { + List collect = list.stream().map(this::entityVO).collect(Collectors.toList()); return ForestNodeMerger.merge(collect); } diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/wrapper/UserWrapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/UserWrapper.java similarity index 89% rename from blade-service/blade-user/src/main/java/org/springblade/system/user/wrapper/UserWrapper.java rename to blade-service/blade-system/src/main/java/org/springblade/system/wrapper/UserWrapper.java index c1495e83..088ac06f 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/wrapper/UserWrapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/wrapper/UserWrapper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com). *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springblade.system.user.wrapper; +package org.springblade.system.wrapper; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.api.R; @@ -22,7 +22,7 @@ import org.springblade.core.tool.utils.SpringUtil; import org.springblade.system.feign.IDictClient; import org.springblade.system.user.entity.User; -import org.springblade.system.user.service.IUserService; +import org.springblade.system.service.IUserService; import org.springblade.system.user.vo.UserVO; import java.util.List; @@ -49,7 +49,7 @@ public static UserWrapper build() { @Override public UserVO entityVO(User user) { - UserVO userVO = BeanUtil.copy(user, UserVO.class); + UserVO userVO = BeanUtil.copyProperties(user, UserVO.class); List roleName = userService.getRoleName(user.getRoleId()); List deptName = userService.getDeptName(user.getDeptId()); userVO.setRoleName(Func.join(roleName)); diff --git a/blade-service/blade-user/Dockerfile b/blade-service/blade-user/Dockerfile deleted file mode 100644 index fd34191d..00000000 --- a/blade-service/blade-user/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM anapsix/alpine-java:8_server-jre_unlimited - -MAINTAINER smallchill@163.com - -RUN mkdir -p /blade/user - -WORKDIR /blade/user - -EXPOSE 8102 - -ADD ./target/blade-user.jar ./app.jar - -ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] - -CMD ["--spring.profiles.active=test"] diff --git a/blade-service/blade-user/pom.xml b/blade-service/blade-user/pom.xml deleted file mode 100644 index 4ade56b9..00000000 --- a/blade-service/blade-user/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - blade-service - org.springblade - 2.8.0 - - - 4.0.0 - - blade-user - ${project.artifactId} - ${blade.project.version} - jar - - - - org.springblade - blade-core-boot - ${blade.tool.version} - - - org.springblade - blade-user-api - ${blade.project.version} - - - org.springblade - blade-dict-api - ${blade.project.version} - - - org.springblade - blade-system-api - ${blade.project.version} - - - com.alibaba - easyexcel - ${easyexcel.version} - - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - package - - run - - - - - - - - - - - - - - diff --git a/blade-service/blade-user/src/main/resources/application-dev.yml b/blade-service/blade-user/src/main/resources/application-dev.yml deleted file mode 100644 index 2d9323b6..00000000 --- a/blade-service/blade-user/src/main/resources/application-dev.yml +++ /dev/null @@ -1,10 +0,0 @@ -#服务器端口 -server: - port: 8102 - -#数据源配置 -spring: - datasource: - url: ${blade.datasource.dev.url} - username: ${blade.datasource.dev.username} - password: ${blade.datasource.dev.password} diff --git a/blade-service/blade-user/src/main/resources/application-prod.yml b/blade-service/blade-user/src/main/resources/application-prod.yml deleted file mode 100644 index c0d8c056..00000000 --- a/blade-service/blade-user/src/main/resources/application-prod.yml +++ /dev/null @@ -1,10 +0,0 @@ -#服务器端口 -server: - port: 8102 - -#数据源配置 -spring: - datasource: - url: ${blade.datasource.prod.url} - username: ${blade.datasource.prod.username} - password: ${blade.datasource.prod.password} diff --git a/blade-service/blade-user/src/main/resources/application-test.yml b/blade-service/blade-user/src/main/resources/application-test.yml deleted file mode 100644 index 57b842e0..00000000 --- a/blade-service/blade-user/src/main/resources/application-test.yml +++ /dev/null @@ -1,10 +0,0 @@ -#服务器端口 -server: - port: 8102 - -#数据源配置 -spring: - datasource: - url: ${blade.datasource.test.url} - username: ${blade.datasource.test.username} - password: ${blade.datasource.test.password} diff --git a/blade-service/pom.xml b/blade-service/pom.xml index c7b531b4..b61cdffb 100644 --- a/blade-service/pom.xml +++ b/blade-service/pom.xml @@ -7,12 +7,11 @@ org.springblade SpringBlade - 2.8.0 + ${revision} blade-service ${project.artifactId} - 2.8.0 pom SpringBlade 微服务集合 @@ -20,7 +19,6 @@ blade-desk blade-log blade-system - blade-user blade-demo @@ -28,7 +26,10 @@ org.springblade blade-common - ${blade.project.version} + + + org.springblade + blade-scope-api diff --git a/doc/docker/README.md b/doc/docker/README.md deleted file mode 100644 index 6a058fdd..00000000 --- a/doc/docker/README.md +++ /dev/null @@ -1,95 +0,0 @@ -#使用docker构建工程步骤 -###1. 使用docker-harbor作为私有库,需要配置maven,找到setting.xml( `linux可以使用find / -name settings.xml`)加入以下配置 - -``` - - - 10.211.55.5 - admin - Harbor12345 - - smallchill@163.com - - - - - - com.spotify - -``` - -###2. docker开启远程访问 - -如果没有远程访问,会报 `Connect to 10.211.55.5:2375 [/10.211.55.5] failed: Connection refused: connect` - -在`/usr/lib/systemd/system/docker.service`,配置远程访问。主要是在[Service]这个部分,加上下面两个参数: - -``` -cd /usr/lib/systemd/system - -vi docker.service - -ExecStart= -ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock -``` - - - -###3. 在每个需要构建子项目的pom.xml下加入配置,内容可参考如下 - -``` - - - - com.spotify - docker-maven-plugin - ${docker.plugin.version} - - ${docker.registry.url}/blade/${project.artifactId}:${project.version} - ${project.basedir} - ${docker.registry.host} - - - / - ${project.build.directory} - ${project.build.finalName}.jar - - - ${docker.registry.url} - ${docker.registry.url} - true - - - - -``` - -###4. 在每个需要构建子项目的根目录下加入Dockerfile,内容可参考如下 - -``` -FROM anapsix/alpine-java:8_server-jre_unlimited - -MAINTAINER smallchill@163.com - -RUN mkdir -p /blade/gateway - -WORKDIR /blade/gateway - -EXPOSE 80 - -ADD ./target/blade-gateway.jar ./app.jar - -CMD java -Djava.security.egd=file:/dev/./urandom -jar app.jar --spring.profiles.active=test - -``` - -###5. 在工程根目录的docker-compose.yml下加入配置,内容可参考如下 -``` -blade-gateway: - image: "${REGISTER}/blade/blade-gateway:${TAG}" - ports: - - 80:80 - networks: - blade_net: - ipv4_address: 192.168.2.1 -``` diff --git a/doc/nacos/blade-demo-dev.yaml b/doc/nacos/blade-demo-dev.yaml index fee2be5a..9487d49e 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-dev.yaml b/doc/nacos/blade-dev.yaml index ee93b8ae..9d315f66 100644 --- a/doc/nacos/blade-dev.yaml +++ b/doc/nacos/blade-dev.yaml @@ -1,16 +1,18 @@ #spring配置 spring: - redis: - ##redis 单机环境配置 - host: 127.0.0.1 - port: 6379 - password: - database: 0 - ssl: false - ##redis 集群环境配置 - #cluster: - # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 - # commandTimeout: 5000 + data: + redis: + ##redis 单机环境配置 + host: 127.0.0.1 + port: 6379 + password: + database: 0 + ssl: + enabled: false + ##redis 集群环境配置 + #cluster: + # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 + # commandTimeout: 5000 #项目模块集中配置 blade: diff --git a/doc/nacos/blade-prod.yaml b/doc/nacos/blade-prod.yaml index b833ea96..0f088b75 100644 --- a/doc/nacos/blade-prod.yaml +++ b/doc/nacos/blade-prod.yaml @@ -1,16 +1,18 @@ #spring配置 spring: - redis: - ##redis 单机环境配置 - host: 10.211.55.5 - port: 3379 - password: - database: 0 - ssl: false - ##redis 集群环境配置 - #cluster: - # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 - # commandTimeout: 5000 + data: + redis: + ##redis 单机环境配置 + host: 10.211.55.5 + port: 3379 + password: + database: 0 + ssl: + enabled: false + ##redis 集群环境配置 + #cluster: + # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 + # commandTimeout: 5000 #项目模块集中配置 blade: diff --git a/doc/nacos/blade-test.yaml b/doc/nacos/blade-test.yaml index c428cf64..7b5544ad 100644 --- a/doc/nacos/blade-test.yaml +++ b/doc/nacos/blade-test.yaml @@ -1,16 +1,18 @@ #spring配置 spring: - redis: - ##redis 单机环境配置 - host: 10.211.55.5 - port: 3379 - password: - database: 0 - ssl: false - ##redis 集群环境配置 - #cluster: - # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 - # commandTimeout: 5000 + data: + redis: + ##redis 单机环境配置 + host: 10.211.55.5 + port: 3379 + password: + database: 0 + ssl: + enabled: false + ##redis 集群环境配置 + #cluster: + # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 + # commandTimeout: 5000 #项目模块集中配置 blade: diff --git a/doc/nacos/blade.yaml b/doc/nacos/blade.yaml index fa39e71d..0f78c0c1 100644 --- a/doc/nacos/blade.yaml +++ b/doc/nacos/blade.yaml @@ -1,14 +1,16 @@ #服务器配置 server: undertow: - # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 - io-threads: 4 - # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载 - worker-threads: 20 # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理 buffer-size: 1024 # 是否分配的直接内存 direct-buffers: true + # 线程配置 + threads: + # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 + io: 16 + # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载 + worker: 400 #spring配置 spring: @@ -23,40 +25,13 @@ spring: #feign配置 feign: - hystrix: + sentinel: enabled: true okhttp: enabled: true httpclient: enabled: false -#hystrix配置 -hystrix: - threadpool: - default: - coreSize: 300 - maxQueueSize: 1000 - queueSizeRejectionThreshold: 800 - command: - default: - execution: - isolation: - thread: - timeoutInMilliseconds: 5000 - -#ribbon配置 -ribbon: - #对当前实例的重试次数 - MaxAutoRetries: 1 - #切换实例的重试次数 - MaxAutoRetriesNextServer: 2 - #请求处理的超时时间 - ReadTimeout: 60000 - #请求连接的超时时间 - ConnectTimeout: 60000 - #对所有操作请求都进行重试 - OkToRetryOnAllOperations: true - #对外暴露端口 management: endpoints: @@ -67,6 +42,10 @@ management: health: show-details: always +#springdoc-openapi配置 +springdoc: + default-flat-param-object: true + #knife4j配置 knife4j: #启用 @@ -85,10 +64,36 @@ knife4j: enableRequestCache: true enableFilterMultipartApis: false enableFilterMultipartApiMethodType: POST - language: zh-CN + language: zh_cn + enableFooter: false + enableFooterCustom: true + footerCustomContent: Copyright © 2025 SpringBlade All Rights Reserved + +#swagger配置信息 +swagger: + title: SpringBlade 接口文档系统 + description: SpringBlade 接口文档系统 + version: 4.5.0 + license: Powered By SpringBlade + licenseUrl: https://bladex.cn + terms-of-service-url: https://bladex.cn + contact: + name: smallchill + email: bladejava@qq.com + url: https://gitee.com/smallc #blade配置 blade: + auth: + #使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2验签,需和前端保持一致 + public-key: ${BLADE_OAUTH2_PUBLIC_KEY} + #使用 @org.springblade.test.Sm2KeyGenerator 获取,用于国密sm2解密,前端无需配置 + private-key: ${BLADE_OAUTH2_PRIVATE_KEY} + token: + #使用 @org.springblade.test.SignKeyGenerator 获取 + sign-key: ${BLADE_TOKEN_SIGN_KEY} + #使用 @org.springblade.test.SignKeyGenerator 获取 + aes-key: ${BLADE_TOKEN_CRYPTO_KEY} xss: enabled: true skip-url: diff --git a/doc/sql/blade/blade-saber-mysql.sql b/doc/sql/blade/blade-saber-mysql.sql index 3a0c6b1f..43c6dbe6 100644 --- a/doc/sql/blade/blade-saber-mysql.sql +++ b/doc/sql/blade/blade-saber-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:50 + Date: 02/11/2021 16:34:09 */ 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,17 @@ 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_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 '是否已删除', @@ -103,7 +105,7 @@ CREATE TABLE `blade_datasource` ( -- Records of blade_datasource -- ---------------------------- BEGIN; -INSERT INTO `blade_datasource` VALUES (1123598812738675201, 'mysql', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3306/blade?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'root', 'mysql', 1, '2019-08-14 11:43:06', 1, '2019-08-14 11:43:06', 1, 0), (1123598812738675202, 'postgresql', 'org.postgresql.Driver', 'jdbc:postgresql://127.0.0.1:5432/blade', 'postgres', '123456', 'postgresql', 1, '2019-08-14 11:43:41', 1, '2019-08-14 11:43:41', 1, 0), (1123598812738675203, 'oracle', 'oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@127.0.0.1:49161:orcl', 'BLADE', 'blade', 'oracle', 1, '2019-08-14 11:44:03', 1, '2019-08-14 11:44:03', 1, 0); +INSERT INTO `blade_datasource` VALUES (1123598812738675201, 'mysql', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3306/blade?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'root', 'mysql', 1, 1123598813738675201, '2019-08-14 11:43:06', 1, '2019-08-14 11:43:06', 1, 0), (1123598812738675202, 'postgresql', 'org.postgresql.Driver', 'jdbc:postgresql://127.0.0.1:5432/blade', 'postgres', '123456', 'postgresql', 1, 1123598813738675201, '2019-08-14 11:43:41', 1, '2019-08-14 11:43:41', 1, 0), (1123598812738675203, 'oracle', 'oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@127.0.0.1:49161:orcl', 'BLADE', 'blade', 'oracle', 1, 1123598813738675201, '2019-08-14 11:44:03', 1, '2019-08-14 11:44:03', 1, 0); COMMIT; -- ---------------------------- @@ -111,9 +113,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 +129,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 +137,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 +152,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 +160,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 +186,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 +215,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 +242,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 +262,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-system/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-system/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; -- ---------------------------- @@ -267,15 +270,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 +290,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 +298,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 +317,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 +325,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 +392,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 +406,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 +428,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 +438,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 '是否已删除', @@ -461,7 +503,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 +511,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 +526,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 +540,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 +548,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 c261e2c0..89da663d 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,17 @@ 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_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 '是否已删除', @@ -103,7 +105,7 @@ CREATE TABLE `blade_datasource` ( -- Records of blade_datasource -- ---------------------------- BEGIN; -INSERT INTO `blade_datasource` VALUES (1123598812738675201, 'mysql', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3306/blade?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'root', 'mysql', 1, '2019-08-14 11:43:06', 1, '2019-08-14 11:43:06', 1, 0), (1123598812738675202, 'postgresql', 'org.postgresql.Driver', 'jdbc:postgresql://127.0.0.1:5432/blade', 'postgres', '123456', 'postgresql', 1, '2019-08-14 11:43:41', 1, '2019-08-14 11:43:41', 1, 0), (1123598812738675203, 'oracle', 'oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@127.0.0.1:49161:orcl', 'BLADE', 'blade', 'oracle', 1, '2019-08-14 11:44:03', 1, '2019-08-14 11:44:03', 1, 0); +INSERT INTO `blade_datasource` VALUES (1123598812738675201, 'mysql', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3306/blade?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'root', 'mysql', 1, 1123598813738675201, '2019-08-14 11:43:06', 1, '2019-08-14 11:43:06', 1, 0), (1123598812738675202, 'postgresql', 'org.postgresql.Driver', 'jdbc:postgresql://127.0.0.1:5432/blade', 'postgres', '123456', 'postgresql', 1, 1123598813738675201, '2019-08-14 11:43:41', 1, '2019-08-14 11:43:41', 1, 0), (1123598812738675203, 'oracle', 'oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@127.0.0.1:49161:orcl', 'BLADE', 'blade', 'oracle', 1, 1123598813738675201, '2019-08-14 11:44:03', 1, '2019-08-14 11:44:03', 1, 0); COMMIT; -- ---------------------------- @@ -111,9 +113,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 +129,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 +137,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 +152,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 +160,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 +186,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 +215,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 +242,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 +262,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-system/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-system/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 +270,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 +290,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 +298,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 +317,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 +325,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 +392,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 +406,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 +428,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 +438,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 +503,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 +511,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 +526,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 +540,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 +548,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-2.7.3~2.8.0.sql b/doc/sql/blade/blade-update-2.7.3~2.8.0.sql deleted file mode 100644 index 220d7a5b..00000000 --- a/doc/sql/blade/blade-update-2.7.3~2.8.0.sql +++ /dev/null @@ -1,32 +0,0 @@ --- ---------------------------- --- 报表文件表 --- ---------------------------- -CREATE TABLE `blade_report_file` ( - `id` bigint(64) 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 '创建时间', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', - PRIMARY KEY (`id`) -) COMMENT = '报表文件表'; - --- ---------------------------- --- 插入报表文件表菜单数据 --- ---------------------------- -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962301', '0', 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962302', '1164733399669962301', 'report_setting', '报表配置', 'menu', 'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 1, NULL, 0); -INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) -VALUES ('1164733399669962303', '1164733399669962301', 'report_list', '报表列表', 'menu', '/report/reportlist', 'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0); - --- ---------------------------- --- 增加报表文件表菜单权限数据 --- ---------------------------- -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875228001', '1164733399669962301', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875228002', '1164733399669962302', '1123598816738675201'); -INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`) -VALUES ('1161272893875228003', '1164733399669962303', '1123598816738675201'); diff --git a/pic/bladex-flow1.png b/pic/bladex-flow1.png deleted file mode 100644 index 31f26550..00000000 Binary files a/pic/bladex-flow1.png and /dev/null differ diff --git a/pic/bladex-flow2.png b/pic/bladex-flow2.png deleted file mode 100644 index d1e9604e..00000000 Binary files a/pic/bladex-flow2.png and /dev/null differ diff --git a/pic/bladex-flow3.png b/pic/bladex-flow3.png deleted file mode 100644 index 027f7324..00000000 Binary files a/pic/bladex-flow3.png and /dev/null differ diff --git a/pic/bladex-flow4.png b/pic/bladex-flow4.png deleted file mode 100644 index 98786ee0..00000000 Binary files a/pic/bladex-flow4.png and /dev/null differ diff --git a/pic/bladex-flow5.png b/pic/bladex-flow5.png deleted file mode 100644 index 875ce005..00000000 Binary files a/pic/bladex-flow5.png and /dev/null differ diff --git a/pic/bladex-flow6.png b/pic/bladex-flow6.png deleted file mode 100644 index ee11b526..00000000 Binary files a/pic/bladex-flow6.png and /dev/null differ diff --git a/pic/saber-code.png b/pic/saber-code.png deleted file mode 100644 index 130579ed..00000000 Binary files a/pic/saber-code.png and /dev/null differ diff --git a/pic/saber-dict-select.png b/pic/saber-dict-select.png deleted file mode 100644 index c2e34690..00000000 Binary files a/pic/saber-dict-select.png and /dev/null differ diff --git a/pic/saber-dict.png b/pic/saber-dict.png deleted file mode 100644 index d3dcefa2..00000000 Binary files a/pic/saber-dict.png and /dev/null differ diff --git a/pic/saber-log.png b/pic/saber-log.png deleted file mode 100644 index 05bfc574..00000000 Binary files a/pic/saber-log.png and /dev/null differ diff --git a/pic/saber-role.png b/pic/saber-role.png deleted file mode 100644 index b49bd038..00000000 Binary files a/pic/saber-role.png and /dev/null differ diff --git a/pic/saber-user.png b/pic/saber-user.png deleted file mode 100644 index 78756dab..00000000 Binary files a/pic/saber-user.png and /dev/null differ diff --git a/pic/springblade-admin1.png b/pic/springblade-admin1.png deleted file mode 100644 index be362acd..00000000 Binary files a/pic/springblade-admin1.png and /dev/null differ diff --git a/pic/springblade-admin2.png b/pic/springblade-admin2.png deleted file mode 100644 index cbfca541..00000000 Binary files a/pic/springblade-admin2.png and /dev/null differ diff --git a/pic/springblade-framework.png b/pic/springblade-framework.png deleted file mode 100644 index 8c1e8e18..00000000 Binary files a/pic/springblade-framework.png and /dev/null differ diff --git a/pic/springblade-grafana.png b/pic/springblade-grafana.png deleted file mode 100644 index 9dc318d4..00000000 Binary files a/pic/springblade-grafana.png and /dev/null differ diff --git a/pic/springblade-harbor.png b/pic/springblade-harbor.png deleted file mode 100644 index 5611bb49..00000000 Binary files a/pic/springblade-harbor.png and /dev/null differ diff --git a/pic/springblade-k8s1.png b/pic/springblade-k8s1.png deleted file mode 100644 index bdf36413..00000000 Binary files a/pic/springblade-k8s1.png and /dev/null differ diff --git a/pic/springblade-k8s2.png b/pic/springblade-k8s2.png deleted file mode 100644 index d10ed87a..00000000 Binary files a/pic/springblade-k8s2.png and /dev/null differ diff --git a/pic/springblade-nacos.png b/pic/springblade-nacos.png deleted file mode 100644 index 7a789b45..00000000 Binary files a/pic/springblade-nacos.png and /dev/null differ diff --git a/pic/springblade-sentinel.png b/pic/springblade-sentinel.png deleted file mode 100644 index 8e6e4e62..00000000 Binary files a/pic/springblade-sentinel.png and /dev/null differ diff --git a/pic/springblade-swagger1.png b/pic/springblade-swagger1.png deleted file mode 100644 index 5ac6e905..00000000 Binary files a/pic/springblade-swagger1.png and /dev/null differ diff --git a/pic/springblade-swagger2.png b/pic/springblade-swagger2.png deleted file mode 100644 index 66a8165f..00000000 Binary files a/pic/springblade-swagger2.png and /dev/null differ diff --git a/pic/springblade-traefik-health.png b/pic/springblade-traefik-health.png deleted file mode 100644 index 733172f2..00000000 Binary files a/pic/springblade-traefik-health.png and /dev/null differ diff --git a/pic/springblade-traefik.png b/pic/springblade-traefik.png deleted file mode 100644 index ccd95b24..00000000 Binary files a/pic/springblade-traefik.png and /dev/null differ diff --git a/pic/sword-dict.png b/pic/sword-dict.png deleted file mode 100644 index 89f8ed3b..00000000 Binary files a/pic/sword-dict.png and /dev/null differ diff --git a/pic/sword-locale-cn.png b/pic/sword-locale-cn.png deleted file mode 100644 index b832ae34..00000000 Binary files a/pic/sword-locale-cn.png and /dev/null differ diff --git a/pic/sword-locale-us.png b/pic/sword-locale-us.png deleted file mode 100644 index ebb8f325..00000000 Binary files a/pic/sword-locale-us.png and /dev/null differ diff --git a/pic/sword-log.png b/pic/sword-log.png deleted file mode 100644 index 08caf63d..00000000 Binary files a/pic/sword-log.png and /dev/null differ diff --git a/pic/sword-main.png b/pic/sword-main.png deleted file mode 100644 index c7984d35..00000000 Binary files a/pic/sword-main.png and /dev/null differ diff --git a/pic/sword-menu-edit.png b/pic/sword-menu-edit.png deleted file mode 100644 index a3bd0a1e..00000000 Binary files a/pic/sword-menu-edit.png and /dev/null differ diff --git a/pic/sword-menu-icon.png b/pic/sword-menu-icon.png deleted file mode 100644 index ccc0c58b..00000000 Binary files a/pic/sword-menu-icon.png and /dev/null differ diff --git a/pic/sword-menu.png b/pic/sword-menu.png deleted file mode 100644 index 43ee0308..00000000 Binary files a/pic/sword-menu.png and /dev/null differ diff --git a/pic/sword-role.png b/pic/sword-role.png deleted file mode 100644 index 3f640e28..00000000 Binary files a/pic/sword-role.png and /dev/null differ diff --git a/pic/sword-user.png b/pic/sword-user.png deleted file mode 100644 index 3414a334..00000000 Binary files a/pic/sword-user.png and /dev/null differ diff --git a/pom.xml b/pom.xml index 67cb326f..4514578c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,31 +5,22 @@ org.springblade SpringBlade - 2.8.0 + ${revision} pom - 2.8.0 - 2.8.0 + 4.5.0 - 1.8 - 3.8.1 - 2.10.5 - 1.6.2 - 2.2.0.RELEASE - 2.0.6 - 3.4.0 - 1.6.0 - 1.6.2 - 2.2.6 - 1.2.5 - 2.2.3.RELEASE - 2.3.0 - 2.0.0.RELEASE + 4.5.0 + + 17 + 3.11.0 + 1.3.0 - 2.2.11.RELEASE - Hoxton.SR8 - Cairo-SR8 + 1.6.2 + 3.3.4 + 4.1.2 + 3.1.3 10.211.55.5 @@ -48,36 +39,121 @@ + - org.springframework.plugin - spring-plugin-core - ${spring.plugin.version} + org.springblade + blade-core-bom + ${blade.tool.version} + pom + import + - org.springframework.plugin - spring-plugin-metadata - ${spring.plugin.version} + org.springblade + blade-common + ${revision} - org.springframework.boot - spring-boot-dependencies - ${spring.boot.version} - pom - import + org.springblade + blade-dict-api + ${revision} - org.springframework.cloud - spring-cloud-dependencies - ${spring.cloud.version} - pom - import + org.springblade + blade-scope-api + ${revision} - io.spring.platform - platform-bom - ${spring.platform.version} - pom - import + org.springblade + blade-desk-api + ${revision} + + + org.springblade + blade-user-api + ${revision} + + + org.springblade + blade-system-api + ${revision} + + + org.springblade + blade-demo-api + ${revision} + + + + de.codecentric + spring-boot-admin-starter-server + 3.2.3 + + + de.codecentric + spring-boot-admin-starter-client + 3.2.3 + + + + com.github.whvcse + easy-captcha + ${captcha.version} + + + + com.alibaba + easyexcel + ${easyexcel.version} + + + org.apache.poi + poi + ${poi.version} + + + org.apache.poi + poi-ooxml + ${poi.version} + + + org.apache.poi + poi-ooxml-schemas + ${poi.version} + + + org.apache.poi + poi-scratchpad + ${poi.version} + + + org.apache.poi + ooxml-schemas + 1.4 + + + + com.baomidou + dynamic-datasource-spring-boot3-starter + 4.3.0 + + + + io.jsonwebtoken + jjwt-impl + 0.11.2 + + + io.jsonwebtoken + jjwt-jackson + 0.11.2 + + + + net.dreamlu + mica-auto + ${mica.auto.version} + provided @@ -108,7 +184,7 @@ org.springframework.boot spring-boot-maven-plugin - ${spring.boot.version} + 3.2.10 ${project.build.finalName} @@ -120,9 +196,64 @@ + + + org.apache.maven.plugins + maven-antrun-plugin + 3.1.0 + + + package + + run + + + + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + ${maven.flatten.version} + + true + oss + + remove + remove + remove + remove + remove + remove + + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + org.springframework.boot spring-boot-maven-plugin @@ -139,6 +270,23 @@ + + org.commonjava.maven.plugins + directory-maven-plugin + 1.0 + + + directories + + highest-basedir + + initialize + + project.root.directory + + + + diff --git a/script/docker/.env b/script/docker/.env index c83f8b08..c3bd0472 100644 --- a/script/docker/.env +++ b/script/docker/.env @@ -1,2 +1,2 @@ REGISTER=192.168.0.157/blade -TAG=2.8.0 +TAG=4.5.0 diff --git a/script/docker/deploy.sh b/script/docker/deploy.sh index db209536..cc286cfc 100644 --- a/script/docker/deploy.sh +++ b/script/docker/deploy.sh @@ -1,3 +1,4 @@ +#!/bin/bash #使用说明,用来提示输入参数 usage() { @@ -10,11 +11,14 @@ port(){ firewall-cmd --add-port=88/tcp --permanent firewall-cmd --add-port=8000/tcp --permanent firewall-cmd --add-port=8848/tcp --permanent + firewall-cmd --add-port=9848/tcp --permanent + firewall-cmd --add-port=9849/tcp --permanent firewall-cmd --add-port=8858/tcp --permanent firewall-cmd --add-port=3306/tcp --permanent firewall-cmd --add-port=3379/tcp --permanent firewall-cmd --add-port=7002/tcp --permanent firewall-cmd --add-port=9411/tcp --permanent + firewall-cmd --add-port=18000/tcp --permanent service firewalld restart } @@ -29,9 +33,9 @@ mount(){ cp nginx/web/nginx.conf /docker/nginx/web/nginx.conf cp -r nginx/web/html /docker/nginx/web/html fi - if test ! -f "/docker/nacos/init.d/custom.properties" ;then - mkdir -p /docker/nacos/init.d - cp nacos/init.d/custom.properties /docker/nacos/init.d/custom.properties + if test ! -f "/docker/nacos/conf/application.properties" ;then + mkdir -p /docker/nacos/conf + cp nacos/conf/application.properties /docker/nacos/conf/application.properties fi } @@ -42,7 +46,7 @@ base(){ #启动程序模块 modules(){ - docker-compose up -d blade-gateway1 blade-gateway2 blade-admin blade-zipkin blade-auth1 blade-auth2 blade-user blade-desk blade-system blade-log + docker-compose up -d blade-gateway1 blade-gateway2 blade-admin blade-auth1 blade-auth2 blade-desk blade-system blade-log blade-report blade-develop } #关闭所有模块 diff --git a/script/docker/docker-compose.yml b/script/docker/docker-compose.yml index b6130cc8..f5d26f7c 100644 --- a/script/docker/docker-compose.yml +++ b/script/docker/docker-compose.yml @@ -1,21 +1,29 @@ version: '3' services: nacos: - image: nacos/nacos-server:1.3.2 + image: nacos/nacos-server:v2.3.2 hostname: "nacos-standalone" environment: + - NACOS_AUTH_ENABLE=true + - NACOS_AUTH_CACHE_ENABLE=true + - NACOS_AUTH_IDENTITY_KEY=nacos + - NACOS_AUTH_IDENTITY_VALUE=nacos + - NACOS_AUTH_TOKEN= # 请阅读官方文档了解规则后替换为自己的token:https://nacos.io/zh-cn/docs/v2/guide/user/auth.html - MODE=standalone + - TZ=Asia/Shanghai volumes: - /docker/nacos/standalone-logs/:/home/nacos/logs - - /docker/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties + - /docker/nacos/conf/application.properties:/home/nacos/conf/application.properties ports: - 8848:8848 + - 9848:9848 + - 9849:9849 networks: blade_net: ipv4_address: 172.30.0.48 sentinel: - image: bladex/sentinel-dashboard:1.7.2 + image: bladex/sentinel-dashboard:1.8.0 hostname: "sentinel" ports: - 8858:8858 @@ -63,7 +71,7 @@ services: - blade_net blade-admin: - image: "${REGISTER}/blade/blade-admin:${TAG}" + image: "${REGISTER}/blade-admin:${TAG}" ports: - 7002:7002 privileged: true @@ -71,17 +79,8 @@ services: networks: - blade_net - blade-zipkin: - image: "${REGISTER}/blade/blade-zipkin:${TAG}" - ports: - - 9411:9411 - privileged: true - restart: always - networks: - - blade_net - blade-gateway1: - image: "${REGISTER}/blade/blade-gateway:${TAG}" + image: "${REGISTER}/blade-gateway:${TAG}" privileged: true restart: always networks: @@ -89,7 +88,7 @@ services: ipv4_address: 172.30.0.81 blade-gateway2: - image: "${REGISTER}/blade/blade-gateway:${TAG}" + image: "${REGISTER}/blade-gateway:${TAG}" privileged: true restart: always networks: @@ -97,7 +96,7 @@ services: ipv4_address: 172.30.0.82 blade-auth1: - image: "${REGISTER}/blade/blade-auth:${TAG}" + image: "${REGISTER}/blade-auth:${TAG}" privileged: true restart: always networks: @@ -105,7 +104,7 @@ services: ipv4_address: 172.30.0.91 blade-auth2: - image: "${REGISTER}/blade/blade-auth:${TAG}" + image: "${REGISTER}/blade-auth:${TAG}" privileged: true restart: always networks: @@ -113,7 +112,7 @@ services: ipv4_address: 172.30.0.92 blade-report: - image: "${REGISTER}/blade/blade-report:${TAG}" + image: "${REGISTER}/blade-report:${TAG}" privileged: true restart: always networks: @@ -121,35 +120,35 @@ services: ipv4_address: 172.30.0.98 blade-log: - image: "${REGISTER}/blade/blade-log:${TAG}" + image: "${REGISTER}/blade-log:${TAG}" privileged: true restart: always networks: - blade_net blade-desk: - image: "${REGISTER}/blade/blade-desk:${TAG}" + image: "${REGISTER}/blade-desk:${TAG}" privileged: true restart: always networks: - blade_net - blade-user: - image: "${REGISTER}/blade/blade-user:${TAG}" + blade-system: + image: "${REGISTER}/blade-system:${TAG}" privileged: true restart: always networks: - blade_net - blade-system: - image: "${REGISTER}/blade/blade-system:${TAG}" + blade-resource: + image: "${REGISTER}/blade-resource:${TAG}" privileged: true restart: always networks: - - blade_net + - blade_net - blade-resource: - image: "${REGISTER}/blade/blade-resource:${TAG}" + blade-develop: + image: "${REGISTER}/blade-develop:${TAG}" privileged: true restart: always networks: diff --git a/script/docker/nacos/conf/application.properties b/script/docker/nacos/conf/application.properties new file mode 100644 index 00000000..971c82f2 --- /dev/null +++ b/script/docker/nacos/conf/application.properties @@ -0,0 +1,55 @@ +# spring +server.servlet.contextPath=${SERVER_SERVLET_CONTEXTPATH:/nacos} +server.contextPath=/nacos +server.port=${NACOS_APPLICATION_PORT:8848} +server.tomcat.accesslog.max-days=30 +server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i +server.tomcat.accesslog.enabled=${TOMCAT_ACCESSLOG_ENABLED:false} +server.error.include-message=ALWAYS +# default current work dir +server.tomcat.basedir=file:. +#*************** Config Module Related Configurations ***************# +### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced. +#spring.datasource.platform=${SPRING_DATASOURCE_PLATFORM:} +spring.sql.init.platform=${SPRING_DATASOURCE_PLATFORM:} +nacos.cmdb.dumpTaskInterval=3600 +nacos.cmdb.eventTaskInterval=10 +nacos.cmdb.labelTaskInterval=300 +nacos.cmdb.loadDataAtStart=false +db.num=${MYSQL_DATABASE_NUM:1} +db.url.0=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT:3306}/${MYSQL_SERVICE_DB_NAME}?${MYSQL_SERVICE_DB_PARAM:characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false} +db.user.0=${MYSQL_SERVICE_USER} +db.password.0=${MYSQL_SERVICE_PASSWORD} +## DB connection pool settings +db.pool.config.connectionTimeout=${DB_POOL_CONNECTION_TIMEOUT:30000} +db.pool.config.validationTimeout=10000 +db.pool.config.maximumPoolSize=20 +db.pool.config.minimumIdle=2 +### The auth system to use, currently only 'nacos' and 'ldap' is supported: +nacos.core.auth.system.type=${NACOS_AUTH_SYSTEM_TYPE:nacos} +### worked when nacos.core.auth.system.type=nacos +### The token expiration in seconds: +nacos.core.auth.plugin.nacos.token.expire.seconds=${NACOS_AUTH_TOKEN_EXPIRE_SECONDS:18000} +### The default token: +nacos.core.auth.plugin.nacos.token.secret.key=${NACOS_AUTH_TOKEN:} +### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay. +nacos.core.auth.caching.enabled=${NACOS_AUTH_CACHE_ENABLE:false} +nacos.core.auth.enable.userAgentAuthWhite=${NACOS_AUTH_USER_AGENT_AUTH_WHITE_ENABLE:false} +nacos.core.auth.server.identity.key=${NACOS_AUTH_IDENTITY_KEY:} +nacos.core.auth.server.identity.value=${NACOS_AUTH_IDENTITY_VALUE:} +## spring security config +### turn off security +nacos.security.ignore.urls=${NACOS_SECURITY_IGNORE_URLS:/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**} +# metrics for elastic search +management.metrics.export.elastic.enabled=false +management.metrics.export.influx.enabled=false +nacos.naming.distro.taskDispatchThreadCount=10 +nacos.naming.distro.taskDispatchPeriod=200 +nacos.naming.distro.batchSyncKeyCount=1000 +nacos.naming.distro.initDataRatio=0.9 +nacos.naming.distro.syncRetryDelay=5000 +nacos.naming.data.warmup=true +nacos.console.ui.enabled=true +nacos.core.param.check.enabled=true + + diff --git a/script/docker/nacos/init.d/custom.properties b/script/docker/nacos/init.d/custom.properties deleted file mode 100644 index f6fd2a0e..00000000 --- a/script/docker/nacos/init.d/custom.properties +++ /dev/null @@ -1,19 +0,0 @@ -#spring.security.enabled=false -#management.security=false -#security.basic.enabled=false -#nacos.security.ignore.urls=/** -#management.metrics.export.elastic.host=http://localhost:9200 -# metrics for prometheus -management.endpoints.web.exposure.include=* - -# metrics for elastic search -#management.metrics.export.elastic.enabled=false -#management.metrics.export.elastic.host=http://localhost:9200 - -# metrics for influx -#management.metrics.export.influx.enabled=false -#management.metrics.export.influx.db=springboot -#management.metrics.export.influx.uri=http://localhost:8086 -#management.metrics.export.influx.auto-create-db=true -#management.metrics.export.influx.consistency=one -#management.metrics.export.influx.compressed=true diff --git a/script/kuboard/blade-k8s.yaml b/script/kuboard/blade-k8s.yaml new file mode 100644 index 00000000..4e697c22 --- /dev/null +++ b/script/kuboard/blade-k8s.yaml @@ -0,0 +1,22 @@ +#spring配置 +spring: + redis: + ##redis 单机环境配置 + host: redis + port: 6379 + password: + database: 0 + ssl: false + ##redis 集群环境配置 + #cluster: + # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 + # commandTimeout: 5000 + +#项目模块集中配置 +blade: + #通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖) + datasource: + test: + url: jdbc:mysql://saber-db-0.saber-db:3306/blade?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/script/kuboard/kuboard_spring-blade.yaml b/script/kuboard/kuboard_spring-blade.yaml new file mode 100644 index 00000000..557a6c34 --- /dev/null +++ b/script/kuboard/kuboard_spring-blade.yaml @@ -0,0 +1,4342 @@ + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-admin + namespace: spring-blade + uid: dcccfdff-6d7d-4de8-897c-e5567d059db7 + resourceVersion: '257497' + generation: 2 + creationTimestamp: '2021-05-04T05:10:51Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-admin + annotations: + deployment.kubernetes.io/revision: '1' + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T05:10:51Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-admin"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:58:19Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-admin + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-admin + spec: + containers: + - name: blade-admin + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-admin:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T05:17:29Z' + lastTransitionTime: '2021-05-04T05:10:51Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-admin-54c5d4ff49" has successfully progressed. + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T07:58:19Z' + lastTransitionTime: '2021-05-04T07:58:19Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-auth + namespace: spring-blade + uid: 6df4a628-e52a-4029-b26e-3ad5db02aa69 + resourceVersion: '257507' + generation: 2 + creationTimestamp: '2021-05-04T07:32:42Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-auth + annotations: + deployment.kubernetes.io/revision: '1' + k8s.kuboard.cn/workload: blade-auth + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:32:42Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-auth"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:59:02Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-auth + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-auth + spec: + containers: + - name: blade-auth + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-auth:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T07:33:33Z' + lastTransitionTime: '2021-05-04T07:32:42Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-auth-78fc8bfd98" has successfully progressed. + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T07:59:02Z' + lastTransitionTime: '2021-05-04T07:59:02Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-desk + namespace: spring-blade + uid: 3b4073a7-9808-4fc7-8fe6-b8ae492fbff0 + resourceVersion: '257519' + generation: 3 + creationTimestamp: '2021-05-04T07:50:51Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-desk + annotations: + deployment.kubernetes.io/revision: '2' + k8s.kuboard.cn/workload: blade-desk + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:06:55Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:annotations': + .: {} + 'f:kubectl.kubernetes.io/restartedAt': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-desk"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:07:55Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-desk + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-desk + annotations: + kubectl.kubernetes.io/restartedAt: '2021-05-04T16:06:55+08:00' + spec: + containers: + - name: blade-desk + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-desk:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 3 + conditions: + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T08:07:55Z' + lastTransitionTime: '2021-05-04T08:07:55Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T08:07:55Z' + lastTransitionTime: '2021-05-04T07:50:51Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-desk-6cd55955f6" has successfully progressed. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-develop + namespace: spring-blade + uid: 057472ce-f78f-4fc6-8101-2605ff68dfab + resourceVersion: '257531' + generation: 3 + creationTimestamp: '2021-05-04T07:51:38Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-develop + annotations: + deployment.kubernetes.io/revision: '2' + k8s.kuboard.cn/workload: blade-develop + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:07:08Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:annotations': + .: {} + 'f:kubectl.kubernetes.io/restartedAt': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-develop"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:08:18Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-develop + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-develop + annotations: + kubectl.kubernetes.io/restartedAt: '2021-05-04T16:07:08+08:00' + spec: + containers: + - name: blade-develop + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-develop:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 3 + conditions: + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T08:08:18Z' + lastTransitionTime: '2021-05-04T08:08:18Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T08:08:18Z' + lastTransitionTime: '2021-05-04T07:51:38Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-develop-5784fd7449" has successfully progressed. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-gateway + namespace: spring-blade + uid: 329cf005-bd37-4471-9a9d-df981ff7d502 + resourceVersion: '257544' + generation: 2 + creationTimestamp: '2021-05-03T13:54:21Z' + labels: + k8s.kuboard.cn/layer: gateway + k8s.kuboard.cn/name: blade-gateway + annotations: + deployment.kubernetes.io/revision: '1' + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-03T13:54:21Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-gateway"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:56:01Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: gateway + k8s.kuboard.cn/name: blade-gateway + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: gateway + k8s.kuboard.cn/name: blade-gateway + spec: + containers: + - name: blade-gateway + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-gateway:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-03T13:55:11Z' + lastTransitionTime: '2021-05-03T13:54:21Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-gateway-56b5f6f4ff" has successfully progressed. + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T07:56:01Z' + lastTransitionTime: '2021-05-04T07:56:01Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-log + namespace: spring-blade + uid: 42f28811-bf90-465c-b092-7197607779e1 + resourceVersion: '257554' + generation: 2 + creationTimestamp: '2021-05-04T07:52:11Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-log + annotations: + deployment.kubernetes.io/revision: '1' + k8s.kuboard.cn/workload: blade-log + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:52:11Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-log"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:57:01Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-log + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-log + spec: + containers: + - name: blade-log + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-log:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T07:57:01Z' + lastTransitionTime: '2021-05-04T07:57:01Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T07:57:01Z' + lastTransitionTime: '2021-05-04T07:52:11Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-log-f88788d8d" has successfully progressed. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-report + namespace: spring-blade + uid: 89e6ff7b-9529-496f-9f1c-c6d67484c414 + resourceVersion: '257572' + generation: 2 + creationTimestamp: '2021-05-04T07:54:18Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-report + annotations: + deployment.kubernetes.io/revision: '1' + k8s.kuboard.cn/workload: blade-report + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:54:18Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-report"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:55:58Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-report + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-report + spec: + containers: + - name: blade-report + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-report:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T07:55:58Z' + lastTransitionTime: '2021-05-04T07:55:58Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T07:55:58Z' + lastTransitionTime: '2021-05-04T07:54:18Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-report-75b5fc4d98" has successfully progressed. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-resource + namespace: spring-blade + uid: 46c66fb6-f27f-4bdb-8060-5d8188868588 + resourceVersion: '257582' + generation: 2 + creationTimestamp: '2021-05-04T08:05:01Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-resource + annotations: + deployment.kubernetes.io/revision: '1' + k8s.kuboard.cn/workload: blade-resource + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:05:01Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-resource"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:05:41Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-resource + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-resource + spec: + containers: + - name: blade-resource + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-resource:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T08:05:41Z' + lastTransitionTime: '2021-05-04T08:05:41Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T08:05:41Z' + lastTransitionTime: '2021-05-04T08:05:01Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-resource-58bdcf78f6" has successfully progressed. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: blade-system + namespace: spring-blade + uid: b70b9c4a-2794-4a69-b0bc-471ecf6ee4bc + resourceVersion: '257593' + generation: 2 + creationTimestamp: '2021-05-04T08:05:33Z' + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-system + annotations: + deployment.kubernetes.io/revision: '1' + k8s.kuboard.cn/workload: blade-system + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:05:33Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-system"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:06:23Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-system + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: svc + k8s.kuboard.cn/name: blade-system + spec: + containers: + - name: blade-system + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-system:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T08:06:23Z' + lastTransitionTime: '2021-05-04T08:06:23Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T08:06:23Z' + lastTransitionTime: '2021-05-04T08:05:33Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "blade-system-8dd57fd47" has successfully progressed. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: saber-web + namespace: spring-blade + uid: 08fa376e-dbdd-4684-8cb5-0fd478e1a0c2 + resourceVersion: '257630' + generation: 2 + creationTimestamp: '2021-05-04T08:55:21Z' + labels: + k8s.kuboard.cn/layer: web + k8s.kuboard.cn/name: saber-web + annotations: + deployment.kubernetes.io/revision: '1' + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:55:21Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"saber-web"}': + .: {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T08:57:10Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: web + k8s.kuboard.cn/name: saber-web + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: web + k8s.kuboard.cn/name: saber-web + spec: + containers: + - name: saber-web + image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-web:4.5.0' + ports: + - name: web + containerPort: 80 + protocol: TCP + resources: + limits: + memory: 1Gi + requests: + memory: 100Mi + livenessProbe: + httpGet: + path: / + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: / + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: / + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T08:57:10Z' + lastTransitionTime: '2021-05-04T08:57:10Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-04T08:57:10Z' + lastTransitionTime: '2021-05-04T08:55:21Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "saber-web-775f6b6dc" has successfully progressed. + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: swagger + namespace: spring-blade + uid: d6ef6c76-2135-4340-b9b5-1d8f9c247912 + resourceVersion: '257644' + generation: 2 + creationTimestamp: '2021-05-03T14:45:05Z' + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: swagger + annotations: + deployment.kubernetes.io/revision: '1' + k8s.kuboard.cn/workload: swagger + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-03T14:45:05Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + .: {} + 'f:k8s.kuboard.cn/workload': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:progressDeadlineSeconds': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:strategy': + 'f:rollingUpdate': + .: {} + 'f:maxSurge': {} + 'f:maxUnavailable': {} + 'f:type': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"blade-swagger"}': + .: {} + 'f:args': {} + 'f:envFrom': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":80,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:54:00Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:annotations': + 'f:deployment.kubernetes.io/revision': {} + 'f:status': + 'f:conditions': + .: {} + 'k:{"type":"Available"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'k:{"type":"Progressing"}': + .: {} + 'f:lastTransitionTime': {} + 'f:lastUpdateTime': {} + 'f:message': {} + 'f:reason': {} + 'f:status': {} + 'f:type': {} + 'f:observedGeneration': {} +spec: + replicas: 0 + selector: + matchLabels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: swagger + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: swagger + spec: + containers: + - name: blade-swagger + image: 'swr.cn-east-2.myhuaweicloud.com/blade/blade-swagger:4.5.0' + args: + - '--spring.profiles.active=${PROFILE}' + - '--spring.cloud.nacos.config.server-addr=${NACOS_SERVER_ADDR}' + - '--spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR}' + - >- + --spring.cloud.sentinel.transport.dashboard=${SENTINEL_DASHBOARD_ADDR} + - '--server.port=80' + ports: + - name: server + containerPort: 80 + protocol: TCP + envFrom: + - configMapRef: + name: blade-config + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /actuator/health + port: 80 + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +status: + observedGeneration: 2 + conditions: + - type: Progressing + status: 'True' + lastUpdateTime: '2021-05-03T14:45:55Z' + lastTransitionTime: '2021-05-03T14:45:05Z' + reason: NewReplicaSetAvailable + message: ReplicaSet "swagger-666f768bd9" has successfully progressed. + - type: Available + status: 'True' + lastUpdateTime: '2021-05-04T07:54:00Z' + lastTransitionTime: '2021-05-04T07:54:00Z' + reason: MinimumReplicasAvailable + message: Deployment has minimum availability. + +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: nacos + namespace: spring-blade + uid: 6adec24a-ef33-401c-8bdd-ea29334bd4bf + resourceVersion: '212196' + generation: 8 + creationTimestamp: '2021-05-02T12:08:02Z' + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: nacos + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-02T12:17:56Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + .: {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:podManagementPolicy': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:serviceName': {} + 'f:template': + 'f:metadata': + .: {} + 'f:creationTimestamp': {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"nacos"}': + .: {} + 'f:env': + .: {} + 'k:{"name":"MODE"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_SERVICE_DB_NAME"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_SERVICE_HOST"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_SERVICE_PASSWORD"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_SERVICE_PORT"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_SERVICE_USER"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"PREFER_HOST_MODE"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"SPRING_DATASOURCE_PLATFORM"}': + .: {} + 'f:name': {} + 'f:value': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":8848,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'k:{"containerPort":9848,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'k:{"containerPort":9849,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:volumeMounts': + .: {} + 'k:{"mountPath":"/home/nacos/init.d/custom.properties"}': + .: {} + 'f:mountPath': {} + 'f:name': {} + 'f:readOnly': {} + 'f:subPath': {} + 'k:{"mountPath":"/home/nacos/logs"}': + .: {} + 'f:mountPath': {} + 'f:name': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + 'f:volumes': + .: {} + 'k:{"name":"volume-6aidn"}': + .: {} + 'f:configMap': + .: {} + 'f:defaultMode': {} + 'f:items': {} + 'f:name': {} + 'f:name': {} + 'f:updateStrategy': + .: {} + 'f:rollingUpdate': + .: {} + 'f:partition': {} + 'f:type': {} + 'f:volumeClaimTemplates': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:53:48Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:status': + 'f:collisionCount': {} + 'f:currentReplicas': {} + 'f:currentRevision': {} + 'f:observedGeneration': {} + 'f:readyReplicas': {} + 'f:replicas': {} + 'f:updateRevision': {} + 'f:updatedReplicas': {} +spec: + replicas: 1 + selector: + matchLabels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: nacos + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: nacos + spec: + volumes: + - name: volume-6aidn + configMap: + name: nacos-config + items: + - key: custom.properties + path: custom.properties + defaultMode: 420 + containers: + - name: nacos + image: 'swr.cn-east-2.myhuaweicloud.com/blade/nacos-server:2.0.2' + ports: + - name: client + containerPort: 8848 + protocol: TCP + - name: client-rpc + containerPort: 9848 + protocol: TCP + - name: raft-rpc + containerPort: 9849 + protocol: TCP + env: + - name: MODE + value: standalone + - name: PREFER_HOST_MODE + value: hostname + - name: SPRING_DATASOURCE_PLATFORM + value: mysql + - name: MYSQL_SERVICE_HOST + value: nacos-mysql-0.nacos-mysql + - name: MYSQL_SERVICE_DB_NAME + value: nacos_test + - name: MYSQL_SERVICE_PORT + value: '3306' + - name: MYSQL_SERVICE_USER + value: nacos + - name: MYSQL_SERVICE_PASSWORD + value: nacos + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + volumeMounts: + - name: logs + mountPath: /home/nacos/logs + - name: volume-6aidn + readOnly: true + mountPath: /home/nacos/init.d/custom.properties + subPath: custom.properties + livenessProbe: + httpGet: + path: /nacos/v1/ns/instance/list?serviceName=nacos + port: 8848 + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /nacos/v1/ns/instance/list?serviceName=nacos + port: 8848 + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 2 + failureThreshold: 3 + startupProbe: + httpGet: + path: /nacos/v1/ns/instance/list?serviceName=nacos + port: 8848 + scheme: HTTP + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + volumeClaimTemplates: + - kind: PersistentVolumeClaim + apiVersion: v1 + metadata: + name: logs + creationTimestamp: null + annotations: + k8s.kuboard.cn/pvcType: Dynamic + spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 2Gi + storageClassName: ceph-raspberry + volumeMode: Filesystem + status: + phase: Pending + serviceName: nacos + podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate + rollingUpdate: + partition: 0 + revisionHistoryLimit: 10 +status: + observedGeneration: 8 + replicas: 1 + readyReplicas: 1 + currentReplicas: 1 + updatedReplicas: 1 + currentRevision: nacos-5c86cb4d97 + updateRevision: nacos-5c86cb4d97 + collisionCount: 0 + +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: nacos-mysql + namespace: spring-blade + uid: b22d717f-3063-46da-92eb-1f5a5db96524 + resourceVersion: '212334' + generation: 1 + creationTimestamp: '2021-05-02T11:48:41Z' + labels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: nacos-mysql + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-02T11:48:41Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:podManagementPolicy': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:serviceName': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"mysql"}': + .: {} + 'f:env': + .: {} + 'k:{"name":"MYSQL_ALLOW_EMPTY_PASSWORD"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_DATABASE"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_PASSWORD"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_USER"}': + .: {} + 'f:name': {} + 'f:value': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:exec': + .: {} + 'f:command': {} + 'f:failureThreshold': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":3306,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:exec': + .: {} + 'f:command': {} + 'f:failureThreshold': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:exec': + .: {} + 'f:command': {} + 'f:failureThreshold': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:volumeMounts': + .: {} + 'k:{"mountPath":"/var/lib/mysql"}': + .: {} + 'f:mountPath': {} + 'f:name': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + 'f:updateStrategy': + 'f:rollingUpdate': + .: {} + 'f:partition': {} + 'f:type': {} + 'f:volumeClaimTemplates': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:53:59Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:status': + 'f:collisionCount': {} + 'f:currentReplicas': {} + 'f:currentRevision': {} + 'f:observedGeneration': {} + 'f:readyReplicas': {} + 'f:replicas': {} + 'f:updateRevision': {} + 'f:updatedReplicas': {} +spec: + replicas: 1 + selector: + matchLabels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: nacos-mysql + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: nacos-mysql + spec: + containers: + - name: mysql + image: 'swr.cn-east-2.myhuaweicloud.com/blade/nacos-mysql:5.7' + ports: + - name: mysql + containerPort: 3306 + protocol: TCP + env: + - name: MYSQL_ALLOW_EMPTY_PASSWORD + value: '1' + - name: MYSQL_DATABASE + value: nacos_test + - name: MYSQL_USER + value: nacos + - name: MYSQL_PASSWORD + value: nacos + resources: + limits: + memory: 1000Mi + requests: + memory: 100Mi + volumeMounts: + - name: data + mountPath: /var/lib/mysql + livenessProbe: + exec: + command: + - mysqladmin + - ping + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + exec: + command: + - mysql + - '-h' + - 127.0.0.1 + - '-e' + - select 1 + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 2 + failureThreshold: 3 + startupProbe: + exec: + command: + - mysql + - '-h' + - 127.0.0.1 + - '-e' + - "select 1\t" + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + volumeClaimTemplates: + - kind: PersistentVolumeClaim + apiVersion: v1 + metadata: + name: data + creationTimestamp: null + annotations: + k8s.kuboard.cn/pvcType: Dynamic + spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 2Gi + storageClassName: ceph-raspberry + volumeMode: Filesystem + status: + phase: Pending + serviceName: nacos-mysql + podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate + rollingUpdate: + partition: 0 + revisionHistoryLimit: 10 +status: + observedGeneration: 1 + replicas: 1 + readyReplicas: 1 + currentReplicas: 1 + updatedReplicas: 1 + currentRevision: nacos-mysql-79c55668c9 + updateRevision: nacos-mysql-79c55668c9 + collisionCount: 0 + +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: redis + namespace: spring-blade + uid: 7bd408b4-59fb-48f8-bac9-690be8b1e825 + resourceVersion: '165975' + generation: 1 + creationTimestamp: '2021-05-03T01:38:30Z' + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: redis + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-03T01:38:30Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:podManagementPolicy': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:serviceName': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"redis"}': + .: {} + 'f:command': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:tcpSocket': + .: {} + 'f:port': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":6379,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:tcpSocket': + .: {} + 'f:port': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:tcpSocket': + .: {} + 'f:port': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:volumeMounts': + .: {} + 'k:{"mountPath":"/data"}': + .: {} + 'f:mountPath': {} + 'f:name': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + 'f:updateStrategy': + 'f:rollingUpdate': + .: {} + 'f:partition': {} + 'f:type': {} + 'f:volumeClaimTemplates': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T03:22:53Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:status': + 'f:collisionCount': {} + 'f:currentReplicas': {} + 'f:currentRevision': {} + 'f:observedGeneration': {} + 'f:readyReplicas': {} + 'f:replicas': {} + 'f:updateRevision': {} + 'f:updatedReplicas': {} +spec: + replicas: 1 + selector: + matchLabels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: redis + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: redis + spec: + containers: + - name: redis + image: 'swr.cn-east-2.myhuaweicloud.com/blade/redis:5.0.2-alpine' + command: + - redis-server + - '--appendonly' + - 'yes' + ports: + - name: redis + containerPort: 6379 + protocol: TCP + resources: + limits: + memory: 1Gi + requests: + memory: 100Mi + volumeMounts: + - name: data + mountPath: /data + livenessProbe: + tcpSocket: + port: 6379 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + tcpSocket: + port: 6379 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + tcpSocket: + port: 6379 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + volumeClaimTemplates: + - kind: PersistentVolumeClaim + apiVersion: v1 + metadata: + name: data + creationTimestamp: null + annotations: + k8s.kuboard.cn/pvcType: Dynamic + spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 2Gi + storageClassName: ceph-raspberry + volumeMode: Filesystem + status: + phase: Pending + serviceName: redis + podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate + rollingUpdate: + partition: 0 + revisionHistoryLimit: 10 +status: + observedGeneration: 1 + replicas: 1 + readyReplicas: 1 + currentReplicas: 1 + updatedReplicas: 1 + currentRevision: redis-cd959c6c9 + updateRevision: redis-cd959c6c9 + collisionCount: 0 + +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: saber-db + namespace: spring-blade + uid: ea58a737-0d64-4674-8023-9eb2c2c54b8e + resourceVersion: '212326' + generation: 6 + creationTimestamp: '2021-05-03T12:09:25Z' + labels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: saber-db + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-03T12:19:36Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:podManagementPolicy': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:serviceName': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"mysql"}': + .: {} + 'f:env': + .: {} + 'k:{"name":"MYSQL_ALLOW_EMPTY_PASSWORD"}': + .: {} + 'f:name': {} + 'f:value': {} + 'k:{"name":"MYSQL_ROOT_PASSWORD"}': + .: {} + 'f:name': {} + 'f:value': {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:exec': + .: {} + 'f:command': {} + 'f:failureThreshold': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":3306,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:exec': + .: {} + 'f:command': {} + 'f:failureThreshold': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:exec': + .: {} + 'f:command': {} + 'f:failureThreshold': {} + 'f:initialDelaySeconds': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:volumeMounts': + .: {} + 'k:{"mountPath":"/var/lib/mysql"}': + .: {} + 'f:mountPath': {} + 'f:name': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + 'f:updateStrategy': + 'f:rollingUpdate': + .: {} + 'f:partition': {} + 'f:type': {} + 'f:volumeClaimTemplates': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T07:53:59Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:status': + 'f:collisionCount': {} + 'f:currentReplicas': {} + 'f:currentRevision': {} + 'f:observedGeneration': {} + 'f:readyReplicas': {} + 'f:replicas': {} + 'f:updateRevision': {} + 'f:updatedReplicas': {} +spec: + replicas: 1 + selector: + matchLabels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: saber-db + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: saber-db + spec: + containers: + - name: mysql + image: 'swr.cn-east-2.myhuaweicloud.com/blade/saber-db:v4.5.0' + ports: + - name: mysql + containerPort: 3306 + protocol: TCP + env: + - name: MYSQL_ALLOW_EMPTY_PASSWORD + value: '1' + - name: MYSQL_ROOT_PASSWORD + value: root + resources: + limits: + memory: 2Gi + requests: + memory: 200Mi + volumeMounts: + - name: data + mountPath: /var/lib/mysql + livenessProbe: + exec: + command: + - mysqladmin + - '-uroot' + - '-proot' + - ping + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + exec: + command: + - mysql + - '-uroot' + - '-proot' + - '-e' + - "select 1\t" + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + exec: + command: + - mysql + - '-uroot' + - '-proot' + - '-e' + - "select 1\t" + initialDelaySeconds: 30 + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + volumeClaimTemplates: + - kind: PersistentVolumeClaim + apiVersion: v1 + metadata: + name: data + creationTimestamp: null + annotations: + k8s.kuboard.cn/pvcType: Dynamic + spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 2Gi + storageClassName: cephfs-raspberry + volumeMode: Filesystem + status: + phase: Pending + serviceName: saber-db + podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate + rollingUpdate: + partition: 0 + revisionHistoryLimit: 10 +status: + observedGeneration: 6 + replicas: 1 + readyReplicas: 1 + currentReplicas: 1 + updatedReplicas: 1 + currentRevision: saber-db-769778997c + updateRevision: saber-db-769778997c + collisionCount: 0 + +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: sentinel + namespace: spring-blade + uid: bc116cc8-bb25-47a9-8170-9b40ce91d429 + resourceVersion: '165619' + generation: 3 + creationTimestamp: '2021-05-03T11:34:07Z' + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: sentinel + managedFields: + - manager: Mozilla + operation: Update + apiVersion: apps/v1 + time: '2021-05-03T11:34:07Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:podManagementPolicy': {} + 'f:replicas': {} + 'f:revisionHistoryLimit': {} + 'f:selector': {} + 'f:serviceName': {} + 'f:template': + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:containers': + 'k:{"name":"sentinel"}': + .: {} + 'f:image': {} + 'f:imagePullPolicy': {} + 'f:livenessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:name': {} + 'f:ports': + .: {} + 'k:{"containerPort":8858,"protocol":"TCP"}': + .: {} + 'f:containerPort': {} + 'f:name': {} + 'f:protocol': {} + 'f:readinessProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:resources': + .: {} + 'f:limits': + .: {} + 'f:memory': {} + 'f:requests': + .: {} + 'f:memory': {} + 'f:startupProbe': + .: {} + 'f:failureThreshold': {} + 'f:httpGet': + .: {} + 'f:path': {} + 'f:port': {} + 'f:scheme': {} + 'f:periodSeconds': {} + 'f:successThreshold': {} + 'f:timeoutSeconds': {} + 'f:terminationMessagePath': {} + 'f:terminationMessagePolicy': {} + 'f:dnsPolicy': {} + 'f:restartPolicy': {} + 'f:schedulerName': {} + 'f:securityContext': {} + 'f:terminationGracePeriodSeconds': {} + 'f:updateStrategy': + 'f:rollingUpdate': + .: {} + 'f:partition': {} + 'f:type': {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2021-05-04T03:21:16Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:status': + 'f:collisionCount': {} + 'f:currentReplicas': {} + 'f:currentRevision': {} + 'f:observedGeneration': {} + 'f:readyReplicas': {} + 'f:replicas': {} + 'f:updateRevision': {} + 'f:updatedReplicas': {} +spec: + replicas: 1 + selector: + matchLabels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: sentinel + template: + metadata: + creationTimestamp: null + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: sentinel + spec: + containers: + - name: sentinel + image: 'swr.cn-east-2.myhuaweicloud.com/blade/sentinel-dashboard:1.8.0' + ports: + - name: web + containerPort: 8858 + protocol: TCP + resources: + limits: + memory: 1Gi + requests: + memory: 200Mi + livenessProbe: + httpGet: + path: / + port: 8858 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: / + port: 8858 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: / + port: 8858 + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 20 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + schedulerName: default-scheduler + serviceName: sentinel + podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate + rollingUpdate: + partition: 0 + revisionHistoryLimit: 10 +status: + observedGeneration: 3 + replicas: 1 + readyReplicas: 1 + currentReplicas: 1 + updatedReplicas: 1 + currentRevision: sentinel-7c869554fc + updateRevision: sentinel-7c869554fc + collisionCount: 0 + +--- +kind: Service +apiVersion: v1 +metadata: + name: blade-gateway + namespace: spring-blade + uid: 8842546b-e82b-416d-87ec-14b7eb1471d3 + resourceVersion: '125452' + creationTimestamp: '2021-05-03T13:58:42Z' + labels: + k8s.kuboard.cn/layer: gateway + k8s.kuboard.cn/name: blade-gateway + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-03T13:58:42Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:ports': + .: {} + 'k:{"port":80,"protocol":"TCP"}': + .: {} + 'f:name': {} + 'f:port': {} + 'f:protocol': {} + 'f:targetPort': {} + 'f:selector': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:sessionAffinity': {} + 'f:sessionAffinityConfig': + .: {} + 'f:clientIP': + .: {} + 'f:timeoutSeconds': {} + 'f:type': {} +spec: + ports: + - name: server + protocol: TCP + port: 80 + targetPort: 80 + selector: + k8s.kuboard.cn/layer: gateway + k8s.kuboard.cn/name: blade-gateway + clusterIP: 10.96.85.70 + clusterIPs: + - 10.96.85.70 + type: ClusterIP + sessionAffinity: ClientIP + sessionAffinityConfig: + clientIP: + timeoutSeconds: 10800 + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack +status: + loadBalancer: {} + +--- +kind: Service +apiVersion: v1 +metadata: + name: nacos + namespace: spring-blade + uid: a5ec2331-0183-403f-8aef-d6ae72682de5 + resourceVersion: '12005' + creationTimestamp: '2021-05-02T12:08:02Z' + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: nacos + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-02T12:08:02Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + .: {} + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:clusterIP': {} + 'f:clusterIPs': {} + 'f:externalTrafficPolicy': {} + 'f:ipFamilies': {} + 'f:ipFamilyPolicy': {} + 'f:ports': + .: {} + 'k:{"port":8848,"protocol":"TCP"}': + .: {} + 'f:name': {} + 'f:nodePort': {} + 'f:port': {} + 'f:protocol': {} + 'f:targetPort': {} + 'f:selector': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:sessionAffinity': {} + 'f:sessionAffinityConfig': + .: {} + 'f:clientIP': + .: {} + 'f:timeoutSeconds': {} + 'f:type': {} +spec: + ports: + - name: nacos-client + protocol: TCP + port: 8848 + targetPort: 8848 + nodePort: 32000 + selector: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: nacos + clusterIP: 10.96.108.68 + clusterIPs: + - 10.96.108.68 + type: NodePort + sessionAffinity: ClientIP + externalTrafficPolicy: Cluster + sessionAffinityConfig: + clientIP: + timeoutSeconds: 10800 + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack +status: + loadBalancer: {} + +--- +kind: Service +apiVersion: v1 +metadata: + name: nacos-mysql + namespace: spring-blade + uid: da272de2-14f1-4d61-962b-bfa8f92fe448 + resourceVersion: '8348' + creationTimestamp: '2021-05-02T11:48:41Z' + labels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: nacos-mysql + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-02T11:48:41Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:clusterIP': {} + 'f:ports': + .: {} + 'k:{"port":3306,"protocol":"TCP"}': + .: {} + 'f:name': {} + 'f:port': {} + 'f:protocol': {} + 'f:targetPort': {} + 'f:selector': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:sessionAffinity': {} + 'f:type': {} +spec: + ports: + - name: mysql + protocol: TCP + port: 3306 + targetPort: 3306 + selector: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: nacos-mysql + clusterIP: None + clusterIPs: + - None + type: ClusterIP + sessionAffinity: None + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack +status: + loadBalancer: {} + +--- +kind: Service +apiVersion: v1 +metadata: + name: redis + namespace: spring-blade + uid: 3fa1762f-cba5-413e-a620-f0cee40f8fb7 + resourceVersion: '70917' + creationTimestamp: '2021-05-03T01:38:31Z' + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: redis + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-03T01:38:31Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:clusterIP': {} + 'f:ports': + .: {} + 'k:{"port":6379,"protocol":"TCP"}': + .: {} + 'f:name': {} + 'f:port': {} + 'f:protocol': {} + 'f:targetPort': {} + 'f:selector': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:sessionAffinity': {} + 'f:type': {} +spec: + ports: + - name: redis + protocol: TCP + port: 6379 + targetPort: 6379 + selector: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: redis + clusterIP: None + clusterIPs: + - None + type: ClusterIP + sessionAffinity: None + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack +status: + loadBalancer: {} + +--- +kind: Service +apiVersion: v1 +metadata: + name: saber-db + namespace: spring-blade + uid: 7408f9c1-4db4-4ba1-84b0-3837b6ca5cd2 + resourceVersion: '106701' + creationTimestamp: '2021-05-03T12:09:25Z' + labels: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: saber-db + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-03T12:09:25Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:clusterIP': {} + 'f:ports': + .: {} + 'k:{"port":3306,"protocol":"TCP"}': + .: {} + 'f:name': {} + 'f:port': {} + 'f:protocol': {} + 'f:targetPort': {} + 'f:selector': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:sessionAffinity': {} + 'f:type': {} +spec: + ports: + - name: mysql + protocol: TCP + port: 3306 + targetPort: 3306 + selector: + k8s.kuboard.cn/layer: db + k8s.kuboard.cn/name: saber-db + clusterIP: None + clusterIPs: + - None + type: ClusterIP + sessionAffinity: None + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack +status: + loadBalancer: {} + +--- +kind: Service +apiVersion: v1 +metadata: + name: saber-web + namespace: spring-blade + uid: 9fcb108d-470c-412d-b378-eba5c1bcecb0 + resourceVersion: '223410' + creationTimestamp: '2021-05-04T08:55:21Z' + labels: + k8s.kuboard.cn/layer: web + k8s.kuboard.cn/name: saber-web + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-04T08:55:21Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:externalTrafficPolicy': {} + 'f:ports': + .: {} + 'k:{"port":80,"protocol":"TCP"}': + .: {} + 'f:name': {} + 'f:nodePort': {} + 'f:port': {} + 'f:protocol': {} + 'f:targetPort': {} + 'f:selector': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:sessionAffinity': {} + 'f:sessionAffinityConfig': + .: {} + 'f:clientIP': + .: {} + 'f:timeoutSeconds': {} + 'f:type': {} +spec: + ports: + - name: web + protocol: TCP + port: 80 + targetPort: 80 + nodePort: 32102 + selector: + k8s.kuboard.cn/layer: web + k8s.kuboard.cn/name: saber-web + clusterIP: 10.96.23.131 + clusterIPs: + - 10.96.23.131 + type: NodePort + sessionAffinity: ClientIP + externalTrafficPolicy: Cluster + sessionAffinityConfig: + clientIP: + timeoutSeconds: 10800 + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack +status: + loadBalancer: {} + +--- +kind: Service +apiVersion: v1 +metadata: + name: sentinel + namespace: spring-blade + uid: e0a446ec-ff59-4622-91cf-0a79a31a52fc + resourceVersion: '100599' + creationTimestamp: '2021-05-03T11:34:07Z' + labels: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: sentinel + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-03T11:34:07Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:metadata': + 'f:labels': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:spec': + 'f:externalTrafficPolicy': {} + 'f:ports': + .: {} + 'k:{"port":8858,"protocol":"TCP"}': + .: {} + 'f:name': {} + 'f:nodePort': {} + 'f:port': {} + 'f:protocol': {} + 'f:targetPort': {} + 'f:selector': + .: {} + 'f:k8s.kuboard.cn/layer': {} + 'f:k8s.kuboard.cn/name': {} + 'f:sessionAffinity': {} + 'f:sessionAffinityConfig': + .: {} + 'f:clientIP': + .: {} + 'f:timeoutSeconds': {} + 'f:type': {} +spec: + ports: + - name: web + protocol: TCP + port: 8858 + targetPort: 8858 + nodePort: 32100 + selector: + k8s.kuboard.cn/layer: cloud + k8s.kuboard.cn/name: sentinel + clusterIP: 10.96.213.78 + clusterIPs: + - 10.96.213.78 + type: NodePort + sessionAffinity: ClientIP + externalTrafficPolicy: Cluster + sessionAffinityConfig: + clientIP: + timeoutSeconds: 10800 + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack +status: + loadBalancer: {} + +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: blade-config + namespace: spring-blade + uid: ac725821-bcd5-4e58-a0c8-00735d304b1b + resourceVersion: '185305' + creationTimestamp: '2021-05-03T13:25:44Z' + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-03T13:25:44Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:data': + .: {} + 'f:NACOS_SERVER_ADDR': {} + 'f:PROFILE': {} + 'f:SENTINEL_DASHBOARD_ADDR': {} +data: + NACOS_SERVER_ADDR: 'nacos-0.nacos:8848' + PROFILE: test + SENTINEL_DASHBOARD_ADDR: 'sentinel-0.sentinel:8858' + +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: nacos-config + namespace: spring-blade + uid: 4b911330-5b49-4c22-a8c3-6aee1e44dff6 + resourceVersion: '1790' + creationTimestamp: '2021-05-02T10:57:33Z' + managedFields: + - manager: Mozilla + operation: Update + apiVersion: v1 + time: '2021-05-02T10:57:33Z' + fieldsType: FieldsV1 + fieldsV1: + 'f:data': + .: {} + 'f:custom.properties': {} +data: + custom.properties: |- + #spring.security.enabled=false + #management.security=false + #security.basic.enabled=false + #nacos.security.ignore.urls=/** + #management.metrics.export.elastic.host=http://localhost:9200 + # metrics for prometheus + management.endpoints.web.exposure.include=* + + # metrics for elastic search + #management.metrics.export.elastic.enabled=false + #management.metrics.export.elastic.host=http://localhost:9200 + + # metrics for influx + #management.metrics.export.influx.enabled=false + #management.metrics.export.influx.db=springboot + #management.metrics.export.influx.uri=http://localhost:8086 + #management.metrics.export.influx.auto-create-db=true + #management.metrics.export.influx.consistency=one + #management.metrics.export.influx.compressed=true + diff --git a/script/kuboard/saber-db/Dockerfile b/script/kuboard/saber-db/Dockerfile new file mode 100644 index 00000000..a41e1a10 --- /dev/null +++ b/script/kuboard/saber-db/Dockerfile @@ -0,0 +1,8 @@ +FROM mysql:5.7.26 +ADD my.cnf /etc/mysql/conf.d/my.cnf +COPY blade-saber-mysql.sql /docker-entrypoint-initdb.d/blade-saber-mysql.sql +# COPY blade-sword-mysql.sql /docker-entrypoint-initdb.d/blade-sword-mysql.sql +# COPY seata_order.sql /docker-entrypoint-initdb.d/seata_order.sql +# COPY seata_storage.sql /docker-entrypoint-initdb.d/seata_storage.sql +# COPY seata.sql /docker-entrypoint-initdb.d/seata.sql +EXPOSE 3306 diff --git a/script/kuboard/saber-db/blade-saber-mysql.sql b/script/kuboard/saber-db/blade-saber-mysql.sql new file mode 100644 index 00000000..dd655ef1 --- /dev/null +++ b/script/kuboard/saber-db/blade-saber-mysql.sql @@ -0,0 +1,528 @@ +/* + Navicat Premium Data Transfer + + Source Server : mysql_localhost + Source Server Type : MySQL + Source Server Version : 50723 + Source Host : localhost:3306 + Source Schema : blade + + Target Server Type : MySQL + Target Server Version : 50723 + File Encoding : 65001 + + Date: 06/11/2020 17:22:50 +*/ + +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 '主键', + `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 '资源集合', + `scope` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '授权范围', + `authorized_grant_types` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '授权类型', + `web_server_redirect_uri` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '回调地址', + `authorities` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限', + `access_token_validity` int(11) NOT NULL COMMENT '令牌过期秒数', + `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_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(64) 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 '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '客户端表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_code +-- ---------------------------- +DROP TABLE IF EXISTS `blade_code`; +CREATE TABLE `blade_code` ( + `id` bigint(64) NOT NULL COMMENT '主键', + `datasource_id` bigint(64) 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 '表名', + `table_prefix` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表前缀', + `pk_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主键名', + `package_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后端包名', + `base_mode` int(2) NULL DEFAULT NULL COMMENT '基础业务模式', + `wrap_mode` int(2) NULL DEFAULT NULL COMMENT '包装器模式', + `api_path` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后端路径', + `web_path` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '前端路径', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成表'; + +-- ---------------------------- +-- Records of blade_code +-- ---------------------------- +BEGIN; +INSERT INTO `blade_code` VALUES (1123598812738675201, 1123598812738675201, 'blade-demo', '通知公告', 'blade_notice', 'blade_', 'id', 'org.springblade.desktop', 1, 1, 'D:\\Develop\\WorkSpace\\Git\\SpringBlade\\blade-ops\\blade-develop', 'D:\\Develop\\WorkSpace\\Git\\Sword', 0); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_datasource +-- ---------------------------- +DROP TABLE IF EXISTS `blade_datasource`; +CREATE TABLE `blade_datasource` ( + `id` bigint(64) 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_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(64) 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 = '数据源配置表'; + +-- ---------------------------- +-- Records of blade_datasource +-- ---------------------------- +BEGIN; +INSERT INTO `blade_datasource` VALUES (1123598812738675201, 'mysql', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql://localhost:3306/blade?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true', 'root', 'root', 'mysql', 1, '2019-08-14 11:43:06', 1, '2019-08-14 11:43:06', 1, 0), (1123598812738675202, 'postgresql', 'org.postgresql.Driver', 'jdbc:postgresql://127.0.0.1:5432/blade', 'postgres', '123456', 'postgresql', 1, '2019-08-14 11:43:41', 1, '2019-08-14 11:43:41', 1, 0), (1123598812738675203, 'oracle', 'oracle.jdbc.OracleDriver', 'jdbc:oracle:thin:@127.0.0.1:49161:orcl', 'BLADE', 'blade', 'oracle', 1, '2019-08-14 11:44:03', 1, '2019-08-14 11:44:03', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_dept +-- ---------------------------- +DROP TABLE IF EXISTS `blade_dept`; +CREATE TABLE `blade_dept` ( + `id` bigint(64) 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 '父主键', + `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 '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_dict +-- ---------------------------- +DROP TABLE IF EXISTS `blade_dict`; +CREATE TABLE `blade_dict` ( + `id` bigint(64) NOT NULL COMMENT '主键', + `parent_id` bigint(64) 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 '字典名称', + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_log_api +-- ---------------------------- +DROP TABLE IF EXISTS `blade_log_api`; +CREATE TABLE `blade_log_api` ( + `id` bigint(64) 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 '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器环境', + `type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '日志类型', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '日志标题', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '接口日志表'; + +-- ---------------------------- +-- Table structure for blade_log_error +-- ---------------------------- +DROP TABLE IF EXISTS `blade_log_error`; +CREATE TABLE `blade_log_error` ( + `id` bigint(64) 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 '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统环境', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `stack_trace` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '堆栈', + `exception_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '异常名', + `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '异常信息', + `line_number` int(11) NULL DEFAULT NULL COMMENT '错误行数', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `file_name` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '错误日志表'; + +-- ---------------------------- +-- Table structure for blade_log_usual +-- ---------------------------- +DROP TABLE IF EXISTS `blade_log_usual`; +CREATE TABLE `blade_log_usual` ( + `id` bigint(64) 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 '服务器名', + `server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址', + `env` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统环境', + `log_level` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志级别', + `log_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志业务id', + `log_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '日志数据', + `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作方式', + `request_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求URI', + `remote_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作IP地址', + `method_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法类', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '方法名', + `user_agent` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户代理', + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作提交的数据', + `time` datetime(0) NULL DEFAULT NULL COMMENT '执行时间', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建者', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通用日志表'; + +-- ---------------------------- +-- Table structure for blade_menu +-- ---------------------------- +DROP TABLE IF EXISTS `blade_menu`; +CREATE TABLE `blade_menu` ( + `id` bigint(64) NOT NULL COMMENT '主键', + `parent_id` bigint(64) 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 '菜单别名', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求地址', + `source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单资源', + `sort` int(2) NULL DEFAULT NULL COMMENT '排序', + `category` int(2) NULL DEFAULT NULL COMMENT '菜单类型', + `action` int(2) NULL DEFAULT 0 COMMENT '操作按钮类型', + `is_open` int(2) NULL DEFAULT 1 COMMENT '是否打开新页面', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表'; + +-- ---------------------------- +-- 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-system/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-system/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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_notice +-- ---------------------------- +DROP TABLE IF EXISTS `blade_notice`; +CREATE TABLE `blade_notice` ( + `id` bigint(64) 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_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(64) 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 = '通知公告表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_param +-- ---------------------------- +DROP TABLE IF EXISTS `blade_param`; +CREATE TABLE `blade_param` ( + `id` bigint(64) 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_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(64) 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 '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参数表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_post +-- ---------------------------- +DROP TABLE IF EXISTS `blade_post`; +CREATE TABLE `blade_post` ( + `id` bigint(64) 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_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(64) 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 = '岗位表'; + +-- ---------------------------- +-- Records of blade_post +-- ---------------------------- +BEGIN; +INSERT INTO `blade_post` VALUES (1123598817738675201, '000000', 1, 'ceo', '首席执行官', 1, '总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675202, '000000', 1, 'coo', '首席运营官', 2, '常务总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675203, '000000', 1, 'cfo', '首席财务官', 3, '财务总经理', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675204, '000000', 1, 'cto', '首席技术官', 4, '技术总监', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675205, '000000', 1, 'cio', '首席信息官', 5, '信息总监', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675206, '000000', 2, 'pm', '技术经理', 6, '研发和产品是永远的朋友', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675207, '000000', 2, 'hrm', '人力经理', 7, '人力资源部门工作管理者', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0), (1123598817738675208, '000000', 3, 'staff', '普通员工', 8, '普通员工', 1123598821738675201, 1123598813738675201, '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_region +-- ---------------------------- +DROP TABLE IF EXISTS `blade_region`; +CREATE TABLE `blade_region` ( + `code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '区划编号', + `parent_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '父区划编号', + `ancestors` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖区划编号', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区划名称', + `province_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省级区划编号', + `province_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '省级名称', + `city_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市级区划编号', + `city_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '市级名称', + `district_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区级区划编号', + `district_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区级名称', + `town_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '镇级区划编号', + `town_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '镇级名称', + `village_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '村级区划编号', + `village_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '村级名称', + `level` int(2) 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 '备注', + PRIMARY KEY (`code`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '行政区划表'; + +-- ---------------------------- +-- Records of blade_region +-- ---------------------------- +BEGIN; +INSERT INTO `blade_region` VALUES ('00', '0', '0', '中华人民共和国', '', '', '', '', '', '', '', '', '', '', 0, 1, ''), ('11', '00', '00', '北京市', '11', '北京市', '', '', '', '', '', '', '', '', 1, 1, ''), ('1101', '11', '00,11', '北京市', '11', '北京市', '1101', '北京市', '', '', '', '', '', '', 2, 1, ''), ('110101', '1101', '00,11,1101', '东城区', '11', '北京市', '1101', '北京市', '110101', '东城区', '', '', '', '', 3, 1, ''), ('110102', '1101', '00,11,1101', '西城区', '11', '北京市', '1101', '北京市', '110102', '西城区', '', '', '', '', 3, 1, ''), ('110105', '1101', '00,11,1101', '朝阳区', '11', '北京市', '1101', '北京市', '110105', '朝阳区', '', '', '', '', 3, 1, ''), ('110106', '1101', '00,11,1101', '丰台区', '11', '北京市', '1101', '北京市', '110106', '丰台区', '', '', '', '', 3, 1, ''), ('110107', '1101', '00,11,1101', '石景山区', '11', '北京市', '1101', '北京市', '110107', '石景山区', '', '', '', '', 3, 1, ''), ('110108', '1101', '00,11,1101', '海淀区', '11', '北京市', '1101', '北京市', '110108', '海淀区', '', '', '', '', 3, 1, ''), ('110109', '1101', '00,11,1101', '门头沟区', '11', '北京市', '1101', '北京市', '110109', '门头沟区', '', '', '', '', 3, 1, ''), ('110111', '1101', '00,11,1101', '房山区', '11', '北京市', '1101', '北京市', '110111', '房山区', '', '', '', '', 3, 1, ''), ('110112', '1101', '00,11,1101', '通州区', '11', '北京市', '1101', '北京市', '110112', '通州区', '', '', '', '', 3, 1, ''), ('110113', '1101', '00,11,1101', '顺义区', '11', '北京市', '1101', '北京市', '110113', '顺义区', '', '', '', '', 3, 1, ''), ('110114', '1101', '00,11,1101', '昌平区', '11', '北京市', '1101', '北京市', '110114', '昌平区', '', '', '', '', 3, 1, ''), ('110115', '1101', '00,11,1101', '大兴区', '11', '北京市', '1101', '北京市', '110115', '大兴区', '', '', '', '', 3, 1, ''), ('110116', '1101', '00,11,1101', '怀柔区', '11', '北京市', '1101', '北京市', '110116', '怀柔区', '', '', '', '', 3, 1, ''), ('110117', '1101', '00,11,1101', '平谷区', '11', '北京市', '1101', '北京市', '110117', '平谷区', '', '', '', '', 3, 1, ''), ('110118', '1101', '00,11,1101', '密云区', '11', '北京市', '1101', '北京市', '110118', '密云区', '', '', '', '', 3, 1, ''), ('110119', '1101', '00,11,1101', '延庆区', '11', '北京市', '1101', '北京市', '110119', '延庆区', '', '', '', '', 3, 1, ''), ('12', '00', '00', '天津市', '12', '天津市', '', '', '', '', '', '', '', '', 1, 1, ''), ('1201', '12', '00,12', '天津市', '12', '天津市', '1201', '天津市', '', '', '', '', '', '', 2, 1, ''), ('120101', '1201', '00,12,1201', '和平区', '12', '天津市', '1201', '天津市', '120101', '和平区', '', '', '', '', 3, 1, ''), ('120102', '1201', '00,12,1201', '河东区', '12', '天津市', '1201', '天津市', '120102', '河东区', '', '', '', '', 3, 1, ''), ('120103', '1201', '00,12,1201', '河西区', '12', '天津市', '1201', '天津市', '120103', '河西区', '', '', '', '', 3, 1, ''), ('120104', '1201', '00,12,1201', '南开区', '12', '天津市', '1201', '天津市', '120104', '南开区', '', '', '', '', 3, 1, ''), ('120105', '1201', '00,12,1201', '河北区', '12', '天津市', '1201', '天津市', '120105', '河北区', '', '', '', '', 3, 1, ''), ('120106', '1201', '00,12,1201', '红桥区', '12', '天津市', '1201', '天津市', '120106', '红桥区', '', '', '', '', 3, 1, ''), ('120110', '1201', '00,12,1201', '东丽区', '12', '天津市', '1201', '天津市', '120110', '东丽区', '', '', '', '', 3, 1, ''), ('120111', '1201', '00,12,1201', '西青区', '12', '天津市', '1201', '天津市', '120111', '西青区', '', '', '', '', 3, 1, ''), ('120112', '1201', '00,12,1201', '津南区', '12', '天津市', '1201', '天津市', '120112', '津南区', '', '', '', '', 3, 1, ''), ('120113', '1201', '00,12,1201', '北辰区', '12', '天津市', '1201', '天津市', '120113', '北辰区', '', '', '', '', 3, 1, ''), ('120114', '1201', '00,12,1201', '武清区', '12', '天津市', '1201', '天津市', '120114', '武清区', '', '', '', '', 3, 1, ''), ('120115', '1201', '00,12,1201', '宝坻区', '12', '天津市', '1201', '天津市', '120115', '宝坻区', '', '', '', '', 3, 1, ''), ('120116', '1201', '00,12,1201', '滨海新区', '12', '天津市', '1201', '天津市', '120116', '滨海新区', '', '', '', '', 3, 1, ''), ('120117', '1201', '00,12,1201', '宁河区', '12', '天津市', '1201', '天津市', '120117', '宁河区', '', '', '', '', 3, 1, ''), ('120118', '1201', '00,12,1201', '静海区', '12', '天津市', '1201', '天津市', '120118', '静海区', '', '', '', '', 3, 1, ''), ('120119', '1201', '00,12,1201', '蓟州区', '12', '天津市', '1201', '天津市', '120119', '蓟州区', '', '', '', '', 3, 1, ''), ('13', '00', '00', '河北省', '13', '河北省', '', '', '', '', '', '', '', '', 1, 1, ''), ('1301', '13', '00,13', '石家庄市', '13', '河北省', '1301', '石家庄市', '', '', '', '', '', '', 2, 1, ''), ('130102', '1301', '00,13,1301', '长安区', '13', '河北省', '1301', '石家庄市', '130102', '长安区', '', '', '', '', 3, 1, ''), ('130104', '1301', '00,13,1301', '桥西区', '13', '河北省', '1301', '石家庄市', '130104', '桥西区', '', '', '', '', 3, 1, ''), ('130105', '1301', '00,13,1301', '新华区', '13', '河北省', '1301', '石家庄市', '130105', '新华区', '', '', '', '', 3, 1, ''), ('130107', '1301', '00,13,1301', '井陉矿区', '13', '河北省', '1301', '石家庄市', '130107', '井陉矿区', '', '', '', '', 3, 1, ''), ('130108', '1301', '00,13,1301', '裕华区', '13', '河北省', '1301', '石家庄市', '130108', '裕华区', '', '', '', '', 3, 1, ''), ('130109', '1301', '00,13,1301', '藁城区', '13', '河北省', '1301', '石家庄市', '130109', '藁城区', '', '', '', '', 3, 1, ''), ('130110', '1301', '00,13,1301', '鹿泉区', '13', '河北省', '1301', '石家庄市', '130110', '鹿泉区', '', '', '', '', 3, 1, ''), ('130111', '1301', '00,13,1301', '栾城区', '13', '河北省', '1301', '石家庄市', '130111', '栾城区', '', '', '', '', 3, 1, ''), ('130121', '1301', '00,13,1301', '井陉县', '13', '河北省', '1301', '石家庄市', '130121', '井陉县', '', '', '', '', 3, 1, ''), ('130123', '1301', '00,13,1301', '正定县', '13', '河北省', '1301', '石家庄市', '130123', '正定县', '', '', '', '', 3, 1, ''), ('130125', '1301', '00,13,1301', '行唐县', '13', '河北省', '1301', '石家庄市', '130125', '行唐县', '', '', '', '', 3, 1, ''), ('130126', '1301', '00,13,1301', '灵寿县', '13', '河北省', '1301', '石家庄市', '130126', '灵寿县', '', '', '', '', 3, 1, ''), ('130127', '1301', '00,13,1301', '高邑县', '13', '河北省', '1301', '石家庄市', '130127', '高邑县', '', '', '', '', 3, 1, ''), ('130128', '1301', '00,13,1301', '深泽县', '13', '河北省', '1301', '石家庄市', '130128', '深泽县', '', '', '', '', 3, 1, ''), ('130129', '1301', '00,13,1301', '赞皇县', '13', '河北省', '1301', '石家庄市', '130129', '赞皇县', '', '', '', '', 3, 1, ''), ('130130', '1301', '00,13,1301', '无极县', '13', '河北省', '1301', '石家庄市', '130130', '无极县', '', '', '', '', 3, 1, ''), ('130131', '1301', '00,13,1301', '平山县', '13', '河北省', '1301', '石家庄市', '130131', '平山县', '', '', '', '', 3, 1, ''), ('130132', '1301', '00,13,1301', '元氏县', '13', '河北省', '1301', '石家庄市', '130132', '元氏县', '', '', '', '', 3, 1, ''), ('130133', '1301', '00,13,1301', '赵县', '13', '河北省', '1301', '石家庄市', '130133', '赵县', '', '', '', '', 3, 1, ''), ('130181', '1301', '00,13,1301', '辛集市', '13', '河北省', '1301', '石家庄市', '130181', '辛集市', '', '', '', '', 3, 1, ''), ('130183', '1301', '00,13,1301', '晋州市', '13', '河北省', '1301', '石家庄市', '130183', '晋州市', '', '', '', '', 3, 1, ''), ('130184', '1301', '00,13,1301', '新乐市', '13', '河北省', '1301', '石家庄市', '130184', '新乐市', '', '', '', '', 3, 1, ''), ('1302', '13', '00,13', '唐山市', '13', '河北省', '1302', '唐山市', '', '', '', '', '', '', 2, 1, ''), ('130202', '1302', '00,13,1302', '路南区', '13', '河北省', '1302', '唐山市', '130202', '路南区', '', '', '', '', 3, 1, ''), ('130203', '1302', '00,13,1302', '路北区', '13', '河北省', '1302', '唐山市', '130203', '路北区', '', '', '', '', 3, 1, ''), ('130204', '1302', '00,13,1302', '古冶区', '13', '河北省', '1302', '唐山市', '130204', '古冶区', '', '', '', '', 3, 1, ''), ('130205', '1302', '00,13,1302', '开平区', '13', '河北省', '1302', '唐山市', '130205', '开平区', '', '', '', '', 3, 1, ''), ('130207', '1302', '00,13,1302', '丰南区', '13', '河北省', '1302', '唐山市', '130207', '丰南区', '', '', '', '', 3, 1, ''), ('130208', '1302', '00,13,1302', '丰润区', '13', '河北省', '1302', '唐山市', '130208', '丰润区', '', '', '', '', 3, 1, ''), ('130209', '1302', '00,13,1302', '曹妃甸区', '13', '河北省', '1302', '唐山市', '130209', '曹妃甸区', '', '', '', '', 3, 1, ''), ('130224', '1302', '00,13,1302', '滦南县', '13', '河北省', '1302', '唐山市', '130224', '滦南县', '', '', '', '', 3, 1, ''), ('130225', '1302', '00,13,1302', '乐亭县', '13', '河北省', '1302', '唐山市', '130225', '乐亭县', '', '', '', '', 3, 1, ''), ('130227', '1302', '00,13,1302', '迁西县', '13', '河北省', '1302', '唐山市', '130227', '迁西县', '', '', '', '', 3, 1, ''), ('130229', '1302', '00,13,1302', '玉田县', '13', '河北省', '1302', '唐山市', '130229', '玉田县', '', '', '', '', 3, 1, ''), ('130281', '1302', '00,13,1302', '遵化市', '13', '河北省', '1302', '唐山市', '130281', '遵化市', '', '', '', '', 3, 1, ''), ('130283', '1302', '00,13,1302', '迁安市', '13', '河北省', '1302', '唐山市', '130283', '迁安市', '', '', '', '', 3, 1, ''), ('130284', '1302', '00,13,1302', '滦州市', '13', '河北省', '1302', '唐山市', '130284', '滦州市', '', '', '', '', 3, 1, ''), ('1303', '13', '00,13', '秦皇岛市', '13', '河北省', '1303', '秦皇岛市', '', '', '', '', '', '', 2, 1, ''), ('130302', '1303', '00,13,1303', '海港区', '13', '河北省', '1303', '秦皇岛市', '130302', '海港区', '', '', '', '', 3, 1, ''), ('130303', '1303', '00,13,1303', '山海关区', '13', '河北省', '1303', '秦皇岛市', '130303', '山海关区', '', '', '', '', 3, 1, ''), ('130304', '1303', '00,13,1303', '北戴河区', '13', '河北省', '1303', '秦皇岛市', '130304', '北戴河区', '', '', '', '', 3, 1, ''), ('130306', '1303', '00,13,1303', '抚宁区', '13', '河北省', '1303', '秦皇岛市', '130306', '抚宁区', '', '', '', '', 3, 1, ''), ('130321', '1303', '00,13,1303', '青龙满族自治县', '13', '河北省', '1303', '秦皇岛市', '130321', '青龙满族自治县', '', '', '', '', 3, 1, ''), ('130322', '1303', '00,13,1303', '昌黎县', '13', '河北省', '1303', '秦皇岛市', '130322', '昌黎县', '', '', '', '', 3, 1, ''), ('130324', '1303', '00,13,1303', '卢龙县', '13', '河北省', '1303', '秦皇岛市', '130324', '卢龙县', '', '', '', '', 3, 1, ''), ('1304', '13', '00,13', '邯郸市', '13', '河北省', '1304', '邯郸市', '', '', '', '', '', '', 2, 1, ''), ('130402', '1304', '00,13,1304', '邯山区', '13', '河北省', '1304', '邯郸市', '130402', '邯山区', '', '', '', '', 3, 1, ''), ('130403', '1304', '00,13,1304', '丛台区', '13', '河北省', '1304', '邯郸市', '130403', '丛台区', '', '', '', '', 3, 1, ''), ('130404', '1304', '00,13,1304', '复兴区', '13', '河北省', '1304', '邯郸市', '130404', '复兴区', '', '', '', '', 3, 1, ''), ('130406', '1304', '00,13,1304', '峰峰矿区', '13', '河北省', '1304', '邯郸市', '130406', '峰峰矿区', '', '', '', '', 3, 1, ''), ('130407', '1304', '00,13,1304', '肥乡区', '13', '河北省', '1304', '邯郸市', '130407', '肥乡区', '', '', '', '', 3, 1, ''), ('130408', '1304', '00,13,1304', '永年区', '13', '河北省', '1304', '邯郸市', '130408', '永年区', '', '', '', '', 3, 1, ''), ('130423', '1304', '00,13,1304', '临漳县', '13', '河北省', '1304', '邯郸市', '130423', '临漳县', '', '', '', '', 3, 1, ''), ('130424', '1304', '00,13,1304', '成安县', '13', '河北省', '1304', '邯郸市', '130424', '成安县', '', '', '', '', 3, 1, ''), ('130425', '1304', '00,13,1304', '大名县', '13', '河北省', '1304', '邯郸市', '130425', '大名县', '', '', '', '', 3, 1, ''), ('130426', '1304', '00,13,1304', '涉县', '13', '河北省', '1304', '邯郸市', '130426', '涉县', '', '', '', '', 3, 1, ''), ('130427', '1304', '00,13,1304', '磁县', '13', '河北省', '1304', '邯郸市', '130427', '磁县', '', '', '', '', 3, 1, ''), ('130430', '1304', '00,13,1304', '邱县', '13', '河北省', '1304', '邯郸市', '130430', '邱县', '', '', '', '', 3, 1, ''), ('130431', '1304', '00,13,1304', '鸡泽县', '13', '河北省', '1304', '邯郸市', '130431', '鸡泽县', '', '', '', '', 3, 1, ''), ('130432', '1304', '00,13,1304', '广平县', '13', '河北省', '1304', '邯郸市', '130432', '广平县', '', '', '', '', 3, 1, ''), ('130433', '1304', '00,13,1304', '馆陶县', '13', '河北省', '1304', '邯郸市', '130433', '馆陶县', '', '', '', '', 3, 1, ''), ('130434', '1304', '00,13,1304', '魏县', '13', '河北省', '1304', '邯郸市', '130434', '魏县', '', '', '', '', 3, 1, ''), ('130435', '1304', '00,13,1304', '曲周县', '13', '河北省', '1304', '邯郸市', '130435', '曲周县', '', '', '', '', 3, 1, ''), ('130481', '1304', '00,13,1304', '武安市', '13', '河北省', '1304', '邯郸市', '130481', '武安市', '', '', '', '', 3, 1, ''), ('1305', '13', '00,13', '邢台市', '13', '河北省', '1305', '邢台市', '', '', '', '', '', '', 2, 1, ''), ('130502', '1305', '00,13,1305', '桥东区', '13', '河北省', '1305', '邢台市', '130502', '桥东区', '', '', '', '', 3, 1, ''), ('130503', '1305', '00,13,1305', '桥西区', '13', '河北省', '1305', '邢台市', '130503', '桥西区', '', '', '', '', 3, 1, ''), ('130521', '1305', '00,13,1305', '邢台县', '13', '河北省', '1305', '邢台市', '130521', '邢台县', '', '', '', '', 3, 1, ''), ('130522', '1305', '00,13,1305', '临城县', '13', '河北省', '1305', '邢台市', '130522', '临城县', '', '', '', '', 3, 1, ''), ('130523', '1305', '00,13,1305', '内丘县', '13', '河北省', '1305', '邢台市', '130523', '内丘县', '', '', '', '', 3, 1, ''), ('130524', '1305', '00,13,1305', '柏乡县', '13', '河北省', '1305', '邢台市', '130524', '柏乡县', '', '', '', '', 3, 1, ''), ('130525', '1305', '00,13,1305', '隆尧县', '13', '河北省', '1305', '邢台市', '130525', '隆尧县', '', '', '', '', 3, 1, ''), ('130526', '1305', '00,13,1305', '任县', '13', '河北省', '1305', '邢台市', '130526', '任县', '', '', '', '', 3, 1, ''), ('130527', '1305', '00,13,1305', '南和县', '13', '河北省', '1305', '邢台市', '130527', '南和县', '', '', '', '', 3, 1, ''), ('130528', '1305', '00,13,1305', '宁晋县', '13', '河北省', '1305', '邢台市', '130528', '宁晋县', '', '', '', '', 3, 1, ''), ('130529', '1305', '00,13,1305', '巨鹿县', '13', '河北省', '1305', '邢台市', '130529', '巨鹿县', '', '', '', '', 3, 1, ''), ('130530', '1305', '00,13,1305', '新河县', '13', '河北省', '1305', '邢台市', '130530', '新河县', '', '', '', '', 3, 1, ''), ('130531', '1305', '00,13,1305', '广宗县', '13', '河北省', '1305', '邢台市', '130531', '广宗县', '', '', '', '', 3, 1, ''), ('130532', '1305', '00,13,1305', '平乡县', '13', '河北省', '1305', '邢台市', '130532', '平乡县', '', '', '', '', 3, 1, ''), ('130533', '1305', '00,13,1305', '威县', '13', '河北省', '1305', '邢台市', '130533', '威县', '', '', '', '', 3, 1, ''), ('130534', '1305', '00,13,1305', '清河县', '13', '河北省', '1305', '邢台市', '130534', '清河县', '', '', '', '', 3, 1, ''), ('130535', '1305', '00,13,1305', '临西县', '13', '河北省', '1305', '邢台市', '130535', '临西县', '', '', '', '', 3, 1, ''), ('130581', '1305', '00,13,1305', '南宫市', '13', '河北省', '1305', '邢台市', '130581', '南宫市', '', '', '', '', 3, 1, ''), ('130582', '1305', '00,13,1305', '沙河市', '13', '河北省', '1305', '邢台市', '130582', '沙河市', '', '', '', '', 3, 1, ''), ('1306', '13', '00,13', '保定市', '13', '河北省', '1306', '保定市', '', '', '', '', '', '', 2, 1, ''), ('130602', '1306', '00,13,1306', '竞秀区', '13', '河北省', '1306', '保定市', '130602', '竞秀区', '', '', '', '', 3, 1, ''), ('130606', '1306', '00,13,1306', '莲池区', '13', '河北省', '1306', '保定市', '130606', '莲池区', '', '', '', '', 3, 1, ''), ('130607', '1306', '00,13,1306', '满城区', '13', '河北省', '1306', '保定市', '130607', '满城区', '', '', '', '', 3, 1, ''), ('130608', '1306', '00,13,1306', '清苑区', '13', '河北省', '1306', '保定市', '130608', '清苑区', '', '', '', '', 3, 1, ''), ('130609', '1306', '00,13,1306', '徐水区', '13', '河北省', '1306', '保定市', '130609', '徐水区', '', '', '', '', 3, 1, ''), ('130623', '1306', '00,13,1306', '涞水县', '13', '河北省', '1306', '保定市', '130623', '涞水县', '', '', '', '', 3, 1, ''), ('130624', '1306', '00,13,1306', '阜平县', '13', '河北省', '1306', '保定市', '130624', '阜平县', '', '', '', '', 3, 1, ''), ('130626', '1306', '00,13,1306', '定兴县', '13', '河北省', '1306', '保定市', '130626', '定兴县', '', '', '', '', 3, 1, ''), ('130627', '1306', '00,13,1306', '唐县', '13', '河北省', '1306', '保定市', '130627', '唐县', '', '', '', '', 3, 1, ''), ('130628', '1306', '00,13,1306', '高阳县', '13', '河北省', '1306', '保定市', '130628', '高阳县', '', '', '', '', 3, 1, ''), ('130629', '1306', '00,13,1306', '容城县', '13', '河北省', '1306', '保定市', '130629', '容城县', '', '', '', '', 3, 1, ''), ('130630', '1306', '00,13,1306', '涞源县', '13', '河北省', '1306', '保定市', '130630', '涞源县', '', '', '', '', 3, 1, ''), ('130631', '1306', '00,13,1306', '望都县', '13', '河北省', '1306', '保定市', '130631', '望都县', '', '', '', '', 3, 1, ''), ('130632', '1306', '00,13,1306', '安新县', '13', '河北省', '1306', '保定市', '130632', '安新县', '', '', '', '', 3, 1, ''), ('130633', '1306', '00,13,1306', '易县', '13', '河北省', '1306', '保定市', '130633', '易县', '', '', '', '', 3, 1, ''), ('130634', '1306', '00,13,1306', '曲阳县', '13', '河北省', '1306', '保定市', '130634', '曲阳县', '', '', '', '', 3, 1, ''), ('130635', '1306', '00,13,1306', '蠡县', '13', '河北省', '1306', '保定市', '130635', '蠡县', '', '', '', '', 3, 1, ''), ('130636', '1306', '00,13,1306', '顺平县', '13', '河北省', '1306', '保定市', '130636', '顺平县', '', '', '', '', 3, 1, ''), ('130637', '1306', '00,13,1306', '博野县', '13', '河北省', '1306', '保定市', '130637', '博野县', '', '', '', '', 3, 1, ''), ('130638', '1306', '00,13,1306', '雄县', '13', '河北省', '1306', '保定市', '130638', '雄县', '', '', '', '', 3, 1, ''), ('130681', '1306', '00,13,1306', '涿州市', '13', '河北省', '1306', '保定市', '130681', '涿州市', '', '', '', '', 3, 1, ''), ('130682', '1306', '00,13,1306', '定州市', '13', '河北省', '1306', '保定市', '130682', '定州市', '', '', '', '', 3, 1, ''), ('130683', '1306', '00,13,1306', '安国市', '13', '河北省', '1306', '保定市', '130683', '安国市', '', '', '', '', 3, 1, ''), ('130684', '1306', '00,13,1306', '高碑店市', '13', '河北省', '1306', '保定市', '130684', '高碑店市', '', '', '', '', 3, 1, ''), ('1307', '13', '00,13', '张家口市', '13', '河北省', '1307', '张家口市', '', '', '', '', '', '', 2, 1, ''), ('130702', '1307', '00,13,1307', '桥东区', '13', '河北省', '1307', '张家口市', '130702', '桥东区', '', '', '', '', 3, 1, ''), ('130703', '1307', '00,13,1307', '桥西区', '13', '河北省', '1307', '张家口市', '130703', '桥西区', '', '', '', '', 3, 1, ''), ('130705', '1307', '00,13,1307', '宣化区', '13', '河北省', '1307', '张家口市', '130705', '宣化区', '', '', '', '', 3, 1, ''), ('130706', '1307', '00,13,1307', '下花园区', '13', '河北省', '1307', '张家口市', '130706', '下花园区', '', '', '', '', 3, 1, ''), ('130708', '1307', '00,13,1307', '万全区', '13', '河北省', '1307', '张家口市', '130708', '万全区', '', '', '', '', 3, 1, ''), ('130709', '1307', '00,13,1307', '崇礼区', '13', '河北省', '1307', '张家口市', '130709', '崇礼区', '', '', '', '', 3, 1, ''), ('130722', '1307', '00,13,1307', '张北县', '13', '河北省', '1307', '张家口市', '130722', '张北县', '', '', '', '', 3, 1, ''), ('130723', '1307', '00,13,1307', '康保县', '13', '河北省', '1307', '张家口市', '130723', '康保县', '', '', '', '', 3, 1, ''), ('130724', '1307', '00,13,1307', '沽源县', '13', '河北省', '1307', '张家口市', '130724', '沽源县', '', '', '', '', 3, 1, ''), ('130725', '1307', '00,13,1307', '尚义县', '13', '河北省', '1307', '张家口市', '130725', '尚义县', '', '', '', '', 3, 1, ''), ('130726', '1307', '00,13,1307', '蔚县', '13', '河北省', '1307', '张家口市', '130726', '蔚县', '', '', '', '', 3, 1, ''), ('130727', '1307', '00,13,1307', '阳原县', '13', '河北省', '1307', '张家口市', '130727', '阳原县', '', '', '', '', 3, 1, ''), ('130728', '1307', '00,13,1307', '怀安县', '13', '河北省', '1307', '张家口市', '130728', '怀安县', '', '', '', '', 3, 1, ''), ('130730', '1307', '00,13,1307', '怀来县', '13', '河北省', '1307', '张家口市', '130730', '怀来县', '', '', '', '', 3, 1, ''), ('130731', '1307', '00,13,1307', '涿鹿县', '13', '河北省', '1307', '张家口市', '130731', '涿鹿县', '', '', '', '', 3, 1, ''), ('130732', '1307', '00,13,1307', '赤城县', '13', '河北省', '1307', '张家口市', '130732', '赤城县', '', '', '', '', 3, 1, ''), ('1308', '13', '00,13', '承德市', '13', '河北省', '1308', '承德市', '', '', '', '', '', '', 2, 1, ''), ('130802', '1308', '00,13,1308', '双桥区', '13', '河北省', '1308', '承德市', '130802', '双桥区', '', '', '', '', 3, 1, ''), ('130803', '1308', '00,13,1308', '双滦区', '13', '河北省', '1308', '承德市', '130803', '双滦区', '', '', '', '', 3, 1, ''), ('130804', '1308', '00,13,1308', '鹰手营子矿区', '13', '河北省', '1308', '承德市', '130804', '鹰手营子矿区', '', '', '', '', 3, 1, ''), ('130821', '1308', '00,13,1308', '承德县', '13', '河北省', '1308', '承德市', '130821', '承德县', '', '', '', '', 3, 1, ''), ('130822', '1308', '00,13,1308', '兴隆县', '13', '河北省', '1308', '承德市', '130822', '兴隆县', '', '', '', '', 3, 1, ''), ('130824', '1308', '00,13,1308', '滦平县', '13', '河北省', '1308', '承德市', '130824', '滦平县', '', '', '', '', 3, 1, ''), ('130825', '1308', '00,13,1308', '隆化县', '13', '河北省', '1308', '承德市', '130825', '隆化县', '', '', '', '', 3, 1, ''), ('130826', '1308', '00,13,1308', '丰宁满族自治县', '13', '河北省', '1308', '承德市', '130826', '丰宁满族自治县', '', '', '', '', 3, 1, ''), ('130827', '1308', '00,13,1308', '宽城满族自治县', '13', '河北省', '1308', '承德市', '130827', '宽城满族自治县', '', '', '', '', 3, 1, ''), ('130828', '1308', '00,13,1308', '围场满族蒙古族自治县', '13', '河北省', '1308', '承德市', '130828', '围场满族蒙古族自治县', '', '', '', '', 3, 1, ''), ('130881', '1308', '00,13,1308', '平泉市', '13', '河北省', '1308', '承德市', '130881', '平泉市', '', '', '', '', 3, 1, ''), ('1309', '13', '00,13', '沧州市', '13', '河北省', '1309', '沧州市', '', '', '', '', '', '', 2, 1, ''), ('130902', '1309', '00,13,1309', '新华区', '13', '河北省', '1309', '沧州市', '130902', '新华区', '', '', '', '', 3, 1, ''), ('130903', '1309', '00,13,1309', '运河区', '13', '河北省', '1309', '沧州市', '130903', '运河区', '', '', '', '', 3, 1, ''), ('130921', '1309', '00,13,1309', '沧县', '13', '河北省', '1309', '沧州市', '130921', '沧县', '', '', '', '', 3, 1, ''), ('130922', '1309', '00,13,1309', '青县', '13', '河北省', '1309', '沧州市', '130922', '青县', '', '', '', '', 3, 1, ''), ('130923', '1309', '00,13,1309', '东光县', '13', '河北省', '1309', '沧州市', '130923', '东光县', '', '', '', '', 3, 1, ''), ('130924', '1309', '00,13,1309', '海兴县', '13', '河北省', '1309', '沧州市', '130924', '海兴县', '', '', '', '', 3, 1, ''), ('130925', '1309', '00,13,1309', '盐山县', '13', '河北省', '1309', '沧州市', '130925', '盐山县', '', '', '', '', 3, 1, ''), ('130926', '1309', '00,13,1309', '肃宁县', '13', '河北省', '1309', '沧州市', '130926', '肃宁县', '', '', '', '', 3, 1, ''), ('130927', '1309', '00,13,1309', '南皮县', '13', '河北省', '1309', '沧州市', '130927', '南皮县', '', '', '', '', 3, 1, ''), ('130928', '1309', '00,13,1309', '吴桥县', '13', '河北省', '1309', '沧州市', '130928', '吴桥县', '', '', '', '', 3, 1, ''), ('130929', '1309', '00,13,1309', '献县', '13', '河北省', '1309', '沧州市', '130929', '献县', '', '', '', '', 3, 1, ''), ('130930', '1309', '00,13,1309', '孟村回族自治县', '13', '河北省', '1309', '沧州市', '130930', '孟村回族自治县', '', '', '', '', 3, 1, ''), ('130981', '1309', '00,13,1309', '泊头市', '13', '河北省', '1309', '沧州市', '130981', '泊头市', '', '', '', '', 3, 1, ''), ('130982', '1309', '00,13,1309', '任丘市', '13', '河北省', '1309', '沧州市', '130982', '任丘市', '', '', '', '', 3, 1, ''), ('130983', '1309', '00,13,1309', '黄骅市', '13', '河北省', '1309', '沧州市', '130983', '黄骅市', '', '', '', '', 3, 1, ''), ('130984', '1309', '00,13,1309', '河间市', '13', '河北省', '1309', '沧州市', '130984', '河间市', '', '', '', '', 3, 1, ''), ('1310', '13', '00,13', '廊坊市', '13', '河北省', '1310', '廊坊市', '', '', '', '', '', '', 2, 1, ''), ('131002', '1310', '00,13,1310', '安次区', '13', '河北省', '1310', '廊坊市', '131002', '安次区', '', '', '', '', 3, 1, ''), ('131003', '1310', '00,13,1310', '广阳区', '13', '河北省', '1310', '廊坊市', '131003', '广阳区', '', '', '', '', 3, 1, ''), ('131022', '1310', '00,13,1310', '固安县', '13', '河北省', '1310', '廊坊市', '131022', '固安县', '', '', '', '', 3, 1, ''), ('131023', '1310', '00,13,1310', '永清县', '13', '河北省', '1310', '廊坊市', '131023', '永清县', '', '', '', '', 3, 1, ''), ('131024', '1310', '00,13,1310', '香河县', '13', '河北省', '1310', '廊坊市', '131024', '香河县', '', '', '', '', 3, 1, ''), ('131025', '1310', '00,13,1310', '大城县', '13', '河北省', '1310', '廊坊市', '131025', '大城县', '', '', '', '', 3, 1, ''), ('131026', '1310', '00,13,1310', '文安县', '13', '河北省', '1310', '廊坊市', '131026', '文安县', '', '', '', '', 3, 1, ''), ('131028', '1310', '00,13,1310', '大厂回族自治县', '13', '河北省', '1310', '廊坊市', '131028', '大厂回族自治县', '', '', '', '', 3, 1, ''), ('131081', '1310', '00,13,1310', '霸州市', '13', '河北省', '1310', '廊坊市', '131081', '霸州市', '', '', '', '', 3, 1, ''), ('131082', '1310', '00,13,1310', '三河市', '13', '河北省', '1310', '廊坊市', '131082', '三河市', '', '', '', '', 3, 1, ''), ('1311', '13', '00,13', '衡水市', '13', '河北省', '1311', '衡水市', '', '', '', '', '', '', 2, 1, ''), ('131102', '1311', '00,13,1311', '桃城区', '13', '河北省', '1311', '衡水市', '131102', '桃城区', '', '', '', '', 3, 1, ''), ('131103', '1311', '00,13,1311', '冀州区', '13', '河北省', '1311', '衡水市', '131103', '冀州区', '', '', '', '', 3, 1, ''), ('131121', '1311', '00,13,1311', '枣强县', '13', '河北省', '1311', '衡水市', '131121', '枣强县', '', '', '', '', 3, 1, ''), ('131122', '1311', '00,13,1311', '武邑县', '13', '河北省', '1311', '衡水市', '131122', '武邑县', '', '', '', '', 3, 1, ''), ('131123', '1311', '00,13,1311', '武强县', '13', '河北省', '1311', '衡水市', '131123', '武强县', '', '', '', '', 3, 1, ''), ('131124', '1311', '00,13,1311', '饶阳县', '13', '河北省', '1311', '衡水市', '131124', '饶阳县', '', '', '', '', 3, 1, ''), ('131125', '1311', '00,13,1311', '安平县', '13', '河北省', '1311', '衡水市', '131125', '安平县', '', '', '', '', 3, 1, ''), ('131126', '1311', '00,13,1311', '故城县', '13', '河北省', '1311', '衡水市', '131126', '故城县', '', '', '', '', 3, 1, ''), ('131127', '1311', '00,13,1311', '景县', '13', '河北省', '1311', '衡水市', '131127', '景县', '', '', '', '', 3, 1, ''), ('131128', '1311', '00,13,1311', '阜城县', '13', '河北省', '1311', '衡水市', '131128', '阜城县', '', '', '', '', 3, 1, ''), ('131182', '1311', '00,13,1311', '深州市', '13', '河北省', '1311', '衡水市', '131182', '深州市', '', '', '', '', 3, 1, ''), ('14', '00', '00', '山西省', '14', '山西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('1401', '14', '00,14', '太原市', '14', '山西省', '1401', '太原市', '', '', '', '', '', '', 2, 1, ''), ('140105', '1401', '00,14,1401', '小店区', '14', '山西省', '1401', '太原市', '140105', '小店区', '', '', '', '', 3, 1, ''), ('140106', '1401', '00,14,1401', '迎泽区', '14', '山西省', '1401', '太原市', '140106', '迎泽区', '', '', '', '', 3, 1, ''), ('140107', '1401', '00,14,1401', '杏花岭区', '14', '山西省', '1401', '太原市', '140107', '杏花岭区', '', '', '', '', 3, 1, ''), ('140108', '1401', '00,14,1401', '尖草坪区', '14', '山西省', '1401', '太原市', '140108', '尖草坪区', '', '', '', '', 3, 1, ''), ('140109', '1401', '00,14,1401', '万柏林区', '14', '山西省', '1401', '太原市', '140109', '万柏林区', '', '', '', '', 3, 1, ''), ('140110', '1401', '00,14,1401', '晋源区', '14', '山西省', '1401', '太原市', '140110', '晋源区', '', '', '', '', 3, 1, ''), ('140121', '1401', '00,14,1401', '清徐县', '14', '山西省', '1401', '太原市', '140121', '清徐县', '', '', '', '', 3, 1, ''), ('140122', '1401', '00,14,1401', '阳曲县', '14', '山西省', '1401', '太原市', '140122', '阳曲县', '', '', '', '', 3, 1, ''), ('140123', '1401', '00,14,1401', '娄烦县', '14', '山西省', '1401', '太原市', '140123', '娄烦县', '', '', '', '', 3, 1, ''), ('140181', '1401', '00,14,1401', '古交市', '14', '山西省', '1401', '太原市', '140181', '古交市', '', '', '', '', 3, 1, ''), ('1402', '14', '00,14', '大同市', '14', '山西省', '1402', '大同市', '', '', '', '', '', '', 2, 1, ''), ('140212', '1402', '00,14,1402', '新荣区', '14', '山西省', '1402', '大同市', '140212', '新荣区', '', '', '', '', 3, 1, ''), ('140213', '1402', '00,14,1402', '平城区', '14', '山西省', '1402', '大同市', '140213', '平城区', '', '', '', '', 3, 1, ''), ('140214', '1402', '00,14,1402', '云冈区', '14', '山西省', '1402', '大同市', '140214', '云冈区', '', '', '', '', 3, 1, ''), ('140215', '1402', '00,14,1402', '云州区', '14', '山西省', '1402', '大同市', '140215', '云州区', '', '', '', '', 3, 1, ''), ('140221', '1402', '00,14,1402', '阳高县', '14', '山西省', '1402', '大同市', '140221', '阳高县', '', '', '', '', 3, 1, ''), ('140222', '1402', '00,14,1402', '天镇县', '14', '山西省', '1402', '大同市', '140222', '天镇县', '', '', '', '', 3, 1, ''), ('140223', '1402', '00,14,1402', '广灵县', '14', '山西省', '1402', '大同市', '140223', '广灵县', '', '', '', '', 3, 1, ''), ('140224', '1402', '00,14,1402', '灵丘县', '14', '山西省', '1402', '大同市', '140224', '灵丘县', '', '', '', '', 3, 1, ''), ('140225', '1402', '00,14,1402', '浑源县', '14', '山西省', '1402', '大同市', '140225', '浑源县', '', '', '', '', 3, 1, ''), ('140226', '1402', '00,14,1402', '左云县', '14', '山西省', '1402', '大同市', '140226', '左云县', '', '', '', '', 3, 1, ''), ('1403', '14', '00,14', '阳泉市', '14', '山西省', '1403', '阳泉市', '', '', '', '', '', '', 2, 1, ''), ('140302', '1403', '00,14,1403', '城区', '14', '山西省', '1403', '阳泉市', '140302', '城区', '', '', '', '', 3, 1, ''), ('140303', '1403', '00,14,1403', '矿区', '14', '山西省', '1403', '阳泉市', '140303', '矿区', '', '', '', '', 3, 1, ''), ('140311', '1403', '00,14,1403', '郊区', '14', '山西省', '1403', '阳泉市', '140311', '郊区', '', '', '', '', 3, 1, ''), ('140321', '1403', '00,14,1403', '平定县', '14', '山西省', '1403', '阳泉市', '140321', '平定县', '', '', '', '', 3, 1, ''), ('140322', '1403', '00,14,1403', '盂县', '14', '山西省', '1403', '阳泉市', '140322', '盂县', '', '', '', '', 3, 1, ''), ('1404', '14', '00,14', '长治市', '14', '山西省', '1404', '长治市', '', '', '', '', '', '', 2, 1, ''), ('140403', '1404', '00,14,1404', '潞州区', '14', '山西省', '1404', '长治市', '140403', '潞州区', '', '', '', '', 3, 1, ''), ('140404', '1404', '00,14,1404', '上党区', '14', '山西省', '1404', '长治市', '140404', '上党区', '', '', '', '', 3, 1, ''), ('140405', '1404', '00,14,1404', '屯留区', '14', '山西省', '1404', '长治市', '140405', '屯留区', '', '', '', '', 3, 1, ''), ('140406', '1404', '00,14,1404', '潞城区', '14', '山西省', '1404', '长治市', '140406', '潞城区', '', '', '', '', 3, 1, ''), ('140423', '1404', '00,14,1404', '襄垣县', '14', '山西省', '1404', '长治市', '140423', '襄垣县', '', '', '', '', 3, 1, ''), ('140425', '1404', '00,14,1404', '平顺县', '14', '山西省', '1404', '长治市', '140425', '平顺县', '', '', '', '', 3, 1, ''), ('140426', '1404', '00,14,1404', '黎城县', '14', '山西省', '1404', '长治市', '140426', '黎城县', '', '', '', '', 3, 1, ''), ('140427', '1404', '00,14,1404', '壶关县', '14', '山西省', '1404', '长治市', '140427', '壶关县', '', '', '', '', 3, 1, ''), ('140428', '1404', '00,14,1404', '长子县', '14', '山西省', '1404', '长治市', '140428', '长子县', '', '', '', '', 3, 1, ''), ('140429', '1404', '00,14,1404', '武乡县', '14', '山西省', '1404', '长治市', '140429', '武乡县', '', '', '', '', 3, 1, ''), ('140430', '1404', '00,14,1404', '沁县', '14', '山西省', '1404', '长治市', '140430', '沁县', '', '', '', '', 3, 1, ''), ('140431', '1404', '00,14,1404', '沁源县', '14', '山西省', '1404', '长治市', '140431', '沁源县', '', '', '', '', 3, 1, ''), ('1405', '14', '00,14', '晋城市', '14', '山西省', '1405', '晋城市', '', '', '', '', '', '', 2, 1, ''), ('140502', '1405', '00,14,1405', '城区', '14', '山西省', '1405', '晋城市', '140502', '城区', '', '', '', '', 3, 1, ''), ('140521', '1405', '00,14,1405', '沁水县', '14', '山西省', '1405', '晋城市', '140521', '沁水县', '', '', '', '', 3, 1, ''), ('140522', '1405', '00,14,1405', '阳城县', '14', '山西省', '1405', '晋城市', '140522', '阳城县', '', '', '', '', 3, 1, ''), ('140524', '1405', '00,14,1405', '陵川县', '14', '山西省', '1405', '晋城市', '140524', '陵川县', '', '', '', '', 3, 1, ''), ('140525', '1405', '00,14,1405', '泽州县', '14', '山西省', '1405', '晋城市', '140525', '泽州县', '', '', '', '', 3, 1, ''), ('140581', '1405', '00,14,1405', '高平市', '14', '山西省', '1405', '晋城市', '140581', '高平市', '', '', '', '', 3, 1, ''), ('1406', '14', '00,14', '朔州市', '14', '山西省', '1406', '朔州市', '', '', '', '', '', '', 2, 1, ''), ('140602', '1406', '00,14,1406', '朔城区', '14', '山西省', '1406', '朔州市', '140602', '朔城区', '', '', '', '', 3, 1, ''), ('140603', '1406', '00,14,1406', '平鲁区', '14', '山西省', '1406', '朔州市', '140603', '平鲁区', '', '', '', '', 3, 1, ''), ('140621', '1406', '00,14,1406', '山阴县', '14', '山西省', '1406', '朔州市', '140621', '山阴县', '', '', '', '', 3, 1, ''), ('140622', '1406', '00,14,1406', '应县', '14', '山西省', '1406', '朔州市', '140622', '应县', '', '', '', '', 3, 1, ''), ('140623', '1406', '00,14,1406', '右玉县', '14', '山西省', '1406', '朔州市', '140623', '右玉县', '', '', '', '', 3, 1, ''), ('140681', '1406', '00,14,1406', '怀仁市', '14', '山西省', '1406', '朔州市', '140681', '怀仁市', '', '', '', '', 3, 1, ''), ('1407', '14', '00,14', '晋中市', '14', '山西省', '1407', '晋中市', '', '', '', '', '', '', 2, 1, ''), ('140702', '1407', '00,14,1407', '榆次区', '14', '山西省', '1407', '晋中市', '140702', '榆次区', '', '', '', '', 3, 1, ''), ('140703', '1407', '00,14,1407', '太谷区', '14', '山西省', '1407', '晋中市', '140703', '太谷区', '', '', '', '', 3, 1, ''), ('140721', '1407', '00,14,1407', '榆社县', '14', '山西省', '1407', '晋中市', '140721', '榆社县', '', '', '', '', 3, 1, ''), ('140722', '1407', '00,14,1407', '左权县', '14', '山西省', '1407', '晋中市', '140722', '左权县', '', '', '', '', 3, 1, ''), ('140723', '1407', '00,14,1407', '和顺县', '14', '山西省', '1407', '晋中市', '140723', '和顺县', '', '', '', '', 3, 1, ''), ('140724', '1407', '00,14,1407', '昔阳县', '14', '山西省', '1407', '晋中市', '140724', '昔阳县', '', '', '', '', 3, 1, ''), ('140725', '1407', '00,14,1407', '寿阳县', '14', '山西省', '1407', '晋中市', '140725', '寿阳县', '', '', '', '', 3, 1, ''), ('140727', '1407', '00,14,1407', '祁县', '14', '山西省', '1407', '晋中市', '140727', '祁县', '', '', '', '', 3, 1, ''), ('140728', '1407', '00,14,1407', '平遥县', '14', '山西省', '1407', '晋中市', '140728', '平遥县', '', '', '', '', 3, 1, ''), ('140729', '1407', '00,14,1407', '灵石县', '14', '山西省', '1407', '晋中市', '140729', '灵石县', '', '', '', '', 3, 1, ''), ('140781', '1407', '00,14,1407', '介休市', '14', '山西省', '1407', '晋中市', '140781', '介休市', '', '', '', '', 3, 1, ''), ('1408', '14', '00,14', '运城市', '14', '山西省', '1408', '运城市', '', '', '', '', '', '', 2, 1, ''), ('140802', '1408', '00,14,1408', '盐湖区', '14', '山西省', '1408', '运城市', '140802', '盐湖区', '', '', '', '', 3, 1, ''), ('140821', '1408', '00,14,1408', '临猗县', '14', '山西省', '1408', '运城市', '140821', '临猗县', '', '', '', '', 3, 1, ''), ('140822', '1408', '00,14,1408', '万荣县', '14', '山西省', '1408', '运城市', '140822', '万荣县', '', '', '', '', 3, 1, ''), ('140823', '1408', '00,14,1408', '闻喜县', '14', '山西省', '1408', '运城市', '140823', '闻喜县', '', '', '', '', 3, 1, ''), ('140824', '1408', '00,14,1408', '稷山县', '14', '山西省', '1408', '运城市', '140824', '稷山县', '', '', '', '', 3, 1, ''), ('140825', '1408', '00,14,1408', '新绛县', '14', '山西省', '1408', '运城市', '140825', '新绛县', '', '', '', '', 3, 1, ''), ('140826', '1408', '00,14,1408', '绛县', '14', '山西省', '1408', '运城市', '140826', '绛县', '', '', '', '', 3, 1, ''), ('140827', '1408', '00,14,1408', '垣曲县', '14', '山西省', '1408', '运城市', '140827', '垣曲县', '', '', '', '', 3, 1, ''), ('140828', '1408', '00,14,1408', '夏县', '14', '山西省', '1408', '运城市', '140828', '夏县', '', '', '', '', 3, 1, ''), ('140829', '1408', '00,14,1408', '平陆县', '14', '山西省', '1408', '运城市', '140829', '平陆县', '', '', '', '', 3, 1, ''), ('140830', '1408', '00,14,1408', '芮城县', '14', '山西省', '1408', '运城市', '140830', '芮城县', '', '', '', '', 3, 1, ''), ('140881', '1408', '00,14,1408', '永济市', '14', '山西省', '1408', '运城市', '140881', '永济市', '', '', '', '', 3, 1, ''), ('140882', '1408', '00,14,1408', '河津市', '14', '山西省', '1408', '运城市', '140882', '河津市', '', '', '', '', 3, 1, ''), ('1409', '14', '00,14', '忻州市', '14', '山西省', '1409', '忻州市', '', '', '', '', '', '', 2, 1, ''), ('140902', '1409', '00,14,1409', '忻府区', '14', '山西省', '1409', '忻州市', '140902', '忻府区', '', '', '', '', 3, 1, ''), ('140921', '1409', '00,14,1409', '定襄县', '14', '山西省', '1409', '忻州市', '140921', '定襄县', '', '', '', '', 3, 1, ''), ('140922', '1409', '00,14,1409', '五台县', '14', '山西省', '1409', '忻州市', '140922', '五台县', '', '', '', '', 3, 1, ''), ('140923', '1409', '00,14,1409', '代县', '14', '山西省', '1409', '忻州市', '140923', '代县', '', '', '', '', 3, 1, ''), ('140924', '1409', '00,14,1409', '繁峙县', '14', '山西省', '1409', '忻州市', '140924', '繁峙县', '', '', '', '', 3, 1, ''), ('140925', '1409', '00,14,1409', '宁武县', '14', '山西省', '1409', '忻州市', '140925', '宁武县', '', '', '', '', 3, 1, ''), ('140926', '1409', '00,14,1409', '静乐县', '14', '山西省', '1409', '忻州市', '140926', '静乐县', '', '', '', '', 3, 1, ''), ('140927', '1409', '00,14,1409', '神池县', '14', '山西省', '1409', '忻州市', '140927', '神池县', '', '', '', '', 3, 1, ''), ('140928', '1409', '00,14,1409', '五寨县', '14', '山西省', '1409', '忻州市', '140928', '五寨县', '', '', '', '', 3, 1, ''), ('140929', '1409', '00,14,1409', '岢岚县', '14', '山西省', '1409', '忻州市', '140929', '岢岚县', '', '', '', '', 3, 1, ''), ('140930', '1409', '00,14,1409', '河曲县', '14', '山西省', '1409', '忻州市', '140930', '河曲县', '', '', '', '', 3, 1, ''), ('140931', '1409', '00,14,1409', '保德县', '14', '山西省', '1409', '忻州市', '140931', '保德县', '', '', '', '', 3, 1, ''), ('140932', '1409', '00,14,1409', '偏关县', '14', '山西省', '1409', '忻州市', '140932', '偏关县', '', '', '', '', 3, 1, ''), ('140981', '1409', '00,14,1409', '原平市', '14', '山西省', '1409', '忻州市', '140981', '原平市', '', '', '', '', 3, 1, ''), ('1410', '14', '00,14', '临汾市', '14', '山西省', '1410', '临汾市', '', '', '', '', '', '', 2, 1, ''), ('141002', '1410', '00,14,1410', '尧都区', '14', '山西省', '1410', '临汾市', '141002', '尧都区', '', '', '', '', 3, 1, ''), ('141021', '1410', '00,14,1410', '曲沃县', '14', '山西省', '1410', '临汾市', '141021', '曲沃县', '', '', '', '', 3, 1, ''), ('141022', '1410', '00,14,1410', '翼城县', '14', '山西省', '1410', '临汾市', '141022', '翼城县', '', '', '', '', 3, 1, ''), ('141023', '1410', '00,14,1410', '襄汾县', '14', '山西省', '1410', '临汾市', '141023', '襄汾县', '', '', '', '', 3, 1, ''), ('141024', '1410', '00,14,1410', '洪洞县', '14', '山西省', '1410', '临汾市', '141024', '洪洞县', '', '', '', '', 3, 1, ''), ('141025', '1410', '00,14,1410', '古县', '14', '山西省', '1410', '临汾市', '141025', '古县', '', '', '', '', 3, 1, ''), ('141026', '1410', '00,14,1410', '安泽县', '14', '山西省', '1410', '临汾市', '141026', '安泽县', '', '', '', '', 3, 1, ''), ('141027', '1410', '00,14,1410', '浮山县', '14', '山西省', '1410', '临汾市', '141027', '浮山县', '', '', '', '', 3, 1, ''), ('141028', '1410', '00,14,1410', '吉县', '14', '山西省', '1410', '临汾市', '141028', '吉县', '', '', '', '', 3, 1, ''), ('141029', '1410', '00,14,1410', '乡宁县', '14', '山西省', '1410', '临汾市', '141029', '乡宁县', '', '', '', '', 3, 1, ''), ('141030', '1410', '00,14,1410', '大宁县', '14', '山西省', '1410', '临汾市', '141030', '大宁县', '', '', '', '', 3, 1, ''), ('141031', '1410', '00,14,1410', '隰县', '14', '山西省', '1410', '临汾市', '141031', '隰县', '', '', '', '', 3, 1, ''), ('141032', '1410', '00,14,1410', '永和县', '14', '山西省', '1410', '临汾市', '141032', '永和县', '', '', '', '', 3, 1, ''), ('141033', '1410', '00,14,1410', '蒲县', '14', '山西省', '1410', '临汾市', '141033', '蒲县', '', '', '', '', 3, 1, ''), ('141034', '1410', '00,14,1410', '汾西县', '14', '山西省', '1410', '临汾市', '141034', '汾西县', '', '', '', '', 3, 1, ''), ('141081', '1410', '00,14,1410', '侯马市', '14', '山西省', '1410', '临汾市', '141081', '侯马市', '', '', '', '', 3, 1, ''), ('141082', '1410', '00,14,1410', '霍州市', '14', '山西省', '1410', '临汾市', '141082', '霍州市', '', '', '', '', 3, 1, ''), ('1411', '14', '00,14', '吕梁市', '14', '山西省', '1411', '吕梁市', '', '', '', '', '', '', 2, 1, ''), ('141102', '1411', '00,14,1411', '离石区', '14', '山西省', '1411', '吕梁市', '141102', '离石区', '', '', '', '', 3, 1, ''), ('141121', '1411', '00,14,1411', '文水县', '14', '山西省', '1411', '吕梁市', '141121', '文水县', '', '', '', '', 3, 1, ''), ('141122', '1411', '00,14,1411', '交城县', '14', '山西省', '1411', '吕梁市', '141122', '交城县', '', '', '', '', 3, 1, ''), ('141123', '1411', '00,14,1411', '兴县', '14', '山西省', '1411', '吕梁市', '141123', '兴县', '', '', '', '', 3, 1, ''), ('141124', '1411', '00,14,1411', '临县', '14', '山西省', '1411', '吕梁市', '141124', '临县', '', '', '', '', 3, 1, ''), ('141125', '1411', '00,14,1411', '柳林县', '14', '山西省', '1411', '吕梁市', '141125', '柳林县', '', '', '', '', 3, 1, ''), ('141126', '1411', '00,14,1411', '石楼县', '14', '山西省', '1411', '吕梁市', '141126', '石楼县', '', '', '', '', 3, 1, ''), ('141127', '1411', '00,14,1411', '岚县', '14', '山西省', '1411', '吕梁市', '141127', '岚县', '', '', '', '', 3, 1, ''), ('141128', '1411', '00,14,1411', '方山县', '14', '山西省', '1411', '吕梁市', '141128', '方山县', '', '', '', '', 3, 1, ''), ('141129', '1411', '00,14,1411', '中阳县', '14', '山西省', '1411', '吕梁市', '141129', '中阳县', '', '', '', '', 3, 1, ''), ('141130', '1411', '00,14,1411', '交口县', '14', '山西省', '1411', '吕梁市', '141130', '交口县', '', '', '', '', 3, 1, ''), ('141181', '1411', '00,14,1411', '孝义市', '14', '山西省', '1411', '吕梁市', '141181', '孝义市', '', '', '', '', 3, 1, ''), ('141182', '1411', '00,14,1411', '汾阳市', '14', '山西省', '1411', '吕梁市', '141182', '汾阳市', '', '', '', '', 3, 1, ''), ('15', '00', '00', '内蒙古自治区', '15', '内蒙古自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('1501', '15', '00,15', '呼和浩特市', '15', '内蒙古自治区', '1501', '呼和浩特市', '', '', '', '', '', '', 2, 1, ''), ('150102', '1501', '00,15,1501', '新城区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150102', '新城区', '', '', '', '', 3, 1, ''), ('150103', '1501', '00,15,1501', '回民区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150103', '回民区', '', '', '', '', 3, 1, ''), ('150104', '1501', '00,15,1501', '玉泉区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150104', '玉泉区', '', '', '', '', 3, 1, ''), ('150105', '1501', '00,15,1501', '赛罕区', '15', '内蒙古自治区', '1501', '呼和浩特市', '150105', '赛罕区', '', '', '', '', 3, 1, ''), ('150121', '1501', '00,15,1501', '土默特左旗', '15', '内蒙古自治区', '1501', '呼和浩特市', '150121', '土默特左旗', '', '', '', '', 3, 1, ''), ('150122', '1501', '00,15,1501', '托克托县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150122', '托克托县', '', '', '', '', 3, 1, ''), ('150123', '1501', '00,15,1501', '和林格尔县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150123', '和林格尔县', '', '', '', '', 3, 1, ''), ('150124', '1501', '00,15,1501', '清水河县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150124', '清水河县', '', '', '', '', 3, 1, ''), ('150125', '1501', '00,15,1501', '武川县', '15', '内蒙古自治区', '1501', '呼和浩特市', '150125', '武川县', '', '', '', '', 3, 1, ''), ('1502', '15', '00,15', '包头市', '15', '内蒙古自治区', '1502', '包头市', '', '', '', '', '', '', 2, 1, ''), ('150202', '1502', '00,15,1502', '东河区', '15', '内蒙古自治区', '1502', '包头市', '150202', '东河区', '', '', '', '', 3, 1, ''), ('150203', '1502', '00,15,1502', '昆都仑区', '15', '内蒙古自治区', '1502', '包头市', '150203', '昆都仑区', '', '', '', '', 3, 1, ''), ('150204', '1502', '00,15,1502', '青山区', '15', '内蒙古自治区', '1502', '包头市', '150204', '青山区', '', '', '', '', 3, 1, ''), ('150205', '1502', '00,15,1502', '石拐区', '15', '内蒙古自治区', '1502', '包头市', '150205', '石拐区', '', '', '', '', 3, 1, ''), ('150206', '1502', '00,15,1502', '白云鄂博矿区', '15', '内蒙古自治区', '1502', '包头市', '150206', '白云鄂博矿区', '', '', '', '', 3, 1, ''), ('150207', '1502', '00,15,1502', '九原区', '15', '内蒙古自治区', '1502', '包头市', '150207', '九原区', '', '', '', '', 3, 1, ''), ('150221', '1502', '00,15,1502', '土默特右旗', '15', '内蒙古自治区', '1502', '包头市', '150221', '土默特右旗', '', '', '', '', 3, 1, ''), ('150222', '1502', '00,15,1502', '固阳县', '15', '内蒙古自治区', '1502', '包头市', '150222', '固阳县', '', '', '', '', 3, 1, ''), ('150223', '1502', '00,15,1502', '达尔罕茂明安联合旗', '15', '内蒙古自治区', '1502', '包头市', '150223', '达尔罕茂明安联合旗', '', '', '', '', 3, 1, ''), ('1503', '15', '00,15', '乌海市', '15', '内蒙古自治区', '1503', '乌海市', '', '', '', '', '', '', 2, 1, ''), ('150302', '1503', '00,15,1503', '海勃湾区', '15', '内蒙古自治区', '1503', '乌海市', '150302', '海勃湾区', '', '', '', '', 3, 1, ''), ('150303', '1503', '00,15,1503', '海南区', '15', '内蒙古自治区', '1503', '乌海市', '150303', '海南区', '', '', '', '', 3, 1, ''), ('150304', '1503', '00,15,1503', '乌达区', '15', '内蒙古自治区', '1503', '乌海市', '150304', '乌达区', '', '', '', '', 3, 1, ''), ('1504', '15', '00,15', '赤峰市', '15', '内蒙古自治区', '1504', '赤峰市', '', '', '', '', '', '', 2, 1, ''), ('150402', '1504', '00,15,1504', '红山区', '15', '内蒙古自治区', '1504', '赤峰市', '150402', '红山区', '', '', '', '', 3, 1, ''), ('150403', '1504', '00,15,1504', '元宝山区', '15', '内蒙古自治区', '1504', '赤峰市', '150403', '元宝山区', '', '', '', '', 3, 1, ''), ('150404', '1504', '00,15,1504', '松山区', '15', '内蒙古自治区', '1504', '赤峰市', '150404', '松山区', '', '', '', '', 3, 1, ''), ('150421', '1504', '00,15,1504', '阿鲁科尔沁旗', '15', '内蒙古自治区', '1504', '赤峰市', '150421', '阿鲁科尔沁旗', '', '', '', '', 3, 1, ''), ('150422', '1504', '00,15,1504', '巴林左旗', '15', '内蒙古自治区', '1504', '赤峰市', '150422', '巴林左旗', '', '', '', '', 3, 1, ''), ('150423', '1504', '00,15,1504', '巴林右旗', '15', '内蒙古自治区', '1504', '赤峰市', '150423', '巴林右旗', '', '', '', '', 3, 1, ''), ('150424', '1504', '00,15,1504', '林西县', '15', '内蒙古自治区', '1504', '赤峰市', '150424', '林西县', '', '', '', '', 3, 1, ''), ('150425', '1504', '00,15,1504', '克什克腾旗', '15', '内蒙古自治区', '1504', '赤峰市', '150425', '克什克腾旗', '', '', '', '', 3, 1, ''), ('150426', '1504', '00,15,1504', '翁牛特旗', '15', '内蒙古自治区', '1504', '赤峰市', '150426', '翁牛特旗', '', '', '', '', 3, 1, ''), ('150428', '1504', '00,15,1504', '喀喇沁旗', '15', '内蒙古自治区', '1504', '赤峰市', '150428', '喀喇沁旗', '', '', '', '', 3, 1, ''), ('150429', '1504', '00,15,1504', '宁城县', '15', '内蒙古自治区', '1504', '赤峰市', '150429', '宁城县', '', '', '', '', 3, 1, ''), ('150430', '1504', '00,15,1504', '敖汉旗', '15', '内蒙古自治区', '1504', '赤峰市', '150430', '敖汉旗', '', '', '', '', 3, 1, ''), ('1505', '15', '00,15', '通辽市', '15', '内蒙古自治区', '1505', '通辽市', '', '', '', '', '', '', 2, 1, ''), ('150502', '1505', '00,15,1505', '科尔沁区', '15', '内蒙古自治区', '1505', '通辽市', '150502', '科尔沁区', '', '', '', '', 3, 1, ''), ('150521', '1505', '00,15,1505', '科尔沁左翼中旗', '15', '内蒙古自治区', '1505', '通辽市', '150521', '科尔沁左翼中旗', '', '', '', '', 3, 1, ''), ('150522', '1505', '00,15,1505', '科尔沁左翼后旗', '15', '内蒙古自治区', '1505', '通辽市', '150522', '科尔沁左翼后旗', '', '', '', '', 3, 1, ''), ('150523', '1505', '00,15,1505', '开鲁县', '15', '内蒙古自治区', '1505', '通辽市', '150523', '开鲁县', '', '', '', '', 3, 1, ''), ('150524', '1505', '00,15,1505', '库伦旗', '15', '内蒙古自治区', '1505', '通辽市', '150524', '库伦旗', '', '', '', '', 3, 1, ''), ('150525', '1505', '00,15,1505', '奈曼旗', '15', '内蒙古自治区', '1505', '通辽市', '150525', '奈曼旗', '', '', '', '', 3, 1, ''), ('150526', '1505', '00,15,1505', '扎鲁特旗', '15', '内蒙古自治区', '1505', '通辽市', '150526', '扎鲁特旗', '', '', '', '', 3, 1, ''), ('150581', '1505', '00,15,1505', '霍林郭勒市', '15', '内蒙古自治区', '1505', '通辽市', '150581', '霍林郭勒市', '', '', '', '', 3, 1, ''), ('1506', '15', '00,15', '鄂尔多斯市', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '', '', '', '', '', '', 2, 1, ''), ('150602', '1506', '00,15,1506', '东胜区', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150602', '东胜区', '', '', '', '', 3, 1, ''), ('150603', '1506', '00,15,1506', '康巴什区', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150603', '康巴什区', '', '', '', '', 3, 1, ''), ('150621', '1506', '00,15,1506', '达拉特旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150621', '达拉特旗', '', '', '', '', 3, 1, ''), ('150622', '1506', '00,15,1506', '准格尔旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150622', '准格尔旗', '', '', '', '', 3, 1, ''), ('150623', '1506', '00,15,1506', '鄂托克前旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150623', '鄂托克前旗', '', '', '', '', 3, 1, ''), ('150624', '1506', '00,15,1506', '鄂托克旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150624', '鄂托克旗', '', '', '', '', 3, 1, ''), ('150625', '1506', '00,15,1506', '杭锦旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150625', '杭锦旗', '', '', '', '', 3, 1, ''), ('150626', '1506', '00,15,1506', '乌审旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150626', '乌审旗', '', '', '', '', 3, 1, ''), ('150627', '1506', '00,15,1506', '伊金霍洛旗', '15', '内蒙古自治区', '1506', '鄂尔多斯市', '150627', '伊金霍洛旗', '', '', '', '', 3, 1, ''), ('1507', '15', '00,15', '呼伦贝尔市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '', '', '', '', '', '', 2, 1, ''), ('150702', '1507', '00,15,1507', '海拉尔区', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150702', '海拉尔区', '', '', '', '', 3, 1, ''), ('150703', '1507', '00,15,1507', '扎赉诺尔区', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150703', '扎赉诺尔区', '', '', '', '', 3, 1, ''), ('150721', '1507', '00,15,1507', '阿荣旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150721', '阿荣旗', '', '', '', '', 3, 1, ''), ('150722', '1507', '00,15,1507', '莫力达瓦达斡尔族自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150722', '莫力达瓦达斡尔族自治旗', '', '', '', '', 3, 1, ''), ('150723', '1507', '00,15,1507', '鄂伦春自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150723', '鄂伦春自治旗', '', '', '', '', 3, 1, ''), ('150724', '1507', '00,15,1507', '鄂温克族自治旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150724', '鄂温克族自治旗', '', '', '', '', 3, 1, ''), ('150725', '1507', '00,15,1507', '陈巴尔虎旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150725', '陈巴尔虎旗', '', '', '', '', 3, 1, ''), ('150726', '1507', '00,15,1507', '新巴尔虎左旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150726', '新巴尔虎左旗', '', '', '', '', 3, 1, ''), ('150727', '1507', '00,15,1507', '新巴尔虎右旗', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150727', '新巴尔虎右旗', '', '', '', '', 3, 1, ''), ('150781', '1507', '00,15,1507', '满洲里市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150781', '满洲里市', '', '', '', '', 3, 1, ''), ('150782', '1507', '00,15,1507', '牙克石市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150782', '牙克石市', '', '', '', '', 3, 1, ''), ('150783', '1507', '00,15,1507', '扎兰屯市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150783', '扎兰屯市', '', '', '', '', 3, 1, ''), ('150784', '1507', '00,15,1507', '额尔古纳市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150784', '额尔古纳市', '', '', '', '', 3, 1, ''), ('150785', '1507', '00,15,1507', '根河市', '15', '内蒙古自治区', '1507', '呼伦贝尔市', '150785', '根河市', '', '', '', '', 3, 1, ''), ('1508', '15', '00,15', '巴彦淖尔市', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '', '', '', '', '', '', 2, 1, ''), ('150802', '1508', '00,15,1508', '临河区', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150802', '临河区', '', '', '', '', 3, 1, ''), ('150821', '1508', '00,15,1508', '五原县', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150821', '五原县', '', '', '', '', 3, 1, ''), ('150822', '1508', '00,15,1508', '磴口县', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150822', '磴口县', '', '', '', '', 3, 1, ''), ('150823', '1508', '00,15,1508', '乌拉特前旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150823', '乌拉特前旗', '', '', '', '', 3, 1, ''), ('150824', '1508', '00,15,1508', '乌拉特中旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150824', '乌拉特中旗', '', '', '', '', 3, 1, ''), ('150825', '1508', '00,15,1508', '乌拉特后旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150825', '乌拉特后旗', '', '', '', '', 3, 1, ''), ('150826', '1508', '00,15,1508', '杭锦后旗', '15', '内蒙古自治区', '1508', '巴彦淖尔市', '150826', '杭锦后旗', '', '', '', '', 3, 1, ''), ('1509', '15', '00,15', '乌兰察布市', '15', '内蒙古自治区', '1509', '乌兰察布市', '', '', '', '', '', '', 2, 1, ''), ('150902', '1509', '00,15,1509', '集宁区', '15', '内蒙古自治区', '1509', '乌兰察布市', '150902', '集宁区', '', '', '', '', 3, 1, ''), ('150921', '1509', '00,15,1509', '卓资县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150921', '卓资县', '', '', '', '', 3, 1, ''), ('150922', '1509', '00,15,1509', '化德县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150922', '化德县', '', '', '', '', 3, 1, ''), ('150923', '1509', '00,15,1509', '商都县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150923', '商都县', '', '', '', '', 3, 1, ''), ('150924', '1509', '00,15,1509', '兴和县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150924', '兴和县', '', '', '', '', 3, 1, ''), ('150925', '1509', '00,15,1509', '凉城县', '15', '内蒙古自治区', '1509', '乌兰察布市', '150925', '凉城县', '', '', '', '', 3, 1, ''), ('150926', '1509', '00,15,1509', '察哈尔右翼前旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150926', '察哈尔右翼前旗', '', '', '', '', 3, 1, ''), ('150927', '1509', '00,15,1509', '察哈尔右翼中旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150927', '察哈尔右翼中旗', '', '', '', '', 3, 1, ''), ('150928', '1509', '00,15,1509', '察哈尔右翼后旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150928', '察哈尔右翼后旗', '', '', '', '', 3, 1, ''), ('150929', '1509', '00,15,1509', '四子王旗', '15', '内蒙古自治区', '1509', '乌兰察布市', '150929', '四子王旗', '', '', '', '', 3, 1, ''), ('150981', '1509', '00,15,1509', '丰镇市', '15', '内蒙古自治区', '1509', '乌兰察布市', '150981', '丰镇市', '', '', '', '', 3, 1, ''), ('1522', '15', '00,15', '兴安盟', '15', '内蒙古自治区', '1522', '兴安盟', '', '', '', '', '', '', 2, 1, ''), ('152201', '1522', '00,15,1522', '乌兰浩特市', '15', '内蒙古自治区', '1522', '兴安盟', '152201', '乌兰浩特市', '', '', '', '', 3, 1, ''), ('152202', '1522', '00,15,1522', '阿尔山市', '15', '内蒙古自治区', '1522', '兴安盟', '152202', '阿尔山市', '', '', '', '', 3, 1, ''), ('152221', '1522', '00,15,1522', '科尔沁右翼前旗', '15', '内蒙古自治区', '1522', '兴安盟', '152221', '科尔沁右翼前旗', '', '', '', '', 3, 1, ''), ('152222', '1522', '00,15,1522', '科尔沁右翼中旗', '15', '内蒙古自治区', '1522', '兴安盟', '152222', '科尔沁右翼中旗', '', '', '', '', 3, 1, ''), ('152223', '1522', '00,15,1522', '扎赉特旗', '15', '内蒙古自治区', '1522', '兴安盟', '152223', '扎赉特旗', '', '', '', '', 3, 1, ''), ('152224', '1522', '00,15,1522', '突泉县', '15', '内蒙古自治区', '1522', '兴安盟', '152224', '突泉县', '', '', '', '', 3, 1, ''), ('1525', '15', '00,15', '锡林郭勒盟', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '', '', '', '', '', '', 2, 1, ''), ('152501', '1525', '00,15,1525', '二连浩特市', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152501', '二连浩特市', '', '', '', '', 3, 1, ''), ('152502', '1525', '00,15,1525', '锡林浩特市', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152502', '锡林浩特市', '', '', '', '', 3, 1, ''), ('152522', '1525', '00,15,1525', '阿巴嘎旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152522', '阿巴嘎旗', '', '', '', '', 3, 1, ''), ('152523', '1525', '00,15,1525', '苏尼特左旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152523', '苏尼特左旗', '', '', '', '', 3, 1, ''), ('152524', '1525', '00,15,1525', '苏尼特右旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152524', '苏尼特右旗', '', '', '', '', 3, 1, ''), ('152525', '1525', '00,15,1525', '东乌珠穆沁旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152525', '东乌珠穆沁旗', '', '', '', '', 3, 1, ''), ('152526', '1525', '00,15,1525', '西乌珠穆沁旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152526', '西乌珠穆沁旗', '', '', '', '', 3, 1, ''), ('152527', '1525', '00,15,1525', '太仆寺旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152527', '太仆寺旗', '', '', '', '', 3, 1, ''), ('152528', '1525', '00,15,1525', '镶黄旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152528', '镶黄旗', '', '', '', '', 3, 1, ''), ('152529', '1525', '00,15,1525', '正镶白旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152529', '正镶白旗', '', '', '', '', 3, 1, ''), ('152530', '1525', '00,15,1525', '正蓝旗', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152530', '正蓝旗', '', '', '', '', 3, 1, ''), ('152531', '1525', '00,15,1525', '多伦县', '15', '内蒙古自治区', '1525', '锡林郭勒盟', '152531', '多伦县', '', '', '', '', 3, 1, ''), ('1529', '15', '00,15', '阿拉善盟', '15', '内蒙古自治区', '1529', '阿拉善盟', '', '', '', '', '', '', 2, 1, ''), ('152921', '1529', '00,15,1529', '阿拉善左旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152921', '阿拉善左旗', '', '', '', '', 3, 1, ''), ('152922', '1529', '00,15,1529', '阿拉善右旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152922', '阿拉善右旗', '', '', '', '', 3, 1, ''), ('152923', '1529', '00,15,1529', '额济纳旗', '15', '内蒙古自治区', '1529', '阿拉善盟', '152923', '额济纳旗', '', '', '', '', 3, 1, ''), ('21', '00', '00', '辽宁省', '21', '辽宁省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2101', '21', '00,21', '沈阳市', '21', '辽宁省', '2101', '沈阳市', '', '', '', '', '', '', 2, 1, ''), ('210102', '2101', '00,21,2101', '和平区', '21', '辽宁省', '2101', '沈阳市', '210102', '和平区', '', '', '', '', 3, 1, ''), ('210103', '2101', '00,21,2101', '沈河区', '21', '辽宁省', '2101', '沈阳市', '210103', '沈河区', '', '', '', '', 3, 1, ''), ('210104', '2101', '00,21,2101', '大东区', '21', '辽宁省', '2101', '沈阳市', '210104', '大东区', '', '', '', '', 3, 1, ''), ('210105', '2101', '00,21,2101', '皇姑区', '21', '辽宁省', '2101', '沈阳市', '210105', '皇姑区', '', '', '', '', 3, 1, ''), ('210106', '2101', '00,21,2101', '铁西区', '21', '辽宁省', '2101', '沈阳市', '210106', '铁西区', '', '', '', '', 3, 1, ''), ('210111', '2101', '00,21,2101', '苏家屯区', '21', '辽宁省', '2101', '沈阳市', '210111', '苏家屯区', '', '', '', '', 3, 1, ''), ('210112', '2101', '00,21,2101', '浑南区', '21', '辽宁省', '2101', '沈阳市', '210112', '浑南区', '', '', '', '', 3, 1, ''), ('210113', '2101', '00,21,2101', '沈北新区', '21', '辽宁省', '2101', '沈阳市', '210113', '沈北新区', '', '', '', '', 3, 1, ''); +INSERT INTO `blade_region` VALUES ('210114', '2101', '00,21,2101', '于洪区', '21', '辽宁省', '2101', '沈阳市', '210114', '于洪区', '', '', '', '', 3, 1, ''), ('210115', '2101', '00,21,2101', '辽中区', '21', '辽宁省', '2101', '沈阳市', '210115', '辽中区', '', '', '', '', 3, 1, ''), ('210123', '2101', '00,21,2101', '康平县', '21', '辽宁省', '2101', '沈阳市', '210123', '康平县', '', '', '', '', 3, 1, ''), ('210124', '2101', '00,21,2101', '法库县', '21', '辽宁省', '2101', '沈阳市', '210124', '法库县', '', '', '', '', 3, 1, ''), ('210181', '2101', '00,21,2101', '新民市', '21', '辽宁省', '2101', '沈阳市', '210181', '新民市', '', '', '', '', 3, 1, ''), ('2102', '21', '00,21', '大连市', '21', '辽宁省', '2102', '大连市', '', '', '', '', '', '', 2, 1, ''), ('210202', '2102', '00,21,2102', '中山区', '21', '辽宁省', '2102', '大连市', '210202', '中山区', '', '', '', '', 3, 1, ''), ('210203', '2102', '00,21,2102', '西岗区', '21', '辽宁省', '2102', '大连市', '210203', '西岗区', '', '', '', '', 3, 1, ''), ('210204', '2102', '00,21,2102', '沙河口区', '21', '辽宁省', '2102', '大连市', '210204', '沙河口区', '', '', '', '', 3, 1, ''), ('210211', '2102', '00,21,2102', '甘井子区', '21', '辽宁省', '2102', '大连市', '210211', '甘井子区', '', '', '', '', 3, 1, ''), ('210212', '2102', '00,21,2102', '旅顺口区', '21', '辽宁省', '2102', '大连市', '210212', '旅顺口区', '', '', '', '', 3, 1, ''), ('210213', '2102', '00,21,2102', '金州区', '21', '辽宁省', '2102', '大连市', '210213', '金州区', '', '', '', '', 3, 1, ''), ('210214', '2102', '00,21,2102', '普兰店区', '21', '辽宁省', '2102', '大连市', '210214', '普兰店区', '', '', '', '', 3, 1, ''), ('210224', '2102', '00,21,2102', '长海县', '21', '辽宁省', '2102', '大连市', '210224', '长海县', '', '', '', '', 3, 1, ''), ('210281', '2102', '00,21,2102', '瓦房店市', '21', '辽宁省', '2102', '大连市', '210281', '瓦房店市', '', '', '', '', 3, 1, ''), ('210283', '2102', '00,21,2102', '庄河市', '21', '辽宁省', '2102', '大连市', '210283', '庄河市', '', '', '', '', 3, 1, ''), ('2103', '21', '00,21', '鞍山市', '21', '辽宁省', '2103', '鞍山市', '', '', '', '', '', '', 2, 1, ''), ('210302', '2103', '00,21,2103', '铁东区', '21', '辽宁省', '2103', '鞍山市', '210302', '铁东区', '', '', '', '', 3, 1, ''), ('210303', '2103', '00,21,2103', '铁西区', '21', '辽宁省', '2103', '鞍山市', '210303', '铁西区', '', '', '', '', 3, 1, ''), ('210304', '2103', '00,21,2103', '立山区', '21', '辽宁省', '2103', '鞍山市', '210304', '立山区', '', '', '', '', 3, 1, ''), ('210311', '2103', '00,21,2103', '千山区', '21', '辽宁省', '2103', '鞍山市', '210311', '千山区', '', '', '', '', 3, 1, ''), ('210321', '2103', '00,21,2103', '台安县', '21', '辽宁省', '2103', '鞍山市', '210321', '台安县', '', '', '', '', 3, 1, ''), ('210323', '2103', '00,21,2103', '岫岩满族自治县', '21', '辽宁省', '2103', '鞍山市', '210323', '岫岩满族自治县', '', '', '', '', 3, 1, ''), ('210381', '2103', '00,21,2103', '海城市', '21', '辽宁省', '2103', '鞍山市', '210381', '海城市', '', '', '', '', 3, 1, ''), ('2104', '21', '00,21', '抚顺市', '21', '辽宁省', '2104', '抚顺市', '', '', '', '', '', '', 2, 1, ''), ('210402', '2104', '00,21,2104', '新抚区', '21', '辽宁省', '2104', '抚顺市', '210402', '新抚区', '', '', '', '', 3, 1, ''), ('210403', '2104', '00,21,2104', '东洲区', '21', '辽宁省', '2104', '抚顺市', '210403', '东洲区', '', '', '', '', 3, 1, ''), ('210404', '2104', '00,21,2104', '望花区', '21', '辽宁省', '2104', '抚顺市', '210404', '望花区', '', '', '', '', 3, 1, ''), ('210411', '2104', '00,21,2104', '顺城区', '21', '辽宁省', '2104', '抚顺市', '210411', '顺城区', '', '', '', '', 3, 1, ''), ('210421', '2104', '00,21,2104', '抚顺县', '21', '辽宁省', '2104', '抚顺市', '210421', '抚顺县', '', '', '', '', 3, 1, ''), ('210422', '2104', '00,21,2104', '新宾满族自治县', '21', '辽宁省', '2104', '抚顺市', '210422', '新宾满族自治县', '', '', '', '', 3, 1, ''), ('210423', '2104', '00,21,2104', '清原满族自治县', '21', '辽宁省', '2104', '抚顺市', '210423', '清原满族自治县', '', '', '', '', 3, 1, ''), ('2105', '21', '00,21', '本溪市', '21', '辽宁省', '2105', '本溪市', '', '', '', '', '', '', 2, 1, ''), ('210502', '2105', '00,21,2105', '平山区', '21', '辽宁省', '2105', '本溪市', '210502', '平山区', '', '', '', '', 3, 1, ''), ('210503', '2105', '00,21,2105', '溪湖区', '21', '辽宁省', '2105', '本溪市', '210503', '溪湖区', '', '', '', '', 3, 1, ''), ('210504', '2105', '00,21,2105', '明山区', '21', '辽宁省', '2105', '本溪市', '210504', '明山区', '', '', '', '', 3, 1, ''), ('210505', '2105', '00,21,2105', '南芬区', '21', '辽宁省', '2105', '本溪市', '210505', '南芬区', '', '', '', '', 3, 1, ''), ('210521', '2105', '00,21,2105', '本溪满族自治县', '21', '辽宁省', '2105', '本溪市', '210521', '本溪满族自治县', '', '', '', '', 3, 1, ''), ('210522', '2105', '00,21,2105', '桓仁满族自治县', '21', '辽宁省', '2105', '本溪市', '210522', '桓仁满族自治县', '', '', '', '', 3, 1, ''), ('2106', '21', '00,21', '丹东市', '21', '辽宁省', '2106', '丹东市', '', '', '', '', '', '', 2, 1, ''), ('210602', '2106', '00,21,2106', '元宝区', '21', '辽宁省', '2106', '丹东市', '210602', '元宝区', '', '', '', '', 3, 1, ''), ('210603', '2106', '00,21,2106', '振兴区', '21', '辽宁省', '2106', '丹东市', '210603', '振兴区', '', '', '', '', 3, 1, ''), ('210604', '2106', '00,21,2106', '振安区', '21', '辽宁省', '2106', '丹东市', '210604', '振安区', '', '', '', '', 3, 1, ''), ('210624', '2106', '00,21,2106', '宽甸满族自治县', '21', '辽宁省', '2106', '丹东市', '210624', '宽甸满族自治县', '', '', '', '', 3, 1, ''), ('210681', '2106', '00,21,2106', '东港市', '21', '辽宁省', '2106', '丹东市', '210681', '东港市', '', '', '', '', 3, 1, ''), ('210682', '2106', '00,21,2106', '凤城市', '21', '辽宁省', '2106', '丹东市', '210682', '凤城市', '', '', '', '', 3, 1, ''), ('2107', '21', '00,21', '锦州市', '21', '辽宁省', '2107', '锦州市', '', '', '', '', '', '', 2, 1, ''), ('210702', '2107', '00,21,2107', '古塔区', '21', '辽宁省', '2107', '锦州市', '210702', '古塔区', '', '', '', '', 3, 1, ''), ('210703', '2107', '00,21,2107', '凌河区', '21', '辽宁省', '2107', '锦州市', '210703', '凌河区', '', '', '', '', 3, 1, ''), ('210711', '2107', '00,21,2107', '太和区', '21', '辽宁省', '2107', '锦州市', '210711', '太和区', '', '', '', '', 3, 1, ''), ('210726', '2107', '00,21,2107', '黑山县', '21', '辽宁省', '2107', '锦州市', '210726', '黑山县', '', '', '', '', 3, 1, ''), ('210727', '2107', '00,21,2107', '义县', '21', '辽宁省', '2107', '锦州市', '210727', '义县', '', '', '', '', 3, 1, ''), ('210781', '2107', '00,21,2107', '凌海市', '21', '辽宁省', '2107', '锦州市', '210781', '凌海市', '', '', '', '', 3, 1, ''), ('210782', '2107', '00,21,2107', '北镇市', '21', '辽宁省', '2107', '锦州市', '210782', '北镇市', '', '', '', '', 3, 1, ''), ('2108', '21', '00,21', '营口市', '21', '辽宁省', '2108', '营口市', '', '', '', '', '', '', 2, 1, ''), ('210802', '2108', '00,21,2108', '站前区', '21', '辽宁省', '2108', '营口市', '210802', '站前区', '', '', '', '', 3, 1, ''), ('210803', '2108', '00,21,2108', '西市区', '21', '辽宁省', '2108', '营口市', '210803', '西市区', '', '', '', '', 3, 1, ''), ('210804', '2108', '00,21,2108', '鲅鱼圈区', '21', '辽宁省', '2108', '营口市', '210804', '鲅鱼圈区', '', '', '', '', 3, 1, ''), ('210811', '2108', '00,21,2108', '老边区', '21', '辽宁省', '2108', '营口市', '210811', '老边区', '', '', '', '', 3, 1, ''), ('210881', '2108', '00,21,2108', '盖州市', '21', '辽宁省', '2108', '营口市', '210881', '盖州市', '', '', '', '', 3, 1, ''), ('210882', '2108', '00,21,2108', '大石桥市', '21', '辽宁省', '2108', '营口市', '210882', '大石桥市', '', '', '', '', 3, 1, ''), ('2109', '21', '00,21', '阜新市', '21', '辽宁省', '2109', '阜新市', '', '', '', '', '', '', 2, 1, ''), ('210902', '2109', '00,21,2109', '海州区', '21', '辽宁省', '2109', '阜新市', '210902', '海州区', '', '', '', '', 3, 1, ''), ('210903', '2109', '00,21,2109', '新邱区', '21', '辽宁省', '2109', '阜新市', '210903', '新邱区', '', '', '', '', 3, 1, ''), ('210904', '2109', '00,21,2109', '太平区', '21', '辽宁省', '2109', '阜新市', '210904', '太平区', '', '', '', '', 3, 1, ''), ('210905', '2109', '00,21,2109', '清河门区', '21', '辽宁省', '2109', '阜新市', '210905', '清河门区', '', '', '', '', 3, 1, ''), ('210911', '2109', '00,21,2109', '细河区', '21', '辽宁省', '2109', '阜新市', '210911', '细河区', '', '', '', '', 3, 1, ''), ('210921', '2109', '00,21,2109', '阜新蒙古族自治县', '21', '辽宁省', '2109', '阜新市', '210921', '阜新蒙古族自治县', '', '', '', '', 3, 1, ''), ('210922', '2109', '00,21,2109', '彰武县', '21', '辽宁省', '2109', '阜新市', '210922', '彰武县', '', '', '', '', 3, 1, ''), ('2110', '21', '00,21', '辽阳市', '21', '辽宁省', '2110', '辽阳市', '', '', '', '', '', '', 2, 1, ''), ('211002', '2110', '00,21,2110', '白塔区', '21', '辽宁省', '2110', '辽阳市', '211002', '白塔区', '', '', '', '', 3, 1, ''), ('211003', '2110', '00,21,2110', '文圣区', '21', '辽宁省', '2110', '辽阳市', '211003', '文圣区', '', '', '', '', 3, 1, ''), ('211004', '2110', '00,21,2110', '宏伟区', '21', '辽宁省', '2110', '辽阳市', '211004', '宏伟区', '', '', '', '', 3, 1, ''), ('211005', '2110', '00,21,2110', '弓长岭区', '21', '辽宁省', '2110', '辽阳市', '211005', '弓长岭区', '', '', '', '', 3, 1, ''), ('211011', '2110', '00,21,2110', '太子河区', '21', '辽宁省', '2110', '辽阳市', '211011', '太子河区', '', '', '', '', 3, 1, ''), ('211021', '2110', '00,21,2110', '辽阳县', '21', '辽宁省', '2110', '辽阳市', '211021', '辽阳县', '', '', '', '', 3, 1, ''), ('211081', '2110', '00,21,2110', '灯塔市', '21', '辽宁省', '2110', '辽阳市', '211081', '灯塔市', '', '', '', '', 3, 1, ''), ('2111', '21', '00,21', '盘锦市', '21', '辽宁省', '2111', '盘锦市', '', '', '', '', '', '', 2, 1, ''), ('211102', '2111', '00,21,2111', '双台子区', '21', '辽宁省', '2111', '盘锦市', '211102', '双台子区', '', '', '', '', 3, 1, ''), ('211103', '2111', '00,21,2111', '兴隆台区', '21', '辽宁省', '2111', '盘锦市', '211103', '兴隆台区', '', '', '', '', 3, 1, ''), ('211104', '2111', '00,21,2111', '大洼区', '21', '辽宁省', '2111', '盘锦市', '211104', '大洼区', '', '', '', '', 3, 1, ''), ('211122', '2111', '00,21,2111', '盘山县', '21', '辽宁省', '2111', '盘锦市', '211122', '盘山县', '', '', '', '', 3, 1, ''), ('2112', '21', '00,21', '铁岭市', '21', '辽宁省', '2112', '铁岭市', '', '', '', '', '', '', 2, 1, ''), ('211202', '2112', '00,21,2112', '银州区', '21', '辽宁省', '2112', '铁岭市', '211202', '银州区', '', '', '', '', 3, 1, ''), ('211204', '2112', '00,21,2112', '清河区', '21', '辽宁省', '2112', '铁岭市', '211204', '清河区', '', '', '', '', 3, 1, ''), ('211221', '2112', '00,21,2112', '铁岭县', '21', '辽宁省', '2112', '铁岭市', '211221', '铁岭县', '', '', '', '', 3, 1, ''), ('211223', '2112', '00,21,2112', '西丰县', '21', '辽宁省', '2112', '铁岭市', '211223', '西丰县', '', '', '', '', 3, 1, ''), ('211224', '2112', '00,21,2112', '昌图县', '21', '辽宁省', '2112', '铁岭市', '211224', '昌图县', '', '', '', '', 3, 1, ''), ('211281', '2112', '00,21,2112', '调兵山市', '21', '辽宁省', '2112', '铁岭市', '211281', '调兵山市', '', '', '', '', 3, 1, ''), ('211282', '2112', '00,21,2112', '开原市', '21', '辽宁省', '2112', '铁岭市', '211282', '开原市', '', '', '', '', 3, 1, ''), ('2113', '21', '00,21', '朝阳市', '21', '辽宁省', '2113', '朝阳市', '', '', '', '', '', '', 2, 1, ''), ('211302', '2113', '00,21,2113', '双塔区', '21', '辽宁省', '2113', '朝阳市', '211302', '双塔区', '', '', '', '', 3, 1, ''), ('211303', '2113', '00,21,2113', '龙城区', '21', '辽宁省', '2113', '朝阳市', '211303', '龙城区', '', '', '', '', 3, 1, ''), ('211321', '2113', '00,21,2113', '朝阳县', '21', '辽宁省', '2113', '朝阳市', '211321', '朝阳县', '', '', '', '', 3, 1, ''), ('211322', '2113', '00,21,2113', '建平县', '21', '辽宁省', '2113', '朝阳市', '211322', '建平县', '', '', '', '', 3, 1, ''), ('211324', '2113', '00,21,2113', '喀喇沁左翼蒙古族自治县', '21', '辽宁省', '2113', '朝阳市', '211324', '喀喇沁左翼蒙古族自治县', '', '', '', '', 3, 1, ''), ('211381', '2113', '00,21,2113', '北票市', '21', '辽宁省', '2113', '朝阳市', '211381', '北票市', '', '', '', '', 3, 1, ''), ('211382', '2113', '00,21,2113', '凌源市', '21', '辽宁省', '2113', '朝阳市', '211382', '凌源市', '', '', '', '', 3, 1, ''), ('2114', '21', '00,21', '葫芦岛市', '21', '辽宁省', '2114', '葫芦岛市', '', '', '', '', '', '', 2, 1, ''), ('211402', '2114', '00,21,2114', '连山区', '21', '辽宁省', '2114', '葫芦岛市', '211402', '连山区', '', '', '', '', 3, 1, ''), ('211403', '2114', '00,21,2114', '龙港区', '21', '辽宁省', '2114', '葫芦岛市', '211403', '龙港区', '', '', '', '', 3, 1, ''), ('211404', '2114', '00,21,2114', '南票区', '21', '辽宁省', '2114', '葫芦岛市', '211404', '南票区', '', '', '', '', 3, 1, ''), ('211421', '2114', '00,21,2114', '绥中县', '21', '辽宁省', '2114', '葫芦岛市', '211421', '绥中县', '', '', '', '', 3, 1, ''), ('211422', '2114', '00,21,2114', '建昌县', '21', '辽宁省', '2114', '葫芦岛市', '211422', '建昌县', '', '', '', '', 3, 1, ''), ('211481', '2114', '00,21,2114', '兴城市', '21', '辽宁省', '2114', '葫芦岛市', '211481', '兴城市', '', '', '', '', 3, 1, ''), ('22', '00', '00', '吉林省', '22', '吉林省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2201', '22', '00,22', '长春市', '22', '吉林省', '2201', '长春市', '', '', '', '', '', '', 2, 1, ''), ('220102', '2201', '00,22,2201', '南关区', '22', '吉林省', '2201', '长春市', '220102', '南关区', '', '', '', '', 3, 1, ''), ('220103', '2201', '00,22,2201', '宽城区', '22', '吉林省', '2201', '长春市', '220103', '宽城区', '', '', '', '', 3, 1, ''), ('220104', '2201', '00,22,2201', '朝阳区', '22', '吉林省', '2201', '长春市', '220104', '朝阳区', '', '', '', '', 3, 1, ''), ('220105', '2201', '00,22,2201', '二道区', '22', '吉林省', '2201', '长春市', '220105', '二道区', '', '', '', '', 3, 1, ''), ('220106', '2201', '00,22,2201', '绿园区', '22', '吉林省', '2201', '长春市', '220106', '绿园区', '', '', '', '', 3, 1, ''), ('220112', '2201', '00,22,2201', '双阳区', '22', '吉林省', '2201', '长春市', '220112', '双阳区', '', '', '', '', 3, 1, ''), ('220113', '2201', '00,22,2201', '九台区', '22', '吉林省', '2201', '长春市', '220113', '九台区', '', '', '', '', 3, 1, ''), ('220122', '2201', '00,22,2201', '农安县', '22', '吉林省', '2201', '长春市', '220122', '农安县', '', '', '', '', 3, 1, ''), ('220182', '2201', '00,22,2201', '榆树市', '22', '吉林省', '2201', '长春市', '220182', '榆树市', '', '', '', '', 3, 1, ''), ('220183', '2201', '00,22,2201', '德惠市', '22', '吉林省', '2201', '长春市', '220183', '德惠市', '', '', '', '', 3, 1, ''), ('2202', '22', '00,22', '吉林市', '22', '吉林省', '2202', '吉林市', '', '', '', '', '', '', 2, 1, ''), ('220202', '2202', '00,22,2202', '昌邑区', '22', '吉林省', '2202', '吉林市', '220202', '昌邑区', '', '', '', '', 3, 1, ''), ('220203', '2202', '00,22,2202', '龙潭区', '22', '吉林省', '2202', '吉林市', '220203', '龙潭区', '', '', '', '', 3, 1, ''), ('220204', '2202', '00,22,2202', '船营区', '22', '吉林省', '2202', '吉林市', '220204', '船营区', '', '', '', '', 3, 1, ''), ('220211', '2202', '00,22,2202', '丰满区', '22', '吉林省', '2202', '吉林市', '220211', '丰满区', '', '', '', '', 3, 1, ''), ('220221', '2202', '00,22,2202', '永吉县', '22', '吉林省', '2202', '吉林市', '220221', '永吉县', '', '', '', '', 3, 1, ''), ('220281', '2202', '00,22,2202', '蛟河市', '22', '吉林省', '2202', '吉林市', '220281', '蛟河市', '', '', '', '', 3, 1, ''), ('220282', '2202', '00,22,2202', '桦甸市', '22', '吉林省', '2202', '吉林市', '220282', '桦甸市', '', '', '', '', 3, 1, ''), ('220283', '2202', '00,22,2202', '舒兰市', '22', '吉林省', '2202', '吉林市', '220283', '舒兰市', '', '', '', '', 3, 1, ''), ('220284', '2202', '00,22,2202', '磐石市', '22', '吉林省', '2202', '吉林市', '220284', '磐石市', '', '', '', '', 3, 1, ''), ('2203', '22', '00,22', '四平市', '22', '吉林省', '2203', '四平市', '', '', '', '', '', '', 2, 1, ''), ('220302', '2203', '00,22,2203', '铁西区', '22', '吉林省', '2203', '四平市', '220302', '铁西区', '', '', '', '', 3, 1, ''), ('220303', '2203', '00,22,2203', '铁东区', '22', '吉林省', '2203', '四平市', '220303', '铁东区', '', '', '', '', 3, 1, ''), ('220322', '2203', '00,22,2203', '梨树县', '22', '吉林省', '2203', '四平市', '220322', '梨树县', '', '', '', '', 3, 1, ''), ('220323', '2203', '00,22,2203', '伊通满族自治县', '22', '吉林省', '2203', '四平市', '220323', '伊通满族自治县', '', '', '', '', 3, 1, ''), ('220381', '2203', '00,22,2203', '公主岭市', '22', '吉林省', '2203', '四平市', '220381', '公主岭市', '', '', '', '', 3, 1, ''), ('220382', '2203', '00,22,2203', '双辽市', '22', '吉林省', '2203', '四平市', '220382', '双辽市', '', '', '', '', 3, 1, ''), ('2204', '22', '00,22', '辽源市', '22', '吉林省', '2204', '辽源市', '', '', '', '', '', '', 2, 1, ''), ('220402', '2204', '00,22,2204', '龙山区', '22', '吉林省', '2204', '辽源市', '220402', '龙山区', '', '', '', '', 3, 1, ''), ('220403', '2204', '00,22,2204', '西安区', '22', '吉林省', '2204', '辽源市', '220403', '西安区', '', '', '', '', 3, 1, ''), ('220421', '2204', '00,22,2204', '东丰县', '22', '吉林省', '2204', '辽源市', '220421', '东丰县', '', '', '', '', 3, 1, ''), ('220422', '2204', '00,22,2204', '东辽县', '22', '吉林省', '2204', '辽源市', '220422', '东辽县', '', '', '', '', 3, 1, ''), ('2205', '22', '00,22', '通化市', '22', '吉林省', '2205', '通化市', '', '', '', '', '', '', 2, 1, ''), ('220502', '2205', '00,22,2205', '东昌区', '22', '吉林省', '2205', '通化市', '220502', '东昌区', '', '', '', '', 3, 1, ''), ('220503', '2205', '00,22,2205', '二道江区', '22', '吉林省', '2205', '通化市', '220503', '二道江区', '', '', '', '', 3, 1, ''), ('220521', '2205', '00,22,2205', '通化县', '22', '吉林省', '2205', '通化市', '220521', '通化县', '', '', '', '', 3, 1, ''), ('220523', '2205', '00,22,2205', '辉南县', '22', '吉林省', '2205', '通化市', '220523', '辉南县', '', '', '', '', 3, 1, ''), ('220524', '2205', '00,22,2205', '柳河县', '22', '吉林省', '2205', '通化市', '220524', '柳河县', '', '', '', '', 3, 1, ''), ('220581', '2205', '00,22,2205', '梅河口市', '22', '吉林省', '2205', '通化市', '220581', '梅河口市', '', '', '', '', 3, 1, ''), ('220582', '2205', '00,22,2205', '集安市', '22', '吉林省', '2205', '通化市', '220582', '集安市', '', '', '', '', 3, 1, ''), ('2206', '22', '00,22', '白山市', '22', '吉林省', '2206', '白山市', '', '', '', '', '', '', 2, 1, ''), ('220602', '2206', '00,22,2206', '浑江区', '22', '吉林省', '2206', '白山市', '220602', '浑江区', '', '', '', '', 3, 1, ''), ('220605', '2206', '00,22,2206', '江源区', '22', '吉林省', '2206', '白山市', '220605', '江源区', '', '', '', '', 3, 1, ''), ('220621', '2206', '00,22,2206', '抚松县', '22', '吉林省', '2206', '白山市', '220621', '抚松县', '', '', '', '', 3, 1, ''), ('220622', '2206', '00,22,2206', '靖宇县', '22', '吉林省', '2206', '白山市', '220622', '靖宇县', '', '', '', '', 3, 1, ''), ('220623', '2206', '00,22,2206', '长白朝鲜族自治县', '22', '吉林省', '2206', '白山市', '220623', '长白朝鲜族自治县', '', '', '', '', 3, 1, ''), ('220681', '2206', '00,22,2206', '临江市', '22', '吉林省', '2206', '白山市', '220681', '临江市', '', '', '', '', 3, 1, ''), ('2207', '22', '00,22', '松原市', '22', '吉林省', '2207', '松原市', '', '', '', '', '', '', 2, 1, ''), ('220702', '2207', '00,22,2207', '宁江区', '22', '吉林省', '2207', '松原市', '220702', '宁江区', '', '', '', '', 3, 1, ''), ('220721', '2207', '00,22,2207', '前郭尔罗斯蒙古族自治县', '22', '吉林省', '2207', '松原市', '220721', '前郭尔罗斯蒙古族自治县', '', '', '', '', 3, 1, ''), ('220722', '2207', '00,22,2207', '长岭县', '22', '吉林省', '2207', '松原市', '220722', '长岭县', '', '', '', '', 3, 1, ''), ('220723', '2207', '00,22,2207', '乾安县', '22', '吉林省', '2207', '松原市', '220723', '乾安县', '', '', '', '', 3, 1, ''), ('220781', '2207', '00,22,2207', '扶余市', '22', '吉林省', '2207', '松原市', '220781', '扶余市', '', '', '', '', 3, 1, ''), ('2208', '22', '00,22', '白城市', '22', '吉林省', '2208', '白城市', '', '', '', '', '', '', 2, 1, ''), ('220802', '2208', '00,22,2208', '洮北区', '22', '吉林省', '2208', '白城市', '220802', '洮北区', '', '', '', '', 3, 1, ''), ('220821', '2208', '00,22,2208', '镇赉县', '22', '吉林省', '2208', '白城市', '220821', '镇赉县', '', '', '', '', 3, 1, ''), ('220822', '2208', '00,22,2208', '通榆县', '22', '吉林省', '2208', '白城市', '220822', '通榆县', '', '', '', '', 3, 1, ''), ('220881', '2208', '00,22,2208', '洮南市', '22', '吉林省', '2208', '白城市', '220881', '洮南市', '', '', '', '', 3, 1, ''), ('220882', '2208', '00,22,2208', '大安市', '22', '吉林省', '2208', '白城市', '220882', '大安市', '', '', '', '', 3, 1, ''), ('2224', '22', '00,22', '延边朝鲜族自治州', '22', '吉林省', '2224', '延边朝鲜族自治州', '', '', '', '', '', '', 2, 1, ''), ('222401', '2224', '00,22,2224', '延吉市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222401', '延吉市', '', '', '', '', 3, 1, ''), ('222402', '2224', '00,22,2224', '图们市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222402', '图们市', '', '', '', '', 3, 1, ''), ('222403', '2224', '00,22,2224', '敦化市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222403', '敦化市', '', '', '', '', 3, 1, ''), ('222404', '2224', '00,22,2224', '珲春市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222404', '珲春市', '', '', '', '', 3, 1, ''), ('222405', '2224', '00,22,2224', '龙井市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222405', '龙井市', '', '', '', '', 3, 1, ''), ('222406', '2224', '00,22,2224', '和龙市', '22', '吉林省', '2224', '延边朝鲜族自治州', '222406', '和龙市', '', '', '', '', 3, 1, ''), ('222424', '2224', '00,22,2224', '汪清县', '22', '吉林省', '2224', '延边朝鲜族自治州', '222424', '汪清县', '', '', '', '', 3, 1, ''), ('222426', '2224', '00,22,2224', '安图县', '22', '吉林省', '2224', '延边朝鲜族自治州', '222426', '安图县', '', '', '', '', 3, 1, ''), ('23', '00', '00', '黑龙江省', '23', '黑龙江省', '', '', '', '', '', '', '', '', 1, 1, ''), ('2301', '23', '00,23', '哈尔滨市', '23', '黑龙江省', '2301', '哈尔滨市', '', '', '', '', '', '', 2, 1, ''), ('230102', '2301', '00,23,2301', '道里区', '23', '黑龙江省', '2301', '哈尔滨市', '230102', '道里区', '', '', '', '', 3, 1, ''), ('230103', '2301', '00,23,2301', '南岗区', '23', '黑龙江省', '2301', '哈尔滨市', '230103', '南岗区', '', '', '', '', 3, 1, ''), ('230104', '2301', '00,23,2301', '道外区', '23', '黑龙江省', '2301', '哈尔滨市', '230104', '道外区', '', '', '', '', 3, 1, ''), ('230108', '2301', '00,23,2301', '平房区', '23', '黑龙江省', '2301', '哈尔滨市', '230108', '平房区', '', '', '', '', 3, 1, ''), ('230109', '2301', '00,23,2301', '松北区', '23', '黑龙江省', '2301', '哈尔滨市', '230109', '松北区', '', '', '', '', 3, 1, ''), ('230110', '2301', '00,23,2301', '香坊区', '23', '黑龙江省', '2301', '哈尔滨市', '230110', '香坊区', '', '', '', '', 3, 1, ''), ('230111', '2301', '00,23,2301', '呼兰区', '23', '黑龙江省', '2301', '哈尔滨市', '230111', '呼兰区', '', '', '', '', 3, 1, ''), ('230112', '2301', '00,23,2301', '阿城区', '23', '黑龙江省', '2301', '哈尔滨市', '230112', '阿城区', '', '', '', '', 3, 1, ''), ('230113', '2301', '00,23,2301', '双城区', '23', '黑龙江省', '2301', '哈尔滨市', '230113', '双城区', '', '', '', '', 3, 1, ''), ('230123', '2301', '00,23,2301', '依兰县', '23', '黑龙江省', '2301', '哈尔滨市', '230123', '依兰县', '', '', '', '', 3, 1, ''), ('230124', '2301', '00,23,2301', '方正县', '23', '黑龙江省', '2301', '哈尔滨市', '230124', '方正县', '', '', '', '', 3, 1, ''), ('230125', '2301', '00,23,2301', '宾县', '23', '黑龙江省', '2301', '哈尔滨市', '230125', '宾县', '', '', '', '', 3, 1, ''), ('230126', '2301', '00,23,2301', '巴彦县', '23', '黑龙江省', '2301', '哈尔滨市', '230126', '巴彦县', '', '', '', '', 3, 1, ''), ('230127', '2301', '00,23,2301', '木兰县', '23', '黑龙江省', '2301', '哈尔滨市', '230127', '木兰县', '', '', '', '', 3, 1, ''), ('230128', '2301', '00,23,2301', '通河县', '23', '黑龙江省', '2301', '哈尔滨市', '230128', '通河县', '', '', '', '', 3, 1, ''), ('230129', '2301', '00,23,2301', '延寿县', '23', '黑龙江省', '2301', '哈尔滨市', '230129', '延寿县', '', '', '', '', 3, 1, ''), ('230183', '2301', '00,23,2301', '尚志市', '23', '黑龙江省', '2301', '哈尔滨市', '230183', '尚志市', '', '', '', '', 3, 1, ''), ('230184', '2301', '00,23,2301', '五常市', '23', '黑龙江省', '2301', '哈尔滨市', '230184', '五常市', '', '', '', '', 3, 1, ''), ('2302', '23', '00,23', '齐齐哈尔市', '23', '黑龙江省', '2302', '齐齐哈尔市', '', '', '', '', '', '', 2, 1, ''), ('230202', '2302', '00,23,2302', '龙沙区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230202', '龙沙区', '', '', '', '', 3, 1, ''), ('230203', '2302', '00,23,2302', '建华区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230203', '建华区', '', '', '', '', 3, 1, ''), ('230204', '2302', '00,23,2302', '铁锋区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230204', '铁锋区', '', '', '', '', 3, 1, ''), ('230205', '2302', '00,23,2302', '昂昂溪区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230205', '昂昂溪区', '', '', '', '', 3, 1, ''), ('230206', '2302', '00,23,2302', '富拉尔基区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230206', '富拉尔基区', '', '', '', '', 3, 1, ''), ('230207', '2302', '00,23,2302', '碾子山区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230207', '碾子山区', '', '', '', '', 3, 1, ''), ('230208', '2302', '00,23,2302', '梅里斯达斡尔族区', '23', '黑龙江省', '2302', '齐齐哈尔市', '230208', '梅里斯达斡尔族区', '', '', '', '', 3, 1, ''), ('230221', '2302', '00,23,2302', '龙江县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230221', '龙江县', '', '', '', '', 3, 1, ''), ('230223', '2302', '00,23,2302', '依安县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230223', '依安县', '', '', '', '', 3, 1, ''), ('230224', '2302', '00,23,2302', '泰来县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230224', '泰来县', '', '', '', '', 3, 1, ''), ('230225', '2302', '00,23,2302', '甘南县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230225', '甘南县', '', '', '', '', 3, 1, ''), ('230227', '2302', '00,23,2302', '富裕县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230227', '富裕县', '', '', '', '', 3, 1, ''), ('230229', '2302', '00,23,2302', '克山县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230229', '克山县', '', '', '', '', 3, 1, ''), ('230230', '2302', '00,23,2302', '克东县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230230', '克东县', '', '', '', '', 3, 1, ''), ('230231', '2302', '00,23,2302', '拜泉县', '23', '黑龙江省', '2302', '齐齐哈尔市', '230231', '拜泉县', '', '', '', '', 3, 1, ''), ('230281', '2302', '00,23,2302', '讷河市', '23', '黑龙江省', '2302', '齐齐哈尔市', '230281', '讷河市', '', '', '', '', 3, 1, ''), ('2303', '23', '00,23', '鸡西市', '23', '黑龙江省', '2303', '鸡西市', '', '', '', '', '', '', 2, 1, ''), ('230302', '2303', '00,23,2303', '鸡冠区', '23', '黑龙江省', '2303', '鸡西市', '230302', '鸡冠区', '', '', '', '', 3, 1, ''), ('230303', '2303', '00,23,2303', '恒山区', '23', '黑龙江省', '2303', '鸡西市', '230303', '恒山区', '', '', '', '', 3, 1, ''), ('230304', '2303', '00,23,2303', '滴道区', '23', '黑龙江省', '2303', '鸡西市', '230304', '滴道区', '', '', '', '', 3, 1, ''), ('230305', '2303', '00,23,2303', '梨树区', '23', '黑龙江省', '2303', '鸡西市', '230305', '梨树区', '', '', '', '', 3, 1, ''), ('230306', '2303', '00,23,2303', '城子河区', '23', '黑龙江省', '2303', '鸡西市', '230306', '城子河区', '', '', '', '', 3, 1, ''), ('230307', '2303', '00,23,2303', '麻山区', '23', '黑龙江省', '2303', '鸡西市', '230307', '麻山区', '', '', '', '', 3, 1, ''), ('230321', '2303', '00,23,2303', '鸡东县', '23', '黑龙江省', '2303', '鸡西市', '230321', '鸡东县', '', '', '', '', 3, 1, ''), ('230381', '2303', '00,23,2303', '虎林市', '23', '黑龙江省', '2303', '鸡西市', '230381', '虎林市', '', '', '', '', 3, 1, ''), ('230382', '2303', '00,23,2303', '密山市', '23', '黑龙江省', '2303', '鸡西市', '230382', '密山市', '', '', '', '', 3, 1, ''), ('2304', '23', '00,23', '鹤岗市', '23', '黑龙江省', '2304', '鹤岗市', '', '', '', '', '', '', 2, 1, ''), ('230402', '2304', '00,23,2304', '向阳区', '23', '黑龙江省', '2304', '鹤岗市', '230402', '向阳区', '', '', '', '', 3, 1, ''), ('230403', '2304', '00,23,2304', '工农区', '23', '黑龙江省', '2304', '鹤岗市', '230403', '工农区', '', '', '', '', 3, 1, ''), ('230404', '2304', '00,23,2304', '南山区', '23', '黑龙江省', '2304', '鹤岗市', '230404', '南山区', '', '', '', '', 3, 1, ''), ('230405', '2304', '00,23,2304', '兴安区', '23', '黑龙江省', '2304', '鹤岗市', '230405', '兴安区', '', '', '', '', 3, 1, ''), ('230406', '2304', '00,23,2304', '东山区', '23', '黑龙江省', '2304', '鹤岗市', '230406', '东山区', '', '', '', '', 3, 1, ''), ('230407', '2304', '00,23,2304', '兴山区', '23', '黑龙江省', '2304', '鹤岗市', '230407', '兴山区', '', '', '', '', 3, 1, ''), ('230421', '2304', '00,23,2304', '萝北县', '23', '黑龙江省', '2304', '鹤岗市', '230421', '萝北县', '', '', '', '', 3, 1, ''), ('230422', '2304', '00,23,2304', '绥滨县', '23', '黑龙江省', '2304', '鹤岗市', '230422', '绥滨县', '', '', '', '', 3, 1, ''), ('2305', '23', '00,23', '双鸭山市', '23', '黑龙江省', '2305', '双鸭山市', '', '', '', '', '', '', 2, 1, ''), ('230502', '2305', '00,23,2305', '尖山区', '23', '黑龙江省', '2305', '双鸭山市', '230502', '尖山区', '', '', '', '', 3, 1, ''), ('230503', '2305', '00,23,2305', '岭东区', '23', '黑龙江省', '2305', '双鸭山市', '230503', '岭东区', '', '', '', '', 3, 1, ''), ('230505', '2305', '00,23,2305', '四方台区', '23', '黑龙江省', '2305', '双鸭山市', '230505', '四方台区', '', '', '', '', 3, 1, ''), ('230506', '2305', '00,23,2305', '宝山区', '23', '黑龙江省', '2305', '双鸭山市', '230506', '宝山区', '', '', '', '', 3, 1, ''), ('230521', '2305', '00,23,2305', '集贤县', '23', '黑龙江省', '2305', '双鸭山市', '230521', '集贤县', '', '', '', '', 3, 1, ''), ('230522', '2305', '00,23,2305', '友谊县', '23', '黑龙江省', '2305', '双鸭山市', '230522', '友谊县', '', '', '', '', 3, 1, ''), ('230523', '2305', '00,23,2305', '宝清县', '23', '黑龙江省', '2305', '双鸭山市', '230523', '宝清县', '', '', '', '', 3, 1, ''), ('230524', '2305', '00,23,2305', '饶河县', '23', '黑龙江省', '2305', '双鸭山市', '230524', '饶河县', '', '', '', '', 3, 1, ''), ('2306', '23', '00,23', '大庆市', '23', '黑龙江省', '2306', '大庆市', '', '', '', '', '', '', 2, 1, ''), ('230602', '2306', '00,23,2306', '萨尔图区', '23', '黑龙江省', '2306', '大庆市', '230602', '萨尔图区', '', '', '', '', 3, 1, ''), ('230603', '2306', '00,23,2306', '龙凤区', '23', '黑龙江省', '2306', '大庆市', '230603', '龙凤区', '', '', '', '', 3, 1, ''), ('230604', '2306', '00,23,2306', '让胡路区', '23', '黑龙江省', '2306', '大庆市', '230604', '让胡路区', '', '', '', '', 3, 1, ''), ('230605', '2306', '00,23,2306', '红岗区', '23', '黑龙江省', '2306', '大庆市', '230605', '红岗区', '', '', '', '', 3, 1, ''), ('230606', '2306', '00,23,2306', '大同区', '23', '黑龙江省', '2306', '大庆市', '230606', '大同区', '', '', '', '', 3, 1, ''), ('230621', '2306', '00,23,2306', '肇州县', '23', '黑龙江省', '2306', '大庆市', '230621', '肇州县', '', '', '', '', 3, 1, ''), ('230622', '2306', '00,23,2306', '肇源县', '23', '黑龙江省', '2306', '大庆市', '230622', '肇源县', '', '', '', '', 3, 1, ''), ('230623', '2306', '00,23,2306', '林甸县', '23', '黑龙江省', '2306', '大庆市', '230623', '林甸县', '', '', '', '', 3, 1, ''), ('230624', '2306', '00,23,2306', '杜尔伯特蒙古族自治县', '23', '黑龙江省', '2306', '大庆市', '230624', '杜尔伯特蒙古族自治县', '', '', '', '', 3, 1, ''), ('2307', '23', '00,23', '伊春市', '23', '黑龙江省', '2307', '伊春市', '', '', '', '', '', '', 2, 1, ''), ('230717', '2307', '00,23,2307', '伊美区', '23', '黑龙江省', '2307', '伊春市', '230717', '伊美区', '', '', '', '', 3, 1, ''), ('230718', '2307', '00,23,2307', '乌翠区', '23', '黑龙江省', '2307', '伊春市', '230718', '乌翠区', '', '', '', '', 3, 1, ''), ('230719', '2307', '00,23,2307', '友好区', '23', '黑龙江省', '2307', '伊春市', '230719', '友好区', '', '', '', '', 3, 1, ''), ('230722', '2307', '00,23,2307', '嘉荫县', '23', '黑龙江省', '2307', '伊春市', '230722', '嘉荫县', '', '', '', '', 3, 1, ''), ('230723', '2307', '00,23,2307', '汤旺县', '23', '黑龙江省', '2307', '伊春市', '230723', '汤旺县', '', '', '', '', 3, 1, ''), ('230724', '2307', '00,23,2307', '丰林县', '23', '黑龙江省', '2307', '伊春市', '230724', '丰林县', '', '', '', '', 3, 1, ''), ('230725', '2307', '00,23,2307', '大箐山县', '23', '黑龙江省', '2307', '伊春市', '230725', '大箐山县', '', '', '', '', 3, 1, ''), ('230726', '2307', '00,23,2307', '南岔县', '23', '黑龙江省', '2307', '伊春市', '230726', '南岔县', '', '', '', '', 3, 1, ''), ('230751', '2307', '00,23,2307', '金林区', '23', '黑龙江省', '2307', '伊春市', '230751', '金林区', '', '', '', '', 3, 1, ''), ('230781', '2307', '00,23,2307', '铁力市', '23', '黑龙江省', '2307', '伊春市', '230781', '铁力市', '', '', '', '', 3, 1, ''), ('2308', '23', '00,23', '佳木斯市', '23', '黑龙江省', '2308', '佳木斯市', '', '', '', '', '', '', 2, 1, ''), ('230803', '2308', '00,23,2308', '向阳区', '23', '黑龙江省', '2308', '佳木斯市', '230803', '向阳区', '', '', '', '', 3, 1, ''), ('230804', '2308', '00,23,2308', '前进区', '23', '黑龙江省', '2308', '佳木斯市', '230804', '前进区', '', '', '', '', 3, 1, ''), ('230805', '2308', '00,23,2308', '东风区', '23', '黑龙江省', '2308', '佳木斯市', '230805', '东风区', '', '', '', '', 3, 1, ''), ('230811', '2308', '00,23,2308', '郊区', '23', '黑龙江省', '2308', '佳木斯市', '230811', '郊区', '', '', '', '', 3, 1, ''), ('230822', '2308', '00,23,2308', '桦南县', '23', '黑龙江省', '2308', '佳木斯市', '230822', '桦南县', '', '', '', '', 3, 1, ''), ('230826', '2308', '00,23,2308', '桦川县', '23', '黑龙江省', '2308', '佳木斯市', '230826', '桦川县', '', '', '', '', 3, 1, ''), ('230828', '2308', '00,23,2308', '汤原县', '23', '黑龙江省', '2308', '佳木斯市', '230828', '汤原县', '', '', '', '', 3, 1, ''), ('230881', '2308', '00,23,2308', '同江市', '23', '黑龙江省', '2308', '佳木斯市', '230881', '同江市', '', '', '', '', 3, 1, ''), ('230882', '2308', '00,23,2308', '富锦市', '23', '黑龙江省', '2308', '佳木斯市', '230882', '富锦市', '', '', '', '', 3, 1, ''), ('230883', '2308', '00,23,2308', '抚远市', '23', '黑龙江省', '2308', '佳木斯市', '230883', '抚远市', '', '', '', '', 3, 1, ''), ('2309', '23', '00,23', '七台河市', '23', '黑龙江省', '2309', '七台河市', '', '', '', '', '', '', 2, 1, ''), ('230902', '2309', '00,23,2309', '新兴区', '23', '黑龙江省', '2309', '七台河市', '230902', '新兴区', '', '', '', '', 3, 1, ''), ('230903', '2309', '00,23,2309', '桃山区', '23', '黑龙江省', '2309', '七台河市', '230903', '桃山区', '', '', '', '', 3, 1, ''), ('230904', '2309', '00,23,2309', '茄子河区', '23', '黑龙江省', '2309', '七台河市', '230904', '茄子河区', '', '', '', '', 3, 1, ''), ('230921', '2309', '00,23,2309', '勃利县', '23', '黑龙江省', '2309', '七台河市', '230921', '勃利县', '', '', '', '', 3, 1, ''), ('2310', '23', '00,23', '牡丹江市', '23', '黑龙江省', '2310', '牡丹江市', '', '', '', '', '', '', 2, 1, ''), ('231002', '2310', '00,23,2310', '东安区', '23', '黑龙江省', '2310', '牡丹江市', '231002', '东安区', '', '', '', '', 3, 1, ''), ('231003', '2310', '00,23,2310', '阳明区', '23', '黑龙江省', '2310', '牡丹江市', '231003', '阳明区', '', '', '', '', 3, 1, ''), ('231004', '2310', '00,23,2310', '爱民区', '23', '黑龙江省', '2310', '牡丹江市', '231004', '爱民区', '', '', '', '', 3, 1, ''), ('231005', '2310', '00,23,2310', '西安区', '23', '黑龙江省', '2310', '牡丹江市', '231005', '西安区', '', '', '', '', 3, 1, ''), ('231025', '2310', '00,23,2310', '林口县', '23', '黑龙江省', '2310', '牡丹江市', '231025', '林口县', '', '', '', '', 3, 1, ''), ('231081', '2310', '00,23,2310', '绥芬河市', '23', '黑龙江省', '2310', '牡丹江市', '231081', '绥芬河市', '', '', '', '', 3, 1, ''), ('231083', '2310', '00,23,2310', '海林市', '23', '黑龙江省', '2310', '牡丹江市', '231083', '海林市', '', '', '', '', 3, 1, ''), ('231084', '2310', '00,23,2310', '宁安市', '23', '黑龙江省', '2310', '牡丹江市', '231084', '宁安市', '', '', '', '', 3, 1, ''), ('231085', '2310', '00,23,2310', '穆棱市', '23', '黑龙江省', '2310', '牡丹江市', '231085', '穆棱市', '', '', '', '', 3, 1, ''), ('231086', '2310', '00,23,2310', '东宁市', '23', '黑龙江省', '2310', '牡丹江市', '231086', '东宁市', '', '', '', '', 3, 1, ''), ('2311', '23', '00,23', '黑河市', '23', '黑龙江省', '2311', '黑河市', '', '', '', '', '', '', 2, 1, ''), ('231102', '2311', '00,23,2311', '爱辉区', '23', '黑龙江省', '2311', '黑河市', '231102', '爱辉区', '', '', '', '', 3, 1, ''), ('231123', '2311', '00,23,2311', '逊克县', '23', '黑龙江省', '2311', '黑河市', '231123', '逊克县', '', '', '', '', 3, 1, ''), ('231124', '2311', '00,23,2311', '孙吴县', '23', '黑龙江省', '2311', '黑河市', '231124', '孙吴县', '', '', '', '', 3, 1, ''), ('231181', '2311', '00,23,2311', '北安市', '23', '黑龙江省', '2311', '黑河市', '231181', '北安市', '', '', '', '', 3, 1, ''), ('231182', '2311', '00,23,2311', '五大连池市', '23', '黑龙江省', '2311', '黑河市', '231182', '五大连池市', '', '', '', '', 3, 1, ''), ('231183', '2311', '00,23,2311', '嫩江市', '23', '黑龙江省', '2311', '黑河市', '231183', '嫩江市', '', '', '', '', 3, 1, ''), ('2312', '23', '00,23', '绥化市', '23', '黑龙江省', '2312', '绥化市', '', '', '', '', '', '', 2, 1, ''), ('231202', '2312', '00,23,2312', '北林区', '23', '黑龙江省', '2312', '绥化市', '231202', '北林区', '', '', '', '', 3, 1, ''), ('231221', '2312', '00,23,2312', '望奎县', '23', '黑龙江省', '2312', '绥化市', '231221', '望奎县', '', '', '', '', 3, 1, ''), ('231222', '2312', '00,23,2312', '兰西县', '23', '黑龙江省', '2312', '绥化市', '231222', '兰西县', '', '', '', '', 3, 1, ''), ('231223', '2312', '00,23,2312', '青冈县', '23', '黑龙江省', '2312', '绥化市', '231223', '青冈县', '', '', '', '', 3, 1, ''), ('231224', '2312', '00,23,2312', '庆安县', '23', '黑龙江省', '2312', '绥化市', '231224', '庆安县', '', '', '', '', 3, 1, ''), ('231225', '2312', '00,23,2312', '明水县', '23', '黑龙江省', '2312', '绥化市', '231225', '明水县', '', '', '', '', 3, 1, ''), ('231226', '2312', '00,23,2312', '绥棱县', '23', '黑龙江省', '2312', '绥化市', '231226', '绥棱县', '', '', '', '', 3, 1, ''), ('231281', '2312', '00,23,2312', '安达市', '23', '黑龙江省', '2312', '绥化市', '231281', '安达市', '', '', '', '', 3, 1, ''), ('231282', '2312', '00,23,2312', '肇东市', '23', '黑龙江省', '2312', '绥化市', '231282', '肇东市', '', '', '', '', 3, 1, ''), ('231283', '2312', '00,23,2312', '海伦市', '23', '黑龙江省', '2312', '绥化市', '231283', '海伦市', '', '', '', '', 3, 1, ''), ('2327', '23', '00,23', '大兴安岭地区', '23', '黑龙江省', '2327', '大兴安岭地区', '', '', '', '', '', '', 2, 1, ''), ('232701', '2327', '00,23,2327', '漠河市', '23', '黑龙江省', '2327', '大兴安岭地区', '232701', '漠河市', '', '', '', '', 3, 1, ''), ('232721', '2327', '00,23,2327', '呼玛县', '23', '黑龙江省', '2327', '大兴安岭地区', '232721', '呼玛县', '', '', '', '', 3, 1, ''), ('232722', '2327', '00,23,2327', '塔河县', '23', '黑龙江省', '2327', '大兴安岭地区', '232722', '塔河县', '', '', '', '', 3, 1, ''), ('31', '00', '00', '上海市', '31', '上海市', '', '', '', '', '', '', '', '', 1, 1, ''), ('3101', '31', '00,31', '上海市', '31', '上海市', '3101', '上海市', '', '', '', '', '', '', 2, 1, ''), ('310101', '3101', '00,31,3101', '黄浦区', '31', '上海市', '3101', '上海市', '310101', '黄浦区', '', '', '', '', 3, 1, ''), ('310104', '3101', '00,31,3101', '徐汇区', '31', '上海市', '3101', '上海市', '310104', '徐汇区', '', '', '', '', 3, 1, ''), ('310105', '3101', '00,31,3101', '长宁区', '31', '上海市', '3101', '上海市', '310105', '长宁区', '', '', '', '', 3, 1, ''), ('310106', '3101', '00,31,3101', '静安区', '31', '上海市', '3101', '上海市', '310106', '静安区', '', '', '', '', 3, 1, ''), ('310107', '3101', '00,31,3101', '普陀区', '31', '上海市', '3101', '上海市', '310107', '普陀区', '', '', '', '', 3, 1, ''), ('310109', '3101', '00,31,3101', '虹口区', '31', '上海市', '3101', '上海市', '310109', '虹口区', '', '', '', '', 3, 1, ''), ('310110', '3101', '00,31,3101', '杨浦区', '31', '上海市', '3101', '上海市', '310110', '杨浦区', '', '', '', '', 3, 1, ''), ('310112', '3101', '00,31,3101', '闵行区', '31', '上海市', '3101', '上海市', '310112', '闵行区', '', '', '', '', 3, 1, ''), ('310113', '3101', '00,31,3101', '宝山区', '31', '上海市', '3101', '上海市', '310113', '宝山区', '', '', '', '', 3, 1, ''), ('310114', '3101', '00,31,3101', '嘉定区', '31', '上海市', '3101', '上海市', '310114', '嘉定区', '', '', '', '', 3, 1, ''), ('310115', '3101', '00,31,3101', '浦东新区', '31', '上海市', '3101', '上海市', '310115', '浦东新区', '', '', '', '', 3, 1, ''), ('310116', '3101', '00,31,3101', '金山区', '31', '上海市', '3101', '上海市', '310116', '金山区', '', '', '', '', 3, 1, ''), ('310117', '3101', '00,31,3101', '松江区', '31', '上海市', '3101', '上海市', '310117', '松江区', '', '', '', '', 3, 1, ''), ('310118', '3101', '00,31,3101', '青浦区', '31', '上海市', '3101', '上海市', '310118', '青浦区', '', '', '', '', 3, 1, ''), ('310120', '3101', '00,31,3101', '奉贤区', '31', '上海市', '3101', '上海市', '310120', '奉贤区', '', '', '', '', 3, 1, ''), ('310151', '3101', '00,31,3101', '崇明区', '31', '上海市', '3101', '上海市', '310151', '崇明区', '', '', '', '', 3, 1, ''), ('32', '00', '00', '江苏省', '32', '江苏省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3201', '32', '00,32', '南京市', '32', '江苏省', '3201', '南京市', '', '', '', '', '', '', 2, 1, ''), ('320102', '3201', '00,32,3201', '玄武区', '32', '江苏省', '3201', '南京市', '320102', '玄武区', '', '', '', '', 3, 1, ''), ('320104', '3201', '00,32,3201', '秦淮区', '32', '江苏省', '3201', '南京市', '320104', '秦淮区', '', '', '', '', 3, 1, ''), ('320105', '3201', '00,32,3201', '建邺区', '32', '江苏省', '3201', '南京市', '320105', '建邺区', '', '', '', '', 3, 1, ''), ('320106', '3201', '00,32,3201', '鼓楼区', '32', '江苏省', '3201', '南京市', '320106', '鼓楼区', '', '', '', '', 3, 1, ''), ('320111', '3201', '00,32,3201', '浦口区', '32', '江苏省', '3201', '南京市', '320111', '浦口区', '', '', '', '', 3, 1, ''), ('320113', '3201', '00,32,3201', '栖霞区', '32', '江苏省', '3201', '南京市', '320113', '栖霞区', '', '', '', '', 3, 1, ''), ('320114', '3201', '00,32,3201', '雨花台区', '32', '江苏省', '3201', '南京市', '320114', '雨花台区', '', '', '', '', 3, 1, ''), ('320115', '3201', '00,32,3201', '江宁区', '32', '江苏省', '3201', '南京市', '320115', '江宁区', '', '', '', '', 3, 1, ''), ('320116', '3201', '00,32,3201', '六合区', '32', '江苏省', '3201', '南京市', '320116', '六合区', '', '', '', '', 3, 1, ''), ('320117', '3201', '00,32,3201', '溧水区', '32', '江苏省', '3201', '南京市', '320117', '溧水区', '', '', '', '', 3, 1, ''), ('320118', '3201', '00,32,3201', '高淳区', '32', '江苏省', '3201', '南京市', '320118', '高淳区', '', '', '', '', 3, 1, ''), ('3202', '32', '00,32', '无锡市', '32', '江苏省', '3202', '无锡市', '', '', '', '', '', '', 2, 1, ''), ('320205', '3202', '00,32,3202', '锡山区', '32', '江苏省', '3202', '无锡市', '320205', '锡山区', '', '', '', '', 3, 1, ''), ('320206', '3202', '00,32,3202', '惠山区', '32', '江苏省', '3202', '无锡市', '320206', '惠山区', '', '', '', '', 3, 1, ''), ('320211', '3202', '00,32,3202', '滨湖区', '32', '江苏省', '3202', '无锡市', '320211', '滨湖区', '', '', '', '', 3, 1, ''), ('320213', '3202', '00,32,3202', '梁溪区', '32', '江苏省', '3202', '无锡市', '320213', '梁溪区', '', '', '', '', 3, 1, ''), ('320214', '3202', '00,32,3202', '新吴区', '32', '江苏省', '3202', '无锡市', '320214', '新吴区', '', '', '', '', 3, 1, ''), ('320281', '3202', '00,32,3202', '江阴市', '32', '江苏省', '3202', '无锡市', '320281', '江阴市', '', '', '', '', 3, 1, ''), ('320282', '3202', '00,32,3202', '宜兴市', '32', '江苏省', '3202', '无锡市', '320282', '宜兴市', '', '', '', '', 3, 1, ''), ('3203', '32', '00,32', '徐州市', '32', '江苏省', '3203', '徐州市', '', '', '', '', '', '', 2, 1, ''), ('320302', '3203', '00,32,3203', '鼓楼区', '32', '江苏省', '3203', '徐州市', '320302', '鼓楼区', '', '', '', '', 3, 1, ''), ('320303', '3203', '00,32,3203', '云龙区', '32', '江苏省', '3203', '徐州市', '320303', '云龙区', '', '', '', '', 3, 1, ''), ('320305', '3203', '00,32,3203', '贾汪区', '32', '江苏省', '3203', '徐州市', '320305', '贾汪区', '', '', '', '', 3, 1, ''), ('320311', '3203', '00,32,3203', '泉山区', '32', '江苏省', '3203', '徐州市', '320311', '泉山区', '', '', '', '', 3, 1, ''), ('320312', '3203', '00,32,3203', '铜山区', '32', '江苏省', '3203', '徐州市', '320312', '铜山区', '', '', '', '', 3, 1, ''), ('320321', '3203', '00,32,3203', '丰县', '32', '江苏省', '3203', '徐州市', '320321', '丰县', '', '', '', '', 3, 1, ''), ('320322', '3203', '00,32,3203', '沛县', '32', '江苏省', '3203', '徐州市', '320322', '沛县', '', '', '', '', 3, 1, ''), ('320324', '3203', '00,32,3203', '睢宁县', '32', '江苏省', '3203', '徐州市', '320324', '睢宁县', '', '', '', '', 3, 1, ''), ('320381', '3203', '00,32,3203', '新沂市', '32', '江苏省', '3203', '徐州市', '320381', '新沂市', '', '', '', '', 3, 1, ''), ('320382', '3203', '00,32,3203', '邳州市', '32', '江苏省', '3203', '徐州市', '320382', '邳州市', '', '', '', '', 3, 1, ''), ('3204', '32', '00,32', '常州市', '32', '江苏省', '3204', '常州市', '', '', '', '', '', '', 2, 1, ''), ('320402', '3204', '00,32,3204', '天宁区', '32', '江苏省', '3204', '常州市', '320402', '天宁区', '', '', '', '', 3, 1, ''), ('320404', '3204', '00,32,3204', '钟楼区', '32', '江苏省', '3204', '常州市', '320404', '钟楼区', '', '', '', '', 3, 1, ''), ('320411', '3204', '00,32,3204', '新北区', '32', '江苏省', '3204', '常州市', '320411', '新北区', '', '', '', '', 3, 1, ''), ('320412', '3204', '00,32,3204', '武进区', '32', '江苏省', '3204', '常州市', '320412', '武进区', '', '', '', '', 3, 1, ''), ('320413', '3204', '00,32,3204', '金坛区', '32', '江苏省', '3204', '常州市', '320413', '金坛区', '', '', '', '', 3, 1, ''), ('320481', '3204', '00,32,3204', '溧阳市', '32', '江苏省', '3204', '常州市', '320481', '溧阳市', '', '', '', '', 3, 1, ''), ('3205', '32', '00,32', '苏州市', '32', '江苏省', '3205', '苏州市', '', '', '', '', '', '', 2, 1, ''), ('320505', '3205', '00,32,3205', '虎丘区', '32', '江苏省', '3205', '苏州市', '320505', '虎丘区', '', '', '', '', 3, 1, ''), ('320506', '3205', '00,32,3205', '吴中区', '32', '江苏省', '3205', '苏州市', '320506', '吴中区', '', '', '', '', 3, 1, ''), ('320507', '3205', '00,32,3205', '相城区', '32', '江苏省', '3205', '苏州市', '320507', '相城区', '', '', '', '', 3, 1, ''), ('320508', '3205', '00,32,3205', '姑苏区', '32', '江苏省', '3205', '苏州市', '320508', '姑苏区', '', '', '', '', 3, 1, ''), ('320509', '3205', '00,32,3205', '吴江区', '32', '江苏省', '3205', '苏州市', '320509', '吴江区', '', '', '', '', 3, 1, ''), ('320581', '3205', '00,32,3205', '常熟市', '32', '江苏省', '3205', '苏州市', '320581', '常熟市', '', '', '', '', 3, 1, ''), ('320582', '3205', '00,32,3205', '张家港市', '32', '江苏省', '3205', '苏州市', '320582', '张家港市', '', '', '', '', 3, 1, ''), ('320583', '3205', '00,32,3205', '昆山市', '32', '江苏省', '3205', '苏州市', '320583', '昆山市', '', '', '', '', 3, 1, ''), ('320585', '3205', '00,32,3205', '太仓市', '32', '江苏省', '3205', '苏州市', '320585', '太仓市', '', '', '', '', 3, 1, ''), ('3206', '32', '00,32', '南通市', '32', '江苏省', '3206', '南通市', '', '', '', '', '', '', 2, 1, ''), ('320602', '3206', '00,32,3206', '崇川区', '32', '江苏省', '3206', '南通市', '320602', '崇川区', '', '', '', '', 3, 1, ''), ('320611', '3206', '00,32,3206', '港闸区', '32', '江苏省', '3206', '南通市', '320611', '港闸区', '', '', '', '', 3, 1, ''), ('320612', '3206', '00,32,3206', '通州区', '32', '江苏省', '3206', '南通市', '320612', '通州区', '', '', '', '', 3, 1, ''), ('320623', '3206', '00,32,3206', '如东县', '32', '江苏省', '3206', '南通市', '320623', '如东县', '', '', '', '', 3, 1, ''), ('320681', '3206', '00,32,3206', '启东市', '32', '江苏省', '3206', '南通市', '320681', '启东市', '', '', '', '', 3, 1, ''), ('320682', '3206', '00,32,3206', '如皋市', '32', '江苏省', '3206', '南通市', '320682', '如皋市', '', '', '', '', 3, 1, ''), ('320684', '3206', '00,32,3206', '海门市', '32', '江苏省', '3206', '南通市', '320684', '海门市', '', '', '', '', 3, 1, ''), ('320685', '3206', '00,32,3206', '海安市', '32', '江苏省', '3206', '南通市', '320685', '海安市', '', '', '', '', 3, 1, ''), ('3207', '32', '00,32', '连云港市', '32', '江苏省', '3207', '连云港市', '', '', '', '', '', '', 2, 1, ''), ('320703', '3207', '00,32,3207', '连云区', '32', '江苏省', '3207', '连云港市', '320703', '连云区', '', '', '', '', 3, 1, ''), ('320706', '3207', '00,32,3207', '海州区', '32', '江苏省', '3207', '连云港市', '320706', '海州区', '', '', '', '', 3, 1, ''), ('320707', '3207', '00,32,3207', '赣榆区', '32', '江苏省', '3207', '连云港市', '320707', '赣榆区', '', '', '', '', 3, 1, ''), ('320722', '3207', '00,32,3207', '东海县', '32', '江苏省', '3207', '连云港市', '320722', '东海县', '', '', '', '', 3, 1, ''), ('320723', '3207', '00,32,3207', '灌云县', '32', '江苏省', '3207', '连云港市', '320723', '灌云县', '', '', '', '', 3, 1, ''), ('320724', '3207', '00,32,3207', '灌南县', '32', '江苏省', '3207', '连云港市', '320724', '灌南县', '', '', '', '', 3, 1, ''), ('3208', '32', '00,32', '淮安市', '32', '江苏省', '3208', '淮安市', '', '', '', '', '', '', 2, 1, ''), ('320803', '3208', '00,32,3208', '淮安区', '32', '江苏省', '3208', '淮安市', '320803', '淮安区', '', '', '', '', 3, 1, ''), ('320804', '3208', '00,32,3208', '淮阴区', '32', '江苏省', '3208', '淮安市', '320804', '淮阴区', '', '', '', '', 3, 1, ''), ('320812', '3208', '00,32,3208', '清江浦区', '32', '江苏省', '3208', '淮安市', '320812', '清江浦区', '', '', '', '', 3, 1, ''), ('320813', '3208', '00,32,3208', '洪泽区', '32', '江苏省', '3208', '淮安市', '320813', '洪泽区', '', '', '', '', 3, 1, ''), ('320826', '3208', '00,32,3208', '涟水县', '32', '江苏省', '3208', '淮安市', '320826', '涟水县', '', '', '', '', 3, 1, ''), ('320830', '3208', '00,32,3208', '盱眙县', '32', '江苏省', '3208', '淮安市', '320830', '盱眙县', '', '', '', '', 3, 1, ''), ('320831', '3208', '00,32,3208', '金湖县', '32', '江苏省', '3208', '淮安市', '320831', '金湖县', '', '', '', '', 3, 1, ''), ('3209', '32', '00,32', '盐城市', '32', '江苏省', '3209', '盐城市', '', '', '', '', '', '', 2, 1, ''), ('320902', '3209', '00,32,3209', '亭湖区', '32', '江苏省', '3209', '盐城市', '320902', '亭湖区', '', '', '', '', 3, 1, ''), ('320903', '3209', '00,32,3209', '盐都区', '32', '江苏省', '3209', '盐城市', '320903', '盐都区', '', '', '', '', 3, 1, ''), ('320904', '3209', '00,32,3209', '大丰区', '32', '江苏省', '3209', '盐城市', '320904', '大丰区', '', '', '', '', 3, 1, ''), ('320921', '3209', '00,32,3209', '响水县', '32', '江苏省', '3209', '盐城市', '320921', '响水县', '', '', '', '', 3, 1, ''), ('320922', '3209', '00,32,3209', '滨海县', '32', '江苏省', '3209', '盐城市', '320922', '滨海县', '', '', '', '', 3, 1, ''), ('320923', '3209', '00,32,3209', '阜宁县', '32', '江苏省', '3209', '盐城市', '320923', '阜宁县', '', '', '', '', 3, 1, ''), ('320924', '3209', '00,32,3209', '射阳县', '32', '江苏省', '3209', '盐城市', '320924', '射阳县', '', '', '', '', 3, 1, ''), ('320925', '3209', '00,32,3209', '建湖县', '32', '江苏省', '3209', '盐城市', '320925', '建湖县', '', '', '', '', 3, 1, ''), ('320981', '3209', '00,32,3209', '东台市', '32', '江苏省', '3209', '盐城市', '320981', '东台市', '', '', '', '', 3, 1, ''), ('3210', '32', '00,32', '扬州市', '32', '江苏省', '3210', '扬州市', '', '', '', '', '', '', 2, 1, ''), ('321002', '3210', '00,32,3210', '广陵区', '32', '江苏省', '3210', '扬州市', '321002', '广陵区', '', '', '', '', 3, 1, ''), ('321003', '3210', '00,32,3210', '邗江区', '32', '江苏省', '3210', '扬州市', '321003', '邗江区', '', '', '', '', 3, 1, ''), ('321012', '3210', '00,32,3210', '江都区', '32', '江苏省', '3210', '扬州市', '321012', '江都区', '', '', '', '', 3, 1, ''), ('321023', '3210', '00,32,3210', '宝应县', '32', '江苏省', '3210', '扬州市', '321023', '宝应县', '', '', '', '', 3, 1, ''), ('321081', '3210', '00,32,3210', '仪征市', '32', '江苏省', '3210', '扬州市', '321081', '仪征市', '', '', '', '', 3, 1, ''), ('321084', '3210', '00,32,3210', '高邮市', '32', '江苏省', '3210', '扬州市', '321084', '高邮市', '', '', '', '', 3, 1, ''), ('3211', '32', '00,32', '镇江市', '32', '江苏省', '3211', '镇江市', '', '', '', '', '', '', 2, 1, ''), ('321102', '3211', '00,32,3211', '京口区', '32', '江苏省', '3211', '镇江市', '321102', '京口区', '', '', '', '', 3, 1, ''), ('321111', '3211', '00,32,3211', '润州区', '32', '江苏省', '3211', '镇江市', '321111', '润州区', '', '', '', '', 3, 1, ''), ('321112', '3211', '00,32,3211', '丹徒区', '32', '江苏省', '3211', '镇江市', '321112', '丹徒区', '', '', '', '', 3, 1, ''), ('321181', '3211', '00,32,3211', '丹阳市', '32', '江苏省', '3211', '镇江市', '321181', '丹阳市', '', '', '', '', 3, 1, ''), ('321182', '3211', '00,32,3211', '扬中市', '32', '江苏省', '3211', '镇江市', '321182', '扬中市', '', '', '', '', 3, 1, ''), ('321183', '3211', '00,32,3211', '句容市', '32', '江苏省', '3211', '镇江市', '321183', '句容市', '', '', '', '', 3, 1, ''), ('3212', '32', '00,32', '泰州市', '32', '江苏省', '3212', '泰州市', '', '', '', '', '', '', 2, 1, ''), ('321202', '3212', '00,32,3212', '海陵区', '32', '江苏省', '3212', '泰州市', '321202', '海陵区', '', '', '', '', 3, 1, ''), ('321203', '3212', '00,32,3212', '高港区', '32', '江苏省', '3212', '泰州市', '321203', '高港区', '', '', '', '', 3, 1, ''), ('321204', '3212', '00,32,3212', '姜堰区', '32', '江苏省', '3212', '泰州市', '321204', '姜堰区', '', '', '', '', 3, 1, ''), ('321281', '3212', '00,32,3212', '兴化市', '32', '江苏省', '3212', '泰州市', '321281', '兴化市', '', '', '', '', 3, 1, ''), ('321282', '3212', '00,32,3212', '靖江市', '32', '江苏省', '3212', '泰州市', '321282', '靖江市', '', '', '', '', 3, 1, ''), ('321283', '3212', '00,32,3212', '泰兴市', '32', '江苏省', '3212', '泰州市', '321283', '泰兴市', '', '', '', '', 3, 1, ''), ('3213', '32', '00,32', '宿迁市', '32', '江苏省', '3213', '宿迁市', '', '', '', '', '', '', 2, 1, ''), ('321302', '3213', '00,32,3213', '宿城区', '32', '江苏省', '3213', '宿迁市', '321302', '宿城区', '', '', '', '', 3, 1, ''), ('321311', '3213', '00,32,3213', '宿豫区', '32', '江苏省', '3213', '宿迁市', '321311', '宿豫区', '', '', '', '', 3, 1, ''), ('321322', '3213', '00,32,3213', '沭阳县', '32', '江苏省', '3213', '宿迁市', '321322', '沭阳县', '', '', '', '', 3, 1, ''), ('321323', '3213', '00,32,3213', '泗阳县', '32', '江苏省', '3213', '宿迁市', '321323', '泗阳县', '', '', '', '', 3, 1, ''), ('321324', '3213', '00,32,3213', '泗洪县', '32', '江苏省', '3213', '宿迁市', '321324', '泗洪县', '', '', '', '', 3, 1, ''), ('33', '00', '00', '浙江省', '33', '浙江省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3301', '33', '00,33', '杭州市', '33', '浙江省', '3301', '杭州市', '', '', '', '', '', '', 2, 1, ''), ('330102', '3301', '00,33,3301', '上城区', '33', '浙江省', '3301', '杭州市', '330102', '上城区', '', '', '', '', 3, 1, ''), ('330103', '3301', '00,33,3301', '下城区', '33', '浙江省', '3301', '杭州市', '330103', '下城区', '', '', '', '', 3, 1, ''), ('330104', '3301', '00,33,3301', '江干区', '33', '浙江省', '3301', '杭州市', '330104', '江干区', '', '', '', '', 3, 1, ''), ('330105', '3301', '00,33,3301', '拱墅区', '33', '浙江省', '3301', '杭州市', '330105', '拱墅区', '', '', '', '', 3, 1, ''), ('330106', '3301', '00,33,3301', '西湖区', '33', '浙江省', '3301', '杭州市', '330106', '西湖区', '', '', '', '', 3, 1, ''), ('330108', '3301', '00,33,3301', '滨江区', '33', '浙江省', '3301', '杭州市', '330108', '滨江区', '', '', '', '', 3, 1, ''), ('330109', '3301', '00,33,3301', '萧山区', '33', '浙江省', '3301', '杭州市', '330109', '萧山区', '', '', '', '', 3, 1, ''), ('330110', '3301', '00,33,3301', '余杭区', '33', '浙江省', '3301', '杭州市', '330110', '余杭区', '', '', '', '', 3, 1, ''), ('330111', '3301', '00,33,3301', '富阳区', '33', '浙江省', '3301', '杭州市', '330111', '富阳区', '', '', '', '', 3, 1, ''), ('330112', '3301', '00,33,3301', '临安区', '33', '浙江省', '3301', '杭州市', '330112', '临安区', '', '', '', '', 3, 1, ''), ('330122', '3301', '00,33,3301', '桐庐县', '33', '浙江省', '3301', '杭州市', '330122', '桐庐县', '', '', '', '', 3, 1, ''), ('330127', '3301', '00,33,3301', '淳安县', '33', '浙江省', '3301', '杭州市', '330127', '淳安县', '', '', '', '', 3, 1, ''), ('330182', '3301', '00,33,3301', '建德市', '33', '浙江省', '3301', '杭州市', '330182', '建德市', '', '', '', '', 3, 1, ''), ('3302', '33', '00,33', '宁波市', '33', '浙江省', '3302', '宁波市', '', '', '', '', '', '', 2, 1, ''), ('330203', '3302', '00,33,3302', '海曙区', '33', '浙江省', '3302', '宁波市', '330203', '海曙区', '', '', '', '', 3, 1, ''), ('330205', '3302', '00,33,3302', '江北区', '33', '浙江省', '3302', '宁波市', '330205', '江北区', '', '', '', '', 3, 1, ''), ('330206', '3302', '00,33,3302', '北仑区', '33', '浙江省', '3302', '宁波市', '330206', '北仑区', '', '', '', '', 3, 1, ''), ('330211', '3302', '00,33,3302', '镇海区', '33', '浙江省', '3302', '宁波市', '330211', '镇海区', '', '', '', '', 3, 1, ''), ('330212', '3302', '00,33,3302', '鄞州区', '33', '浙江省', '3302', '宁波市', '330212', '鄞州区', '', '', '', '', 3, 1, ''), ('330213', '3302', '00,33,3302', '奉化区', '33', '浙江省', '3302', '宁波市', '330213', '奉化区', '', '', '', '', 3, 1, ''), ('330225', '3302', '00,33,3302', '象山县', '33', '浙江省', '3302', '宁波市', '330225', '象山县', '', '', '', '', 3, 1, ''), ('330226', '3302', '00,33,3302', '宁海县', '33', '浙江省', '3302', '宁波市', '330226', '宁海县', '', '', '', '', 3, 1, ''), ('330281', '3302', '00,33,3302', '余姚市', '33', '浙江省', '3302', '宁波市', '330281', '余姚市', '', '', '', '', 3, 1, ''), ('330282', '3302', '00,33,3302', '慈溪市', '33', '浙江省', '3302', '宁波市', '330282', '慈溪市', '', '', '', '', 3, 1, ''), ('3303', '33', '00,33', '温州市', '33', '浙江省', '3303', '温州市', '', '', '', '', '', '', 2, 1, ''), ('330302', '3303', '00,33,3303', '鹿城区', '33', '浙江省', '3303', '温州市', '330302', '鹿城区', '', '', '', '', 3, 1, ''), ('330303', '3303', '00,33,3303', '龙湾区', '33', '浙江省', '3303', '温州市', '330303', '龙湾区', '', '', '', '', 3, 1, ''), ('330304', '3303', '00,33,3303', '瓯海区', '33', '浙江省', '3303', '温州市', '330304', '瓯海区', '', '', '', '', 3, 1, ''), ('330305', '3303', '00,33,3303', '洞头区', '33', '浙江省', '3303', '温州市', '330305', '洞头区', '', '', '', '', 3, 1, ''), ('330324', '3303', '00,33,3303', '永嘉县', '33', '浙江省', '3303', '温州市', '330324', '永嘉县', '', '', '', '', 3, 1, ''), ('330326', '3303', '00,33,3303', '平阳县', '33', '浙江省', '3303', '温州市', '330326', '平阳县', '', '', '', '', 3, 1, ''), ('330327', '3303', '00,33,3303', '苍南县', '33', '浙江省', '3303', '温州市', '330327', '苍南县', '', '', '', '', 3, 1, ''), ('330328', '3303', '00,33,3303', '文成县', '33', '浙江省', '3303', '温州市', '330328', '文成县', '', '', '', '', 3, 1, ''), ('330329', '3303', '00,33,3303', '泰顺县', '33', '浙江省', '3303', '温州市', '330329', '泰顺县', '', '', '', '', 3, 1, ''), ('330381', '3303', '00,33,3303', '瑞安市', '33', '浙江省', '3303', '温州市', '330381', '瑞安市', '', '', '', '', 3, 1, ''), ('330382', '3303', '00,33,3303', '乐清市', '33', '浙江省', '3303', '温州市', '330382', '乐清市', '', '', '', '', 3, 1, ''), ('330383', '3303', '00,33,3303', '龙港市', '33', '浙江省', '3303', '温州市', '330383', '龙港市', '', '', '', '', 3, 1, ''), ('3304', '33', '00,33', '嘉兴市', '33', '浙江省', '3304', '嘉兴市', '', '', '', '', '', '', 2, 1, ''), ('330402', '3304', '00,33,3304', '南湖区', '33', '浙江省', '3304', '嘉兴市', '330402', '南湖区', '', '', '', '', 3, 1, ''), ('330411', '3304', '00,33,3304', '秀洲区', '33', '浙江省', '3304', '嘉兴市', '330411', '秀洲区', '', '', '', '', 3, 1, ''), ('330421', '3304', '00,33,3304', '嘉善县', '33', '浙江省', '3304', '嘉兴市', '330421', '嘉善县', '', '', '', '', 3, 1, ''), ('330424', '3304', '00,33,3304', '海盐县', '33', '浙江省', '3304', '嘉兴市', '330424', '海盐县', '', '', '', '', 3, 1, ''); +INSERT INTO `blade_region` VALUES ('330481', '3304', '00,33,3304', '海宁市', '33', '浙江省', '3304', '嘉兴市', '330481', '海宁市', '', '', '', '', 3, 1, ''), ('330482', '3304', '00,33,3304', '平湖市', '33', '浙江省', '3304', '嘉兴市', '330482', '平湖市', '', '', '', '', 3, 1, ''), ('330483', '3304', '00,33,3304', '桐乡市', '33', '浙江省', '3304', '嘉兴市', '330483', '桐乡市', '', '', '', '', 3, 1, ''), ('3305', '33', '00,33', '湖州市', '33', '浙江省', '3305', '湖州市', '', '', '', '', '', '', 2, 1, ''), ('330502', '3305', '00,33,3305', '吴兴区', '33', '浙江省', '3305', '湖州市', '330502', '吴兴区', '', '', '', '', 3, 1, ''), ('330503', '3305', '00,33,3305', '南浔区', '33', '浙江省', '3305', '湖州市', '330503', '南浔区', '', '', '', '', 3, 1, ''), ('330521', '3305', '00,33,3305', '德清县', '33', '浙江省', '3305', '湖州市', '330521', '德清县', '', '', '', '', 3, 1, ''), ('330522', '3305', '00,33,3305', '长兴县', '33', '浙江省', '3305', '湖州市', '330522', '长兴县', '', '', '', '', 3, 1, ''), ('330523', '3305', '00,33,3305', '安吉县', '33', '浙江省', '3305', '湖州市', '330523', '安吉县', '', '', '', '', 3, 1, ''), ('3306', '33', '00,33', '绍兴市', '33', '浙江省', '3306', '绍兴市', '', '', '', '', '', '', 2, 1, ''), ('330602', '3306', '00,33,3306', '越城区', '33', '浙江省', '3306', '绍兴市', '330602', '越城区', '', '', '', '', 3, 1, ''), ('330603', '3306', '00,33,3306', '柯桥区', '33', '浙江省', '3306', '绍兴市', '330603', '柯桥区', '', '', '', '', 3, 1, ''), ('330604', '3306', '00,33,3306', '上虞区', '33', '浙江省', '3306', '绍兴市', '330604', '上虞区', '', '', '', '', 3, 1, ''), ('330624', '3306', '00,33,3306', '新昌县', '33', '浙江省', '3306', '绍兴市', '330624', '新昌县', '', '', '', '', 3, 1, ''), ('330681', '3306', '00,33,3306', '诸暨市', '33', '浙江省', '3306', '绍兴市', '330681', '诸暨市', '', '', '', '', 3, 1, ''), ('330683', '3306', '00,33,3306', '嵊州市', '33', '浙江省', '3306', '绍兴市', '330683', '嵊州市', '', '', '', '', 3, 1, ''), ('3307', '33', '00,33', '金华市', '33', '浙江省', '3307', '金华市', '', '', '', '', '', '', 2, 1, ''), ('330702', '3307', '00,33,3307', '婺城区', '33', '浙江省', '3307', '金华市', '330702', '婺城区', '', '', '', '', 3, 1, ''), ('330703', '3307', '00,33,3307', '金东区', '33', '浙江省', '3307', '金华市', '330703', '金东区', '', '', '', '', 3, 1, ''), ('330723', '3307', '00,33,3307', '武义县', '33', '浙江省', '3307', '金华市', '330723', '武义县', '', '', '', '', 3, 1, ''), ('330726', '3307', '00,33,3307', '浦江县', '33', '浙江省', '3307', '金华市', '330726', '浦江县', '', '', '', '', 3, 1, ''), ('330727', '3307', '00,33,3307', '磐安县', '33', '浙江省', '3307', '金华市', '330727', '磐安县', '', '', '', '', 3, 1, ''), ('330781', '3307', '00,33,3307', '兰溪市', '33', '浙江省', '3307', '金华市', '330781', '兰溪市', '', '', '', '', 3, 1, ''), ('330782', '3307', '00,33,3307', '义乌市', '33', '浙江省', '3307', '金华市', '330782', '义乌市', '', '', '', '', 3, 1, ''), ('330783', '3307', '00,33,3307', '东阳市', '33', '浙江省', '3307', '金华市', '330783', '东阳市', '', '', '', '', 3, 1, ''), ('330784', '3307', '00,33,3307', '永康市', '33', '浙江省', '3307', '金华市', '330784', '永康市', '', '', '', '', 3, 1, ''), ('3308', '33', '00,33', '衢州市', '33', '浙江省', '3308', '衢州市', '', '', '', '', '', '', 2, 1, ''), ('330802', '3308', '00,33,3308', '柯城区', '33', '浙江省', '3308', '衢州市', '330802', '柯城区', '', '', '', '', 3, 1, ''), ('330803', '3308', '00,33,3308', '衢江区', '33', '浙江省', '3308', '衢州市', '330803', '衢江区', '', '', '', '', 3, 1, ''), ('330822', '3308', '00,33,3308', '常山县', '33', '浙江省', '3308', '衢州市', '330822', '常山县', '', '', '', '', 3, 1, ''), ('330824', '3308', '00,33,3308', '开化县', '33', '浙江省', '3308', '衢州市', '330824', '开化县', '', '', '', '', 3, 1, ''), ('330825', '3308', '00,33,3308', '龙游县', '33', '浙江省', '3308', '衢州市', '330825', '龙游县', '', '', '', '', 3, 1, ''), ('330881', '3308', '00,33,3308', '江山市', '33', '浙江省', '3308', '衢州市', '330881', '江山市', '', '', '', '', 3, 1, ''), ('3309', '33', '00,33', '舟山市', '33', '浙江省', '3309', '舟山市', '', '', '', '', '', '', 2, 1, ''), ('330902', '3309', '00,33,3309', '定海区', '33', '浙江省', '3309', '舟山市', '330902', '定海区', '', '', '', '', 3, 1, ''), ('330903', '3309', '00,33,3309', '普陀区', '33', '浙江省', '3309', '舟山市', '330903', '普陀区', '', '', '', '', 3, 1, ''), ('330921', '3309', '00,33,3309', '岱山县', '33', '浙江省', '3309', '舟山市', '330921', '岱山县', '', '', '', '', 3, 1, ''), ('330922', '3309', '00,33,3309', '嵊泗县', '33', '浙江省', '3309', '舟山市', '330922', '嵊泗县', '', '', '', '', 3, 1, ''), ('3310', '33', '00,33', '台州市', '33', '浙江省', '3310', '台州市', '', '', '', '', '', '', 2, 1, ''), ('331002', '3310', '00,33,3310', '椒江区', '33', '浙江省', '3310', '台州市', '331002', '椒江区', '', '', '', '', 3, 1, ''), ('331003', '3310', '00,33,3310', '黄岩区', '33', '浙江省', '3310', '台州市', '331003', '黄岩区', '', '', '', '', 3, 1, ''), ('331004', '3310', '00,33,3310', '路桥区', '33', '浙江省', '3310', '台州市', '331004', '路桥区', '', '', '', '', 3, 1, ''), ('331022', '3310', '00,33,3310', '三门县', '33', '浙江省', '3310', '台州市', '331022', '三门县', '', '', '', '', 3, 1, ''), ('331023', '3310', '00,33,3310', '天台县', '33', '浙江省', '3310', '台州市', '331023', '天台县', '', '', '', '', 3, 1, ''), ('331024', '3310', '00,33,3310', '仙居县', '33', '浙江省', '3310', '台州市', '331024', '仙居县', '', '', '', '', 3, 1, ''), ('331081', '3310', '00,33,3310', '温岭市', '33', '浙江省', '3310', '台州市', '331081', '温岭市', '', '', '', '', 3, 1, ''), ('331082', '3310', '00,33,3310', '临海市', '33', '浙江省', '3310', '台州市', '331082', '临海市', '', '', '', '', 3, 1, ''), ('331083', '3310', '00,33,3310', '玉环市', '33', '浙江省', '3310', '台州市', '331083', '玉环市', '', '', '', '', 3, 1, ''), ('3311', '33', '00,33', '丽水市', '33', '浙江省', '3311', '丽水市', '', '', '', '', '', '', 2, 1, ''), ('331102', '3311', '00,33,3311', '莲都区', '33', '浙江省', '3311', '丽水市', '331102', '莲都区', '', '', '', '', 3, 1, ''), ('331121', '3311', '00,33,3311', '青田县', '33', '浙江省', '3311', '丽水市', '331121', '青田县', '', '', '', '', 3, 1, ''), ('331122', '3311', '00,33,3311', '缙云县', '33', '浙江省', '3311', '丽水市', '331122', '缙云县', '', '', '', '', 3, 1, ''), ('331123', '3311', '00,33,3311', '遂昌县', '33', '浙江省', '3311', '丽水市', '331123', '遂昌县', '', '', '', '', 3, 1, ''), ('331124', '3311', '00,33,3311', '松阳县', '33', '浙江省', '3311', '丽水市', '331124', '松阳县', '', '', '', '', 3, 1, ''), ('331125', '3311', '00,33,3311', '云和县', '33', '浙江省', '3311', '丽水市', '331125', '云和县', '', '', '', '', 3, 1, ''), ('331126', '3311', '00,33,3311', '庆元县', '33', '浙江省', '3311', '丽水市', '331126', '庆元县', '', '', '', '', 3, 1, ''), ('331127', '3311', '00,33,3311', '景宁畲族自治县', '33', '浙江省', '3311', '丽水市', '331127', '景宁畲族自治县', '', '', '', '', 3, 1, ''), ('331181', '3311', '00,33,3311', '龙泉市', '33', '浙江省', '3311', '丽水市', '331181', '龙泉市', '', '', '', '', 3, 1, ''), ('34', '00', '00', '安徽省', '34', '安徽省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3401', '34', '00,34', '合肥市', '34', '安徽省', '3401', '合肥市', '', '', '', '', '', '', 2, 1, ''), ('340102', '3401', '00,34,3401', '瑶海区', '34', '安徽省', '3401', '合肥市', '340102', '瑶海区', '', '', '', '', 3, 1, ''), ('340103', '3401', '00,34,3401', '庐阳区', '34', '安徽省', '3401', '合肥市', '340103', '庐阳区', '', '', '', '', 3, 1, ''), ('340104', '3401', '00,34,3401', '蜀山区', '34', '安徽省', '3401', '合肥市', '340104', '蜀山区', '', '', '', '', 3, 1, ''), ('340111', '3401', '00,34,3401', '包河区', '34', '安徽省', '3401', '合肥市', '340111', '包河区', '', '', '', '', 3, 1, ''), ('340121', '3401', '00,34,3401', '长丰县', '34', '安徽省', '3401', '合肥市', '340121', '长丰县', '', '', '', '', 3, 1, ''), ('340122', '3401', '00,34,3401', '肥东县', '34', '安徽省', '3401', '合肥市', '340122', '肥东县', '', '', '', '', 3, 1, ''), ('340123', '3401', '00,34,3401', '肥西县', '34', '安徽省', '3401', '合肥市', '340123', '肥西县', '', '', '', '', 3, 1, ''), ('340124', '3401', '00,34,3401', '庐江县', '34', '安徽省', '3401', '合肥市', '340124', '庐江县', '', '', '', '', 3, 1, ''), ('340181', '3401', '00,34,3401', '巢湖市', '34', '安徽省', '3401', '合肥市', '340181', '巢湖市', '', '', '', '', 3, 1, ''), ('3402', '34', '00,34', '芜湖市', '34', '安徽省', '3402', '芜湖市', '', '', '', '', '', '', 2, 1, ''), ('340202', '3402', '00,34,3402', '镜湖区', '34', '安徽省', '3402', '芜湖市', '340202', '镜湖区', '', '', '', '', 3, 1, ''), ('340203', '3402', '00,34,3402', '弋江区', '34', '安徽省', '3402', '芜湖市', '340203', '弋江区', '', '', '', '', 3, 1, ''), ('340207', '3402', '00,34,3402', '鸠江区', '34', '安徽省', '3402', '芜湖市', '340207', '鸠江区', '', '', '', '', 3, 1, ''), ('340208', '3402', '00,34,3402', '三山区', '34', '安徽省', '3402', '芜湖市', '340208', '三山区', '', '', '', '', 3, 1, ''), ('340221', '3402', '00,34,3402', '芜湖县', '34', '安徽省', '3402', '芜湖市', '340221', '芜湖县', '', '', '', '', 3, 1, ''), ('340222', '3402', '00,34,3402', '繁昌县', '34', '安徽省', '3402', '芜湖市', '340222', '繁昌县', '', '', '', '', 3, 1, ''), ('340223', '3402', '00,34,3402', '南陵县', '34', '安徽省', '3402', '芜湖市', '340223', '南陵县', '', '', '', '', 3, 1, ''), ('340281', '3402', '00,34,3402', '无为市', '34', '安徽省', '3402', '芜湖市', '340281', '无为市', '', '', '', '', 3, 1, ''), ('3403', '34', '00,34', '蚌埠市', '34', '安徽省', '3403', '蚌埠市', '', '', '', '', '', '', 2, 1, ''), ('340302', '3403', '00,34,3403', '龙子湖区', '34', '安徽省', '3403', '蚌埠市', '340302', '龙子湖区', '', '', '', '', 3, 1, ''), ('340303', '3403', '00,34,3403', '蚌山区', '34', '安徽省', '3403', '蚌埠市', '340303', '蚌山区', '', '', '', '', 3, 1, ''), ('340304', '3403', '00,34,3403', '禹会区', '34', '安徽省', '3403', '蚌埠市', '340304', '禹会区', '', '', '', '', 3, 1, ''), ('340311', '3403', '00,34,3403', '淮上区', '34', '安徽省', '3403', '蚌埠市', '340311', '淮上区', '', '', '', '', 3, 1, ''), ('340321', '3403', '00,34,3403', '怀远县', '34', '安徽省', '3403', '蚌埠市', '340321', '怀远县', '', '', '', '', 3, 1, ''), ('340322', '3403', '00,34,3403', '五河县', '34', '安徽省', '3403', '蚌埠市', '340322', '五河县', '', '', '', '', 3, 1, ''), ('340323', '3403', '00,34,3403', '固镇县', '34', '安徽省', '3403', '蚌埠市', '340323', '固镇县', '', '', '', '', 3, 1, ''), ('3404', '34', '00,34', '淮南市', '34', '安徽省', '3404', '淮南市', '', '', '', '', '', '', 2, 1, ''), ('340402', '3404', '00,34,3404', '大通区', '34', '安徽省', '3404', '淮南市', '340402', '大通区', '', '', '', '', 3, 1, ''), ('340403', '3404', '00,34,3404', '田家庵区', '34', '安徽省', '3404', '淮南市', '340403', '田家庵区', '', '', '', '', 3, 1, ''), ('340404', '3404', '00,34,3404', '谢家集区', '34', '安徽省', '3404', '淮南市', '340404', '谢家集区', '', '', '', '', 3, 1, ''), ('340405', '3404', '00,34,3404', '八公山区', '34', '安徽省', '3404', '淮南市', '340405', '八公山区', '', '', '', '', 3, 1, ''), ('340406', '3404', '00,34,3404', '潘集区', '34', '安徽省', '3404', '淮南市', '340406', '潘集区', '', '', '', '', 3, 1, ''), ('340421', '3404', '00,34,3404', '凤台县', '34', '安徽省', '3404', '淮南市', '340421', '凤台县', '', '', '', '', 3, 1, ''), ('340422', '3404', '00,34,3404', '寿县', '34', '安徽省', '3404', '淮南市', '340422', '寿县', '', '', '', '', 3, 1, ''), ('3405', '34', '00,34', '马鞍山市', '34', '安徽省', '3405', '马鞍山市', '', '', '', '', '', '', 2, 1, ''), ('340503', '3405', '00,34,3405', '花山区', '34', '安徽省', '3405', '马鞍山市', '340503', '花山区', '', '', '', '', 3, 1, ''), ('340504', '3405', '00,34,3405', '雨山区', '34', '安徽省', '3405', '马鞍山市', '340504', '雨山区', '', '', '', '', 3, 1, ''), ('340506', '3405', '00,34,3405', '博望区', '34', '安徽省', '3405', '马鞍山市', '340506', '博望区', '', '', '', '', 3, 1, ''), ('340521', '3405', '00,34,3405', '当涂县', '34', '安徽省', '3405', '马鞍山市', '340521', '当涂县', '', '', '', '', 3, 1, ''), ('340522', '3405', '00,34,3405', '含山县', '34', '安徽省', '3405', '马鞍山市', '340522', '含山县', '', '', '', '', 3, 1, ''), ('340523', '3405', '00,34,3405', '和县', '34', '安徽省', '3405', '马鞍山市', '340523', '和县', '', '', '', '', 3, 1, ''), ('3406', '34', '00,34', '淮北市', '34', '安徽省', '3406', '淮北市', '', '', '', '', '', '', 2, 1, ''), ('340602', '3406', '00,34,3406', '杜集区', '34', '安徽省', '3406', '淮北市', '340602', '杜集区', '', '', '', '', 3, 1, ''), ('340603', '3406', '00,34,3406', '相山区', '34', '安徽省', '3406', '淮北市', '340603', '相山区', '', '', '', '', 3, 1, ''), ('340604', '3406', '00,34,3406', '烈山区', '34', '安徽省', '3406', '淮北市', '340604', '烈山区', '', '', '', '', 3, 1, ''), ('340621', '3406', '00,34,3406', '濉溪县', '34', '安徽省', '3406', '淮北市', '340621', '濉溪县', '', '', '', '', 3, 1, ''), ('3407', '34', '00,34', '铜陵市', '34', '安徽省', '3407', '铜陵市', '', '', '', '', '', '', 2, 1, ''), ('340705', '3407', '00,34,3407', '铜官区', '34', '安徽省', '3407', '铜陵市', '340705', '铜官区', '', '', '', '', 3, 1, ''), ('340706', '3407', '00,34,3407', '义安区', '34', '安徽省', '3407', '铜陵市', '340706', '义安区', '', '', '', '', 3, 1, ''), ('340711', '3407', '00,34,3407', '郊区', '34', '安徽省', '3407', '铜陵市', '340711', '郊区', '', '', '', '', 3, 1, ''), ('340722', '3407', '00,34,3407', '枞阳县', '34', '安徽省', '3407', '铜陵市', '340722', '枞阳县', '', '', '', '', 3, 1, ''), ('3408', '34', '00,34', '安庆市', '34', '安徽省', '3408', '安庆市', '', '', '', '', '', '', 2, 1, ''), ('340802', '3408', '00,34,3408', '迎江区', '34', '安徽省', '3408', '安庆市', '340802', '迎江区', '', '', '', '', 3, 1, ''), ('340803', '3408', '00,34,3408', '大观区', '34', '安徽省', '3408', '安庆市', '340803', '大观区', '', '', '', '', 3, 1, ''), ('340811', '3408', '00,34,3408', '宜秀区', '34', '安徽省', '3408', '安庆市', '340811', '宜秀区', '', '', '', '', 3, 1, ''), ('340822', '3408', '00,34,3408', '怀宁县', '34', '安徽省', '3408', '安庆市', '340822', '怀宁县', '', '', '', '', 3, 1, ''), ('340825', '3408', '00,34,3408', '太湖县', '34', '安徽省', '3408', '安庆市', '340825', '太湖县', '', '', '', '', 3, 1, ''), ('340826', '3408', '00,34,3408', '宿松县', '34', '安徽省', '3408', '安庆市', '340826', '宿松县', '', '', '', '', 3, 1, ''), ('340827', '3408', '00,34,3408', '望江县', '34', '安徽省', '3408', '安庆市', '340827', '望江县', '', '', '', '', 3, 1, ''), ('340828', '3408', '00,34,3408', '岳西县', '34', '安徽省', '3408', '安庆市', '340828', '岳西县', '', '', '', '', 3, 1, ''), ('340881', '3408', '00,34,3408', '桐城市', '34', '安徽省', '3408', '安庆市', '340881', '桐城市', '', '', '', '', 3, 1, ''), ('340882', '3408', '00,34,3408', '潜山市', '34', '安徽省', '3408', '安庆市', '340882', '潜山市', '', '', '', '', 3, 1, ''), ('3410', '34', '00,34', '黄山市', '34', '安徽省', '3410', '黄山市', '', '', '', '', '', '', 2, 1, ''), ('341002', '3410', '00,34,3410', '屯溪区', '34', '安徽省', '3410', '黄山市', '341002', '屯溪区', '', '', '', '', 3, 1, ''), ('341003', '3410', '00,34,3410', '黄山区', '34', '安徽省', '3410', '黄山市', '341003', '黄山区', '', '', '', '', 3, 1, ''), ('341004', '3410', '00,34,3410', '徽州区', '34', '安徽省', '3410', '黄山市', '341004', '徽州区', '', '', '', '', 3, 1, ''), ('341021', '3410', '00,34,3410', '歙县', '34', '安徽省', '3410', '黄山市', '341021', '歙县', '', '', '', '', 3, 1, ''), ('341022', '3410', '00,34,3410', '休宁县', '34', '安徽省', '3410', '黄山市', '341022', '休宁县', '', '', '', '', 3, 1, ''), ('341023', '3410', '00,34,3410', '黟县', '34', '安徽省', '3410', '黄山市', '341023', '黟县', '', '', '', '', 3, 1, ''), ('341024', '3410', '00,34,3410', '祁门县', '34', '安徽省', '3410', '黄山市', '341024', '祁门县', '', '', '', '', 3, 1, ''), ('3411', '34', '00,34', '滁州市', '34', '安徽省', '3411', '滁州市', '', '', '', '', '', '', 2, 1, ''), ('341102', '3411', '00,34,3411', '琅琊区', '34', '安徽省', '3411', '滁州市', '341102', '琅琊区', '', '', '', '', 3, 1, ''), ('341103', '3411', '00,34,3411', '南谯区', '34', '安徽省', '3411', '滁州市', '341103', '南谯区', '', '', '', '', 3, 1, ''), ('341122', '3411', '00,34,3411', '来安县', '34', '安徽省', '3411', '滁州市', '341122', '来安县', '', '', '', '', 3, 1, ''), ('341124', '3411', '00,34,3411', '全椒县', '34', '安徽省', '3411', '滁州市', '341124', '全椒县', '', '', '', '', 3, 1, ''), ('341125', '3411', '00,34,3411', '定远县', '34', '安徽省', '3411', '滁州市', '341125', '定远县', '', '', '', '', 3, 1, ''), ('341126', '3411', '00,34,3411', '凤阳县', '34', '安徽省', '3411', '滁州市', '341126', '凤阳县', '', '', '', '', 3, 1, ''), ('341181', '3411', '00,34,3411', '天长市', '34', '安徽省', '3411', '滁州市', '341181', '天长市', '', '', '', '', 3, 1, ''), ('341182', '3411', '00,34,3411', '明光市', '34', '安徽省', '3411', '滁州市', '341182', '明光市', '', '', '', '', 3, 1, ''), ('3412', '34', '00,34', '阜阳市', '34', '安徽省', '3412', '阜阳市', '', '', '', '', '', '', 2, 1, ''), ('341202', '3412', '00,34,3412', '颍州区', '34', '安徽省', '3412', '阜阳市', '341202', '颍州区', '', '', '', '', 3, 1, ''), ('341203', '3412', '00,34,3412', '颍东区', '34', '安徽省', '3412', '阜阳市', '341203', '颍东区', '', '', '', '', 3, 1, ''), ('341204', '3412', '00,34,3412', '颍泉区', '34', '安徽省', '3412', '阜阳市', '341204', '颍泉区', '', '', '', '', 3, 1, ''), ('341221', '3412', '00,34,3412', '临泉县', '34', '安徽省', '3412', '阜阳市', '341221', '临泉县', '', '', '', '', 3, 1, ''), ('341222', '3412', '00,34,3412', '太和县', '34', '安徽省', '3412', '阜阳市', '341222', '太和县', '', '', '', '', 3, 1, ''), ('341225', '3412', '00,34,3412', '阜南县', '34', '安徽省', '3412', '阜阳市', '341225', '阜南县', '', '', '', '', 3, 1, ''), ('341226', '3412', '00,34,3412', '颍上县', '34', '安徽省', '3412', '阜阳市', '341226', '颍上县', '', '', '', '', 3, 1, ''), ('341282', '3412', '00,34,3412', '界首市', '34', '安徽省', '3412', '阜阳市', '341282', '界首市', '', '', '', '', 3, 1, ''), ('3413', '34', '00,34', '宿州市', '34', '安徽省', '3413', '宿州市', '', '', '', '', '', '', 2, 1, ''), ('341302', '3413', '00,34,3413', '埇桥区', '34', '安徽省', '3413', '宿州市', '341302', '埇桥区', '', '', '', '', 3, 1, ''), ('341321', '3413', '00,34,3413', '砀山县', '34', '安徽省', '3413', '宿州市', '341321', '砀山县', '', '', '', '', 3, 1, ''), ('341322', '3413', '00,34,3413', '萧县', '34', '安徽省', '3413', '宿州市', '341322', '萧县', '', '', '', '', 3, 1, ''), ('341323', '3413', '00,34,3413', '灵璧县', '34', '安徽省', '3413', '宿州市', '341323', '灵璧县', '', '', '', '', 3, 1, ''), ('341324', '3413', '00,34,3413', '泗县', '34', '安徽省', '3413', '宿州市', '341324', '泗县', '', '', '', '', 3, 1, ''), ('3415', '34', '00,34', '六安市', '34', '安徽省', '3415', '六安市', '', '', '', '', '', '', 2, 1, ''), ('341502', '3415', '00,34,3415', '金安区', '34', '安徽省', '3415', '六安市', '341502', '金安区', '', '', '', '', 3, 1, ''), ('341503', '3415', '00,34,3415', '裕安区', '34', '安徽省', '3415', '六安市', '341503', '裕安区', '', '', '', '', 3, 1, ''), ('341504', '3415', '00,34,3415', '叶集区', '34', '安徽省', '3415', '六安市', '341504', '叶集区', '', '', '', '', 3, 1, ''), ('341522', '3415', '00,34,3415', '霍邱县', '34', '安徽省', '3415', '六安市', '341522', '霍邱县', '', '', '', '', 3, 1, ''), ('341523', '3415', '00,34,3415', '舒城县', '34', '安徽省', '3415', '六安市', '341523', '舒城县', '', '', '', '', 3, 1, ''), ('341524', '3415', '00,34,3415', '金寨县', '34', '安徽省', '3415', '六安市', '341524', '金寨县', '', '', '', '', 3, 1, ''), ('341525', '3415', '00,34,3415', '霍山县', '34', '安徽省', '3415', '六安市', '341525', '霍山县', '', '', '', '', 3, 1, ''), ('3416', '34', '00,34', '亳州市', '34', '安徽省', '3416', '亳州市', '', '', '', '', '', '', 2, 1, ''), ('341602', '3416', '00,34,3416', '谯城区', '34', '安徽省', '3416', '亳州市', '341602', '谯城区', '', '', '', '', 3, 1, ''), ('341621', '3416', '00,34,3416', '涡阳县', '34', '安徽省', '3416', '亳州市', '341621', '涡阳县', '', '', '', '', 3, 1, ''), ('341622', '3416', '00,34,3416', '蒙城县', '34', '安徽省', '3416', '亳州市', '341622', '蒙城县', '', '', '', '', 3, 1, ''), ('341623', '3416', '00,34,3416', '利辛县', '34', '安徽省', '3416', '亳州市', '341623', '利辛县', '', '', '', '', 3, 1, ''), ('3417', '34', '00,34', '池州市', '34', '安徽省', '3417', '池州市', '', '', '', '', '', '', 2, 1, ''), ('341702', '3417', '00,34,3417', '贵池区', '34', '安徽省', '3417', '池州市', '341702', '贵池区', '', '', '', '', 3, 1, ''), ('341721', '3417', '00,34,3417', '东至县', '34', '安徽省', '3417', '池州市', '341721', '东至县', '', '', '', '', 3, 1, ''), ('341722', '3417', '00,34,3417', '石台县', '34', '安徽省', '3417', '池州市', '341722', '石台县', '', '', '', '', 3, 1, ''), ('341723', '3417', '00,34,3417', '青阳县', '34', '安徽省', '3417', '池州市', '341723', '青阳县', '', '', '', '', 3, 1, ''), ('3418', '34', '00,34', '宣城市', '34', '安徽省', '3418', '宣城市', '', '', '', '', '', '', 2, 1, ''), ('341802', '3418', '00,34,3418', '宣州区', '34', '安徽省', '3418', '宣城市', '341802', '宣州区', '', '', '', '', 3, 1, ''), ('341821', '3418', '00,34,3418', '郎溪县', '34', '安徽省', '3418', '宣城市', '341821', '郎溪县', '', '', '', '', 3, 1, ''), ('341823', '3418', '00,34,3418', '泾县', '34', '安徽省', '3418', '宣城市', '341823', '泾县', '', '', '', '', 3, 1, ''), ('341824', '3418', '00,34,3418', '绩溪县', '34', '安徽省', '3418', '宣城市', '341824', '绩溪县', '', '', '', '', 3, 1, ''), ('341825', '3418', '00,34,3418', '旌德县', '34', '安徽省', '3418', '宣城市', '341825', '旌德县', '', '', '', '', 3, 1, ''), ('341881', '3418', '00,34,3418', '宁国市', '34', '安徽省', '3418', '宣城市', '341881', '宁国市', '', '', '', '', 3, 1, ''), ('341882', '3418', '00,34,3418', '广德市', '34', '安徽省', '3418', '宣城市', '341882', '广德市', '', '', '', '', 3, 1, ''), ('35', '00', '00', '福建省', '35', '福建省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3501', '35', '00,35', '福州市', '35', '福建省', '3501', '福州市', '', '', '', '', '', '', 2, 1, ''), ('350102', '3501', '00,35,3501', '鼓楼区', '35', '福建省', '3501', '福州市', '350102', '鼓楼区', '', '', '', '', 3, 1, ''), ('350103', '3501', '00,35,3501', '台江区', '35', '福建省', '3501', '福州市', '350103', '台江区', '', '', '', '', 3, 1, ''), ('350104', '3501', '00,35,3501', '仓山区', '35', '福建省', '3501', '福州市', '350104', '仓山区', '', '', '', '', 3, 1, ''), ('350105', '3501', '00,35,3501', '马尾区', '35', '福建省', '3501', '福州市', '350105', '马尾区', '', '', '', '', 3, 1, ''), ('350111', '3501', '00,35,3501', '晋安区', '35', '福建省', '3501', '福州市', '350111', '晋安区', '', '', '', '', 3, 1, ''), ('350112', '3501', '00,35,3501', '长乐区', '35', '福建省', '3501', '福州市', '350112', '长乐区', '', '', '', '', 3, 1, ''), ('350121', '3501', '00,35,3501', '闽侯县', '35', '福建省', '3501', '福州市', '350121', '闽侯县', '', '', '', '', 3, 1, ''), ('350122', '3501', '00,35,3501', '连江县', '35', '福建省', '3501', '福州市', '350122', '连江县', '', '', '', '', 3, 1, ''), ('350123', '3501', '00,35,3501', '罗源县', '35', '福建省', '3501', '福州市', '350123', '罗源县', '', '', '', '', 3, 1, ''), ('350124', '3501', '00,35,3501', '闽清县', '35', '福建省', '3501', '福州市', '350124', '闽清县', '', '', '', '', 3, 1, ''), ('350125', '3501', '00,35,3501', '永泰县', '35', '福建省', '3501', '福州市', '350125', '永泰县', '', '', '', '', 3, 1, ''), ('350128', '3501', '00,35,3501', '平潭县', '35', '福建省', '3501', '福州市', '350128', '平潭县', '', '', '', '', 3, 1, ''), ('350181', '3501', '00,35,3501', '福清市', '35', '福建省', '3501', '福州市', '350181', '福清市', '', '', '', '', 3, 1, ''), ('3502', '35', '00,35', '厦门市', '35', '福建省', '3502', '厦门市', '', '', '', '', '', '', 2, 1, ''), ('350203', '3502', '00,35,3502', '思明区', '35', '福建省', '3502', '厦门市', '350203', '思明区', '', '', '', '', 3, 1, ''), ('350205', '3502', '00,35,3502', '海沧区', '35', '福建省', '3502', '厦门市', '350205', '海沧区', '', '', '', '', 3, 1, ''), ('350206', '3502', '00,35,3502', '湖里区', '35', '福建省', '3502', '厦门市', '350206', '湖里区', '', '', '', '', 3, 1, ''), ('350211', '3502', '00,35,3502', '集美区', '35', '福建省', '3502', '厦门市', '350211', '集美区', '', '', '', '', 3, 1, ''), ('350212', '3502', '00,35,3502', '同安区', '35', '福建省', '3502', '厦门市', '350212', '同安区', '', '', '', '', 3, 1, ''), ('350213', '3502', '00,35,3502', '翔安区', '35', '福建省', '3502', '厦门市', '350213', '翔安区', '', '', '', '', 3, 1, ''), ('3503', '35', '00,35', '莆田市', '35', '福建省', '3503', '莆田市', '', '', '', '', '', '', 2, 1, ''), ('350302', '3503', '00,35,3503', '城厢区', '35', '福建省', '3503', '莆田市', '350302', '城厢区', '', '', '', '', 3, 1, ''), ('350303', '3503', '00,35,3503', '涵江区', '35', '福建省', '3503', '莆田市', '350303', '涵江区', '', '', '', '', 3, 1, ''), ('350304', '3503', '00,35,3503', '荔城区', '35', '福建省', '3503', '莆田市', '350304', '荔城区', '', '', '', '', 3, 1, ''), ('350305', '3503', '00,35,3503', '秀屿区', '35', '福建省', '3503', '莆田市', '350305', '秀屿区', '', '', '', '', 3, 1, ''), ('350322', '3503', '00,35,3503', '仙游县', '35', '福建省', '3503', '莆田市', '350322', '仙游县', '', '', '', '', 3, 1, ''), ('3504', '35', '00,35', '三明市', '35', '福建省', '3504', '三明市', '', '', '', '', '', '', 2, 1, ''), ('350402', '3504', '00,35,3504', '梅列区', '35', '福建省', '3504', '三明市', '350402', '梅列区', '', '', '', '', 3, 1, ''), ('350403', '3504', '00,35,3504', '三元区', '35', '福建省', '3504', '三明市', '350403', '三元区', '', '', '', '', 3, 1, ''), ('350421', '3504', '00,35,3504', '明溪县', '35', '福建省', '3504', '三明市', '350421', '明溪县', '', '', '', '', 3, 1, ''), ('350423', '3504', '00,35,3504', '清流县', '35', '福建省', '3504', '三明市', '350423', '清流县', '', '', '', '', 3, 1, ''), ('350424', '3504', '00,35,3504', '宁化县', '35', '福建省', '3504', '三明市', '350424', '宁化县', '', '', '', '', 3, 1, ''), ('350425', '3504', '00,35,3504', '大田县', '35', '福建省', '3504', '三明市', '350425', '大田县', '', '', '', '', 3, 1, ''), ('350426', '3504', '00,35,3504', '尤溪县', '35', '福建省', '3504', '三明市', '350426', '尤溪县', '', '', '', '', 3, 1, ''), ('350427', '3504', '00,35,3504', '沙县', '35', '福建省', '3504', '三明市', '350427', '沙县', '', '', '', '', 3, 1, ''), ('350428', '3504', '00,35,3504', '将乐县', '35', '福建省', '3504', '三明市', '350428', '将乐县', '', '', '', '', 3, 1, ''), ('350429', '3504', '00,35,3504', '泰宁县', '35', '福建省', '3504', '三明市', '350429', '泰宁县', '', '', '', '', 3, 1, ''), ('350430', '3504', '00,35,3504', '建宁县', '35', '福建省', '3504', '三明市', '350430', '建宁县', '', '', '', '', 3, 1, ''), ('350481', '3504', '00,35,3504', '永安市', '35', '福建省', '3504', '三明市', '350481', '永安市', '', '', '', '', 3, 1, ''), ('3505', '35', '00,35', '泉州市', '35', '福建省', '3505', '泉州市', '', '', '', '', '', '', 2, 1, ''), ('350502', '3505', '00,35,3505', '鲤城区', '35', '福建省', '3505', '泉州市', '350502', '鲤城区', '', '', '', '', 3, 1, ''), ('350503', '3505', '00,35,3505', '丰泽区', '35', '福建省', '3505', '泉州市', '350503', '丰泽区', '', '', '', '', 3, 1, ''), ('350504', '3505', '00,35,3505', '洛江区', '35', '福建省', '3505', '泉州市', '350504', '洛江区', '', '', '', '', 3, 1, ''), ('350505', '3505', '00,35,3505', '泉港区', '35', '福建省', '3505', '泉州市', '350505', '泉港区', '', '', '', '', 3, 1, ''), ('350521', '3505', '00,35,3505', '惠安县', '35', '福建省', '3505', '泉州市', '350521', '惠安县', '', '', '', '', 3, 1, ''), ('350524', '3505', '00,35,3505', '安溪县', '35', '福建省', '3505', '泉州市', '350524', '安溪县', '', '', '', '', 3, 1, ''), ('350525', '3505', '00,35,3505', '永春县', '35', '福建省', '3505', '泉州市', '350525', '永春县', '', '', '', '', 3, 1, ''), ('350526', '3505', '00,35,3505', '德化县', '35', '福建省', '3505', '泉州市', '350526', '德化县', '', '', '', '', 3, 1, ''), ('350527', '3505', '00,35,3505', '金门县', '35', '福建省', '3505', '泉州市', '350527', '金门县', '', '', '', '', 3, 1, ''), ('350581', '3505', '00,35,3505', '石狮市', '35', '福建省', '3505', '泉州市', '350581', '石狮市', '', '', '', '', 3, 1, ''), ('350582', '3505', '00,35,3505', '晋江市', '35', '福建省', '3505', '泉州市', '350582', '晋江市', '', '', '', '', 3, 1, ''), ('350583', '3505', '00,35,3505', '南安市', '35', '福建省', '3505', '泉州市', '350583', '南安市', '', '', '', '', 3, 1, ''), ('3506', '35', '00,35', '漳州市', '35', '福建省', '3506', '漳州市', '', '', '', '', '', '', 2, 1, ''), ('350602', '3506', '00,35,3506', '芗城区', '35', '福建省', '3506', '漳州市', '350602', '芗城区', '', '', '', '', 3, 1, ''), ('350603', '3506', '00,35,3506', '龙文区', '35', '福建省', '3506', '漳州市', '350603', '龙文区', '', '', '', '', 3, 1, ''), ('350622', '3506', '00,35,3506', '云霄县', '35', '福建省', '3506', '漳州市', '350622', '云霄县', '', '', '', '', 3, 1, ''), ('350623', '3506', '00,35,3506', '漳浦县', '35', '福建省', '3506', '漳州市', '350623', '漳浦县', '', '', '', '', 3, 1, ''), ('350624', '3506', '00,35,3506', '诏安县', '35', '福建省', '3506', '漳州市', '350624', '诏安县', '', '', '', '', 3, 1, ''), ('350625', '3506', '00,35,3506', '长泰县', '35', '福建省', '3506', '漳州市', '350625', '长泰县', '', '', '', '', 3, 1, ''), ('350626', '3506', '00,35,3506', '东山县', '35', '福建省', '3506', '漳州市', '350626', '东山县', '', '', '', '', 3, 1, ''), ('350627', '3506', '00,35,3506', '南靖县', '35', '福建省', '3506', '漳州市', '350627', '南靖县', '', '', '', '', 3, 1, ''), ('350628', '3506', '00,35,3506', '平和县', '35', '福建省', '3506', '漳州市', '350628', '平和县', '', '', '', '', 3, 1, ''), ('350629', '3506', '00,35,3506', '华安县', '35', '福建省', '3506', '漳州市', '350629', '华安县', '', '', '', '', 3, 1, ''), ('350681', '3506', '00,35,3506', '龙海市', '35', '福建省', '3506', '漳州市', '350681', '龙海市', '', '', '', '', 3, 1, ''), ('3507', '35', '00,35', '南平市', '35', '福建省', '3507', '南平市', '', '', '', '', '', '', 2, 1, ''), ('350702', '3507', '00,35,3507', '延平区', '35', '福建省', '3507', '南平市', '350702', '延平区', '', '', '', '', 3, 1, ''), ('350703', '3507', '00,35,3507', '建阳区', '35', '福建省', '3507', '南平市', '350703', '建阳区', '', '', '', '', 3, 1, ''), ('350721', '3507', '00,35,3507', '顺昌县', '35', '福建省', '3507', '南平市', '350721', '顺昌县', '', '', '', '', 3, 1, ''), ('350722', '3507', '00,35,3507', '浦城县', '35', '福建省', '3507', '南平市', '350722', '浦城县', '', '', '', '', 3, 1, ''), ('350723', '3507', '00,35,3507', '光泽县', '35', '福建省', '3507', '南平市', '350723', '光泽县', '', '', '', '', 3, 1, ''), ('350724', '3507', '00,35,3507', '松溪县', '35', '福建省', '3507', '南平市', '350724', '松溪县', '', '', '', '', 3, 1, ''), ('350725', '3507', '00,35,3507', '政和县', '35', '福建省', '3507', '南平市', '350725', '政和县', '', '', '', '', 3, 1, ''), ('350781', '3507', '00,35,3507', '邵武市', '35', '福建省', '3507', '南平市', '350781', '邵武市', '', '', '', '', 3, 1, ''), ('350782', '3507', '00,35,3507', '武夷山市', '35', '福建省', '3507', '南平市', '350782', '武夷山市', '', '', '', '', 3, 1, ''), ('350783', '3507', '00,35,3507', '建瓯市', '35', '福建省', '3507', '南平市', '350783', '建瓯市', '', '', '', '', 3, 1, ''), ('3508', '35', '00,35', '龙岩市', '35', '福建省', '3508', '龙岩市', '', '', '', '', '', '', 2, 1, ''), ('350802', '3508', '00,35,3508', '新罗区', '35', '福建省', '3508', '龙岩市', '350802', '新罗区', '', '', '', '', 3, 1, ''), ('350803', '3508', '00,35,3508', '永定区', '35', '福建省', '3508', '龙岩市', '350803', '永定区', '', '', '', '', 3, 1, ''), ('350821', '3508', '00,35,3508', '长汀县', '35', '福建省', '3508', '龙岩市', '350821', '长汀县', '', '', '', '', 3, 1, ''), ('350823', '3508', '00,35,3508', '上杭县', '35', '福建省', '3508', '龙岩市', '350823', '上杭县', '', '', '', '', 3, 1, ''), ('350824', '3508', '00,35,3508', '武平县', '35', '福建省', '3508', '龙岩市', '350824', '武平县', '', '', '', '', 3, 1, ''), ('350825', '3508', '00,35,3508', '连城县', '35', '福建省', '3508', '龙岩市', '350825', '连城县', '', '', '', '', 3, 1, ''), ('350881', '3508', '00,35,3508', '漳平市', '35', '福建省', '3508', '龙岩市', '350881', '漳平市', '', '', '', '', 3, 1, ''), ('3509', '35', '00,35', '宁德市', '35', '福建省', '3509', '宁德市', '', '', '', '', '', '', 2, 1, ''), ('350902', '3509', '00,35,3509', '蕉城区', '35', '福建省', '3509', '宁德市', '350902', '蕉城区', '', '', '', '', 3, 1, ''), ('350921', '3509', '00,35,3509', '霞浦县', '35', '福建省', '3509', '宁德市', '350921', '霞浦县', '', '', '', '', 3, 1, ''), ('350922', '3509', '00,35,3509', '古田县', '35', '福建省', '3509', '宁德市', '350922', '古田县', '', '', '', '', 3, 1, ''), ('350923', '3509', '00,35,3509', '屏南县', '35', '福建省', '3509', '宁德市', '350923', '屏南县', '', '', '', '', 3, 1, ''), ('350924', '3509', '00,35,3509', '寿宁县', '35', '福建省', '3509', '宁德市', '350924', '寿宁县', '', '', '', '', 3, 1, ''), ('350925', '3509', '00,35,3509', '周宁县', '35', '福建省', '3509', '宁德市', '350925', '周宁县', '', '', '', '', 3, 1, ''), ('350926', '3509', '00,35,3509', '柘荣县', '35', '福建省', '3509', '宁德市', '350926', '柘荣县', '', '', '', '', 3, 1, ''), ('350981', '3509', '00,35,3509', '福安市', '35', '福建省', '3509', '宁德市', '350981', '福安市', '', '', '', '', 3, 1, ''), ('350982', '3509', '00,35,3509', '福鼎市', '35', '福建省', '3509', '宁德市', '350982', '福鼎市', '', '', '', '', 3, 1, ''), ('36', '00', '00', '江西省', '36', '江西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3601', '36', '00,36', '南昌市', '36', '江西省', '3601', '南昌市', '', '', '', '', '', '', 2, 1, ''), ('360102', '3601', '00,36,3601', '东湖区', '36', '江西省', '3601', '南昌市', '360102', '东湖区', '', '', '', '', 3, 1, ''), ('360103', '3601', '00,36,3601', '西湖区', '36', '江西省', '3601', '南昌市', '360103', '西湖区', '', '', '', '', 3, 1, ''), ('360104', '3601', '00,36,3601', '青云谱区', '36', '江西省', '3601', '南昌市', '360104', '青云谱区', '', '', '', '', 3, 1, ''), ('360111', '3601', '00,36,3601', '青山湖区', '36', '江西省', '3601', '南昌市', '360111', '青山湖区', '', '', '', '', 3, 1, ''), ('360112', '3601', '00,36,3601', '新建区', '36', '江西省', '3601', '南昌市', '360112', '新建区', '', '', '', '', 3, 1, ''), ('360113', '3601', '00,36,3601', '红谷滩区', '36', '江西省', '3601', '南昌市', '360113', '红谷滩区', '', '', '', '', 3, 1, ''), ('360121', '3601', '00,36,3601', '南昌县', '36', '江西省', '3601', '南昌市', '360121', '南昌县', '', '', '', '', 3, 1, ''), ('360123', '3601', '00,36,3601', '安义县', '36', '江西省', '3601', '南昌市', '360123', '安义县', '', '', '', '', 3, 1, ''), ('360124', '3601', '00,36,3601', '进贤县', '36', '江西省', '3601', '南昌市', '360124', '进贤县', '', '', '', '', 3, 1, ''), ('3602', '36', '00,36', '景德镇市', '36', '江西省', '3602', '景德镇市', '', '', '', '', '', '', 2, 1, ''), ('360202', '3602', '00,36,3602', '昌江区', '36', '江西省', '3602', '景德镇市', '360202', '昌江区', '', '', '', '', 3, 1, ''), ('360203', '3602', '00,36,3602', '珠山区', '36', '江西省', '3602', '景德镇市', '360203', '珠山区', '', '', '', '', 3, 1, ''), ('360222', '3602', '00,36,3602', '浮梁县', '36', '江西省', '3602', '景德镇市', '360222', '浮梁县', '', '', '', '', 3, 1, ''), ('360281', '3602', '00,36,3602', '乐平市', '36', '江西省', '3602', '景德镇市', '360281', '乐平市', '', '', '', '', 3, 1, ''), ('3603', '36', '00,36', '萍乡市', '36', '江西省', '3603', '萍乡市', '', '', '', '', '', '', 2, 1, ''), ('360302', '3603', '00,36,3603', '安源区', '36', '江西省', '3603', '萍乡市', '360302', '安源区', '', '', '', '', 3, 1, ''), ('360313', '3603', '00,36,3603', '湘东区', '36', '江西省', '3603', '萍乡市', '360313', '湘东区', '', '', '', '', 3, 1, ''), ('360321', '3603', '00,36,3603', '莲花县', '36', '江西省', '3603', '萍乡市', '360321', '莲花县', '', '', '', '', 3, 1, ''), ('360322', '3603', '00,36,3603', '上栗县', '36', '江西省', '3603', '萍乡市', '360322', '上栗县', '', '', '', '', 3, 1, ''), ('360323', '3603', '00,36,3603', '芦溪县', '36', '江西省', '3603', '萍乡市', '360323', '芦溪县', '', '', '', '', 3, 1, ''), ('3604', '36', '00,36', '九江市', '36', '江西省', '3604', '九江市', '', '', '', '', '', '', 2, 1, ''), ('360402', '3604', '00,36,3604', '濂溪区', '36', '江西省', '3604', '九江市', '360402', '濂溪区', '', '', '', '', 3, 1, ''), ('360403', '3604', '00,36,3604', '浔阳区', '36', '江西省', '3604', '九江市', '360403', '浔阳区', '', '', '', '', 3, 1, ''), ('360404', '3604', '00,36,3604', '柴桑区', '36', '江西省', '3604', '九江市', '360404', '柴桑区', '', '', '', '', 3, 1, ''), ('360423', '3604', '00,36,3604', '武宁县', '36', '江西省', '3604', '九江市', '360423', '武宁县', '', '', '', '', 3, 1, ''), ('360424', '3604', '00,36,3604', '修水县', '36', '江西省', '3604', '九江市', '360424', '修水县', '', '', '', '', 3, 1, ''), ('360425', '3604', '00,36,3604', '永修县', '36', '江西省', '3604', '九江市', '360425', '永修县', '', '', '', '', 3, 1, ''), ('360426', '3604', '00,36,3604', '德安县', '36', '江西省', '3604', '九江市', '360426', '德安县', '', '', '', '', 3, 1, ''), ('360428', '3604', '00,36,3604', '都昌县', '36', '江西省', '3604', '九江市', '360428', '都昌县', '', '', '', '', 3, 1, ''), ('360429', '3604', '00,36,3604', '湖口县', '36', '江西省', '3604', '九江市', '360429', '湖口县', '', '', '', '', 3, 1, ''), ('360430', '3604', '00,36,3604', '彭泽县', '36', '江西省', '3604', '九江市', '360430', '彭泽县', '', '', '', '', 3, 1, ''), ('360481', '3604', '00,36,3604', '瑞昌市', '36', '江西省', '3604', '九江市', '360481', '瑞昌市', '', '', '', '', 3, 1, ''), ('360482', '3604', '00,36,3604', '共青城市', '36', '江西省', '3604', '九江市', '360482', '共青城市', '', '', '', '', 3, 1, ''), ('360483', '3604', '00,36,3604', '庐山市', '36', '江西省', '3604', '九江市', '360483', '庐山市', '', '', '', '', 3, 1, ''), ('3605', '36', '00,36', '新余市', '36', '江西省', '3605', '新余市', '', '', '', '', '', '', 2, 1, ''), ('360502', '3605', '00,36,3605', '渝水区', '36', '江西省', '3605', '新余市', '360502', '渝水区', '', '', '', '', 3, 1, ''), ('360521', '3605', '00,36,3605', '分宜县', '36', '江西省', '3605', '新余市', '360521', '分宜县', '', '', '', '', 3, 1, ''), ('3606', '36', '00,36', '鹰潭市', '36', '江西省', '3606', '鹰潭市', '', '', '', '', '', '', 2, 1, ''), ('360602', '3606', '00,36,3606', '月湖区', '36', '江西省', '3606', '鹰潭市', '360602', '月湖区', '', '', '', '', 3, 1, ''), ('360603', '3606', '00,36,3606', '余江区', '36', '江西省', '3606', '鹰潭市', '360603', '余江区', '', '', '', '', 3, 1, ''), ('360681', '3606', '00,36,3606', '贵溪市', '36', '江西省', '3606', '鹰潭市', '360681', '贵溪市', '', '', '', '', 3, 1, ''), ('3607', '36', '00,36', '赣州市', '36', '江西省', '3607', '赣州市', '', '', '', '', '', '', 2, 1, ''), ('360702', '3607', '00,36,3607', '章贡区', '36', '江西省', '3607', '赣州市', '360702', '章贡区', '', '', '', '', 3, 1, ''), ('360703', '3607', '00,36,3607', '南康区', '36', '江西省', '3607', '赣州市', '360703', '南康区', '', '', '', '', 3, 1, ''), ('360704', '3607', '00,36,3607', '赣县区', '36', '江西省', '3607', '赣州市', '360704', '赣县区', '', '', '', '', 3, 1, ''), ('360722', '3607', '00,36,3607', '信丰县', '36', '江西省', '3607', '赣州市', '360722', '信丰县', '', '', '', '', 3, 1, ''), ('360723', '3607', '00,36,3607', '大余县', '36', '江西省', '3607', '赣州市', '360723', '大余县', '', '', '', '', 3, 1, ''), ('360724', '3607', '00,36,3607', '上犹县', '36', '江西省', '3607', '赣州市', '360724', '上犹县', '', '', '', '', 3, 1, ''), ('360725', '3607', '00,36,3607', '崇义县', '36', '江西省', '3607', '赣州市', '360725', '崇义县', '', '', '', '', 3, 1, ''), ('360726', '3607', '00,36,3607', '安远县', '36', '江西省', '3607', '赣州市', '360726', '安远县', '', '', '', '', 3, 1, ''), ('360727', '3607', '00,36,3607', '龙南县', '36', '江西省', '3607', '赣州市', '360727', '龙南县', '', '', '', '', 3, 1, ''), ('360728', '3607', '00,36,3607', '定南县', '36', '江西省', '3607', '赣州市', '360728', '定南县', '', '', '', '', 3, 1, ''), ('360729', '3607', '00,36,3607', '全南县', '36', '江西省', '3607', '赣州市', '360729', '全南县', '', '', '', '', 3, 1, ''), ('360730', '3607', '00,36,3607', '宁都县', '36', '江西省', '3607', '赣州市', '360730', '宁都县', '', '', '', '', 3, 1, ''), ('360731', '3607', '00,36,3607', '于都县', '36', '江西省', '3607', '赣州市', '360731', '于都县', '', '', '', '', 3, 1, ''), ('360732', '3607', '00,36,3607', '兴国县', '36', '江西省', '3607', '赣州市', '360732', '兴国县', '', '', '', '', 3, 1, ''), ('360733', '3607', '00,36,3607', '会昌县', '36', '江西省', '3607', '赣州市', '360733', '会昌县', '', '', '', '', 3, 1, ''), ('360734', '3607', '00,36,3607', '寻乌县', '36', '江西省', '3607', '赣州市', '360734', '寻乌县', '', '', '', '', 3, 1, ''), ('360735', '3607', '00,36,3607', '石城县', '36', '江西省', '3607', '赣州市', '360735', '石城县', '', '', '', '', 3, 1, ''), ('360781', '3607', '00,36,3607', '瑞金市', '36', '江西省', '3607', '赣州市', '360781', '瑞金市', '', '', '', '', 3, 1, ''), ('3608', '36', '00,36', '吉安市', '36', '江西省', '3608', '吉安市', '', '', '', '', '', '', 2, 1, ''), ('360802', '3608', '00,36,3608', '吉州区', '36', '江西省', '3608', '吉安市', '360802', '吉州区', '', '', '', '', 3, 1, ''), ('360803', '3608', '00,36,3608', '青原区', '36', '江西省', '3608', '吉安市', '360803', '青原区', '', '', '', '', 3, 1, ''), ('360821', '3608', '00,36,3608', '吉安县', '36', '江西省', '3608', '吉安市', '360821', '吉安县', '', '', '', '', 3, 1, ''), ('360822', '3608', '00,36,3608', '吉水县', '36', '江西省', '3608', '吉安市', '360822', '吉水县', '', '', '', '', 3, 1, ''), ('360823', '3608', '00,36,3608', '峡江县', '36', '江西省', '3608', '吉安市', '360823', '峡江县', '', '', '', '', 3, 1, ''), ('360824', '3608', '00,36,3608', '新干县', '36', '江西省', '3608', '吉安市', '360824', '新干县', '', '', '', '', 3, 1, ''), ('360825', '3608', '00,36,3608', '永丰县', '36', '江西省', '3608', '吉安市', '360825', '永丰县', '', '', '', '', 3, 1, ''), ('360826', '3608', '00,36,3608', '泰和县', '36', '江西省', '3608', '吉安市', '360826', '泰和县', '', '', '', '', 3, 1, ''), ('360827', '3608', '00,36,3608', '遂川县', '36', '江西省', '3608', '吉安市', '360827', '遂川县', '', '', '', '', 3, 1, ''), ('360828', '3608', '00,36,3608', '万安县', '36', '江西省', '3608', '吉安市', '360828', '万安县', '', '', '', '', 3, 1, ''), ('360829', '3608', '00,36,3608', '安福县', '36', '江西省', '3608', '吉安市', '360829', '安福县', '', '', '', '', 3, 1, ''), ('360830', '3608', '00,36,3608', '永新县', '36', '江西省', '3608', '吉安市', '360830', '永新县', '', '', '', '', 3, 1, ''), ('360881', '3608', '00,36,3608', '井冈山市', '36', '江西省', '3608', '吉安市', '360881', '井冈山市', '', '', '', '', 3, 1, ''), ('3609', '36', '00,36', '宜春市', '36', '江西省', '3609', '宜春市', '', '', '', '', '', '', 2, 1, ''), ('360902', '3609', '00,36,3609', '袁州区', '36', '江西省', '3609', '宜春市', '360902', '袁州区', '', '', '', '', 3, 1, ''), ('360921', '3609', '00,36,3609', '奉新县', '36', '江西省', '3609', '宜春市', '360921', '奉新县', '', '', '', '', 3, 1, ''), ('360922', '3609', '00,36,3609', '万载县', '36', '江西省', '3609', '宜春市', '360922', '万载县', '', '', '', '', 3, 1, ''), ('360923', '3609', '00,36,3609', '上高县', '36', '江西省', '3609', '宜春市', '360923', '上高县', '', '', '', '', 3, 1, ''), ('360924', '3609', '00,36,3609', '宜丰县', '36', '江西省', '3609', '宜春市', '360924', '宜丰县', '', '', '', '', 3, 1, ''), ('360925', '3609', '00,36,3609', '靖安县', '36', '江西省', '3609', '宜春市', '360925', '靖安县', '', '', '', '', 3, 1, ''), ('360926', '3609', '00,36,3609', '铜鼓县', '36', '江西省', '3609', '宜春市', '360926', '铜鼓县', '', '', '', '', 3, 1, ''), ('360981', '3609', '00,36,3609', '丰城市', '36', '江西省', '3609', '宜春市', '360981', '丰城市', '', '', '', '', 3, 1, ''), ('360982', '3609', '00,36,3609', '樟树市', '36', '江西省', '3609', '宜春市', '360982', '樟树市', '', '', '', '', 3, 1, ''), ('360983', '3609', '00,36,3609', '高安市', '36', '江西省', '3609', '宜春市', '360983', '高安市', '', '', '', '', 3, 1, ''), ('3610', '36', '00,36', '抚州市', '36', '江西省', '3610', '抚州市', '', '', '', '', '', '', 2, 1, ''), ('361002', '3610', '00,36,3610', '临川区', '36', '江西省', '3610', '抚州市', '361002', '临川区', '', '', '', '', 3, 1, ''), ('361003', '3610', '00,36,3610', '东乡区', '36', '江西省', '3610', '抚州市', '361003', '东乡区', '', '', '', '', 3, 1, ''), ('361021', '3610', '00,36,3610', '南城县', '36', '江西省', '3610', '抚州市', '361021', '南城县', '', '', '', '', 3, 1, ''), ('361022', '3610', '00,36,3610', '黎川县', '36', '江西省', '3610', '抚州市', '361022', '黎川县', '', '', '', '', 3, 1, ''), ('361023', '3610', '00,36,3610', '南丰县', '36', '江西省', '3610', '抚州市', '361023', '南丰县', '', '', '', '', 3, 1, ''), ('361024', '3610', '00,36,3610', '崇仁县', '36', '江西省', '3610', '抚州市', '361024', '崇仁县', '', '', '', '', 3, 1, ''), ('361025', '3610', '00,36,3610', '乐安县', '36', '江西省', '3610', '抚州市', '361025', '乐安县', '', '', '', '', 3, 1, ''), ('361026', '3610', '00,36,3610', '宜黄县', '36', '江西省', '3610', '抚州市', '361026', '宜黄县', '', '', '', '', 3, 1, ''), ('361027', '3610', '00,36,3610', '金溪县', '36', '江西省', '3610', '抚州市', '361027', '金溪县', '', '', '', '', 3, 1, ''), ('361028', '3610', '00,36,3610', '资溪县', '36', '江西省', '3610', '抚州市', '361028', '资溪县', '', '', '', '', 3, 1, ''), ('361030', '3610', '00,36,3610', '广昌县', '36', '江西省', '3610', '抚州市', '361030', '广昌县', '', '', '', '', 3, 1, ''), ('3611', '36', '00,36', '上饶市', '36', '江西省', '3611', '上饶市', '', '', '', '', '', '', 2, 1, ''), ('361102', '3611', '00,36,3611', '信州区', '36', '江西省', '3611', '上饶市', '361102', '信州区', '', '', '', '', 3, 1, ''), ('361103', '3611', '00,36,3611', '广丰区', '36', '江西省', '3611', '上饶市', '361103', '广丰区', '', '', '', '', 3, 1, ''), ('361104', '3611', '00,36,3611', '广信区', '36', '江西省', '3611', '上饶市', '361104', '广信区', '', '', '', '', 3, 1, ''), ('361123', '3611', '00,36,3611', '玉山县', '36', '江西省', '3611', '上饶市', '361123', '玉山县', '', '', '', '', 3, 1, ''), ('361124', '3611', '00,36,3611', '铅山县', '36', '江西省', '3611', '上饶市', '361124', '铅山县', '', '', '', '', 3, 1, ''), ('361125', '3611', '00,36,3611', '横峰县', '36', '江西省', '3611', '上饶市', '361125', '横峰县', '', '', '', '', 3, 1, ''), ('361126', '3611', '00,36,3611', '弋阳县', '36', '江西省', '3611', '上饶市', '361126', '弋阳县', '', '', '', '', 3, 1, ''), ('361127', '3611', '00,36,3611', '余干县', '36', '江西省', '3611', '上饶市', '361127', '余干县', '', '', '', '', 3, 1, ''), ('361128', '3611', '00,36,3611', '鄱阳县', '36', '江西省', '3611', '上饶市', '361128', '鄱阳县', '', '', '', '', 3, 1, ''), ('361129', '3611', '00,36,3611', '万年县', '36', '江西省', '3611', '上饶市', '361129', '万年县', '', '', '', '', 3, 1, ''), ('361130', '3611', '00,36,3611', '婺源县', '36', '江西省', '3611', '上饶市', '361130', '婺源县', '', '', '', '', 3, 1, ''), ('361181', '3611', '00,36,3611', '德兴市', '36', '江西省', '3611', '上饶市', '361181', '德兴市', '', '', '', '', 3, 1, ''), ('37', '00', '00', '山东省', '37', '山东省', '', '', '', '', '', '', '', '', 1, 1, ''), ('3701', '37', '00,37', '济南市', '37', '山东省', '3701', '济南市', '', '', '', '', '', '', 2, 1, ''), ('370102', '3701', '00,37,3701', '历下区', '37', '山东省', '3701', '济南市', '370102', '历下区', '', '', '', '', 3, 1, ''), ('370103', '3701', '00,37,3701', '市中区', '37', '山东省', '3701', '济南市', '370103', '市中区', '', '', '', '', 3, 1, ''), ('370104', '3701', '00,37,3701', '槐荫区', '37', '山东省', '3701', '济南市', '370104', '槐荫区', '', '', '', '', 3, 1, ''), ('370105', '3701', '00,37,3701', '天桥区', '37', '山东省', '3701', '济南市', '370105', '天桥区', '', '', '', '', 3, 1, ''), ('370112', '3701', '00,37,3701', '历城区', '37', '山东省', '3701', '济南市', '370112', '历城区', '', '', '', '', 3, 1, ''), ('370113', '3701', '00,37,3701', '长清区', '37', '山东省', '3701', '济南市', '370113', '长清区', '', '', '', '', 3, 1, ''), ('370114', '3701', '00,37,3701', '章丘区', '37', '山东省', '3701', '济南市', '370114', '章丘区', '', '', '', '', 3, 1, ''), ('370115', '3701', '00,37,3701', '济阳区', '37', '山东省', '3701', '济南市', '370115', '济阳区', '', '', '', '', 3, 1, ''), ('370116', '3701', '00,37,3701', '莱芜区', '37', '山东省', '3701', '济南市', '370116', '莱芜区', '', '', '', '', 3, 1, ''), ('370117', '3701', '00,37,3701', '钢城区', '37', '山东省', '3701', '济南市', '370117', '钢城区', '', '', '', '', 3, 1, ''), ('370124', '3701', '00,37,3701', '平阴县', '37', '山东省', '3701', '济南市', '370124', '平阴县', '', '', '', '', 3, 1, ''), ('370126', '3701', '00,37,3701', '商河县', '37', '山东省', '3701', '济南市', '370126', '商河县', '', '', '', '', 3, 1, ''), ('3702', '37', '00,37', '青岛市', '37', '山东省', '3702', '青岛市', '', '', '', '', '', '', 2, 1, ''), ('370202', '3702', '00,37,3702', '市南区', '37', '山东省', '3702', '青岛市', '370202', '市南区', '', '', '', '', 3, 1, ''), ('370203', '3702', '00,37,3702', '市北区', '37', '山东省', '3702', '青岛市', '370203', '市北区', '', '', '', '', 3, 1, ''), ('370211', '3702', '00,37,3702', '黄岛区', '37', '山东省', '3702', '青岛市', '370211', '黄岛区', '', '', '', '', 3, 1, ''), ('370212', '3702', '00,37,3702', '崂山区', '37', '山东省', '3702', '青岛市', '370212', '崂山区', '', '', '', '', 3, 1, ''), ('370213', '3702', '00,37,3702', '李沧区', '37', '山东省', '3702', '青岛市', '370213', '李沧区', '', '', '', '', 3, 1, ''), ('370214', '3702', '00,37,3702', '城阳区', '37', '山东省', '3702', '青岛市', '370214', '城阳区', '', '', '', '', 3, 1, ''), ('370215', '3702', '00,37,3702', '即墨区', '37', '山东省', '3702', '青岛市', '370215', '即墨区', '', '', '', '', 3, 1, ''), ('370281', '3702', '00,37,3702', '胶州市', '37', '山东省', '3702', '青岛市', '370281', '胶州市', '', '', '', '', 3, 1, ''), ('370283', '3702', '00,37,3702', '平度市', '37', '山东省', '3702', '青岛市', '370283', '平度市', '', '', '', '', 3, 1, ''), ('370285', '3702', '00,37,3702', '莱西市', '37', '山东省', '3702', '青岛市', '370285', '莱西市', '', '', '', '', 3, 1, ''), ('3703', '37', '00,37', '淄博市', '37', '山东省', '3703', '淄博市', '', '', '', '', '', '', 2, 1, ''), ('370302', '3703', '00,37,3703', '淄川区', '37', '山东省', '3703', '淄博市', '370302', '淄川区', '', '', '', '', 3, 1, ''), ('370303', '3703', '00,37,3703', '张店区', '37', '山东省', '3703', '淄博市', '370303', '张店区', '', '', '', '', 3, 1, ''), ('370304', '3703', '00,37,3703', '博山区', '37', '山东省', '3703', '淄博市', '370304', '博山区', '', '', '', '', 3, 1, ''), ('370305', '3703', '00,37,3703', '临淄区', '37', '山东省', '3703', '淄博市', '370305', '临淄区', '', '', '', '', 3, 1, ''), ('370306', '3703', '00,37,3703', '周村区', '37', '山东省', '3703', '淄博市', '370306', '周村区', '', '', '', '', 3, 1, ''), ('370321', '3703', '00,37,3703', '桓台县', '37', '山东省', '3703', '淄博市', '370321', '桓台县', '', '', '', '', 3, 1, ''), ('370322', '3703', '00,37,3703', '高青县', '37', '山东省', '3703', '淄博市', '370322', '高青县', '', '', '', '', 3, 1, ''), ('370323', '3703', '00,37,3703', '沂源县', '37', '山东省', '3703', '淄博市', '370323', '沂源县', '', '', '', '', 3, 1, ''), ('3704', '37', '00,37', '枣庄市', '37', '山东省', '3704', '枣庄市', '', '', '', '', '', '', 2, 1, ''), ('370402', '3704', '00,37,3704', '市中区', '37', '山东省', '3704', '枣庄市', '370402', '市中区', '', '', '', '', 3, 1, ''), ('370403', '3704', '00,37,3704', '薛城区', '37', '山东省', '3704', '枣庄市', '370403', '薛城区', '', '', '', '', 3, 1, ''), ('370404', '3704', '00,37,3704', '峄城区', '37', '山东省', '3704', '枣庄市', '370404', '峄城区', '', '', '', '', 3, 1, ''), ('370405', '3704', '00,37,3704', '台儿庄区', '37', '山东省', '3704', '枣庄市', '370405', '台儿庄区', '', '', '', '', 3, 1, ''), ('370406', '3704', '00,37,3704', '山亭区', '37', '山东省', '3704', '枣庄市', '370406', '山亭区', '', '', '', '', 3, 1, ''), ('370481', '3704', '00,37,3704', '滕州市', '37', '山东省', '3704', '枣庄市', '370481', '滕州市', '', '', '', '', 3, 1, ''), ('3705', '37', '00,37', '东营市', '37', '山东省', '3705', '东营市', '', '', '', '', '', '', 2, 1, ''), ('370502', '3705', '00,37,3705', '东营区', '37', '山东省', '3705', '东营市', '370502', '东营区', '', '', '', '', 3, 1, ''), ('370503', '3705', '00,37,3705', '河口区', '37', '山东省', '3705', '东营市', '370503', '河口区', '', '', '', '', 3, 1, ''), ('370505', '3705', '00,37,3705', '垦利区', '37', '山东省', '3705', '东营市', '370505', '垦利区', '', '', '', '', 3, 1, ''), ('370522', '3705', '00,37,3705', '利津县', '37', '山东省', '3705', '东营市', '370522', '利津县', '', '', '', '', 3, 1, ''), ('370523', '3705', '00,37,3705', '广饶县', '37', '山东省', '3705', '东营市', '370523', '广饶县', '', '', '', '', 3, 1, ''), ('3706', '37', '00,37', '烟台市', '37', '山东省', '3706', '烟台市', '', '', '', '', '', '', 2, 1, ''), ('370602', '3706', '00,37,3706', '芝罘区', '37', '山东省', '3706', '烟台市', '370602', '芝罘区', '', '', '', '', 3, 1, ''), ('370611', '3706', '00,37,3706', '福山区', '37', '山东省', '3706', '烟台市', '370611', '福山区', '', '', '', '', 3, 1, ''), ('370612', '3706', '00,37,3706', '牟平区', '37', '山东省', '3706', '烟台市', '370612', '牟平区', '', '', '', '', 3, 1, ''), ('370613', '3706', '00,37,3706', '莱山区', '37', '山东省', '3706', '烟台市', '370613', '莱山区', '', '', '', '', 3, 1, ''), ('370634', '3706', '00,37,3706', '长岛县', '37', '山东省', '3706', '烟台市', '370634', '长岛县', '', '', '', '', 3, 1, ''), ('370681', '3706', '00,37,3706', '龙口市', '37', '山东省', '3706', '烟台市', '370681', '龙口市', '', '', '', '', 3, 1, ''), ('370682', '3706', '00,37,3706', '莱阳市', '37', '山东省', '3706', '烟台市', '370682', '莱阳市', '', '', '', '', 3, 1, ''), ('370683', '3706', '00,37,3706', '莱州市', '37', '山东省', '3706', '烟台市', '370683', '莱州市', '', '', '', '', 3, 1, ''), ('370684', '3706', '00,37,3706', '蓬莱市', '37', '山东省', '3706', '烟台市', '370684', '蓬莱市', '', '', '', '', 3, 1, ''), ('370685', '3706', '00,37,3706', '招远市', '37', '山东省', '3706', '烟台市', '370685', '招远市', '', '', '', '', 3, 1, ''), ('370686', '3706', '00,37,3706', '栖霞市', '37', '山东省', '3706', '烟台市', '370686', '栖霞市', '', '', '', '', 3, 1, ''), ('370687', '3706', '00,37,3706', '海阳市', '37', '山东省', '3706', '烟台市', '370687', '海阳市', '', '', '', '', 3, 1, ''), ('3707', '37', '00,37', '潍坊市', '37', '山东省', '3707', '潍坊市', '', '', '', '', '', '', 2, 1, ''), ('370702', '3707', '00,37,3707', '潍城区', '37', '山东省', '3707', '潍坊市', '370702', '潍城区', '', '', '', '', 3, 1, ''), ('370703', '3707', '00,37,3707', '寒亭区', '37', '山东省', '3707', '潍坊市', '370703', '寒亭区', '', '', '', '', 3, 1, ''), ('370704', '3707', '00,37,3707', '坊子区', '37', '山东省', '3707', '潍坊市', '370704', '坊子区', '', '', '', '', 3, 1, ''), ('370705', '3707', '00,37,3707', '奎文区', '37', '山东省', '3707', '潍坊市', '370705', '奎文区', '', '', '', '', 3, 1, ''), ('370724', '3707', '00,37,3707', '临朐县', '37', '山东省', '3707', '潍坊市', '370724', '临朐县', '', '', '', '', 3, 1, ''), ('370725', '3707', '00,37,3707', '昌乐县', '37', '山东省', '3707', '潍坊市', '370725', '昌乐县', '', '', '', '', 3, 1, ''), ('370781', '3707', '00,37,3707', '青州市', '37', '山东省', '3707', '潍坊市', '370781', '青州市', '', '', '', '', 3, 1, ''), ('370782', '3707', '00,37,3707', '诸城市', '37', '山东省', '3707', '潍坊市', '370782', '诸城市', '', '', '', '', 3, 1, ''), ('370783', '3707', '00,37,3707', '寿光市', '37', '山东省', '3707', '潍坊市', '370783', '寿光市', '', '', '', '', 3, 1, ''), ('370784', '3707', '00,37,3707', '安丘市', '37', '山东省', '3707', '潍坊市', '370784', '安丘市', '', '', '', '', 3, 1, ''), ('370785', '3707', '00,37,3707', '高密市', '37', '山东省', '3707', '潍坊市', '370785', '高密市', '', '', '', '', 3, 1, ''), ('370786', '3707', '00,37,3707', '昌邑市', '37', '山东省', '3707', '潍坊市', '370786', '昌邑市', '', '', '', '', 3, 1, ''), ('3708', '37', '00,37', '济宁市', '37', '山东省', '3708', '济宁市', '', '', '', '', '', '', 2, 1, ''), ('370811', '3708', '00,37,3708', '任城区', '37', '山东省', '3708', '济宁市', '370811', '任城区', '', '', '', '', 3, 1, ''), ('370812', '3708', '00,37,3708', '兖州区', '37', '山东省', '3708', '济宁市', '370812', '兖州区', '', '', '', '', 3, 1, ''), ('370826', '3708', '00,37,3708', '微山县', '37', '山东省', '3708', '济宁市', '370826', '微山县', '', '', '', '', 3, 1, ''), ('370827', '3708', '00,37,3708', '鱼台县', '37', '山东省', '3708', '济宁市', '370827', '鱼台县', '', '', '', '', 3, 1, ''), ('370828', '3708', '00,37,3708', '金乡县', '37', '山东省', '3708', '济宁市', '370828', '金乡县', '', '', '', '', 3, 1, ''), ('370829', '3708', '00,37,3708', '嘉祥县', '37', '山东省', '3708', '济宁市', '370829', '嘉祥县', '', '', '', '', 3, 1, ''), ('370830', '3708', '00,37,3708', '汶上县', '37', '山东省', '3708', '济宁市', '370830', '汶上县', '', '', '', '', 3, 1, ''), ('370831', '3708', '00,37,3708', '泗水县', '37', '山东省', '3708', '济宁市', '370831', '泗水县', '', '', '', '', 3, 1, ''), ('370832', '3708', '00,37,3708', '梁山县', '37', '山东省', '3708', '济宁市', '370832', '梁山县', '', '', '', '', 3, 1, ''), ('370881', '3708', '00,37,3708', '曲阜市', '37', '山东省', '3708', '济宁市', '370881', '曲阜市', '', '', '', '', 3, 1, ''), ('370883', '3708', '00,37,3708', '邹城市', '37', '山东省', '3708', '济宁市', '370883', '邹城市', '', '', '', '', 3, 1, ''), ('3709', '37', '00,37', '泰安市', '37', '山东省', '3709', '泰安市', '', '', '', '', '', '', 2, 1, ''), ('370902', '3709', '00,37,3709', '泰山区', '37', '山东省', '3709', '泰安市', '370902', '泰山区', '', '', '', '', 3, 1, ''), ('370911', '3709', '00,37,3709', '岱岳区', '37', '山东省', '3709', '泰安市', '370911', '岱岳区', '', '', '', '', 3, 1, ''), ('370921', '3709', '00,37,3709', '宁阳县', '37', '山东省', '3709', '泰安市', '370921', '宁阳县', '', '', '', '', 3, 1, ''), ('370923', '3709', '00,37,3709', '东平县', '37', '山东省', '3709', '泰安市', '370923', '东平县', '', '', '', '', 3, 1, ''), ('370982', '3709', '00,37,3709', '新泰市', '37', '山东省', '3709', '泰安市', '370982', '新泰市', '', '', '', '', 3, 1, ''), ('370983', '3709', '00,37,3709', '肥城市', '37', '山东省', '3709', '泰安市', '370983', '肥城市', '', '', '', '', 3, 1, ''), ('3710', '37', '00,37', '威海市', '37', '山东省', '3710', '威海市', '', '', '', '', '', '', 2, 1, ''), ('371002', '3710', '00,37,3710', '环翠区', '37', '山东省', '3710', '威海市', '371002', '环翠区', '', '', '', '', 3, 1, ''), ('371003', '3710', '00,37,3710', '文登区', '37', '山东省', '3710', '威海市', '371003', '文登区', '', '', '', '', 3, 1, ''), ('371082', '3710', '00,37,3710', '荣成市', '37', '山东省', '3710', '威海市', '371082', '荣成市', '', '', '', '', 3, 1, ''), ('371083', '3710', '00,37,3710', '乳山市', '37', '山东省', '3710', '威海市', '371083', '乳山市', '', '', '', '', 3, 1, ''), ('3711', '37', '00,37', '日照市', '37', '山东省', '3711', '日照市', '', '', '', '', '', '', 2, 1, ''), ('371102', '3711', '00,37,3711', '东港区', '37', '山东省', '3711', '日照市', '371102', '东港区', '', '', '', '', 3, 1, ''), ('371103', '3711', '00,37,3711', '岚山区', '37', '山东省', '3711', '日照市', '371103', '岚山区', '', '', '', '', 3, 1, ''), ('371121', '3711', '00,37,3711', '五莲县', '37', '山东省', '3711', '日照市', '371121', '五莲县', '', '', '', '', 3, 1, ''), ('371122', '3711', '00,37,3711', '莒县', '37', '山东省', '3711', '日照市', '371122', '莒县', '', '', '', '', 3, 1, ''), ('3713', '37', '00,37', '临沂市', '37', '山东省', '3713', '临沂市', '', '', '', '', '', '', 2, 1, ''), ('371302', '3713', '00,37,3713', '兰山区', '37', '山东省', '3713', '临沂市', '371302', '兰山区', '', '', '', '', 3, 1, ''), ('371311', '3713', '00,37,3713', '罗庄区', '37', '山东省', '3713', '临沂市', '371311', '罗庄区', '', '', '', '', 3, 1, ''), ('371312', '3713', '00,37,3713', '河东区', '37', '山东省', '3713', '临沂市', '371312', '河东区', '', '', '', '', 3, 1, ''); +INSERT INTO `blade_region` VALUES ('371321', '3713', '00,37,3713', '沂南县', '37', '山东省', '3713', '临沂市', '371321', '沂南县', '', '', '', '', 3, 1, ''), ('371322', '3713', '00,37,3713', '郯城县', '37', '山东省', '3713', '临沂市', '371322', '郯城县', '', '', '', '', 3, 1, ''), ('371323', '3713', '00,37,3713', '沂水县', '37', '山东省', '3713', '临沂市', '371323', '沂水县', '', '', '', '', 3, 1, ''), ('371324', '3713', '00,37,3713', '兰陵县', '37', '山东省', '3713', '临沂市', '371324', '兰陵县', '', '', '', '', 3, 1, ''), ('371325', '3713', '00,37,3713', '费县', '37', '山东省', '3713', '临沂市', '371325', '费县', '', '', '', '', 3, 1, ''), ('371326', '3713', '00,37,3713', '平邑县', '37', '山东省', '3713', '临沂市', '371326', '平邑县', '', '', '', '', 3, 1, ''), ('371327', '3713', '00,37,3713', '莒南县', '37', '山东省', '3713', '临沂市', '371327', '莒南县', '', '', '', '', 3, 1, ''), ('371328', '3713', '00,37,3713', '蒙阴县', '37', '山东省', '3713', '临沂市', '371328', '蒙阴县', '', '', '', '', 3, 1, ''), ('371329', '3713', '00,37,3713', '临沭县', '37', '山东省', '3713', '临沂市', '371329', '临沭县', '', '', '', '', 3, 1, ''), ('3714', '37', '00,37', '德州市', '37', '山东省', '3714', '德州市', '', '', '', '', '', '', 2, 1, ''), ('371402', '3714', '00,37,3714', '德城区', '37', '山东省', '3714', '德州市', '371402', '德城区', '', '', '', '', 3, 1, ''), ('371403', '3714', '00,37,3714', '陵城区', '37', '山东省', '3714', '德州市', '371403', '陵城区', '', '', '', '', 3, 1, ''), ('371422', '3714', '00,37,3714', '宁津县', '37', '山东省', '3714', '德州市', '371422', '宁津县', '', '', '', '', 3, 1, ''), ('371423', '3714', '00,37,3714', '庆云县', '37', '山东省', '3714', '德州市', '371423', '庆云县', '', '', '', '', 3, 1, ''), ('371424', '3714', '00,37,3714', '临邑县', '37', '山东省', '3714', '德州市', '371424', '临邑县', '', '', '', '', 3, 1, ''), ('371425', '3714', '00,37,3714', '齐河县', '37', '山东省', '3714', '德州市', '371425', '齐河县', '', '', '', '', 3, 1, ''), ('371426', '3714', '00,37,3714', '平原县', '37', '山东省', '3714', '德州市', '371426', '平原县', '', '', '', '', 3, 1, ''), ('371427', '3714', '00,37,3714', '夏津县', '37', '山东省', '3714', '德州市', '371427', '夏津县', '', '', '', '', 3, 1, ''), ('371428', '3714', '00,37,3714', '武城县', '37', '山东省', '3714', '德州市', '371428', '武城县', '', '', '', '', 3, 1, ''), ('371481', '3714', '00,37,3714', '乐陵市', '37', '山东省', '3714', '德州市', '371481', '乐陵市', '', '', '', '', 3, 1, ''), ('371482', '3714', '00,37,3714', '禹城市', '37', '山东省', '3714', '德州市', '371482', '禹城市', '', '', '', '', 3, 1, ''), ('3715', '37', '00,37', '聊城市', '37', '山东省', '3715', '聊城市', '', '', '', '', '', '', 2, 1, ''), ('371502', '3715', '00,37,3715', '东昌府区', '37', '山东省', '3715', '聊城市', '371502', '东昌府区', '', '', '', '', 3, 1, ''), ('371503', '3715', '00,37,3715', '茌平区', '37', '山东省', '3715', '聊城市', '371503', '茌平区', '', '', '', '', 3, 1, ''), ('371521', '3715', '00,37,3715', '阳谷县', '37', '山东省', '3715', '聊城市', '371521', '阳谷县', '', '', '', '', 3, 1, ''), ('371522', '3715', '00,37,3715', '莘县', '37', '山东省', '3715', '聊城市', '371522', '莘县', '', '', '', '', 3, 1, ''), ('371524', '3715', '00,37,3715', '东阿县', '37', '山东省', '3715', '聊城市', '371524', '东阿县', '', '', '', '', 3, 1, ''), ('371525', '3715', '00,37,3715', '冠县', '37', '山东省', '3715', '聊城市', '371525', '冠县', '', '', '', '', 3, 1, ''), ('371526', '3715', '00,37,3715', '高唐县', '37', '山东省', '3715', '聊城市', '371526', '高唐县', '', '', '', '', 3, 1, ''), ('371581', '3715', '00,37,3715', '临清市', '37', '山东省', '3715', '聊城市', '371581', '临清市', '', '', '', '', 3, 1, ''), ('3716', '37', '00,37', '滨州市', '37', '山东省', '3716', '滨州市', '', '', '', '', '', '', 2, 1, ''), ('371602', '3716', '00,37,3716', '滨城区', '37', '山东省', '3716', '滨州市', '371602', '滨城区', '', '', '', '', 3, 1, ''), ('371603', '3716', '00,37,3716', '沾化区', '37', '山东省', '3716', '滨州市', '371603', '沾化区', '', '', '', '', 3, 1, ''), ('371621', '3716', '00,37,3716', '惠民县', '37', '山东省', '3716', '滨州市', '371621', '惠民县', '', '', '', '', 3, 1, ''), ('371622', '3716', '00,37,3716', '阳信县', '37', '山东省', '3716', '滨州市', '371622', '阳信县', '', '', '', '', 3, 1, ''), ('371623', '3716', '00,37,3716', '无棣县', '37', '山东省', '3716', '滨州市', '371623', '无棣县', '', '', '', '', 3, 1, ''), ('371625', '3716', '00,37,3716', '博兴县', '37', '山东省', '3716', '滨州市', '371625', '博兴县', '', '', '', '', 3, 1, ''), ('371681', '3716', '00,37,3716', '邹平市', '37', '山东省', '3716', '滨州市', '371681', '邹平市', '', '', '', '', 3, 1, ''), ('3717', '37', '00,37', '菏泽市', '37', '山东省', '3717', '菏泽市', '', '', '', '', '', '', 2, 1, ''), ('371702', '3717', '00,37,3717', '牡丹区', '37', '山东省', '3717', '菏泽市', '371702', '牡丹区', '', '', '', '', 3, 1, ''), ('371703', '3717', '00,37,3717', '定陶区', '37', '山东省', '3717', '菏泽市', '371703', '定陶区', '', '', '', '', 3, 1, ''), ('371721', '3717', '00,37,3717', '曹县', '37', '山东省', '3717', '菏泽市', '371721', '曹县', '', '', '', '', 3, 1, ''), ('371722', '3717', '00,37,3717', '单县', '37', '山东省', '3717', '菏泽市', '371722', '单县', '', '', '', '', 3, 1, ''), ('371723', '3717', '00,37,3717', '成武县', '37', '山东省', '3717', '菏泽市', '371723', '成武县', '', '', '', '', 3, 1, ''), ('371724', '3717', '00,37,3717', '巨野县', '37', '山东省', '3717', '菏泽市', '371724', '巨野县', '', '', '', '', 3, 1, ''), ('371725', '3717', '00,37,3717', '郓城县', '37', '山东省', '3717', '菏泽市', '371725', '郓城县', '', '', '', '', 3, 1, ''), ('371726', '3717', '00,37,3717', '鄄城县', '37', '山东省', '3717', '菏泽市', '371726', '鄄城县', '', '', '', '', 3, 1, ''), ('371728', '3717', '00,37,3717', '东明县', '37', '山东省', '3717', '菏泽市', '371728', '东明县', '', '', '', '', 3, 1, ''), ('41', '00', '00', '河南省', '41', '河南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4101', '41', '00,41', '郑州市', '41', '河南省', '4101', '郑州市', '', '', '', '', '', '', 2, 1, ''), ('410102', '4101', '00,41,4101', '中原区', '41', '河南省', '4101', '郑州市', '410102', '中原区', '', '', '', '', 3, 1, ''), ('410103', '4101', '00,41,4101', '二七区', '41', '河南省', '4101', '郑州市', '410103', '二七区', '', '', '', '', 3, 1, ''), ('410104', '4101', '00,41,4101', '管城回族区', '41', '河南省', '4101', '郑州市', '410104', '管城回族区', '', '', '', '', 3, 1, ''), ('410105', '4101', '00,41,4101', '金水区', '41', '河南省', '4101', '郑州市', '410105', '金水区', '', '', '', '', 3, 1, ''), ('410106', '4101', '00,41,4101', '上街区', '41', '河南省', '4101', '郑州市', '410106', '上街区', '', '', '', '', 3, 1, ''), ('410108', '4101', '00,41,4101', '惠济区', '41', '河南省', '4101', '郑州市', '410108', '惠济区', '', '', '', '', 3, 1, ''), ('410122', '4101', '00,41,4101', '中牟县', '41', '河南省', '4101', '郑州市', '410122', '中牟县', '', '', '', '', 3, 1, ''), ('410181', '4101', '00,41,4101', '巩义市', '41', '河南省', '4101', '郑州市', '410181', '巩义市', '', '', '', '', 3, 1, ''), ('410182', '4101', '00,41,4101', '荥阳市', '41', '河南省', '4101', '郑州市', '410182', '荥阳市', '', '', '', '', 3, 1, ''), ('410183', '4101', '00,41,4101', '新密市', '41', '河南省', '4101', '郑州市', '410183', '新密市', '', '', '', '', 3, 1, ''), ('410184', '4101', '00,41,4101', '新郑市', '41', '河南省', '4101', '郑州市', '410184', '新郑市', '', '', '', '', 3, 1, ''), ('410185', '4101', '00,41,4101', '登封市', '41', '河南省', '4101', '郑州市', '410185', '登封市', '', '', '', '', 3, 1, ''), ('4102', '41', '00,41', '开封市', '41', '河南省', '4102', '开封市', '', '', '', '', '', '', 2, 1, ''), ('410202', '4102', '00,41,4102', '龙亭区', '41', '河南省', '4102', '开封市', '410202', '龙亭区', '', '', '', '', 3, 1, ''), ('410203', '4102', '00,41,4102', '顺河回族区', '41', '河南省', '4102', '开封市', '410203', '顺河回族区', '', '', '', '', 3, 1, ''), ('410204', '4102', '00,41,4102', '鼓楼区', '41', '河南省', '4102', '开封市', '410204', '鼓楼区', '', '', '', '', 3, 1, ''), ('410205', '4102', '00,41,4102', '禹王台区', '41', '河南省', '4102', '开封市', '410205', '禹王台区', '', '', '', '', 3, 1, ''), ('410212', '4102', '00,41,4102', '祥符区', '41', '河南省', '4102', '开封市', '410212', '祥符区', '', '', '', '', 3, 1, ''), ('410221', '4102', '00,41,4102', '杞县', '41', '河南省', '4102', '开封市', '410221', '杞县', '', '', '', '', 3, 1, ''), ('410222', '4102', '00,41,4102', '通许县', '41', '河南省', '4102', '开封市', '410222', '通许县', '', '', '', '', 3, 1, ''), ('410223', '4102', '00,41,4102', '尉氏县', '41', '河南省', '4102', '开封市', '410223', '尉氏县', '', '', '', '', 3, 1, ''), ('410225', '4102', '00,41,4102', '兰考县', '41', '河南省', '4102', '开封市', '410225', '兰考县', '', '', '', '', 3, 1, ''), ('4103', '41', '00,41', '洛阳市', '41', '河南省', '4103', '洛阳市', '', '', '', '', '', '', 2, 1, ''), ('410302', '4103', '00,41,4103', '老城区', '41', '河南省', '4103', '洛阳市', '410302', '老城区', '', '', '', '', 3, 1, ''), ('410303', '4103', '00,41,4103', '西工区', '41', '河南省', '4103', '洛阳市', '410303', '西工区', '', '', '', '', 3, 1, ''), ('410304', '4103', '00,41,4103', '瀍河回族区', '41', '河南省', '4103', '洛阳市', '410304', '瀍河回族区', '', '', '', '', 3, 1, ''), ('410305', '4103', '00,41,4103', '涧西区', '41', '河南省', '4103', '洛阳市', '410305', '涧西区', '', '', '', '', 3, 1, ''), ('410306', '4103', '00,41,4103', '吉利区', '41', '河南省', '4103', '洛阳市', '410306', '吉利区', '', '', '', '', 3, 1, ''), ('410311', '4103', '00,41,4103', '洛龙区', '41', '河南省', '4103', '洛阳市', '410311', '洛龙区', '', '', '', '', 3, 1, ''), ('410322', '4103', '00,41,4103', '孟津县', '41', '河南省', '4103', '洛阳市', '410322', '孟津县', '', '', '', '', 3, 1, ''), ('410323', '4103', '00,41,4103', '新安县', '41', '河南省', '4103', '洛阳市', '410323', '新安县', '', '', '', '', 3, 1, ''), ('410324', '4103', '00,41,4103', '栾川县', '41', '河南省', '4103', '洛阳市', '410324', '栾川县', '', '', '', '', 3, 1, ''), ('410325', '4103', '00,41,4103', '嵩县', '41', '河南省', '4103', '洛阳市', '410325', '嵩县', '', '', '', '', 3, 1, ''), ('410326', '4103', '00,41,4103', '汝阳县', '41', '河南省', '4103', '洛阳市', '410326', '汝阳县', '', '', '', '', 3, 1, ''), ('410327', '4103', '00,41,4103', '宜阳县', '41', '河南省', '4103', '洛阳市', '410327', '宜阳县', '', '', '', '', 3, 1, ''), ('410328', '4103', '00,41,4103', '洛宁县', '41', '河南省', '4103', '洛阳市', '410328', '洛宁县', '', '', '', '', 3, 1, ''), ('410329', '4103', '00,41,4103', '伊川县', '41', '河南省', '4103', '洛阳市', '410329', '伊川县', '', '', '', '', 3, 1, ''), ('410381', '4103', '00,41,4103', '偃师市', '41', '河南省', '4103', '洛阳市', '410381', '偃师市', '', '', '', '', 3, 1, ''), ('4104', '41', '00,41', '平顶山市', '41', '河南省', '4104', '平顶山市', '', '', '', '', '', '', 2, 1, ''), ('410402', '4104', '00,41,4104', '新华区', '41', '河南省', '4104', '平顶山市', '410402', '新华区', '', '', '', '', 3, 1, ''), ('410403', '4104', '00,41,4104', '卫东区', '41', '河南省', '4104', '平顶山市', '410403', '卫东区', '', '', '', '', 3, 1, ''), ('410404', '4104', '00,41,4104', '石龙区', '41', '河南省', '4104', '平顶山市', '410404', '石龙区', '', '', '', '', 3, 1, ''), ('410411', '4104', '00,41,4104', '湛河区', '41', '河南省', '4104', '平顶山市', '410411', '湛河区', '', '', '', '', 3, 1, ''), ('410421', '4104', '00,41,4104', '宝丰县', '41', '河南省', '4104', '平顶山市', '410421', '宝丰县', '', '', '', '', 3, 1, ''), ('410422', '4104', '00,41,4104', '叶县', '41', '河南省', '4104', '平顶山市', '410422', '叶县', '', '', '', '', 3, 1, ''), ('410423', '4104', '00,41,4104', '鲁山县', '41', '河南省', '4104', '平顶山市', '410423', '鲁山县', '', '', '', '', 3, 1, ''), ('410425', '4104', '00,41,4104', '郏县', '41', '河南省', '4104', '平顶山市', '410425', '郏县', '', '', '', '', 3, 1, ''), ('410481', '4104', '00,41,4104', '舞钢市', '41', '河南省', '4104', '平顶山市', '410481', '舞钢市', '', '', '', '', 3, 1, ''), ('410482', '4104', '00,41,4104', '汝州市', '41', '河南省', '4104', '平顶山市', '410482', '汝州市', '', '', '', '', 3, 1, ''), ('4105', '41', '00,41', '安阳市', '41', '河南省', '4105', '安阳市', '', '', '', '', '', '', 2, 1, ''), ('410502', '4105', '00,41,4105', '文峰区', '41', '河南省', '4105', '安阳市', '410502', '文峰区', '', '', '', '', 3, 1, ''), ('410503', '4105', '00,41,4105', '北关区', '41', '河南省', '4105', '安阳市', '410503', '北关区', '', '', '', '', 3, 1, ''), ('410505', '4105', '00,41,4105', '殷都区', '41', '河南省', '4105', '安阳市', '410505', '殷都区', '', '', '', '', 3, 1, ''), ('410506', '4105', '00,41,4105', '龙安区', '41', '河南省', '4105', '安阳市', '410506', '龙安区', '', '', '', '', 3, 1, ''), ('410522', '4105', '00,41,4105', '安阳县', '41', '河南省', '4105', '安阳市', '410522', '安阳县', '', '', '', '', 3, 1, ''), ('410523', '4105', '00,41,4105', '汤阴县', '41', '河南省', '4105', '安阳市', '410523', '汤阴县', '', '', '', '', 3, 1, ''), ('410526', '4105', '00,41,4105', '滑县', '41', '河南省', '4105', '安阳市', '410526', '滑县', '', '', '', '', 3, 1, ''), ('410527', '4105', '00,41,4105', '内黄县', '41', '河南省', '4105', '安阳市', '410527', '内黄县', '', '', '', '', 3, 1, ''), ('410581', '4105', '00,41,4105', '林州市', '41', '河南省', '4105', '安阳市', '410581', '林州市', '', '', '', '', 3, 1, ''), ('4106', '41', '00,41', '鹤壁市', '41', '河南省', '4106', '鹤壁市', '', '', '', '', '', '', 2, 1, ''), ('410602', '4106', '00,41,4106', '鹤山区', '41', '河南省', '4106', '鹤壁市', '410602', '鹤山区', '', '', '', '', 3, 1, ''), ('410603', '4106', '00,41,4106', '山城区', '41', '河南省', '4106', '鹤壁市', '410603', '山城区', '', '', '', '', 3, 1, ''), ('410611', '4106', '00,41,4106', '淇滨区', '41', '河南省', '4106', '鹤壁市', '410611', '淇滨区', '', '', '', '', 3, 1, ''), ('410621', '4106', '00,41,4106', '浚县', '41', '河南省', '4106', '鹤壁市', '410621', '浚县', '', '', '', '', 3, 1, ''), ('410622', '4106', '00,41,4106', '淇县', '41', '河南省', '4106', '鹤壁市', '410622', '淇县', '', '', '', '', 3, 1, ''), ('4107', '41', '00,41', '新乡市', '41', '河南省', '4107', '新乡市', '', '', '', '', '', '', 2, 1, ''), ('410702', '4107', '00,41,4107', '红旗区', '41', '河南省', '4107', '新乡市', '410702', '红旗区', '', '', '', '', 3, 1, ''), ('410703', '4107', '00,41,4107', '卫滨区', '41', '河南省', '4107', '新乡市', '410703', '卫滨区', '', '', '', '', 3, 1, ''), ('410704', '4107', '00,41,4107', '凤泉区', '41', '河南省', '4107', '新乡市', '410704', '凤泉区', '', '', '', '', 3, 1, ''), ('410711', '4107', '00,41,4107', '牧野区', '41', '河南省', '4107', '新乡市', '410711', '牧野区', '', '', '', '', 3, 1, ''), ('410721', '4107', '00,41,4107', '新乡县', '41', '河南省', '4107', '新乡市', '410721', '新乡县', '', '', '', '', 3, 1, ''), ('410724', '4107', '00,41,4107', '获嘉县', '41', '河南省', '4107', '新乡市', '410724', '获嘉县', '', '', '', '', 3, 1, ''), ('410725', '4107', '00,41,4107', '原阳县', '41', '河南省', '4107', '新乡市', '410725', '原阳县', '', '', '', '', 3, 1, ''), ('410726', '4107', '00,41,4107', '延津县', '41', '河南省', '4107', '新乡市', '410726', '延津县', '', '', '', '', 3, 1, ''), ('410727', '4107', '00,41,4107', '封丘县', '41', '河南省', '4107', '新乡市', '410727', '封丘县', '', '', '', '', 3, 1, ''), ('410781', '4107', '00,41,4107', '卫辉市', '41', '河南省', '4107', '新乡市', '410781', '卫辉市', '', '', '', '', 3, 1, ''), ('410782', '4107', '00,41,4107', '辉县市', '41', '河南省', '4107', '新乡市', '410782', '辉县市', '', '', '', '', 3, 1, ''), ('410783', '4107', '00,41,4107', '长垣市', '41', '河南省', '4107', '新乡市', '410783', '长垣市', '', '', '', '', 3, 1, ''), ('4108', '41', '00,41', '焦作市', '41', '河南省', '4108', '焦作市', '', '', '', '', '', '', 2, 1, ''), ('410802', '4108', '00,41,4108', '解放区', '41', '河南省', '4108', '焦作市', '410802', '解放区', '', '', '', '', 3, 1, ''), ('410803', '4108', '00,41,4108', '中站区', '41', '河南省', '4108', '焦作市', '410803', '中站区', '', '', '', '', 3, 1, ''), ('410804', '4108', '00,41,4108', '马村区', '41', '河南省', '4108', '焦作市', '410804', '马村区', '', '', '', '', 3, 1, ''), ('410811', '4108', '00,41,4108', '山阳区', '41', '河南省', '4108', '焦作市', '410811', '山阳区', '', '', '', '', 3, 1, ''), ('410821', '4108', '00,41,4108', '修武县', '41', '河南省', '4108', '焦作市', '410821', '修武县', '', '', '', '', 3, 1, ''), ('410822', '4108', '00,41,4108', '博爱县', '41', '河南省', '4108', '焦作市', '410822', '博爱县', '', '', '', '', 3, 1, ''), ('410823', '4108', '00,41,4108', '武陟县', '41', '河南省', '4108', '焦作市', '410823', '武陟县', '', '', '', '', 3, 1, ''), ('410825', '4108', '00,41,4108', '温县', '41', '河南省', '4108', '焦作市', '410825', '温县', '', '', '', '', 3, 1, ''), ('410882', '4108', '00,41,4108', '沁阳市', '41', '河南省', '4108', '焦作市', '410882', '沁阳市', '', '', '', '', 3, 1, ''), ('410883', '4108', '00,41,4108', '孟州市', '41', '河南省', '4108', '焦作市', '410883', '孟州市', '', '', '', '', 3, 1, ''), ('4109', '41', '00,41', '濮阳市', '41', '河南省', '4109', '濮阳市', '', '', '', '', '', '', 2, 1, ''), ('410902', '4109', '00,41,4109', '华龙区', '41', '河南省', '4109', '濮阳市', '410902', '华龙区', '', '', '', '', 3, 1, ''), ('410922', '4109', '00,41,4109', '清丰县', '41', '河南省', '4109', '濮阳市', '410922', '清丰县', '', '', '', '', 3, 1, ''), ('410923', '4109', '00,41,4109', '南乐县', '41', '河南省', '4109', '濮阳市', '410923', '南乐县', '', '', '', '', 3, 1, ''), ('410926', '4109', '00,41,4109', '范县', '41', '河南省', '4109', '濮阳市', '410926', '范县', '', '', '', '', 3, 1, ''), ('410927', '4109', '00,41,4109', '台前县', '41', '河南省', '4109', '濮阳市', '410927', '台前县', '', '', '', '', 3, 1, ''), ('410928', '4109', '00,41,4109', '濮阳县', '41', '河南省', '4109', '濮阳市', '410928', '濮阳县', '', '', '', '', 3, 1, ''), ('4110', '41', '00,41', '许昌市', '41', '河南省', '4110', '许昌市', '', '', '', '', '', '', 2, 1, ''), ('411002', '4110', '00,41,4110', '魏都区', '41', '河南省', '4110', '许昌市', '411002', '魏都区', '', '', '', '', 3, 1, ''), ('411003', '4110', '00,41,4110', '建安区', '41', '河南省', '4110', '许昌市', '411003', '建安区', '', '', '', '', 3, 1, ''), ('411024', '4110', '00,41,4110', '鄢陵县', '41', '河南省', '4110', '许昌市', '411024', '鄢陵县', '', '', '', '', 3, 1, ''), ('411025', '4110', '00,41,4110', '襄城县', '41', '河南省', '4110', '许昌市', '411025', '襄城县', '', '', '', '', 3, 1, ''), ('411081', '4110', '00,41,4110', '禹州市', '41', '河南省', '4110', '许昌市', '411081', '禹州市', '', '', '', '', 3, 1, ''), ('411082', '4110', '00,41,4110', '长葛市', '41', '河南省', '4110', '许昌市', '411082', '长葛市', '', '', '', '', 3, 1, ''), ('4111', '41', '00,41', '漯河市', '41', '河南省', '4111', '漯河市', '', '', '', '', '', '', 2, 1, ''), ('411102', '4111', '00,41,4111', '源汇区', '41', '河南省', '4111', '漯河市', '411102', '源汇区', '', '', '', '', 3, 1, ''), ('411103', '4111', '00,41,4111', '郾城区', '41', '河南省', '4111', '漯河市', '411103', '郾城区', '', '', '', '', 3, 1, ''), ('411104', '4111', '00,41,4111', '召陵区', '41', '河南省', '4111', '漯河市', '411104', '召陵区', '', '', '', '', 3, 1, ''), ('411121', '4111', '00,41,4111', '舞阳县', '41', '河南省', '4111', '漯河市', '411121', '舞阳县', '', '', '', '', 3, 1, ''), ('411122', '4111', '00,41,4111', '临颍县', '41', '河南省', '4111', '漯河市', '411122', '临颍县', '', '', '', '', 3, 1, ''), ('4112', '41', '00,41', '三门峡市', '41', '河南省', '4112', '三门峡市', '', '', '', '', '', '', 2, 1, ''), ('411202', '4112', '00,41,4112', '湖滨区', '41', '河南省', '4112', '三门峡市', '411202', '湖滨区', '', '', '', '', 3, 1, ''), ('411203', '4112', '00,41,4112', '陕州区', '41', '河南省', '4112', '三门峡市', '411203', '陕州区', '', '', '', '', 3, 1, ''), ('411221', '4112', '00,41,4112', '渑池县', '41', '河南省', '4112', '三门峡市', '411221', '渑池县', '', '', '', '', 3, 1, ''), ('411224', '4112', '00,41,4112', '卢氏县', '41', '河南省', '4112', '三门峡市', '411224', '卢氏县', '', '', '', '', 3, 1, ''), ('411281', '4112', '00,41,4112', '义马市', '41', '河南省', '4112', '三门峡市', '411281', '义马市', '', '', '', '', 3, 1, ''), ('411282', '4112', '00,41,4112', '灵宝市', '41', '河南省', '4112', '三门峡市', '411282', '灵宝市', '', '', '', '', 3, 1, ''), ('4113', '41', '00,41', '南阳市', '41', '河南省', '4113', '南阳市', '', '', '', '', '', '', 2, 1, ''), ('411302', '4113', '00,41,4113', '宛城区', '41', '河南省', '4113', '南阳市', '411302', '宛城区', '', '', '', '', 3, 1, ''), ('411303', '4113', '00,41,4113', '卧龙区', '41', '河南省', '4113', '南阳市', '411303', '卧龙区', '', '', '', '', 3, 1, ''), ('411321', '4113', '00,41,4113', '南召县', '41', '河南省', '4113', '南阳市', '411321', '南召县', '', '', '', '', 3, 1, ''), ('411322', '4113', '00,41,4113', '方城县', '41', '河南省', '4113', '南阳市', '411322', '方城县', '', '', '', '', 3, 1, ''), ('411323', '4113', '00,41,4113', '西峡县', '41', '河南省', '4113', '南阳市', '411323', '西峡县', '', '', '', '', 3, 1, ''), ('411324', '4113', '00,41,4113', '镇平县', '41', '河南省', '4113', '南阳市', '411324', '镇平县', '', '', '', '', 3, 1, ''), ('411325', '4113', '00,41,4113', '内乡县', '41', '河南省', '4113', '南阳市', '411325', '内乡县', '', '', '', '', 3, 1, ''), ('411326', '4113', '00,41,4113', '淅川县', '41', '河南省', '4113', '南阳市', '411326', '淅川县', '', '', '', '', 3, 1, ''), ('411327', '4113', '00,41,4113', '社旗县', '41', '河南省', '4113', '南阳市', '411327', '社旗县', '', '', '', '', 3, 1, ''), ('411328', '4113', '00,41,4113', '唐河县', '41', '河南省', '4113', '南阳市', '411328', '唐河县', '', '', '', '', 3, 1, ''), ('411329', '4113', '00,41,4113', '新野县', '41', '河南省', '4113', '南阳市', '411329', '新野县', '', '', '', '', 3, 1, ''), ('411330', '4113', '00,41,4113', '桐柏县', '41', '河南省', '4113', '南阳市', '411330', '桐柏县', '', '', '', '', 3, 1, ''), ('411381', '4113', '00,41,4113', '邓州市', '41', '河南省', '4113', '南阳市', '411381', '邓州市', '', '', '', '', 3, 1, ''), ('4114', '41', '00,41', '商丘市', '41', '河南省', '4114', '商丘市', '', '', '', '', '', '', 2, 1, ''), ('411402', '4114', '00,41,4114', '梁园区', '41', '河南省', '4114', '商丘市', '411402', '梁园区', '', '', '', '', 3, 1, ''), ('411403', '4114', '00,41,4114', '睢阳区', '41', '河南省', '4114', '商丘市', '411403', '睢阳区', '', '', '', '', 3, 1, ''), ('411421', '4114', '00,41,4114', '民权县', '41', '河南省', '4114', '商丘市', '411421', '民权县', '', '', '', '', 3, 1, ''), ('411422', '4114', '00,41,4114', '睢县', '41', '河南省', '4114', '商丘市', '411422', '睢县', '', '', '', '', 3, 1, ''), ('411423', '4114', '00,41,4114', '宁陵县', '41', '河南省', '4114', '商丘市', '411423', '宁陵县', '', '', '', '', 3, 1, ''), ('411424', '4114', '00,41,4114', '柘城县', '41', '河南省', '4114', '商丘市', '411424', '柘城县', '', '', '', '', 3, 1, ''), ('411425', '4114', '00,41,4114', '虞城县', '41', '河南省', '4114', '商丘市', '411425', '虞城县', '', '', '', '', 3, 1, ''), ('411426', '4114', '00,41,4114', '夏邑县', '41', '河南省', '4114', '商丘市', '411426', '夏邑县', '', '', '', '', 3, 1, ''), ('411481', '4114', '00,41,4114', '永城市', '41', '河南省', '4114', '商丘市', '411481', '永城市', '', '', '', '', 3, 1, ''), ('4115', '41', '00,41', '信阳市', '41', '河南省', '4115', '信阳市', '', '', '', '', '', '', 2, 1, ''), ('411502', '4115', '00,41,4115', '浉河区', '41', '河南省', '4115', '信阳市', '411502', '浉河区', '', '', '', '', 3, 1, ''), ('411503', '4115', '00,41,4115', '平桥区', '41', '河南省', '4115', '信阳市', '411503', '平桥区', '', '', '', '', 3, 1, ''), ('411521', '4115', '00,41,4115', '罗山县', '41', '河南省', '4115', '信阳市', '411521', '罗山县', '', '', '', '', 3, 1, ''), ('411522', '4115', '00,41,4115', '光山县', '41', '河南省', '4115', '信阳市', '411522', '光山县', '', '', '', '', 3, 1, ''), ('411523', '4115', '00,41,4115', '新县', '41', '河南省', '4115', '信阳市', '411523', '新县', '', '', '', '', 3, 1, ''), ('411524', '4115', '00,41,4115', '商城县', '41', '河南省', '4115', '信阳市', '411524', '商城县', '', '', '', '', 3, 1, ''), ('411525', '4115', '00,41,4115', '固始县', '41', '河南省', '4115', '信阳市', '411525', '固始县', '', '', '', '', 3, 1, ''), ('411526', '4115', '00,41,4115', '潢川县', '41', '河南省', '4115', '信阳市', '411526', '潢川县', '', '', '', '', 3, 1, ''), ('411527', '4115', '00,41,4115', '淮滨县', '41', '河南省', '4115', '信阳市', '411527', '淮滨县', '', '', '', '', 3, 1, ''), ('411528', '4115', '00,41,4115', '息县', '41', '河南省', '4115', '信阳市', '411528', '息县', '', '', '', '', 3, 1, ''), ('4116', '41', '00,41', '周口市', '41', '河南省', '4116', '周口市', '', '', '', '', '', '', 2, 1, ''), ('411602', '4116', '00,41,4116', '川汇区', '41', '河南省', '4116', '周口市', '411602', '川汇区', '', '', '', '', 3, 1, ''), ('411603', '4116', '00,41,4116', '淮阳区', '41', '河南省', '4116', '周口市', '411603', '淮阳区', '', '', '', '', 3, 1, ''), ('411621', '4116', '00,41,4116', '扶沟县', '41', '河南省', '4116', '周口市', '411621', '扶沟县', '', '', '', '', 3, 1, ''), ('411622', '4116', '00,41,4116', '西华县', '41', '河南省', '4116', '周口市', '411622', '西华县', '', '', '', '', 3, 1, ''), ('411623', '4116', '00,41,4116', '商水县', '41', '河南省', '4116', '周口市', '411623', '商水县', '', '', '', '', 3, 1, ''), ('411624', '4116', '00,41,4116', '沈丘县', '41', '河南省', '4116', '周口市', '411624', '沈丘县', '', '', '', '', 3, 1, ''), ('411625', '4116', '00,41,4116', '郸城县', '41', '河南省', '4116', '周口市', '411625', '郸城县', '', '', '', '', 3, 1, ''), ('411627', '4116', '00,41,4116', '太康县', '41', '河南省', '4116', '周口市', '411627', '太康县', '', '', '', '', 3, 1, ''), ('411628', '4116', '00,41,4116', '鹿邑县', '41', '河南省', '4116', '周口市', '411628', '鹿邑县', '', '', '', '', 3, 1, ''), ('411681', '4116', '00,41,4116', '项城市', '41', '河南省', '4116', '周口市', '411681', '项城市', '', '', '', '', 3, 1, ''), ('4117', '41', '00,41', '驻马店市', '41', '河南省', '4117', '驻马店市', '', '', '', '', '', '', 2, 1, ''), ('411702', '4117', '00,41,4117', '驿城区', '41', '河南省', '4117', '驻马店市', '411702', '驿城区', '', '', '', '', 3, 1, ''), ('411721', '4117', '00,41,4117', '西平县', '41', '河南省', '4117', '驻马店市', '411721', '西平县', '', '', '', '', 3, 1, ''), ('411722', '4117', '00,41,4117', '上蔡县', '41', '河南省', '4117', '驻马店市', '411722', '上蔡县', '', '', '', '', 3, 1, ''), ('411723', '4117', '00,41,4117', '平舆县', '41', '河南省', '4117', '驻马店市', '411723', '平舆县', '', '', '', '', 3, 1, ''), ('411724', '4117', '00,41,4117', '正阳县', '41', '河南省', '4117', '驻马店市', '411724', '正阳县', '', '', '', '', 3, 1, ''), ('411725', '4117', '00,41,4117', '确山县', '41', '河南省', '4117', '驻马店市', '411725', '确山县', '', '', '', '', 3, 1, ''), ('411726', '4117', '00,41,4117', '泌阳县', '41', '河南省', '4117', '驻马店市', '411726', '泌阳县', '', '', '', '', 3, 1, ''), ('411727', '4117', '00,41,4117', '汝南县', '41', '河南省', '4117', '驻马店市', '411727', '汝南县', '', '', '', '', 3, 1, ''), ('411728', '4117', '00,41,4117', '遂平县', '41', '河南省', '4117', '驻马店市', '411728', '遂平县', '', '', '', '', 3, 1, ''), ('411729', '4117', '00,41,4117', '新蔡县', '41', '河南省', '4117', '驻马店市', '411729', '新蔡县', '', '', '', '', 3, 1, ''), ('4190', '41', '00,41', '省直辖县级行政区', '41', '河南省', '4190', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('419001', '4190', '00,41,4190', '济源市', '41', '河南省', '4190', '省直辖县级行政区', '419001', '济源市', '', '', '', '', 3, 1, ''), ('42', '00', '00', '湖北省', '42', '湖北省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4201', '42', '00,42', '武汉市', '42', '湖北省', '4201', '武汉市', '', '', '', '', '', '', 2, 1, ''), ('420102', '4201', '00,42,4201', '江岸区', '42', '湖北省', '4201', '武汉市', '420102', '江岸区', '', '', '', '', 3, 1, ''), ('420103', '4201', '00,42,4201', '江汉区', '42', '湖北省', '4201', '武汉市', '420103', '江汉区', '', '', '', '', 3, 1, ''), ('420104', '4201', '00,42,4201', '硚口区', '42', '湖北省', '4201', '武汉市', '420104', '硚口区', '', '', '', '', 3, 1, ''), ('420105', '4201', '00,42,4201', '汉阳区', '42', '湖北省', '4201', '武汉市', '420105', '汉阳区', '', '', '', '', 3, 1, ''), ('420106', '4201', '00,42,4201', '武昌区', '42', '湖北省', '4201', '武汉市', '420106', '武昌区', '', '', '', '', 3, 1, ''), ('420107', '4201', '00,42,4201', '青山区', '42', '湖北省', '4201', '武汉市', '420107', '青山区', '', '', '', '', 3, 1, ''), ('420111', '4201', '00,42,4201', '洪山区', '42', '湖北省', '4201', '武汉市', '420111', '洪山区', '', '', '', '', 3, 1, ''), ('420112', '4201', '00,42,4201', '东西湖区', '42', '湖北省', '4201', '武汉市', '420112', '东西湖区', '', '', '', '', 3, 1, ''), ('420113', '4201', '00,42,4201', '汉南区', '42', '湖北省', '4201', '武汉市', '420113', '汉南区', '', '', '', '', 3, 1, ''), ('420114', '4201', '00,42,4201', '蔡甸区', '42', '湖北省', '4201', '武汉市', '420114', '蔡甸区', '', '', '', '', 3, 1, ''), ('420115', '4201', '00,42,4201', '江夏区', '42', '湖北省', '4201', '武汉市', '420115', '江夏区', '', '', '', '', 3, 1, ''), ('420116', '4201', '00,42,4201', '黄陂区', '42', '湖北省', '4201', '武汉市', '420116', '黄陂区', '', '', '', '', 3, 1, ''), ('420117', '4201', '00,42,4201', '新洲区', '42', '湖北省', '4201', '武汉市', '420117', '新洲区', '', '', '', '', 3, 1, ''), ('4202', '42', '00,42', '黄石市', '42', '湖北省', '4202', '黄石市', '', '', '', '', '', '', 2, 1, ''), ('420202', '4202', '00,42,4202', '黄石港区', '42', '湖北省', '4202', '黄石市', '420202', '黄石港区', '', '', '', '', 3, 1, ''), ('420203', '4202', '00,42,4202', '西塞山区', '42', '湖北省', '4202', '黄石市', '420203', '西塞山区', '', '', '', '', 3, 1, ''), ('420204', '4202', '00,42,4202', '下陆区', '42', '湖北省', '4202', '黄石市', '420204', '下陆区', '', '', '', '', 3, 1, ''), ('420205', '4202', '00,42,4202', '铁山区', '42', '湖北省', '4202', '黄石市', '420205', '铁山区', '', '', '', '', 3, 1, ''), ('420222', '4202', '00,42,4202', '阳新县', '42', '湖北省', '4202', '黄石市', '420222', '阳新县', '', '', '', '', 3, 1, ''), ('420281', '4202', '00,42,4202', '大冶市', '42', '湖北省', '4202', '黄石市', '420281', '大冶市', '', '', '', '', 3, 1, ''), ('4203', '42', '00,42', '十堰市', '42', '湖北省', '4203', '十堰市', '', '', '', '', '', '', 2, 1, ''), ('420302', '4203', '00,42,4203', '茅箭区', '42', '湖北省', '4203', '十堰市', '420302', '茅箭区', '', '', '', '', 3, 1, ''), ('420303', '4203', '00,42,4203', '张湾区', '42', '湖北省', '4203', '十堰市', '420303', '张湾区', '', '', '', '', 3, 1, ''), ('420304', '4203', '00,42,4203', '郧阳区', '42', '湖北省', '4203', '十堰市', '420304', '郧阳区', '', '', '', '', 3, 1, ''), ('420322', '4203', '00,42,4203', '郧西县', '42', '湖北省', '4203', '十堰市', '420322', '郧西县', '', '', '', '', 3, 1, ''), ('420323', '4203', '00,42,4203', '竹山县', '42', '湖北省', '4203', '十堰市', '420323', '竹山县', '', '', '', '', 3, 1, ''), ('420324', '4203', '00,42,4203', '竹溪县', '42', '湖北省', '4203', '十堰市', '420324', '竹溪县', '', '', '', '', 3, 1, ''), ('420325', '4203', '00,42,4203', '房县', '42', '湖北省', '4203', '十堰市', '420325', '房县', '', '', '', '', 3, 1, ''), ('420381', '4203', '00,42,4203', '丹江口市', '42', '湖北省', '4203', '十堰市', '420381', '丹江口市', '', '', '', '', 3, 1, ''), ('4205', '42', '00,42', '宜昌市', '42', '湖北省', '4205', '宜昌市', '', '', '', '', '', '', 2, 1, ''), ('420502', '4205', '00,42,4205', '西陵区', '42', '湖北省', '4205', '宜昌市', '420502', '西陵区', '', '', '', '', 3, 1, ''), ('420503', '4205', '00,42,4205', '伍家岗区', '42', '湖北省', '4205', '宜昌市', '420503', '伍家岗区', '', '', '', '', 3, 1, ''), ('420504', '4205', '00,42,4205', '点军区', '42', '湖北省', '4205', '宜昌市', '420504', '点军区', '', '', '', '', 3, 1, ''), ('420505', '4205', '00,42,4205', '猇亭区', '42', '湖北省', '4205', '宜昌市', '420505', '猇亭区', '', '', '', '', 3, 1, ''), ('420506', '4205', '00,42,4205', '夷陵区', '42', '湖北省', '4205', '宜昌市', '420506', '夷陵区', '', '', '', '', 3, 1, ''), ('420525', '4205', '00,42,4205', '远安县', '42', '湖北省', '4205', '宜昌市', '420525', '远安县', '', '', '', '', 3, 1, ''), ('420526', '4205', '00,42,4205', '兴山县', '42', '湖北省', '4205', '宜昌市', '420526', '兴山县', '', '', '', '', 3, 1, ''), ('420527', '4205', '00,42,4205', '秭归县', '42', '湖北省', '4205', '宜昌市', '420527', '秭归县', '', '', '', '', 3, 1, ''), ('420528', '4205', '00,42,4205', '长阳土家族自治县', '42', '湖北省', '4205', '宜昌市', '420528', '长阳土家族自治县', '', '', '', '', 3, 1, ''), ('420529', '4205', '00,42,4205', '五峰土家族自治县', '42', '湖北省', '4205', '宜昌市', '420529', '五峰土家族自治县', '', '', '', '', 3, 1, ''), ('420581', '4205', '00,42,4205', '宜都市', '42', '湖北省', '4205', '宜昌市', '420581', '宜都市', '', '', '', '', 3, 1, ''), ('420582', '4205', '00,42,4205', '当阳市', '42', '湖北省', '4205', '宜昌市', '420582', '当阳市', '', '', '', '', 3, 1, ''), ('420583', '4205', '00,42,4205', '枝江市', '42', '湖北省', '4205', '宜昌市', '420583', '枝江市', '', '', '', '', 3, 1, ''), ('4206', '42', '00,42', '襄阳市', '42', '湖北省', '4206', '襄阳市', '', '', '', '', '', '', 2, 1, ''), ('420602', '4206', '00,42,4206', '襄城区', '42', '湖北省', '4206', '襄阳市', '420602', '襄城区', '', '', '', '', 3, 1, ''), ('420606', '4206', '00,42,4206', '樊城区', '42', '湖北省', '4206', '襄阳市', '420606', '樊城区', '', '', '', '', 3, 1, ''), ('420607', '4206', '00,42,4206', '襄州区', '42', '湖北省', '4206', '襄阳市', '420607', '襄州区', '', '', '', '', 3, 1, ''), ('420624', '4206', '00,42,4206', '南漳县', '42', '湖北省', '4206', '襄阳市', '420624', '南漳县', '', '', '', '', 3, 1, ''), ('420625', '4206', '00,42,4206', '谷城县', '42', '湖北省', '4206', '襄阳市', '420625', '谷城县', '', '', '', '', 3, 1, ''), ('420626', '4206', '00,42,4206', '保康县', '42', '湖北省', '4206', '襄阳市', '420626', '保康县', '', '', '', '', 3, 1, ''), ('420682', '4206', '00,42,4206', '老河口市', '42', '湖北省', '4206', '襄阳市', '420682', '老河口市', '', '', '', '', 3, 1, ''), ('420683', '4206', '00,42,4206', '枣阳市', '42', '湖北省', '4206', '襄阳市', '420683', '枣阳市', '', '', '', '', 3, 1, ''), ('420684', '4206', '00,42,4206', '宜城市', '42', '湖北省', '4206', '襄阳市', '420684', '宜城市', '', '', '', '', 3, 1, ''), ('4207', '42', '00,42', '鄂州市', '42', '湖北省', '4207', '鄂州市', '', '', '', '', '', '', 2, 1, ''), ('420702', '4207', '00,42,4207', '梁子湖区', '42', '湖北省', '4207', '鄂州市', '420702', '梁子湖区', '', '', '', '', 3, 1, ''), ('420703', '4207', '00,42,4207', '华容区', '42', '湖北省', '4207', '鄂州市', '420703', '华容区', '', '', '', '', 3, 1, ''), ('420704', '4207', '00,42,4207', '鄂城区', '42', '湖北省', '4207', '鄂州市', '420704', '鄂城区', '', '', '', '', 3, 1, ''), ('4208', '42', '00,42', '荆门市', '42', '湖北省', '4208', '荆门市', '', '', '', '', '', '', 2, 1, ''), ('420802', '4208', '00,42,4208', '东宝区', '42', '湖北省', '4208', '荆门市', '420802', '东宝区', '', '', '', '', 3, 1, ''), ('420804', '4208', '00,42,4208', '掇刀区', '42', '湖北省', '4208', '荆门市', '420804', '掇刀区', '', '', '', '', 3, 1, ''), ('420822', '4208', '00,42,4208', '沙洋县', '42', '湖北省', '4208', '荆门市', '420822', '沙洋县', '', '', '', '', 3, 1, ''), ('420881', '4208', '00,42,4208', '钟祥市', '42', '湖北省', '4208', '荆门市', '420881', '钟祥市', '', '', '', '', 3, 1, ''), ('420882', '4208', '00,42,4208', '京山市', '42', '湖北省', '4208', '荆门市', '420882', '京山市', '', '', '', '', 3, 1, ''), ('4209', '42', '00,42', '孝感市', '42', '湖北省', '4209', '孝感市', '', '', '', '', '', '', 2, 1, ''), ('420902', '4209', '00,42,4209', '孝南区', '42', '湖北省', '4209', '孝感市', '420902', '孝南区', '', '', '', '', 3, 1, ''), ('420921', '4209', '00,42,4209', '孝昌县', '42', '湖北省', '4209', '孝感市', '420921', '孝昌县', '', '', '', '', 3, 1, ''), ('420922', '4209', '00,42,4209', '大悟县', '42', '湖北省', '4209', '孝感市', '420922', '大悟县', '', '', '', '', 3, 1, ''), ('420923', '4209', '00,42,4209', '云梦县', '42', '湖北省', '4209', '孝感市', '420923', '云梦县', '', '', '', '', 3, 1, ''), ('420981', '4209', '00,42,4209', '应城市', '42', '湖北省', '4209', '孝感市', '420981', '应城市', '', '', '', '', 3, 1, ''), ('420982', '4209', '00,42,4209', '安陆市', '42', '湖北省', '4209', '孝感市', '420982', '安陆市', '', '', '', '', 3, 1, ''), ('420984', '4209', '00,42,4209', '汉川市', '42', '湖北省', '4209', '孝感市', '420984', '汉川市', '', '', '', '', 3, 1, ''), ('4210', '42', '00,42', '荆州市', '42', '湖北省', '4210', '荆州市', '', '', '', '', '', '', 2, 1, ''), ('421002', '4210', '00,42,4210', '沙市区', '42', '湖北省', '4210', '荆州市', '421002', '沙市区', '', '', '', '', 3, 1, ''), ('421003', '4210', '00,42,4210', '荆州区', '42', '湖北省', '4210', '荆州市', '421003', '荆州区', '', '', '', '', 3, 1, ''), ('421022', '4210', '00,42,4210', '公安县', '42', '湖北省', '4210', '荆州市', '421022', '公安县', '', '', '', '', 3, 1, ''), ('421023', '4210', '00,42,4210', '监利县', '42', '湖北省', '4210', '荆州市', '421023', '监利县', '', '', '', '', 3, 1, ''), ('421024', '4210', '00,42,4210', '江陵县', '42', '湖北省', '4210', '荆州市', '421024', '江陵县', '', '', '', '', 3, 1, ''), ('421081', '4210', '00,42,4210', '石首市', '42', '湖北省', '4210', '荆州市', '421081', '石首市', '', '', '', '', 3, 1, ''), ('421083', '4210', '00,42,4210', '洪湖市', '42', '湖北省', '4210', '荆州市', '421083', '洪湖市', '', '', '', '', 3, 1, ''), ('421087', '4210', '00,42,4210', '松滋市', '42', '湖北省', '4210', '荆州市', '421087', '松滋市', '', '', '', '', 3, 1, ''), ('4211', '42', '00,42', '黄冈市', '42', '湖北省', '4211', '黄冈市', '', '', '', '', '', '', 2, 1, ''), ('421102', '4211', '00,42,4211', '黄州区', '42', '湖北省', '4211', '黄冈市', '421102', '黄州区', '', '', '', '', 3, 1, ''), ('421121', '4211', '00,42,4211', '团风县', '42', '湖北省', '4211', '黄冈市', '421121', '团风县', '', '', '', '', 3, 1, ''), ('421122', '4211', '00,42,4211', '红安县', '42', '湖北省', '4211', '黄冈市', '421122', '红安县', '', '', '', '', 3, 1, ''), ('421123', '4211', '00,42,4211', '罗田县', '42', '湖北省', '4211', '黄冈市', '421123', '罗田县', '', '', '', '', 3, 1, ''), ('421124', '4211', '00,42,4211', '英山县', '42', '湖北省', '4211', '黄冈市', '421124', '英山县', '', '', '', '', 3, 1, ''), ('421125', '4211', '00,42,4211', '浠水县', '42', '湖北省', '4211', '黄冈市', '421125', '浠水县', '', '', '', '', 3, 1, ''), ('421126', '4211', '00,42,4211', '蕲春县', '42', '湖北省', '4211', '黄冈市', '421126', '蕲春县', '', '', '', '', 3, 1, ''), ('421127', '4211', '00,42,4211', '黄梅县', '42', '湖北省', '4211', '黄冈市', '421127', '黄梅县', '', '', '', '', 3, 1, ''), ('421181', '4211', '00,42,4211', '麻城市', '42', '湖北省', '4211', '黄冈市', '421181', '麻城市', '', '', '', '', 3, 1, ''), ('421182', '4211', '00,42,4211', '武穴市', '42', '湖北省', '4211', '黄冈市', '421182', '武穴市', '', '', '', '', 3, 1, ''), ('4212', '42', '00,42', '咸宁市', '42', '湖北省', '4212', '咸宁市', '', '', '', '', '', '', 2, 1, ''), ('421202', '4212', '00,42,4212', '咸安区', '42', '湖北省', '4212', '咸宁市', '421202', '咸安区', '', '', '', '', 3, 1, ''), ('421221', '4212', '00,42,4212', '嘉鱼县', '42', '湖北省', '4212', '咸宁市', '421221', '嘉鱼县', '', '', '', '', 3, 1, ''), ('421222', '4212', '00,42,4212', '通城县', '42', '湖北省', '4212', '咸宁市', '421222', '通城县', '', '', '', '', 3, 1, ''), ('421223', '4212', '00,42,4212', '崇阳县', '42', '湖北省', '4212', '咸宁市', '421223', '崇阳县', '', '', '', '', 3, 1, ''), ('421224', '4212', '00,42,4212', '通山县', '42', '湖北省', '4212', '咸宁市', '421224', '通山县', '', '', '', '', 3, 1, ''), ('421281', '4212', '00,42,4212', '赤壁市', '42', '湖北省', '4212', '咸宁市', '421281', '赤壁市', '', '', '', '', 3, 1, ''), ('4213', '42', '00,42', '随州市', '42', '湖北省', '4213', '随州市', '', '', '', '', '', '', 2, 1, ''), ('421303', '4213', '00,42,4213', '曾都区', '42', '湖北省', '4213', '随州市', '421303', '曾都区', '', '', '', '', 3, 1, ''), ('421321', '4213', '00,42,4213', '随县', '42', '湖北省', '4213', '随州市', '421321', '随县', '', '', '', '', 3, 1, ''), ('421381', '4213', '00,42,4213', '广水市', '42', '湖北省', '4213', '随州市', '421381', '广水市', '', '', '', '', 3, 1, ''), ('4228', '42', '00,42', '恩施土家族苗族自治州', '42', '湖北省', '4228', '恩施土家族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('422801', '4228', '00,42,4228', '恩施市', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422801', '恩施市', '', '', '', '', 3, 1, ''), ('422802', '4228', '00,42,4228', '利川市', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422802', '利川市', '', '', '', '', 3, 1, ''), ('422822', '4228', '00,42,4228', '建始县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422822', '建始县', '', '', '', '', 3, 1, ''), ('422823', '4228', '00,42,4228', '巴东县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422823', '巴东县', '', '', '', '', 3, 1, ''), ('422825', '4228', '00,42,4228', '宣恩县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422825', '宣恩县', '', '', '', '', 3, 1, ''), ('422826', '4228', '00,42,4228', '咸丰县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422826', '咸丰县', '', '', '', '', 3, 1, ''), ('422827', '4228', '00,42,4228', '来凤县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422827', '来凤县', '', '', '', '', 3, 1, ''), ('422828', '4228', '00,42,4228', '鹤峰县', '42', '湖北省', '4228', '恩施土家族苗族自治州', '422828', '鹤峰县', '', '', '', '', 3, 1, ''), ('4290', '42', '00,42', '省直辖县级行政区', '42', '湖北省', '4290', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('429004', '4290', '00,42,4290', '仙桃市', '42', '湖北省', '4290', '省直辖县级行政区', '429004', '仙桃市', '', '', '', '', 3, 1, ''), ('429005', '4290', '00,42,4290', '潜江市', '42', '湖北省', '4290', '省直辖县级行政区', '429005', '潜江市', '', '', '', '', 3, 1, ''), ('429006', '4290', '00,42,4290', '天门市', '42', '湖北省', '4290', '省直辖县级行政区', '429006', '天门市', '', '', '', '', 3, 1, ''), ('429021', '4290', '00,42,4290', '神农架林区', '42', '湖北省', '4290', '省直辖县级行政区', '429021', '神农架林区', '', '', '', '', 3, 1, ''), ('43', '00', '00', '湖南省', '43', '湖南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4301', '43', '00,43', '长沙市', '43', '湖南省', '4301', '长沙市', '', '', '', '', '', '', 2, 1, ''), ('430102', '4301', '00,43,4301', '芙蓉区', '43', '湖南省', '4301', '长沙市', '430102', '芙蓉区', '', '', '', '', 3, 1, ''), ('430103', '4301', '00,43,4301', '天心区', '43', '湖南省', '4301', '长沙市', '430103', '天心区', '', '', '', '', 3, 1, ''), ('430104', '4301', '00,43,4301', '岳麓区', '43', '湖南省', '4301', '长沙市', '430104', '岳麓区', '', '', '', '', 3, 1, ''), ('430105', '4301', '00,43,4301', '开福区', '43', '湖南省', '4301', '长沙市', '430105', '开福区', '', '', '', '', 3, 1, ''), ('430111', '4301', '00,43,4301', '雨花区', '43', '湖南省', '4301', '长沙市', '430111', '雨花区', '', '', '', '', 3, 1, ''), ('430112', '4301', '00,43,4301', '望城区', '43', '湖南省', '4301', '长沙市', '430112', '望城区', '', '', '', '', 3, 1, ''), ('430121', '4301', '00,43,4301', '长沙县', '43', '湖南省', '4301', '长沙市', '430121', '长沙县', '', '', '', '', 3, 1, ''), ('430181', '4301', '00,43,4301', '浏阳市', '43', '湖南省', '4301', '长沙市', '430181', '浏阳市', '', '', '', '', 3, 1, ''), ('430182', '4301', '00,43,4301', '宁乡市', '43', '湖南省', '4301', '长沙市', '430182', '宁乡市', '', '', '', '', 3, 1, ''), ('4302', '43', '00,43', '株洲市', '43', '湖南省', '4302', '株洲市', '', '', '', '', '', '', 2, 1, ''), ('430202', '4302', '00,43,4302', '荷塘区', '43', '湖南省', '4302', '株洲市', '430202', '荷塘区', '', '', '', '', 3, 1, ''), ('430203', '4302', '00,43,4302', '芦淞区', '43', '湖南省', '4302', '株洲市', '430203', '芦淞区', '', '', '', '', 3, 1, ''), ('430204', '4302', '00,43,4302', '石峰区', '43', '湖南省', '4302', '株洲市', '430204', '石峰区', '', '', '', '', 3, 1, ''), ('430211', '4302', '00,43,4302', '天元区', '43', '湖南省', '4302', '株洲市', '430211', '天元区', '', '', '', '', 3, 1, ''), ('430212', '4302', '00,43,4302', '渌口区', '43', '湖南省', '4302', '株洲市', '430212', '渌口区', '', '', '', '', 3, 1, ''), ('430223', '4302', '00,43,4302', '攸县', '43', '湖南省', '4302', '株洲市', '430223', '攸县', '', '', '', '', 3, 1, ''), ('430224', '4302', '00,43,4302', '茶陵县', '43', '湖南省', '4302', '株洲市', '430224', '茶陵县', '', '', '', '', 3, 1, ''), ('430225', '4302', '00,43,4302', '炎陵县', '43', '湖南省', '4302', '株洲市', '430225', '炎陵县', '', '', '', '', 3, 1, ''), ('430281', '4302', '00,43,4302', '醴陵市', '43', '湖南省', '4302', '株洲市', '430281', '醴陵市', '', '', '', '', 3, 1, ''), ('4303', '43', '00,43', '湘潭市', '43', '湖南省', '4303', '湘潭市', '', '', '', '', '', '', 2, 1, ''), ('430302', '4303', '00,43,4303', '雨湖区', '43', '湖南省', '4303', '湘潭市', '430302', '雨湖区', '', '', '', '', 3, 1, ''), ('430304', '4303', '00,43,4303', '岳塘区', '43', '湖南省', '4303', '湘潭市', '430304', '岳塘区', '', '', '', '', 3, 1, ''), ('430321', '4303', '00,43,4303', '湘潭县', '43', '湖南省', '4303', '湘潭市', '430321', '湘潭县', '', '', '', '', 3, 1, ''), ('430381', '4303', '00,43,4303', '湘乡市', '43', '湖南省', '4303', '湘潭市', '430381', '湘乡市', '', '', '', '', 3, 1, ''), ('430382', '4303', '00,43,4303', '韶山市', '43', '湖南省', '4303', '湘潭市', '430382', '韶山市', '', '', '', '', 3, 1, ''), ('4304', '43', '00,43', '衡阳市', '43', '湖南省', '4304', '衡阳市', '', '', '', '', '', '', 2, 1, ''), ('430405', '4304', '00,43,4304', '珠晖区', '43', '湖南省', '4304', '衡阳市', '430405', '珠晖区', '', '', '', '', 3, 1, ''), ('430406', '4304', '00,43,4304', '雁峰区', '43', '湖南省', '4304', '衡阳市', '430406', '雁峰区', '', '', '', '', 3, 1, ''), ('430407', '4304', '00,43,4304', '石鼓区', '43', '湖南省', '4304', '衡阳市', '430407', '石鼓区', '', '', '', '', 3, 1, ''), ('430408', '4304', '00,43,4304', '蒸湘区', '43', '湖南省', '4304', '衡阳市', '430408', '蒸湘区', '', '', '', '', 3, 1, ''), ('430412', '4304', '00,43,4304', '南岳区', '43', '湖南省', '4304', '衡阳市', '430412', '南岳区', '', '', '', '', 3, 1, ''), ('430421', '4304', '00,43,4304', '衡阳县', '43', '湖南省', '4304', '衡阳市', '430421', '衡阳县', '', '', '', '', 3, 1, ''), ('430422', '4304', '00,43,4304', '衡南县', '43', '湖南省', '4304', '衡阳市', '430422', '衡南县', '', '', '', '', 3, 1, ''), ('430423', '4304', '00,43,4304', '衡山县', '43', '湖南省', '4304', '衡阳市', '430423', '衡山县', '', '', '', '', 3, 1, ''), ('430424', '4304', '00,43,4304', '衡东县', '43', '湖南省', '4304', '衡阳市', '430424', '衡东县', '', '', '', '', 3, 1, ''), ('430426', '4304', '00,43,4304', '祁东县', '43', '湖南省', '4304', '衡阳市', '430426', '祁东县', '', '', '', '', 3, 1, ''), ('430481', '4304', '00,43,4304', '耒阳市', '43', '湖南省', '4304', '衡阳市', '430481', '耒阳市', '', '', '', '', 3, 1, ''), ('430482', '4304', '00,43,4304', '常宁市', '43', '湖南省', '4304', '衡阳市', '430482', '常宁市', '', '', '', '', 3, 1, ''), ('4305', '43', '00,43', '邵阳市', '43', '湖南省', '4305', '邵阳市', '', '', '', '', '', '', 2, 1, ''), ('430502', '4305', '00,43,4305', '双清区', '43', '湖南省', '4305', '邵阳市', '430502', '双清区', '', '', '', '', 3, 1, ''), ('430503', '4305', '00,43,4305', '大祥区', '43', '湖南省', '4305', '邵阳市', '430503', '大祥区', '', '', '', '', 3, 1, ''), ('430511', '4305', '00,43,4305', '北塔区', '43', '湖南省', '4305', '邵阳市', '430511', '北塔区', '', '', '', '', 3, 1, ''), ('430522', '4305', '00,43,4305', '新邵县', '43', '湖南省', '4305', '邵阳市', '430522', '新邵县', '', '', '', '', 3, 1, ''), ('430523', '4305', '00,43,4305', '邵阳县', '43', '湖南省', '4305', '邵阳市', '430523', '邵阳县', '', '', '', '', 3, 1, ''), ('430524', '4305', '00,43,4305', '隆回县', '43', '湖南省', '4305', '邵阳市', '430524', '隆回县', '', '', '', '', 3, 1, ''), ('430525', '4305', '00,43,4305', '洞口县', '43', '湖南省', '4305', '邵阳市', '430525', '洞口县', '', '', '', '', 3, 1, ''), ('430527', '4305', '00,43,4305', '绥宁县', '43', '湖南省', '4305', '邵阳市', '430527', '绥宁县', '', '', '', '', 3, 1, ''), ('430528', '4305', '00,43,4305', '新宁县', '43', '湖南省', '4305', '邵阳市', '430528', '新宁县', '', '', '', '', 3, 1, ''), ('430529', '4305', '00,43,4305', '城步苗族自治县', '43', '湖南省', '4305', '邵阳市', '430529', '城步苗族自治县', '', '', '', '', 3, 1, ''), ('430581', '4305', '00,43,4305', '武冈市', '43', '湖南省', '4305', '邵阳市', '430581', '武冈市', '', '', '', '', 3, 1, ''), ('430582', '4305', '00,43,4305', '邵东市', '43', '湖南省', '4305', '邵阳市', '430582', '邵东市', '', '', '', '', 3, 1, ''), ('4306', '43', '00,43', '岳阳市', '43', '湖南省', '4306', '岳阳市', '', '', '', '', '', '', 2, 1, ''), ('430602', '4306', '00,43,4306', '岳阳楼区', '43', '湖南省', '4306', '岳阳市', '430602', '岳阳楼区', '', '', '', '', 3, 1, ''), ('430603', '4306', '00,43,4306', '云溪区', '43', '湖南省', '4306', '岳阳市', '430603', '云溪区', '', '', '', '', 3, 1, ''), ('430611', '4306', '00,43,4306', '君山区', '43', '湖南省', '4306', '岳阳市', '430611', '君山区', '', '', '', '', 3, 1, ''), ('430621', '4306', '00,43,4306', '岳阳县', '43', '湖南省', '4306', '岳阳市', '430621', '岳阳县', '', '', '', '', 3, 1, ''), ('430623', '4306', '00,43,4306', '华容县', '43', '湖南省', '4306', '岳阳市', '430623', '华容县', '', '', '', '', 3, 1, ''), ('430624', '4306', '00,43,4306', '湘阴县', '43', '湖南省', '4306', '岳阳市', '430624', '湘阴县', '', '', '', '', 3, 1, ''), ('430626', '4306', '00,43,4306', '平江县', '43', '湖南省', '4306', '岳阳市', '430626', '平江县', '', '', '', '', 3, 1, ''), ('430681', '4306', '00,43,4306', '汨罗市', '43', '湖南省', '4306', '岳阳市', '430681', '汨罗市', '', '', '', '', 3, 1, ''), ('430682', '4306', '00,43,4306', '临湘市', '43', '湖南省', '4306', '岳阳市', '430682', '临湘市', '', '', '', '', 3, 1, ''), ('4307', '43', '00,43', '常德市', '43', '湖南省', '4307', '常德市', '', '', '', '', '', '', 2, 1, ''), ('430702', '4307', '00,43,4307', '武陵区', '43', '湖南省', '4307', '常德市', '430702', '武陵区', '', '', '', '', 3, 1, ''), ('430703', '4307', '00,43,4307', '鼎城区', '43', '湖南省', '4307', '常德市', '430703', '鼎城区', '', '', '', '', 3, 1, ''), ('430721', '4307', '00,43,4307', '安乡县', '43', '湖南省', '4307', '常德市', '430721', '安乡县', '', '', '', '', 3, 1, ''), ('430722', '4307', '00,43,4307', '汉寿县', '43', '湖南省', '4307', '常德市', '430722', '汉寿县', '', '', '', '', 3, 1, ''), ('430723', '4307', '00,43,4307', '澧县', '43', '湖南省', '4307', '常德市', '430723', '澧县', '', '', '', '', 3, 1, ''), ('430724', '4307', '00,43,4307', '临澧县', '43', '湖南省', '4307', '常德市', '430724', '临澧县', '', '', '', '', 3, 1, ''), ('430725', '4307', '00,43,4307', '桃源县', '43', '湖南省', '4307', '常德市', '430725', '桃源县', '', '', '', '', 3, 1, ''), ('430726', '4307', '00,43,4307', '石门县', '43', '湖南省', '4307', '常德市', '430726', '石门县', '', '', '', '', 3, 1, ''), ('430781', '4307', '00,43,4307', '津市市', '43', '湖南省', '4307', '常德市', '430781', '津市市', '', '', '', '', 3, 1, ''), ('4308', '43', '00,43', '张家界市', '43', '湖南省', '4308', '张家界市', '', '', '', '', '', '', 2, 1, ''), ('430802', '4308', '00,43,4308', '永定区', '43', '湖南省', '4308', '张家界市', '430802', '永定区', '', '', '', '', 3, 1, ''), ('430811', '4308', '00,43,4308', '武陵源区', '43', '湖南省', '4308', '张家界市', '430811', '武陵源区', '', '', '', '', 3, 1, ''), ('430821', '4308', '00,43,4308', '慈利县', '43', '湖南省', '4308', '张家界市', '430821', '慈利县', '', '', '', '', 3, 1, ''), ('430822', '4308', '00,43,4308', '桑植县', '43', '湖南省', '4308', '张家界市', '430822', '桑植县', '', '', '', '', 3, 1, ''), ('4309', '43', '00,43', '益阳市', '43', '湖南省', '4309', '益阳市', '', '', '', '', '', '', 2, 1, ''), ('430902', '4309', '00,43,4309', '资阳区', '43', '湖南省', '4309', '益阳市', '430902', '资阳区', '', '', '', '', 3, 1, ''), ('430903', '4309', '00,43,4309', '赫山区', '43', '湖南省', '4309', '益阳市', '430903', '赫山区', '', '', '', '', 3, 1, ''), ('430921', '4309', '00,43,4309', '南县', '43', '湖南省', '4309', '益阳市', '430921', '南县', '', '', '', '', 3, 1, ''), ('430922', '4309', '00,43,4309', '桃江县', '43', '湖南省', '4309', '益阳市', '430922', '桃江县', '', '', '', '', 3, 1, ''), ('430923', '4309', '00,43,4309', '安化县', '43', '湖南省', '4309', '益阳市', '430923', '安化县', '', '', '', '', 3, 1, ''), ('430981', '4309', '00,43,4309', '沅江市', '43', '湖南省', '4309', '益阳市', '430981', '沅江市', '', '', '', '', 3, 1, ''), ('4310', '43', '00,43', '郴州市', '43', '湖南省', '4310', '郴州市', '', '', '', '', '', '', 2, 1, ''), ('431002', '4310', '00,43,4310', '北湖区', '43', '湖南省', '4310', '郴州市', '431002', '北湖区', '', '', '', '', 3, 1, ''), ('431003', '4310', '00,43,4310', '苏仙区', '43', '湖南省', '4310', '郴州市', '431003', '苏仙区', '', '', '', '', 3, 1, ''), ('431021', '4310', '00,43,4310', '桂阳县', '43', '湖南省', '4310', '郴州市', '431021', '桂阳县', '', '', '', '', 3, 1, ''), ('431022', '4310', '00,43,4310', '宜章县', '43', '湖南省', '4310', '郴州市', '431022', '宜章县', '', '', '', '', 3, 1, ''), ('431023', '4310', '00,43,4310', '永兴县', '43', '湖南省', '4310', '郴州市', '431023', '永兴县', '', '', '', '', 3, 1, ''), ('431024', '4310', '00,43,4310', '嘉禾县', '43', '湖南省', '4310', '郴州市', '431024', '嘉禾县', '', '', '', '', 3, 1, ''), ('431025', '4310', '00,43,4310', '临武县', '43', '湖南省', '4310', '郴州市', '431025', '临武县', '', '', '', '', 3, 1, ''), ('431026', '4310', '00,43,4310', '汝城县', '43', '湖南省', '4310', '郴州市', '431026', '汝城县', '', '', '', '', 3, 1, ''), ('431027', '4310', '00,43,4310', '桂东县', '43', '湖南省', '4310', '郴州市', '431027', '桂东县', '', '', '', '', 3, 1, ''), ('431028', '4310', '00,43,4310', '安仁县', '43', '湖南省', '4310', '郴州市', '431028', '安仁县', '', '', '', '', 3, 1, ''), ('431081', '4310', '00,43,4310', '资兴市', '43', '湖南省', '4310', '郴州市', '431081', '资兴市', '', '', '', '', 3, 1, ''), ('4311', '43', '00,43', '永州市', '43', '湖南省', '4311', '永州市', '', '', '', '', '', '', 2, 1, ''), ('431102', '4311', '00,43,4311', '零陵区', '43', '湖南省', '4311', '永州市', '431102', '零陵区', '', '', '', '', 3, 1, ''), ('431103', '4311', '00,43,4311', '冷水滩区', '43', '湖南省', '4311', '永州市', '431103', '冷水滩区', '', '', '', '', 3, 1, ''), ('431121', '4311', '00,43,4311', '祁阳县', '43', '湖南省', '4311', '永州市', '431121', '祁阳县', '', '', '', '', 3, 1, ''), ('431122', '4311', '00,43,4311', '东安县', '43', '湖南省', '4311', '永州市', '431122', '东安县', '', '', '', '', 3, 1, ''), ('431123', '4311', '00,43,4311', '双牌县', '43', '湖南省', '4311', '永州市', '431123', '双牌县', '', '', '', '', 3, 1, ''), ('431124', '4311', '00,43,4311', '道县', '43', '湖南省', '4311', '永州市', '431124', '道县', '', '', '', '', 3, 1, ''), ('431125', '4311', '00,43,4311', '江永县', '43', '湖南省', '4311', '永州市', '431125', '江永县', '', '', '', '', 3, 1, ''), ('431126', '4311', '00,43,4311', '宁远县', '43', '湖南省', '4311', '永州市', '431126', '宁远县', '', '', '', '', 3, 1, ''), ('431127', '4311', '00,43,4311', '蓝山县', '43', '湖南省', '4311', '永州市', '431127', '蓝山县', '', '', '', '', 3, 1, ''), ('431128', '4311', '00,43,4311', '新田县', '43', '湖南省', '4311', '永州市', '431128', '新田县', '', '', '', '', 3, 1, ''), ('431129', '4311', '00,43,4311', '江华瑶族自治县', '43', '湖南省', '4311', '永州市', '431129', '江华瑶族自治县', '', '', '', '', 3, 1, ''), ('4312', '43', '00,43', '怀化市', '43', '湖南省', '4312', '怀化市', '', '', '', '', '', '', 2, 1, ''), ('431202', '4312', '00,43,4312', '鹤城区', '43', '湖南省', '4312', '怀化市', '431202', '鹤城区', '', '', '', '', 3, 1, ''), ('431221', '4312', '00,43,4312', '中方县', '43', '湖南省', '4312', '怀化市', '431221', '中方县', '', '', '', '', 3, 1, ''), ('431222', '4312', '00,43,4312', '沅陵县', '43', '湖南省', '4312', '怀化市', '431222', '沅陵县', '', '', '', '', 3, 1, ''), ('431223', '4312', '00,43,4312', '辰溪县', '43', '湖南省', '4312', '怀化市', '431223', '辰溪县', '', '', '', '', 3, 1, ''), ('431224', '4312', '00,43,4312', '溆浦县', '43', '湖南省', '4312', '怀化市', '431224', '溆浦县', '', '', '', '', 3, 1, ''), ('431225', '4312', '00,43,4312', '会同县', '43', '湖南省', '4312', '怀化市', '431225', '会同县', '', '', '', '', 3, 1, ''), ('431226', '4312', '00,43,4312', '麻阳苗族自治县', '43', '湖南省', '4312', '怀化市', '431226', '麻阳苗族自治县', '', '', '', '', 3, 1, ''), ('431227', '4312', '00,43,4312', '新晃侗族自治县', '43', '湖南省', '4312', '怀化市', '431227', '新晃侗族自治县', '', '', '', '', 3, 1, ''), ('431228', '4312', '00,43,4312', '芷江侗族自治县', '43', '湖南省', '4312', '怀化市', '431228', '芷江侗族自治县', '', '', '', '', 3, 1, ''), ('431229', '4312', '00,43,4312', '靖州苗族侗族自治县', '43', '湖南省', '4312', '怀化市', '431229', '靖州苗族侗族自治县', '', '', '', '', 3, 1, ''), ('431230', '4312', '00,43,4312', '通道侗族自治县', '43', '湖南省', '4312', '怀化市', '431230', '通道侗族自治县', '', '', '', '', 3, 1, ''), ('431281', '4312', '00,43,4312', '洪江市', '43', '湖南省', '4312', '怀化市', '431281', '洪江市', '', '', '', '', 3, 1, ''), ('4313', '43', '00,43', '娄底市', '43', '湖南省', '4313', '娄底市', '', '', '', '', '', '', 2, 1, ''), ('431302', '4313', '00,43,4313', '娄星区', '43', '湖南省', '4313', '娄底市', '431302', '娄星区', '', '', '', '', 3, 1, ''), ('431321', '4313', '00,43,4313', '双峰县', '43', '湖南省', '4313', '娄底市', '431321', '双峰县', '', '', '', '', 3, 1, ''), ('431322', '4313', '00,43,4313', '新化县', '43', '湖南省', '4313', '娄底市', '431322', '新化县', '', '', '', '', 3, 1, ''), ('431381', '4313', '00,43,4313', '冷水江市', '43', '湖南省', '4313', '娄底市', '431381', '冷水江市', '', '', '', '', 3, 1, ''), ('431382', '4313', '00,43,4313', '涟源市', '43', '湖南省', '4313', '娄底市', '431382', '涟源市', '', '', '', '', 3, 1, ''), ('4331', '43', '00,43', '湘西土家族苗族自治州', '43', '湖南省', '4331', '湘西土家族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('433101', '4331', '00,43,4331', '吉首市', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433101', '吉首市', '', '', '', '', 3, 1, ''), ('433122', '4331', '00,43,4331', '泸溪县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433122', '泸溪县', '', '', '', '', 3, 1, ''), ('433123', '4331', '00,43,4331', '凤凰县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433123', '凤凰县', '', '', '', '', 3, 1, ''), ('433124', '4331', '00,43,4331', '花垣县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433124', '花垣县', '', '', '', '', 3, 1, ''), ('433125', '4331', '00,43,4331', '保靖县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433125', '保靖县', '', '', '', '', 3, 1, ''), ('433126', '4331', '00,43,4331', '古丈县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433126', '古丈县', '', '', '', '', 3, 1, ''), ('433127', '4331', '00,43,4331', '永顺县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433127', '永顺县', '', '', '', '', 3, 1, ''), ('433130', '4331', '00,43,4331', '龙山县', '43', '湖南省', '4331', '湘西土家族苗族自治州', '433130', '龙山县', '', '', '', '', 3, 1, ''), ('44', '00', '00', '广东省', '44', '广东省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4401', '44', '00,44', '广州市', '44', '广东省', '4401', '广州市', '', '', '', '', '', '', 2, 1, ''), ('440103', '4401', '00,44,4401', '荔湾区', '44', '广东省', '4401', '广州市', '440103', '荔湾区', '', '', '', '', 3, 1, ''), ('440104', '4401', '00,44,4401', '越秀区', '44', '广东省', '4401', '广州市', '440104', '越秀区', '', '', '', '', 3, 1, ''), ('440105', '4401', '00,44,4401', '海珠区', '44', '广东省', '4401', '广州市', '440105', '海珠区', '', '', '', '', 3, 1, ''), ('440106', '4401', '00,44,4401', '天河区', '44', '广东省', '4401', '广州市', '440106', '天河区', '', '', '', '', 3, 1, ''); +INSERT INTO `blade_region` VALUES ('440111', '4401', '00,44,4401', '白云区', '44', '广东省', '4401', '广州市', '440111', '白云区', '', '', '', '', 3, 1, ''), ('440112', '4401', '00,44,4401', '黄埔区', '44', '广东省', '4401', '广州市', '440112', '黄埔区', '', '', '', '', 3, 1, ''), ('440113', '4401', '00,44,4401', '番禺区', '44', '广东省', '4401', '广州市', '440113', '番禺区', '', '', '', '', 3, 1, ''), ('440114', '4401', '00,44,4401', '花都区', '44', '广东省', '4401', '广州市', '440114', '花都区', '', '', '', '', 3, 1, ''), ('440115', '4401', '00,44,4401', '南沙区', '44', '广东省', '4401', '广州市', '440115', '南沙区', '', '', '', '', 3, 1, ''), ('440117', '4401', '00,44,4401', '从化区', '44', '广东省', '4401', '广州市', '440117', '从化区', '', '', '', '', 3, 1, ''), ('440118', '4401', '00,44,4401', '增城区', '44', '广东省', '4401', '广州市', '440118', '增城区', '', '', '', '', 3, 1, ''), ('4402', '44', '00,44', '韶关市', '44', '广东省', '4402', '韶关市', '', '', '', '', '', '', 2, 1, ''), ('440203', '4402', '00,44,4402', '武江区', '44', '广东省', '4402', '韶关市', '440203', '武江区', '', '', '', '', 3, 1, ''), ('440204', '4402', '00,44,4402', '浈江区', '44', '广东省', '4402', '韶关市', '440204', '浈江区', '', '', '', '', 3, 1, ''), ('440205', '4402', '00,44,4402', '曲江区', '44', '广东省', '4402', '韶关市', '440205', '曲江区', '', '', '', '', 3, 1, ''), ('440222', '4402', '00,44,4402', '始兴县', '44', '广东省', '4402', '韶关市', '440222', '始兴县', '', '', '', '', 3, 1, ''), ('440224', '4402', '00,44,4402', '仁化县', '44', '广东省', '4402', '韶关市', '440224', '仁化县', '', '', '', '', 3, 1, ''), ('440229', '4402', '00,44,4402', '翁源县', '44', '广东省', '4402', '韶关市', '440229', '翁源县', '', '', '', '', 3, 1, ''), ('440232', '4402', '00,44,4402', '乳源瑶族自治县', '44', '广东省', '4402', '韶关市', '440232', '乳源瑶族自治县', '', '', '', '', 3, 1, ''), ('440233', '4402', '00,44,4402', '新丰县', '44', '广东省', '4402', '韶关市', '440233', '新丰县', '', '', '', '', 3, 1, ''), ('440281', '4402', '00,44,4402', '乐昌市', '44', '广东省', '4402', '韶关市', '440281', '乐昌市', '', '', '', '', 3, 1, ''), ('440282', '4402', '00,44,4402', '南雄市', '44', '广东省', '4402', '韶关市', '440282', '南雄市', '', '', '', '', 3, 1, ''), ('4403', '44', '00,44', '深圳市', '44', '广东省', '4403', '深圳市', '', '', '', '', '', '', 2, 1, ''), ('440303', '4403', '00,44,4403', '罗湖区', '44', '广东省', '4403', '深圳市', '440303', '罗湖区', '', '', '', '', 3, 1, ''), ('440304', '4403', '00,44,4403', '福田区', '44', '广东省', '4403', '深圳市', '440304', '福田区', '', '', '', '', 3, 1, ''), ('440305', '4403', '00,44,4403', '南山区', '44', '广东省', '4403', '深圳市', '440305', '南山区', '', '', '', '', 3, 1, ''), ('440306', '4403', '00,44,4403', '宝安区', '44', '广东省', '4403', '深圳市', '440306', '宝安区', '', '', '', '', 3, 1, ''), ('440307', '4403', '00,44,4403', '龙岗区', '44', '广东省', '4403', '深圳市', '440307', '龙岗区', '', '', '', '', 3, 1, ''), ('440308', '4403', '00,44,4403', '盐田区', '44', '广东省', '4403', '深圳市', '440308', '盐田区', '', '', '', '', 3, 1, ''), ('440309', '4403', '00,44,4403', '龙华区', '44', '广东省', '4403', '深圳市', '440309', '龙华区', '', '', '', '', 3, 1, ''), ('440310', '4403', '00,44,4403', '坪山区', '44', '广东省', '4403', '深圳市', '440310', '坪山区', '', '', '', '', 3, 1, ''), ('440311', '4403', '00,44,4403', '光明区', '44', '广东省', '4403', '深圳市', '440311', '光明区', '', '', '', '', 3, 1, ''), ('4404', '44', '00,44', '珠海市', '44', '广东省', '4404', '珠海市', '', '', '', '', '', '', 2, 1, ''), ('440402', '4404', '00,44,4404', '香洲区', '44', '广东省', '4404', '珠海市', '440402', '香洲区', '', '', '', '', 3, 1, ''), ('440403', '4404', '00,44,4404', '斗门区', '44', '广东省', '4404', '珠海市', '440403', '斗门区', '', '', '', '', 3, 1, ''), ('440404', '4404', '00,44,4404', '金湾区', '44', '广东省', '4404', '珠海市', '440404', '金湾区', '', '', '', '', 3, 1, ''), ('4405', '44', '00,44', '汕头市', '44', '广东省', '4405', '汕头市', '', '', '', '', '', '', 2, 1, ''), ('440507', '4405', '00,44,4405', '龙湖区', '44', '广东省', '4405', '汕头市', '440507', '龙湖区', '', '', '', '', 3, 1, ''), ('440511', '4405', '00,44,4405', '金平区', '44', '广东省', '4405', '汕头市', '440511', '金平区', '', '', '', '', 3, 1, ''), ('440512', '4405', '00,44,4405', '濠江区', '44', '广东省', '4405', '汕头市', '440512', '濠江区', '', '', '', '', 3, 1, ''), ('440513', '4405', '00,44,4405', '潮阳区', '44', '广东省', '4405', '汕头市', '440513', '潮阳区', '', '', '', '', 3, 1, ''), ('440514', '4405', '00,44,4405', '潮南区', '44', '广东省', '4405', '汕头市', '440514', '潮南区', '', '', '', '', 3, 1, ''), ('440515', '4405', '00,44,4405', '澄海区', '44', '广东省', '4405', '汕头市', '440515', '澄海区', '', '', '', '', 3, 1, ''), ('440523', '4405', '00,44,4405', '南澳县', '44', '广东省', '4405', '汕头市', '440523', '南澳县', '', '', '', '', 3, 1, ''), ('4406', '44', '00,44', '佛山市', '44', '广东省', '4406', '佛山市', '', '', '', '', '', '', 2, 1, ''), ('440604', '4406', '00,44,4406', '禅城区', '44', '广东省', '4406', '佛山市', '440604', '禅城区', '', '', '', '', 3, 1, ''), ('440605', '4406', '00,44,4406', '南海区', '44', '广东省', '4406', '佛山市', '440605', '南海区', '', '', '', '', 3, 1, ''), ('440606', '4406', '00,44,4406', '顺德区', '44', '广东省', '4406', '佛山市', '440606', '顺德区', '', '', '', '', 3, 1, ''), ('440607', '4406', '00,44,4406', '三水区', '44', '广东省', '4406', '佛山市', '440607', '三水区', '', '', '', '', 3, 1, ''), ('440608', '4406', '00,44,4406', '高明区', '44', '广东省', '4406', '佛山市', '440608', '高明区', '', '', '', '', 3, 1, ''), ('4407', '44', '00,44', '江门市', '44', '广东省', '4407', '江门市', '', '', '', '', '', '', 2, 1, ''), ('440703', '4407', '00,44,4407', '蓬江区', '44', '广东省', '4407', '江门市', '440703', '蓬江区', '', '', '', '', 3, 1, ''), ('440704', '4407', '00,44,4407', '江海区', '44', '广东省', '4407', '江门市', '440704', '江海区', '', '', '', '', 3, 1, ''), ('440705', '4407', '00,44,4407', '新会区', '44', '广东省', '4407', '江门市', '440705', '新会区', '', '', '', '', 3, 1, ''), ('440781', '4407', '00,44,4407', '台山市', '44', '广东省', '4407', '江门市', '440781', '台山市', '', '', '', '', 3, 1, ''), ('440783', '4407', '00,44,4407', '开平市', '44', '广东省', '4407', '江门市', '440783', '开平市', '', '', '', '', 3, 1, ''), ('440784', '4407', '00,44,4407', '鹤山市', '44', '广东省', '4407', '江门市', '440784', '鹤山市', '', '', '', '', 3, 1, ''), ('440785', '4407', '00,44,4407', '恩平市', '44', '广东省', '4407', '江门市', '440785', '恩平市', '', '', '', '', 3, 1, ''), ('4408', '44', '00,44', '湛江市', '44', '广东省', '4408', '湛江市', '', '', '', '', '', '', 2, 1, ''), ('440802', '4408', '00,44,4408', '赤坎区', '44', '广东省', '4408', '湛江市', '440802', '赤坎区', '', '', '', '', 3, 1, ''), ('440803', '4408', '00,44,4408', '霞山区', '44', '广东省', '4408', '湛江市', '440803', '霞山区', '', '', '', '', 3, 1, ''), ('440804', '4408', '00,44,4408', '坡头区', '44', '广东省', '4408', '湛江市', '440804', '坡头区', '', '', '', '', 3, 1, ''), ('440811', '4408', '00,44,4408', '麻章区', '44', '广东省', '4408', '湛江市', '440811', '麻章区', '', '', '', '', 3, 1, ''), ('440823', '4408', '00,44,4408', '遂溪县', '44', '广东省', '4408', '湛江市', '440823', '遂溪县', '', '', '', '', 3, 1, ''), ('440825', '4408', '00,44,4408', '徐闻县', '44', '广东省', '4408', '湛江市', '440825', '徐闻县', '', '', '', '', 3, 1, ''), ('440881', '4408', '00,44,4408', '廉江市', '44', '广东省', '4408', '湛江市', '440881', '廉江市', '', '', '', '', 3, 1, ''), ('440882', '4408', '00,44,4408', '雷州市', '44', '广东省', '4408', '湛江市', '440882', '雷州市', '', '', '', '', 3, 1, ''), ('440883', '4408', '00,44,4408', '吴川市', '44', '广东省', '4408', '湛江市', '440883', '吴川市', '', '', '', '', 3, 1, ''), ('4409', '44', '00,44', '茂名市', '44', '广东省', '4409', '茂名市', '', '', '', '', '', '', 2, 1, ''), ('440902', '4409', '00,44,4409', '茂南区', '44', '广东省', '4409', '茂名市', '440902', '茂南区', '', '', '', '', 3, 1, ''), ('440904', '4409', '00,44,4409', '电白区', '44', '广东省', '4409', '茂名市', '440904', '电白区', '', '', '', '', 3, 1, ''), ('440981', '4409', '00,44,4409', '高州市', '44', '广东省', '4409', '茂名市', '440981', '高州市', '', '', '', '', 3, 1, ''), ('440982', '4409', '00,44,4409', '化州市', '44', '广东省', '4409', '茂名市', '440982', '化州市', '', '', '', '', 3, 1, ''), ('440983', '4409', '00,44,4409', '信宜市', '44', '广东省', '4409', '茂名市', '440983', '信宜市', '', '', '', '', 3, 1, ''), ('4412', '44', '00,44', '肇庆市', '44', '广东省', '4412', '肇庆市', '', '', '', '', '', '', 2, 1, ''), ('441202', '4412', '00,44,4412', '端州区', '44', '广东省', '4412', '肇庆市', '441202', '端州区', '', '', '', '', 3, 1, ''), ('441203', '4412', '00,44,4412', '鼎湖区', '44', '广东省', '4412', '肇庆市', '441203', '鼎湖区', '', '', '', '', 3, 1, ''), ('441204', '4412', '00,44,4412', '高要区', '44', '广东省', '4412', '肇庆市', '441204', '高要区', '', '', '', '', 3, 1, ''), ('441223', '4412', '00,44,4412', '广宁县', '44', '广东省', '4412', '肇庆市', '441223', '广宁县', '', '', '', '', 3, 1, ''), ('441224', '4412', '00,44,4412', '怀集县', '44', '广东省', '4412', '肇庆市', '441224', '怀集县', '', '', '', '', 3, 1, ''), ('441225', '4412', '00,44,4412', '封开县', '44', '广东省', '4412', '肇庆市', '441225', '封开县', '', '', '', '', 3, 1, ''), ('441226', '4412', '00,44,4412', '德庆县', '44', '广东省', '4412', '肇庆市', '441226', '德庆县', '', '', '', '', 3, 1, ''), ('441284', '4412', '00,44,4412', '四会市', '44', '广东省', '4412', '肇庆市', '441284', '四会市', '', '', '', '', 3, 1, ''), ('4413', '44', '00,44', '惠州市', '44', '广东省', '4413', '惠州市', '', '', '', '', '', '', 2, 1, ''), ('441302', '4413', '00,44,4413', '惠城区', '44', '广东省', '4413', '惠州市', '441302', '惠城区', '', '', '', '', 3, 1, ''), ('441303', '4413', '00,44,4413', '惠阳区', '44', '广东省', '4413', '惠州市', '441303', '惠阳区', '', '', '', '', 3, 1, ''), ('441322', '4413', '00,44,4413', '博罗县', '44', '广东省', '4413', '惠州市', '441322', '博罗县', '', '', '', '', 3, 1, ''), ('441323', '4413', '00,44,4413', '惠东县', '44', '广东省', '4413', '惠州市', '441323', '惠东县', '', '', '', '', 3, 1, ''), ('441324', '4413', '00,44,4413', '龙门县', '44', '广东省', '4413', '惠州市', '441324', '龙门县', '', '', '', '', 3, 1, ''), ('4414', '44', '00,44', '梅州市', '44', '广东省', '4414', '梅州市', '', '', '', '', '', '', 2, 1, ''), ('441402', '4414', '00,44,4414', '梅江区', '44', '广东省', '4414', '梅州市', '441402', '梅江区', '', '', '', '', 3, 1, ''), ('441403', '4414', '00,44,4414', '梅县区', '44', '广东省', '4414', '梅州市', '441403', '梅县区', '', '', '', '', 3, 1, ''), ('441422', '4414', '00,44,4414', '大埔县', '44', '广东省', '4414', '梅州市', '441422', '大埔县', '', '', '', '', 3, 1, ''), ('441423', '4414', '00,44,4414', '丰顺县', '44', '广东省', '4414', '梅州市', '441423', '丰顺县', '', '', '', '', 3, 1, ''), ('441424', '4414', '00,44,4414', '五华县', '44', '广东省', '4414', '梅州市', '441424', '五华县', '', '', '', '', 3, 1, ''), ('441426', '4414', '00,44,4414', '平远县', '44', '广东省', '4414', '梅州市', '441426', '平远县', '', '', '', '', 3, 1, ''), ('441427', '4414', '00,44,4414', '蕉岭县', '44', '广东省', '4414', '梅州市', '441427', '蕉岭县', '', '', '', '', 3, 1, ''), ('441481', '4414', '00,44,4414', '兴宁市', '44', '广东省', '4414', '梅州市', '441481', '兴宁市', '', '', '', '', 3, 1, ''), ('4415', '44', '00,44', '汕尾市', '44', '广东省', '4415', '汕尾市', '', '', '', '', '', '', 2, 1, ''), ('441502', '4415', '00,44,4415', '城区', '44', '广东省', '4415', '汕尾市', '441502', '城区', '', '', '', '', 3, 1, ''), ('441521', '4415', '00,44,4415', '海丰县', '44', '广东省', '4415', '汕尾市', '441521', '海丰县', '', '', '', '', 3, 1, ''), ('441523', '4415', '00,44,4415', '陆河县', '44', '广东省', '4415', '汕尾市', '441523', '陆河县', '', '', '', '', 3, 1, ''), ('441581', '4415', '00,44,4415', '陆丰市', '44', '广东省', '4415', '汕尾市', '441581', '陆丰市', '', '', '', '', 3, 1, ''), ('4416', '44', '00,44', '河源市', '44', '广东省', '4416', '河源市', '', '', '', '', '', '', 2, 1, ''), ('441602', '4416', '00,44,4416', '源城区', '44', '广东省', '4416', '河源市', '441602', '源城区', '', '', '', '', 3, 1, ''), ('441621', '4416', '00,44,4416', '紫金县', '44', '广东省', '4416', '河源市', '441621', '紫金县', '', '', '', '', 3, 1, ''), ('441622', '4416', '00,44,4416', '龙川县', '44', '广东省', '4416', '河源市', '441622', '龙川县', '', '', '', '', 3, 1, ''), ('441623', '4416', '00,44,4416', '连平县', '44', '广东省', '4416', '河源市', '441623', '连平县', '', '', '', '', 3, 1, ''), ('441624', '4416', '00,44,4416', '和平县', '44', '广东省', '4416', '河源市', '441624', '和平县', '', '', '', '', 3, 1, ''), ('441625', '4416', '00,44,4416', '东源县', '44', '广东省', '4416', '河源市', '441625', '东源县', '', '', '', '', 3, 1, ''), ('4417', '44', '00,44', '阳江市', '44', '广东省', '4417', '阳江市', '', '', '', '', '', '', 2, 1, ''), ('441702', '4417', '00,44,4417', '江城区', '44', '广东省', '4417', '阳江市', '441702', '江城区', '', '', '', '', 3, 1, ''), ('441704', '4417', '00,44,4417', '阳东区', '44', '广东省', '4417', '阳江市', '441704', '阳东区', '', '', '', '', 3, 1, ''), ('441721', '4417', '00,44,4417', '阳西县', '44', '广东省', '4417', '阳江市', '441721', '阳西县', '', '', '', '', 3, 1, ''), ('441781', '4417', '00,44,4417', '阳春市', '44', '广东省', '4417', '阳江市', '441781', '阳春市', '', '', '', '', 3, 1, ''), ('4418', '44', '00,44', '清远市', '44', '广东省', '4418', '清远市', '', '', '', '', '', '', 2, 1, ''), ('441802', '4418', '00,44,4418', '清城区', '44', '广东省', '4418', '清远市', '441802', '清城区', '', '', '', '', 3, 1, ''), ('441803', '4418', '00,44,4418', '清新区', '44', '广东省', '4418', '清远市', '441803', '清新区', '', '', '', '', 3, 1, ''), ('441821', '4418', '00,44,4418', '佛冈县', '44', '广东省', '4418', '清远市', '441821', '佛冈县', '', '', '', '', 3, 1, ''), ('441823', '4418', '00,44,4418', '阳山县', '44', '广东省', '4418', '清远市', '441823', '阳山县', '', '', '', '', 3, 1, ''), ('441825', '4418', '00,44,4418', '连山壮族瑶族自治县', '44', '广东省', '4418', '清远市', '441825', '连山壮族瑶族自治县', '', '', '', '', 3, 1, ''), ('441826', '4418', '00,44,4418', '连南瑶族自治县', '44', '广东省', '4418', '清远市', '441826', '连南瑶族自治县', '', '', '', '', 3, 1, ''), ('441881', '4418', '00,44,4418', '英德市', '44', '广东省', '4418', '清远市', '441881', '英德市', '', '', '', '', 3, 1, ''), ('441882', '4418', '00,44,4418', '连州市', '44', '广东省', '4418', '清远市', '441882', '连州市', '', '', '', '', 3, 1, ''), ('4419', '44', '00,44', '东莞市', '44', '广东省', '4419', '东莞市', '', '', '', '', '', '', 2, 1, ''), ('441900', '4419', '00,44,4419', '东莞市', '44', '广东省', '4419', '东莞市', '441900', '东莞市', '', '', '', '', 3, 1, ''), ('4420', '44', '00,44', '中山市', '44', '广东省', '4420', '中山市', '', '', '', '', '', '', 2, 1, ''), ('442000', '4420', '00,44,4420', '中山市', '44', '广东省', '4420', '中山市', '442000', '中山市', '', '', '', '', 3, 1, ''), ('4451', '44', '00,44', '潮州市', '44', '广东省', '4451', '潮州市', '', '', '', '', '', '', 2, 1, ''), ('445102', '4451', '00,44,4451', '湘桥区', '44', '广东省', '4451', '潮州市', '445102', '湘桥区', '', '', '', '', 3, 1, ''), ('445103', '4451', '00,44,4451', '潮安区', '44', '广东省', '4451', '潮州市', '445103', '潮安区', '', '', '', '', 3, 1, ''), ('445122', '4451', '00,44,4451', '饶平县', '44', '广东省', '4451', '潮州市', '445122', '饶平县', '', '', '', '', 3, 1, ''), ('4452', '44', '00,44', '揭阳市', '44', '广东省', '4452', '揭阳市', '', '', '', '', '', '', 2, 1, ''), ('445202', '4452', '00,44,4452', '榕城区', '44', '广东省', '4452', '揭阳市', '445202', '榕城区', '', '', '', '', 3, 1, ''), ('445203', '4452', '00,44,4452', '揭东区', '44', '广东省', '4452', '揭阳市', '445203', '揭东区', '', '', '', '', 3, 1, ''), ('445222', '4452', '00,44,4452', '揭西县', '44', '广东省', '4452', '揭阳市', '445222', '揭西县', '', '', '', '', 3, 1, ''), ('445224', '4452', '00,44,4452', '惠来县', '44', '广东省', '4452', '揭阳市', '445224', '惠来县', '', '', '', '', 3, 1, ''), ('445281', '4452', '00,44,4452', '普宁市', '44', '广东省', '4452', '揭阳市', '445281', '普宁市', '', '', '', '', 3, 1, ''), ('4453', '44', '00,44', '云浮市', '44', '广东省', '4453', '云浮市', '', '', '', '', '', '', 2, 1, ''), ('445302', '4453', '00,44,4453', '云城区', '44', '广东省', '4453', '云浮市', '445302', '云城区', '', '', '', '', 3, 1, ''), ('445303', '4453', '00,44,4453', '云安区', '44', '广东省', '4453', '云浮市', '445303', '云安区', '', '', '', '', 3, 1, ''), ('445321', '4453', '00,44,4453', '新兴县', '44', '广东省', '4453', '云浮市', '445321', '新兴县', '', '', '', '', 3, 1, ''), ('445322', '4453', '00,44,4453', '郁南县', '44', '广东省', '4453', '云浮市', '445322', '郁南县', '', '', '', '', 3, 1, ''), ('445381', '4453', '00,44,4453', '罗定市', '44', '广东省', '4453', '云浮市', '445381', '罗定市', '', '', '', '', 3, 1, ''), ('45', '00', '00', '广西壮族自治区', '45', '广西壮族自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('4501', '45', '00,45', '南宁市', '45', '广西壮族自治区', '4501', '南宁市', '', '', '', '', '', '', 2, 1, ''), ('450102', '4501', '00,45,4501', '兴宁区', '45', '广西壮族自治区', '4501', '南宁市', '450102', '兴宁区', '', '', '', '', 3, 1, ''), ('450103', '4501', '00,45,4501', '青秀区', '45', '广西壮族自治区', '4501', '南宁市', '450103', '青秀区', '', '', '', '', 3, 1, ''), ('450105', '4501', '00,45,4501', '江南区', '45', '广西壮族自治区', '4501', '南宁市', '450105', '江南区', '', '', '', '', 3, 1, ''), ('450107', '4501', '00,45,4501', '西乡塘区', '45', '广西壮族自治区', '4501', '南宁市', '450107', '西乡塘区', '', '', '', '', 3, 1, ''), ('450108', '4501', '00,45,4501', '良庆区', '45', '广西壮族自治区', '4501', '南宁市', '450108', '良庆区', '', '', '', '', 3, 1, ''), ('450109', '4501', '00,45,4501', '邕宁区', '45', '广西壮族自治区', '4501', '南宁市', '450109', '邕宁区', '', '', '', '', 3, 1, ''), ('450110', '4501', '00,45,4501', '武鸣区', '45', '广西壮族自治区', '4501', '南宁市', '450110', '武鸣区', '', '', '', '', 3, 1, ''), ('450123', '4501', '00,45,4501', '隆安县', '45', '广西壮族自治区', '4501', '南宁市', '450123', '隆安县', '', '', '', '', 3, 1, ''), ('450124', '4501', '00,45,4501', '马山县', '45', '广西壮族自治区', '4501', '南宁市', '450124', '马山县', '', '', '', '', 3, 1, ''), ('450125', '4501', '00,45,4501', '上林县', '45', '广西壮族自治区', '4501', '南宁市', '450125', '上林县', '', '', '', '', 3, 1, ''), ('450126', '4501', '00,45,4501', '宾阳县', '45', '广西壮族自治区', '4501', '南宁市', '450126', '宾阳县', '', '', '', '', 3, 1, ''), ('450127', '4501', '00,45,4501', '横县', '45', '广西壮族自治区', '4501', '南宁市', '450127', '横县', '', '', '', '', 3, 1, ''), ('4502', '45', '00,45', '柳州市', '45', '广西壮族自治区', '4502', '柳州市', '', '', '', '', '', '', 2, 1, ''), ('450202', '4502', '00,45,4502', '城中区', '45', '广西壮族自治区', '4502', '柳州市', '450202', '城中区', '', '', '', '', 3, 1, ''), ('450203', '4502', '00,45,4502', '鱼峰区', '45', '广西壮族自治区', '4502', '柳州市', '450203', '鱼峰区', '', '', '', '', 3, 1, ''), ('450204', '4502', '00,45,4502', '柳南区', '45', '广西壮族自治区', '4502', '柳州市', '450204', '柳南区', '', '', '', '', 3, 1, ''), ('450205', '4502', '00,45,4502', '柳北区', '45', '广西壮族自治区', '4502', '柳州市', '450205', '柳北区', '', '', '', '', 3, 1, ''), ('450206', '4502', '00,45,4502', '柳江区', '45', '广西壮族自治区', '4502', '柳州市', '450206', '柳江区', '', '', '', '', 3, 1, ''), ('450222', '4502', '00,45,4502', '柳城县', '45', '广西壮族自治区', '4502', '柳州市', '450222', '柳城县', '', '', '', '', 3, 1, ''), ('450223', '4502', '00,45,4502', '鹿寨县', '45', '广西壮族自治区', '4502', '柳州市', '450223', '鹿寨县', '', '', '', '', 3, 1, ''), ('450224', '4502', '00,45,4502', '融安县', '45', '广西壮族自治区', '4502', '柳州市', '450224', '融安县', '', '', '', '', 3, 1, ''), ('450225', '4502', '00,45,4502', '融水苗族自治县', '45', '广西壮族自治区', '4502', '柳州市', '450225', '融水苗族自治县', '', '', '', '', 3, 1, ''), ('450226', '4502', '00,45,4502', '三江侗族自治县', '45', '广西壮族自治区', '4502', '柳州市', '450226', '三江侗族自治县', '', '', '', '', 3, 1, ''), ('4503', '45', '00,45', '桂林市', '45', '广西壮族自治区', '4503', '桂林市', '', '', '', '', '', '', 2, 1, ''), ('450302', '4503', '00,45,4503', '秀峰区', '45', '广西壮族自治区', '4503', '桂林市', '450302', '秀峰区', '', '', '', '', 3, 1, ''), ('450303', '4503', '00,45,4503', '叠彩区', '45', '广西壮族自治区', '4503', '桂林市', '450303', '叠彩区', '', '', '', '', 3, 1, ''), ('450304', '4503', '00,45,4503', '象山区', '45', '广西壮族自治区', '4503', '桂林市', '450304', '象山区', '', '', '', '', 3, 1, ''), ('450305', '4503', '00,45,4503', '七星区', '45', '广西壮族自治区', '4503', '桂林市', '450305', '七星区', '', '', '', '', 3, 1, ''), ('450311', '4503', '00,45,4503', '雁山区', '45', '广西壮族自治区', '4503', '桂林市', '450311', '雁山区', '', '', '', '', 3, 1, ''), ('450312', '4503', '00,45,4503', '临桂区', '45', '广西壮族自治区', '4503', '桂林市', '450312', '临桂区', '', '', '', '', 3, 1, ''), ('450321', '4503', '00,45,4503', '阳朔县', '45', '广西壮族自治区', '4503', '桂林市', '450321', '阳朔县', '', '', '', '', 3, 1, ''), ('450323', '4503', '00,45,4503', '灵川县', '45', '广西壮族自治区', '4503', '桂林市', '450323', '灵川县', '', '', '', '', 3, 1, ''), ('450324', '4503', '00,45,4503', '全州县', '45', '广西壮族自治区', '4503', '桂林市', '450324', '全州县', '', '', '', '', 3, 1, ''), ('450325', '4503', '00,45,4503', '兴安县', '45', '广西壮族自治区', '4503', '桂林市', '450325', '兴安县', '', '', '', '', 3, 1, ''), ('450326', '4503', '00,45,4503', '永福县', '45', '广西壮族自治区', '4503', '桂林市', '450326', '永福县', '', '', '', '', 3, 1, ''), ('450327', '4503', '00,45,4503', '灌阳县', '45', '广西壮族自治区', '4503', '桂林市', '450327', '灌阳县', '', '', '', '', 3, 1, ''), ('450328', '4503', '00,45,4503', '龙胜各族自治县', '45', '广西壮族自治区', '4503', '桂林市', '450328', '龙胜各族自治县', '', '', '', '', 3, 1, ''), ('450329', '4503', '00,45,4503', '资源县', '45', '广西壮族自治区', '4503', '桂林市', '450329', '资源县', '', '', '', '', 3, 1, ''), ('450330', '4503', '00,45,4503', '平乐县', '45', '广西壮族自治区', '4503', '桂林市', '450330', '平乐县', '', '', '', '', 3, 1, ''), ('450332', '4503', '00,45,4503', '恭城瑶族自治县', '45', '广西壮族自治区', '4503', '桂林市', '450332', '恭城瑶族自治县', '', '', '', '', 3, 1, ''), ('450381', '4503', '00,45,4503', '荔浦市', '45', '广西壮族自治区', '4503', '桂林市', '450381', '荔浦市', '', '', '', '', 3, 1, ''), ('4504', '45', '00,45', '梧州市', '45', '广西壮族自治区', '4504', '梧州市', '', '', '', '', '', '', 2, 1, ''), ('450403', '4504', '00,45,4504', '万秀区', '45', '广西壮族自治区', '4504', '梧州市', '450403', '万秀区', '', '', '', '', 3, 1, ''), ('450405', '4504', '00,45,4504', '长洲区', '45', '广西壮族自治区', '4504', '梧州市', '450405', '长洲区', '', '', '', '', 3, 1, ''), ('450406', '4504', '00,45,4504', '龙圩区', '45', '广西壮族自治区', '4504', '梧州市', '450406', '龙圩区', '', '', '', '', 3, 1, ''), ('450421', '4504', '00,45,4504', '苍梧县', '45', '广西壮族自治区', '4504', '梧州市', '450421', '苍梧县', '', '', '', '', 3, 1, ''), ('450422', '4504', '00,45,4504', '藤县', '45', '广西壮族自治区', '4504', '梧州市', '450422', '藤县', '', '', '', '', 3, 1, ''), ('450423', '4504', '00,45,4504', '蒙山县', '45', '广西壮族自治区', '4504', '梧州市', '450423', '蒙山县', '', '', '', '', 3, 1, ''), ('450481', '4504', '00,45,4504', '岑溪市', '45', '广西壮族自治区', '4504', '梧州市', '450481', '岑溪市', '', '', '', '', 3, 1, ''), ('4505', '45', '00,45', '北海市', '45', '广西壮族自治区', '4505', '北海市', '', '', '', '', '', '', 2, 1, ''), ('450502', '4505', '00,45,4505', '海城区', '45', '广西壮族自治区', '4505', '北海市', '450502', '海城区', '', '', '', '', 3, 1, ''), ('450503', '4505', '00,45,4505', '银海区', '45', '广西壮族自治区', '4505', '北海市', '450503', '银海区', '', '', '', '', 3, 1, ''), ('450512', '4505', '00,45,4505', '铁山港区', '45', '广西壮族自治区', '4505', '北海市', '450512', '铁山港区', '', '', '', '', 3, 1, ''), ('450521', '4505', '00,45,4505', '合浦县', '45', '广西壮族自治区', '4505', '北海市', '450521', '合浦县', '', '', '', '', 3, 1, ''), ('4506', '45', '00,45', '防城港市', '45', '广西壮族自治区', '4506', '防城港市', '', '', '', '', '', '', 2, 1, ''), ('450602', '4506', '00,45,4506', '港口区', '45', '广西壮族自治区', '4506', '防城港市', '450602', '港口区', '', '', '', '', 3, 1, ''), ('450603', '4506', '00,45,4506', '防城区', '45', '广西壮族自治区', '4506', '防城港市', '450603', '防城区', '', '', '', '', 3, 1, ''), ('450621', '4506', '00,45,4506', '上思县', '45', '广西壮族自治区', '4506', '防城港市', '450621', '上思县', '', '', '', '', 3, 1, ''), ('450681', '4506', '00,45,4506', '东兴市', '45', '广西壮族自治区', '4506', '防城港市', '450681', '东兴市', '', '', '', '', 3, 1, ''), ('4507', '45', '00,45', '钦州市', '45', '广西壮族自治区', '4507', '钦州市', '', '', '', '', '', '', 2, 1, ''), ('450702', '4507', '00,45,4507', '钦南区', '45', '广西壮族自治区', '4507', '钦州市', '450702', '钦南区', '', '', '', '', 3, 1, ''), ('450703', '4507', '00,45,4507', '钦北区', '45', '广西壮族自治区', '4507', '钦州市', '450703', '钦北区', '', '', '', '', 3, 1, ''), ('450721', '4507', '00,45,4507', '灵山县', '45', '广西壮族自治区', '4507', '钦州市', '450721', '灵山县', '', '', '', '', 3, 1, ''), ('450722', '4507', '00,45,4507', '浦北县', '45', '广西壮族自治区', '4507', '钦州市', '450722', '浦北县', '', '', '', '', 3, 1, ''), ('4508', '45', '00,45', '贵港市', '45', '广西壮族自治区', '4508', '贵港市', '', '', '', '', '', '', 2, 1, ''), ('450802', '4508', '00,45,4508', '港北区', '45', '广西壮族自治区', '4508', '贵港市', '450802', '港北区', '', '', '', '', 3, 1, ''), ('450803', '4508', '00,45,4508', '港南区', '45', '广西壮族自治区', '4508', '贵港市', '450803', '港南区', '', '', '', '', 3, 1, ''), ('450804', '4508', '00,45,4508', '覃塘区', '45', '广西壮族自治区', '4508', '贵港市', '450804', '覃塘区', '', '', '', '', 3, 1, ''), ('450821', '4508', '00,45,4508', '平南县', '45', '广西壮族自治区', '4508', '贵港市', '450821', '平南县', '', '', '', '', 3, 1, ''), ('450881', '4508', '00,45,4508', '桂平市', '45', '广西壮族自治区', '4508', '贵港市', '450881', '桂平市', '', '', '', '', 3, 1, ''), ('4509', '45', '00,45', '玉林市', '45', '广西壮族自治区', '4509', '玉林市', '', '', '', '', '', '', 2, 1, ''), ('450902', '4509', '00,45,4509', '玉州区', '45', '广西壮族自治区', '4509', '玉林市', '450902', '玉州区', '', '', '', '', 3, 1, ''), ('450903', '4509', '00,45,4509', '福绵区', '45', '广西壮族自治区', '4509', '玉林市', '450903', '福绵区', '', '', '', '', 3, 1, ''), ('450921', '4509', '00,45,4509', '容县', '45', '广西壮族自治区', '4509', '玉林市', '450921', '容县', '', '', '', '', 3, 1, ''), ('450922', '4509', '00,45,4509', '陆川县', '45', '广西壮族自治区', '4509', '玉林市', '450922', '陆川县', '', '', '', '', 3, 1, ''), ('450923', '4509', '00,45,4509', '博白县', '45', '广西壮族自治区', '4509', '玉林市', '450923', '博白县', '', '', '', '', 3, 1, ''), ('450924', '4509', '00,45,4509', '兴业县', '45', '广西壮族自治区', '4509', '玉林市', '450924', '兴业县', '', '', '', '', 3, 1, ''), ('450981', '4509', '00,45,4509', '北流市', '45', '广西壮族自治区', '4509', '玉林市', '450981', '北流市', '', '', '', '', 3, 1, ''), ('4510', '45', '00,45', '百色市', '45', '广西壮族自治区', '4510', '百色市', '', '', '', '', '', '', 2, 1, ''), ('451002', '4510', '00,45,4510', '右江区', '45', '广西壮族自治区', '4510', '百色市', '451002', '右江区', '', '', '', '', 3, 1, ''), ('451003', '4510', '00,45,4510', '田阳区', '45', '广西壮族自治区', '4510', '百色市', '451003', '田阳区', '', '', '', '', 3, 1, ''), ('451022', '4510', '00,45,4510', '田东县', '45', '广西壮族自治区', '4510', '百色市', '451022', '田东县', '', '', '', '', 3, 1, ''), ('451024', '4510', '00,45,4510', '德保县', '45', '广西壮族自治区', '4510', '百色市', '451024', '德保县', '', '', '', '', 3, 1, ''), ('451026', '4510', '00,45,4510', '那坡县', '45', '广西壮族自治区', '4510', '百色市', '451026', '那坡县', '', '', '', '', 3, 1, ''), ('451027', '4510', '00,45,4510', '凌云县', '45', '广西壮族自治区', '4510', '百色市', '451027', '凌云县', '', '', '', '', 3, 1, ''), ('451028', '4510', '00,45,4510', '乐业县', '45', '广西壮族自治区', '4510', '百色市', '451028', '乐业县', '', '', '', '', 3, 1, ''), ('451029', '4510', '00,45,4510', '田林县', '45', '广西壮族自治区', '4510', '百色市', '451029', '田林县', '', '', '', '', 3, 1, ''), ('451030', '4510', '00,45,4510', '西林县', '45', '广西壮族自治区', '4510', '百色市', '451030', '西林县', '', '', '', '', 3, 1, ''), ('451031', '4510', '00,45,4510', '隆林各族自治县', '45', '广西壮族自治区', '4510', '百色市', '451031', '隆林各族自治县', '', '', '', '', 3, 1, ''), ('451081', '4510', '00,45,4510', '靖西市', '45', '广西壮族自治区', '4510', '百色市', '451081', '靖西市', '', '', '', '', 3, 1, ''), ('451082', '4510', '00,45,4510', '平果市', '45', '广西壮族自治区', '4510', '百色市', '451082', '平果市', '', '', '', '', 3, 1, ''), ('4511', '45', '00,45', '贺州市', '45', '广西壮族自治区', '4511', '贺州市', '', '', '', '', '', '', 2, 1, ''), ('451102', '4511', '00,45,4511', '八步区', '45', '广西壮族自治区', '4511', '贺州市', '451102', '八步区', '', '', '', '', 3, 1, ''), ('451103', '4511', '00,45,4511', '平桂区', '45', '广西壮族自治区', '4511', '贺州市', '451103', '平桂区', '', '', '', '', 3, 1, ''), ('451121', '4511', '00,45,4511', '昭平县', '45', '广西壮族自治区', '4511', '贺州市', '451121', '昭平县', '', '', '', '', 3, 1, ''), ('451122', '4511', '00,45,4511', '钟山县', '45', '广西壮族自治区', '4511', '贺州市', '451122', '钟山县', '', '', '', '', 3, 1, ''), ('451123', '4511', '00,45,4511', '富川瑶族自治县', '45', '广西壮族自治区', '4511', '贺州市', '451123', '富川瑶族自治县', '', '', '', '', 3, 1, ''), ('4512', '45', '00,45', '河池市', '45', '广西壮族自治区', '4512', '河池市', '', '', '', '', '', '', 2, 1, ''), ('451202', '4512', '00,45,4512', '金城江区', '45', '广西壮族自治区', '4512', '河池市', '451202', '金城江区', '', '', '', '', 3, 1, ''), ('451203', '4512', '00,45,4512', '宜州区', '45', '广西壮族自治区', '4512', '河池市', '451203', '宜州区', '', '', '', '', 3, 1, ''), ('451221', '4512', '00,45,4512', '南丹县', '45', '广西壮族自治区', '4512', '河池市', '451221', '南丹县', '', '', '', '', 3, 1, ''), ('451222', '4512', '00,45,4512', '天峨县', '45', '广西壮族自治区', '4512', '河池市', '451222', '天峨县', '', '', '', '', 3, 1, ''), ('451223', '4512', '00,45,4512', '凤山县', '45', '广西壮族自治区', '4512', '河池市', '451223', '凤山县', '', '', '', '', 3, 1, ''), ('451224', '4512', '00,45,4512', '东兰县', '45', '广西壮族自治区', '4512', '河池市', '451224', '东兰县', '', '', '', '', 3, 1, ''), ('451225', '4512', '00,45,4512', '罗城仫佬族自治县', '45', '广西壮族自治区', '4512', '河池市', '451225', '罗城仫佬族自治县', '', '', '', '', 3, 1, ''), ('451226', '4512', '00,45,4512', '环江毛南族自治县', '45', '广西壮族自治区', '4512', '河池市', '451226', '环江毛南族自治县', '', '', '', '', 3, 1, ''), ('451227', '4512', '00,45,4512', '巴马瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451227', '巴马瑶族自治县', '', '', '', '', 3, 1, ''), ('451228', '4512', '00,45,4512', '都安瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451228', '都安瑶族自治县', '', '', '', '', 3, 1, ''), ('451229', '4512', '00,45,4512', '大化瑶族自治县', '45', '广西壮族自治区', '4512', '河池市', '451229', '大化瑶族自治县', '', '', '', '', 3, 1, ''), ('4513', '45', '00,45', '来宾市', '45', '广西壮族自治区', '4513', '来宾市', '', '', '', '', '', '', 2, 1, ''), ('451302', '4513', '00,45,4513', '兴宾区', '45', '广西壮族自治区', '4513', '来宾市', '451302', '兴宾区', '', '', '', '', 3, 1, ''), ('451321', '4513', '00,45,4513', '忻城县', '45', '广西壮族自治区', '4513', '来宾市', '451321', '忻城县', '', '', '', '', 3, 1, ''), ('451322', '4513', '00,45,4513', '象州县', '45', '广西壮族自治区', '4513', '来宾市', '451322', '象州县', '', '', '', '', 3, 1, ''), ('451323', '4513', '00,45,4513', '武宣县', '45', '广西壮族自治区', '4513', '来宾市', '451323', '武宣县', '', '', '', '', 3, 1, ''), ('451324', '4513', '00,45,4513', '金秀瑶族自治县', '45', '广西壮族自治区', '4513', '来宾市', '451324', '金秀瑶族自治县', '', '', '', '', 3, 1, ''), ('451381', '4513', '00,45,4513', '合山市', '45', '广西壮族自治区', '4513', '来宾市', '451381', '合山市', '', '', '', '', 3, 1, ''), ('4514', '45', '00,45', '崇左市', '45', '广西壮族自治区', '4514', '崇左市', '', '', '', '', '', '', 2, 1, ''), ('451402', '4514', '00,45,4514', '江州区', '45', '广西壮族自治区', '4514', '崇左市', '451402', '江州区', '', '', '', '', 3, 1, ''), ('451421', '4514', '00,45,4514', '扶绥县', '45', '广西壮族自治区', '4514', '崇左市', '451421', '扶绥县', '', '', '', '', 3, 1, ''), ('451422', '4514', '00,45,4514', '宁明县', '45', '广西壮族自治区', '4514', '崇左市', '451422', '宁明县', '', '', '', '', 3, 1, ''), ('451423', '4514', '00,45,4514', '龙州县', '45', '广西壮族自治区', '4514', '崇左市', '451423', '龙州县', '', '', '', '', 3, 1, ''), ('451424', '4514', '00,45,4514', '大新县', '45', '广西壮族自治区', '4514', '崇左市', '451424', '大新县', '', '', '', '', 3, 1, ''), ('451425', '4514', '00,45,4514', '天等县', '45', '广西壮族自治区', '4514', '崇左市', '451425', '天等县', '', '', '', '', 3, 1, ''), ('451481', '4514', '00,45,4514', '凭祥市', '45', '广西壮族自治区', '4514', '崇左市', '451481', '凭祥市', '', '', '', '', 3, 1, ''), ('46', '00', '00', '海南省', '46', '海南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('4601', '46', '00,46', '海口市', '46', '海南省', '4601', '海口市', '', '', '', '', '', '', 2, 1, ''), ('460105', '4601', '00,46,4601', '秀英区', '46', '海南省', '4601', '海口市', '460105', '秀英区', '', '', '', '', 3, 1, ''), ('460106', '4601', '00,46,4601', '龙华区', '46', '海南省', '4601', '海口市', '460106', '龙华区', '', '', '', '', 3, 1, ''), ('460107', '4601', '00,46,4601', '琼山区', '46', '海南省', '4601', '海口市', '460107', '琼山区', '', '', '', '', 3, 1, ''), ('460108', '4601', '00,46,4601', '美兰区', '46', '海南省', '4601', '海口市', '460108', '美兰区', '', '', '', '', 3, 1, ''), ('4602', '46', '00,46', '三亚市', '46', '海南省', '4602', '三亚市', '', '', '', '', '', '', 2, 1, ''), ('460202', '4602', '00,46,4602', '海棠区', '46', '海南省', '4602', '三亚市', '460202', '海棠区', '', '', '', '', 3, 1, ''), ('460203', '4602', '00,46,4602', '吉阳区', '46', '海南省', '4602', '三亚市', '460203', '吉阳区', '', '', '', '', 3, 1, ''), ('460204', '4602', '00,46,4602', '天涯区', '46', '海南省', '4602', '三亚市', '460204', '天涯区', '', '', '', '', 3, 1, ''), ('460205', '4602', '00,46,4602', '崖州区', '46', '海南省', '4602', '三亚市', '460205', '崖州区', '', '', '', '', 3, 1, ''), ('4603', '46', '00,46', '三沙市', '46', '海南省', '4603', '三沙市', '', '', '', '', '', '', 2, 1, ''), ('460300', '4603', '00,46,4603', '三沙市', '46', '海南省', '4603', '三沙市', '460300', '三沙市', '', '', '', '', 3, 1, ''), ('4604', '46', '00,46', '儋州市', '46', '海南省', '4604', '儋州市', '', '', '', '', '', '', 2, 1, ''), ('460400', '4604', '00,46,4604', '儋州市', '46', '海南省', '4604', '儋州市', '460400', '儋州市', '', '', '', '', 3, 1, ''), ('4690', '46', '00,46', '省直辖县级行政区', '46', '海南省', '4690', '省直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('469001', '4690', '00,46,4690', '五指山市', '46', '海南省', '4690', '省直辖县级行政区', '469001', '五指山市', '', '', '', '', 3, 1, ''), ('469002', '4690', '00,46,4690', '琼海市', '46', '海南省', '4690', '省直辖县级行政区', '469002', '琼海市', '', '', '', '', 3, 1, ''), ('469005', '4690', '00,46,4690', '文昌市', '46', '海南省', '4690', '省直辖县级行政区', '469005', '文昌市', '', '', '', '', 3, 1, ''), ('469006', '4690', '00,46,4690', '万宁市', '46', '海南省', '4690', '省直辖县级行政区', '469006', '万宁市', '', '', '', '', 3, 1, ''), ('469007', '4690', '00,46,4690', '东方市', '46', '海南省', '4690', '省直辖县级行政区', '469007', '东方市', '', '', '', '', 3, 1, ''), ('469021', '4690', '00,46,4690', '定安县', '46', '海南省', '4690', '省直辖县级行政区', '469021', '定安县', '', '', '', '', 3, 1, ''), ('469022', '4690', '00,46,4690', '屯昌县', '46', '海南省', '4690', '省直辖县级行政区', '469022', '屯昌县', '', '', '', '', 3, 1, ''), ('469023', '4690', '00,46,4690', '澄迈县', '46', '海南省', '4690', '省直辖县级行政区', '469023', '澄迈县', '', '', '', '', 3, 1, ''), ('469024', '4690', '00,46,4690', '临高县', '46', '海南省', '4690', '省直辖县级行政区', '469024', '临高县', '', '', '', '', 3, 1, ''), ('469025', '4690', '00,46,4690', '白沙黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469025', '白沙黎族自治县', '', '', '', '', 3, 1, ''), ('469026', '4690', '00,46,4690', '昌江黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469026', '昌江黎族自治县', '', '', '', '', 3, 1, ''), ('469027', '4690', '00,46,4690', '乐东黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469027', '乐东黎族自治县', '', '', '', '', 3, 1, ''), ('469028', '4690', '00,46,4690', '陵水黎族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469028', '陵水黎族自治县', '', '', '', '', 3, 1, ''), ('469029', '4690', '00,46,4690', '保亭黎族苗族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469029', '保亭黎族苗族自治县', '', '', '', '', 3, 1, ''), ('469030', '4690', '00,46,4690', '琼中黎族苗族自治县', '46', '海南省', '4690', '省直辖县级行政区', '469030', '琼中黎族苗族自治县', '', '', '', '', 3, 1, ''), ('50', '00', '00', '重庆市', '50', '重庆市', '', '', '', '', '', '', '', '', 1, 1, ''), ('5001', '50', '00,50', '重庆市', '50', '重庆市', '5001', '重庆市', '', '', '', '', '', '', 2, 1, ''), ('500101', '5001', '00,50,5001', '万州区', '50', '重庆市', '5001', '重庆市', '500101', '万州区', '', '', '', '', 3, 1, ''), ('500102', '5001', '00,50,5001', '涪陵区', '50', '重庆市', '5001', '重庆市', '500102', '涪陵区', '', '', '', '', 3, 1, ''), ('500103', '5001', '00,50,5001', '渝中区', '50', '重庆市', '5001', '重庆市', '500103', '渝中区', '', '', '', '', 3, 1, ''), ('500104', '5001', '00,50,5001', '大渡口区', '50', '重庆市', '5001', '重庆市', '500104', '大渡口区', '', '', '', '', 3, 1, ''), ('500105', '5001', '00,50,5001', '江北区', '50', '重庆市', '5001', '重庆市', '500105', '江北区', '', '', '', '', 3, 1, ''), ('500106', '5001', '00,50,5001', '沙坪坝区', '50', '重庆市', '5001', '重庆市', '500106', '沙坪坝区', '', '', '', '', 3, 1, ''), ('500107', '5001', '00,50,5001', '九龙坡区', '50', '重庆市', '5001', '重庆市', '500107', '九龙坡区', '', '', '', '', 3, 1, ''), ('500108', '5001', '00,50,5001', '南岸区', '50', '重庆市', '5001', '重庆市', '500108', '南岸区', '', '', '', '', 3, 1, ''), ('500109', '5001', '00,50,5001', '北碚区', '50', '重庆市', '5001', '重庆市', '500109', '北碚区', '', '', '', '', 3, 1, ''), ('500110', '5001', '00,50,5001', '綦江区', '50', '重庆市', '5001', '重庆市', '500110', '綦江区', '', '', '', '', 3, 1, ''), ('500111', '5001', '00,50,5001', '大足区', '50', '重庆市', '5001', '重庆市', '500111', '大足区', '', '', '', '', 3, 1, ''), ('500112', '5001', '00,50,5001', '渝北区', '50', '重庆市', '5001', '重庆市', '500112', '渝北区', '', '', '', '', 3, 1, ''), ('500113', '5001', '00,50,5001', '巴南区', '50', '重庆市', '5001', '重庆市', '500113', '巴南区', '', '', '', '', 3, 1, ''), ('500114', '5001', '00,50,5001', '黔江区', '50', '重庆市', '5001', '重庆市', '500114', '黔江区', '', '', '', '', 3, 1, ''), ('500115', '5001', '00,50,5001', '长寿区', '50', '重庆市', '5001', '重庆市', '500115', '长寿区', '', '', '', '', 3, 1, ''), ('500116', '5001', '00,50,5001', '江津区', '50', '重庆市', '5001', '重庆市', '500116', '江津区', '', '', '', '', 3, 1, ''), ('500117', '5001', '00,50,5001', '合川区', '50', '重庆市', '5001', '重庆市', '500117', '合川区', '', '', '', '', 3, 1, ''), ('500118', '5001', '00,50,5001', '永川区', '50', '重庆市', '5001', '重庆市', '500118', '永川区', '', '', '', '', 3, 1, ''), ('500119', '5001', '00,50,5001', '南川区', '50', '重庆市', '5001', '重庆市', '500119', '南川区', '', '', '', '', 3, 1, ''), ('500120', '5001', '00,50,5001', '璧山区', '50', '重庆市', '5001', '重庆市', '500120', '璧山区', '', '', '', '', 3, 1, ''), ('500151', '5001', '00,50,5001', '铜梁区', '50', '重庆市', '5001', '重庆市', '500151', '铜梁区', '', '', '', '', 3, 1, ''), ('500152', '5001', '00,50,5001', '潼南区', '50', '重庆市', '5001', '重庆市', '500152', '潼南区', '', '', '', '', 3, 1, ''), ('500153', '5001', '00,50,5001', '荣昌区', '50', '重庆市', '5001', '重庆市', '500153', '荣昌区', '', '', '', '', 3, 1, ''), ('500154', '5001', '00,50,5001', '开州区', '50', '重庆市', '5001', '重庆市', '500154', '开州区', '', '', '', '', 3, 1, ''), ('500155', '5001', '00,50,5001', '梁平区', '50', '重庆市', '5001', '重庆市', '500155', '梁平区', '', '', '', '', 3, 1, ''), ('500156', '5001', '00,50,5001', '武隆区', '50', '重庆市', '5001', '重庆市', '500156', '武隆区', '', '', '', '', 3, 1, ''), ('5002', '50', '00,50', '重庆市', '50', '重庆市', '5002', '重庆市', '', '', '', '', '', '', 2, 1, ''), ('500229', '5002', '00,50,5002', '城口县', '50', '重庆市', '5002', '重庆市', '500229', '城口县', '', '', '', '', 3, 1, ''), ('500230', '5002', '00,50,5002', '丰都县', '50', '重庆市', '5002', '重庆市', '500230', '丰都县', '', '', '', '', 3, 1, ''), ('500231', '5002', '00,50,5002', '垫江县', '50', '重庆市', '5002', '重庆市', '500231', '垫江县', '', '', '', '', 3, 1, ''), ('500233', '5002', '00,50,5002', '忠县', '50', '重庆市', '5002', '重庆市', '500233', '忠县', '', '', '', '', 3, 1, ''), ('500235', '5002', '00,50,5002', '云阳县', '50', '重庆市', '5002', '重庆市', '500235', '云阳县', '', '', '', '', 3, 1, ''), ('500236', '5002', '00,50,5002', '奉节县', '50', '重庆市', '5002', '重庆市', '500236', '奉节县', '', '', '', '', 3, 1, ''), ('500237', '5002', '00,50,5002', '巫山县', '50', '重庆市', '5002', '重庆市', '500237', '巫山县', '', '', '', '', 3, 1, ''), ('500238', '5002', '00,50,5002', '巫溪县', '50', '重庆市', '5002', '重庆市', '500238', '巫溪县', '', '', '', '', 3, 1, ''), ('500240', '5002', '00,50,5002', '石柱土家族自治县', '50', '重庆市', '5002', '重庆市', '500240', '石柱土家族自治县', '', '', '', '', 3, 1, ''), ('500241', '5002', '00,50,5002', '秀山土家族苗族自治县', '50', '重庆市', '5002', '重庆市', '500241', '秀山土家族苗族自治县', '', '', '', '', 3, 1, ''), ('500242', '5002', '00,50,5002', '酉阳土家族苗族自治县', '50', '重庆市', '5002', '重庆市', '500242', '酉阳土家族苗族自治县', '', '', '', '', 3, 1, ''), ('500243', '5002', '00,50,5002', '彭水苗族土家族自治县', '50', '重庆市', '5002', '重庆市', '500243', '彭水苗族土家族自治县', '', '', '', '', 3, 1, ''), ('51', '00', '00', '四川省', '51', '四川省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5101', '51', '00,51', '成都市', '51', '四川省', '5101', '成都市', '', '', '', '', '', '', 2, 1, ''), ('510104', '5101', '00,51,5101', '锦江区', '51', '四川省', '5101', '成都市', '510104', '锦江区', '', '', '', '', 3, 1, ''), ('510105', '5101', '00,51,5101', '青羊区', '51', '四川省', '5101', '成都市', '510105', '青羊区', '', '', '', '', 3, 1, ''), ('510106', '5101', '00,51,5101', '金牛区', '51', '四川省', '5101', '成都市', '510106', '金牛区', '', '', '', '', 3, 1, ''), ('510107', '5101', '00,51,5101', '武侯区', '51', '四川省', '5101', '成都市', '510107', '武侯区', '', '', '', '', 3, 1, ''), ('510108', '5101', '00,51,5101', '成华区', '51', '四川省', '5101', '成都市', '510108', '成华区', '', '', '', '', 3, 1, ''), ('510112', '5101', '00,51,5101', '龙泉驿区', '51', '四川省', '5101', '成都市', '510112', '龙泉驿区', '', '', '', '', 3, 1, ''), ('510113', '5101', '00,51,5101', '青白江区', '51', '四川省', '5101', '成都市', '510113', '青白江区', '', '', '', '', 3, 1, ''), ('510114', '5101', '00,51,5101', '新都区', '51', '四川省', '5101', '成都市', '510114', '新都区', '', '', '', '', 3, 1, ''), ('510115', '5101', '00,51,5101', '温江区', '51', '四川省', '5101', '成都市', '510115', '温江区', '', '', '', '', 3, 1, ''), ('510116', '5101', '00,51,5101', '双流区', '51', '四川省', '5101', '成都市', '510116', '双流区', '', '', '', '', 3, 1, ''), ('510117', '5101', '00,51,5101', '郫都区', '51', '四川省', '5101', '成都市', '510117', '郫都区', '', '', '', '', 3, 1, ''), ('510121', '5101', '00,51,5101', '金堂县', '51', '四川省', '5101', '成都市', '510121', '金堂县', '', '', '', '', 3, 1, ''), ('510129', '5101', '00,51,5101', '大邑县', '51', '四川省', '5101', '成都市', '510129', '大邑县', '', '', '', '', 3, 1, ''), ('510131', '5101', '00,51,5101', '蒲江县', '51', '四川省', '5101', '成都市', '510131', '蒲江县', '', '', '', '', 3, 1, ''), ('510132', '5101', '00,51,5101', '新津县', '51', '四川省', '5101', '成都市', '510132', '新津县', '', '', '', '', 3, 1, ''), ('510181', '5101', '00,51,5101', '都江堰市', '51', '四川省', '5101', '成都市', '510181', '都江堰市', '', '', '', '', 3, 1, ''), ('510182', '5101', '00,51,5101', '彭州市', '51', '四川省', '5101', '成都市', '510182', '彭州市', '', '', '', '', 3, 1, ''), ('510183', '5101', '00,51,5101', '邛崃市', '51', '四川省', '5101', '成都市', '510183', '邛崃市', '', '', '', '', 3, 1, ''), ('510184', '5101', '00,51,5101', '崇州市', '51', '四川省', '5101', '成都市', '510184', '崇州市', '', '', '', '', 3, 1, ''), ('510185', '5101', '00,51,5101', '简阳市', '51', '四川省', '5101', '成都市', '510185', '简阳市', '', '', '', '', 3, 1, ''), ('5103', '51', '00,51', '自贡市', '51', '四川省', '5103', '自贡市', '', '', '', '', '', '', 2, 1, ''), ('510302', '5103', '00,51,5103', '自流井区', '51', '四川省', '5103', '自贡市', '510302', '自流井区', '', '', '', '', 3, 1, ''), ('510303', '5103', '00,51,5103', '贡井区', '51', '四川省', '5103', '自贡市', '510303', '贡井区', '', '', '', '', 3, 1, ''), ('510304', '5103', '00,51,5103', '大安区', '51', '四川省', '5103', '自贡市', '510304', '大安区', '', '', '', '', 3, 1, ''), ('510311', '5103', '00,51,5103', '沿滩区', '51', '四川省', '5103', '自贡市', '510311', '沿滩区', '', '', '', '', 3, 1, ''), ('510321', '5103', '00,51,5103', '荣县', '51', '四川省', '5103', '自贡市', '510321', '荣县', '', '', '', '', 3, 1, ''), ('510322', '5103', '00,51,5103', '富顺县', '51', '四川省', '5103', '自贡市', '510322', '富顺县', '', '', '', '', 3, 1, ''), ('5104', '51', '00,51', '攀枝花市', '51', '四川省', '5104', '攀枝花市', '', '', '', '', '', '', 2, 1, ''), ('510402', '5104', '00,51,5104', '东区', '51', '四川省', '5104', '攀枝花市', '510402', '东区', '', '', '', '', 3, 1, ''), ('510403', '5104', '00,51,5104', '西区', '51', '四川省', '5104', '攀枝花市', '510403', '西区', '', '', '', '', 3, 1, ''), ('510411', '5104', '00,51,5104', '仁和区', '51', '四川省', '5104', '攀枝花市', '510411', '仁和区', '', '', '', '', 3, 1, ''), ('510421', '5104', '00,51,5104', '米易县', '51', '四川省', '5104', '攀枝花市', '510421', '米易县', '', '', '', '', 3, 1, ''), ('510422', '5104', '00,51,5104', '盐边县', '51', '四川省', '5104', '攀枝花市', '510422', '盐边县', '', '', '', '', 3, 1, ''), ('5105', '51', '00,51', '泸州市', '51', '四川省', '5105', '泸州市', '', '', '', '', '', '', 2, 1, ''), ('510502', '5105', '00,51,5105', '江阳区', '51', '四川省', '5105', '泸州市', '510502', '江阳区', '', '', '', '', 3, 1, ''), ('510503', '5105', '00,51,5105', '纳溪区', '51', '四川省', '5105', '泸州市', '510503', '纳溪区', '', '', '', '', 3, 1, ''), ('510504', '5105', '00,51,5105', '龙马潭区', '51', '四川省', '5105', '泸州市', '510504', '龙马潭区', '', '', '', '', 3, 1, ''), ('510521', '5105', '00,51,5105', '泸县', '51', '四川省', '5105', '泸州市', '510521', '泸县', '', '', '', '', 3, 1, ''), ('510522', '5105', '00,51,5105', '合江县', '51', '四川省', '5105', '泸州市', '510522', '合江县', '', '', '', '', 3, 1, ''), ('510524', '5105', '00,51,5105', '叙永县', '51', '四川省', '5105', '泸州市', '510524', '叙永县', '', '', '', '', 3, 1, ''), ('510525', '5105', '00,51,5105', '古蔺县', '51', '四川省', '5105', '泸州市', '510525', '古蔺县', '', '', '', '', 3, 1, ''), ('5106', '51', '00,51', '德阳市', '51', '四川省', '5106', '德阳市', '', '', '', '', '', '', 2, 1, ''), ('510603', '5106', '00,51,5106', '旌阳区', '51', '四川省', '5106', '德阳市', '510603', '旌阳区', '', '', '', '', 3, 1, ''), ('510604', '5106', '00,51,5106', '罗江区', '51', '四川省', '5106', '德阳市', '510604', '罗江区', '', '', '', '', 3, 1, ''), ('510623', '5106', '00,51,5106', '中江县', '51', '四川省', '5106', '德阳市', '510623', '中江县', '', '', '', '', 3, 1, ''), ('510681', '5106', '00,51,5106', '广汉市', '51', '四川省', '5106', '德阳市', '510681', '广汉市', '', '', '', '', 3, 1, ''), ('510682', '5106', '00,51,5106', '什邡市', '51', '四川省', '5106', '德阳市', '510682', '什邡市', '', '', '', '', 3, 1, ''), ('510683', '5106', '00,51,5106', '绵竹市', '51', '四川省', '5106', '德阳市', '510683', '绵竹市', '', '', '', '', 3, 1, ''), ('5107', '51', '00,51', '绵阳市', '51', '四川省', '5107', '绵阳市', '', '', '', '', '', '', 2, 1, ''), ('510703', '5107', '00,51,5107', '涪城区', '51', '四川省', '5107', '绵阳市', '510703', '涪城区', '', '', '', '', 3, 1, ''), ('510704', '5107', '00,51,5107', '游仙区', '51', '四川省', '5107', '绵阳市', '510704', '游仙区', '', '', '', '', 3, 1, ''), ('510705', '5107', '00,51,5107', '安州区', '51', '四川省', '5107', '绵阳市', '510705', '安州区', '', '', '', '', 3, 1, ''), ('510722', '5107', '00,51,5107', '三台县', '51', '四川省', '5107', '绵阳市', '510722', '三台县', '', '', '', '', 3, 1, ''), ('510723', '5107', '00,51,5107', '盐亭县', '51', '四川省', '5107', '绵阳市', '510723', '盐亭县', '', '', '', '', 3, 1, ''), ('510725', '5107', '00,51,5107', '梓潼县', '51', '四川省', '5107', '绵阳市', '510725', '梓潼县', '', '', '', '', 3, 1, ''), ('510726', '5107', '00,51,5107', '北川羌族自治县', '51', '四川省', '5107', '绵阳市', '510726', '北川羌族自治县', '', '', '', '', 3, 1, ''), ('510727', '5107', '00,51,5107', '平武县', '51', '四川省', '5107', '绵阳市', '510727', '平武县', '', '', '', '', 3, 1, ''), ('510781', '5107', '00,51,5107', '江油市', '51', '四川省', '5107', '绵阳市', '510781', '江油市', '', '', '', '', 3, 1, ''), ('5108', '51', '00,51', '广元市', '51', '四川省', '5108', '广元市', '', '', '', '', '', '', 2, 1, ''), ('510802', '5108', '00,51,5108', '利州区', '51', '四川省', '5108', '广元市', '510802', '利州区', '', '', '', '', 3, 1, ''), ('510811', '5108', '00,51,5108', '昭化区', '51', '四川省', '5108', '广元市', '510811', '昭化区', '', '', '', '', 3, 1, ''), ('510812', '5108', '00,51,5108', '朝天区', '51', '四川省', '5108', '广元市', '510812', '朝天区', '', '', '', '', 3, 1, ''), ('510821', '5108', '00,51,5108', '旺苍县', '51', '四川省', '5108', '广元市', '510821', '旺苍县', '', '', '', '', 3, 1, ''), ('510822', '5108', '00,51,5108', '青川县', '51', '四川省', '5108', '广元市', '510822', '青川县', '', '', '', '', 3, 1, ''), ('510823', '5108', '00,51,5108', '剑阁县', '51', '四川省', '5108', '广元市', '510823', '剑阁县', '', '', '', '', 3, 1, ''), ('510824', '5108', '00,51,5108', '苍溪县', '51', '四川省', '5108', '广元市', '510824', '苍溪县', '', '', '', '', 3, 1, ''), ('5109', '51', '00,51', '遂宁市', '51', '四川省', '5109', '遂宁市', '', '', '', '', '', '', 2, 1, ''), ('510903', '5109', '00,51,5109', '船山区', '51', '四川省', '5109', '遂宁市', '510903', '船山区', '', '', '', '', 3, 1, ''), ('510904', '5109', '00,51,5109', '安居区', '51', '四川省', '5109', '遂宁市', '510904', '安居区', '', '', '', '', 3, 1, ''), ('510921', '5109', '00,51,5109', '蓬溪县', '51', '四川省', '5109', '遂宁市', '510921', '蓬溪县', '', '', '', '', 3, 1, ''), ('510923', '5109', '00,51,5109', '大英县', '51', '四川省', '5109', '遂宁市', '510923', '大英县', '', '', '', '', 3, 1, ''), ('510981', '5109', '00,51,5109', '射洪市', '51', '四川省', '5109', '遂宁市', '510981', '射洪市', '', '', '', '', 3, 1, ''), ('5110', '51', '00,51', '内江市', '51', '四川省', '5110', '内江市', '', '', '', '', '', '', 2, 1, ''), ('511002', '5110', '00,51,5110', '市中区', '51', '四川省', '5110', '内江市', '511002', '市中区', '', '', '', '', 3, 1, ''), ('511011', '5110', '00,51,5110', '东兴区', '51', '四川省', '5110', '内江市', '511011', '东兴区', '', '', '', '', 3, 1, ''), ('511024', '5110', '00,51,5110', '威远县', '51', '四川省', '5110', '内江市', '511024', '威远县', '', '', '', '', 3, 1, ''), ('511025', '5110', '00,51,5110', '资中县', '51', '四川省', '5110', '内江市', '511025', '资中县', '', '', '', '', 3, 1, ''), ('511083', '5110', '00,51,5110', '隆昌市', '51', '四川省', '5110', '内江市', '511083', '隆昌市', '', '', '', '', 3, 1, ''), ('5111', '51', '00,51', '乐山市', '51', '四川省', '5111', '乐山市', '', '', '', '', '', '', 2, 1, ''), ('511102', '5111', '00,51,5111', '市中区', '51', '四川省', '5111', '乐山市', '511102', '市中区', '', '', '', '', 3, 1, ''), ('511111', '5111', '00,51,5111', '沙湾区', '51', '四川省', '5111', '乐山市', '511111', '沙湾区', '', '', '', '', 3, 1, ''), ('511112', '5111', '00,51,5111', '五通桥区', '51', '四川省', '5111', '乐山市', '511112', '五通桥区', '', '', '', '', 3, 1, ''), ('511113', '5111', '00,51,5111', '金口河区', '51', '四川省', '5111', '乐山市', '511113', '金口河区', '', '', '', '', 3, 1, ''), ('511123', '5111', '00,51,5111', '犍为县', '51', '四川省', '5111', '乐山市', '511123', '犍为县', '', '', '', '', 3, 1, ''), ('511124', '5111', '00,51,5111', '井研县', '51', '四川省', '5111', '乐山市', '511124', '井研县', '', '', '', '', 3, 1, ''), ('511126', '5111', '00,51,5111', '夹江县', '51', '四川省', '5111', '乐山市', '511126', '夹江县', '', '', '', '', 3, 1, ''), ('511129', '5111', '00,51,5111', '沐川县', '51', '四川省', '5111', '乐山市', '511129', '沐川县', '', '', '', '', 3, 1, ''), ('511132', '5111', '00,51,5111', '峨边彝族自治县', '51', '四川省', '5111', '乐山市', '511132', '峨边彝族自治县', '', '', '', '', 3, 1, ''), ('511133', '5111', '00,51,5111', '马边彝族自治县', '51', '四川省', '5111', '乐山市', '511133', '马边彝族自治县', '', '', '', '', 3, 1, ''), ('511181', '5111', '00,51,5111', '峨眉山市', '51', '四川省', '5111', '乐山市', '511181', '峨眉山市', '', '', '', '', 3, 1, ''), ('5113', '51', '00,51', '南充市', '51', '四川省', '5113', '南充市', '', '', '', '', '', '', 2, 1, ''), ('511302', '5113', '00,51,5113', '顺庆区', '51', '四川省', '5113', '南充市', '511302', '顺庆区', '', '', '', '', 3, 1, ''), ('511303', '5113', '00,51,5113', '高坪区', '51', '四川省', '5113', '南充市', '511303', '高坪区', '', '', '', '', 3, 1, ''), ('511304', '5113', '00,51,5113', '嘉陵区', '51', '四川省', '5113', '南充市', '511304', '嘉陵区', '', '', '', '', 3, 1, ''), ('511321', '5113', '00,51,5113', '南部县', '51', '四川省', '5113', '南充市', '511321', '南部县', '', '', '', '', 3, 1, ''), ('511322', '5113', '00,51,5113', '营山县', '51', '四川省', '5113', '南充市', '511322', '营山县', '', '', '', '', 3, 1, ''), ('511323', '5113', '00,51,5113', '蓬安县', '51', '四川省', '5113', '南充市', '511323', '蓬安县', '', '', '', '', 3, 1, ''), ('511324', '5113', '00,51,5113', '仪陇县', '51', '四川省', '5113', '南充市', '511324', '仪陇县', '', '', '', '', 3, 1, ''), ('511325', '5113', '00,51,5113', '西充县', '51', '四川省', '5113', '南充市', '511325', '西充县', '', '', '', '', 3, 1, ''), ('511381', '5113', '00,51,5113', '阆中市', '51', '四川省', '5113', '南充市', '511381', '阆中市', '', '', '', '', 3, 1, ''), ('5114', '51', '00,51', '眉山市', '51', '四川省', '5114', '眉山市', '', '', '', '', '', '', 2, 1, ''), ('511402', '5114', '00,51,5114', '东坡区', '51', '四川省', '5114', '眉山市', '511402', '东坡区', '', '', '', '', 3, 1, ''), ('511403', '5114', '00,51,5114', '彭山区', '51', '四川省', '5114', '眉山市', '511403', '彭山区', '', '', '', '', 3, 1, ''), ('511421', '5114', '00,51,5114', '仁寿县', '51', '四川省', '5114', '眉山市', '511421', '仁寿县', '', '', '', '', 3, 1, ''), ('511423', '5114', '00,51,5114', '洪雅县', '51', '四川省', '5114', '眉山市', '511423', '洪雅县', '', '', '', '', 3, 1, ''), ('511424', '5114', '00,51,5114', '丹棱县', '51', '四川省', '5114', '眉山市', '511424', '丹棱县', '', '', '', '', 3, 1, ''), ('511425', '5114', '00,51,5114', '青神县', '51', '四川省', '5114', '眉山市', '511425', '青神县', '', '', '', '', 3, 1, ''), ('5115', '51', '00,51', '宜宾市', '51', '四川省', '5115', '宜宾市', '', '', '', '', '', '', 2, 1, ''), ('511502', '5115', '00,51,5115', '翠屏区', '51', '四川省', '5115', '宜宾市', '511502', '翠屏区', '', '', '', '', 3, 1, ''), ('511503', '5115', '00,51,5115', '南溪区', '51', '四川省', '5115', '宜宾市', '511503', '南溪区', '', '', '', '', 3, 1, ''), ('511504', '5115', '00,51,5115', '叙州区', '51', '四川省', '5115', '宜宾市', '511504', '叙州区', '', '', '', '', 3, 1, ''), ('511523', '5115', '00,51,5115', '江安县', '51', '四川省', '5115', '宜宾市', '511523', '江安县', '', '', '', '', 3, 1, ''), ('511524', '5115', '00,51,5115', '长宁县', '51', '四川省', '5115', '宜宾市', '511524', '长宁县', '', '', '', '', 3, 1, ''), ('511525', '5115', '00,51,5115', '高县', '51', '四川省', '5115', '宜宾市', '511525', '高县', '', '', '', '', 3, 1, ''), ('511526', '5115', '00,51,5115', '珙县', '51', '四川省', '5115', '宜宾市', '511526', '珙县', '', '', '', '', 3, 1, ''), ('511527', '5115', '00,51,5115', '筠连县', '51', '四川省', '5115', '宜宾市', '511527', '筠连县', '', '', '', '', 3, 1, ''), ('511528', '5115', '00,51,5115', '兴文县', '51', '四川省', '5115', '宜宾市', '511528', '兴文县', '', '', '', '', 3, 1, ''), ('511529', '5115', '00,51,5115', '屏山县', '51', '四川省', '5115', '宜宾市', '511529', '屏山县', '', '', '', '', 3, 1, ''), ('5116', '51', '00,51', '广安市', '51', '四川省', '5116', '广安市', '', '', '', '', '', '', 2, 1, ''), ('511602', '5116', '00,51,5116', '广安区', '51', '四川省', '5116', '广安市', '511602', '广安区', '', '', '', '', 3, 1, ''), ('511603', '5116', '00,51,5116', '前锋区', '51', '四川省', '5116', '广安市', '511603', '前锋区', '', '', '', '', 3, 1, ''), ('511621', '5116', '00,51,5116', '岳池县', '51', '四川省', '5116', '广安市', '511621', '岳池县', '', '', '', '', 3, 1, ''), ('511622', '5116', '00,51,5116', '武胜县', '51', '四川省', '5116', '广安市', '511622', '武胜县', '', '', '', '', 3, 1, ''), ('511623', '5116', '00,51,5116', '邻水县', '51', '四川省', '5116', '广安市', '511623', '邻水县', '', '', '', '', 3, 1, ''), ('511681', '5116', '00,51,5116', '华蓥市', '51', '四川省', '5116', '广安市', '511681', '华蓥市', '', '', '', '', 3, 1, ''), ('5117', '51', '00,51', '达州市', '51', '四川省', '5117', '达州市', '', '', '', '', '', '', 2, 1, ''), ('511702', '5117', '00,51,5117', '通川区', '51', '四川省', '5117', '达州市', '511702', '通川区', '', '', '', '', 3, 1, ''), ('511703', '5117', '00,51,5117', '达川区', '51', '四川省', '5117', '达州市', '511703', '达川区', '', '', '', '', 3, 1, ''), ('511722', '5117', '00,51,5117', '宣汉县', '51', '四川省', '5117', '达州市', '511722', '宣汉县', '', '', '', '', 3, 1, ''), ('511723', '5117', '00,51,5117', '开江县', '51', '四川省', '5117', '达州市', '511723', '开江县', '', '', '', '', 3, 1, ''), ('511724', '5117', '00,51,5117', '大竹县', '51', '四川省', '5117', '达州市', '511724', '大竹县', '', '', '', '', 3, 1, ''), ('511725', '5117', '00,51,5117', '渠县', '51', '四川省', '5117', '达州市', '511725', '渠县', '', '', '', '', 3, 1, ''), ('511781', '5117', '00,51,5117', '万源市', '51', '四川省', '5117', '达州市', '511781', '万源市', '', '', '', '', 3, 1, ''), ('5118', '51', '00,51', '雅安市', '51', '四川省', '5118', '雅安市', '', '', '', '', '', '', 2, 1, ''); +INSERT INTO `blade_region` VALUES ('511802', '5118', '00,51,5118', '雨城区', '51', '四川省', '5118', '雅安市', '511802', '雨城区', '', '', '', '', 3, 1, ''), ('511803', '5118', '00,51,5118', '名山区', '51', '四川省', '5118', '雅安市', '511803', '名山区', '', '', '', '', 3, 1, ''), ('511822', '5118', '00,51,5118', '荥经县', '51', '四川省', '5118', '雅安市', '511822', '荥经县', '', '', '', '', 3, 1, ''), ('511823', '5118', '00,51,5118', '汉源县', '51', '四川省', '5118', '雅安市', '511823', '汉源县', '', '', '', '', 3, 1, ''), ('511824', '5118', '00,51,5118', '石棉县', '51', '四川省', '5118', '雅安市', '511824', '石棉县', '', '', '', '', 3, 1, ''), ('511825', '5118', '00,51,5118', '天全县', '51', '四川省', '5118', '雅安市', '511825', '天全县', '', '', '', '', 3, 1, ''), ('511826', '5118', '00,51,5118', '芦山县', '51', '四川省', '5118', '雅安市', '511826', '芦山县', '', '', '', '', 3, 1, ''), ('511827', '5118', '00,51,5118', '宝兴县', '51', '四川省', '5118', '雅安市', '511827', '宝兴县', '', '', '', '', 3, 1, ''), ('5119', '51', '00,51', '巴中市', '51', '四川省', '5119', '巴中市', '', '', '', '', '', '', 2, 1, ''), ('511902', '5119', '00,51,5119', '巴州区', '51', '四川省', '5119', '巴中市', '511902', '巴州区', '', '', '', '', 3, 1, ''), ('511903', '5119', '00,51,5119', '恩阳区', '51', '四川省', '5119', '巴中市', '511903', '恩阳区', '', '', '', '', 3, 1, ''), ('511921', '5119', '00,51,5119', '通江县', '51', '四川省', '5119', '巴中市', '511921', '通江县', '', '', '', '', 3, 1, ''), ('511922', '5119', '00,51,5119', '南江县', '51', '四川省', '5119', '巴中市', '511922', '南江县', '', '', '', '', 3, 1, ''), ('511923', '5119', '00,51,5119', '平昌县', '51', '四川省', '5119', '巴中市', '511923', '平昌县', '', '', '', '', 3, 1, ''), ('5120', '51', '00,51', '资阳市', '51', '四川省', '5120', '资阳市', '', '', '', '', '', '', 2, 1, ''), ('512002', '5120', '00,51,5120', '雁江区', '51', '四川省', '5120', '资阳市', '512002', '雁江区', '', '', '', '', 3, 1, ''), ('512021', '5120', '00,51,5120', '安岳县', '51', '四川省', '5120', '资阳市', '512021', '安岳县', '', '', '', '', 3, 1, ''), ('512022', '5120', '00,51,5120', '乐至县', '51', '四川省', '5120', '资阳市', '512022', '乐至县', '', '', '', '', 3, 1, ''), ('5132', '51', '00,51', '阿坝藏族羌族自治州', '51', '四川省', '5132', '阿坝藏族羌族自治州', '', '', '', '', '', '', 2, 1, ''), ('513201', '5132', '00,51,5132', '马尔康市', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513201', '马尔康市', '', '', '', '', 3, 1, ''), ('513221', '5132', '00,51,5132', '汶川县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513221', '汶川县', '', '', '', '', 3, 1, ''), ('513222', '5132', '00,51,5132', '理县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513222', '理县', '', '', '', '', 3, 1, ''), ('513223', '5132', '00,51,5132', '茂县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513223', '茂县', '', '', '', '', 3, 1, ''), ('513224', '5132', '00,51,5132', '松潘县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513224', '松潘县', '', '', '', '', 3, 1, ''), ('513225', '5132', '00,51,5132', '九寨沟县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513225', '九寨沟县', '', '', '', '', 3, 1, ''), ('513226', '5132', '00,51,5132', '金川县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513226', '金川县', '', '', '', '', 3, 1, ''), ('513227', '5132', '00,51,5132', '小金县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513227', '小金县', '', '', '', '', 3, 1, ''), ('513228', '5132', '00,51,5132', '黑水县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513228', '黑水县', '', '', '', '', 3, 1, ''), ('513230', '5132', '00,51,5132', '壤塘县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513230', '壤塘县', '', '', '', '', 3, 1, ''), ('513231', '5132', '00,51,5132', '阿坝县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513231', '阿坝县', '', '', '', '', 3, 1, ''), ('513232', '5132', '00,51,5132', '若尔盖县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513232', '若尔盖县', '', '', '', '', 3, 1, ''), ('513233', '5132', '00,51,5132', '红原县', '51', '四川省', '5132', '阿坝藏族羌族自治州', '513233', '红原县', '', '', '', '', 3, 1, ''), ('5133', '51', '00,51', '甘孜藏族自治州', '51', '四川省', '5133', '甘孜藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('513301', '5133', '00,51,5133', '康定市', '51', '四川省', '5133', '甘孜藏族自治州', '513301', '康定市', '', '', '', '', 3, 1, ''), ('513322', '5133', '00,51,5133', '泸定县', '51', '四川省', '5133', '甘孜藏族自治州', '513322', '泸定县', '', '', '', '', 3, 1, ''), ('513323', '5133', '00,51,5133', '丹巴县', '51', '四川省', '5133', '甘孜藏族自治州', '513323', '丹巴县', '', '', '', '', 3, 1, ''), ('513324', '5133', '00,51,5133', '九龙县', '51', '四川省', '5133', '甘孜藏族自治州', '513324', '九龙县', '', '', '', '', 3, 1, ''), ('513325', '5133', '00,51,5133', '雅江县', '51', '四川省', '5133', '甘孜藏族自治州', '513325', '雅江县', '', '', '', '', 3, 1, ''), ('513326', '5133', '00,51,5133', '道孚县', '51', '四川省', '5133', '甘孜藏族自治州', '513326', '道孚县', '', '', '', '', 3, 1, ''), ('513327', '5133', '00,51,5133', '炉霍县', '51', '四川省', '5133', '甘孜藏族自治州', '513327', '炉霍县', '', '', '', '', 3, 1, ''), ('513328', '5133', '00,51,5133', '甘孜县', '51', '四川省', '5133', '甘孜藏族自治州', '513328', '甘孜县', '', '', '', '', 3, 1, ''), ('513329', '5133', '00,51,5133', '新龙县', '51', '四川省', '5133', '甘孜藏族自治州', '513329', '新龙县', '', '', '', '', 3, 1, ''), ('513330', '5133', '00,51,5133', '德格县', '51', '四川省', '5133', '甘孜藏族自治州', '513330', '德格县', '', '', '', '', 3, 1, ''), ('513331', '5133', '00,51,5133', '白玉县', '51', '四川省', '5133', '甘孜藏族自治州', '513331', '白玉县', '', '', '', '', 3, 1, ''), ('513332', '5133', '00,51,5133', '石渠县', '51', '四川省', '5133', '甘孜藏族自治州', '513332', '石渠县', '', '', '', '', 3, 1, ''), ('513333', '5133', '00,51,5133', '色达县', '51', '四川省', '5133', '甘孜藏族自治州', '513333', '色达县', '', '', '', '', 3, 1, ''), ('513334', '5133', '00,51,5133', '理塘县', '51', '四川省', '5133', '甘孜藏族自治州', '513334', '理塘县', '', '', '', '', 3, 1, ''), ('513335', '5133', '00,51,5133', '巴塘县', '51', '四川省', '5133', '甘孜藏族自治州', '513335', '巴塘县', '', '', '', '', 3, 1, ''), ('513336', '5133', '00,51,5133', '乡城县', '51', '四川省', '5133', '甘孜藏族自治州', '513336', '乡城县', '', '', '', '', 3, 1, ''), ('513337', '5133', '00,51,5133', '稻城县', '51', '四川省', '5133', '甘孜藏族自治州', '513337', '稻城县', '', '', '', '', 3, 1, ''), ('513338', '5133', '00,51,5133', '得荣县', '51', '四川省', '5133', '甘孜藏族自治州', '513338', '得荣县', '', '', '', '', 3, 1, ''), ('5134', '51', '00,51', '凉山彝族自治州', '51', '四川省', '5134', '凉山彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('513401', '5134', '00,51,5134', '西昌市', '51', '四川省', '5134', '凉山彝族自治州', '513401', '西昌市', '', '', '', '', 3, 1, ''), ('513422', '5134', '00,51,5134', '木里藏族自治县', '51', '四川省', '5134', '凉山彝族自治州', '513422', '木里藏族自治县', '', '', '', '', 3, 1, ''), ('513423', '5134', '00,51,5134', '盐源县', '51', '四川省', '5134', '凉山彝族自治州', '513423', '盐源县', '', '', '', '', 3, 1, ''), ('513424', '5134', '00,51,5134', '德昌县', '51', '四川省', '5134', '凉山彝族自治州', '513424', '德昌县', '', '', '', '', 3, 1, ''), ('513425', '5134', '00,51,5134', '会理县', '51', '四川省', '5134', '凉山彝族自治州', '513425', '会理县', '', '', '', '', 3, 1, ''), ('513426', '5134', '00,51,5134', '会东县', '51', '四川省', '5134', '凉山彝族自治州', '513426', '会东县', '', '', '', '', 3, 1, ''), ('513427', '5134', '00,51,5134', '宁南县', '51', '四川省', '5134', '凉山彝族自治州', '513427', '宁南县', '', '', '', '', 3, 1, ''), ('513428', '5134', '00,51,5134', '普格县', '51', '四川省', '5134', '凉山彝族自治州', '513428', '普格县', '', '', '', '', 3, 1, ''), ('513429', '5134', '00,51,5134', '布拖县', '51', '四川省', '5134', '凉山彝族自治州', '513429', '布拖县', '', '', '', '', 3, 1, ''), ('513430', '5134', '00,51,5134', '金阳县', '51', '四川省', '5134', '凉山彝族自治州', '513430', '金阳县', '', '', '', '', 3, 1, ''), ('513431', '5134', '00,51,5134', '昭觉县', '51', '四川省', '5134', '凉山彝族自治州', '513431', '昭觉县', '', '', '', '', 3, 1, ''), ('513432', '5134', '00,51,5134', '喜德县', '51', '四川省', '5134', '凉山彝族自治州', '513432', '喜德县', '', '', '', '', 3, 1, ''), ('513433', '5134', '00,51,5134', '冕宁县', '51', '四川省', '5134', '凉山彝族自治州', '513433', '冕宁县', '', '', '', '', 3, 1, ''), ('513434', '5134', '00,51,5134', '越西县', '51', '四川省', '5134', '凉山彝族自治州', '513434', '越西县', '', '', '', '', 3, 1, ''), ('513435', '5134', '00,51,5134', '甘洛县', '51', '四川省', '5134', '凉山彝族自治州', '513435', '甘洛县', '', '', '', '', 3, 1, ''), ('513436', '5134', '00,51,5134', '美姑县', '51', '四川省', '5134', '凉山彝族自治州', '513436', '美姑县', '', '', '', '', 3, 1, ''), ('513437', '5134', '00,51,5134', '雷波县', '51', '四川省', '5134', '凉山彝族自治州', '513437', '雷波县', '', '', '', '', 3, 1, ''), ('52', '00', '00', '贵州省', '52', '贵州省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5201', '52', '00,52', '贵阳市', '52', '贵州省', '5201', '贵阳市', '', '', '', '', '', '', 2, 1, ''), ('520102', '5201', '00,52,5201', '南明区', '52', '贵州省', '5201', '贵阳市', '520102', '南明区', '', '', '', '', 3, 1, ''), ('520103', '5201', '00,52,5201', '云岩区', '52', '贵州省', '5201', '贵阳市', '520103', '云岩区', '', '', '', '', 3, 1, ''), ('520111', '5201', '00,52,5201', '花溪区', '52', '贵州省', '5201', '贵阳市', '520111', '花溪区', '', '', '', '', 3, 1, ''), ('520112', '5201', '00,52,5201', '乌当区', '52', '贵州省', '5201', '贵阳市', '520112', '乌当区', '', '', '', '', 3, 1, ''), ('520113', '5201', '00,52,5201', '白云区', '52', '贵州省', '5201', '贵阳市', '520113', '白云区', '', '', '', '', 3, 1, ''), ('520115', '5201', '00,52,5201', '观山湖区', '52', '贵州省', '5201', '贵阳市', '520115', '观山湖区', '', '', '', '', 3, 1, ''), ('520121', '5201', '00,52,5201', '开阳县', '52', '贵州省', '5201', '贵阳市', '520121', '开阳县', '', '', '', '', 3, 1, ''), ('520122', '5201', '00,52,5201', '息烽县', '52', '贵州省', '5201', '贵阳市', '520122', '息烽县', '', '', '', '', 3, 1, ''), ('520123', '5201', '00,52,5201', '修文县', '52', '贵州省', '5201', '贵阳市', '520123', '修文县', '', '', '', '', 3, 1, ''), ('520181', '5201', '00,52,5201', '清镇市', '52', '贵州省', '5201', '贵阳市', '520181', '清镇市', '', '', '', '', 3, 1, ''), ('5202', '52', '00,52', '六盘水市', '52', '贵州省', '5202', '六盘水市', '', '', '', '', '', '', 2, 1, ''), ('520201', '5202', '00,52,5202', '钟山区', '52', '贵州省', '5202', '六盘水市', '520201', '钟山区', '', '', '', '', 3, 1, ''), ('520203', '5202', '00,52,5202', '六枝特区', '52', '贵州省', '5202', '六盘水市', '520203', '六枝特区', '', '', '', '', 3, 1, ''), ('520221', '5202', '00,52,5202', '水城县', '52', '贵州省', '5202', '六盘水市', '520221', '水城县', '', '', '', '', 3, 1, ''), ('520281', '5202', '00,52,5202', '盘州市', '52', '贵州省', '5202', '六盘水市', '520281', '盘州市', '', '', '', '', 3, 1, ''), ('5203', '52', '00,52', '遵义市', '52', '贵州省', '5203', '遵义市', '', '', '', '', '', '', 2, 1, ''), ('520302', '5203', '00,52,5203', '红花岗区', '52', '贵州省', '5203', '遵义市', '520302', '红花岗区', '', '', '', '', 3, 1, ''), ('520303', '5203', '00,52,5203', '汇川区', '52', '贵州省', '5203', '遵义市', '520303', '汇川区', '', '', '', '', 3, 1, ''), ('520304', '5203', '00,52,5203', '播州区', '52', '贵州省', '5203', '遵义市', '520304', '播州区', '', '', '', '', 3, 1, ''), ('520322', '5203', '00,52,5203', '桐梓县', '52', '贵州省', '5203', '遵义市', '520322', '桐梓县', '', '', '', '', 3, 1, ''), ('520323', '5203', '00,52,5203', '绥阳县', '52', '贵州省', '5203', '遵义市', '520323', '绥阳县', '', '', '', '', 3, 1, ''), ('520324', '5203', '00,52,5203', '正安县', '52', '贵州省', '5203', '遵义市', '520324', '正安县', '', '', '', '', 3, 1, ''), ('520325', '5203', '00,52,5203', '道真仡佬族苗族自治县', '52', '贵州省', '5203', '遵义市', '520325', '道真仡佬族苗族自治县', '', '', '', '', 3, 1, ''), ('520326', '5203', '00,52,5203', '务川仡佬族苗族自治县', '52', '贵州省', '5203', '遵义市', '520326', '务川仡佬族苗族自治县', '', '', '', '', 3, 1, ''), ('520327', '5203', '00,52,5203', '凤冈县', '52', '贵州省', '5203', '遵义市', '520327', '凤冈县', '', '', '', '', 3, 1, ''), ('520328', '5203', '00,52,5203', '湄潭县', '52', '贵州省', '5203', '遵义市', '520328', '湄潭县', '', '', '', '', 3, 1, ''), ('520329', '5203', '00,52,5203', '余庆县', '52', '贵州省', '5203', '遵义市', '520329', '余庆县', '', '', '', '', 3, 1, ''), ('520330', '5203', '00,52,5203', '习水县', '52', '贵州省', '5203', '遵义市', '520330', '习水县', '', '', '', '', 3, 1, ''), ('520381', '5203', '00,52,5203', '赤水市', '52', '贵州省', '5203', '遵义市', '520381', '赤水市', '', '', '', '', 3, 1, ''), ('520382', '5203', '00,52,5203', '仁怀市', '52', '贵州省', '5203', '遵义市', '520382', '仁怀市', '', '', '', '', 3, 1, ''), ('5204', '52', '00,52', '安顺市', '52', '贵州省', '5204', '安顺市', '', '', '', '', '', '', 2, 1, ''), ('520402', '5204', '00,52,5204', '西秀区', '52', '贵州省', '5204', '安顺市', '520402', '西秀区', '', '', '', '', 3, 1, ''), ('520403', '5204', '00,52,5204', '平坝区', '52', '贵州省', '5204', '安顺市', '520403', '平坝区', '', '', '', '', 3, 1, ''), ('520422', '5204', '00,52,5204', '普定县', '52', '贵州省', '5204', '安顺市', '520422', '普定县', '', '', '', '', 3, 1, ''), ('520423', '5204', '00,52,5204', '镇宁布依族苗族自治县', '52', '贵州省', '5204', '安顺市', '520423', '镇宁布依族苗族自治县', '', '', '', '', 3, 1, ''), ('520424', '5204', '00,52,5204', '关岭布依族苗族自治县', '52', '贵州省', '5204', '安顺市', '520424', '关岭布依族苗族自治县', '', '', '', '', 3, 1, ''), ('520425', '5204', '00,52,5204', '紫云苗族布依族自治县', '52', '贵州省', '5204', '安顺市', '520425', '紫云苗族布依族自治县', '', '', '', '', 3, 1, ''), ('5205', '52', '00,52', '毕节市', '52', '贵州省', '5205', '毕节市', '', '', '', '', '', '', 2, 1, ''), ('520502', '5205', '00,52,5205', '七星关区', '52', '贵州省', '5205', '毕节市', '520502', '七星关区', '', '', '', '', 3, 1, ''), ('520521', '5205', '00,52,5205', '大方县', '52', '贵州省', '5205', '毕节市', '520521', '大方县', '', '', '', '', 3, 1, ''), ('520522', '5205', '00,52,5205', '黔西县', '52', '贵州省', '5205', '毕节市', '520522', '黔西县', '', '', '', '', 3, 1, ''), ('520523', '5205', '00,52,5205', '金沙县', '52', '贵州省', '5205', '毕节市', '520523', '金沙县', '', '', '', '', 3, 1, ''), ('520524', '5205', '00,52,5205', '织金县', '52', '贵州省', '5205', '毕节市', '520524', '织金县', '', '', '', '', 3, 1, ''), ('520525', '5205', '00,52,5205', '纳雍县', '52', '贵州省', '5205', '毕节市', '520525', '纳雍县', '', '', '', '', 3, 1, ''), ('520526', '5205', '00,52,5205', '威宁彝族回族苗族自治县', '52', '贵州省', '5205', '毕节市', '520526', '威宁彝族回族苗族自治县', '', '', '', '', 3, 1, ''), ('520527', '5205', '00,52,5205', '赫章县', '52', '贵州省', '5205', '毕节市', '520527', '赫章县', '', '', '', '', 3, 1, ''), ('5206', '52', '00,52', '铜仁市', '52', '贵州省', '5206', '铜仁市', '', '', '', '', '', '', 2, 1, ''), ('520602', '5206', '00,52,5206', '碧江区', '52', '贵州省', '5206', '铜仁市', '520602', '碧江区', '', '', '', '', 3, 1, ''), ('520603', '5206', '00,52,5206', '万山区', '52', '贵州省', '5206', '铜仁市', '520603', '万山区', '', '', '', '', 3, 1, ''), ('520621', '5206', '00,52,5206', '江口县', '52', '贵州省', '5206', '铜仁市', '520621', '江口县', '', '', '', '', 3, 1, ''), ('520622', '5206', '00,52,5206', '玉屏侗族自治县', '52', '贵州省', '5206', '铜仁市', '520622', '玉屏侗族自治县', '', '', '', '', 3, 1, ''), ('520623', '5206', '00,52,5206', '石阡县', '52', '贵州省', '5206', '铜仁市', '520623', '石阡县', '', '', '', '', 3, 1, ''), ('520624', '5206', '00,52,5206', '思南县', '52', '贵州省', '5206', '铜仁市', '520624', '思南县', '', '', '', '', 3, 1, ''), ('520625', '5206', '00,52,5206', '印江土家族苗族自治县', '52', '贵州省', '5206', '铜仁市', '520625', '印江土家族苗族自治县', '', '', '', '', 3, 1, ''), ('520626', '5206', '00,52,5206', '德江县', '52', '贵州省', '5206', '铜仁市', '520626', '德江县', '', '', '', '', 3, 1, ''), ('520627', '5206', '00,52,5206', '沿河土家族自治县', '52', '贵州省', '5206', '铜仁市', '520627', '沿河土家族自治县', '', '', '', '', 3, 1, ''), ('520628', '5206', '00,52,5206', '松桃苗族自治县', '52', '贵州省', '5206', '铜仁市', '520628', '松桃苗族自治县', '', '', '', '', 3, 1, ''), ('5223', '52', '00,52', '黔西南布依族苗族自治州', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522301', '5223', '00,52,5223', '兴义市', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522301', '兴义市', '', '', '', '', 3, 1, ''), ('522302', '5223', '00,52,5223', '兴仁市', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522302', '兴仁市', '', '', '', '', 3, 1, ''), ('522323', '5223', '00,52,5223', '普安县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522323', '普安县', '', '', '', '', 3, 1, ''), ('522324', '5223', '00,52,5223', '晴隆县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522324', '晴隆县', '', '', '', '', 3, 1, ''), ('522325', '5223', '00,52,5223', '贞丰县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522325', '贞丰县', '', '', '', '', 3, 1, ''), ('522326', '5223', '00,52,5223', '望谟县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522326', '望谟县', '', '', '', '', 3, 1, ''), ('522327', '5223', '00,52,5223', '册亨县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522327', '册亨县', '', '', '', '', 3, 1, ''), ('522328', '5223', '00,52,5223', '安龙县', '52', '贵州省', '5223', '黔西南布依族苗族自治州', '522328', '安龙县', '', '', '', '', 3, 1, ''), ('5226', '52', '00,52', '黔东南苗族侗族自治州', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522601', '5226', '00,52,5226', '凯里市', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522601', '凯里市', '', '', '', '', 3, 1, ''), ('522622', '5226', '00,52,5226', '黄平县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522622', '黄平县', '', '', '', '', 3, 1, ''), ('522623', '5226', '00,52,5226', '施秉县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522623', '施秉县', '', '', '', '', 3, 1, ''), ('522624', '5226', '00,52,5226', '三穗县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522624', '三穗县', '', '', '', '', 3, 1, ''), ('522625', '5226', '00,52,5226', '镇远县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522625', '镇远县', '', '', '', '', 3, 1, ''), ('522626', '5226', '00,52,5226', '岑巩县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522626', '岑巩县', '', '', '', '', 3, 1, ''), ('522627', '5226', '00,52,5226', '天柱县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522627', '天柱县', '', '', '', '', 3, 1, ''), ('522628', '5226', '00,52,5226', '锦屏县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522628', '锦屏县', '', '', '', '', 3, 1, ''), ('522629', '5226', '00,52,5226', '剑河县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522629', '剑河县', '', '', '', '', 3, 1, ''), ('522630', '5226', '00,52,5226', '台江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522630', '台江县', '', '', '', '', 3, 1, ''), ('522631', '5226', '00,52,5226', '黎平县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522631', '黎平县', '', '', '', '', 3, 1, ''), ('522632', '5226', '00,52,5226', '榕江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522632', '榕江县', '', '', '', '', 3, 1, ''), ('522633', '5226', '00,52,5226', '从江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522633', '从江县', '', '', '', '', 3, 1, ''), ('522634', '5226', '00,52,5226', '雷山县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522634', '雷山县', '', '', '', '', 3, 1, ''), ('522635', '5226', '00,52,5226', '麻江县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522635', '麻江县', '', '', '', '', 3, 1, ''), ('522636', '5226', '00,52,5226', '丹寨县', '52', '贵州省', '5226', '黔东南苗族侗族自治州', '522636', '丹寨县', '', '', '', '', 3, 1, ''), ('5227', '52', '00,52', '黔南布依族苗族自治州', '52', '贵州省', '5227', '黔南布依族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('522701', '5227', '00,52,5227', '都匀市', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522701', '都匀市', '', '', '', '', 3, 1, ''), ('522702', '5227', '00,52,5227', '福泉市', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522702', '福泉市', '', '', '', '', 3, 1, ''), ('522722', '5227', '00,52,5227', '荔波县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522722', '荔波县', '', '', '', '', 3, 1, ''), ('522723', '5227', '00,52,5227', '贵定县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522723', '贵定县', '', '', '', '', 3, 1, ''), ('522725', '5227', '00,52,5227', '瓮安县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522725', '瓮安县', '', '', '', '', 3, 1, ''), ('522726', '5227', '00,52,5227', '独山县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522726', '独山县', '', '', '', '', 3, 1, ''), ('522727', '5227', '00,52,5227', '平塘县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522727', '平塘县', '', '', '', '', 3, 1, ''), ('522728', '5227', '00,52,5227', '罗甸县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522728', '罗甸县', '', '', '', '', 3, 1, ''), ('522729', '5227', '00,52,5227', '长顺县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522729', '长顺县', '', '', '', '', 3, 1, ''), ('522730', '5227', '00,52,5227', '龙里县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522730', '龙里县', '', '', '', '', 3, 1, ''), ('522731', '5227', '00,52,5227', '惠水县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522731', '惠水县', '', '', '', '', 3, 1, ''), ('522732', '5227', '00,52,5227', '三都水族自治县', '52', '贵州省', '5227', '黔南布依族苗族自治州', '522732', '三都水族自治县', '', '', '', '', 3, 1, ''), ('53', '00', '00', '云南省', '53', '云南省', '', '', '', '', '', '', '', '', 1, 1, ''), ('5301', '53', '00,53', '昆明市', '53', '云南省', '5301', '昆明市', '', '', '', '', '', '', 2, 1, ''), ('530102', '5301', '00,53,5301', '五华区', '53', '云南省', '5301', '昆明市', '530102', '五华区', '', '', '', '', 3, 1, ''), ('530103', '5301', '00,53,5301', '盘龙区', '53', '云南省', '5301', '昆明市', '530103', '盘龙区', '', '', '', '', 3, 1, ''), ('530111', '5301', '00,53,5301', '官渡区', '53', '云南省', '5301', '昆明市', '530111', '官渡区', '', '', '', '', 3, 1, ''), ('530112', '5301', '00,53,5301', '西山区', '53', '云南省', '5301', '昆明市', '530112', '西山区', '', '', '', '', 3, 1, ''), ('530113', '5301', '00,53,5301', '东川区', '53', '云南省', '5301', '昆明市', '530113', '东川区', '', '', '', '', 3, 1, ''), ('530114', '5301', '00,53,5301', '呈贡区', '53', '云南省', '5301', '昆明市', '530114', '呈贡区', '', '', '', '', 3, 1, ''), ('530115', '5301', '00,53,5301', '晋宁区', '53', '云南省', '5301', '昆明市', '530115', '晋宁区', '', '', '', '', 3, 1, ''), ('530124', '5301', '00,53,5301', '富民县', '53', '云南省', '5301', '昆明市', '530124', '富民县', '', '', '', '', 3, 1, ''), ('530125', '5301', '00,53,5301', '宜良县', '53', '云南省', '5301', '昆明市', '530125', '宜良县', '', '', '', '', 3, 1, ''), ('530126', '5301', '00,53,5301', '石林彝族自治县', '53', '云南省', '5301', '昆明市', '530126', '石林彝族自治县', '', '', '', '', 3, 1, ''), ('530127', '5301', '00,53,5301', '嵩明县', '53', '云南省', '5301', '昆明市', '530127', '嵩明县', '', '', '', '', 3, 1, ''), ('530128', '5301', '00,53,5301', '禄劝彝族苗族自治县', '53', '云南省', '5301', '昆明市', '530128', '禄劝彝族苗族自治县', '', '', '', '', 3, 1, ''), ('530129', '5301', '00,53,5301', '寻甸回族彝族自治县', '53', '云南省', '5301', '昆明市', '530129', '寻甸回族彝族自治县', '', '', '', '', 3, 1, ''), ('530181', '5301', '00,53,5301', '安宁市', '53', '云南省', '5301', '昆明市', '530181', '安宁市', '', '', '', '', 3, 1, ''), ('5303', '53', '00,53', '曲靖市', '53', '云南省', '5303', '曲靖市', '', '', '', '', '', '', 2, 1, ''), ('530302', '5303', '00,53,5303', '麒麟区', '53', '云南省', '5303', '曲靖市', '530302', '麒麟区', '', '', '', '', 3, 1, ''), ('530303', '5303', '00,53,5303', '沾益区', '53', '云南省', '5303', '曲靖市', '530303', '沾益区', '', '', '', '', 3, 1, ''), ('530304', '5303', '00,53,5303', '马龙区', '53', '云南省', '5303', '曲靖市', '530304', '马龙区', '', '', '', '', 3, 1, ''), ('530322', '5303', '00,53,5303', '陆良县', '53', '云南省', '5303', '曲靖市', '530322', '陆良县', '', '', '', '', 3, 1, ''), ('530323', '5303', '00,53,5303', '师宗县', '53', '云南省', '5303', '曲靖市', '530323', '师宗县', '', '', '', '', 3, 1, ''), ('530324', '5303', '00,53,5303', '罗平县', '53', '云南省', '5303', '曲靖市', '530324', '罗平县', '', '', '', '', 3, 1, ''), ('530325', '5303', '00,53,5303', '富源县', '53', '云南省', '5303', '曲靖市', '530325', '富源县', '', '', '', '', 3, 1, ''), ('530326', '5303', '00,53,5303', '会泽县', '53', '云南省', '5303', '曲靖市', '530326', '会泽县', '', '', '', '', 3, 1, ''), ('530381', '5303', '00,53,5303', '宣威市', '53', '云南省', '5303', '曲靖市', '530381', '宣威市', '', '', '', '', 3, 1, ''), ('5304', '53', '00,53', '玉溪市', '53', '云南省', '5304', '玉溪市', '', '', '', '', '', '', 2, 1, ''), ('530402', '5304', '00,53,5304', '红塔区', '53', '云南省', '5304', '玉溪市', '530402', '红塔区', '', '', '', '', 3, 1, ''), ('530403', '5304', '00,53,5304', '江川区', '53', '云南省', '5304', '玉溪市', '530403', '江川区', '', '', '', '', 3, 1, ''), ('530423', '5304', '00,53,5304', '通海县', '53', '云南省', '5304', '玉溪市', '530423', '通海县', '', '', '', '', 3, 1, ''), ('530424', '5304', '00,53,5304', '华宁县', '53', '云南省', '5304', '玉溪市', '530424', '华宁县', '', '', '', '', 3, 1, ''), ('530425', '5304', '00,53,5304', '易门县', '53', '云南省', '5304', '玉溪市', '530425', '易门县', '', '', '', '', 3, 1, ''), ('530426', '5304', '00,53,5304', '峨山彝族自治县', '53', '云南省', '5304', '玉溪市', '530426', '峨山彝族自治县', '', '', '', '', 3, 1, ''), ('530427', '5304', '00,53,5304', '新平彝族傣族自治县', '53', '云南省', '5304', '玉溪市', '530427', '新平彝族傣族自治县', '', '', '', '', 3, 1, ''), ('530428', '5304', '00,53,5304', '元江哈尼族彝族傣族自治县', '53', '云南省', '5304', '玉溪市', '530428', '元江哈尼族彝族傣族自治县', '', '', '', '', 3, 1, ''), ('530481', '5304', '00,53,5304', '澄江市', '53', '云南省', '5304', '玉溪市', '530481', '澄江市', '', '', '', '', 3, 1, ''), ('5305', '53', '00,53', '保山市', '53', '云南省', '5305', '保山市', '', '', '', '', '', '', 2, 1, ''), ('530502', '5305', '00,53,5305', '隆阳区', '53', '云南省', '5305', '保山市', '530502', '隆阳区', '', '', '', '', 3, 1, ''), ('530521', '5305', '00,53,5305', '施甸县', '53', '云南省', '5305', '保山市', '530521', '施甸县', '', '', '', '', 3, 1, ''), ('530523', '5305', '00,53,5305', '龙陵县', '53', '云南省', '5305', '保山市', '530523', '龙陵县', '', '', '', '', 3, 1, ''), ('530524', '5305', '00,53,5305', '昌宁县', '53', '云南省', '5305', '保山市', '530524', '昌宁县', '', '', '', '', 3, 1, ''), ('530581', '5305', '00,53,5305', '腾冲市', '53', '云南省', '5305', '保山市', '530581', '腾冲市', '', '', '', '', 3, 1, ''), ('5306', '53', '00,53', '昭通市', '53', '云南省', '5306', '昭通市', '', '', '', '', '', '', 2, 1, ''), ('530602', '5306', '00,53,5306', '昭阳区', '53', '云南省', '5306', '昭通市', '530602', '昭阳区', '', '', '', '', 3, 1, ''), ('530621', '5306', '00,53,5306', '鲁甸县', '53', '云南省', '5306', '昭通市', '530621', '鲁甸县', '', '', '', '', 3, 1, ''), ('530622', '5306', '00,53,5306', '巧家县', '53', '云南省', '5306', '昭通市', '530622', '巧家县', '', '', '', '', 3, 1, ''), ('530623', '5306', '00,53,5306', '盐津县', '53', '云南省', '5306', '昭通市', '530623', '盐津县', '', '', '', '', 3, 1, ''), ('530624', '5306', '00,53,5306', '大关县', '53', '云南省', '5306', '昭通市', '530624', '大关县', '', '', '', '', 3, 1, ''), ('530625', '5306', '00,53,5306', '永善县', '53', '云南省', '5306', '昭通市', '530625', '永善县', '', '', '', '', 3, 1, ''), ('530626', '5306', '00,53,5306', '绥江县', '53', '云南省', '5306', '昭通市', '530626', '绥江县', '', '', '', '', 3, 1, ''), ('530627', '5306', '00,53,5306', '镇雄县', '53', '云南省', '5306', '昭通市', '530627', '镇雄县', '', '', '', '', 3, 1, ''), ('530628', '5306', '00,53,5306', '彝良县', '53', '云南省', '5306', '昭通市', '530628', '彝良县', '', '', '', '', 3, 1, ''), ('530629', '5306', '00,53,5306', '威信县', '53', '云南省', '5306', '昭通市', '530629', '威信县', '', '', '', '', 3, 1, ''), ('530681', '5306', '00,53,5306', '水富市', '53', '云南省', '5306', '昭通市', '530681', '水富市', '', '', '', '', 3, 1, ''), ('5307', '53', '00,53', '丽江市', '53', '云南省', '5307', '丽江市', '', '', '', '', '', '', 2, 1, ''), ('530702', '5307', '00,53,5307', '古城区', '53', '云南省', '5307', '丽江市', '530702', '古城区', '', '', '', '', 3, 1, ''), ('530721', '5307', '00,53,5307', '玉龙纳西族自治县', '53', '云南省', '5307', '丽江市', '530721', '玉龙纳西族自治县', '', '', '', '', 3, 1, ''), ('530722', '5307', '00,53,5307', '永胜县', '53', '云南省', '5307', '丽江市', '530722', '永胜县', '', '', '', '', 3, 1, ''), ('530723', '5307', '00,53,5307', '华坪县', '53', '云南省', '5307', '丽江市', '530723', '华坪县', '', '', '', '', 3, 1, ''), ('530724', '5307', '00,53,5307', '宁蒗彝族自治县', '53', '云南省', '5307', '丽江市', '530724', '宁蒗彝族自治县', '', '', '', '', 3, 1, ''), ('5308', '53', '00,53', '普洱市', '53', '云南省', '5308', '普洱市', '', '', '', '', '', '', 2, 1, ''), ('530802', '5308', '00,53,5308', '思茅区', '53', '云南省', '5308', '普洱市', '530802', '思茅区', '', '', '', '', 3, 1, ''), ('530821', '5308', '00,53,5308', '宁洱哈尼族彝族自治县', '53', '云南省', '5308', '普洱市', '530821', '宁洱哈尼族彝族自治县', '', '', '', '', 3, 1, ''), ('530822', '5308', '00,53,5308', '墨江哈尼族自治县', '53', '云南省', '5308', '普洱市', '530822', '墨江哈尼族自治县', '', '', '', '', 3, 1, ''), ('530823', '5308', '00,53,5308', '景东彝族自治县', '53', '云南省', '5308', '普洱市', '530823', '景东彝族自治县', '', '', '', '', 3, 1, ''), ('530824', '5308', '00,53,5308', '景谷傣族彝族自治县', '53', '云南省', '5308', '普洱市', '530824', '景谷傣族彝族自治县', '', '', '', '', 3, 1, ''), ('530825', '5308', '00,53,5308', '镇沅彝族哈尼族拉祜族自治县', '53', '云南省', '5308', '普洱市', '530825', '镇沅彝族哈尼族拉祜族自治县', '', '', '', '', 3, 1, ''), ('530826', '5308', '00,53,5308', '江城哈尼族彝族自治县', '53', '云南省', '5308', '普洱市', '530826', '江城哈尼族彝族自治县', '', '', '', '', 3, 1, ''), ('530827', '5308', '00,53,5308', '孟连傣族拉祜族佤族自治县', '53', '云南省', '5308', '普洱市', '530827', '孟连傣族拉祜族佤族自治县', '', '', '', '', 3, 1, ''), ('530828', '5308', '00,53,5308', '澜沧拉祜族自治县', '53', '云南省', '5308', '普洱市', '530828', '澜沧拉祜族自治县', '', '', '', '', 3, 1, ''), ('530829', '5308', '00,53,5308', '西盟佤族自治县', '53', '云南省', '5308', '普洱市', '530829', '西盟佤族自治县', '', '', '', '', 3, 1, ''), ('5309', '53', '00,53', '临沧市', '53', '云南省', '5309', '临沧市', '', '', '', '', '', '', 2, 1, ''), ('530902', '5309', '00,53,5309', '临翔区', '53', '云南省', '5309', '临沧市', '530902', '临翔区', '', '', '', '', 3, 1, ''), ('530921', '5309', '00,53,5309', '凤庆县', '53', '云南省', '5309', '临沧市', '530921', '凤庆县', '', '', '', '', 3, 1, ''), ('530922', '5309', '00,53,5309', '云县', '53', '云南省', '5309', '临沧市', '530922', '云县', '', '', '', '', 3, 1, ''), ('530923', '5309', '00,53,5309', '永德县', '53', '云南省', '5309', '临沧市', '530923', '永德县', '', '', '', '', 3, 1, ''), ('530924', '5309', '00,53,5309', '镇康县', '53', '云南省', '5309', '临沧市', '530924', '镇康县', '', '', '', '', 3, 1, ''), ('530925', '5309', '00,53,5309', '双江拉祜族佤族布朗族傣族自治县', '53', '云南省', '5309', '临沧市', '530925', '双江拉祜族佤族布朗族傣族自治县', '', '', '', '', 3, 1, ''), ('530926', '5309', '00,53,5309', '耿马傣族佤族自治县', '53', '云南省', '5309', '临沧市', '530926', '耿马傣族佤族自治县', '', '', '', '', 3, 1, ''), ('530927', '5309', '00,53,5309', '沧源佤族自治县', '53', '云南省', '5309', '临沧市', '530927', '沧源佤族自治县', '', '', '', '', 3, 1, ''), ('5323', '53', '00,53', '楚雄彝族自治州', '53', '云南省', '5323', '楚雄彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('532301', '5323', '00,53,5323', '楚雄市', '53', '云南省', '5323', '楚雄彝族自治州', '532301', '楚雄市', '', '', '', '', 3, 1, ''), ('532322', '5323', '00,53,5323', '双柏县', '53', '云南省', '5323', '楚雄彝族自治州', '532322', '双柏县', '', '', '', '', 3, 1, ''), ('532323', '5323', '00,53,5323', '牟定县', '53', '云南省', '5323', '楚雄彝族自治州', '532323', '牟定县', '', '', '', '', 3, 1, ''), ('532324', '5323', '00,53,5323', '南华县', '53', '云南省', '5323', '楚雄彝族自治州', '532324', '南华县', '', '', '', '', 3, 1, ''), ('532325', '5323', '00,53,5323', '姚安县', '53', '云南省', '5323', '楚雄彝族自治州', '532325', '姚安县', '', '', '', '', 3, 1, ''), ('532326', '5323', '00,53,5323', '大姚县', '53', '云南省', '5323', '楚雄彝族自治州', '532326', '大姚县', '', '', '', '', 3, 1, ''), ('532327', '5323', '00,53,5323', '永仁县', '53', '云南省', '5323', '楚雄彝族自治州', '532327', '永仁县', '', '', '', '', 3, 1, ''), ('532328', '5323', '00,53,5323', '元谋县', '53', '云南省', '5323', '楚雄彝族自治州', '532328', '元谋县', '', '', '', '', 3, 1, ''), ('532329', '5323', '00,53,5323', '武定县', '53', '云南省', '5323', '楚雄彝族自治州', '532329', '武定县', '', '', '', '', 3, 1, ''), ('532331', '5323', '00,53,5323', '禄丰县', '53', '云南省', '5323', '楚雄彝族自治州', '532331', '禄丰县', '', '', '', '', 3, 1, ''), ('5325', '53', '00,53', '红河哈尼族彝族自治州', '53', '云南省', '5325', '红河哈尼族彝族自治州', '', '', '', '', '', '', 2, 1, ''), ('532501', '5325', '00,53,5325', '个旧市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532501', '个旧市', '', '', '', '', 3, 1, ''), ('532502', '5325', '00,53,5325', '开远市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532502', '开远市', '', '', '', '', 3, 1, ''), ('532503', '5325', '00,53,5325', '蒙自市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532503', '蒙自市', '', '', '', '', 3, 1, ''), ('532504', '5325', '00,53,5325', '弥勒市', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532504', '弥勒市', '', '', '', '', 3, 1, ''), ('532523', '5325', '00,53,5325', '屏边苗族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532523', '屏边苗族自治县', '', '', '', '', 3, 1, ''), ('532524', '5325', '00,53,5325', '建水县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532524', '建水县', '', '', '', '', 3, 1, ''), ('532525', '5325', '00,53,5325', '石屏县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532525', '石屏县', '', '', '', '', 3, 1, ''), ('532527', '5325', '00,53,5325', '泸西县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532527', '泸西县', '', '', '', '', 3, 1, ''), ('532528', '5325', '00,53,5325', '元阳县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532528', '元阳县', '', '', '', '', 3, 1, ''), ('532529', '5325', '00,53,5325', '红河县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532529', '红河县', '', '', '', '', 3, 1, ''), ('532530', '5325', '00,53,5325', '金平苗族瑶族傣族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532530', '金平苗族瑶族傣族自治县', '', '', '', '', 3, 1, ''), ('532531', '5325', '00,53,5325', '绿春县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532531', '绿春县', '', '', '', '', 3, 1, ''), ('532532', '5325', '00,53,5325', '河口瑶族自治县', '53', '云南省', '5325', '红河哈尼族彝族自治州', '532532', '河口瑶族自治县', '', '', '', '', 3, 1, ''), ('5326', '53', '00,53', '文山壮族苗族自治州', '53', '云南省', '5326', '文山壮族苗族自治州', '', '', '', '', '', '', 2, 1, ''), ('532601', '5326', '00,53,5326', '文山市', '53', '云南省', '5326', '文山壮族苗族自治州', '532601', '文山市', '', '', '', '', 3, 1, ''), ('532622', '5326', '00,53,5326', '砚山县', '53', '云南省', '5326', '文山壮族苗族自治州', '532622', '砚山县', '', '', '', '', 3, 1, ''), ('532623', '5326', '00,53,5326', '西畴县', '53', '云南省', '5326', '文山壮族苗族自治州', '532623', '西畴县', '', '', '', '', 3, 1, ''), ('532624', '5326', '00,53,5326', '麻栗坡县', '53', '云南省', '5326', '文山壮族苗族自治州', '532624', '麻栗坡县', '', '', '', '', 3, 1, ''), ('532625', '5326', '00,53,5326', '马关县', '53', '云南省', '5326', '文山壮族苗族自治州', '532625', '马关县', '', '', '', '', 3, 1, ''), ('532626', '5326', '00,53,5326', '丘北县', '53', '云南省', '5326', '文山壮族苗族自治州', '532626', '丘北县', '', '', '', '', 3, 1, ''), ('532627', '5326', '00,53,5326', '广南县', '53', '云南省', '5326', '文山壮族苗族自治州', '532627', '广南县', '', '', '', '', 3, 1, ''), ('532628', '5326', '00,53,5326', '富宁县', '53', '云南省', '5326', '文山壮族苗族自治州', '532628', '富宁县', '', '', '', '', 3, 1, ''), ('5328', '53', '00,53', '西双版纳傣族自治州', '53', '云南省', '5328', '西双版纳傣族自治州', '', '', '', '', '', '', 2, 1, ''), ('532801', '5328', '00,53,5328', '景洪市', '53', '云南省', '5328', '西双版纳傣族自治州', '532801', '景洪市', '', '', '', '', 3, 1, ''), ('532822', '5328', '00,53,5328', '勐海县', '53', '云南省', '5328', '西双版纳傣族自治州', '532822', '勐海县', '', '', '', '', 3, 1, ''), ('532823', '5328', '00,53,5328', '勐腊县', '53', '云南省', '5328', '西双版纳傣族自治州', '532823', '勐腊县', '', '', '', '', 3, 1, ''), ('5329', '53', '00,53', '大理白族自治州', '53', '云南省', '5329', '大理白族自治州', '', '', '', '', '', '', 2, 1, ''), ('532901', '5329', '00,53,5329', '大理市', '53', '云南省', '5329', '大理白族自治州', '532901', '大理市', '', '', '', '', 3, 1, ''), ('532922', '5329', '00,53,5329', '漾濞彝族自治县', '53', '云南省', '5329', '大理白族自治州', '532922', '漾濞彝族自治县', '', '', '', '', 3, 1, ''), ('532923', '5329', '00,53,5329', '祥云县', '53', '云南省', '5329', '大理白族自治州', '532923', '祥云县', '', '', '', '', 3, 1, ''), ('532924', '5329', '00,53,5329', '宾川县', '53', '云南省', '5329', '大理白族自治州', '532924', '宾川县', '', '', '', '', 3, 1, ''), ('532925', '5329', '00,53,5329', '弥渡县', '53', '云南省', '5329', '大理白族自治州', '532925', '弥渡县', '', '', '', '', 3, 1, ''), ('532926', '5329', '00,53,5329', '南涧彝族自治县', '53', '云南省', '5329', '大理白族自治州', '532926', '南涧彝族自治县', '', '', '', '', 3, 1, ''), ('532927', '5329', '00,53,5329', '巍山彝族回族自治县', '53', '云南省', '5329', '大理白族自治州', '532927', '巍山彝族回族自治县', '', '', '', '', 3, 1, ''), ('532928', '5329', '00,53,5329', '永平县', '53', '云南省', '5329', '大理白族自治州', '532928', '永平县', '', '', '', '', 3, 1, ''), ('532929', '5329', '00,53,5329', '云龙县', '53', '云南省', '5329', '大理白族自治州', '532929', '云龙县', '', '', '', '', 3, 1, ''), ('532930', '5329', '00,53,5329', '洱源县', '53', '云南省', '5329', '大理白族自治州', '532930', '洱源县', '', '', '', '', 3, 1, ''), ('532931', '5329', '00,53,5329', '剑川县', '53', '云南省', '5329', '大理白族自治州', '532931', '剑川县', '', '', '', '', 3, 1, ''), ('532932', '5329', '00,53,5329', '鹤庆县', '53', '云南省', '5329', '大理白族自治州', '532932', '鹤庆县', '', '', '', '', 3, 1, ''), ('5331', '53', '00,53', '德宏傣族景颇族自治州', '53', '云南省', '5331', '德宏傣族景颇族自治州', '', '', '', '', '', '', 2, 1, ''), ('533102', '5331', '00,53,5331', '瑞丽市', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533102', '瑞丽市', '', '', '', '', 3, 1, ''), ('533103', '5331', '00,53,5331', '芒市', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533103', '芒市', '', '', '', '', 3, 1, ''), ('533122', '5331', '00,53,5331', '梁河县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533122', '梁河县', '', '', '', '', 3, 1, ''), ('533123', '5331', '00,53,5331', '盈江县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533123', '盈江县', '', '', '', '', 3, 1, ''), ('533124', '5331', '00,53,5331', '陇川县', '53', '云南省', '5331', '德宏傣族景颇族自治州', '533124', '陇川县', '', '', '', '', 3, 1, ''), ('5333', '53', '00,53', '怒江傈僳族自治州', '53', '云南省', '5333', '怒江傈僳族自治州', '', '', '', '', '', '', 2, 1, ''), ('533301', '5333', '00,53,5333', '泸水市', '53', '云南省', '5333', '怒江傈僳族自治州', '533301', '泸水市', '', '', '', '', 3, 1, ''), ('533323', '5333', '00,53,5333', '福贡县', '53', '云南省', '5333', '怒江傈僳族自治州', '533323', '福贡县', '', '', '', '', 3, 1, ''), ('533324', '5333', '00,53,5333', '贡山独龙族怒族自治县', '53', '云南省', '5333', '怒江傈僳族自治州', '533324', '贡山独龙族怒族自治县', '', '', '', '', 3, 1, ''), ('533325', '5333', '00,53,5333', '兰坪白族普米族自治县', '53', '云南省', '5333', '怒江傈僳族自治州', '533325', '兰坪白族普米族自治县', '', '', '', '', 3, 1, ''), ('5334', '53', '00,53', '迪庆藏族自治州', '53', '云南省', '5334', '迪庆藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('533401', '5334', '00,53,5334', '香格里拉市', '53', '云南省', '5334', '迪庆藏族自治州', '533401', '香格里拉市', '', '', '', '', 3, 1, ''), ('533422', '5334', '00,53,5334', '德钦县', '53', '云南省', '5334', '迪庆藏族自治州', '533422', '德钦县', '', '', '', '', 3, 1, ''), ('533423', '5334', '00,53,5334', '维西傈僳族自治县', '53', '云南省', '5334', '迪庆藏族自治州', '533423', '维西傈僳族自治县', '', '', '', '', 3, 1, ''), ('54', '00', '00', '西藏自治区', '54', '西藏自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('5401', '54', '00,54', '拉萨市', '54', '西藏自治区', '5401', '拉萨市', '', '', '', '', '', '', 2, 1, ''), ('540102', '5401', '00,54,5401', '城关区', '54', '西藏自治区', '5401', '拉萨市', '540102', '城关区', '', '', '', '', 3, 1, ''), ('540103', '5401', '00,54,5401', '堆龙德庆区', '54', '西藏自治区', '5401', '拉萨市', '540103', '堆龙德庆区', '', '', '', '', 3, 1, ''), ('540104', '5401', '00,54,5401', '达孜区', '54', '西藏自治区', '5401', '拉萨市', '540104', '达孜区', '', '', '', '', 3, 1, ''), ('540121', '5401', '00,54,5401', '林周县', '54', '西藏自治区', '5401', '拉萨市', '540121', '林周县', '', '', '', '', 3, 1, ''), ('540122', '5401', '00,54,5401', '当雄县', '54', '西藏自治区', '5401', '拉萨市', '540122', '当雄县', '', '', '', '', 3, 1, ''), ('540123', '5401', '00,54,5401', '尼木县', '54', '西藏自治区', '5401', '拉萨市', '540123', '尼木县', '', '', '', '', 3, 1, ''), ('540124', '5401', '00,54,5401', '曲水县', '54', '西藏自治区', '5401', '拉萨市', '540124', '曲水县', '', '', '', '', 3, 1, ''), ('540127', '5401', '00,54,5401', '墨竹工卡县', '54', '西藏自治区', '5401', '拉萨市', '540127', '墨竹工卡县', '', '', '', '', 3, 1, ''), ('5402', '54', '00,54', '日喀则市', '54', '西藏自治区', '5402', '日喀则市', '', '', '', '', '', '', 2, 1, ''), ('540202', '5402', '00,54,5402', '桑珠孜区', '54', '西藏自治区', '5402', '日喀则市', '540202', '桑珠孜区', '', '', '', '', 3, 1, ''), ('540221', '5402', '00,54,5402', '南木林县', '54', '西藏自治区', '5402', '日喀则市', '540221', '南木林县', '', '', '', '', 3, 1, ''), ('540222', '5402', '00,54,5402', '江孜县', '54', '西藏自治区', '5402', '日喀则市', '540222', '江孜县', '', '', '', '', 3, 1, ''), ('540223', '5402', '00,54,5402', '定日县', '54', '西藏自治区', '5402', '日喀则市', '540223', '定日县', '', '', '', '', 3, 1, ''), ('540224', '5402', '00,54,5402', '萨迦县', '54', '西藏自治区', '5402', '日喀则市', '540224', '萨迦县', '', '', '', '', 3, 1, ''), ('540225', '5402', '00,54,5402', '拉孜县', '54', '西藏自治区', '5402', '日喀则市', '540225', '拉孜县', '', '', '', '', 3, 1, ''), ('540226', '5402', '00,54,5402', '昂仁县', '54', '西藏自治区', '5402', '日喀则市', '540226', '昂仁县', '', '', '', '', 3, 1, ''), ('540227', '5402', '00,54,5402', '谢通门县', '54', '西藏自治区', '5402', '日喀则市', '540227', '谢通门县', '', '', '', '', 3, 1, ''), ('540228', '5402', '00,54,5402', '白朗县', '54', '西藏自治区', '5402', '日喀则市', '540228', '白朗县', '', '', '', '', 3, 1, ''), ('540229', '5402', '00,54,5402', '仁布县', '54', '西藏自治区', '5402', '日喀则市', '540229', '仁布县', '', '', '', '', 3, 1, ''), ('540230', '5402', '00,54,5402', '康马县', '54', '西藏自治区', '5402', '日喀则市', '540230', '康马县', '', '', '', '', 3, 1, ''), ('540231', '5402', '00,54,5402', '定结县', '54', '西藏自治区', '5402', '日喀则市', '540231', '定结县', '', '', '', '', 3, 1, ''), ('540232', '5402', '00,54,5402', '仲巴县', '54', '西藏自治区', '5402', '日喀则市', '540232', '仲巴县', '', '', '', '', 3, 1, ''), ('540233', '5402', '00,54,5402', '亚东县', '54', '西藏自治区', '5402', '日喀则市', '540233', '亚东县', '', '', '', '', 3, 1, ''), ('540234', '5402', '00,54,5402', '吉隆县', '54', '西藏自治区', '5402', '日喀则市', '540234', '吉隆县', '', '', '', '', 3, 1, ''), ('540235', '5402', '00,54,5402', '聂拉木县', '54', '西藏自治区', '5402', '日喀则市', '540235', '聂拉木县', '', '', '', '', 3, 1, ''), ('540236', '5402', '00,54,5402', '萨嘎县', '54', '西藏自治区', '5402', '日喀则市', '540236', '萨嘎县', '', '', '', '', 3, 1, ''), ('540237', '5402', '00,54,5402', '岗巴县', '54', '西藏自治区', '5402', '日喀则市', '540237', '岗巴县', '', '', '', '', 3, 1, ''), ('5403', '54', '00,54', '昌都市', '54', '西藏自治区', '5403', '昌都市', '', '', '', '', '', '', 2, 1, ''), ('540302', '5403', '00,54,5403', '卡若区', '54', '西藏自治区', '5403', '昌都市', '540302', '卡若区', '', '', '', '', 3, 1, ''), ('540321', '5403', '00,54,5403', '江达县', '54', '西藏自治区', '5403', '昌都市', '540321', '江达县', '', '', '', '', 3, 1, ''), ('540322', '5403', '00,54,5403', '贡觉县', '54', '西藏自治区', '5403', '昌都市', '540322', '贡觉县', '', '', '', '', 3, 1, ''), ('540323', '5403', '00,54,5403', '类乌齐县', '54', '西藏自治区', '5403', '昌都市', '540323', '类乌齐县', '', '', '', '', 3, 1, ''), ('540324', '5403', '00,54,5403', '丁青县', '54', '西藏自治区', '5403', '昌都市', '540324', '丁青县', '', '', '', '', 3, 1, ''), ('540325', '5403', '00,54,5403', '察雅县', '54', '西藏自治区', '5403', '昌都市', '540325', '察雅县', '', '', '', '', 3, 1, ''), ('540326', '5403', '00,54,5403', '八宿县', '54', '西藏自治区', '5403', '昌都市', '540326', '八宿县', '', '', '', '', 3, 1, ''), ('540327', '5403', '00,54,5403', '左贡县', '54', '西藏自治区', '5403', '昌都市', '540327', '左贡县', '', '', '', '', 3, 1, ''), ('540328', '5403', '00,54,5403', '芒康县', '54', '西藏自治区', '5403', '昌都市', '540328', '芒康县', '', '', '', '', 3, 1, ''), ('540329', '5403', '00,54,5403', '洛隆县', '54', '西藏自治区', '5403', '昌都市', '540329', '洛隆县', '', '', '', '', 3, 1, ''), ('540330', '5403', '00,54,5403', '边坝县', '54', '西藏自治区', '5403', '昌都市', '540330', '边坝县', '', '', '', '', 3, 1, ''), ('5404', '54', '00,54', '林芝市', '54', '西藏自治区', '5404', '林芝市', '', '', '', '', '', '', 2, 1, ''), ('540402', '5404', '00,54,5404', '巴宜区', '54', '西藏自治区', '5404', '林芝市', '540402', '巴宜区', '', '', '', '', 3, 1, ''), ('540421', '5404', '00,54,5404', '工布江达县', '54', '西藏自治区', '5404', '林芝市', '540421', '工布江达县', '', '', '', '', 3, 1, ''), ('540422', '5404', '00,54,5404', '米林县', '54', '西藏自治区', '5404', '林芝市', '540422', '米林县', '', '', '', '', 3, 1, ''), ('540423', '5404', '00,54,5404', '墨脱县', '54', '西藏自治区', '5404', '林芝市', '540423', '墨脱县', '', '', '', '', 3, 1, ''), ('540424', '5404', '00,54,5404', '波密县', '54', '西藏自治区', '5404', '林芝市', '540424', '波密县', '', '', '', '', 3, 1, ''), ('540425', '5404', '00,54,5404', '察隅县', '54', '西藏自治区', '5404', '林芝市', '540425', '察隅县', '', '', '', '', 3, 1, ''), ('540426', '5404', '00,54,5404', '朗县', '54', '西藏自治区', '5404', '林芝市', '540426', '朗县', '', '', '', '', 3, 1, ''), ('5405', '54', '00,54', '山南市', '54', '西藏自治区', '5405', '山南市', '', '', '', '', '', '', 2, 1, ''), ('540502', '5405', '00,54,5405', '乃东区', '54', '西藏自治区', '5405', '山南市', '540502', '乃东区', '', '', '', '', 3, 1, ''), ('540521', '5405', '00,54,5405', '扎囊县', '54', '西藏自治区', '5405', '山南市', '540521', '扎囊县', '', '', '', '', 3, 1, ''), ('540522', '5405', '00,54,5405', '贡嘎县', '54', '西藏自治区', '5405', '山南市', '540522', '贡嘎县', '', '', '', '', 3, 1, ''), ('540523', '5405', '00,54,5405', '桑日县', '54', '西藏自治区', '5405', '山南市', '540523', '桑日县', '', '', '', '', 3, 1, ''), ('540524', '5405', '00,54,5405', '琼结县', '54', '西藏自治区', '5405', '山南市', '540524', '琼结县', '', '', '', '', 3, 1, ''), ('540525', '5405', '00,54,5405', '曲松县', '54', '西藏自治区', '5405', '山南市', '540525', '曲松县', '', '', '', '', 3, 1, ''), ('540526', '5405', '00,54,5405', '措美县', '54', '西藏自治区', '5405', '山南市', '540526', '措美县', '', '', '', '', 3, 1, ''), ('540527', '5405', '00,54,5405', '洛扎县', '54', '西藏自治区', '5405', '山南市', '540527', '洛扎县', '', '', '', '', 3, 1, ''), ('540528', '5405', '00,54,5405', '加查县', '54', '西藏自治区', '5405', '山南市', '540528', '加查县', '', '', '', '', 3, 1, ''), ('540529', '5405', '00,54,5405', '隆子县', '54', '西藏自治区', '5405', '山南市', '540529', '隆子县', '', '', '', '', 3, 1, ''), ('540530', '5405', '00,54,5405', '错那县', '54', '西藏自治区', '5405', '山南市', '540530', '错那县', '', '', '', '', 3, 1, ''), ('540531', '5405', '00,54,5405', '浪卡子县', '54', '西藏自治区', '5405', '山南市', '540531', '浪卡子县', '', '', '', '', 3, 1, ''), ('5406', '54', '00,54', '那曲市', '54', '西藏自治区', '5406', '那曲市', '', '', '', '', '', '', 2, 1, ''), ('540602', '5406', '00,54,5406', '色尼区', '54', '西藏自治区', '5406', '那曲市', '540602', '色尼区', '', '', '', '', 3, 1, ''), ('540621', '5406', '00,54,5406', '嘉黎县', '54', '西藏自治区', '5406', '那曲市', '540621', '嘉黎县', '', '', '', '', 3, 1, ''), ('540622', '5406', '00,54,5406', '比如县', '54', '西藏自治区', '5406', '那曲市', '540622', '比如县', '', '', '', '', 3, 1, ''), ('540623', '5406', '00,54,5406', '聂荣县', '54', '西藏自治区', '5406', '那曲市', '540623', '聂荣县', '', '', '', '', 3, 1, ''), ('540624', '5406', '00,54,5406', '安多县', '54', '西藏自治区', '5406', '那曲市', '540624', '安多县', '', '', '', '', 3, 1, ''), ('540625', '5406', '00,54,5406', '申扎县', '54', '西藏自治区', '5406', '那曲市', '540625', '申扎县', '', '', '', '', 3, 1, ''), ('540626', '5406', '00,54,5406', '索县', '54', '西藏自治区', '5406', '那曲市', '540626', '索县', '', '', '', '', 3, 1, ''), ('540627', '5406', '00,54,5406', '班戈县', '54', '西藏自治区', '5406', '那曲市', '540627', '班戈县', '', '', '', '', 3, 1, ''), ('540628', '5406', '00,54,5406', '巴青县', '54', '西藏自治区', '5406', '那曲市', '540628', '巴青县', '', '', '', '', 3, 1, ''), ('540629', '5406', '00,54,5406', '尼玛县', '54', '西藏自治区', '5406', '那曲市', '540629', '尼玛县', '', '', '', '', 3, 1, ''), ('540630', '5406', '00,54,5406', '双湖县', '54', '西藏自治区', '5406', '那曲市', '540630', '双湖县', '', '', '', '', 3, 1, ''), ('5425', '54', '00,54', '阿里地区', '54', '西藏自治区', '5425', '阿里地区', '', '', '', '', '', '', 2, 1, ''), ('542521', '5425', '00,54,5425', '普兰县', '54', '西藏自治区', '5425', '阿里地区', '542521', '普兰县', '', '', '', '', 3, 1, ''), ('542522', '5425', '00,54,5425', '札达县', '54', '西藏自治区', '5425', '阿里地区', '542522', '札达县', '', '', '', '', 3, 1, ''), ('542523', '5425', '00,54,5425', '噶尔县', '54', '西藏自治区', '5425', '阿里地区', '542523', '噶尔县', '', '', '', '', 3, 1, ''), ('542524', '5425', '00,54,5425', '日土县', '54', '西藏自治区', '5425', '阿里地区', '542524', '日土县', '', '', '', '', 3, 1, ''), ('542525', '5425', '00,54,5425', '革吉县', '54', '西藏自治区', '5425', '阿里地区', '542525', '革吉县', '', '', '', '', 3, 1, ''), ('542526', '5425', '00,54,5425', '改则县', '54', '西藏自治区', '5425', '阿里地区', '542526', '改则县', '', '', '', '', 3, 1, ''), ('542527', '5425', '00,54,5425', '措勤县', '54', '西藏自治区', '5425', '阿里地区', '542527', '措勤县', '', '', '', '', 3, 1, ''), ('61', '00', '00', '陕西省', '61', '陕西省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6101', '61', '00,61', '西安市', '61', '陕西省', '6101', '西安市', '', '', '', '', '', '', 2, 1, ''), ('610102', '6101', '00,61,6101', '新城区', '61', '陕西省', '6101', '西安市', '610102', '新城区', '', '', '', '', 3, 1, ''), ('610103', '6101', '00,61,6101', '碑林区', '61', '陕西省', '6101', '西安市', '610103', '碑林区', '', '', '', '', 3, 1, ''), ('610104', '6101', '00,61,6101', '莲湖区', '61', '陕西省', '6101', '西安市', '610104', '莲湖区', '', '', '', '', 3, 1, ''), ('610111', '6101', '00,61,6101', '灞桥区', '61', '陕西省', '6101', '西安市', '610111', '灞桥区', '', '', '', '', 3, 1, ''), ('610112', '6101', '00,61,6101', '未央区', '61', '陕西省', '6101', '西安市', '610112', '未央区', '', '', '', '', 3, 1, ''), ('610113', '6101', '00,61,6101', '雁塔区', '61', '陕西省', '6101', '西安市', '610113', '雁塔区', '', '', '', '', 3, 1, ''), ('610114', '6101', '00,61,6101', '阎良区', '61', '陕西省', '6101', '西安市', '610114', '阎良区', '', '', '', '', 3, 1, ''), ('610115', '6101', '00,61,6101', '临潼区', '61', '陕西省', '6101', '西安市', '610115', '临潼区', '', '', '', '', 3, 1, ''), ('610116', '6101', '00,61,6101', '长安区', '61', '陕西省', '6101', '西安市', '610116', '长安区', '', '', '', '', 3, 1, ''), ('610117', '6101', '00,61,6101', '高陵区', '61', '陕西省', '6101', '西安市', '610117', '高陵区', '', '', '', '', 3, 1, ''), ('610118', '6101', '00,61,6101', '鄠邑区', '61', '陕西省', '6101', '西安市', '610118', '鄠邑区', '', '', '', '', 3, 1, ''), ('610122', '6101', '00,61,6101', '蓝田县', '61', '陕西省', '6101', '西安市', '610122', '蓝田县', '', '', '', '', 3, 1, ''), ('610124', '6101', '00,61,6101', '周至县', '61', '陕西省', '6101', '西安市', '610124', '周至县', '', '', '', '', 3, 1, ''), ('6102', '61', '00,61', '铜川市', '61', '陕西省', '6102', '铜川市', '', '', '', '', '', '', 2, 1, ''), ('610202', '6102', '00,61,6102', '王益区', '61', '陕西省', '6102', '铜川市', '610202', '王益区', '', '', '', '', 3, 1, ''), ('610203', '6102', '00,61,6102', '印台区', '61', '陕西省', '6102', '铜川市', '610203', '印台区', '', '', '', '', 3, 1, ''), ('610204', '6102', '00,61,6102', '耀州区', '61', '陕西省', '6102', '铜川市', '610204', '耀州区', '', '', '', '', 3, 1, ''), ('610222', '6102', '00,61,6102', '宜君县', '61', '陕西省', '6102', '铜川市', '610222', '宜君县', '', '', '', '', 3, 1, ''), ('6103', '61', '00,61', '宝鸡市', '61', '陕西省', '6103', '宝鸡市', '', '', '', '', '', '', 2, 1, ''), ('610302', '6103', '00,61,6103', '渭滨区', '61', '陕西省', '6103', '宝鸡市', '610302', '渭滨区', '', '', '', '', 3, 1, ''), ('610303', '6103', '00,61,6103', '金台区', '61', '陕西省', '6103', '宝鸡市', '610303', '金台区', '', '', '', '', 3, 1, ''), ('610304', '6103', '00,61,6103', '陈仓区', '61', '陕西省', '6103', '宝鸡市', '610304', '陈仓区', '', '', '', '', 3, 1, ''), ('610322', '6103', '00,61,6103', '凤翔县', '61', '陕西省', '6103', '宝鸡市', '610322', '凤翔县', '', '', '', '', 3, 1, ''), ('610323', '6103', '00,61,6103', '岐山县', '61', '陕西省', '6103', '宝鸡市', '610323', '岐山县', '', '', '', '', 3, 1, ''), ('610324', '6103', '00,61,6103', '扶风县', '61', '陕西省', '6103', '宝鸡市', '610324', '扶风县', '', '', '', '', 3, 1, ''), ('610326', '6103', '00,61,6103', '眉县', '61', '陕西省', '6103', '宝鸡市', '610326', '眉县', '', '', '', '', 3, 1, ''), ('610327', '6103', '00,61,6103', '陇县', '61', '陕西省', '6103', '宝鸡市', '610327', '陇县', '', '', '', '', 3, 1, ''), ('610328', '6103', '00,61,6103', '千阳县', '61', '陕西省', '6103', '宝鸡市', '610328', '千阳县', '', '', '', '', 3, 1, ''), ('610329', '6103', '00,61,6103', '麟游县', '61', '陕西省', '6103', '宝鸡市', '610329', '麟游县', '', '', '', '', 3, 1, ''), ('610330', '6103', '00,61,6103', '凤县', '61', '陕西省', '6103', '宝鸡市', '610330', '凤县', '', '', '', '', 3, 1, ''), ('610331', '6103', '00,61,6103', '太白县', '61', '陕西省', '6103', '宝鸡市', '610331', '太白县', '', '', '', '', 3, 1, ''), ('6104', '61', '00,61', '咸阳市', '61', '陕西省', '6104', '咸阳市', '', '', '', '', '', '', 2, 1, ''), ('610402', '6104', '00,61,6104', '秦都区', '61', '陕西省', '6104', '咸阳市', '610402', '秦都区', '', '', '', '', 3, 1, ''), ('610403', '6104', '00,61,6104', '杨陵区', '61', '陕西省', '6104', '咸阳市', '610403', '杨陵区', '', '', '', '', 3, 1, ''), ('610404', '6104', '00,61,6104', '渭城区', '61', '陕西省', '6104', '咸阳市', '610404', '渭城区', '', '', '', '', 3, 1, ''), ('610422', '6104', '00,61,6104', '三原县', '61', '陕西省', '6104', '咸阳市', '610422', '三原县', '', '', '', '', 3, 1, ''), ('610423', '6104', '00,61,6104', '泾阳县', '61', '陕西省', '6104', '咸阳市', '610423', '泾阳县', '', '', '', '', 3, 1, ''), ('610424', '6104', '00,61,6104', '乾县', '61', '陕西省', '6104', '咸阳市', '610424', '乾县', '', '', '', '', 3, 1, ''), ('610425', '6104', '00,61,6104', '礼泉县', '61', '陕西省', '6104', '咸阳市', '610425', '礼泉县', '', '', '', '', 3, 1, ''), ('610426', '6104', '00,61,6104', '永寿县', '61', '陕西省', '6104', '咸阳市', '610426', '永寿县', '', '', '', '', 3, 1, ''), ('610428', '6104', '00,61,6104', '长武县', '61', '陕西省', '6104', '咸阳市', '610428', '长武县', '', '', '', '', 3, 1, ''), ('610429', '6104', '00,61,6104', '旬邑县', '61', '陕西省', '6104', '咸阳市', '610429', '旬邑县', '', '', '', '', 3, 1, ''), ('610430', '6104', '00,61,6104', '淳化县', '61', '陕西省', '6104', '咸阳市', '610430', '淳化县', '', '', '', '', 3, 1, ''), ('610431', '6104', '00,61,6104', '武功县', '61', '陕西省', '6104', '咸阳市', '610431', '武功县', '', '', '', '', 3, 1, ''), ('610481', '6104', '00,61,6104', '兴平市', '61', '陕西省', '6104', '咸阳市', '610481', '兴平市', '', '', '', '', 3, 1, ''), ('610482', '6104', '00,61,6104', '彬州市', '61', '陕西省', '6104', '咸阳市', '610482', '彬州市', '', '', '', '', 3, 1, ''), ('6105', '61', '00,61', '渭南市', '61', '陕西省', '6105', '渭南市', '', '', '', '', '', '', 2, 1, ''), ('610502', '6105', '00,61,6105', '临渭区', '61', '陕西省', '6105', '渭南市', '610502', '临渭区', '', '', '', '', 3, 1, ''), ('610503', '6105', '00,61,6105', '华州区', '61', '陕西省', '6105', '渭南市', '610503', '华州区', '', '', '', '', 3, 1, ''), ('610522', '6105', '00,61,6105', '潼关县', '61', '陕西省', '6105', '渭南市', '610522', '潼关县', '', '', '', '', 3, 1, ''), ('610523', '6105', '00,61,6105', '大荔县', '61', '陕西省', '6105', '渭南市', '610523', '大荔县', '', '', '', '', 3, 1, ''), ('610524', '6105', '00,61,6105', '合阳县', '61', '陕西省', '6105', '渭南市', '610524', '合阳县', '', '', '', '', 3, 1, ''), ('610525', '6105', '00,61,6105', '澄城县', '61', '陕西省', '6105', '渭南市', '610525', '澄城县', '', '', '', '', 3, 1, ''), ('610526', '6105', '00,61,6105', '蒲城县', '61', '陕西省', '6105', '渭南市', '610526', '蒲城县', '', '', '', '', 3, 1, ''), ('610527', '6105', '00,61,6105', '白水县', '61', '陕西省', '6105', '渭南市', '610527', '白水县', '', '', '', '', 3, 1, ''), ('610528', '6105', '00,61,6105', '富平县', '61', '陕西省', '6105', '渭南市', '610528', '富平县', '', '', '', '', 3, 1, ''), ('610581', '6105', '00,61,6105', '韩城市', '61', '陕西省', '6105', '渭南市', '610581', '韩城市', '', '', '', '', 3, 1, ''); +INSERT INTO `blade_region` VALUES ('610582', '6105', '00,61,6105', '华阴市', '61', '陕西省', '6105', '渭南市', '610582', '华阴市', '', '', '', '', 3, 1, ''), ('6106', '61', '00,61', '延安市', '61', '陕西省', '6106', '延安市', '', '', '', '', '', '', 2, 1, ''), ('610602', '6106', '00,61,6106', '宝塔区', '61', '陕西省', '6106', '延安市', '610602', '宝塔区', '', '', '', '', 3, 1, ''), ('610603', '6106', '00,61,6106', '安塞区', '61', '陕西省', '6106', '延安市', '610603', '安塞区', '', '', '', '', 3, 1, ''), ('610621', '6106', '00,61,6106', '延长县', '61', '陕西省', '6106', '延安市', '610621', '延长县', '', '', '', '', 3, 1, ''), ('610622', '6106', '00,61,6106', '延川县', '61', '陕西省', '6106', '延安市', '610622', '延川县', '', '', '', '', 3, 1, ''), ('610625', '6106', '00,61,6106', '志丹县', '61', '陕西省', '6106', '延安市', '610625', '志丹县', '', '', '', '', 3, 1, ''), ('610626', '6106', '00,61,6106', '吴起县', '61', '陕西省', '6106', '延安市', '610626', '吴起县', '', '', '', '', 3, 1, ''), ('610627', '6106', '00,61,6106', '甘泉县', '61', '陕西省', '6106', '延安市', '610627', '甘泉县', '', '', '', '', 3, 1, ''), ('610628', '6106', '00,61,6106', '富县', '61', '陕西省', '6106', '延安市', '610628', '富县', '', '', '', '', 3, 1, ''), ('610629', '6106', '00,61,6106', '洛川县', '61', '陕西省', '6106', '延安市', '610629', '洛川县', '', '', '', '', 3, 1, ''), ('610630', '6106', '00,61,6106', '宜川县', '61', '陕西省', '6106', '延安市', '610630', '宜川县', '', '', '', '', 3, 1, ''), ('610631', '6106', '00,61,6106', '黄龙县', '61', '陕西省', '6106', '延安市', '610631', '黄龙县', '', '', '', '', 3, 1, ''), ('610632', '6106', '00,61,6106', '黄陵县', '61', '陕西省', '6106', '延安市', '610632', '黄陵县', '', '', '', '', 3, 1, ''), ('610681', '6106', '00,61,6106', '子长市', '61', '陕西省', '6106', '延安市', '610681', '子长市', '', '', '', '', 3, 1, ''), ('6107', '61', '00,61', '汉中市', '61', '陕西省', '6107', '汉中市', '', '', '', '', '', '', 2, 1, ''), ('610702', '6107', '00,61,6107', '汉台区', '61', '陕西省', '6107', '汉中市', '610702', '汉台区', '', '', '', '', 3, 1, ''), ('610703', '6107', '00,61,6107', '南郑区', '61', '陕西省', '6107', '汉中市', '610703', '南郑区', '', '', '', '', 3, 1, ''), ('610722', '6107', '00,61,6107', '城固县', '61', '陕西省', '6107', '汉中市', '610722', '城固县', '', '', '', '', 3, 1, ''), ('610723', '6107', '00,61,6107', '洋县', '61', '陕西省', '6107', '汉中市', '610723', '洋县', '', '', '', '', 3, 1, ''), ('610724', '6107', '00,61,6107', '西乡县', '61', '陕西省', '6107', '汉中市', '610724', '西乡县', '', '', '', '', 3, 1, ''), ('610725', '6107', '00,61,6107', '勉县', '61', '陕西省', '6107', '汉中市', '610725', '勉县', '', '', '', '', 3, 1, ''), ('610726', '6107', '00,61,6107', '宁强县', '61', '陕西省', '6107', '汉中市', '610726', '宁强县', '', '', '', '', 3, 1, ''), ('610727', '6107', '00,61,6107', '略阳县', '61', '陕西省', '6107', '汉中市', '610727', '略阳县', '', '', '', '', 3, 1, ''), ('610728', '6107', '00,61,6107', '镇巴县', '61', '陕西省', '6107', '汉中市', '610728', '镇巴县', '', '', '', '', 3, 1, ''), ('610729', '6107', '00,61,6107', '留坝县', '61', '陕西省', '6107', '汉中市', '610729', '留坝县', '', '', '', '', 3, 1, ''), ('610730', '6107', '00,61,6107', '佛坪县', '61', '陕西省', '6107', '汉中市', '610730', '佛坪县', '', '', '', '', 3, 1, ''), ('6108', '61', '00,61', '榆林市', '61', '陕西省', '6108', '榆林市', '', '', '', '', '', '', 2, 1, ''), ('610802', '6108', '00,61,6108', '榆阳区', '61', '陕西省', '6108', '榆林市', '610802', '榆阳区', '', '', '', '', 3, 1, ''), ('610803', '6108', '00,61,6108', '横山区', '61', '陕西省', '6108', '榆林市', '610803', '横山区', '', '', '', '', 3, 1, ''), ('610822', '6108', '00,61,6108', '府谷县', '61', '陕西省', '6108', '榆林市', '610822', '府谷县', '', '', '', '', 3, 1, ''), ('610824', '6108', '00,61,6108', '靖边县', '61', '陕西省', '6108', '榆林市', '610824', '靖边县', '', '', '', '', 3, 1, ''), ('610825', '6108', '00,61,6108', '定边县', '61', '陕西省', '6108', '榆林市', '610825', '定边县', '', '', '', '', 3, 1, ''), ('610826', '6108', '00,61,6108', '绥德县', '61', '陕西省', '6108', '榆林市', '610826', '绥德县', '', '', '', '', 3, 1, ''), ('610827', '6108', '00,61,6108', '米脂县', '61', '陕西省', '6108', '榆林市', '610827', '米脂县', '', '', '', '', 3, 1, ''), ('610828', '6108', '00,61,6108', '佳县', '61', '陕西省', '6108', '榆林市', '610828', '佳县', '', '', '', '', 3, 1, ''), ('610829', '6108', '00,61,6108', '吴堡县', '61', '陕西省', '6108', '榆林市', '610829', '吴堡县', '', '', '', '', 3, 1, ''), ('610830', '6108', '00,61,6108', '清涧县', '61', '陕西省', '6108', '榆林市', '610830', '清涧县', '', '', '', '', 3, 1, ''), ('610831', '6108', '00,61,6108', '子洲县', '61', '陕西省', '6108', '榆林市', '610831', '子洲县', '', '', '', '', 3, 1, ''), ('610881', '6108', '00,61,6108', '神木市', '61', '陕西省', '6108', '榆林市', '610881', '神木市', '', '', '', '', 3, 1, ''), ('6109', '61', '00,61', '安康市', '61', '陕西省', '6109', '安康市', '', '', '', '', '', '', 2, 1, ''), ('610902', '6109', '00,61,6109', '汉滨区', '61', '陕西省', '6109', '安康市', '610902', '汉滨区', '', '', '', '', 3, 1, ''), ('610921', '6109', '00,61,6109', '汉阴县', '61', '陕西省', '6109', '安康市', '610921', '汉阴县', '', '', '', '', 3, 1, ''), ('610922', '6109', '00,61,6109', '石泉县', '61', '陕西省', '6109', '安康市', '610922', '石泉县', '', '', '', '', 3, 1, ''), ('610923', '6109', '00,61,6109', '宁陕县', '61', '陕西省', '6109', '安康市', '610923', '宁陕县', '', '', '', '', 3, 1, ''), ('610924', '6109', '00,61,6109', '紫阳县', '61', '陕西省', '6109', '安康市', '610924', '紫阳县', '', '', '', '', 3, 1, ''), ('610925', '6109', '00,61,6109', '岚皋县', '61', '陕西省', '6109', '安康市', '610925', '岚皋县', '', '', '', '', 3, 1, ''), ('610926', '6109', '00,61,6109', '平利县', '61', '陕西省', '6109', '安康市', '610926', '平利县', '', '', '', '', 3, 1, ''), ('610927', '6109', '00,61,6109', '镇坪县', '61', '陕西省', '6109', '安康市', '610927', '镇坪县', '', '', '', '', 3, 1, ''), ('610928', '6109', '00,61,6109', '旬阳县', '61', '陕西省', '6109', '安康市', '610928', '旬阳县', '', '', '', '', 3, 1, ''), ('610929', '6109', '00,61,6109', '白河县', '61', '陕西省', '6109', '安康市', '610929', '白河县', '', '', '', '', 3, 1, ''), ('6110', '61', '00,61', '商洛市', '61', '陕西省', '6110', '商洛市', '', '', '', '', '', '', 2, 1, ''), ('611002', '6110', '00,61,6110', '商州区', '61', '陕西省', '6110', '商洛市', '611002', '商州区', '', '', '', '', 3, 1, ''), ('611021', '6110', '00,61,6110', '洛南县', '61', '陕西省', '6110', '商洛市', '611021', '洛南县', '', '', '', '', 3, 1, ''), ('611022', '6110', '00,61,6110', '丹凤县', '61', '陕西省', '6110', '商洛市', '611022', '丹凤县', '', '', '', '', 3, 1, ''), ('611023', '6110', '00,61,6110', '商南县', '61', '陕西省', '6110', '商洛市', '611023', '商南县', '', '', '', '', 3, 1, ''), ('611024', '6110', '00,61,6110', '山阳县', '61', '陕西省', '6110', '商洛市', '611024', '山阳县', '', '', '', '', 3, 1, ''), ('611025', '6110', '00,61,6110', '镇安县', '61', '陕西省', '6110', '商洛市', '611025', '镇安县', '', '', '', '', 3, 1, ''), ('611026', '6110', '00,61,6110', '柞水县', '61', '陕西省', '6110', '商洛市', '611026', '柞水县', '', '', '', '', 3, 1, ''), ('62', '00', '00', '甘肃省', '62', '甘肃省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6201', '62', '00,62', '兰州市', '62', '甘肃省', '6201', '兰州市', '', '', '', '', '', '', 2, 1, ''), ('620102', '6201', '00,62,6201', '城关区', '62', '甘肃省', '6201', '兰州市', '620102', '城关区', '', '', '', '', 3, 1, ''), ('620103', '6201', '00,62,6201', '七里河区', '62', '甘肃省', '6201', '兰州市', '620103', '七里河区', '', '', '', '', 3, 1, ''), ('620104', '6201', '00,62,6201', '西固区', '62', '甘肃省', '6201', '兰州市', '620104', '西固区', '', '', '', '', 3, 1, ''), ('620105', '6201', '00,62,6201', '安宁区', '62', '甘肃省', '6201', '兰州市', '620105', '安宁区', '', '', '', '', 3, 1, ''), ('620111', '6201', '00,62,6201', '红古区', '62', '甘肃省', '6201', '兰州市', '620111', '红古区', '', '', '', '', 3, 1, ''), ('620121', '6201', '00,62,6201', '永登县', '62', '甘肃省', '6201', '兰州市', '620121', '永登县', '', '', '', '', 3, 1, ''), ('620122', '6201', '00,62,6201', '皋兰县', '62', '甘肃省', '6201', '兰州市', '620122', '皋兰县', '', '', '', '', 3, 1, ''), ('620123', '6201', '00,62,6201', '榆中县', '62', '甘肃省', '6201', '兰州市', '620123', '榆中县', '', '', '', '', 3, 1, ''), ('6202', '62', '00,62', '嘉峪关市', '62', '甘肃省', '6202', '嘉峪关市', '', '', '', '', '', '', 2, 1, ''), ('620200', '6202', '00,62,6202', '嘉峪关市', '62', '甘肃省', '6202', '嘉峪关市', '620200', '嘉峪关市', '', '', '', '', 3, 1, ''), ('6203', '62', '00,62', '金昌市', '62', '甘肃省', '6203', '金昌市', '', '', '', '', '', '', 2, 1, ''), ('620302', '6203', '00,62,6203', '金川区', '62', '甘肃省', '6203', '金昌市', '620302', '金川区', '', '', '', '', 3, 1, ''), ('620321', '6203', '00,62,6203', '永昌县', '62', '甘肃省', '6203', '金昌市', '620321', '永昌县', '', '', '', '', 3, 1, ''), ('6204', '62', '00,62', '白银市', '62', '甘肃省', '6204', '白银市', '', '', '', '', '', '', 2, 1, ''), ('620402', '6204', '00,62,6204', '白银区', '62', '甘肃省', '6204', '白银市', '620402', '白银区', '', '', '', '', 3, 1, ''), ('620403', '6204', '00,62,6204', '平川区', '62', '甘肃省', '6204', '白银市', '620403', '平川区', '', '', '', '', 3, 1, ''), ('620421', '6204', '00,62,6204', '靖远县', '62', '甘肃省', '6204', '白银市', '620421', '靖远县', '', '', '', '', 3, 1, ''), ('620422', '6204', '00,62,6204', '会宁县', '62', '甘肃省', '6204', '白银市', '620422', '会宁县', '', '', '', '', 3, 1, ''), ('620423', '6204', '00,62,6204', '景泰县', '62', '甘肃省', '6204', '白银市', '620423', '景泰县', '', '', '', '', 3, 1, ''), ('6205', '62', '00,62', '天水市', '62', '甘肃省', '6205', '天水市', '', '', '', '', '', '', 2, 1, ''), ('620502', '6205', '00,62,6205', '秦州区', '62', '甘肃省', '6205', '天水市', '620502', '秦州区', '', '', '', '', 3, 1, ''), ('620503', '6205', '00,62,6205', '麦积区', '62', '甘肃省', '6205', '天水市', '620503', '麦积区', '', '', '', '', 3, 1, ''), ('620521', '6205', '00,62,6205', '清水县', '62', '甘肃省', '6205', '天水市', '620521', '清水县', '', '', '', '', 3, 1, ''), ('620522', '6205', '00,62,6205', '秦安县', '62', '甘肃省', '6205', '天水市', '620522', '秦安县', '', '', '', '', 3, 1, ''), ('620523', '6205', '00,62,6205', '甘谷县', '62', '甘肃省', '6205', '天水市', '620523', '甘谷县', '', '', '', '', 3, 1, ''), ('620524', '6205', '00,62,6205', '武山县', '62', '甘肃省', '6205', '天水市', '620524', '武山县', '', '', '', '', 3, 1, ''), ('620525', '6205', '00,62,6205', '张家川回族自治县', '62', '甘肃省', '6205', '天水市', '620525', '张家川回族自治县', '', '', '', '', 3, 1, ''), ('6206', '62', '00,62', '武威市', '62', '甘肃省', '6206', '武威市', '', '', '', '', '', '', 2, 1, ''), ('620602', '6206', '00,62,6206', '凉州区', '62', '甘肃省', '6206', '武威市', '620602', '凉州区', '', '', '', '', 3, 1, ''), ('620621', '6206', '00,62,6206', '民勤县', '62', '甘肃省', '6206', '武威市', '620621', '民勤县', '', '', '', '', 3, 1, ''), ('620622', '6206', '00,62,6206', '古浪县', '62', '甘肃省', '6206', '武威市', '620622', '古浪县', '', '', '', '', 3, 1, ''), ('620623', '6206', '00,62,6206', '天祝藏族自治县', '62', '甘肃省', '6206', '武威市', '620623', '天祝藏族自治县', '', '', '', '', 3, 1, ''), ('6207', '62', '00,62', '张掖市', '62', '甘肃省', '6207', '张掖市', '', '', '', '', '', '', 2, 1, ''), ('620702', '6207', '00,62,6207', '甘州区', '62', '甘肃省', '6207', '张掖市', '620702', '甘州区', '', '', '', '', 3, 1, ''), ('620721', '6207', '00,62,6207', '肃南裕固族自治县', '62', '甘肃省', '6207', '张掖市', '620721', '肃南裕固族自治县', '', '', '', '', 3, 1, ''), ('620722', '6207', '00,62,6207', '民乐县', '62', '甘肃省', '6207', '张掖市', '620722', '民乐县', '', '', '', '', 3, 1, ''), ('620723', '6207', '00,62,6207', '临泽县', '62', '甘肃省', '6207', '张掖市', '620723', '临泽县', '', '', '', '', 3, 1, ''), ('620724', '6207', '00,62,6207', '高台县', '62', '甘肃省', '6207', '张掖市', '620724', '高台县', '', '', '', '', 3, 1, ''), ('620725', '6207', '00,62,6207', '山丹县', '62', '甘肃省', '6207', '张掖市', '620725', '山丹县', '', '', '', '', 3, 1, ''), ('6208', '62', '00,62', '平凉市', '62', '甘肃省', '6208', '平凉市', '', '', '', '', '', '', 2, 1, ''), ('620802', '6208', '00,62,6208', '崆峒区', '62', '甘肃省', '6208', '平凉市', '620802', '崆峒区', '', '', '', '', 3, 1, ''), ('620821', '6208', '00,62,6208', '泾川县', '62', '甘肃省', '6208', '平凉市', '620821', '泾川县', '', '', '', '', 3, 1, ''), ('620822', '6208', '00,62,6208', '灵台县', '62', '甘肃省', '6208', '平凉市', '620822', '灵台县', '', '', '', '', 3, 1, ''), ('620823', '6208', '00,62,6208', '崇信县', '62', '甘肃省', '6208', '平凉市', '620823', '崇信县', '', '', '', '', 3, 1, ''), ('620825', '6208', '00,62,6208', '庄浪县', '62', '甘肃省', '6208', '平凉市', '620825', '庄浪县', '', '', '', '', 3, 1, ''), ('620826', '6208', '00,62,6208', '静宁县', '62', '甘肃省', '6208', '平凉市', '620826', '静宁县', '', '', '', '', 3, 1, ''), ('620881', '6208', '00,62,6208', '华亭市', '62', '甘肃省', '6208', '平凉市', '620881', '华亭市', '', '', '', '', 3, 1, ''), ('6209', '62', '00,62', '酒泉市', '62', '甘肃省', '6209', '酒泉市', '', '', '', '', '', '', 2, 1, ''), ('620902', '6209', '00,62,6209', '肃州区', '62', '甘肃省', '6209', '酒泉市', '620902', '肃州区', '', '', '', '', 3, 1, ''), ('620921', '6209', '00,62,6209', '金塔县', '62', '甘肃省', '6209', '酒泉市', '620921', '金塔县', '', '', '', '', 3, 1, ''), ('620922', '6209', '00,62,6209', '瓜州县', '62', '甘肃省', '6209', '酒泉市', '620922', '瓜州县', '', '', '', '', 3, 1, ''), ('620923', '6209', '00,62,6209', '肃北蒙古族自治县', '62', '甘肃省', '6209', '酒泉市', '620923', '肃北蒙古族自治县', '', '', '', '', 3, 1, ''), ('620924', '6209', '00,62,6209', '阿克塞哈萨克族自治县', '62', '甘肃省', '6209', '酒泉市', '620924', '阿克塞哈萨克族自治县', '', '', '', '', 3, 1, ''), ('620981', '6209', '00,62,6209', '玉门市', '62', '甘肃省', '6209', '酒泉市', '620981', '玉门市', '', '', '', '', 3, 1, ''), ('620982', '6209', '00,62,6209', '敦煌市', '62', '甘肃省', '6209', '酒泉市', '620982', '敦煌市', '', '', '', '', 3, 1, ''), ('6210', '62', '00,62', '庆阳市', '62', '甘肃省', '6210', '庆阳市', '', '', '', '', '', '', 2, 1, ''), ('621002', '6210', '00,62,6210', '西峰区', '62', '甘肃省', '6210', '庆阳市', '621002', '西峰区', '', '', '', '', 3, 1, ''), ('621021', '6210', '00,62,6210', '庆城县', '62', '甘肃省', '6210', '庆阳市', '621021', '庆城县', '', '', '', '', 3, 1, ''), ('621022', '6210', '00,62,6210', '环县', '62', '甘肃省', '6210', '庆阳市', '621022', '环县', '', '', '', '', 3, 1, ''), ('621023', '6210', '00,62,6210', '华池县', '62', '甘肃省', '6210', '庆阳市', '621023', '华池县', '', '', '', '', 3, 1, ''), ('621024', '6210', '00,62,6210', '合水县', '62', '甘肃省', '6210', '庆阳市', '621024', '合水县', '', '', '', '', 3, 1, ''), ('621025', '6210', '00,62,6210', '正宁县', '62', '甘肃省', '6210', '庆阳市', '621025', '正宁县', '', '', '', '', 3, 1, ''), ('621026', '6210', '00,62,6210', '宁县', '62', '甘肃省', '6210', '庆阳市', '621026', '宁县', '', '', '', '', 3, 1, ''), ('621027', '6210', '00,62,6210', '镇原县', '62', '甘肃省', '6210', '庆阳市', '621027', '镇原县', '', '', '', '', 3, 1, ''), ('6211', '62', '00,62', '定西市', '62', '甘肃省', '6211', '定西市', '', '', '', '', '', '', 2, 1, ''), ('621102', '6211', '00,62,6211', '安定区', '62', '甘肃省', '6211', '定西市', '621102', '安定区', '', '', '', '', 3, 1, ''), ('621121', '6211', '00,62,6211', '通渭县', '62', '甘肃省', '6211', '定西市', '621121', '通渭县', '', '', '', '', 3, 1, ''), ('621122', '6211', '00,62,6211', '陇西县', '62', '甘肃省', '6211', '定西市', '621122', '陇西县', '', '', '', '', 3, 1, ''), ('621123', '6211', '00,62,6211', '渭源县', '62', '甘肃省', '6211', '定西市', '621123', '渭源县', '', '', '', '', 3, 1, ''), ('621124', '6211', '00,62,6211', '临洮县', '62', '甘肃省', '6211', '定西市', '621124', '临洮县', '', '', '', '', 3, 1, ''), ('621125', '6211', '00,62,6211', '漳县', '62', '甘肃省', '6211', '定西市', '621125', '漳县', '', '', '', '', 3, 1, ''), ('621126', '6211', '00,62,6211', '岷县', '62', '甘肃省', '6211', '定西市', '621126', '岷县', '', '', '', '', 3, 1, ''), ('6212', '62', '00,62', '陇南市', '62', '甘肃省', '6212', '陇南市', '', '', '', '', '', '', 2, 1, ''), ('621202', '6212', '00,62,6212', '武都区', '62', '甘肃省', '6212', '陇南市', '621202', '武都区', '', '', '', '', 3, 1, ''), ('621221', '6212', '00,62,6212', '成县', '62', '甘肃省', '6212', '陇南市', '621221', '成县', '', '', '', '', 3, 1, ''), ('621222', '6212', '00,62,6212', '文县', '62', '甘肃省', '6212', '陇南市', '621222', '文县', '', '', '', '', 3, 1, ''), ('621223', '6212', '00,62,6212', '宕昌县', '62', '甘肃省', '6212', '陇南市', '621223', '宕昌县', '', '', '', '', 3, 1, ''), ('621224', '6212', '00,62,6212', '康县', '62', '甘肃省', '6212', '陇南市', '621224', '康县', '', '', '', '', 3, 1, ''), ('621225', '6212', '00,62,6212', '西和县', '62', '甘肃省', '6212', '陇南市', '621225', '西和县', '', '', '', '', 3, 1, ''), ('621226', '6212', '00,62,6212', '礼县', '62', '甘肃省', '6212', '陇南市', '621226', '礼县', '', '', '', '', 3, 1, ''), ('621227', '6212', '00,62,6212', '徽县', '62', '甘肃省', '6212', '陇南市', '621227', '徽县', '', '', '', '', 3, 1, ''), ('621228', '6212', '00,62,6212', '两当县', '62', '甘肃省', '6212', '陇南市', '621228', '两当县', '', '', '', '', 3, 1, ''), ('6229', '62', '00,62', '临夏回族自治州', '62', '甘肃省', '6229', '临夏回族自治州', '', '', '', '', '', '', 2, 1, ''), ('622901', '6229', '00,62,6229', '临夏市', '62', '甘肃省', '6229', '临夏回族自治州', '622901', '临夏市', '', '', '', '', 3, 1, ''), ('622921', '6229', '00,62,6229', '临夏县', '62', '甘肃省', '6229', '临夏回族自治州', '622921', '临夏县', '', '', '', '', 3, 1, ''), ('622922', '6229', '00,62,6229', '康乐县', '62', '甘肃省', '6229', '临夏回族自治州', '622922', '康乐县', '', '', '', '', 3, 1, ''), ('622923', '6229', '00,62,6229', '永靖县', '62', '甘肃省', '6229', '临夏回族自治州', '622923', '永靖县', '', '', '', '', 3, 1, ''), ('622924', '6229', '00,62,6229', '广河县', '62', '甘肃省', '6229', '临夏回族自治州', '622924', '广河县', '', '', '', '', 3, 1, ''), ('622925', '6229', '00,62,6229', '和政县', '62', '甘肃省', '6229', '临夏回族自治州', '622925', '和政县', '', '', '', '', 3, 1, ''), ('622926', '6229', '00,62,6229', '东乡族自治县', '62', '甘肃省', '6229', '临夏回族自治州', '622926', '东乡族自治县', '', '', '', '', 3, 1, ''), ('622927', '6229', '00,62,6229', '积石山保安族东乡族撒拉族自治县', '62', '甘肃省', '6229', '临夏回族自治州', '622927', '积石山保安族东乡族撒拉族自治县', '', '', '', '', 3, 1, ''), ('6230', '62', '00,62', '甘南藏族自治州', '62', '甘肃省', '6230', '甘南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('623001', '6230', '00,62,6230', '合作市', '62', '甘肃省', '6230', '甘南藏族自治州', '623001', '合作市', '', '', '', '', 3, 1, ''), ('623021', '6230', '00,62,6230', '临潭县', '62', '甘肃省', '6230', '甘南藏族自治州', '623021', '临潭县', '', '', '', '', 3, 1, ''), ('623022', '6230', '00,62,6230', '卓尼县', '62', '甘肃省', '6230', '甘南藏族自治州', '623022', '卓尼县', '', '', '', '', 3, 1, ''), ('623023', '6230', '00,62,6230', '舟曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623023', '舟曲县', '', '', '', '', 3, 1, ''), ('623024', '6230', '00,62,6230', '迭部县', '62', '甘肃省', '6230', '甘南藏族自治州', '623024', '迭部县', '', '', '', '', 3, 1, ''), ('623025', '6230', '00,62,6230', '玛曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623025', '玛曲县', '', '', '', '', 3, 1, ''), ('623026', '6230', '00,62,6230', '碌曲县', '62', '甘肃省', '6230', '甘南藏族自治州', '623026', '碌曲县', '', '', '', '', 3, 1, ''), ('623027', '6230', '00,62,6230', '夏河县', '62', '甘肃省', '6230', '甘南藏族自治州', '623027', '夏河县', '', '', '', '', 3, 1, ''), ('63', '00', '00', '青海省', '63', '青海省', '', '', '', '', '', '', '', '', 1, 1, ''), ('6301', '63', '00,63', '西宁市', '63', '青海省', '6301', '西宁市', '', '', '', '', '', '', 2, 1, ''), ('630102', '6301', '00,63,6301', '城东区', '63', '青海省', '6301', '西宁市', '630102', '城东区', '', '', '', '', 3, 1, ''), ('630103', '6301', '00,63,6301', '城中区', '63', '青海省', '6301', '西宁市', '630103', '城中区', '', '', '', '', 3, 1, ''), ('630104', '6301', '00,63,6301', '城西区', '63', '青海省', '6301', '西宁市', '630104', '城西区', '', '', '', '', 3, 1, ''), ('630105', '6301', '00,63,6301', '城北区', '63', '青海省', '6301', '西宁市', '630105', '城北区', '', '', '', '', 3, 1, ''), ('630106', '6301', '00,63,6301', '湟中区', '63', '青海省', '6301', '西宁市', '630106', '湟中区', '', '', '', '', 3, 1, ''), ('630121', '6301', '00,63,6301', '大通回族土族自治县', '63', '青海省', '6301', '西宁市', '630121', '大通回族土族自治县', '', '', '', '', 3, 1, ''), ('630123', '6301', '00,63,6301', '湟源县', '63', '青海省', '6301', '西宁市', '630123', '湟源县', '', '', '', '', 3, 1, ''), ('6302', '63', '00,63', '海东市', '63', '青海省', '6302', '海东市', '', '', '', '', '', '', 2, 1, ''), ('630202', '6302', '00,63,6302', '乐都区', '63', '青海省', '6302', '海东市', '630202', '乐都区', '', '', '', '', 3, 1, ''), ('630203', '6302', '00,63,6302', '平安区', '63', '青海省', '6302', '海东市', '630203', '平安区', '', '', '', '', 3, 1, ''), ('630222', '6302', '00,63,6302', '民和回族土族自治县', '63', '青海省', '6302', '海东市', '630222', '民和回族土族自治县', '', '', '', '', 3, 1, ''), ('630223', '6302', '00,63,6302', '互助土族自治县', '63', '青海省', '6302', '海东市', '630223', '互助土族自治县', '', '', '', '', 3, 1, ''), ('630224', '6302', '00,63,6302', '化隆回族自治县', '63', '青海省', '6302', '海东市', '630224', '化隆回族自治县', '', '', '', '', 3, 1, ''), ('630225', '6302', '00,63,6302', '循化撒拉族自治县', '63', '青海省', '6302', '海东市', '630225', '循化撒拉族自治县', '', '', '', '', 3, 1, ''), ('6322', '63', '00,63', '海北藏族自治州', '63', '青海省', '6322', '海北藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632221', '6322', '00,63,6322', '门源回族自治县', '63', '青海省', '6322', '海北藏族自治州', '632221', '门源回族自治县', '', '', '', '', 3, 1, ''), ('632222', '6322', '00,63,6322', '祁连县', '63', '青海省', '6322', '海北藏族自治州', '632222', '祁连县', '', '', '', '', 3, 1, ''), ('632223', '6322', '00,63,6322', '海晏县', '63', '青海省', '6322', '海北藏族自治州', '632223', '海晏县', '', '', '', '', 3, 1, ''), ('632224', '6322', '00,63,6322', '刚察县', '63', '青海省', '6322', '海北藏族自治州', '632224', '刚察县', '', '', '', '', 3, 1, ''), ('6323', '63', '00,63', '黄南藏族自治州', '63', '青海省', '6323', '黄南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632321', '6323', '00,63,6323', '同仁县', '63', '青海省', '6323', '黄南藏族自治州', '632321', '同仁县', '', '', '', '', 3, 1, ''), ('632322', '6323', '00,63,6323', '尖扎县', '63', '青海省', '6323', '黄南藏族自治州', '632322', '尖扎县', '', '', '', '', 3, 1, ''), ('632323', '6323', '00,63,6323', '泽库县', '63', '青海省', '6323', '黄南藏族自治州', '632323', '泽库县', '', '', '', '', 3, 1, ''), ('632324', '6323', '00,63,6323', '河南蒙古族自治县', '63', '青海省', '6323', '黄南藏族自治州', '632324', '河南蒙古族自治县', '', '', '', '', 3, 1, ''), ('6325', '63', '00,63', '海南藏族自治州', '63', '青海省', '6325', '海南藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632521', '6325', '00,63,6325', '共和县', '63', '青海省', '6325', '海南藏族自治州', '632521', '共和县', '', '', '', '', 3, 1, ''), ('632522', '6325', '00,63,6325', '同德县', '63', '青海省', '6325', '海南藏族自治州', '632522', '同德县', '', '', '', '', 3, 1, ''), ('632523', '6325', '00,63,6325', '贵德县', '63', '青海省', '6325', '海南藏族自治州', '632523', '贵德县', '', '', '', '', 3, 1, ''), ('632524', '6325', '00,63,6325', '兴海县', '63', '青海省', '6325', '海南藏族自治州', '632524', '兴海县', '', '', '', '', 3, 1, ''), ('632525', '6325', '00,63,6325', '贵南县', '63', '青海省', '6325', '海南藏族自治州', '632525', '贵南县', '', '', '', '', 3, 1, ''), ('6326', '63', '00,63', '果洛藏族自治州', '63', '青海省', '6326', '果洛藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632621', '6326', '00,63,6326', '玛沁县', '63', '青海省', '6326', '果洛藏族自治州', '632621', '玛沁县', '', '', '', '', 3, 1, ''), ('632622', '6326', '00,63,6326', '班玛县', '63', '青海省', '6326', '果洛藏族自治州', '632622', '班玛县', '', '', '', '', 3, 1, ''), ('632623', '6326', '00,63,6326', '甘德县', '63', '青海省', '6326', '果洛藏族自治州', '632623', '甘德县', '', '', '', '', 3, 1, ''), ('632624', '6326', '00,63,6326', '达日县', '63', '青海省', '6326', '果洛藏族自治州', '632624', '达日县', '', '', '', '', 3, 1, ''), ('632625', '6326', '00,63,6326', '久治县', '63', '青海省', '6326', '果洛藏族自治州', '632625', '久治县', '', '', '', '', 3, 1, ''), ('632626', '6326', '00,63,6326', '玛多县', '63', '青海省', '6326', '果洛藏族自治州', '632626', '玛多县', '', '', '', '', 3, 1, ''), ('6327', '63', '00,63', '玉树藏族自治州', '63', '青海省', '6327', '玉树藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632701', '6327', '00,63,6327', '玉树市', '63', '青海省', '6327', '玉树藏族自治州', '632701', '玉树市', '', '', '', '', 3, 1, ''), ('632722', '6327', '00,63,6327', '杂多县', '63', '青海省', '6327', '玉树藏族自治州', '632722', '杂多县', '', '', '', '', 3, 1, ''), ('632723', '6327', '00,63,6327', '称多县', '63', '青海省', '6327', '玉树藏族自治州', '632723', '称多县', '', '', '', '', 3, 1, ''), ('632724', '6327', '00,63,6327', '治多县', '63', '青海省', '6327', '玉树藏族自治州', '632724', '治多县', '', '', '', '', 3, 1, ''), ('632725', '6327', '00,63,6327', '囊谦县', '63', '青海省', '6327', '玉树藏族自治州', '632725', '囊谦县', '', '', '', '', 3, 1, ''), ('632726', '6327', '00,63,6327', '曲麻莱县', '63', '青海省', '6327', '玉树藏族自治州', '632726', '曲麻莱县', '', '', '', '', 3, 1, ''), ('6328', '63', '00,63', '海西蒙古族藏族自治州', '63', '青海省', '6328', '海西蒙古族藏族自治州', '', '', '', '', '', '', 2, 1, ''), ('632801', '6328', '00,63,6328', '格尔木市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632801', '格尔木市', '', '', '', '', 3, 1, ''), ('632802', '6328', '00,63,6328', '德令哈市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632802', '德令哈市', '', '', '', '', 3, 1, ''), ('632803', '6328', '00,63,6328', '茫崖市', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632803', '茫崖市', '', '', '', '', 3, 1, ''), ('632821', '6328', '00,63,6328', '乌兰县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632821', '乌兰县', '', '', '', '', 3, 1, ''), ('632822', '6328', '00,63,6328', '都兰县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632822', '都兰县', '', '', '', '', 3, 1, ''), ('632823', '6328', '00,63,6328', '天峻县', '63', '青海省', '6328', '海西蒙古族藏族自治州', '632823', '天峻县', '', '', '', '', 3, 1, ''), ('64', '00', '00', '宁夏回族自治区', '64', '宁夏回族自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('6401', '64', '00,64', '银川市', '64', '宁夏回族自治区', '6401', '银川市', '', '', '', '', '', '', 2, 1, ''), ('640104', '6401', '00,64,6401', '兴庆区', '64', '宁夏回族自治区', '6401', '银川市', '640104', '兴庆区', '', '', '', '', 3, 1, ''), ('640105', '6401', '00,64,6401', '西夏区', '64', '宁夏回族自治区', '6401', '银川市', '640105', '西夏区', '', '', '', '', 3, 1, ''), ('640106', '6401', '00,64,6401', '金凤区', '64', '宁夏回族自治区', '6401', '银川市', '640106', '金凤区', '', '', '', '', 3, 1, ''), ('640121', '6401', '00,64,6401', '永宁县', '64', '宁夏回族自治区', '6401', '银川市', '640121', '永宁县', '', '', '', '', 3, 1, ''), ('640122', '6401', '00,64,6401', '贺兰县', '64', '宁夏回族自治区', '6401', '银川市', '640122', '贺兰县', '', '', '', '', 3, 1, ''), ('640181', '6401', '00,64,6401', '灵武市', '64', '宁夏回族自治区', '6401', '银川市', '640181', '灵武市', '', '', '', '', 3, 1, ''), ('6402', '64', '00,64', '石嘴山市', '64', '宁夏回族自治区', '6402', '石嘴山市', '', '', '', '', '', '', 2, 1, ''), ('640202', '6402', '00,64,6402', '大武口区', '64', '宁夏回族自治区', '6402', '石嘴山市', '640202', '大武口区', '', '', '', '', 3, 1, ''), ('640205', '6402', '00,64,6402', '惠农区', '64', '宁夏回族自治区', '6402', '石嘴山市', '640205', '惠农区', '', '', '', '', 3, 1, ''), ('640221', '6402', '00,64,6402', '平罗县', '64', '宁夏回族自治区', '6402', '石嘴山市', '640221', '平罗县', '', '', '', '', 3, 1, ''), ('6403', '64', '00,64', '吴忠市', '64', '宁夏回族自治区', '6403', '吴忠市', '', '', '', '', '', '', 2, 1, ''), ('640302', '6403', '00,64,6403', '利通区', '64', '宁夏回族自治区', '6403', '吴忠市', '640302', '利通区', '', '', '', '', 3, 1, ''), ('640303', '6403', '00,64,6403', '红寺堡区', '64', '宁夏回族自治区', '6403', '吴忠市', '640303', '红寺堡区', '', '', '', '', 3, 1, ''), ('640323', '6403', '00,64,6403', '盐池县', '64', '宁夏回族自治区', '6403', '吴忠市', '640323', '盐池县', '', '', '', '', 3, 1, ''), ('640324', '6403', '00,64,6403', '同心县', '64', '宁夏回族自治区', '6403', '吴忠市', '640324', '同心县', '', '', '', '', 3, 1, ''), ('640381', '6403', '00,64,6403', '青铜峡市', '64', '宁夏回族自治区', '6403', '吴忠市', '640381', '青铜峡市', '', '', '', '', 3, 1, ''), ('6404', '64', '00,64', '固原市', '64', '宁夏回族自治区', '6404', '固原市', '', '', '', '', '', '', 2, 1, ''), ('640402', '6404', '00,64,6404', '原州区', '64', '宁夏回族自治区', '6404', '固原市', '640402', '原州区', '', '', '', '', 3, 1, ''), ('640422', '6404', '00,64,6404', '西吉县', '64', '宁夏回族自治区', '6404', '固原市', '640422', '西吉县', '', '', '', '', 3, 1, ''), ('640423', '6404', '00,64,6404', '隆德县', '64', '宁夏回族自治区', '6404', '固原市', '640423', '隆德县', '', '', '', '', 3, 1, ''), ('640424', '6404', '00,64,6404', '泾源县', '64', '宁夏回族自治区', '6404', '固原市', '640424', '泾源县', '', '', '', '', 3, 1, ''), ('640425', '6404', '00,64,6404', '彭阳县', '64', '宁夏回族自治区', '6404', '固原市', '640425', '彭阳县', '', '', '', '', 3, 1, ''), ('6405', '64', '00,64', '中卫市', '64', '宁夏回族自治区', '6405', '中卫市', '', '', '', '', '', '', 2, 1, ''), ('640502', '6405', '00,64,6405', '沙坡头区', '64', '宁夏回族自治区', '6405', '中卫市', '640502', '沙坡头区', '', '', '', '', 3, 1, ''), ('640521', '6405', '00,64,6405', '中宁县', '64', '宁夏回族自治区', '6405', '中卫市', '640521', '中宁县', '', '', '', '', 3, 1, ''), ('640522', '6405', '00,64,6405', '海原县', '64', '宁夏回族自治区', '6405', '中卫市', '640522', '海原县', '', '', '', '', 3, 1, ''), ('65', '00', '00', '新疆维吾尔自治区', '65', '新疆维吾尔自治区', '', '', '', '', '', '', '', '', 1, 1, ''), ('6501', '65', '00,65', '乌鲁木齐市', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '', '', '', '', '', '', 2, 1, ''), ('650102', '6501', '00,65,6501', '天山区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650102', '天山区', '', '', '', '', 3, 1, ''), ('650103', '6501', '00,65,6501', '沙依巴克区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650103', '沙依巴克区', '', '', '', '', 3, 1, ''), ('650104', '6501', '00,65,6501', '新市区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650104', '新市区', '', '', '', '', 3, 1, ''), ('650105', '6501', '00,65,6501', '水磨沟区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650105', '水磨沟区', '', '', '', '', 3, 1, ''), ('650106', '6501', '00,65,6501', '头屯河区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650106', '头屯河区', '', '', '', '', 3, 1, ''), ('650107', '6501', '00,65,6501', '达坂城区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650107', '达坂城区', '', '', '', '', 3, 1, ''), ('650109', '6501', '00,65,6501', '米东区', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650109', '米东区', '', '', '', '', 3, 1, ''), ('650121', '6501', '00,65,6501', '乌鲁木齐县', '65', '新疆维吾尔自治区', '6501', '乌鲁木齐市', '650121', '乌鲁木齐县', '', '', '', '', 3, 1, ''), ('6502', '65', '00,65', '克拉玛依市', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '', '', '', '', '', '', 2, 1, ''), ('650202', '6502', '00,65,6502', '独山子区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650202', '独山子区', '', '', '', '', 3, 1, ''), ('650203', '6502', '00,65,6502', '克拉玛依区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650203', '克拉玛依区', '', '', '', '', 3, 1, ''), ('650204', '6502', '00,65,6502', '白碱滩区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650204', '白碱滩区', '', '', '', '', 3, 1, ''), ('650205', '6502', '00,65,6502', '乌尔禾区', '65', '新疆维吾尔自治区', '6502', '克拉玛依市', '650205', '乌尔禾区', '', '', '', '', 3, 1, ''), ('6504', '65', '00,65', '吐鲁番市', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '', '', '', '', '', '', 2, 1, ''), ('650402', '6504', '00,65,6504', '高昌区', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650402', '高昌区', '', '', '', '', 3, 1, ''), ('650421', '6504', '00,65,6504', '鄯善县', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650421', '鄯善县', '', '', '', '', 3, 1, ''), ('650422', '6504', '00,65,6504', '托克逊县', '65', '新疆维吾尔自治区', '6504', '吐鲁番市', '650422', '托克逊县', '', '', '', '', 3, 1, ''), ('6505', '65', '00,65', '哈密市', '65', '新疆维吾尔自治区', '6505', '哈密市', '', '', '', '', '', '', 2, 1, ''), ('650502', '6505', '00,65,6505', '伊州区', '65', '新疆维吾尔自治区', '6505', '哈密市', '650502', '伊州区', '', '', '', '', 3, 1, ''), ('650521', '6505', '00,65,6505', '巴里坤哈萨克自治县', '65', '新疆维吾尔自治区', '6505', '哈密市', '650521', '巴里坤哈萨克自治县', '', '', '', '', 3, 1, ''), ('650522', '6505', '00,65,6505', '伊吾县', '65', '新疆维吾尔自治区', '6505', '哈密市', '650522', '伊吾县', '', '', '', '', 3, 1, ''), ('6523', '65', '00,65', '昌吉回族自治州', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '', '', '', '', '', '', 2, 1, ''), ('652301', '6523', '00,65,6523', '昌吉市', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652301', '昌吉市', '', '', '', '', 3, 1, ''), ('652302', '6523', '00,65,6523', '阜康市', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652302', '阜康市', '', '', '', '', 3, 1, ''), ('652323', '6523', '00,65,6523', '呼图壁县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652323', '呼图壁县', '', '', '', '', 3, 1, ''), ('652324', '6523', '00,65,6523', '玛纳斯县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652324', '玛纳斯县', '', '', '', '', 3, 1, ''), ('652325', '6523', '00,65,6523', '奇台县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652325', '奇台县', '', '', '', '', 3, 1, ''), ('652327', '6523', '00,65,6523', '吉木萨尔县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652327', '吉木萨尔县', '', '', '', '', 3, 1, ''), ('652328', '6523', '00,65,6523', '木垒哈萨克自治县', '65', '新疆维吾尔自治区', '6523', '昌吉回族自治州', '652328', '木垒哈萨克自治县', '', '', '', '', 3, 1, ''), ('6527', '65', '00,65', '博尔塔拉蒙古自治州', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '', '', '', '', '', '', 2, 1, ''), ('652701', '6527', '00,65,6527', '博乐市', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652701', '博乐市', '', '', '', '', 3, 1, ''), ('652702', '6527', '00,65,6527', '阿拉山口市', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652702', '阿拉山口市', '', '', '', '', 3, 1, ''), ('652722', '6527', '00,65,6527', '精河县', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652722', '精河县', '', '', '', '', 3, 1, ''), ('652723', '6527', '00,65,6527', '温泉县', '65', '新疆维吾尔自治区', '6527', '博尔塔拉蒙古自治州', '652723', '温泉县', '', '', '', '', 3, 1, ''), ('6528', '65', '00,65', '巴音郭楞蒙古自治州', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '', '', '', '', '', '', 2, 1, ''), ('652801', '6528', '00,65,6528', '库尔勒市', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652801', '库尔勒市', '', '', '', '', 3, 1, ''), ('652822', '6528', '00,65,6528', '轮台县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652822', '轮台县', '', '', '', '', 3, 1, ''), ('652823', '6528', '00,65,6528', '尉犁县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652823', '尉犁县', '', '', '', '', 3, 1, ''), ('652824', '6528', '00,65,6528', '若羌县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652824', '若羌县', '', '', '', '', 3, 1, ''), ('652825', '6528', '00,65,6528', '且末县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652825', '且末县', '', '', '', '', 3, 1, ''), ('652826', '6528', '00,65,6528', '焉耆回族自治县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652826', '焉耆回族自治县', '', '', '', '', 3, 1, ''), ('652827', '6528', '00,65,6528', '和静县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652827', '和静县', '', '', '', '', 3, 1, ''), ('652828', '6528', '00,65,6528', '和硕县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652828', '和硕县', '', '', '', '', 3, 1, ''), ('652829', '6528', '00,65,6528', '博湖县', '65', '新疆维吾尔自治区', '6528', '巴音郭楞蒙古自治州', '652829', '博湖县', '', '', '', '', 3, 1, ''), ('6529', '65', '00,65', '阿克苏地区', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '', '', '', '', '', '', 2, 1, ''), ('652901', '6529', '00,65,6529', '阿克苏市', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652901', '阿克苏市', '', '', '', '', 3, 1, ''), ('652902', '6529', '00,65,6529', '库车市', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652902', '库车市', '', '', '', '', 3, 1, ''), ('652922', '6529', '00,65,6529', '温宿县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652922', '温宿县', '', '', '', '', 3, 1, ''), ('652924', '6529', '00,65,6529', '沙雅县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652924', '沙雅县', '', '', '', '', 3, 1, ''), ('652925', '6529', '00,65,6529', '新和县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652925', '新和县', '', '', '', '', 3, 1, ''), ('652926', '6529', '00,65,6529', '拜城县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652926', '拜城县', '', '', '', '', 3, 1, ''), ('652927', '6529', '00,65,6529', '乌什县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652927', '乌什县', '', '', '', '', 3, 1, ''), ('652928', '6529', '00,65,6529', '阿瓦提县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652928', '阿瓦提县', '', '', '', '', 3, 1, ''), ('652929', '6529', '00,65,6529', '柯坪县', '65', '新疆维吾尔自治区', '6529', '阿克苏地区', '652929', '柯坪县', '', '', '', '', 3, 1, ''), ('6530', '65', '00,65', '克孜勒苏柯尔克孜自治州', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '', '', '', '', '', '', 2, 1, ''), ('653001', '6530', '00,65,6530', '阿图什市', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653001', '阿图什市', '', '', '', '', 3, 1, ''), ('653022', '6530', '00,65,6530', '阿克陶县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653022', '阿克陶县', '', '', '', '', 3, 1, ''), ('653023', '6530', '00,65,6530', '阿合奇县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653023', '阿合奇县', '', '', '', '', 3, 1, ''), ('653024', '6530', '00,65,6530', '乌恰县', '65', '新疆维吾尔自治区', '6530', '克孜勒苏柯尔克孜自治州', '653024', '乌恰县', '', '', '', '', 3, 1, ''), ('6531', '65', '00,65', '喀什地区', '65', '新疆维吾尔自治区', '6531', '喀什地区', '', '', '', '', '', '', 2, 1, ''), ('653101', '6531', '00,65,6531', '喀什市', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653101', '喀什市', '', '', '', '', 3, 1, ''), ('653121', '6531', '00,65,6531', '疏附县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653121', '疏附县', '', '', '', '', 3, 1, ''), ('653122', '6531', '00,65,6531', '疏勒县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653122', '疏勒县', '', '', '', '', 3, 1, ''), ('653123', '6531', '00,65,6531', '英吉沙县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653123', '英吉沙县', '', '', '', '', 3, 1, ''), ('653124', '6531', '00,65,6531', '泽普县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653124', '泽普县', '', '', '', '', 3, 1, ''), ('653125', '6531', '00,65,6531', '莎车县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653125', '莎车县', '', '', '', '', 3, 1, ''), ('653126', '6531', '00,65,6531', '叶城县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653126', '叶城县', '', '', '', '', 3, 1, ''), ('653127', '6531', '00,65,6531', '麦盖提县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653127', '麦盖提县', '', '', '', '', 3, 1, ''), ('653128', '6531', '00,65,6531', '岳普湖县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653128', '岳普湖县', '', '', '', '', 3, 1, ''), ('653129', '6531', '00,65,6531', '伽师县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653129', '伽师县', '', '', '', '', 3, 1, ''), ('653130', '6531', '00,65,6531', '巴楚县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653130', '巴楚县', '', '', '', '', 3, 1, ''), ('653131', '6531', '00,65,6531', '塔什库尔干塔吉克自治县', '65', '新疆维吾尔自治区', '6531', '喀什地区', '653131', '塔什库尔干塔吉克自治县', '', '', '', '', 3, 1, ''), ('6532', '65', '00,65', '和田地区', '65', '新疆维吾尔自治区', '6532', '和田地区', '', '', '', '', '', '', 2, 1, ''), ('653201', '6532', '00,65,6532', '和田市', '65', '新疆维吾尔自治区', '6532', '和田地区', '653201', '和田市', '', '', '', '', 3, 1, ''), ('653221', '6532', '00,65,6532', '和田县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653221', '和田县', '', '', '', '', 3, 1, ''), ('653222', '6532', '00,65,6532', '墨玉县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653222', '墨玉县', '', '', '', '', 3, 1, ''), ('653223', '6532', '00,65,6532', '皮山县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653223', '皮山县', '', '', '', '', 3, 1, ''), ('653224', '6532', '00,65,6532', '洛浦县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653224', '洛浦县', '', '', '', '', 3, 1, ''), ('653225', '6532', '00,65,6532', '策勒县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653225', '策勒县', '', '', '', '', 3, 1, ''), ('653226', '6532', '00,65,6532', '于田县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653226', '于田县', '', '', '', '', 3, 1, ''), ('653227', '6532', '00,65,6532', '民丰县', '65', '新疆维吾尔自治区', '6532', '和田地区', '653227', '民丰县', '', '', '', '', 3, 1, ''), ('6540', '65', '00,65', '伊犁哈萨克自治州', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '', '', '', '', '', '', 2, 1, ''), ('654002', '6540', '00,65,6540', '伊宁市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654002', '伊宁市', '', '', '', '', 3, 1, ''), ('654003', '6540', '00,65,6540', '奎屯市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654003', '奎屯市', '', '', '', '', 3, 1, ''), ('654004', '6540', '00,65,6540', '霍尔果斯市', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654004', '霍尔果斯市', '', '', '', '', 3, 1, ''), ('654021', '6540', '00,65,6540', '伊宁县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654021', '伊宁县', '', '', '', '', 3, 1, ''), ('654022', '6540', '00,65,6540', '察布查尔锡伯自治县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654022', '察布查尔锡伯自治县', '', '', '', '', 3, 1, ''), ('654023', '6540', '00,65,6540', '霍城县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654023', '霍城县', '', '', '', '', 3, 1, ''), ('654024', '6540', '00,65,6540', '巩留县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654024', '巩留县', '', '', '', '', 3, 1, ''), ('654025', '6540', '00,65,6540', '新源县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654025', '新源县', '', '', '', '', 3, 1, ''), ('654026', '6540', '00,65,6540', '昭苏县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654026', '昭苏县', '', '', '', '', 3, 1, ''), ('654027', '6540', '00,65,6540', '特克斯县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654027', '特克斯县', '', '', '', '', 3, 1, ''), ('654028', '6540', '00,65,6540', '尼勒克县', '65', '新疆维吾尔自治区', '6540', '伊犁哈萨克自治州', '654028', '尼勒克县', '', '', '', '', 3, 1, ''), ('6542', '65', '00,65', '塔城地区', '65', '新疆维吾尔自治区', '6542', '塔城地区', '', '', '', '', '', '', 2, 1, ''), ('654201', '6542', '00,65,6542', '塔城市', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654201', '塔城市', '', '', '', '', 3, 1, ''), ('654202', '6542', '00,65,6542', '乌苏市', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654202', '乌苏市', '', '', '', '', 3, 1, ''), ('654221', '6542', '00,65,6542', '额敏县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654221', '额敏县', '', '', '', '', 3, 1, ''), ('654223', '6542', '00,65,6542', '沙湾县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654223', '沙湾县', '', '', '', '', 3, 1, ''), ('654224', '6542', '00,65,6542', '托里县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654224', '托里县', '', '', '', '', 3, 1, ''), ('654225', '6542', '00,65,6542', '裕民县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654225', '裕民县', '', '', '', '', 3, 1, ''), ('654226', '6542', '00,65,6542', '和布克赛尔蒙古自治县', '65', '新疆维吾尔自治区', '6542', '塔城地区', '654226', '和布克赛尔蒙古自治县', '', '', '', '', 3, 1, ''), ('6543', '65', '00,65', '阿勒泰地区', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '', '', '', '', '', '', 2, 1, ''), ('654301', '6543', '00,65,6543', '阿勒泰市', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654301', '阿勒泰市', '', '', '', '', 3, 1, ''), ('654321', '6543', '00,65,6543', '布尔津县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654321', '布尔津县', '', '', '', '', 3, 1, ''), ('654322', '6543', '00,65,6543', '富蕴县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654322', '富蕴县', '', '', '', '', 3, 1, ''), ('654323', '6543', '00,65,6543', '福海县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654323', '福海县', '', '', '', '', 3, 1, ''), ('654324', '6543', '00,65,6543', '哈巴河县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654324', '哈巴河县', '', '', '', '', 3, 1, ''), ('654325', '6543', '00,65,6543', '青河县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654325', '青河县', '', '', '', '', 3, 1, ''), ('654326', '6543', '00,65,6543', '吉木乃县', '65', '新疆维吾尔自治区', '6543', '阿勒泰地区', '654326', '吉木乃县', '', '', '', '', 3, 1, ''), ('6590', '65', '00,65', '自治区直辖县级行政区', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '', '', '', '', '', '', 2, 1, ''), ('659001', '6590', '00,65,6590', '石河子市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659001', '石河子市', '', '', '', '', 3, 1, ''), ('659002', '6590', '00,65,6590', '阿拉尔市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659002', '阿拉尔市', '', '', '', '', 3, 1, ''), ('659003', '6590', '00,65,6590', '图木舒克市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659003', '图木舒克市', '', '', '', '', 3, 1, ''), ('659004', '6590', '00,65,6590', '五家渠市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659004', '五家渠市', '', '', '', '', 3, 1, ''), ('659005', '6590', '00,65,6590', '北屯市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659005', '北屯市', '', '', '', '', 3, 1, ''), ('659006', '6590', '00,65,6590', '铁门关市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659006', '铁门关市', '', '', '', '', 3, 1, ''), ('659007', '6590', '00,65,6590', '双河市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659007', '双河市', '', '', '', '', 3, 1, ''), ('659008', '6590', '00,65,6590', '可克达拉市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659008', '可克达拉市', '', '', '', '', 3, 1, ''), ('659009', '6590', '00,65,6590', '昆玉市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659009', '昆玉市', '', '', '', '', 3, 1, ''), ('659010', '6590', '00,65,6590', '胡杨河市', '65', '新疆维吾尔自治区', '6590', '自治区直辖县级行政区', '659010', '胡杨河市', '', '', '', '', 3, 1, ''), ('71', '00', '00', '台湾省', '71', '台湾省', '', '', '', '', '', '', '', '', 1, 1, ''), ('81', '00', '00', '香港特别行政区', '81', '香港特别行政区', '', '', '', '', '', '', '', '', 1, 1, ''), ('82', '00', '00', '澳门特别行政区', '82', '澳门特别行政区', '', '', '', '', '', '', '', '', 1, 1, ''); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_report_file +-- ---------------------------- +DROP TABLE IF EXISTS `blade_report_file`; +CREATE TABLE `blade_report_file` ( + `id` bigint(64) 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 '创建时间', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '报表文件表'; + +-- ---------------------------- +-- Table structure for blade_role +-- ---------------------------- +DROP TABLE IF EXISTS `blade_role`; +CREATE TABLE `blade_role` ( + `id` bigint(64) 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 '父主键', + `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 '角色别名', + `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表'; + +-- ---------------------------- +-- Records of blade_role +-- ---------------------------- +BEGIN; +INSERT INTO `blade_role` VALUES (1123598816738675201, '000000', 0, '超级管理员', 1, 'administrator', 0), (1123598816738675202, '000000', 0, '用户', 2, 'user', 0); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_role_menu +-- ---------------------------- +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', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_tenant +-- ---------------------------- +DROP TABLE IF EXISTS `blade_tenant`; +CREATE TABLE `blade_tenant` ( + `id` bigint(64) 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_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(64) 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 '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_user +-- ---------------------------- +DROP TABLE IF EXISTS `blade_user`; +CREATE TABLE `blade_user` ( + `id` bigint(64) 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 '账号', + `password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码', + `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称', + `real_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真名', + `avatar` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', + `email` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱', + `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机', + `birthday` datetime(0) NULL DEFAULT NULL COMMENT '生日', + `sex` smallint(6) NULL DEFAULT NULL COMMENT '性别', + `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_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_user` bigint(64) 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 '是否已删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表'; + +-- ---------------------------- +-- 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); +COMMIT; + +-- ---------------------------- +-- Table structure for blade_user_oauth +-- ---------------------------- +DROP TABLE IF EXISTS `blade_user_oauth`; +CREATE TABLE `blade_user_oauth` ( + `id` bigint(64) 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', + `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 '头像', + `blog` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应用主页', + `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司名', + `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', + `email` 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 '备注', + `gender` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别', + `source` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户第三方认证表'; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/script/kuboard/saber-db/my.cnf b/script/kuboard/saber-db/my.cnf new file mode 100644 index 00000000..7d8e75f9 --- /dev/null +++ b/script/kuboard/saber-db/my.cnf @@ -0,0 +1,7 @@ +[mysqld] + +init_connect='SET collation_connection = utf8_unicode_ci' +init_connect='SET NAMES utf8' +character-set-server=utf8 +collation-server=utf8_unicode_ci +skip-character-set-client-handshake diff --git a/script/service/rename.sh b/script/service/rename.sh new file mode 100755 index 00000000..a520be6c --- /dev/null +++ b/script/service/rename.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +# Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.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. + +################################################################ +# BladeX 一键修改包名与引用路径(注意需要同时将blade-tool修改并安装依赖) # +################################################################ +# original_project_path: 填写你需要修改的项目全路径 # +# new_project_suffix: 源工程文件拷贝至新目录的后缀名 # +# old_package: 需要替换的原包名 # +# new_package: 需要设置的新包名 # +################################################################ + +# 原始工程目录路径 +original_project_path="/your/project/path/here" +# 新工程目录名后缀 +new_project_suffix="-new" +# 设置原始包名 +old_package="org.springblade" +# 设置新包名 +new_package="com.example" + +echo "copying project..." + +# 新工程目录路径 +new_project_path="${original_project_path}${new_project_suffix}" + +# 拷贝工程目录 +cp -r "$original_project_path" "$new_project_path" + +# 将包名转换为路径 +old_package_path=$(echo "$old_package" | sed 's/\./\//g') +new_package_path=$(echo "$new_package" | sed 's/\./\//g') + +# 检查操作系统 +os_name=$(uname) +sed_i_option="-i" +if [ "$os_name" = "Darwin" ]; then + # MacOS 需要一个空的扩展名来避免创建备份文件 + sed_i_option="-i ''" +else + # 对于非MacOS系统,使用-i选项,不提供扩展名,避免创建备份文件 + sed_i_option="-i" +fi + +echo "replacing package names and moving files..." +# 查找并替换Java、XML、Properties和YAML文件中的包名 +# 同时移动文件到新的目录结构 +find "$new_project_path" \( -iname "*.java" -o -iname "*.xml" -o -iname "*.properties" -o -iname "*.yml" -o -iname "*.yaml" \) -print0 | while IFS= read -r -d $'\0' file; do + # 替换文件中的包名 + if [ "$os_name" = "Darwin" ]; then + sed -i '' "s|$old_package|$new_package|g" "$file" + else + sed -i "s|$old_package|$new_package|g" "$file" + fi + echo "modified: $file" + + # 如果文件路径包含旧包名路径,则移动文件 + if echo "$file" | grep -q "$old_package_path"; then + new_file=$(echo "$file" | sed "s|$old_package_path|$new_package_path|g") + new_dir=$(dirname "$new_file") + mkdir -p "$new_dir" + mv "$file" "$new_file" + echo "moved to: $new_file" + fi +done + +# 删除空目录的逻辑,确保包括顶层目录在内的所有空目录都被删除 +echo "removing empty directories..." +find "$new_project_path" -type d -empty -delete 2>/dev/null + +# 从新工程目录的根部开始,递归删除所有空的目录 +# 这个过程需要重复,直到没有更多的空目录为止 +while IFS= read -r -d '' dir; do + find "$dir" -type d -empty -delete 2>/dev/null +done < <(find "$new_project_path" -type d -print0 | sort -rz) + +# 检查并删除原始包名的顶级目录 +top_level_old_package_dir="$new_project_path/$(echo "$old_package" | cut -d '.' -f 1)" +if [ -d "$top_level_old_package_dir" ] && [ ! "$(ls -A "$top_level_old_package_dir")" ]; then + rm -r "$top_level_old_package_dir" +fi + +echo "package name and paths have been updated in the new project directory." diff --git a/script/service.cmd b/script/service/service.cmd similarity index 100% rename from script/service.cmd rename to script/service/service.cmd diff --git a/script/service.sh b/script/service/service.sh similarity index 96% rename from script/service.sh rename to script/service/service.sh index 091b8320..884d88a8 100644 --- a/script/service.sh +++ b/script/service/service.sh @@ -1,3 +1,6 @@ +#!/bin/bash + +#设置jar文件名 APP_NAME=app.jar #使用说明,用来提示输入参数