├── fore-end
└── cloud-vue
│ ├── .gitignore
│ ├── config
│ ├── prod.env.js
│ ├── dev.env.js
│ └── index.js
│ ├── src
│ ├── .DS_Store
│ ├── assets
│ │ ├── .DS_Store
│ │ ├── js
│ │ │ ├── .DS_Store
│ │ │ ├── form_com.js
│ │ │ ├── list_com.js
│ │ │ ├── global.js
│ │ │ └── filter.js
│ │ ├── images
│ │ │ ├── bg1.jpg
│ │ │ ├── .DS_Store
│ │ │ ├── logo.png
│ │ │ ├── logo1.png
│ │ │ ├── logo2.png
│ │ │ ├── logo3.png
│ │ │ ├── logo4.png
│ │ │ ├── logo5.png
│ │ │ ├── logout_16.png
│ │ │ ├── logout_24.png
│ │ │ └── logout_36.png
│ │ ├── plugins
│ │ │ └── .DS_Store
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ │ └── css
│ │ │ └── base.css
│ ├── vuex
│ │ ├── getters.js
│ │ ├── state.js
│ │ ├── store.js
│ │ ├── mutations.js
│ │ └── actions.js
│ ├── components
│ │ ├── .DS_Store
│ │ ├── Common
│ │ │ ├── .DS_Store
│ │ │ ├── leftMenu.vue
│ │ │ └── btn-group.vue
│ │ ├── Administrative
│ │ │ ├── .DS_Store
│ │ │ ├── system
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── rule
│ │ │ │ │ ├── .DS_Store
│ │ │ │ │ ├── add.vue
│ │ │ │ │ ├── list.vue
│ │ │ │ │ └── edit.vue
│ │ │ │ ├── config
│ │ │ │ │ └── preview.vue
│ │ │ │ └── menu
│ │ │ │ │ ├── rule.vue
│ │ │ │ │ ├── list.vue
│ │ │ │ │ └── add.vue
│ │ │ ├── personnel
│ │ │ │ ├── .DS_Store
│ │ │ │ └── users
│ │ │ │ │ └── .DS_Store
│ │ │ └── structures
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── groups
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── list.vue
│ │ │ │ └── add.vue
│ │ │ │ ├── position
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── add.vue
│ │ │ │ ├── edit.vue
│ │ │ │ └── list.vue
│ │ │ │ └── structures
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── add.vue
│ │ │ │ ├── edit.vue
│ │ │ │ └── list.vue
│ │ ├── refresh.vue
│ │ └── Account
│ │ │ └── changePwd.vue
│ ├── App.vue
│ └── main.js
│ ├── .babelrc
│ ├── index.html
│ ├── build
│ ├── dev-client.js
│ ├── build.js
│ ├── webpack.dev.conf.js
│ ├── check-versions.js
│ ├── utils.js
│ ├── dev-server.js
│ ├── webpack.base.conf.js
│ └── webpack.prod.conf.js
│ ├── .eslintrc.json
│ ├── README.md
│ └── package.json
├── back-end
└── cloud-vue-parent
│ ├── cloud-config-server
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ ├── docker
│ │ │ └── Dockerfile
│ │ │ ├── resources
│ │ │ └── application.properties
│ │ │ └── java
│ │ │ └── cloud
│ │ │ └── config
│ │ │ └── server
│ │ │ └── ConfigServerApplication.java
│ └── pom.xml
│ ├── cloud-zipkin-ui
│ ├── .gitignore
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── static
│ │ │ ├── favicon.ico
│ │ │ ├── user-page.html
│ │ │ ├── js
│ │ │ │ └── app.js
│ │ │ └── index.html
│ │ ├── log4j.properties
│ │ ├── bootstrap.properties
│ │ └── mysql_init.sql
│ │ ├── docker
│ │ └── Dockerfile
│ │ └── java
│ │ └── cloud
│ │ └── zipkin
│ │ └── ZipkinServerApplication.java
│ ├── cloud-eureka-server
│ ├── .gitignore
│ └── src
│ │ └── main
│ │ ├── docker
│ │ └── Dockerfile
│ │ ├── java
│ │ └── cloud
│ │ │ └── eureka
│ │ │ └── server
│ │ │ └── EurekaServerApplication.java
│ │ └── resources
│ │ └── application.properties
│ ├── .gitignore
│ ├── cloud-simple-service
│ ├── .gitignore
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── META-INF
│ │ │ ├── spring-devtools.properties
│ │ │ └── spring.factories
│ │ ├── static
│ │ │ └── 1.png
│ │ ├── mappers
│ │ │ ├── SysAdminAccessDao.xml
│ │ │ ├── SysAdminStructureDao.xml
│ │ │ ├── SysAdminPostDao.xml
│ │ │ ├── SysSystemConfigDao.xml
│ │ │ ├── SysAdminRuleDao.xml
│ │ │ ├── SysAdminGroupDao.xml
│ │ │ ├── SysAdminUserDao.xml
│ │ │ └── SysAdminMenuDao.xml
│ │ ├── bootstrap.properties
│ │ ├── application.properties
│ │ └── logback-spring.xml
│ │ ├── java
│ │ └── cloud
│ │ │ └── simple
│ │ │ └── service
│ │ │ ├── base
│ │ │ ├── BaseDao.java
│ │ │ ├── BaseEntity.java
│ │ │ └── BaseService.java
│ │ │ ├── dao
│ │ │ ├── SysAdminPostDao.java
│ │ │ ├── SysAdminUserDao.java
│ │ │ ├── SysAdminAccessDao.java
│ │ │ ├── SysSystemConfigDao.java
│ │ │ ├── SysAdminStructureDao.java
│ │ │ ├── SysAdminRuleDao.java
│ │ │ ├── SysAdminGroupDao.java
│ │ │ └── SysAdminMenuDao.java
│ │ │ ├── util
│ │ │ ├── MyMapper.java
│ │ │ ├── UploadUtils.java
│ │ │ ├── TreeBuilder.java
│ │ │ ├── TreeUtil.java
│ │ │ ├── Category.java
│ │ │ └── BeanToMapUtil.java
│ │ │ ├── contants
│ │ │ └── Constant.java
│ │ │ ├── domain
│ │ │ ├── SysSystemConfigService.java
│ │ │ ├── SysAdminAccessService.java
│ │ │ ├── SysAdminPostService.java
│ │ │ ├── SysAdminGroupService.java
│ │ │ ├── SysAdminStructureService.java
│ │ │ └── SysAdminUserService.java
│ │ │ ├── CloundServiceApplication.java
│ │ │ ├── model
│ │ │ ├── SysAdminAccess.java
│ │ │ ├── SysAdminStructure.java
│ │ │ ├── SysAdminGroup.java
│ │ │ ├── SysSystemConfig.java
│ │ │ ├── SysAdminPost.java
│ │ │ ├── SysAdminRule.java
│ │ │ └── SysAdminUser.java
│ │ │ ├── conf
│ │ │ ├── CaptchaConfig.java
│ │ │ ├── Swagger2Config.java
│ │ │ ├── DruidAutoConfiguration.java
│ │ │ ├── DruidProperties.java
│ │ │ └── WebMvcConfig.java
│ │ │ ├── web
│ │ │ ├── CommonController.java
│ │ │ ├── SysConfigController.java
│ │ │ └── UploadController.java
│ │ │ ├── dto
│ │ │ └── TreeNode.java
│ │ │ └── interceptor
│ │ │ └── LoginInterceptor.java
│ │ └── docker
│ │ └── Dockerfile
│ ├── cloud-config-repo
│ ├── cloud-config-dev.properties
│ └── cloud-config-test.properties
│ └── pom.xml
├── pic
├── 二维码.jpg
├── 岗位管理.png
├── 注册中心.png
├── 登录.png
├── 菜单管理.png
├── 部门管理.png
├── zipkin.png
├── 权限规则管理.png
├── 用户组管理.png
└── swagger.png
└── readme.md
/fore-end/cloud-vue/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | node_modules
3 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-config-server/.gitignore:
--------------------------------------------------------------------------------
1 | target
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-eureka-server/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/pic/二维码.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/二维码.jpg
--------------------------------------------------------------------------------
/pic/岗位管理.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/岗位管理.png
--------------------------------------------------------------------------------
/pic/注册中心.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/注册中心.png
--------------------------------------------------------------------------------
/pic/登录.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/登录.png
--------------------------------------------------------------------------------
/pic/菜单管理.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/菜单管理.png
--------------------------------------------------------------------------------
/pic/部门管理.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/部门管理.png
--------------------------------------------------------------------------------
/pic/zipkin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/zipkin.png
--------------------------------------------------------------------------------
/pic/权限规则管理.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/权限规则管理.png
--------------------------------------------------------------------------------
/pic/用户组管理.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/用户组管理.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/pic/swagger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/pic/swagger.png
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/.gitignore:
--------------------------------------------------------------------------------
1 | .settings
2 | .classpath
3 | .project
4 | *.class
5 | target
6 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015", "stage-3"],
3 | "plugins": ["transform-runtime"],
4 | "comments": false
5 | }
6 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/vuex/getters.js:
--------------------------------------------------------------------------------
1 | const getters = {
2 | // getCount: state => state.count,
3 | }
4 |
5 | export default getters
6 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/js/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/js/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/bg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/bg1.jpg
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/.DS_Store
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Package Files #
4 | *.jar
5 | *.war
6 | *.ear
7 | target
8 | /.apt_generated/
9 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logo.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logo1.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logo2.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logo3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logo3.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logo4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logo4.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logo5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logo5.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/plugins/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/plugins/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logout_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logout_16.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logout_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logout_24.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/images/logout_36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/images/logout_36.png
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Common/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Common/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/assets/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/js/form_com.js:
--------------------------------------------------------------------------------
1 | const formMixin = {
2 | methods: {
3 | goback() {
4 | router.go(-1)
5 | }
6 | }
7 | }
8 |
9 | export default formMixin
10 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/system/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/system/.DS_Store
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/META-INF/spring-devtools.properties:
--------------------------------------------------------------------------------
1 | restart.include.mapper=/mapper-[\\w-\\.]+jar
2 | restart.include.pagehelper=/pagehelper-[\\w-\\.]+jar
--------------------------------------------------------------------------------
/fore-end/cloud-vue/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/personnel/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/personnel/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/structures/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/structures/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/system/rule/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/system/rule/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/personnel/users/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/personnel/users/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/structures/groups/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/structures/groups/.DS_Store
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/static/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/static/1.png
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/resources/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/resources/static/favicon.ico
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/resources/static/user-page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 | {{item.username}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/structures/position/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/structures/position/.DS_Store
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/structures/structures/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OptionalDay/spring-cloud-vue/HEAD/fore-end/cloud-vue/src/components/Administrative/structures/structures/.DS_Store
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | # Auto Configure
2 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3 | cloud.simple.service.conf.DruidAutoConfiguration
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/base/BaseDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.base;
2 |
3 |
4 | import tk.mybatis.mapper.common.Mapper;
5 |
6 | @SuppressWarnings("rawtypes")
7 | public interface BaseDao extends Mapper{
8 | }
9 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/vuex/state.js:
--------------------------------------------------------------------------------
1 | const state = {
2 | showLeftMenu: true,
3 | globalLoading: true,
4 | menus: [],
5 | rules: [],
6 | users: {},
7 | userGroups: [],
8 | organizes: [],
9 | authKey: "",
10 | sessionId: ""
11 | }
12 |
13 | export default state
14 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue element admin
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysAdminPostDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import cloud.simple.service.model.SysAdminPost;
4 | import cloud.simple.service.util.MyMapper;
5 |
6 | public interface SysAdminPostDao extends MyMapper {
7 | }
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysAdminUserDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import cloud.simple.service.model.SysAdminUser;
4 | import cloud.simple.service.util.MyMapper;
5 |
6 | public interface SysAdminUserDao extends MyMapper {
7 | }
--------------------------------------------------------------------------------
/fore-end/cloud-vue/build/dev-client.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | require('eventsource-polyfill')
3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
4 |
5 | hotClient.subscribe(function (event) {
6 | if (event.action === 'reload') {
7 | window.location.reload()
8 | }
9 | })
10 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysAdminAccessDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import cloud.simple.service.model.SysAdminAccess;
4 | import cloud.simple.service.util.MyMapper;
5 |
6 | public interface SysAdminAccessDao extends MyMapper {
7 | }
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysSystemConfigDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import cloud.simple.service.model.SysSystemConfig;
4 | import cloud.simple.service.util.MyMapper;
5 |
6 | public interface SysSystemConfigDao extends MyMapper {
7 | }
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/refresh.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysAdminStructureDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import cloud.simple.service.model.SysAdminStructure;
4 | import cloud.simple.service.util.MyMapper;
5 |
6 | public interface SysAdminStructureDao extends MyMapper {
7 | }
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/vuex/store.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | Vue.use(Vuex)
4 | import state from './state'
5 | import mutations from './mutations'
6 | import getters from './getters'
7 | import actions from './actions'
8 | export default new Vuex.Store({
9 | state,
10 | mutations,
11 | getters,
12 | actions
13 | })
14 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/util/MyMapper.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.util;
2 |
3 | import tk.mybatis.mapper.common.Mapper;
4 | import tk.mybatis.mapper.common.MySqlMapper;
5 |
6 |
7 | /**
8 | * 继承自己的MyMapper
9 | *特别注意,该接口不能被扫描到,否则会出错
10 | */
11 | public interface MyMapper extends Mapper, MySqlMapper {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM java:8
2 |
3 | VOLUME /tmp
4 |
5 | ADD @project.build.finalName@.jar @project.build.finalName@.jar
6 |
7 | RUN sh -c 'touch /@project.build.finalName@.jar'
8 |
9 | ENV JAVA_OPTS=""
10 |
11 | CMD exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=docker -jar /@project.build.finalName@.jar
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-config-server/src/main/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM java:8
2 |
3 | VOLUME /tmp
4 |
5 | ADD @project.build.finalName@.jar @project.build.finalName@.jar
6 |
7 | RUN sh -c 'touch /@project.build.finalName@.jar'
8 |
9 | ENV JAVA_OPTS=""
10 |
11 | CMD exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=docker -jar /@project.build.finalName@.jar
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-eureka-server/src/main/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM java:8
2 |
3 | VOLUME /tmp
4 |
5 | ADD @project.build.finalName@.jar @project.build.finalName@.jar
6 |
7 | RUN sh -c 'touch /@project.build.finalName@.jar'
8 |
9 | ENV JAVA_OPTS=""
10 |
11 | CMD exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=docker -jar /@project.build.finalName@.jar
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM java:8
2 |
3 | VOLUME /tmp
4 |
5 | ADD @project.build.finalName@.jar @project.build.finalName@.jar
6 |
7 | RUN sh -c 'touch /@project.build.finalName@.jar'
8 |
9 | ENV JAVA_OPTS=""
10 |
11 | CMD exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=docker -jar /@project.build.finalName@.jar
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/resources/static/js/app.js:
--------------------------------------------------------------------------------
1 | angular.module('users', ['ngRoute']).config(function ($routeProvider) {
2 | $routeProvider.when('/', {
3 | templateUrl: 'user-page.html',
4 | controller: 'userCtr'
5 | })
6 | }).controller('userCtr', function ($scope, $http) {
7 | $http.get('users').success(function (data) {
8 | //alert(data+"");
9 | $scope.userList = data;
10 | });
11 | });
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-config-server/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=1111
2 | #spring.cloud.config.server.git.uri=https://git.oschina.net/zhou666/spring-cloud-7simple.git
3 | #spring.cloud.config.server.git.searchPaths=cloud-config-repo
4 | spring.application.name=cloud-config-server
5 | spring.cloud.config.server.native.searchLocations=../cloud-config-repo
6 | spring.profiles.active=native
7 | eureka.instance.hostname=localhost
8 | eureka.client.serviceUrl.defaultZone=http\://${eureka.instance.hostname}\:8888/eureka/
9 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Administrative/system/config/preview.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-config-repo/cloud-config-dev.properties:
--------------------------------------------------------------------------------
1 | # ===================================================================
2 | # framework specific properties
3 | # ===================================================================
4 |
5 | # datasource
6 | druid.url=jdbc:mysql://localhost:3306/cloud-vue?useUnicode=true&characterEncoding=utf8&useSSL=false
7 | druid.driver-class=com.mysql.jdbc.Driver
8 | druid.username=root
9 | druid.password=root
10 | druid.initial-size=1
11 | druid.min-idle=1
12 | druid.max-active=20
13 | druid.test-on-borrow=true
14 |
15 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-config-repo/cloud-config-test.properties:
--------------------------------------------------------------------------------
1 | # ===================================================================
2 | # framework specific properties
3 | # ===================================================================
4 |
5 | # datasource
6 | druid.url=jdbc:mysql://localhost:3306/cloud-vue?useUnicode=true&characterEncoding=utf8&useSSL=false
7 | druid.driver-class=com.mysql.jdbc.Driver
8 | druid.username=root
9 | druid.password=root
10 | druid.initial-size=1
11 | druid.min-idle=1
12 | druid.max-active=20
13 | druid.test-on-borrow=true
14 |
15 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysAdminRuleDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import cloud.simple.service.model.SysAdminRule;
8 | import cloud.simple.service.util.MyMapper;
9 |
10 | public interface SysAdminRuleDao extends MyMapper {
11 |
12 | List selectInIds(@Param("ruleIds") String ruleIds,@Param("status") Integer status);
13 |
14 | List selectByStatus(@Param("status") Integer status);
15 | }
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-eureka-server/src/main/java/cloud/eureka/server/EurekaServerApplication.java:
--------------------------------------------------------------------------------
1 | package cloud.eureka.server;
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication;
4 | import org.springframework.boot.builder.SpringApplicationBuilder;
5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
6 |
7 | @SpringBootApplication
8 | @EnableEurekaServer
9 | public class EurekaServerApplication {
10 | public static void main(String[] args) {
11 | new SpringApplicationBuilder(EurekaServerApplication.class).web(true).run(args);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/contants/Constant.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.contants;
2 | /**
3 | * 常量类
4 | *
5 | */
6 | public class Constant {
7 | //授权key
8 | public final static String AUTH_KEY = "authKey";
9 | //sessoinid
10 | public final static String SESSION_ID = "sessionId";
11 | //登录用户对象
12 | public final static String LOGIN_ADMIN_USER = "login_admin_user";
13 | //安全密匙
14 | public static String SECRET_KEY = "#rSgRKVunlLUMopFWbEevOy9";
15 | //菜单分类ICON
16 | public final static String[] ICON = new String[] {" │"," ├─"," └─"};
17 | }
18 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysAdminGroupDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import cloud.simple.service.model.SysAdminGroup;
8 | import cloud.simple.service.util.MyMapper;
9 |
10 | public interface SysAdminGroupDao extends MyMapper {
11 | /**
12 | * 查询分组信息
13 | * @param userId 用户ID
14 | * @param status 状态
15 | * @return
16 | */
17 | List selectByUserId(@Param("userId") Integer userId,@Param("status") Byte status);
18 | }
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/mappers/SysAdminAccessDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/vuex/mutations.js:
--------------------------------------------------------------------------------
1 | const mutations = {
2 | showLeftMenu(state, status) {
3 | state.showLeftMenu = status
4 | },
5 | showLoading(state, status) {
6 | state.globalLoading = status
7 | },
8 | setMenus(state, menus) {
9 | state.menus = menus
10 | },
11 | setRules(state, rules) {
12 | state.rules = rules
13 | },
14 | setUsers(state, users) {
15 | state.users = users
16 | },
17 | setUserGroups(state, userGroups) {
18 | state.userGroups = userGroups
19 | },
20 | setOrganizes(state, organizes) {
21 | state.organizes = organizes
22 | }
23 | }
24 |
25 | export default mutations
26 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/dao/SysAdminMenuDao.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.dao;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.ibatis.annotations.Param;
6 |
7 | import cloud.simple.service.model.SysAdminMenu;
8 | import cloud.simple.service.util.MyMapper;
9 |
10 | public interface SysAdminMenuDao extends MyMapper {
11 | /**
12 | * 根据ruleIds查询菜单信息
13 | * @param ruleIds 权限id
14 | * @param status 状态值
15 | * @return List
16 | */
17 | List selectInRuleIds(@Param("ruleIds") String ruleIds, @Param("status") int status);
18 | }
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/vuex/actions.js:
--------------------------------------------------------------------------------
1 | const actions = {
2 | showLeftMenu ({ commit }, status) {
3 | commit('showLeftMenu', status)
4 | },
5 | showLoading ({ commit }, status) {
6 | commit('showLoading', status)
7 | },
8 | setMenus({ commit }, menus) {
9 | commit('setMenus', menus)
10 | },
11 | setRules({ commit }, rules) {
12 | commit('setRules', rules)
13 | },
14 | setUsers({ commit }, users) {
15 | commit('setUsers', users)
16 | },
17 | setUserGroups({ commit }, userGroups) {
18 | commit('setUserGroups', userGroups)
19 | },
20 | setOrganizes({ commit }, organizes) {
21 | commit('setOrganizes', organizes)
22 | }
23 | }
24 |
25 | export default actions
26 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/mappers/SysAdminStructureDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/bootstrap.properties:
--------------------------------------------------------------------------------
1 | server.port=80
2 |
3 | spring.cloud.config.profile=dev
4 | spring.cloud.config.uri=http://${cofig.host:localhost}:${config.port:1111}
5 | spring.cloud.config.name=cloud-config
6 | #${config.profile:dev}
7 | #service discovery url
8 | eureka.client.serviceUrl.defaultZone=http\://${eureka.host:localhost}\:${eureka.port:8888}/eureka/
9 | #service name
10 | spring.application.name=cloud-simple-service
11 |
12 | #spring profiles
13 | spring.profiles.active=dev
14 | spring.profiles.include=swagger
15 | #spring devtools
16 | spring.devtools.restart.enabled=false
17 | spring.devtools.livereload.enabled=false
18 |
19 | #zipkin
20 | spring.zipkin.base-url=http://localhost:9012
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootCategory=INFO, CONSOLE
2 |
3 | PID=????
4 | LOG_PATTERN=[%d{yyyy-MM-dd HH:mm:ss.SSS}] log4j%X{context} - ${PID} %5p [%t] --- %c{1}: %m%n
5 |
6 | # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
7 | log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
8 | log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
9 | log4j.appender.CONSOLE.layout.ConversionPattern=${LOG_PATTERN}
10 |
11 | log4j.category.org.hibernate.validator.internal.util.Version=INFO
12 | log4j.category.org.apache.coyote.http11.Http11NioProtocol=INFO
13 | log4j.category.org.apache.tomcat.util.net.NioSelectorPool=INFO
14 | log4j.category.org.apache.catalina.startup.DigesterFactory=INFO
15 | log4j.logger.org.apache=INFO
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/domain/SysSystemConfigService.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.domain;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Service;
5 |
6 | import cloud.simple.service.base.BaseServiceImpl;
7 | import cloud.simple.service.dao.SysSystemConfigDao;
8 | import cloud.simple.service.model.SysSystemConfig;
9 | import tk.mybatis.mapper.common.Mapper;
10 | @Service
11 | public class SysSystemConfigService extends BaseServiceImpl{
12 | @Autowired
13 | private SysSystemConfigDao sysSystemConfigDao;
14 |
15 | @Override
16 | public Mapper getMapper() {
17 | return sysSystemConfigDao;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/domain/SysAdminAccessService.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.domain;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Service;
5 |
6 | import cloud.simple.service.base.BaseServiceImpl;
7 | import cloud.simple.service.dao.SysAdminAccessDao;
8 | import cloud.simple.service.model.SysAdminAccess;
9 | import tk.mybatis.mapper.common.Mapper;
10 |
11 | @Service
12 | public class SysAdminAccessService extends BaseServiceImpl{
13 |
14 | @Autowired
15 | private SysAdminAccessDao sysAdminAccessDao;
16 |
17 | @Override
18 | public Mapper getMapper() {
19 | return sysAdminAccessDao;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-eureka-server/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8888
2 | eureka.instance.hostname=localhost
3 | eureka.client.registerWithEureka=false
4 | eureka.client.fetchRegistry=false
5 | eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
6 | spring.application.name=cloud-eureka-server
7 | #renew\u9891\u7387\uff0c\u5411Eureka\u670d\u52a1\u53d1\u9001renew\u4fe1\u606f\uff0c\u9ed8\u8ba430\u79d2
8 | eureka.instance.leaseRenewalIntervalInSeconds=10
9 | #\u670d\u52a1\u5931\u6548\u65f6\u95f4\uff0cEureka\u591a\u957f\u65f6\u95f4\u6ca1\u6536\u5230\u670d\u52a1\u7684renew\u64cd\u4f5c\uff0c\u5c31\u5254\u9664\u8be5\u670d\u52a1\uff0c\u9ed8\u8ba490\u79d2
10 | eureka.instance.leaseExpirationDurationInSeconds=15
11 | #manager url:http://localhost:8761/
12 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/mappers/SysAdminPostDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/mappers/SysSystemConfigDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "extends": "vue",
4 | "env": {
5 | "browser": true,
6 | "es6": true
7 | },
8 | "parserOptions": {
9 | "sourceType": "module"
10 | },
11 | "rules": {
12 | "linebreak-style": ["error", "unix"], // 换行风格
13 | "quotes": [1, "single"], // 引号类型:使用单引号
14 | "semi": ["error", "never"], // 禁止分号作为语句结尾
15 | "eqeqeq": 0, // 关闭强制使用 '===' 和 '!==' 来做判断比较
16 | "no-unused-vars": 0, // 关闭强制 声明未使用变量
17 | "space-before-function-paren": 0, // 关闭函数名后的空格
18 | "prefer-const": 0, // 关闭首选const
19 | "no-undef": 0, // 关闭不能使用未定义变量
20 | "camelcase": 0
21 | }
22 | }
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-config-server/src/main/java/cloud/config/server/ConfigServerApplication.java:
--------------------------------------------------------------------------------
1 | package cloud.config.server;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
6 | import org.springframework.cloud.config.server.EnableConfigServer;
7 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
8 | import org.springframework.context.annotation.Configuration;
9 |
10 | @Configuration
11 | @EnableAutoConfiguration
12 | @EnableEurekaClient
13 | //@EnableDiscoveryClient
14 | @EnableConfigServer
15 | public class ConfigServerApplication {
16 |
17 | public static void main(String[] args) {
18 | SpringApplication.run(ConfigServerApplication.class, args);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/js/list_com.js:
--------------------------------------------------------------------------------
1 | const listMixin = {
2 | data() {
3 | return {
4 | currentPage: null, // 分页当前页
5 | keywords: '', // 关键字搜索
6 | multipleSelection: [], // 列表当前已勾选项
7 | limit: 15, // 每页数据数目
8 | dataCount: 0
9 | }
10 | },
11 | methods: {
12 | selectItem(val) {
13 | this.multipleSelection = val
14 | },
15 | getCurrentPage() {
16 | let data = this.$route.query
17 | if (data) {
18 | if (data.page) {
19 | this.currentPage = parseInt(data.page)
20 | } else {
21 | this.currentPage = 1
22 | }
23 | }
24 | },
25 | getKeywords() {
26 | let data = this.$route.query
27 | if (data) {
28 | if (data.keywords) {
29 | this.keywords = data.keywords
30 | } else {
31 | this.keywords = ''
32 | }
33 | }
34 | }
35 | }
36 | }
37 |
38 | export default listMixin
39 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/build/build.js:
--------------------------------------------------------------------------------
1 | // https://github.com/shelljs/shelljs
2 | require('./check-versions')()
3 | require('shelljs/global')
4 | env.NODE_ENV = 'production'
5 |
6 | var path = require('path')
7 | var config = require('../config')
8 | var ora = require('ora')
9 | var webpack = require('webpack')
10 | var webpackConfig = require('./webpack.prod.conf')
11 |
12 | console.log(
13 | ' Tip:\n' +
14 | ' Built files are meant to be served over an HTTP server.\n' +
15 | ' Opening index.html over file:// won\'t work.\n'
16 | )
17 |
18 | var spinner = ora('building for production...')
19 | spinner.start()
20 |
21 | var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
22 | rm('-rf', assetsPath)
23 | mkdir('-p', assetsPath)
24 | cp('-R', 'static/*', assetsPath)
25 |
26 | webpack(webpackConfig, function (err, stats) {
27 | spinner.stop()
28 | if (err) throw err
29 | process.stdout.write(stats.toString({
30 | colors: true,
31 | modules: false,
32 | children: false,
33 | chunks: false,
34 | chunkModules: false
35 | }) + '\n')
36 | })
37 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/resources/bootstrap.properties:
--------------------------------------------------------------------------------
1 | server.port=9012
2 | #spring cloud config
3 | spring.cloud.config.uri=http://127.0.0.1:${config.port:1111}
4 | spring.cloud.config.name=cloud-config
5 | spring.cloud.config.profile=${config.profile:dev}
6 | eureka.client.serviceUrl.defaultZone=http\://localhost\:8888/eureka/
7 | #service name config
8 | spring.application.name=cloud-zipkin-ui
9 | #ribbon config
10 | cloud-simple-service.ribbon.ConnectTimeout=5000
11 | cloud-simple-service.ribbon.ReadTimeout=10000
12 |
13 | #spring profiles
14 | spring.profiles.active=dev
15 |
16 | spring.datasource.schema=classpath:/mysql_init.sql.sql
17 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver
18 | spring.datasource.type: com.alibaba.druid.pool.DruidDataSource
19 | spring.datasource.url: jdbc:mysql://localhost:3306/zipkin
20 | spring.datasource.username=root
21 | spring.datasource.password=root
22 | spring.datasource.initialize=true
23 | spring.datasource.continueOnError=true
24 |
25 | #spring.sleuth.enabled: false
26 |
27 | # zipkin config
28 | zipkin.storage.type=mysql
29 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | logging.level.tk.mybatis=TRACE
2 | logging.level.com.framework=TRACE
3 |
4 | pagehelper.helperDialect=mysql
5 | pagehelper.reasonable=true
6 | pagehelper.supportMethodsArguments=true
7 | pagehelper.reasonable=true
8 | pagehelper.params=count=countSql
9 |
10 | mybatis.type-aliases-package=cloud.simple.service.model
11 | mybatis.mapper-locations=classpath*:/mappers/**.xml
12 | mapper.mappers=cloud.simple.service.util.MyMapper
13 | mapper.not-empty=true
14 | mapper.identity=MYSQL
15 | mybatis.configuration.mapUnderscoreToCamelCase=true
16 |
17 | #\u9ed8\u8ba4\u652f\u6301\u6587\u4ef6\u4e0a\u4f20.
18 | spring.http.multipart.enabled=true
19 | #\u652f\u6301\u6587\u4ef6\u5199\u5165\u78c1\u76d8.
20 | spring.http.multipart.file-size-threshold=0
21 | # \u4e0a\u4f20\u6587\u4ef6\u7684\u4e34\u65f6\u76ee\u5f55
22 | spring.http.multipart.location=D:/test
23 | # \u6700\u5927\u652f\u6301\u6587\u4ef6\u5927\u5c0f
24 | spring.http.multipart.max-file-size=1Mb
25 | # \u6700\u5927\u652f\u6301\u8bf7\u6c42\u5927\u5c0f
26 | spring.http.multipart.max-request-size=10Mb
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/CloundServiceApplication.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service;
2 |
3 | import org.mybatis.spring.annotation.MapperScan;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
7 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
8 | import org.springframework.context.annotation.Configuration;
9 | import org.springframework.stereotype.Controller;
10 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
11 |
12 | @Controller
13 | @Configuration
14 | @EnableDiscoveryClient
15 | @SpringBootApplication
16 | @EnableEurekaClient
17 | //@EnableWebMvc
18 | @MapperScan(basePackages={"cloud.simple.service.dao","com.framework.common.base"})
19 | public class CloundServiceApplication extends WebMvcConfigurerAdapter {
20 |
21 | public static void main(String[] args) {
22 | SpringApplication.run(CloundServiceApplication.class, args);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/model/SysAdminAccess.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.model;
2 |
3 | import javax.persistence.Column;
4 | import javax.persistence.Table;
5 |
6 | import cloud.simple.service.base.BaseEntity;
7 |
8 | @Table(name = "`sys_admin_access`")
9 | public class SysAdminAccess extends BaseEntity {
10 | private static final long serialVersionUID = 7046525700737221455L;
11 |
12 | @Column(name = "`user_id`")
13 | private Integer userId;
14 |
15 | @Column(name = "`group_id`")
16 | private Integer groupId;
17 |
18 | /**
19 | * @return user_id
20 | */
21 | public Integer getUserId() {
22 | return userId;
23 | }
24 |
25 | /**
26 | * @param userId
27 | */
28 | public void setUserId(Integer userId) {
29 | this.userId = userId;
30 | }
31 |
32 | /**
33 | * @return group_id
34 | */
35 | public Integer getGroupId() {
36 | return groupId;
37 | }
38 |
39 | /**
40 | * @param groupId
41 | */
42 | public void setGroupId(Integer groupId) {
43 | this.groupId = groupId;
44 | }
45 | }
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/mappers/SysAdminRuleDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/mappers/SysAdminGroupDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/domain/SysAdminPostService.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.domain;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.commons.lang3.StringUtils;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.stereotype.Service;
8 |
9 | import cloud.simple.service.base.BaseServiceImpl;
10 | import cloud.simple.service.model.SysAdminPost;
11 | import tk.mybatis.mapper.common.Mapper;
12 | import tk.mybatis.mapper.entity.Example;
13 | import tk.mybatis.mapper.entity.Example.Criteria;
14 | @Service
15 | public class SysAdminPostService extends BaseServiceImpl{
16 |
17 | @Autowired
18 | private Mapper sysAdminPostDao;
19 |
20 | @Override
21 | public Mapper getMapper() {
22 | return sysAdminPostDao;
23 | }
24 |
25 | public List getDataList(String name) {
26 | Example example = new Example(SysAdminPost.class,false);
27 | Criteria criteria = example.createCriteria();
28 | if(StringUtils.isNotBlank(name)){
29 | criteria.andLike("name", name);
30 | }
31 | return sysAdminPostDao.selectByExample(example);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | var config = require('../config')
2 | var webpack = require('webpack')
3 | var merge = require('webpack-merge')
4 | var utils = require('./utils')
5 | var baseWebpackConfig = require('./webpack.base.conf')
6 | var HtmlWebpackPlugin = require('html-webpack-plugin')
7 |
8 | // add hot-reload related code to entry chunks
9 | Object.keys(baseWebpackConfig.entry).forEach(function (name) {
10 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
11 | })
12 |
13 | module.exports = merge(baseWebpackConfig, {
14 | module: {
15 | loaders: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
16 | },
17 | // eval-source-map is faster for development
18 | devtool: '#eval-source-map',
19 | plugins: [
20 | new webpack.DefinePlugin({
21 | 'process.env': config.dev.env
22 | }),
23 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
24 | new webpack.optimize.OccurenceOrderPlugin(),
25 | new webpack.HotModuleReplacementPlugin(),
26 | new webpack.NoErrorsPlugin(),
27 | // https://github.com/ampedandwired/html-webpack-plugin
28 | new HtmlWebpackPlugin({
29 | filename: 'index.html',
30 | template: 'index.html',
31 | inject: true
32 | })
33 | ]
34 | })
35 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-zipkin-ui/src/main/java/cloud/zipkin/ZipkinServerApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2020 the original author or authors.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * @author lzhoumail@126.com/zhouli
5 | * Git http://git.oschina.net/zhou666/spring-cloud-7simple
6 | */
7 |
8 | package cloud.zipkin;
9 |
10 | import org.springframework.boot.autoconfigure.SpringBootApplication;
11 | import org.springframework.boot.builder.SpringApplicationBuilder;
12 | import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
13 | import org.springframework.cloud.client.loadbalancer.LoadBalanced;
14 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
15 | import org.springframework.context.annotation.Bean;
16 | import org.springframework.web.client.RestTemplate;
17 |
18 | import zipkin.server.EnableZipkinServer;
19 |
20 |
21 | @SpringBootApplication
22 | @EnableEurekaClient
23 | @EnableCircuitBreaker
24 | @EnableZipkinServer
25 | public class ZipkinServerApplication {
26 |
27 | public static void main(String[] args) throws Exception {
28 | new SpringApplicationBuilder(ZipkinServerApplication.class).web(true).run(args);
29 | }
30 |
31 | @LoadBalanced
32 | @Bean
33 | RestTemplate restTemplate() {
34 | return new RestTemplate();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/build/check-versions.js:
--------------------------------------------------------------------------------
1 | var semver = require('semver')
2 | var chalk = require('chalk')
3 | var packageConfig = require('../package.json')
4 | var exec = function (cmd) {
5 | return require('child_process')
6 | .execSync(cmd).toString().trim()
7 | }
8 |
9 | var versionRequirements = [
10 | {
11 | name: 'node',
12 | currentVersion: semver.clean(process.version),
13 | versionRequirement: packageConfig.engines.node
14 | },
15 | {
16 | name: 'npm',
17 | currentVersion: exec('npm --version'),
18 | versionRequirement: packageConfig.engines.npm
19 | }
20 | ]
21 |
22 | module.exports = function () {
23 | var warnings = []
24 | for (var i = 0; i < versionRequirements.length; i++) {
25 | var mod = versionRequirements[i]
26 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
27 | warnings.push(mod.name + ': ' +
28 | chalk.red(mod.currentVersion) + ' should be ' +
29 | chalk.green(mod.versionRequirement)
30 | )
31 | }
32 | }
33 |
34 | if (warnings.length) {
35 | console.log('')
36 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
37 | console.log()
38 | for (var i = 0; i < warnings.length; i++) {
39 | var warning = warnings[i]
40 | console.log(' ' + warning)
41 | }
42 | console.log()
43 | process.exit(1)
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/README.md:
--------------------------------------------------------------------------------
1 | # CloudVue
2 | ### 简介
3 | ```
4 | CloudVue是一套基于Vue全家桶(Vue2.x + Vue-router2.x + Vuex)+ Thinkphp的前后端分离框架。
5 | 脚手架构建也可以通过vue官方的vue-cli脚手架工具构建
6 | 实现了一般后台所需要的功能模块
7 |
8 | * 登录、退出登录
9 | * 修改密码、记住密码
10 | * 菜单管理
11 | * 系统参数
12 | * 权限节点
13 | * 岗位管理
14 | * 部门管理
15 | * 用户组管理
16 | * 用户管理
17 | ```
18 |
19 | ### 开发依赖
20 | * vue
21 | * element-ui
22 | * axios
23 | * fontawesome
24 | * js-cookie
25 | * lockr
26 | * lodash
27 | * moment
28 |
29 |
30 | ### 数据交互
31 | 数据交互通过axios以及RESTful架构来实现
32 |
33 | 用户校验通过登录返回的auth_key放在header
34 |
35 | 值得注意的一点是:跨域的情况下,会有预请求OPTION的情况
36 |
37 | 附上接口文档:
38 |
39 |
40 | ### 前端部署
41 | ```
42 | 部署前准备
43 | 1.安装node.js
44 | 前端部分是基于node.js上运行的,所以必须先安装node.js,版本要求为6.9.0以上(推荐安装官方推荐版本),下载地址:https://nodejs.org/zh-cn/
45 |
46 | 完成以上两个步骤之后,我们进入到frontEnd这个目录,然后按顺序执行以下两行代码就可以愉快地玩耍了。
47 | npm install
48 | npm run dev
49 |
50 | 注意:前端服务启动,默认会占用8080端口,所以在启动前端服务之前,请确认8080端口没有被占用。
51 | 如果想替换前端默认端口,可修改config/index.js里面的dev对象的port参数,但不建议这么做。
52 | 另外接口请求本地服务的端口是80端口,如果配置后端服务的时候启动的不是80端口,可在build/webpack.base.conf.js里修改DEV_HOST(开发环境请求地址)。
53 | ```
54 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/components/Common/leftMenu.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
{{secMenu.title}}
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/conf/CaptchaConfig.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.conf;
2 |
3 | import java.util.Properties;
4 |
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 |
8 | import com.google.code.kaptcha.impl.DefaultKaptcha;
9 | import com.google.code.kaptcha.util.Config;
10 |
11 | @Configuration
12 | public class CaptchaConfig {
13 |
14 | @Bean(name="captchaProducer")
15 | public DefaultKaptcha getKaptchaBean(){
16 | DefaultKaptcha defaultKaptcha=new DefaultKaptcha();
17 | Properties properties=new Properties();
18 | properties.setProperty("kaptcha.border", "yes");
19 | properties.setProperty("kaptcha.border.color", "105,179,90");
20 | properties.setProperty("kaptcha.textproducer.font.color", "blue");
21 | properties.setProperty("kaptcha.image.width", "125");
22 | properties.setProperty("kaptcha.image.height", "45");
23 | properties.setProperty("kaptcha.session.key", "code");
24 | properties.setProperty("kaptcha.textproducer.char.length", "4");
25 | properties.setProperty("kaptcha.textproducer.font.names", "宋体,楷体,微软雅黑");
26 | Config config=new Config(properties);
27 | defaultKaptcha.setConfig(config);
28 | return defaultKaptcha;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | env: require('./prod.env'),
7 | index: path.resolve(__dirname, '../dist/index.html'),
8 | assetsRoot: path.resolve(__dirname, '../dist'),
9 | assetsSubDirectory: 'static',
10 | assetsPublicPath: '/',
11 | productionSourceMap: true,
12 | // Gzip off by default as many popular static hosts such as
13 | // Surge or Netlify already gzip all static assets for you.
14 | // Before setting to `true`, make sure to:
15 | // npm install --save-dev compression-webpack-plugin
16 | productionGzip: false,
17 | productionGzipExtensions: ['js', 'css']
18 | },
19 | dev: {
20 | env: require('./dev.env'),
21 | port: 8080,
22 | assetsSubDirectory: 'static',
23 | assetsPublicPath: '/',
24 | proxyTable: {
25 | '/api': {
26 | target: 'http://localhost:80',
27 | pathRewrite: {
28 | '^/api': '/'
29 | }
30 | }
31 | },
32 | // CSS Sourcemaps off by default because relative paths are "buggy"
33 | // with this option, according to the CSS-Loader README
34 | // (https://github.com/webpack/css-loader#sourcemaps)
35 | // In our experience, they generally work as expected,
36 | // just be aware of this issue when enabling this option.
37 | cssSourceMap: false
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/fore-end/cloud-vue/src/assets/js/global.js:
--------------------------------------------------------------------------------
1 | const commonFn = {
2 | j2s(obj) {
3 | return JSON.stringify(obj)
4 | },
5 | shallowRefresh(name) {
6 | router.replace({ path: '/refresh', query: { name: name }})
7 | },
8 | closeGlobalLoading() {
9 | setTimeout(() => {
10 | store.dispatch('showLoading', false)
11 | }, 0)
12 | },
13 | openGlobalLoading() {
14 | setTimeout(() => {
15 | store.dispatch('showLoading', true)
16 | }, 0)
17 | },
18 | cloneJson(obj) {
19 | return JSON.parse(JSON.stringify(obj))
20 | },
21 | toastMsg(type, msg) {
22 | switch (type) {
23 | case 'normal':
24 | bus.$message(msg)
25 | break
26 | case 'success':
27 | bus.$message({
28 | message: msg,
29 | type: 'success'
30 | })
31 | break
32 | case 'warning':
33 | bus.$message({
34 | message: msg,
35 | type: 'warning'
36 | })
37 | break
38 | case 'error':
39 | bus.$message.error(msg)
40 | break
41 | }
42 | },
43 | clearVuex(cate) {
44 | store.dispatch(cate, [])
45 | },
46 | getHasRule(val) {
47 | const moduleRule = 'admin'
48 | let userInfo = Lockr.get('userInfo')
49 | if (userInfo.id == 1) {
50 | return true
51 | } else {
52 | let authList = moduleRule + Lockr.get('authList')
53 | return _.includes(authList, val)
54 | }
55 | }
56 | }
57 |
58 | export default commonFn
59 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/resources/mappers/SysAdminUserDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/model/SysAdminStructure.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.model;
2 |
3 | import javax.persistence.Column;
4 | import javax.persistence.Table;
5 |
6 | import cloud.simple.service.base.BaseEntity;
7 |
8 | @Table(name = "`sys_admin_structure`")
9 | public class SysAdminStructure extends BaseEntity {
10 | private static final long serialVersionUID = 8560760088975512813L;
11 |
12 | @Column(name = "`name`")
13 | private String name;
14 |
15 | @Column(name = "`pid`")
16 | private Integer pid;
17 |
18 | @Column(name = "`status`")
19 | private Byte status;
20 |
21 |
22 | /**
23 | * @return name
24 | */
25 | public String getName() {
26 | return name;
27 | }
28 |
29 | /**
30 | * @param name
31 | */
32 | public void setName(String name) {
33 | this.name = name;
34 | }
35 |
36 | /**
37 | * @return pid
38 | */
39 | public Integer getPid() {
40 | return pid;
41 | }
42 |
43 | /**
44 | * @param pid
45 | */
46 | public void setPid(Integer pid) {
47 | this.pid = pid;
48 | }
49 |
50 | /**
51 | * @return status
52 | */
53 | public Byte getStatus() {
54 | return status;
55 | }
56 |
57 | /**
58 | * @param status
59 | */
60 | public void setStatus(Byte status) {
61 | this.status = status;
62 | }
63 | }
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/web/CommonController.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.web;
2 |
3 | import javax.servlet.http.HttpServletRequest;
4 |
5 | import org.apache.commons.lang3.StringUtils;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.web.context.request.RequestContextHolder;
8 | import org.springframework.web.context.request.ServletRequestAttributes;
9 |
10 | import cloud.simple.service.contants.Constant;
11 | import cloud.simple.service.domain.SysAdminUserService;
12 | import cloud.simple.service.model.SysAdminUser;
13 | import cloud.simple.service.util.EncryptUtil;
14 |
15 | /**
16 | * 公共控制器
17 | * @author leo
18 | *
19 | */
20 | public class CommonController {
21 | @Autowired
22 | private SysAdminUserService sysAdminUserService;
23 |
24 |
25 | /**
26 | * 获取当前登录用户
27 | * @return
28 | */
29 | public SysAdminUser getCurrentUser(){
30 | HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
31 | String authKey = request.getHeader(Constant.AUTH_KEY);
32 | if(StringUtils.isNotBlank(authKey)) {
33 | String decryptAuthKey = EncryptUtil.decryptBase64(authKey, Constant.SECRET_KEY);
34 | String[] auths = decryptAuthKey.split("\\|");
35 | String username = auths[0];
36 | String password = auths[1];
37 | SysAdminUser record = new SysAdminUser();
38 | record.setUsername(username);
39 | record.setPassword(password);
40 | return sysAdminUserService.selectOne(record);
41 | }
42 | return null;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/web/SysConfigController.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.web;
2 |
3 | import java.util.HashMap;
4 | import java.util.List;
5 | import java.util.Map;
6 |
7 | import javax.servlet.http.HttpServletRequest;
8 |
9 | import org.springframework.beans.factory.annotation.Autowired;
10 | import org.springframework.web.bind.annotation.PostMapping;
11 | import org.springframework.web.bind.annotation.RequestBody;
12 | import org.springframework.web.bind.annotation.RequestMapping;
13 | import org.springframework.web.bind.annotation.RestController;
14 |
15 | import cloud.simple.service.domain.SysSystemConfigService;
16 | import cloud.simple.service.model.SysSystemConfig;
17 | import cloud.simple.service.util.FastJsonUtils;
18 | import io.swagger.annotations.Api;
19 | import io.swagger.annotations.ApiOperation;
20 |
21 | /**
22 | * 系统配置 控制层
23 | * @author leo.aqing
24 | */
25 | @RestController
26 | @RequestMapping("/admin")
27 | @Api(value = "SysConfigController", description = "系统配置接口")
28 | public class SysConfigController extends CommonController{
29 | @Autowired
30 | private SysSystemConfigService sysSystemConfigService;
31 |
32 | @ApiOperation(value = "获取配置", httpMethod="POST")
33 | @PostMapping(value = "/configs", produces = {"application/json;charset=UTF-8"})
34 | public String configs(@RequestBody(required=false) SysSystemConfig record,HttpServletRequest request) {
35 | Map data = new HashMap();
36 | List configs = sysSystemConfigService.select(record);
37 | for (SysSystemConfig c : configs) {
38 | data.put(c.getName(), c.getValue());
39 | }
40 | return FastJsonUtils.resultSuccess(200, "查询配置成功", data);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/back-end/cloud-vue-parent/cloud-simple-service/src/main/java/cloud/simple/service/domain/SysAdminGroupService.java:
--------------------------------------------------------------------------------
1 | package cloud.simple.service.domain;
2 |
3 | import java.util.List;
4 | import java.util.Map;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.google.common.collect.Lists;
10 | import com.google.common.collect.Maps;
11 |
12 | import cloud.simple.service.base.BaseServiceImpl;
13 | import cloud.simple.service.dao.SysAdminGroupDao;
14 | import cloud.simple.service.model.SysAdminGroup;
15 | import cloud.simple.service.util.BeanToMapUtil;
16 | import cloud.simple.service.util.Category;
17 | import tk.mybatis.mapper.common.Mapper;
18 | import tk.mybatis.mapper.entity.Example;
19 | @Service
20 | public class SysAdminGroupService extends BaseServiceImpl{
21 | @Autowired
22 | private SysAdminGroupDao sysAdminGroupDao;
23 |
24 | @Override
25 | public Mapper getMapper() {
26 | return sysAdminGroupDao;
27 | }
28 | /**
29 | * 列表
30 | * @return
31 | */
32 | public List