├── .gitignore
├── .gitlab-ci.yml
├── LICENSE
├── README.md
├── backend
├── Dockerfile
├── backend-view
│ ├── .gitignore
│ ├── .postcssrc.js
│ ├── README.md
│ ├── babel.config.js
│ ├── index.html
│ ├── package.json
│ ├── public
│ │ ├── image
│ │ │ └── ueboot.png
│ │ └── index.html
│ ├── src
│ │ ├── App.vue
│ │ ├── main.js
│ │ ├── router
│ │ │ └── index.js
│ │ ├── util
│ │ │ └── values.js
│ │ └── views
│ │ │ └── HelloWorld.vue
│ ├── static
│ │ └── image
│ │ │ └── ueboot.png
│ ├── vue.config.js
│ └── yarn.lock
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── ueboot
│ │ └── starter
│ │ └── BackEndApplication.java
│ └── resources
│ ├── application-dev.yml
│ ├── application-pro.yml
│ ├── application-uat.yml
│ ├── application.yml
│ ├── logback-pro.xml
│ └── logback-uat.xml
├── common
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── ueboot
│ └── starter
│ └── frontend
│ └── utils
│ ├── NumberUtils.java
│ └── ZipUtils.java
├── entity
└── pom.xml
├── frontend
└── front-view
│ └── yarn.lock
├── pom.xml
├── repository
└── pom.xml
├── service
└── pom.xml
└── sql
└── ueboot-shiro-3.1.0.sql
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | .idea
3 | *.iml
4 | admin-view/yarn.lock
5 | admin-view/node_modules
6 | /admin-view/package-lock.json
7 |
8 | */target/
9 | */node_modules/
10 |
11 | /log.outdir_IS_UNDEFINED
12 | *.log
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | stages:
2 | - frontend
3 |
4 | # 当前gitlab-runner运行在需要部署的服务器上,所以部署时直接执行命令即可
5 | # 要求静态页面打包后直接放置到java工程当中的/src/resources/static目录下。或者自己写命令将文件copy到nginx目录当中
6 | frontend-build-deploy:
7 | stage: frontend
8 | script:
9 | - "cd ./frontend/frontend && pwd && ls -lrt"
10 | - "yarn install && yarn run build"
11 | - "cd ../../ && mvn package -B -Dmaven.test.skip=true -Dspring.profiles.active=pro "
12 | - docker build -t frontend:latest .
13 | - "ls -lrt && echo 'deploying'"
14 | - " if [ `docker ps |grep 'frontend'|wc -l` -eq 0 ]; then echo 'not running';else docker stop frontend; fi "
15 | - " if [ `docker ps -a |grep 'frontend'|wc -l` -eq 0 ]; then echo 'not stop container';else docker rm frontend; fi "
16 | - docker run -d --name admin-zt -p 7777:7777 --restart=always -v /applog/:/applog -v /etc/localtime:/etc/localtime:ro frontend:latest
17 | tags:
18 | - docker-test
19 | only:
20 | variables:
21 | - $CI_COMMIT_TITLE == "frontend"
22 |
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018, 欧阳葵
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | list of conditions and the following disclaimer in the documentation and/or
12 | other materials provided with the distribution.
13 |
14 | * Neither the name of the {organization} nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 官方网站
2 | - http://www.ueboot.com 查看具体的功能介绍和和截图
3 | - 基础框架来源: https://github.com/ueboot/ueboot.git
4 |
5 | # 快速使用
6 | - 前提条件,需要有Mysql数据库、Redis服务、JDK1.8
7 | - 代码checkout后,使用IDEA导入,或者Eclipse都可以,当前项目采用maven构建
8 | - 修改backend工程当中的src/main/resources/application.yml 数据库配置文件和reids配置文件
9 | - 导入项目中的sql目录下的ueboot-shiro-3.1.0.sql文件到自己的mysql数据库
10 | - backend后台管理系统启动方式
11 | - 后端Java服务,找到com.ueboot.starter.backend.BackEndApplication 类,直接右键Run即可
12 | - 前端页面,使用命令窗口进入backend/backend-view目录,第一次执行需要先执行yarn install 或者npm install,之后执行 npm run serve
13 | - 前端具体的使用方式查看README.md
14 | - 默认账号: root 密码:111111 ,最高权限,拥有一切菜单访问权限,不受权限角色控制
15 | - frontend启动方式与后台管理类似,但是没有默认的登录界面等
16 |
17 | # 项目结构与约定说明
18 |
19 | ## 1. backend
20 | - 后台管理系统
21 | - backend-view 后台管理系统前端页面
22 | - src 后台管理系统Java代码
23 |
24 | ### 1.1 项目结构
25 | ```
26 | |- backend
27 | |- backend-view/ UI界面项目
28 | |- src/ UI界面源码目录
29 | |- package.json UI界面配置文件
30 | |- src/ 后台项目
31 | |- main/ 后台项目源码目录
32 | |- test/ 后台项目单元测试目录
33 | |- pom.xml 项目POM文件
34 | ```
35 |
36 | ## 2. frontend
37 | - 前端API服务
38 | - 提供给移动端或者C端用户的Java接口服务
39 |
40 | ### 2.1 项目结构
41 | ```
42 | |- frontend
43 | |- frontend-view/ 前台项目
44 | |- src/ 前台项目源码目录
45 | |- package.json 前台项目配置文件
46 | |- src/ 前端Java接口项目
47 | |- main/ 前端Java接口项目源码目录
48 | |- test/ 前端Java接口项目单元测试目录
49 | |- pom.xml 项目POM文件
50 | ```
51 |
52 |
53 | ## 4. common
54 | - 公用工程,放置一些工具类使用,其余三个模块都会依赖这个模块
55 |
56 | ## 5. entity
57 | - 依赖common模块
58 | - 只存放数据库模型类
59 | - 采用JPA注解方式定义
60 | - 所有模型继承BaseEntity类,这个类会有几个固定的字段。同时添加了监听器,自动对更新时间,创建时间进行赋值,无需代码赋值
61 | - 模型类无get,set方法,采用lombok注解方式实现。
62 | - 类名都以Entity结尾,对应的表结构为NBO_开头,但是无ENTITY结尾。
63 | - 默认设置关联属性的级联查询为懒加载模式,程序需要使用级联对象时,需要保证在同一个事物内查询,或者额外调用接口查询。
64 |
65 | ## 6. repository
66 | - 依赖entity模块
67 | - 数据库模型仓储访问层
68 | - 采用 Spring Data JPA方式实现,只需要定义接口即可,无需编写实现类。
69 | - 每个Entity类都有一个对应的Repository类
70 | - 所有类名已Repository结尾
--------------------------------------------------------------------------------
/backend/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM docker.xiqiao.io/java/jdk:1.8
2 | VOLUME /tmp
3 | ADD target/backend-1.0.0-SNAPSHOT.jar app.jar
4 | #RUN apk --no-cache add tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
5 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","-Duser.timezone=GMT+08","/app.jar"]
6 |
--------------------------------------------------------------------------------
/backend/backend-view/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 | package-lock.json
23 |
--------------------------------------------------------------------------------
/backend/backend-view/.postcssrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | };
--------------------------------------------------------------------------------
/backend/backend-view/README.md:
--------------------------------------------------------------------------------
1 | # 使用方法
2 | - 安装yarn,如果没有安装过,请先安装yarn `npm install -g yarn `
3 | - 设置npm 代理,提升安装速度 `npm config set registry https://registry.npm.taobao.org/`
4 | - 使用 `yarn install ` 命令安装所有依赖文件
5 | - 本地执行`yarn run serve` 启动
6 | # 编译打包
7 | - 本地执行`yarn run build`
8 | - 可以在webpack配置文件中将打包的文件直接放到java工程当中
9 | # 前台启动
10 |
11 | # 配置修改
12 | - 本地代理
13 | ```angular2html
14 | proxyTable: {
15 | //本地代理
16 | '/platform/*': {
17 | target: 'http://localhost:8000',
18 | debug:true,
19 | changeOrigin: true,
20 | secure: false
21 | }
22 | },
23 | ```
24 |
--------------------------------------------------------------------------------
/backend/backend-view/babel.config.js:
--------------------------------------------------------------------------------
1 | console.log("#######读取到babel配置文件,开始ES6转ES5#####");
2 | module.exports = {
3 | presets: [
4 | ['@vue/app']
5 | ]
6 | };
7 |
--------------------------------------------------------------------------------
/backend/backend-view/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ueboot-后台管理系统
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/backend/backend-view/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "backend",
3 | "version": "0.0.1",
4 | "scripts": {
5 | "clean": "npm cache clean -f",
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "inspect": "vue-cli-service inspect",
9 | "update-dadi": "npm update",
10 | "update-xiqiao": "rm -rf package-lock.json && npm update uecomponents --registry http://npm.xiqiao.io && npm update ctviews --registry http://npm.xiqiao.io",
11 | "lint": "vue-cli-service lint --fix"
12 | },
13 | "main": "src/main.js",
14 | "files": [
15 | "src"
16 | ],
17 | "dependencies": {
18 | "@vue/cli-plugin-babel": "^4.2.3",
19 | "@vue/cli-plugin-eslint": "^4.2.3",
20 | "@vue/cli-service": "^4.2.3",
21 | "@vue/eslint-config-standard": "^5.1.2",
22 | "axios": "^0.19.2",
23 | "core-js": "^3.6.4",
24 | "deep-extend": "^0.6.0",
25 | "eslint": "^6.8.0",
26 | "eslint-plugin-jest": "^23.8.2",
27 | "eslint-plugin-vue-libs": "^4.0.0",
28 | "is-function": "^1.0.1",
29 | "less": "2.7.3",
30 | "less-loader": "5.0.0",
31 | "moment": "^2.24.0",
32 | "postcss": "^7.0.27",
33 | "postcss-loader": "^3.0.0",
34 | "stylus": "^0.54.7",
35 | "stylus-loader": "^3.0.2",
36 | "ueboot": "^2.1.4",
37 | "view-design": "^4.1.3",
38 | "vue": "^2.6.11",
39 | "vuex": "^3.1.3",
40 | "vue-router": "latest"
41 | },
42 | "eslintConfig": {
43 | "root": true,
44 | "env": {
45 | "node": true
46 | },
47 | "extends": [
48 | "plugin:vue/essential",
49 | "eslint:recommended"
50 | ],
51 | "parserOptions": {
52 | "parser": "babel-eslint"
53 | },
54 | "rules": {
55 | "vue/html-end-tags": "error",
56 | "vue/eqeqeq": "1",
57 | "semi": [
58 | 1,
59 | "always"
60 | ],
61 | "no-console": "off",
62 | "no-var": 0,
63 | "no-eq-null": 1,
64 | "no-unused-vars": 1,
65 | "no-multi-spaces": 1,
66 | "vue/no-unused-vars": 1,
67 | "vue/no-use-v-if-with-v-for": 1,
68 | "vue/no-unused-components": 1,
69 | "vue/valid-v-for": 1,
70 | "no-undef": 1,
71 | "no-multiple-empty-lines": [
72 | 1,
73 | {
74 | "max": 2
75 | }
76 | ],
77 | "comma-style": [
78 | 1,
79 | "last"
80 | ]
81 | }
82 | },
83 | "postcss": {
84 | "plugins": {
85 | "autoprefixer": {}
86 | }
87 | },
88 | "browserslist": [
89 | "> 1%",
90 | "last 2 versions",
91 | "ie >=9"
92 | ],
93 | "devDependencies": {
94 | "vue-template-compiler": "^2.6.11"
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/backend/backend-view/public/image/ueboot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ueboot/ueboot-starter/f552edd7c5a07c8c081e0010a1f09d8811c14bdf/backend/backend-view/public/image/ueboot.png
--------------------------------------------------------------------------------
/backend/backend-view/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ueboot-后台管理系统
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/backend/backend-view/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
27 |
--------------------------------------------------------------------------------
/backend/backend-view/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App'
3 | import router from './router/index'
4 | import ueboot from 'ueboot'
5 |
6 | /* ueboot封装过的基于iview的自定义样式,也可以引入自己的自定义样式 */
7 | import 'ueboot/lib/ueboot.css'
8 | import ViewUI from 'view-design';
9 | import 'view-design/dist/styles/iview.css';
10 | Vue.use(ViewUI);
11 | Vue.use(ueboot);
12 |
13 | /* 设置登录后的主界面相关配置 */
14 | ueboot.Config.setConfig({
15 | logoImage: '/public/image/ueboot.png',
16 | sysTitle: '后台管理系统',
17 | page_login: {
18 | theme: 'theme2',
19 | logoStyle:'width:100px;height:30px;',
20 | // 登录成功后的跳转路径
21 | successRouter: {path: '/ueboot/shiro/User'}
22 | },
23 | page_main: {
24 | logoStyle: {
25 | width: '300px'
26 | },
27 | logoImageStyle:{
28 | width: "80px",
29 | height: "50%"
30 | },
31 | menuWidth: 250,
32 | logoutSuccessRouter: {name: 'login'}
33 | },
34 | axios: {baseURL: '/backend', unauthorizedUrl: process.env.CONTEXT_HTML + '/#/login'}
35 | });
36 | Vue.config.productionTip = false;
37 |
38 | const app = new Vue({
39 | el: '#app',
40 | router,
41 | components: {App},
42 | template: ''
43 | });
44 | console.log(app !== null);
45 |
--------------------------------------------------------------------------------
/backend/backend-view/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | // ueboot提供的权限管理UI界面
5 | import ueboot from 'ueboot'
6 |
7 | import HelloWorld from '../views/HelloWorld'
8 |
9 | Vue.use(Router)
10 |
11 | /**
12 | * 登录路由
13 | */
14 | const LoginRouter = {
15 | path: '/login',
16 | name: 'login',
17 | component: ueboot.PageLogin
18 | }
19 |
20 | /**
21 | * 自定义业务页面
22 | */
23 | const CustomerRouter = {
24 | path: '/helloWorld',
25 | name: 'HelloWorld',
26 | component: HelloWorld
27 | }
28 |
29 | /**
30 | * 权限管理
31 | */
32 | const UebootShiroRouter = {
33 | path: '/',
34 | component: ueboot.PageMain,
35 | children: [
36 | {
37 | path: '/ueboot/shiro/User',
38 | name: 'User',
39 | component: ueboot.PageShiroUser
40 | },
41 | {
42 | path: '/ueboot/shiro/Role',
43 | name: 'Role',
44 | component: ueboot.PageShiroRole
45 | },
46 | {
47 | path: '/ueboot/shiro/Resources',
48 | name: 'Resources',
49 | component: ueboot.PageShiroResources
50 | }
51 | ]
52 | }
53 |
54 | export default new Router({
55 | routes: [
56 | // 登录路由
57 | LoginRouter,
58 | // 权限相关路由
59 | UebootShiroRouter,
60 | CustomerRouter
61 | ]
62 | })
63 |
--------------------------------------------------------------------------------
/backend/backend-view/src/util/values.js:
--------------------------------------------------------------------------------
1 | /**
2 | * JS当中定义的静态变量
3 | */
4 | export default {
5 | dict: {
6 | // 性别字典key
7 | sex: '性别',
8 | knowledgeType: '知识库分类'
9 | },
10 | storage: {
11 | user: 'user', // 用户登录成功缓存key
12 | knowledgeRow: 'knowledgeRow', // 知识库
13 | chatMessageRow: 'chatMessageRow', // 聊天记录
14 | userId: 'userId'
15 | },
16 | gender: [{'name': '男', 'value': '男'}, {'name': '女', 'value': '女'}],
17 | couponSource: [{'name': '抽奖', 'value': '抽奖'}, {'name': '系统发放', 'value': '系统发放'}],
18 | bool: [{'name': '是', 'value': '是'}, {'name': '否', 'value': '否'}],
19 | invoiceType: [{'name': '个人', 'value': '个人'}, {'name': '公司', 'value': '公司'}],
20 | goodsType: [{'name': '虚拟', 'value': '虚拟'}, {'name': '实物', 'value': '实物'}],
21 | activityStatus: [{'name': '开启中', 'value': '开启中'}, {'name': '暂停中', 'value': '暂停中'}, {'name': '已失效', 'value': '已失效'}],
22 | limitType: [{'name': '不限制', 'value': 'NONE'}, {'name': 'OPENID', 'value': 'OPENID'}, {
23 | 'name': 'VIN',
24 | 'value': 'VIN'
25 | }, {'name': '手机号', 'value': 'MOBILE'}],
26 | activityType: [{'name': '限时折扣', 'value': '限时折扣'}, {'name': '满减', 'value': '满减'}, {
27 | 'name': '满赠',
28 | 'value': '满赠'
29 | }, {'name': '秒杀', 'value': '秒杀'}, {'name': '众筹', 'value': '众筹'}],
30 | couponCustomerType: [{'name': 'A类客户', 'value': 'A'}, {'name': 'B类客户', 'value': 'B'}, {
31 | 'name': 'C类客户',
32 | 'value': 'C'
33 | }, {'name': '半合成机油客户', 'value': '半合成机油客户'}]
34 | }
35 |
--------------------------------------------------------------------------------
/backend/backend-view/src/views/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 | Hello,Ueboot!
3 |
4 |
5 |
10 |
11 |
16 |
--------------------------------------------------------------------------------
/backend/backend-view/static/image/ueboot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ueboot/ueboot-starter/f552edd7c5a07c8c081e0010a1f09d8811c14bdf/backend/backend-view/static/image/ueboot.png
--------------------------------------------------------------------------------
/backend/backend-view/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | lintOnSave: false,
3 | devServer: {
4 | port: 7000,
5 | // 设置代理
6 | proxy: {
7 | '/backend': {
8 | // 目标 API 地址
9 | target: 'http://127.0.0.1:8888/',
10 | // target: 'http://139.196.86.116:8002/',
11 | // 如果要代理 websockets
12 | ws: false,
13 | // 将主机标头的原点更改为目标URL
14 | changeOrigin: true
15 | },
16 | }
17 | },
18 | productionSourceMap: true,
19 | runtimeCompiler: true,
20 | pages: {
21 | index: {
22 | // page 的入口
23 | entry: 'src/main.js',
24 | // 模板来源
25 | template: 'public/index.html',
26 | // 在 dist/index.html 的输出
27 | filename: 'index.html'
28 | }
29 | },
30 | //transpileDependencies:["xlsx"]
31 | };
32 |
--------------------------------------------------------------------------------
/backend/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ueboot.starter
7 | starter-parent
8 | 3.1.0-SNAPSHOT
9 |
10 | 4.0.0
11 | backend
12 | ${currentProject.version}
13 |
14 |
15 | com.ueboot.starter
16 | service
17 |
18 |
19 |
20 | io.springfox
21 | springfox-swagger2
22 |
23 |
24 | io.springfox
25 | springfox-swagger-ui
26 |
27 |
28 |
29 | junit
30 | junit
31 | test
32 | 4.12
33 |
34 |
35 | org.apache.maven.shared
36 | maven-filtering
37 | 3.1.1
38 |
39 |
40 |
41 |
42 |
43 |
44 | src/main/resources
45 | true
46 |
47 |
48 |
49 |
50 | org.springframework.boot
51 | spring-boot-maven-plugin
52 |
53 |
54 | com.ueboot.starter.BackEndApplication
55 |
56 |
57 |
58 |
59 | repackage
60 |
61 |
62 |
63 |
64 |
65 |
66 | org.apache.maven.plugins
67 | maven-resources-plugin
68 |
69 |
70 | @
71 |
72 | false
73 |
74 |
75 | svg
76 | png
77 | jpg
78 | gif
79 | otf
80 | eot
81 | ttf
82 | woff
83 | woff2
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/backend/src/main/java/com/ueboot/starter/BackEndApplication.java:
--------------------------------------------------------------------------------
1 | package com.ueboot.starter;
2 |
3 |
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.ComponentScan;
7 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
8 | import org.springframework.transaction.annotation.EnableTransactionManagement;
9 |
10 | /**
11 | * backend 启动类入口
12 | * @author yangkui
13 | */
14 | @SpringBootApplication
15 | @EnableTransactionManagement
16 | @ComponentScan(value = {"com.ueboot.starter","com.ueboot.core","com.ueboot.shiro"})
17 | @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 6000, redisNamespace = "backend")
18 | public class BackEndApplication {
19 | public static void main(String[] args) {
20 | SpringApplication.run(BackEndApplication.class, args);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/backend/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | logging:
2 | level:
3 | root: info
4 | pattern:
5 | console: "%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%thread] %clr(%-5level) %logger{50}[%L] -%msg%n"
6 | file: "%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%thread] %clr(%-5level) %logger{50}[%L] -%msg%n"
--------------------------------------------------------------------------------
/backend/src/main/resources/application-pro.yml:
--------------------------------------------------------------------------------
1 | # 当前文件可以覆盖默认的application.yml配置
2 | logging:
3 | config: classpath:logback-pro.xml
4 |
--------------------------------------------------------------------------------
/backend/src/main/resources/application-uat.yml:
--------------------------------------------------------------------------------
1 | # 当前文件可以覆盖默认的application.yml配置
2 | logging:
3 | config: classpath:logback-uat.xml
--------------------------------------------------------------------------------
/backend/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8888
3 | servlet:
4 | context-path: /backend
5 | session:
6 | cookie:
7 | name: backend
8 | spring:
9 | profiles:
10 | active: @spring.profiles.active@
11 | cache:
12 | type: redis
13 | cache-names: systemCache
14 | session:
15 | store-type: redis
16 | servlet:
17 | multipart:
18 | enabled: true
19 | max-file-size: 500MB
20 | max-request-size: 500MB
21 | jpa:
22 | open-in-view: true
23 | database: mysql
24 | hibernate:
25 | ddl-auto: none
26 | properties:
27 | hibernate:
28 | dialect: org.hibernate.dialect.MySQL57InnoDBDialect
29 | format_sql: false
30 | jadira:
31 | usertype:
32 | autoRegisterUserTypes: true
33 | javaZone: Asia/Shanghai
34 | databaseZone: Asia/Shanghai
35 | show-sql: true
36 | datasource:
37 | driver-class-name: com.mysql.cj.jdbc.Driver
38 | # 本地开发需要自己配置对应的数据库,采用加密方式
39 | url: ENC(azN5gtD4LMtsos/l7pvuBmzcQursb1W5K7Sn3chpKB+DA/Xa97M9kDhOU9yAXuIrDkQu8c0lyPEa2B9mmgIelIIcnCCi8zAFM07esAcpJDCkTdBUoe0GpZGx1t72M35Fbh4uTHiITiHFAcYhPes6Am0C60luD4mCc+7VeqXAR1fMdjnqmmtkZRw+CsVLYApt)
40 | #url: jdbc:mysql://127.0.0.1:3306/ueboot-shiro?useSSL=false&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
41 | username: root
42 | # 加密后的密码
43 | password: ENC(xIOpQ585xlp0nREocHniEa/v5Ybdqx2W)
44 | tomcat:
45 | max-wait: 500
46 | max-active: 200
47 | initial-size: 5
48 | max-idle: 5
49 | min-idle: 5
50 | redis:
51 | host: ENC(Fz+uDUi0xCUm50CIs9nUzzO5dRWLUzvo)
52 | password:
53 | port: 6379
54 | database: 1
55 | timeout: 60s
56 | data:
57 | redis:
58 | repositories:
59 | enabled: false #设置为false,防止启动时提示Multiple Spring Data modules found, entering strict repository configuration mode
60 | logging:
61 | level:
62 | root: info
63 | # 设置显示sql参数值
64 | # org.hibernate: info
65 | # org.hibernate.type.descriptor.sql.BasicBinder: trace
66 | # org.hibernate.type.descriptor.sql.BasicExtractor: trace
67 | jasypt:
68 | encryptor:
69 | # 加密用到的秘钥
70 | password: ueboot
--------------------------------------------------------------------------------
/backend/src/main/resources/logback-pro.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | ${FILE_PATH}/backend.log
10 |
11 | ${FILE_PATH}/backend.%d{yyyy-MM-dd}-%i.log
12 | 30
13 |
14 | 50MB
15 |
16 |
17 |
18 | ${PATTERN}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | %X{RequestNo} %X{remoteHost}- %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}[%L] -%msg%n
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/backend/src/main/resources/logback-uat.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | ${FILE_PATH}/backend.log
10 |
11 | ${FILE_PATH}/backend.%d{yyyy-MM-dd}-%i.log
12 | 30
13 |
14 | 50MB
15 |
16 |
17 |
18 | ${PATTERN}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | %X{RequestNo} %X{remoteHost}- %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}[%L] -%msg%n
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/common/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ueboot.starter
7 | starter-parent
8 | 3.1.0-SNAPSHOT
9 |
10 | ${currentProject.version}
11 | 4.0.0
12 | common
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/common/src/main/java/com/ueboot/starter/frontend/utils/NumberUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, XiQiao
3 | * All rights reserved.
4 | *
5 | * Id:NumberUtils.java 2018-08-22 下午4:17 andy
6 | */
7 | package com.ueboot.starter.frontend.utils;
8 |
9 |
10 | public class NumberUtils {
11 |
12 | /**
13 | * 获取指定长度的数字字符串,不足前面补零
14 | * @param number
15 | * @param length
16 | * @return
17 | */
18 | public static String getNumberByLength(String number, int length) {
19 | if (number.length() < length) {
20 | return NumberUtils.getNumberByLength("0" + number, length);
21 | } else {
22 | return number;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/common/src/main/java/com/ueboot/starter/frontend/utils/ZipUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, XiQiao
3 | * All rights reserved.
4 | *
5 | * Id:ZipUtils.java 2018-08-17 下午2:47 andy
6 | */
7 | package com.ueboot.starter.frontend.utils;
8 |
9 | import com.ueboot.core.exception.BusinessException;
10 | import lombok.extern.log4j.Log4j;
11 | import lombok.extern.slf4j.Slf4j;
12 |
13 | import java.io.*;
14 | import java.util.*;
15 | import java.util.zip.ZipEntry;
16 | import java.util.zip.ZipOutputStream;
17 |
18 | @Slf4j
19 | public class ZipUtils {
20 |
21 |
22 | private static final int BUFFER_SIZE = 2 * 1024;
23 |
24 |
25 | /**
26 | * 压缩成ZIP 方法1
27 | *
28 | * @param srcDir 压缩文件夹路径
29 | * @param out 压缩文件输出流
30 | * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
31 | * false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败)
32 | * @throws RuntimeException 压缩失败会抛出运行时异常
33 | */
34 | public static void toZip(String srcDir, OutputStream out, boolean KeepDirStructure)
35 | throws RuntimeException {
36 |
37 | ZipOutputStream zos = null;
38 | try {
39 | zos = new ZipOutputStream(out);
40 | File sourceFile = new File(srcDir);
41 | compress(sourceFile, zos, sourceFile.getName(), KeepDirStructure);
42 | long end = System.currentTimeMillis();
43 | } catch (Exception e) {
44 | throw new RuntimeException("zip error from ZipUtils", e);
45 | } finally {
46 | if (zos != null) {
47 | try {
48 | zos.close();
49 | } catch (IOException e) {
50 | log.error("创建ZIP文件失败",e);
51 | throw new BusinessException("关闭创建ZIP文件失败 ===>> {}", e.toString());
52 | }
53 | }
54 | }
55 | }
56 |
57 |
58 | /**
59 | * 压缩成ZIP 方法2
60 | *
61 | * @param srcFiles 需要压缩的文件列表
62 | * @param out 压缩文件输出流
63 | * @throws RuntimeException 压缩失败会抛出运行时异常
64 | */
65 | public static void toZip(List srcFiles, OutputStream out) throws RuntimeException {
66 | ZipOutputStream zos = null;
67 | try {
68 | zos = new ZipOutputStream(out);
69 | for (File srcFile : srcFiles) {
70 | byte[] buf = new byte[BUFFER_SIZE];
71 | zos.putNextEntry(new ZipEntry(srcFile.getName()));
72 | int len;
73 | FileInputStream in = new FileInputStream(srcFile);
74 | while ((len = in.read(buf)) != -1) {
75 | zos.write(buf, 0, len);
76 | }
77 | zos.closeEntry();
78 | in.close();
79 | }
80 | } catch (Exception e) {
81 | throw new RuntimeException("zip error from ZipUtils", e);
82 | } finally {
83 | if (zos != null) {
84 | try {
85 | zos.close();
86 | } catch (IOException e) {
87 | log.error("创建ZIP文件失败",e);
88 | throw new BusinessException("关闭创建ZIP文件失败 ===>> {}", e.toString());
89 | }
90 | }
91 | }
92 | }
93 |
94 |
95 | /**
96 | * 递归压缩方法
97 | *
98 | * @param sourceFile 源文件
99 | * @param zos zip输出流
100 | * @param name 压缩后的名称
101 | * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构;
102 | * false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败)
103 | * @throws Exception
104 | */
105 | private static void compress(File sourceFile, ZipOutputStream zos, String name,
106 | boolean KeepDirStructure) throws Exception {
107 | byte[] buf = new byte[BUFFER_SIZE];
108 | if (sourceFile.isFile()) {
109 | // 向zip输出流中添加一个zip实体,构造器中name为zip实体的文件的名字
110 | zos.putNextEntry(new ZipEntry(name));
111 | // copy文件到zip输出流中
112 | int len;
113 | FileInputStream in = new FileInputStream(sourceFile);
114 | while ((len = in.read(buf)) != -1) {
115 | zos.write(buf, 0, len);
116 | }
117 | // Complete the entry
118 | zos.closeEntry();
119 | in.close();
120 | } else {
121 | File[] listFiles = sourceFile.listFiles();
122 | if (listFiles == null || listFiles.length == 0) {
123 | // 需要保留原来的文件结构时,需要对空文件夹进行处理
124 | if (KeepDirStructure) {
125 | // 空文件夹的处理
126 | zos.putNextEntry(new ZipEntry(name + "/"));
127 | // 没有文件,不需要文件的copy
128 | zos.closeEntry();
129 | }
130 | } else {
131 | for (File file : listFiles) {
132 | // 判断是否需要保留原来的文件结构
133 | if (KeepDirStructure) {
134 | // 注意:file.getName()前面需要带上父文件夹的名字加一斜杠,
135 | // 不然最后压缩包中就不能保留原来的文件结构,即:所有文件都跑到压缩包根目录下了
136 | compress(file, zos, name + File.separator + file.getName(), KeepDirStructure);
137 | } else {
138 | compress(file, zos, file.getName(), KeepDirStructure);
139 | }
140 | }
141 | }
142 | }
143 | }
144 |
145 | /**
146 | * 创建ZIP文件
147 | * @param sourcePath 文件或文件夹路径
148 | * @param zipPath 生成的zip文件存在路径(包括文件名)
149 | */
150 | public static void toZip(String sourcePath, String zipPath) {
151 | FileOutputStream fos = null;
152 | ZipOutputStream zos = null;
153 | try {
154 | fos = new FileOutputStream(zipPath);
155 | zos = new ZipOutputStream(fos);
156 | writeZip(new File(sourcePath), "", zos);
157 | } catch (FileNotFoundException e) {
158 | log.error("创建ZIP文件失败",e);
159 | throw new BusinessException("创建ZIP文件失败 ===>> {}", e.toString());
160 | } finally {
161 | try {
162 | if (zos != null) {
163 | zos.close();
164 | }
165 | } catch (IOException e) {
166 | log.error("创建ZIP文件失败",e);
167 | throw new BusinessException("关闭创建ZIP文件失败 ===>> {}", e.toString());
168 | }
169 |
170 | }
171 | }
172 |
173 | private static void writeZip(File file, String parentPath, ZipOutputStream zos) {
174 | if(file.exists()){
175 | if(file.isDirectory()){//处理文件夹
176 | parentPath+=file.getName()+File.separator;
177 | File [] files=file.listFiles();
178 | if(files.length != 0){
179 | for(File f:files){
180 | writeZip(f, parentPath, zos);
181 | }
182 | }else{ //空目录则创建当前目录
183 | try {
184 | zos.putNextEntry(new ZipEntry(parentPath));
185 | } catch (IOException e) {
186 | e.printStackTrace();
187 | }
188 | }
189 | }else{
190 | FileInputStream fis=null;
191 | try {
192 | fis=new FileInputStream(file);
193 | ZipEntry ze = new ZipEntry(parentPath + file.getName());
194 | zos.putNextEntry(ze);
195 | byte [] content=new byte[1024];
196 | int len;
197 | while((len=fis.read(content))!=-1){
198 | zos.write(content,0,len);
199 | zos.flush();
200 | }
201 |
202 | } catch (FileNotFoundException e) {
203 | log.error("创建ZIP文件失败",e);
204 | throw new BusinessException("创建ZIP文件失败 ===>> {}", e.toString());
205 | } catch (IOException e) {
206 | log.error("创建ZIP文件失败",e);
207 | throw new BusinessException("创建ZIP文件失败 ===>> {}", e.toString());
208 | }finally{
209 | try {
210 | if(fis!=null){
211 | fis.close();
212 | }
213 | }catch(IOException e){
214 | log.error("创建ZIP文件失败",e);
215 | throw new BusinessException("创建ZIP文件失败 ===>> {}", e.toString());
216 | }
217 | }
218 | }
219 | }
220 | }
221 | }
222 |
--------------------------------------------------------------------------------
/entity/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ueboot.starter
7 | starter-parent
8 | 3.1.0-SNAPSHOT
9 |
10 | 4.0.0
11 | ${currentProject.version}
12 | entity
13 |
14 |
15 | com.ueboot.starter
16 | common
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | com.ueboot.starter
6 | starter-parent
7 | 3.1.0-SNAPSHOT
8 |
9 | entity
10 | repository
11 | service
12 | common
13 | backend
14 |
15 | pom
16 | ueboot-starter-parent
17 | http://www.ueboot.com
18 |
19 |
20 | com.ueboot
21 | ueboot-parent
22 | 3.1.0-SNAPSHOT
23 |
24 |
25 |
26 |
27 |
28 | 3.0.0-SNAPSHOT
29 | 1.8
30 | 2.6.1
31 |
32 |
33 |
35 |
36 |
37 |
38 |
39 |
40 | com.ueboot.starter
41 | common
42 | ${currentProject.version}
43 |
44 |
45 | com.ueboot.starter
46 | entity
47 | ${currentProject.version}
48 |
49 |
50 | com.ueboot.starter
51 | repository
52 | ${currentProject.version}
53 |
54 |
55 | com.ueboot.starter
56 | service
57 | ${currentProject.version}
58 |
59 |
60 |
61 | io.springfox
62 | springfox-swagger2
63 | ${swagger2.version}
64 |
65 |
66 | io.springfox
67 | springfox-swagger-ui
68 | ${swagger2.version}
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | org.springframework.boot
77 | spring-boot-starter-actuator
78 |
79 |
80 |
81 |
82 |
83 |
84 | dev
85 |
86 | dev
87 |
88 |
89 | true
90 |
91 |
92 |
93 | pro
94 |
95 | pro
96 |
97 |
98 |
99 | uat
100 |
101 | uat
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | Center
110 | Nexus
111 | https://maven.aliyun.com/nexus/content/groups/public
112 |
113 | true
114 |
115 |
116 | true
117 |
118 |
119 |
120 |
121 |
122 |
123 | Center
124 | Nexus Repositories
125 | https://maven.aliyun.com/nexus/content/groups/public
126 |
127 | true
128 |
129 |
130 | true
131 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/repository/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ueboot.starter
7 | starter-parent
8 | 3.1.0-SNAPSHOT
9 |
10 | 4.0.0
11 | ${currentProject.version}
12 | repository
13 |
14 |
15 | com.ueboot.starter
16 | entity
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/service/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | com.ueboot.starter
7 | starter-parent
8 | 3.1.0-SNAPSHOT
9 |
10 | 4.0.0
11 | ${currentProject.version}
12 | service
13 |
14 |
15 | com.ueboot.starter
16 | repository
17 |
18 |
19 |
--------------------------------------------------------------------------------
/sql/ueboot-shiro-3.1.0.sql:
--------------------------------------------------------------------------------
1 | /*
2 | Navicat Premium Data Transfer
3 |
4 | Source Server Type : MySQL
5 | Source Server Version : 80018
6 | Source Schema : action-dev
7 |
8 | Target Server Type : MySQL
9 | Target Server Version : 80018
10 | File Encoding : 65001
11 |
12 | Date: 17/07/2020 18:10:47
13 | */
14 |
15 | SET NAMES utf8mb4;
16 | SET FOREIGN_KEY_CHECKS = 0;
17 |
18 | -- ----------------------------
19 | -- Table structure for operation_log
20 | -- ----------------------------
21 | DROP TABLE IF EXISTS `operation_log`;
22 | CREATE TABLE `operation_log` (
23 | `id` bigint(20) NOT NULL AUTO_INCREMENT,
24 | `created_by` bigint(20) NULL DEFAULT NULL,
25 | `created_date` datetime(6) NULL DEFAULT NULL,
26 | `last_modified_by` bigint(20) NULL DEFAULT NULL,
27 | `last_modified_date` datetime(6) NULL DEFAULT NULL,
28 | `user_id` bigint(20) NULL DEFAULT NULL,
29 | `user_no` bigint(20) NULL DEFAULT NULL,
30 | PRIMARY KEY (`id`) USING BTREE
31 | ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
32 |
33 | -- ----------------------------
34 | -- Records of operation_log
35 | -- ----------------------------
36 |
37 | -- ----------------------------
38 | -- Table structure for sys_organization
39 | -- ----------------------------
40 | DROP TABLE IF EXISTS `sys_organization`;
41 | CREATE TABLE `sys_organization` (
42 | `id` bigint(20) NOT NULL AUTO_INCREMENT,
43 | `created_by` bigint(20) NULL DEFAULT NULL,
44 | `created_date` datetime(0) NULL DEFAULT NULL,
45 | `last_modified_by` bigint(20) NULL DEFAULT NULL,
46 | `last_modified_date` datetime(0) NULL DEFAULT NULL,
47 | `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
48 | `available` bit(1) NULL DEFAULT NULL,
49 | `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
50 | `level` bigint(20) NULL DEFAULT NULL,
51 | `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
52 | `parent_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
53 | `parent_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
54 | `telephone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
55 | `type` enum('机构','部门') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
56 | PRIMARY KEY (`id`) USING BTREE
57 | ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
58 |
59 | -- ----------------------------
60 | -- Records of sys_organization
61 | -- ----------------------------
62 |
63 | -- ----------------------------
64 | -- Table structure for sys_permission
65 | -- ----------------------------
66 | DROP TABLE IF EXISTS `sys_permission`;
67 | CREATE TABLE `sys_permission` (
68 | `id` bigint(20) NOT NULL AUTO_INCREMENT,
69 | `resource_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
70 | `role_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
71 | `created_by` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
72 | `created_date` datetime(0) NULL DEFAULT NULL,
73 | `last_modified_by` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
74 | `last_modified_date` datetime(0) NULL DEFAULT NULL,
75 | `resource_id` bigint(20) NULL DEFAULT NULL,
76 | `role_id` bigint(20) NULL DEFAULT NULL,
77 | PRIMARY KEY (`id`) USING BTREE,
78 | INDEX `FK73ogamir4f5eqt48s14524sdt`(`resource_code`) USING BTREE,
79 | INDEX `FKaoemqa19twbb9o8e5xq6am0c7`(`role_code`) USING BTREE,
80 | INDEX `FKcv8ki936tcaenkg3s8oc8j52n`(`resource_id`) USING BTREE,
81 | INDEX `FKk9ru2110pc5m5ja96jh0dth0j`(`role_id`) USING BTREE,
82 | CONSTRAINT `FKcv8ki936tcaenkg3s8oc8j52n` FOREIGN KEY (`resource_id`) REFERENCES `sys_resources` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
83 | CONSTRAINT `FKk9ru2110pc5m5ja96jh0dth0j` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
84 | ) ENGINE = InnoDB AUTO_INCREMENT = 413 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
85 |
86 | -- ----------------------------
87 | -- Records of sys_permission
88 | -- ----------------------------
89 | INSERT INTO `sys_permission` VALUES (327, NULL, NULL, 'root', '2018-10-15 08:43:27', 'root', '2018-10-15 08:43:27', 3, 5);
90 | INSERT INTO `sys_permission` VALUES (328, NULL, NULL, 'root', '2018-10-15 08:43:27', 'root', '2018-10-15 08:43:27', 4, 5);
91 | INSERT INTO `sys_permission` VALUES (329, NULL, NULL, 'root', '2018-10-15 08:43:27', 'root', '2018-10-15 08:43:27', 9, 5);
92 | INSERT INTO `sys_permission` VALUES (330, NULL, NULL, 'root', '2018-10-15 08:43:27', 'root', '2018-10-15 08:43:27', 10, 5);
93 | INSERT INTO `sys_permission` VALUES (331, NULL, NULL, 'root', '2018-10-15 08:43:27', 'root', '2018-10-15 08:43:27', 20, 5);
94 | INSERT INTO `sys_permission` VALUES (332, NULL, NULL, 'root', '2018-10-15 08:43:27', 'root', '2018-10-15 08:43:27', 21, 5);
95 | INSERT INTO `sys_permission` VALUES (333, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 3, 2);
96 | INSERT INTO `sys_permission` VALUES (334, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 4, 2);
97 | INSERT INTO `sys_permission` VALUES (335, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 8, 2);
98 | INSERT INTO `sys_permission` VALUES (336, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 9, 2);
99 | INSERT INTO `sys_permission` VALUES (337, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 10, 2);
100 | INSERT INTO `sys_permission` VALUES (338, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 20, 2);
101 | INSERT INTO `sys_permission` VALUES (339, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 21, 2);
102 | INSERT INTO `sys_permission` VALUES (340, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 5, 2);
103 | INSERT INTO `sys_permission` VALUES (341, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 11, 2);
104 | INSERT INTO `sys_permission` VALUES (342, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 12, 2);
105 | INSERT INTO `sys_permission` VALUES (343, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 13, 2);
106 | INSERT INTO `sys_permission` VALUES (344, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 22, 2);
107 | INSERT INTO `sys_permission` VALUES (345, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 23, 2);
108 | INSERT INTO `sys_permission` VALUES (346, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 24, 2);
109 | INSERT INTO `sys_permission` VALUES (347, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 6, 2);
110 | INSERT INTO `sys_permission` VALUES (348, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 14, 2);
111 | INSERT INTO `sys_permission` VALUES (349, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 15, 2);
112 | INSERT INTO `sys_permission` VALUES (350, NULL, NULL, 'root', '2018-10-15 08:43:41', 'root', '2018-10-15 08:43:41', 16, 2);
113 | INSERT INTO `sys_permission` VALUES (388, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 3, 1);
114 | INSERT INTO `sys_permission` VALUES (389, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 4, 1);
115 | INSERT INTO `sys_permission` VALUES (390, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 8, 1);
116 | INSERT INTO `sys_permission` VALUES (391, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 9, 1);
117 | INSERT INTO `sys_permission` VALUES (392, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 10, 1);
118 | INSERT INTO `sys_permission` VALUES (393, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 20, 1);
119 | INSERT INTO `sys_permission` VALUES (394, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 21, 1);
120 | INSERT INTO `sys_permission` VALUES (395, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 5, 1);
121 | INSERT INTO `sys_permission` VALUES (396, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 11, 1);
122 | INSERT INTO `sys_permission` VALUES (397, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 12, 1);
123 | INSERT INTO `sys_permission` VALUES (398, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 13, 1);
124 | INSERT INTO `sys_permission` VALUES (399, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 22, 1);
125 | INSERT INTO `sys_permission` VALUES (400, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 23, 1);
126 | INSERT INTO `sys_permission` VALUES (401, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 24, 1);
127 | INSERT INTO `sys_permission` VALUES (402, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 6, 1);
128 | INSERT INTO `sys_permission` VALUES (403, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 14, 1);
129 | INSERT INTO `sys_permission` VALUES (404, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 15, 1);
130 | INSERT INTO `sys_permission` VALUES (405, NULL, NULL, 'root', '2018-10-23 23:38:40', 'root', '2018-10-23 23:38:40', 16, 1);
131 |
132 | -- ----------------------------
133 | -- Table structure for sys_resources
134 | -- ----------------------------
135 | DROP TABLE IF EXISTS `sys_resources`;
136 | CREATE TABLE `sys_resources` (
137 | `id` bigint(20) NOT NULL AUTO_INCREMENT,
138 | `available` bit(1) NULL DEFAULT NULL,
139 | `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
140 | `permission` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
141 | `rank_` bigint(20) NULL DEFAULT NULL,
142 | `resource_type` enum('菜单组','菜单','功能','其他') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
143 | `theme_json` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
144 | `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
145 | `created_by` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
146 | `created_date` datetime(0) NULL DEFAULT NULL,
147 | `last_modified_by` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
148 | `last_modified_date` datetime(0) NULL DEFAULT NULL,
149 | `parent_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
150 | `parent_id` bigint(20) NULL DEFAULT NULL,
151 | PRIMARY KEY (`id`) USING BTREE,
152 | INDEX `FKglxcbhp7kn357vaor242fuj8c`(`parent_id`) USING BTREE,
153 | CONSTRAINT `FKglxcbhp7kn357vaor242fuj8c` FOREIGN KEY (`parent_id`) REFERENCES `sys_resources` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
154 | ) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
155 |
156 | -- ----------------------------
157 | -- Records of sys_resources
158 | -- ----------------------------
159 | INSERT INTO `sys_resources` VALUES (3, b'1', '权限管理', NULL, 1, '菜单组', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
160 | INSERT INTO `sys_resources` VALUES (4, b'1', '用户管理', 'ueboot:user:read', 999, '菜单', NULL, '/ueboot/shiro/User', NULL, NULL, 'root', '2018-09-08 09:55:51', '权限管理', 3);
161 | INSERT INTO `sys_resources` VALUES (5, b'1', '角色管理', 'ueboot:role:read', 998, '菜单', NULL, '/ueboot/shiro/Role', NULL, NULL, 'root', '2018-09-08 09:55:58', '权限管理', 3);
162 | INSERT INTO `sys_resources` VALUES (6, b'1', '资源管理', 'ueboot:resources:read', 997, '菜单', NULL, '/ueboot/shiro/Resources', NULL, NULL, 'root', '2018-09-08 09:56:05', '权限管理', 3);
163 | INSERT INTO `sys_resources` VALUES (8, b'1', '查询', 'ueboot:user:read', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '用户管理', 4);
164 | INSERT INTO `sys_resources` VALUES (9, b'1', '添加与修改', 'ueboot:user:save', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '用户管理', 4);
165 | INSERT INTO `sys_resources` VALUES (10, b'1', '删除', 'ueboot:user:delete', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '用户管理', 4);
166 | INSERT INTO `sys_resources` VALUES (11, b'1', '查询', 'ueboot:role:read', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '角色管理', 5);
167 | INSERT INTO `sys_resources` VALUES (12, b'1', '添加与修改', 'ueboot:role:save', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '角色管理', 5);
168 | INSERT INTO `sys_resources` VALUES (13, b'1', '删除', 'ueboot:role:delete', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '角色管理', 5);
169 | INSERT INTO `sys_resources` VALUES (14, b'1', '查询', 'ueboot:resources:read', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '资源管理', 6);
170 | INSERT INTO `sys_resources` VALUES (15, b'1', '添加与修改', 'ueboot:resources:save', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '资源管理', 6);
171 | INSERT INTO `sys_resources` VALUES (16, b'1', '删除', 'ueboot:resources:delete', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '资源管理', 6);
172 | INSERT INTO `sys_resources` VALUES (20, b'1', '角色查询', 'ueboot:role:read', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '用户管理', 4);
173 | INSERT INTO `sys_resources` VALUES (21, b'1', '分配角色', 'ueboot:userRole:save', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '用户管理', 4);
174 | INSERT INTO `sys_resources` VALUES (22, b'1', '资源列表查询', 'ueboot:resources:read', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '角色管理', 5);
175 | INSERT INTO `sys_resources` VALUES (23, b'1', '权限查询', 'ueboot:userRole:read', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '角色管理', 5);
176 | INSERT INTO `sys_resources` VALUES (24, b'1', '权限分配', 'ueboot:userRole:save', NULL, '功能', NULL, NULL, NULL, NULL, NULL, NULL, '角色管理', 5);
177 | INSERT INTO `sys_resources` VALUES (37, b'1', '钥匙圈', NULL, 1, '菜单组', '{\"fontColor\":\"#FFFFF\"}', NULL, 'root', '2018-12-28 15:17:55', 'root', '2018-12-28 15:17:55', NULL, NULL);
178 |
179 | -- ----------------------------
180 | -- Table structure for sys_role
181 | -- ----------------------------
182 | DROP TABLE IF EXISTS `sys_role`;
183 | CREATE TABLE `sys_role` (
184 | `id` bigint(20) NOT NULL AUTO_INCREMENT,
185 | `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
186 | `created_date` datetime(0) NULL DEFAULT NULL,
187 | `last_modified_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
188 | `last_modified_date` datetime(0) NULL DEFAULT NULL,
189 | `available` bit(1) NULL DEFAULT NULL,
190 | `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
191 | `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
192 | `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
193 | `org_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
194 | `role` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
195 | PRIMARY KEY (`id`) USING BTREE,
196 | UNIQUE INDEX `UK_plpigyqwsqfn7mn66npgf9ftp`(`code`) USING BTREE
197 | ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
198 |
199 | -- ----------------------------
200 | -- Records of sys_role
201 | -- ----------------------------
202 | INSERT INTO `sys_role` VALUES (1, NULL, NULL, NULL, NULL, b'1', NULL, '最高用户权限', '超级管理员', NULL, NULL);
203 | INSERT INTO `sys_role` VALUES (2, NULL, NULL, NULL, NULL, b'1', NULL, NULL, '业务管理员', NULL, NULL);
204 | INSERT INTO `sys_role` VALUES (5, 'root', '2018-10-01 13:01:09', 'root', '2018-10-01 13:01:09', b'1', NULL, 'NAME_TEST', 'NAME_TEST', NULL, NULL);
205 |
206 | -- ----------------------------
207 | -- Table structure for sys_user
208 | -- ----------------------------
209 | DROP TABLE IF EXISTS `sys_user`;
210 | CREATE TABLE `sys_user` (
211 | `id` bigint(20) NOT NULL AUTO_INCREMENT,
212 | `created_by` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
213 | `created_date` datetime(0) NULL DEFAULT NULL,
214 | `last_modified_by` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
215 | `last_modified_date` datetime(0) NULL DEFAULT NULL,
216 | `org_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
217 | `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
218 | `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
219 | `credential_expired_date` datetime(0) NULL DEFAULT NULL,
220 | `is_locked` bit(1) NULL DEFAULT NULL,
221 | `role_names` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
222 | `role_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
223 | `valid` bit(1) NULL DEFAULT NULL COMMENT '是否有效',
224 | PRIMARY KEY (`id`) USING BTREE
225 | ) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
226 |
227 | -- ----------------------------
228 | -- Records of sys_user
229 | -- ----------------------------
230 | INSERT INTO `sys_user` VALUES (1, NULL, NULL, 'root', '2018-10-13 23:50:51', NULL, 'd71e762f824bd6f39c505fa6804a3a20f3dc7e2fd8b4a0a5691bfd5326c061e2d84a0ee306a864955599f92c03840c5db3706a21484e8a0ee35539951e1f042b', 'root', '2021-12-30 14:18:21', b'0', '超级管理员,业务管理员', '1,2,', b'1');
231 | INSERT INTO `sys_user` VALUES (2, NULL, NULL, 'root', '2018-10-13 23:50:46', NULL, 'd02db260d58a26d777bfa1c8dd41b2a0492024e64cd69c3401223dcea60c8b3d2a44276748e0de9e763b630e84ef1a362b8ed370a9849a2346df769a25c3f8f3', 'admin', '2021-01-01 17:42:45', b'0', '', '', b'1');
232 | INSERT INTO `sys_user` VALUES (6, NULL, NULL, NULL, '2018-09-04 20:33:24', NULL, '5c83a5d1967a3d317daeb97a6ec6bd16d508d1f595c6f32acaa24b760556afbbf7565ee87205bf313d0e6956ff6e26121a3a454e155a5cff118f77dc78963730', 'test', '2021-07-29 20:33:24', b'0', '', '', b'1');
233 | INSERT INTO `sys_user` VALUES (7, NULL, '2018-09-04 20:33:13', 'root', '2018-10-13 23:50:28', NULL, '487aa1bb7ee37abe3b4f7c696b7fdc95246b9f3059da58f9b84ee6fe9e294ce02d895b0ef9a78acce65224ff439e042043075b78f1d4c3c26f22b8037982eef1', 'test2', '2021-11-04 20:45:38', b'0', '', '', b'1');
234 | INSERT INTO `sys_user` VALUES (9, 'root', '2018-09-30 18:48:37', 'root', '2018-10-01 13:01:54', NULL, 'c3e12da9af6b5b518ea96e77b313550f40885c73198ac67f0b57b1af90f0f67950b7f32c57180529e18081847c1b4640a459b6358abf6cbe48591119bb1bce19', '111', '2021-11-01 18:48:37', b'0', 'NAME_TEST', '5,', b'1');
235 |
236 | -- ----------------------------
237 | -- Table structure for sys_user_role
238 | -- ----------------------------
239 | DROP TABLE IF EXISTS `sys_user_role`;
240 | CREATE TABLE `sys_user_role` (
241 | `id` bigint(20) NOT NULL AUTO_INCREMENT,
242 | `role_id` bigint(20) NULL DEFAULT NULL,
243 | `user_id` bigint(20) NULL DEFAULT NULL,
244 | `created_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
245 | `created_date` datetime(0) NULL DEFAULT NULL,
246 | `last_modified_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
247 | `last_modified_date` datetime(0) NULL DEFAULT NULL,
248 | PRIMARY KEY (`id`) USING BTREE,
249 | INDEX `FKhh52n8vd4ny9ff4x9fb8v65qx`(`role_id`) USING BTREE,
250 | INDEX `FKb40xxfch70f5qnyfw8yme1n1s`(`user_id`) USING BTREE,
251 | CONSTRAINT `FKb40xxfch70f5qnyfw8yme1n1s` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
252 | CONSTRAINT `FKhh52n8vd4ny9ff4x9fb8v65qx` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
253 | ) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
254 |
255 | -- ----------------------------
256 | -- Records of sys_user_role
257 | -- ----------------------------
258 | INSERT INTO `sys_user_role` VALUES (32, 5, 9, 'root', '2018-10-01 13:01:54', 'root', '2018-10-01 13:01:54');
259 | INSERT INTO `sys_user_role` VALUES (33, 1, 1, 'root', '2018-10-13 23:50:51', 'root', '2018-10-13 23:50:51');
260 | INSERT INTO `sys_user_role` VALUES (34, 2, 1, 'root', '2018-10-13 23:50:51', 'root', '2018-10-13 23:50:51');
261 |
262 | SET FOREIGN_KEY_CHECKS = 1;
263 |
--------------------------------------------------------------------------------