├── qingfneg-vue-ant-design ├── .env.analyz ├── .browserslistrc ├── .env ├── .env.preview ├── .env.development ├── .env.production ├── .umirc.mock.js ├── public │ ├── favicon.ico │ └── index.html ├── .editorconfig ├── Dockerfile ├── mock │ ├── index.js │ └── message.js ├── src │ ├── utils │ │ ├── utils.js │ │ ├── domUtil.js │ │ ├── date.js │ │ ├── axios │ │ │ └── index.js │ │ └── screenLog.js │ ├── layouts │ │ ├── BlankLayout.vue │ │ ├── index.js │ │ └── BasicLayout.less │ ├── api │ │ ├── common │ │ │ └── upload.js │ │ ├── monitor │ │ │ ├── server.js │ │ │ └── userOnline.js │ │ ├── system │ │ │ ├── logger.js │ │ │ ├── group.js │ │ │ ├── menu.js │ │ │ ├── area.js │ │ │ ├── dictionary.js │ │ │ ├── role.js │ │ │ ├── organize.js │ │ │ └── gencode.js │ │ ├── gencode │ │ │ ├── mytree.js │ │ │ └── mycontent.js │ │ ├── quartz │ │ │ ├── busTask.js │ │ │ └── timTask.js │ │ └── auth │ │ │ └── login.js │ ├── views │ │ ├── exception │ │ │ ├── locales │ │ │ │ ├── zhCN.js │ │ │ │ └── enUS.js │ │ │ ├── 403.vue │ │ │ ├── 404.vue │ │ │ └── 500.vue │ │ ├── example │ │ │ ├── richText │ │ │ │ └── Index.vue │ │ │ ├── openHref │ │ │ │ └── Index.vue │ │ │ └── iframe │ │ │ │ └── Index.vue │ │ ├── quartz │ │ │ ├── Cron │ │ │ │ └── antCron │ │ │ │ │ ├── validator.js │ │ │ │ │ └── Index.vue │ │ │ ├── TimTask │ │ │ │ └── Info.vue │ │ │ └── busTask │ │ │ │ └── Info.vue │ │ ├── dashboard │ │ │ └── Welcome.vue │ │ └── system │ │ │ ├── Area │ │ │ └── Info.vue │ │ │ ├── Organize │ │ │ └── Info.vue │ │ │ ├── Role │ │ │ └── Info.vue │ │ │ ├── User │ │ │ └── Info.vue │ │ │ ├── Menu │ │ │ └── Info.vue │ │ │ ├── Dictionary │ │ │ └── Info.vue │ │ │ ├── Group │ │ │ └── Info.vue │ │ │ ├── Logger │ │ │ └── Info.vue │ │ │ ├── Iframe │ │ │ └── Index.vue │ │ │ └── modules │ │ │ └── CreateForm.vue │ ├── store │ │ ├── device-mixin.js │ │ ├── i18n-mixin.js │ │ ├── getters.js │ │ ├── index.js │ │ ├── mutation-types.js │ │ ├── modules │ │ │ └── async-router.js │ │ └── app-mixin.js │ ├── components │ │ ├── index.js │ │ ├── GlobalFooter │ │ │ └── index.vue │ │ ├── PageLoading │ │ │ ├── PageLoading.vue │ │ │ └── index.js │ │ ├── RightContent │ │ │ └── RightContent.vue │ │ ├── NProgress │ │ │ └── nprogress.less │ │ ├── Common │ │ │ └── RichText.vue │ │ └── SelectLang │ │ │ └── index.vue │ ├── App.vue │ ├── router │ │ └── index.js │ ├── config │ │ └── defaultSettings.js │ ├── core │ │ ├── directives │ │ │ └── action.js │ │ └── bootstrap.js │ ├── locales │ │ └── index.js │ ├── main.js.bak │ └── styles │ │ └── global.less ├── deploy │ └── default.conf ├── .gitignore ├── babel.config.js ├── LICENSE ├── .eslintrc.js ├── README.md ├── README.zh-CN.md └── package.json ├── 数据库脚本.txt ├── qingfeng-interface └── src │ └── main │ ├── resources │ ├── spy.properties │ ├── 文档 │ │ └── 代码生成器模板.zip │ ├── templates │ │ ├── excelExport │ │ │ ├── system_area.xls │ │ │ ├── system_group.xls │ │ │ ├── system_role.xls │ │ │ ├── system_user.xls │ │ │ ├── system_logger.xls │ │ │ ├── system_organize.xls │ │ │ └── system_dictionary.xls │ │ ├── gencode │ │ │ ├── TemplateMenuSql.sql.ftl │ │ │ ├── TemplateApi.js.ftl │ │ │ └── TemplateDao.java.ftl │ │ └── web │ │ │ ├── oauthLogin.html │ │ │ └── oauthGrant.html │ ├── banner.txt │ ├── config │ │ └── config.properties │ ├── quartz.properties │ ├── docTemp │ │ └── oweLetter.ftl │ ├── mapper │ │ ├── system │ │ │ └── LoginMapper.xml │ │ └── quartz │ │ │ └── TimTaskMapper.xml │ └── mybatis-config.xml │ └── java │ └── com │ └── qingfeng │ ├── system │ ├── dao │ │ ├── AreaDao.java │ │ ├── ThemeDao.java │ │ ├── DictionaryDao.java │ │ ├── LoggerDao.java │ │ ├── LoginDao.java │ │ ├── MenuDao.java │ │ ├── GroupDao.java │ │ ├── OrganizeDao.java │ │ └── RoleDao.java │ └── service │ │ ├── AreaService.java │ │ ├── LoggerService.java │ │ ├── ThemeService.java │ │ ├── DictionaryService.java │ │ ├── LoginService.java │ │ ├── MenuService.java │ │ ├── GroupService.java │ │ └── OrganizeService.java │ ├── common │ ├── dao │ │ ├── GraphicDao.java │ │ └── UploadDao.java │ └── controller │ │ └── TimerController.java │ ├── quartz │ ├── dao │ │ ├── TimTaskDao.java │ │ └── BusTaskDao.java │ ├── job │ │ ├── TestJob.java │ │ ├── ChickenJob.java │ │ └── MessageJob.java │ ├── service │ │ ├── TimTaskService.java │ │ └── BusTaskService.java │ ├── config │ │ ├── SpringJobFactory.java │ │ ├── TaskRunner.java │ │ └── SchedulerConfig.java │ └── model │ │ └── QuartzEntity.java │ ├── framework │ ├── monitor │ │ ├── entity │ │ │ ├── Sys.java │ │ │ ├── SysFile.java │ │ │ ├── Cpu.java │ │ │ └── Mem.java │ │ ├── server │ │ │ ├── SessionListener.java │ │ │ ├── MySessionContext.java │ │ │ └── UserOnlineListener.java │ │ └── controller │ │ │ └── SystemHardwareController.java │ ├── jwt │ │ ├── interceptor │ │ │ ├── CorsConfig.java │ │ │ └── WebAppConfigurer.java │ │ ├── entity │ │ │ └── CheckResult.java │ │ └── constant │ │ │ └── SystemConstant.java │ ├── swagger │ │ ├── 相关说明 │ │ └── Swagger3Config.java │ ├── servlet │ │ ├── StartService.java │ │ ├── WebMvcConfigurer.java │ │ └── SqlCostInterceptor.java │ └── redies │ │ └── RedisConfig.java │ ├── gencode │ ├── dao │ │ ├── MycontentDao.java │ │ └── MytreeDao.java │ └── service │ │ └── MycontentService.java │ ├── port │ └── controller │ │ └── SwaggerTestController.java │ └── Application.java ├── qingfeng-vue.iml └── qingfeng-common ├── src └── main │ ├── java │ └── com │ │ └── qingfeng │ │ ├── framework │ │ └── datasource │ │ │ ├── DataSourceType.java │ │ │ ├── JdbcContextHolder.java │ │ │ ├── MyDataSource.java │ │ │ ├── DynamicDataSource.java │ │ │ ├── DruidConfiguration.java │ │ │ └── DataSourceConfig.java │ │ ├── util │ │ ├── freemarker │ │ │ ├── FreemarkerParaUtil.java │ │ │ └── DocumentHandler.java │ │ ├── mail │ │ │ └── MyAuthenticator.java │ │ ├── Const.java │ │ ├── MD5.java │ │ ├── ServletUtils.java │ │ ├── upload │ │ │ └── ParaUtil.java │ │ ├── AddressUtils.java │ │ ├── SerializeUtils.java │ │ ├── thread │ │ │ └── ThreadPoolConfig.java │ │ ├── Page.java │ │ ├── PasswordUtil.java │ │ └── PathUtil.java │ │ └── base │ │ ├── model │ │ ├── CommonConfig.java │ │ └── ActivitiParamConfig.java │ │ └── dao │ │ └── CrudDao.java │ └── resources │ └── config │ └── config.properties └── pom.xml /qingfneg-vue-ant-design/.env.analyz: -------------------------------------------------------------------------------- 1 | NODE_ENV=production 2 | IS_ANALYZ=true 3 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.env: -------------------------------------------------------------------------------- 1 | VUE_APP_PREVIEW=true 2 | VUE_APP_API_BASE_URL=/api 3 | -------------------------------------------------------------------------------- /数据库脚本.txt: -------------------------------------------------------------------------------- 1 | 数据库脚本需要加群免费获取: 2 | 青锋微信:QF_qingfeng1024 3 | 4 | 青锋会拉你们进微信群,群文件中下载数据库脚本。 -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.env.preview: -------------------------------------------------------------------------------- 1 | NODE_ENV=production 2 | VUE_APP_API_URL=/api 3 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_API_URL=/api 2 | VUE_APP_PREVIEW=true 3 | 4 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | appender=com.p6spy.engine.spy.appender.Slf4JLogger -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.env.production: -------------------------------------------------------------------------------- 1 | NODE_ENV=production 2 | VUE_APP_PREVIEW=false 3 | VUE_APP_API_URL=/api 4 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.umirc.mock.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require('./mock/index'), 3 | // 这里可以引入任意的mock文件,位置也随意。 4 | } 5 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfneg-vue-ant-design/public/favicon.ico -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/文档/代码生成器模板.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/文档/代码生成器模板.zip -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | trim_trailing_whitespace = true 5 | insert_final_newline = true 6 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx 2 | 3 | RUN rm /etc/nginx/conf.d/default.conf 4 | 5 | ADD deploy/default.conf /etc/nginx/conf.d/ 6 | COPY dist/ /usr/share/nginx/html/ 7 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/mock/index.js: -------------------------------------------------------------------------------- 1 | const user = require('./user.js') 2 | const message = require('./message.js') 3 | 4 | module.exports = { 5 | ...user, 6 | ...message, 7 | } 8 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/utils/utils.js: -------------------------------------------------------------------------------- 1 | exports.install = function (Vue, options) { 2 | Vue.prototype.$test = function () { //全局函数1 3 | return '全局参数测试'; 4 | }; 5 | }; 6 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/excelExport/system_area.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/templates/excelExport/system_area.xls -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/excelExport/system_group.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/templates/excelExport/system_group.xls -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/excelExport/system_role.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/templates/excelExport/system_role.xls -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/excelExport/system_user.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/templates/excelExport/system_user.xls -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/excelExport/system_logger.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/templates/excelExport/system_logger.xls -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/excelExport/system_organize.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/templates/excelExport/system_organize.xls -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/excelExport/system_dictionary.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sdzhongqian/qingfeng-vue/HEAD/qingfeng-interface/src/main/resources/templates/excelExport/system_dictionary.xls -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/mock/message.js: -------------------------------------------------------------------------------- 1 | const Mock = require('mockjs') 2 | 3 | module.exports = { 4 | 'POST /api/message/sms': (req, res) => { 5 | return { captcha: Mock.mock('@integer(10000, 99999)') } 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/layouts/BlankLayout.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/common/upload.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function upload (formData) { 3 | return request({ 4 | url: '/common/upload/uploadFile', 5 | method: 'post', 6 | data: formData 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/layouts/index.js: -------------------------------------------------------------------------------- 1 | import BasicLayout from './BasicLayout' 2 | import BlankLayout from './BlankLayout' 3 | import UserLayout from './UserLayout' 4 | 5 | export { 6 | BasicLayout, 7 | BlankLayout, 8 | UserLayout, 9 | } 10 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/exception/locales/zhCN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'exception.backhome': '回到首页', 3 | 'exception.403.subtitle': '抱歉,您无权访问此页面。', 4 | 'exception.404.subtitle': '抱歉,您访问的页面不存在。', 5 | 'exception.500.subtitle': '抱歉,服务器错误。', 6 | } 7 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/deploy/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name _; 4 | index index.html index.htm; 5 | root /usr/share/nginx/html; 6 | 7 | location / { 8 | try_files $uri $uri/ /index.html =404; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/store/device-mixin.js: -------------------------------------------------------------------------------- 1 | import { mapState } from 'vuex' 2 | 3 | const deviceMixin = { 4 | computed: { 5 | ...mapState({ 6 | isMobile: state => state.app.isMobile, 7 | }), 8 | }, 9 | } 10 | 11 | export { deviceMixin } 12 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/exception/locales/enUS.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'exception.backhome': 'Back Home', 3 | 'exception.403.subtitle': 'Sorry, you don\'t have access to this page.', 4 | 'exception.404.subtitle': 'Sorry, the page you visited does not exist.', 5 | 'exception.500.subtitle': 'Sorry, the server is reporting an error.', 6 | } 7 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/monitor/server.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getData() { 4 | return request({ 5 | url: '/monitor/server/systemHardware', 6 | method: 'get', 7 | headers: { 8 | 'Content-Type': 'application/json;charset=UTF-8', 9 | } 10 | }) 11 | } 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.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 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /qingfeng-vue.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/store/i18n-mixin.js: -------------------------------------------------------------------------------- 1 | import { mapState } from 'vuex' 2 | 3 | const i18nMixin = { 4 | computed: { 5 | ...mapState({ 6 | currentLang: state => state.app.lang, 7 | }), 8 | }, 9 | methods: { 10 | setLang (lang) { 11 | this.$store.dispatch('setLang', lang) 12 | }, 13 | }, 14 | } 15 | 16 | export default i18nMixin 17 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/index.js: -------------------------------------------------------------------------------- 1 | import RightContent from './RightContent/RightContent' 2 | import SelectLang from './SelectLang' 3 | import GlobalFooter from './GlobalFooter' 4 | import PageLoading from './PageLoading' 5 | 6 | import Dialog from '@/components/Dialog' 7 | 8 | export { 9 | RightContent, 10 | SelectLang, 11 | GlobalFooter, 12 | PageLoading, 13 | 14 | Dialog 15 | } 16 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/AreaDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: AreaDao 9 | * @ProjectName qingfeng 10 | * @Description: 地区DAO层 11 | * @author anxingtao 12 | * @date 2020-9-22 22:40 13 | */ 14 | @Mapper 15 | public interface AreaDao extends CrudDao { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/ThemeDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: ThemeDao 9 | * @ProjectName wdata 10 | * @Description: 主题设置Dao 11 | * @author anxingtao 12 | * @date 2020-9-28 17:44 13 | */ 14 | @Mapper 15 | public interface ThemeDao extends CrudDao { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/common/dao/GraphicDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.common.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: GraphicDao 9 | * @ProjectName wdata 10 | * @Description: GraphicDao类 11 | * @author anxingtao 12 | * @date 2020-10-8 20:21 13 | */ 14 | @Mapper 15 | public interface GraphicDao extends CrudDao { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ____ _ ______ 2 | / __ \ (_) | ____| 3 | | | | | _ _ __ __ _ | |__ ___ _ __ __ _ 4 | | | | || || '_ \ / _` || __|/ _ \| '_ \ / _` | 5 | | |__| || || | | || (_| || | | __/| | | || (_| | 6 | \___\_\|_||_| |_| \__, ||_| \___||_| |_| \__, | 7 | __/ | __/ | 8 | |___/ |___/ 9 | 青锋剑在手-天下任你走 2020-V1.0 -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/DictionaryDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: DictionaryDao 9 | * @ProjectName qingfeng 10 | * @Description: 字典DAO层 11 | * @author anxingtao 12 | * @date 2020-9-22 22:41 13 | */ 14 | @Mapper 15 | public interface DictionaryDao extends CrudDao { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/framework/datasource/DataSourceType.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.datasource; 2 | 3 | public enum DataSourceType { 4 | 5 | // 主表 6 | Master("master"), 7 | // 从表 8 | Slave("slave"); 9 | 10 | private String name; 11 | 12 | private DataSourceType(String name) { 13 | this.name = name; 14 | } 15 | 16 | public String getName() { 17 | return name; 18 | } 19 | 20 | public void setName(String name) { 21 | this.name = name; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/dao/TimTaskDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: TimTaskDao 9 | * @ProjectName wdata 10 | * @Description: TODO 11 | * @author anxingtao 12 | * @date 2020-10-1 21:53 13 | */ 14 | @Mapper 15 | public interface TimTaskDao extends CrudDao { 16 | 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/LoggerDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * 9 | * @ClassName: LoggerDao 10 | * @Description: LoggerDao类 11 | * @Description: 操作日志记录 12 | * @author Administrator 13 | * @date 2018-9-6 15:16 14 | * 15 | */ 16 | @Mapper 17 | public interface LoggerDao extends CrudDao { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/logger.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function getListPage (parameter) { 3 | console.log(parameter); 4 | return request({ 5 | url: '/system/logger/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function del (ids) { 12 | return request({ 13 | url: '/system/logger/del?ids='+ids, 14 | method: 'get', 15 | headers: { 16 | 'Content-Type': 'application/json;charset=UTF-8', 17 | } 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/monitor/userOnline.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function getListPage (parameter) { 3 | return request({ 4 | url: '/monitor/userOnline/findListPage', 5 | method: 'post', 6 | data: parameter 7 | }) 8 | } 9 | 10 | export function retreatData (ids) { 11 | return request({ 12 | url: '/monitor/userOnline/kickUserOffline?ids='+ids, 13 | method: 'get', 14 | headers: { 15 | 'Content-Type': 'application/json;charset=UTF-8', 16 | } 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/example/richText/Index.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/exception/403.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/exception/404.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/exception/500.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset', 4 | [ 5 | '@babel/preset-env', 6 | { 7 | useBuiltIns: 'entry', 8 | corejs: 3, 9 | }, 10 | ], 11 | ], 12 | // en_US: Load on demand is enabled by default 13 | // zh_CN: 默认启用了按需加载 14 | plugins: [ 15 | ['import', { 16 | libraryName: 'ant-design-vue', 17 | libraryDirectory: 'es', 18 | style: true, // `style: true` 会加载 less 文件,反之 css 19 | }], 20 | ], 21 | } 22 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/framework/datasource/JdbcContextHolder.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.datasource; 2 | /** 3 | * 动态数据源的上下文 threadlocal 4 | * @ClassName JdbcContextHolder 5 | * @Description TODO 6 | * @author lide 7 | * @date 2018年2月27日 上午11:43:34 8 | */ 9 | public class JdbcContextHolder { 10 | 11 | private final static ThreadLocal local = new ThreadLocal<>(); 12 | 13 | public static void putDataSource(String name) { 14 | local.set(name); 15 | } 16 | 17 | public static String getDataSource() { 18 | return local.get(); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/freemarker/FreemarkerParaUtil.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util.freemarker; 2 | 3 | public class FreemarkerParaUtil { 4 | 5 | public static String outputDir = "E:/autoCode/"; 6 | 7 | public static String controller = "controller/"; 8 | public static String mapper = "mapper/"; 9 | public static String service = "service/"; 10 | public static String dao = "dao/"; 11 | public static String jsp = "jsp/"; 12 | public static String html = "html/"; 13 | public static String vue = "vue/"; 14 | public static String sql = "sql/"; 15 | 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/config/config.properties: -------------------------------------------------------------------------------- 1 | #=================================基础参数=========================================== 2 | #\u7C7B\u578B 3 | ue.common.app_key=c79316e5-505d-424f-a222-52b1cad8a5db 4 | #\u5206\u7C7B 5 | ue.common.app_secret=bKr2AO61osYum8vEMf66 6 | #URL前缀 7 | ue.common.prefix_url=http://172.18.23.7:9001/ServiceOpenFrame/gate 8 | 9 | 10 | #=======================================代码生成相关参数============================================= 11 | com.qingfeng.common.gencodeField = id,type,status,create_time,create_user,create_organize,update_user,update_time 12 | 13 | 14 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | isMobile: state => state.app.isMobile, 3 | lang: state => state.app.lang, 4 | theme: state => state.app.theme, 5 | color: state => state.app.color, 6 | token: state => state.user.token, 7 | avatar: state => state.user.avatar, 8 | nickname: state => state.user.name, 9 | welcome: state => state.user.welcome, 10 | roles: state => state.user.roles, 11 | currentUser: state => state.user.info, 12 | addRouters: state => state.permission.addRouters, 13 | multiTab: state => state.app.multiTab, 14 | } 15 | 16 | export default getters 17 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/quartz/Cron/antCron/validator.js: -------------------------------------------------------------------------------- 1 | // import CronParser from 'cron-parser' 2 | export const WEEK_MAP_EN = { 3 | 'sun': '0', 4 | 'mon': '1', 5 | 'tue': '2', 6 | 'wed': '3', 7 | 'thu': '4', 8 | 'fri': '5', 9 | 'sat': '6', 10 | 11 | } 12 | 13 | export const replaceWeekName = (c) => { 14 | if (c) { 15 | c = c.toLowerCase() 16 | Object.keys(WEEK_MAP_EN).forEach(k => { 17 | c = c.replace(new RegExp(k, 'g'), WEEK_MAP_EN[k]) 18 | }) 19 | c = c.replace(new RegExp('7', 'g'), '0') 20 | } 21 | return c 22 | } 23 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/framework/datasource/MyDataSource.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.datasource; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 数据源选择--自定义注解 10 | * @ClassName DataSource 11 | * @Description TODO 12 | * @author lide 13 | * @date 2018年2月27日 上午11:23:41 14 | */ 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Target(ElementType.METHOD) 17 | public @interface MyDataSource { 18 | 19 | DataSourceType value() default DataSourceType.Master; //默认主表 20 | 21 | } 22 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 青锋后台管理系统 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | import app from './modules/app' 5 | import user from './modules/user' 6 | 7 | // default router permission control 8 | import permission from './modules/permission' 9 | 10 | // dynamic router permission control (Experimental) 11 | // import permission from './modules/async-router' 12 | import getters from './getters' 13 | 14 | Vue.use(Vuex) 15 | 16 | export default new Vuex.Store({ 17 | modules: { 18 | app, 19 | user, 20 | permission, 21 | }, 22 | state: { 23 | 24 | }, 25 | mutations: { 26 | 27 | }, 28 | actions: { 29 | 30 | }, 31 | getters, 32 | }) 33 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 26 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/utils/domUtil.js: -------------------------------------------------------------------------------- 1 | import config from '@/config/defaultSettings' 2 | 3 | export const setDocumentTitle = function (title) { 4 | document.title = title 5 | const ua = navigator.userAgent 6 | // eslint-disable-next-line 7 | const regex = /\bMicroMessenger\/([\d\.]+)/ 8 | if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) { 9 | const i = document.createElement('iframe') 10 | i.src = '/favicon.ico' 11 | i.style.display = 'none' 12 | i.onload = function () { 13 | setTimeout(function () { 14 | i.remove() 15 | }, 9) 16 | } 17 | document.body.appendChild(i) 18 | } 19 | } 20 | 21 | export const domTitle = config.title 22 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/mail/MyAuthenticator.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util.mail; 2 | /** 3 | * 4 | */ 5 | 6 | import javax.mail.Authenticator; 7 | import javax.mail.PasswordAuthentication; 8 | 9 | public class MyAuthenticator extends Authenticator{ 10 | String userName=null; 11 | String password=null; 12 | 13 | public MyAuthenticator(){ 14 | } 15 | public MyAuthenticator(String username, String password) { 16 | this.userName = username; 17 | this.password = password; 18 | } 19 | protected PasswordAuthentication getPasswordAuthentication(){ 20 | return new PasswordAuthentication(userName, password); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/utils/date.js: -------------------------------------------------------------------------------- 1 | export function formatDate(date_time) { 2 | var now = new Date(date_time) 3 | var year=now.getFullYear(); 4 | var month=now.getMonth()+1; 5 | if(month<10){ 6 | month="0"+month; 7 | } 8 | var date=now.getDate(); 9 | if(date<10){ 10 | date="0"+date; 11 | } 12 | var hour=now.getHours(); 13 | if(hour<10){ 14 | hour="0"+hour; 15 | } 16 | var minute=now.getMinutes(); 17 | if(minute<10){ 18 | minute="0"+minute; 19 | } 20 | var second=now.getSeconds(); 21 | if(second<10){ 22 | second="0"+second; 23 | } 24 | return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second; 25 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/entity/Sys.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.entity; 2 | 3 | import lombok.Data; 4 | import java.io.Serializable; 5 | 6 | @Data 7 | public class Sys implements Serializable { 8 | 9 | private static final long serialVersionUID = 1L; 10 | 11 | /** 12 | * 服务器名称 13 | */ 14 | private String computerName; 15 | 16 | /** 17 | * 服务器Ip 18 | */ 19 | private String computerIp; 20 | 21 | /** 22 | * 项目路径 23 | */ 24 | private String userDir; 25 | 26 | /** 27 | * 操作系统 28 | */ 29 | private String osName; 30 | 31 | /** 32 | * 系统架构 33 | */ 34 | private String osArch; 35 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/LoginDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: LoginDao 9 | * @ProjectName wdata 10 | * @Description: 登录Dao 11 | * @author anxingtao 12 | * @date 2020-9-27 10:19 13 | */ 14 | @Mapper 15 | public interface LoginDao extends CrudDao { 16 | 17 | 18 | /** 19 | * @Description: findUserInfo 20 | * @Param: [pd] 21 | * @return: com.qingfeng.util.PageData 22 | * @Author: anxingtao 23 | * @Date: 2020-9-27 10:19 24 | */ 25 | PageData findUserInfo(PageData pd); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/gencode/dao/MycontentDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.gencode.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: MycontentDao 9 | * @ProjectName com.qingfeng 10 | * @Description: MycontentDao 11 | * @author anxingtao 12 | * @date 2020-9-22 22:42 13 | */ 14 | @Mapper 15 | public interface MycontentDao extends CrudDao { 16 | 17 | /** 18 | * @Description: updateStatus 19 | * @Param: [pd] 20 | * @return: void 21 | * @Author: anxingtao 22 | * @Date: 2020-10-13 11:10 23 | */ 24 | void updateStatus(PageData pd); 25 | 26 | 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/resources/config/config.properties: -------------------------------------------------------------------------------- 1 | #=================================基础参数=========================================== 2 | #\u7C7B\u578B 3 | ue.common.app_key=c79316e5-505d-424f-a222-52b1cad8a5db 4 | #\u5206\u7C7B 5 | ue.common.app_secret=bKr2AO61osYum8vEMf66 6 | #URL前缀 7 | ue.common.prefix_url=http://172.18.23.7:9001/ServiceOpenFrame/gate 8 | 9 | #=================================Activiti参数=========================================== 10 | com.qingfeng.activiti.startFlowElementId=SN_start_node 11 | 12 | #=======================================代码生成相关参数============================================= 13 | com.qingfeng.common.gencodeField = id,type,status,create_time,create_user,create_organize,update_user,update_time 14 | 15 | 16 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/dao/BusTaskDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @Title: BusTaskDao 9 | * @ProjectName wdata 10 | * @Description: 业务任务 11 | * @author anxingtao 12 | * @date 2020-10-2 12:03 13 | */ 14 | @Mapper 15 | public interface BusTaskDao extends CrudDao { 16 | 17 | /** 18 | * @Description: findInfoForNameAndGroup 19 | * @Param: [pd] 20 | * @return: com.qingfeng.util.PageData 21 | * @Author: anxingtao 22 | * @Date: 2020-10-2 12:06 23 | */ 24 | public PageData findInfoForNameAndGroup(PageData pd); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/AreaService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.AreaDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | /** 11 | * @Title: AreaService 12 | * @ProjectName com.qingfeng 13 | * @Description: 地区SERVICE层 14 | * @author anxingtao 15 | * @date 2020-9-22 22:43 16 | */ 17 | @Service 18 | @Transactional 19 | public class AreaService extends CrudService { 20 | 21 | @Autowired 22 | protected AreaDao areadao; 23 | 24 | 25 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/LoggerService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.LoggerDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | /** 11 | * @author anxingtao 12 | * @Title: LoggerService 13 | * @ProjectName wdata 14 | * @Description: 操作日志记录 15 | * @date 2018-9-314:45 16 | */ 17 | @Service 18 | @Transactional 19 | public class LoggerService extends CrudService { 20 | 21 | @Autowired 22 | protected LoggerDao loggerdao; 23 | 24 | 25 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/ThemeService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.ThemeDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | /** 11 | * @Title: ThemeService 12 | * @ProjectName wdata 13 | * @Description: 主题设置Service 14 | * @author anxingtao 15 | * @date 2020-9-28 17:44 16 | */ 17 | @Service 18 | @Transactional 19 | public class ThemeService extends CrudService { 20 | 21 | @Autowired 22 | protected ThemeDao themedao; 23 | 24 | 25 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import { constantRouterMap } from '@/config/router.config' 4 | 5 | // hack router push/replace callback 6 | ['push', 'replace'].map(key => { 7 | return { 8 | k: key, 9 | prop: VueRouter.prototype[key], 10 | } 11 | }).forEach(item => { 12 | VueRouter.prototype[item.k] = function newCall (location, onResolve, onReject) { 13 | if (onResolve || onReject) return item.prop.call(this, location, onResolve, onReject) 14 | return item.prop.call(this, location).catch(err => err) 15 | } 16 | }) 17 | 18 | Vue.use(VueRouter) 19 | 20 | const router = new VueRouter({ 21 | mode: 'history', 22 | routes: constantRouterMap, 23 | }) 24 | 25 | export default router 26 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/GlobalFooter/index.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 24 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/base/model/CommonConfig.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.base.model; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.context.annotation.PropertySource; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * @Title: CommonConfig 10 | * @ProjectName wdata 11 | * @Description: 公共参数设置 12 | * @author anxingtao 13 | * @date 2020-10-9 22:48 14 | */ 15 | @Data 16 | @Component 17 | @ConfigurationProperties(prefix = "com.qingfeng.common") 18 | // PropertySource默认取application.properties 19 | @PropertySource(value = "classpath:config/config.properties") 20 | public class CommonConfig { 21 | 22 | //代码生成屏蔽字段 23 | private String gencodeField; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/job/TestJob.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.job; 2 | 3 | import org.quartz.Job; 4 | import org.quartz.JobExecutionContext; 5 | import org.quartz.JobExecutionException; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * @Title: TestJob 11 | * @ProjectName wdata 12 | * @Description: 实现序列化接口、防止重启应用出现quartz Couldn't retrieve job because a required class was not found 的问题 13 | * @author anxingtao 14 | * @date 2019-6-5 14:44 15 | */ 16 | public class TestJob implements Job,Serializable { 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | @Override 21 | public void execute(JobExecutionContext context) throws JobExecutionException { 22 | //可注入Service 执行相关业务操作 23 | System.out.println("任务执行成功"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/service/TimTaskService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.quartz.dao.TimTaskDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | /** 11 | * @Title: TimTaskService 12 | * @ProjectName wdata 13 | * @Description: TODO 14 | * @author anxingtao 15 | * @date 2020-10-1 21:54 16 | */ 17 | @Service 18 | @Transactional 19 | public class TimTaskService extends CrudService { 20 | 21 | @Autowired 22 | protected TimTaskDao timTaskDao; 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/utils/axios/index.js: -------------------------------------------------------------------------------- 1 | const VueAxios = { 2 | vm: {}, 3 | // eslint-disable-next-line no-unused-vars 4 | install (Vue, instance) { 5 | if (this.installed) { 6 | return 7 | } 8 | this.installed = true 9 | 10 | if (!instance) { 11 | // eslint-disable-next-line no-console 12 | console.error('You have to install axios') 13 | return 14 | } 15 | 16 | Vue.axios = instance 17 | 18 | Object.defineProperties(Vue.prototype, { 19 | axios: { 20 | get: function get () { 21 | return instance 22 | }, 23 | }, 24 | $http: { 25 | get: function get () { 26 | return instance 27 | }, 28 | }, 29 | }) 30 | }, 31 | } 32 | 33 | export { 34 | VueAxios, 35 | } 36 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/DictionaryService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.DictionaryDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | /** 11 | * @Title: DictionaryService 12 | * @ProjectName com.qingfeng 13 | * @Description: 字典SERVICE层 14 | * @author anxingtao 15 | * @date 2020-9-22 22:43 16 | */ 17 | @Service 18 | @Transactional 19 | public class DictionaryService extends CrudService { 20 | 21 | @Autowired 22 | protected DictionaryDao dictionarydao; 23 | 24 | 25 | } -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/base/model/ActivitiParamConfig.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.base.model; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.context.annotation.PropertySource; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * @Title: CommonConfig 10 | * @ProjectName wdata 11 | * @Description: 公共参数设置 12 | * @author anxingtao 13 | * @date 2020-10-9 22:48 14 | */ 15 | @Data 16 | @Component 17 | @ConfigurationProperties(prefix = "com.qingfeng.activiti") 18 | // PropertySource默认取application.properties 19 | @PropertySource(value = "classpath:config/config.properties") 20 | public class ActivitiParamConfig { 21 | 22 | //代码生成屏蔽字段 23 | private String startFlowElementId; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/Const.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util; 2 | 3 | /** 4 | * @Title: Const 5 | * @ProjectName wdata 6 | * @Description: TODO 7 | * @author anxingtao 8 | * @date 2020-9-27 11:28 9 | */ 10 | public class Const { 11 | 12 | public static final String NO_INTERCEPTOR_PATH = ".*/((login)|(toLogin)|(outLogin)|(code)|(getCode)|(api)|(lost_login)|(getToken)|(phoneRecord)|(getScore)|(getScore)|(securityReminder)|(authorize)|(getuserinfo)|(error)|(port)|(orchidport)|(backProperty)|(backParking)|(http)).*"; //不对匹配该值的访问路径拦截(正则) 13 | 14 | 15 | public static final String S_KEY = ".*((select)|(from)).*"; //查询必须匹配 16 | public static final String E_KEY = ".*((insert)|(delete)|(update)|(drop)|(alter)).*"; 17 | 18 | public static final String WX_SAFE_PATH = ""; 19 | 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/framework/datasource/DynamicDataSource.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.datasource; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 6 | 7 | /** 8 | * 9 | * @ClassName DynamicDataSource 10 | * @Description TODO 11 | * @author lide 12 | * @date 2018年2月27日 上午9:34:00 13 | */ 14 | public class DynamicDataSource extends AbstractRoutingDataSource { 15 | 16 | private Logger logger = LoggerFactory.getLogger(this.getClass()); 17 | 18 | @Override 19 | protected Object determineCurrentLookupKey() { 20 | logger.info("数据源为{}",JdbcContextHolder.getDataSource()); 21 | // System.out.println("数据源为{}"+JdbcContextHolder.getDataSource()); 22 | return JdbcContextHolder.getDataSource(); 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/gencode/TemplateMenuSql.sql.ftl: -------------------------------------------------------------------------------- 1 | <#list menuList as obj> 2 | <#if obj.type == 'menu'> 3 | -- 生成菜单 4 | 5 | <#if obj.type == 'button'> 6 | <#if obj.code == 'add'> 7 | -- 生成添加按钮 8 | 9 | <#if obj.code == 'edit'> 10 | -- 生成编辑按钮 11 | 12 | <#if obj.code == 'del'> 13 | -- 生成删除按钮 14 | 15 | <#if obj.code == 'info'> 16 | -- 生成详情按钮 17 | 18 | 19 | insert into system_menu (id,type,name,path,component,title,keepAlive,permission,parent_id,status,order_by,remark,create_time,create_user,create_organize) 20 | values 21 | ('${obj.id}','${obj.type}','${obj.title}','${obj.path}','${obj.component}','${obj.title}','${obj.keepAlive}','${obj.permission}','${obj.parent_id}','${obj.status}','${obj.order_by}','${obj.remark}','${obj.create_time}','${obj.create_user}','${obj.create_organize}'); 22 | 23 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/store/mutation-types.js: -------------------------------------------------------------------------------- 1 | export const ACCESS_TOKEN = 'Access-Token' 2 | 3 | export const SIDEBAR_TYPE = 'sidebar_type' 4 | export const TOGGLE_MOBILE_TYPE = 'is_mobile' 5 | export const TOGGLE_NAV_THEME = 'nav_theme' 6 | export const TOGGLE_LAYOUT = 'layout' 7 | export const TOGGLE_FIXED_HEADER = 'fixed_header' 8 | export const TOGGLE_FIXED_SIDEBAR = 'fixed_sidebar' 9 | export const TOGGLE_CONTENT_WIDTH = 'content_width' 10 | export const TOGGLE_HIDE_HEADER = 'auto_hide_header' 11 | export const TOGGLE_COLOR = 'color' 12 | export const TOGGLE_WEAK = 'weak' 13 | export const TOGGLE_MULTI_TAB = 'multi_tab' 14 | export const APP_LANGUAGE = 'app_language' 15 | 16 | export const CONTENT_WIDTH_TYPE = { 17 | Fluid: 'Fluid', 18 | Fixed: 'Fixed', 19 | } 20 | 21 | export const NAV_THEME = { 22 | LIGHT: 'light', 23 | DARK: 'dark', 24 | } 25 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/jwt/interceptor/CorsConfig.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.jwt.interceptor; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 6 | 7 | /** 8 | * @Title: CorsConfig 9 | * @ProjectName wdata 10 | * @Description: Cors跨域访问配置 11 | * @author anxingtao 12 | * @date 2020-4-23 15:36 13 | */ 14 | @Configuration 15 | public class CorsConfig extends WebMvcConfigurerAdapter { 16 | @Override 17 | public void addCorsMappings(CorsRegistry registry) { 18 | registry.addMapping("/**") 19 | .allowedOrigins("*") 20 | .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE","OPTIONS") 21 | .allowCredentials(false).maxAge(3600); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/example/openHref/Index.vue: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 39 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/entity/SysFile.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.entity; 2 | 3 | import lombok.Data; 4 | import java.io.Serializable; 5 | 6 | @Data 7 | public class SysFile implements Serializable { 8 | 9 | private static final long serialVersionUID = 1L; 10 | 11 | /** 12 | * 盘符路径 13 | */ 14 | private String dirName; 15 | 16 | /** 17 | * 盘符类型 18 | */ 19 | private String sysTypeName; 20 | 21 | /** 22 | * 文件类型 23 | */ 24 | private String typeName; 25 | 26 | /** 27 | * 总大小 28 | */ 29 | private String total; 30 | 31 | /** 32 | * 剩余大小 33 | */ 34 | private String free; 35 | 36 | /** 37 | * 已经使用量 38 | */ 39 | private String used; 40 | 41 | /** 42 | * 资源的使用率 43 | */ 44 | private double usage; 45 | } 46 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/store/modules/async-router.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 向后端请求用户的菜单,动态生成路由 3 | */ 4 | import { constantRouterMap } from '@/config/router.config' 5 | import { generatorDynamicRouter } from '@/router/generator-routers' 6 | 7 | const permission = { 8 | state: { 9 | routers: constantRouterMap, 10 | addRouters: [], 11 | }, 12 | mutations: { 13 | SET_ROUTERS: (state, routers) => { 14 | state.addRouters = routers 15 | state.routers = constantRouterMap.concat(routers) 16 | }, 17 | }, 18 | actions: { 19 | GenerateRoutes ({ commit }, data) { 20 | return new Promise(resolve => { 21 | const { token } = data 22 | generatorDynamicRouter(token).then(routers => { 23 | commit('SET_ROUTERS', routers) 24 | resolve() 25 | }) 26 | }) 27 | }, 28 | }, 29 | } 30 | 31 | export default permission 32 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/server/SessionListener.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.server; 2 | 3 | import javax.servlet.annotation.WebListener; 4 | import javax.servlet.http.HttpSession; 5 | import javax.servlet.http.HttpSessionEvent; 6 | import javax.servlet.http.HttpSessionListener; 7 | 8 | @WebListener 9 | public class SessionListener implements HttpSessionListener { 10 | 11 | private MySessionContext mySessionContext=MySessionContext.getInstance(); 12 | 13 | @Override 14 | public void sessionCreated(HttpSessionEvent se) { 15 | HttpSession session=se.getSession(); 16 | mySessionContext.addSession(session); 17 | } 18 | 19 | @Override 20 | public void sessionDestroyed(HttpSessionEvent se) { 21 | HttpSession session=se.getSession(); 22 | mySessionContext.delSession(session); 23 | } 24 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/dashboard/Welcome.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 32 | 33 | 36 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/jwt/entity/CheckResult.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.jwt.entity; 2 | 3 | import io.jsonwebtoken.Claims; 4 | 5 | /** 6 | * @Title: CheckResult 7 | * @ProjectName wdata 8 | * @Description: 验证信息 9 | * @author anxingtao 10 | * @date 2020-4-23 15:33 11 | */ 12 | public class CheckResult { 13 | private int errCode; 14 | 15 | private boolean success; 16 | 17 | private Claims claims; 18 | 19 | public int getErrCode() { 20 | return errCode; 21 | } 22 | 23 | public void setErrCode(int errCode) { 24 | this.errCode = errCode; 25 | } 26 | 27 | public boolean isSuccess() { 28 | return success; 29 | } 30 | 31 | public void setSuccess(boolean success) { 32 | this.success = success; 33 | } 34 | 35 | public Claims getClaims() { 36 | return claims; 37 | } 38 | 39 | public void setClaims(Claims claims) { 40 | this.claims = claims; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/job/ChickenJob.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.job; 2 | 3 | import org.quartz.*; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * Job 的实例要到该执行它们的时候才会实例化出来。每次 Job 被执行,一个新的 Job 实例会被创建。 9 | * 其中暗含的意思就是你的 Job 不必担心线程安全性,因为同一时刻仅有一个线程去执行给定 Job 类的实例,甚至是并发执行同一 Job 也是如此。 10 | * @DisallowConcurrentExecution 保证上一个任务执行完后,再去执行下一个任务,这里的任务是同一个任务 11 | */ 12 | @DisallowConcurrentExecution 13 | public class ChickenJob implements Job,Serializable { 14 | 15 | private static final long serialVersionUID = 1L; 16 | 17 | @Override 18 | public void execute(JobExecutionContext arg0) throws JobExecutionException { 19 | JobDetail jobDetail = arg0.getJobDetail(); 20 | System.out.println(jobDetail.getDescription()); 21 | System.out.println(jobDetail.getKey().getName()); 22 | System.out.println(jobDetail.getKey().getGroup()); 23 | System.out.println("大吉大利、今晚吃鸡"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /qingfeng-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | com.qingfeng 7 | com.qingfeng 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | com.qingfeng-common 12 | com.qingfeng-common 13 | 14 | 15 | 16 | 17 | javax.mail 18 | javax.mail-api 19 | 1.5.6 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/gencode/mytree.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getListPage (parameter) { 4 | return request({ 5 | url: '/gencode/mytree/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/gencode/mytree/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function delData (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/gencode/mytree/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function findList (parameter) { 32 | return request({ 33 | url: '/gencode/mytree/findList', 34 | method: 'post', 35 | data: parameter 36 | }) 37 | } 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/gencode/mycontent.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getListPage (parameter) { 4 | return request({ 5 | url: '/gencode/mycontent/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/gencode/mycontent/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function delData (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/gencode/mycontent/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function findList (parameter) { 32 | return request({ 33 | url: '/gencode/mycontent/findList', 34 | method: 'post', 35 | data: parameter 36 | }) 37 | } 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/store/app-mixin.js: -------------------------------------------------------------------------------- 1 | import { mapState } from 'vuex' 2 | 3 | const baseMixin = { 4 | computed: { 5 | ...mapState({ 6 | layout: state => state.app.layout, 7 | theme: state => state.app.theme, 8 | primaryColor: state => state.app.color, 9 | colorWeak: state => state.app.weak, 10 | fixedHeader: state => state.app.fixedHeader, 11 | fixedSidebar: state => state.app.fixedSidebar, 12 | contentWidth: state => state.app.contentWidth, 13 | autoHideHeader: state => state.app.autoHideHeader, 14 | 15 | isMobile: state => state.app.isMobile, 16 | sideCollapsed: state => state.app.sideCollapsed, 17 | multiTab: state => state.app.multiTab, 18 | }), 19 | isTopMenu () { 20 | return this.layout === 'topmenu' 21 | }, 22 | }, 23 | methods: { 24 | isSideMenu () { 25 | return !this.isTopMenu 26 | }, 27 | }, 28 | } 29 | 30 | export { 31 | baseMixin, 32 | } 33 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/jwt/constant/SystemConstant.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.jwt.constant; 2 | 3 | 4 | /** 5 | * @Title: SystemConstant 6 | * @ProjectName wdata 7 | * @Description: 系统级静态变量 8 | * @author anxingtao 9 | * @date 2020-4-23 15:35 10 | */ 11 | public class SystemConstant { 12 | /** 13 | * token 14 | */ 15 | public static final int RESCODE_REFTOKEN_MSG = 1006; //刷新TOKEN(有返回数据) 16 | public static final int RESCODE_REFTOKEN = 1007; //刷新TOKEN 17 | 18 | public static final int JWT_ERRCODE_NULL = 4000; //Token不存在 19 | public static final int JWT_ERRCODE_EXPIRE = 4001; //Token过期 20 | public static final int JWT_ERRCODE_FAIL = 4002; //验证不通过 21 | public static final int JWT_ERRCODE_TIMEOUT = 4005; //验证不通过 22 | 23 | /** 24 | * JWT 25 | */ 26 | public static final String JWT_SECERT = "8677df7fc3a34e26a61c034d5ec8245d"; //密匙 27 | public static final long JWT_TTL = 30*60 * 1000; //token有效时间 28 | } 29 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/group.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function getListPage (parameter) { 3 | console.log(parameter); 4 | return request({ 5 | url: '/system/group/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/system/group/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function del (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/system/group/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function updateStatus(id,status) { 32 | return request({ 33 | url: '/system/group/updateStatus', 34 | method: 'post', 35 | data: { 36 | id, 37 | status 38 | } 39 | }) 40 | } 41 | 42 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/layouts/BasicLayout.less: -------------------------------------------------------------------------------- 1 | @import "~ant-design-vue/es/style/themes/default.less"; 2 | 3 | .ant-pro-global-header-index-right { 4 | margin-right: 8px; 5 | 6 | &.ant-pro-global-header-index-dark { 7 | .ant-pro-global-header-index-action { 8 | color: hsla(0, 0%, 100%, .85); 9 | 10 | &:hover { 11 | background: #1890ff; 12 | } 13 | } 14 | } 15 | 16 | .ant-pro-account-avatar { 17 | .antd-pro-global-header-index-avatar { 18 | margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0; 19 | margin-right: 8px; 20 | color: @primary-color; 21 | vertical-align: top; 22 | background: rgba(255, 255, 255, 0.85); 23 | } 24 | } 25 | 26 | .menu { 27 | .anticon { 28 | margin-right: 8px; 29 | } 30 | 31 | .ant-dropdown-menu-item { 32 | min-width: 100px; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/config/defaultSettings.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 项目默认配置项 3 | * primaryColor - 默认主题色, 如果修改颜色不生效,请清理 localStorage 4 | * navTheme - sidebar theme ['dark', 'light'] 两种主题 5 | * colorWeak - 色盲模式 6 | * layout - 整体布局方式 ['sidemenu', 'topmenu'] 两种布局 7 | * fixedHeader - 固定 Header : boolean 8 | * fixSiderbar - 固定左侧菜单栏 : boolean 9 | * contentWidth - 内容区布局: 流式 | 固定 10 | */ 11 | 12 | export default { 13 | navTheme: 'dark', // theme for nav menu 14 | primaryColor: '#52C41A', // primary color of ant design 15 | layout: 'sidemenu', // nav menu position: `sidemenu` or `topmenu` 16 | contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu 17 | fixedHeader: false, // sticky header 18 | fixSiderbar: false, // sticky siderbar 19 | colorWeak: false, 20 | menu: { 21 | locale: true, 22 | }, 23 | title: '青锋管理系统', 24 | pwa: false, 25 | iconfontUrl: '', 26 | production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true', 27 | } 28 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/web/oauthLogin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录 6 | 7 | 8 |

标准登录页面

9 |

表单登录

10 | 11 |

用户名或密码错误

12 |
13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 31 | 32 |
用户名: 17 | 18 |
密码: 23 | 24 |
29 | 30 |
33 |
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/MenuDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: MenuDao 11 | * @ProjectName qingfeng 12 | * @Description: 菜单DAO层 13 | * @author anxingtao 14 | * @date 2020-9-22 22:42 15 | */ 16 | @Mapper 17 | public interface MenuDao extends CrudDao { 18 | 19 | /** 20 | * @Description: findMenuList 21 | * @Param: [pd] 22 | * @return: java.util.List 23 | * @Author: anxingtao 24 | * @Date: 2020-9-27 13:04 25 | */ 26 | List findMenuList(PageData pd); 27 | 28 | /** 29 | * @Description: findAuthMenuList 30 | * @Param: [pd] 31 | * @return: java.util.List 32 | * @Author: anxingtao 33 | * @Date: 2020-9-30 10:52 34 | */ 35 | List findAuthMenuList(PageData pd); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/gencode/TemplateApi.js.ftl: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getListPage (parameter) { 4 | return request({ 5 | url: '/${tablePd.mod_name}/${tablePd.bus_name}/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/${tablePd.mod_name}/${tablePd.bus_name}/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function delData (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/${tablePd.mod_name}/${tablePd.bus_name}/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function findList (parameter) { 32 | return request({ 33 | url: '/${tablePd.mod_name}/${tablePd.bus_name}/findList', 34 | method: 'post', 35 | data: parameter 36 | }) 37 | } 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/MD5.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util; 2 | 3 | import java.security.MessageDigest; 4 | 5 | /** 6 | * @Title: MD5 7 | * @ProjectName wdata 8 | * @Description: MD5 9 | * @author anxingtao 10 | * @date 2018-8-24 11:33 11 | */ 12 | public class MD5 { 13 | 14 | public static String md5(String str) { 15 | try { 16 | MessageDigest md = MessageDigest.getInstance("MD5"); 17 | md.update(str.getBytes()); 18 | byte b[] = md.digest(); 19 | int i; 20 | 21 | StringBuffer buf = new StringBuffer(""); 22 | for (int offset = 0; offset < b.length; offset++) { 23 | i = b[offset]; 24 | if (i < 0){ 25 | i += 256; 26 | } 27 | if (i < 16){ 28 | buf.append("0"); 29 | } 30 | buf.append(Integer.toHexString(i)); 31 | } 32 | str = buf.toString(); 33 | } catch (Exception e) { 34 | e.printStackTrace(); 35 | 36 | } 37 | return str; 38 | } 39 | public static void main(String[] args) { 40 | System.out.println(md5("11111@qq.com"+"123456")); 41 | System.out.println(md5("mj1")); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/quartz/busTask.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function getListPage (parameter) { 3 | return request({ 4 | url: '/quartz/busTask/findListPage', 5 | method: 'post', 6 | data: parameter 7 | }) 8 | } 9 | 10 | export function saveOrUpdate (parameter) { 11 | return request({ 12 | url: '/quartz/busTask/saveOrUpdate', 13 | method: 'post', 14 | data: parameter 15 | }) 16 | } 17 | 18 | export function del (ids) { 19 | return request({ 20 | url: '/quartz/busTask/del?param_ids='+ids, 21 | method: 'get', 22 | headers: { 23 | 'Content-Type': 'application/json;charset=UTF-8', 24 | } 25 | }) 26 | } 27 | 28 | export function stopOrRestore(parameter) { 29 | return request({ 30 | url: '/quartz/busTask/stopOrRestore', 31 | method: 'post', 32 | data: parameter 33 | }) 34 | } 35 | 36 | export function execution(jobName,jobGroup) { 37 | return request({ 38 | url: '/quartz/busTask/execution?jobName='+jobName+'&jobGroup='+jobGroup, 39 | method: 'get' 40 | }) 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/menu.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function geiListPage (parameter) { 3 | return request({ 4 | url: '/system/menu/findListPage', 5 | method: 'post', 6 | data: parameter 7 | }) 8 | } 9 | 10 | export function saveOrUpdate (parameter) { 11 | return request({ 12 | url: '/system/menu/saveOrUpdate', 13 | method: 'post', 14 | data: parameter 15 | }) 16 | } 17 | 18 | export function delData (ids) { 19 | return request({ 20 | url: '/system/menu/del?ids='+ids, 21 | method: 'get', 22 | headers: { 23 | 'Content-Type': 'application/json;charset=UTF-8', 24 | } 25 | }) 26 | } 27 | 28 | export function updateStatus(id,status) { 29 | return request({ 30 | url: '/system/menu/updateStatus', 31 | method: 'post', 32 | data: { 33 | id, 34 | status 35 | } 36 | }) 37 | } 38 | 39 | export function getTreeList (parameter) { 40 | return request({ 41 | url: '/system/menu/findList', 42 | method: 'post', 43 | data: parameter 44 | }) 45 | } 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/service/BusTaskService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.quartz.dao.BusTaskDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | /** 11 | * @Title: BusTaskService 12 | * @ProjectName wdata 13 | * @Description: 业务任务 14 | * @author anxingtao 15 | * @date 2020-10-2 12:04 16 | */ 17 | @Service 18 | @Transactional 19 | public class BusTaskService extends CrudService { 20 | 21 | @Autowired 22 | protected BusTaskDao busTaskDao; 23 | 24 | /** 25 | * @Description: findInfoForNameAndGroup 26 | * @Param: [pd] 27 | * @return: com.qingfeng.util.PageData 28 | * @Author: anxingtao 29 | * @Date: 2020-10-2 12:04 30 | */ 31 | public PageData findInfoForNameAndGroup(PageData pd){ 32 | return busTaskDao.findInfoForNameAndGroup(pd); 33 | } 34 | 35 | 36 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/gencode/service/MycontentService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.gencode.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.gencode.dao.MycontentDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @Title:MycontentService 14 | * @ProjectName com.qingfeng 15 | * @Description: SERVICE层 16 | * @author anxingtao 17 | * @date 2020-9-22 22:44 18 | */ 19 | @Service 20 | @Transactional 21 | public class MycontentService extends CrudService { 22 | 23 | @Autowired 24 | protected MycontentDao mycontentdao; 25 | 26 | /** 27 | * @Description: updateStatus 28 | * @Param: [pd] 29 | * @return: void 30 | * @Author: anxingtao 31 | * @Date: 2020-10-13 11:10 32 | */ 33 | public void updateStatus(PageData pd){ 34 | mycontentdao.updateStatus(pd); 35 | } 36 | 37 | 38 | 39 | 40 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/config/SpringJobFactory.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.config; 2 | 3 | import org.quartz.spi.TriggerFiredBundle; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.beans.factory.config.AutowireCapableBeanFactory; 6 | import org.springframework.scheduling.quartz.AdaptableJobFactory; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @Title: SpringJobFactory 11 | * @ProjectName wdata 12 | * @Description: 解决spring bean注入Job的问题 13 | * @author anxingtao 14 | * @date 2019-6-5 14:38 15 | */ 16 | @Component 17 | public class SpringJobFactory extends AdaptableJobFactory { 18 | @Autowired 19 | private AutowireCapableBeanFactory capableBeanFactory; 20 | 21 | protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception { 22 | // 调用父类的方法 23 | Object jobInstance = super.createJobInstance(bundle); 24 | System.out.println("#############:"+jobInstance); 25 | // 进行注入 26 | capableBeanFactory.autowireBean(jobInstance); 27 | return jobInstance; 28 | } 29 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/PageLoading/PageLoading.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 52 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/model/QuartzEntity.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @Title: 任务类 7 | * @ProjectName wdata 8 | * @Description: TODO 9 | * @author anxingtao 10 | * @date 2019-6-5 15:10 11 | */ 12 | @Data 13 | public class QuartzEntity { 14 | 15 | private String jobName;//任务名称 16 | private String jobGroup;//任务分组 17 | private String description;//任务描述 18 | private String jobClassName;//执行类 19 | private String cronExpression;//执行时间 20 | private String triggerTime;//执行时间 21 | private String triggerState;//任务状态 22 | 23 | private String oldJobName;//任务名称 用于修改 24 | private String oldJobGroup;//任务分组 用于修改 25 | 26 | public QuartzEntity() { 27 | super(); 28 | } 29 | public QuartzEntity(String jobName, String jobGroup, String description, String jobClassName, String cronExpression, String triggerTime) { 30 | super(); 31 | this.jobName = jobName; 32 | this.jobGroup = jobGroup; 33 | this.description = description; 34 | this.jobClassName = jobClassName; 35 | this.cronExpression = cronExpression; 36 | this.triggerTime = triggerTime; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/LoginService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.LoginDao; 5 | import com.qingfeng.system.dao.RoleDao; 6 | import com.qingfeng.util.PageData; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | /** 12 | * @Title: LoginService 13 | * @ProjectName wdata 14 | * @Description: 登录SERVICE层 15 | * @author anxingtao 16 | * @date 2020-9-27 10:20 17 | */ 18 | @Service 19 | @Transactional 20 | public class LoginService extends CrudService { 21 | 22 | @Autowired 23 | protected LoginDao loginDao; 24 | 25 | 26 | /** 27 | * @Description: findUserInfo 28 | * @Param: [pd] 29 | * @return: com.qingfeng.util.PageData 30 | * @Author: anxingtao 31 | * @Date: 2020-9-27 10:20 32 | */ 33 | public PageData findUserInfo(PageData pd){ 34 | return loginDao.findUserInfo(pd); 35 | } 36 | 37 | 38 | 39 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/swagger/相关说明: -------------------------------------------------------------------------------- 1 | @Api:用在请求的类上,表示对类的说明 2 | tags="说明该类的作用,可以在UI界面上看到的注解" 3 | value="该参数没什么意义,在UI界面上也看到,所以不需要配置" 4 | 5 | @ApiOperation:用在请求的方法上,说明方法的用途、作用 6 | value="说明方法的用途、作用" 7 | notes="方法的备注说明" 8 | 9 | @ApiImplicitParams:用在请求的方法上,表示一组参数说明 10 | @ApiImplicitParam:用在@ApiImplicitParams注解中,指定一个请求参数的各个方面 11 | name:参数名 12 | value:参数的汉字说明、解释 13 | required:参数是否必须传 14 | paramType:参数放在哪个地方 15 | · header --> 请求参数的获取:@RequestHeader 16 | · query --> 请求参数的获取:@RequestParam 17 | · path(用于restful接口)--> 请求参数的获取:@PathVariable 18 | · div(不常用) 19 | · form(不常用) 20 | dataType:参数类型,默认String,其它值dataType="Integer" 21 | defaultValue:参数的默认值 22 | 23 | @ApiResponses:用在请求的方法上,表示一组响应 24 | @ApiResponse:用在@ApiResponses中,一般用于表达一个错误的响应信息 25 | code:数字,例如400 26 | message:信息,例如"请求参数没填好" 27 | response:抛出异常的类 28 | 29 | @ApiModel:用于响应类上,表示一个返回响应数据的信息 30 | (这种一般用在post创建的时候,使用@RequestBody这样的场景, 31 | 请求参数无法使用@ApiImplicitParam注解进行描述的时候) 32 | @ApiModelProperty:用在属性上,描述响应类的属性 -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 vueComponent 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/quartz/timTask.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function getListPage (parameter) { 3 | return request({ 4 | url: '/quartz/timTask/findListPage', 5 | method: 'post', 6 | data: parameter 7 | }) 8 | } 9 | 10 | export function saveOrUpdate (parameter) { 11 | return request({ 12 | url: '/quartz/timTask/saveOrUpdate', 13 | method: 'post', 14 | data: parameter 15 | }) 16 | } 17 | 18 | export function del (jobName,jobGroup) { 19 | return request({ 20 | url: '/quartz/timTask/del?jobName='+jobName+'&jobGroup='+jobGroup, 21 | method: 'get', 22 | headers: { 23 | 'Content-Type': 'application/json;charset=UTF-8', 24 | } 25 | }) 26 | } 27 | 28 | export function stopOrRestore(jobName,jobGroup,status) { 29 | return request({ 30 | url: '/quartz/timTask/stopOrRestore?jobName='+jobName+'&jobGroup='+jobGroup+'&status='+status, 31 | method: 'get' 32 | }) 33 | } 34 | 35 | export function execution(jobName,jobGroup) { 36 | return request({ 37 | url: '/quartz/timTask/execution?jobName='+jobName+'&jobGroup='+jobGroup, 38 | method: 'get' 39 | }) 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/servlet/StartService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.servlet; 2 | 3 | /** 4 | * @author anxingtao 5 | * @Title: StartService 6 | * @ProjectName com.qingfeng 7 | * @Description: TODO 8 | * @date 2018-10-2310:21 9 | */ 10 | import org.springframework.boot.ApplicationArguments; 11 | import org.springframework.boot.ApplicationRunner; 12 | import org.springframework.core.annotation.Order; 13 | import org.springframework.stereotype.Component; 14 | 15 | /** 16 | * 继承Application接口后项目启动时会按照执行顺序执行run方法 17 | * 通过设置Order的value来指定执行的顺序 18 | */ 19 | @Component 20 | @Order(value = 1) 21 | public class StartService implements ApplicationRunner { 22 | @Override 23 | public void run(ApplicationArguments applicationArguments) throws Exception { 24 | // System.out.println("#############正在初始FtpServer##############"); 25 | // FtpServer server = FtpServerUtil.getFtpServer(); 26 | // server.start(); 27 | // System.out.println("#############正在初始化企业微信access_token线程##############"); 28 | System.out.println("###############################项目启动成功###############################"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/area.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function geiListPage (parameter) { 3 | console.log(parameter); 4 | return request({ 5 | url: '/system/area/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/system/area/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function delData (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/system/area/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function updateStatus(id,status) { 32 | return request({ 33 | url: '/system/area/updateStatus', 34 | method: 'post', 35 | data: { 36 | id, 37 | status 38 | } 39 | }) 40 | } 41 | 42 | export function getTreeList (parameter) { 43 | return request({ 44 | url: '/system/area/getTreeList', 45 | method: 'post', 46 | data: parameter 47 | }) 48 | } 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/core/directives/action.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import store from '@/store' 3 | 4 | /** 5 | * Action 权限指令 6 | * 指令用法: 7 | * - 在需要控制 action 级别权限的组件上使用 v-action:[method] , 如下: 8 | * 添加用户 9 | * 删除用户 10 | * 修改 11 | * 12 | * - 当前用户没有权限时,组件上使用了该指令则会被隐藏 13 | * - 当后台权限跟 pro 提供的模式不同时,只需要针对这里的权限过滤进行修改即可 14 | * 15 | * @see https://github.com/vueComponent/ant-design-vue-pro/pull/53 16 | */ 17 | const action = Vue.directive('action', { 18 | inserted: function (el, binding, vnode) { 19 | const actionName = binding.arg 20 | const roles = store.getters.roles 21 | const elVal = vnode.context.$route.meta.permission 22 | const permissionId = elVal instanceof String && [elVal] || elVal 23 | roles.permissions.forEach(p => { 24 | if (!permissionId.includes(p.permissionId)) { 25 | return 26 | } 27 | if (p.actionList && !p.actionList.includes(actionName)) { 28 | el.parentNode && el.parentNode.removeChild(el) || (el.style.display = 'none') 29 | } 30 | }) 31 | }, 32 | }) 33 | 34 | export default action 35 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/dictionary.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function getListPage (parameter) { 3 | console.log(parameter); 4 | return request({ 5 | url: '/system/dictionary/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/system/dictionary/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function delData (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/system/dictionary/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function updateStatus(id,status) { 32 | return request({ 33 | url: '/system/dictionary/updateStatus', 34 | method: 'post', 35 | data: { 36 | id, 37 | status 38 | } 39 | }) 40 | } 41 | 42 | export function findDictionaryList (parameter) { 43 | return request({ 44 | url: '/system/dictionary/findList', 45 | method: 'post', 46 | data: parameter 47 | }) 48 | } 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/config/TaskRunner.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.config; 2 | 3 | import com.qingfeng.system.service.RoleService; 4 | import com.qingfeng.util.PageData; 5 | import org.quartz.Scheduler; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.beans.factory.annotation.Qualifier; 10 | import org.springframework.boot.ApplicationArguments; 11 | import org.springframework.boot.ApplicationRunner; 12 | import org.springframework.stereotype.Component; 13 | 14 | /** 15 | * 初始化一个测试Demo任务 16 | * 创建者 17 | * 创建时间 2018年4月3日 18 | */ 19 | @Component 20 | public class TaskRunner implements ApplicationRunner { 21 | 22 | private final static Logger LOGGER = LoggerFactory.getLogger(TaskRunner.class); 23 | 24 | @Autowired 25 | private RoleService roleService; 26 | @Autowired 27 | @Qualifier("Scheduler") 28 | private Scheduler scheduler; 29 | 30 | @SuppressWarnings({ "rawtypes", "unchecked" }) 31 | @Override 32 | public void run(ApplicationArguments var) throws Exception{ 33 | System.out.println("TaskRunner#####:"+roleService.findList(new PageData()).size()); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Area/Info.vue: -------------------------------------------------------------------------------- 1 | 12 | 46 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Organize/Info.vue: -------------------------------------------------------------------------------- 1 | 12 | 46 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Role/Info.vue: -------------------------------------------------------------------------------- 1 | 12 | 46 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/User/Info.vue: -------------------------------------------------------------------------------- 1 | 12 | 46 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/ServletUtils.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util; 2 | 3 | import org.apache.commons.lang3.StringUtils; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | 7 | /** 8 | * 客户端工具类 9 | * 10 | * @author ruoyi 11 | */ 12 | public class ServletUtils 13 | { 14 | 15 | /** 16 | * 是否是Ajax异步请求 17 | * 18 | * @param request 19 | */ 20 | public static boolean isAjaxRequest(HttpServletRequest request) 21 | { 22 | String accept = request.getHeader("accept"); 23 | if (accept != null && accept.indexOf("application/json") != -1) 24 | { 25 | return true; 26 | } 27 | 28 | String xRequestedWith = request.getHeader("X-Requested-With"); 29 | if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) 30 | { 31 | return true; 32 | } 33 | 34 | String uri = request.getRequestURI(); 35 | if (Verify.inStringIgnoreCase(uri, ".json", ".xml")) 36 | { 37 | return true; 38 | } 39 | 40 | String ajax = request.getParameter("__ajax"); 41 | if (Verify.inStringIgnoreCase(ajax, "json", "xml")) 42 | { 43 | return true; 44 | } 45 | return false; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Menu/Info.vue: -------------------------------------------------------------------------------- 1 | 13 | 47 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/upload/ParaUtil.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util.upload; 2 | 3 | public class ParaUtil { 4 | 5 | /** 6 | * 本地基本信息配置 7 | */ 8 | 9 | /** 10 | * @Description: 公共上传 11 | * @Param: 12 | * @return: 13 | * @Author: anxingtao 14 | * @Date: 2020-12-19 12:35 15 | */ 16 | // public static String cloudfile = "http://localhost:8080/pic/"; 17 | public static String cloudfile = "http://xinlingge:8181/pic/"; 18 | // public static String localName = "/home/pic/property/"; 19 | public static String localName = "E://home/pic/qingfeng/"; 20 | public static String projectAddress = "http://localhost:8888"; 21 | 22 | //umeditor上传路径 23 | public static String umeditorAddress = "E:\\项目产品\\青锋\\开源项目\\qingfengThymeleaf\\qingfeng-thymeleaf\\src\\main\\resources\\static\\plugins\\umeditor\\jsp\\"; 24 | /** 25 | * 一级文件夹 26 | */ 27 | //青锋 28 | public static String qingfeng = "com.qingfeng/"; 29 | 30 | 31 | /* 32 | 公共配置 33 | */ 34 | public static String common = "common/"; 35 | 36 | 37 | /* 38 | 数据库 39 | */ 40 | public static String mysql = "mysql/"; 41 | 42 | public static String head_address = "head/address/"; 43 | 44 | 45 | 46 | //activiti 47 | public static String activiti = "activiti/"; 48 | //resource 49 | public static String resource = "resource/"; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Dictionary/Info.vue: -------------------------------------------------------------------------------- 1 | 13 | 47 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Group/Info.vue: -------------------------------------------------------------------------------- 1 | 13 | 47 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/common/controller/TimerController.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.common.controller; 2 | 3 | import com.qingfeng.base.controller.BaseController; 4 | import org.apache.logging.log4j.LogManager; 5 | import org.apache.logging.log4j.Logger; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.scheduling.annotation.EnableScheduling; 8 | import org.springframework.scheduling.annotation.Scheduled; 9 | import org.springframework.stereotype.Component; 10 | import org.springframework.stereotype.Controller; 11 | 12 | 13 | /** 14 | * @Title: TimerController 15 | * @ProjectName wdata 16 | * @Description: 定时器 17 | * @author anxingtao 18 | * @date 2020-10-1 21:40 19 | */ 20 | @Controller 21 | @Configuration 22 | @EnableScheduling 23 | @Component 24 | public class TimerController extends BaseController { 25 | private static Logger logger = LogManager.getLogger(TimerController.class.getName()); 26 | 27 | // @Autowired 28 | // private RoleService roleService; 29 | 30 | @Scheduled(cron = "0 */5 * * * ?") 31 | public void execSql() throws Exception{ 32 | System.out.println("开始执行定时器。。。。"); 33 | } 34 | 35 | 36 | 37 | 38 | @Scheduled(cron = "0 0 2 * * ?") 39 | public void timingBackups() throws Exception { 40 | } 41 | 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/server/MySessionContext.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.server; 2 | 3 | import javax.servlet.http.HttpSession; 4 | import java.util.HashMap; 5 | 6 | public class MySessionContext { 7 | 8 | private static MySessionContext instance; 9 | 10 | private HashMap sessionMap; 11 | 12 | private MySessionContext(){ 13 | sessionMap=new HashMap(); 14 | } 15 | 16 | public static MySessionContext getInstance(){ 17 | if(instance==null){ 18 | instance=new MySessionContext(); 19 | } 20 | return instance; 21 | } 22 | 23 | public synchronized void addSession(HttpSession session){ 24 | if(session!=null){ 25 | sessionMap.put(session.getId(),session); 26 | } 27 | } 28 | 29 | public synchronized void delSession(HttpSession session){ 30 | if(session!=null){ 31 | sessionMap.remove(session.getId()); 32 | } 33 | } 34 | 35 | public synchronized HttpSession getSession(String sessionId){ 36 | System.out.println("#############sessionId:"+sessionId); 37 | if(sessionId!=null){ 38 | return sessionMap.get(sessionId); 39 | }else{ 40 | return null; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Logger/Info.vue: -------------------------------------------------------------------------------- 1 | 13 | 47 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/utils/screenLog.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const printANSI = () => { 3 | // console.clear() 4 | console.log('[antd pro] created()') 5 | // ASCII - ANSI Shadow 6 | let text = ` 7 | ####### #### ## ## ###### ######## ######## ## ## ###### 8 | ## ## ## ### ## ## ## ## ## ### ## ## ## 9 | ## ## ## #### ## ## ## ## #### ## ## 10 | ## ## ## ## ## ## ## #### ###### ###### ## ## ## ## #### 11 | ## ## ## ## ## #### ## ## ## ## ## #### ## ## 12 | ## ## ## ## ### ## ## ## ## ## ### ## ## 13 | ##### ## #### ## ## ###### ## ######## ## ## ###### 14 | \t\t\t\t\tPublished ${APP_VERSION}-${GIT_HASH} @ antdv.com 15 | \t\t\t\t\tBuild date: ${BUILD_DATE}` 16 | console.log(`%c${text}`, 'color: #fc4d50') 17 | console.log('%c感谢使用 青锋 antd pro!', 'color: #000; font-size: 14px; font-family: Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Droid Sans Fallback,Source Sans,Wenquanyi Micro Hei,WenQuanYi Micro Hei Mono,WenQuanYi Zen Hei,Apple LiGothic Medium,SimHei,ST Heiti,WenQuanYi Zen Hei Sharp,sans-serif;') 18 | console.log('%cThanks for using antd pro!', 'color: #fff; font-size: 14px; font-weight: 300; text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;') 19 | } 20 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/RightContent/RightContent.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 57 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/jwt/interceptor/WebAppConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.jwt.interceptor; 2 | import org.springframework.context.annotation.Configuration; 3 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 4 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 5 | 6 | /** 7 | * @Title: WebAppConfigurer 8 | * @ProjectName wdata 9 | * @Description: 拦截配置--调用链 10 | * @author anxingtao 11 | * @date 2020-4-23 15:40 12 | */ 13 | @Configuration 14 | public class WebAppConfigurer extends WebMvcConfigurerAdapter { 15 | 16 | @Override 17 | public void addInterceptors(InterceptorRegistry registry) { 18 | String[] patterns = new String[] { "/vue/common/findGraphicInfo/**","/vue/common/findProductInfo/**","/vue/common/findProductListPage/**","/vue/common/findGraphicListPage/**","/vue/common/findShoworderListPage/**","/vue/login/regist","/vue/login/login","/*.html","/swagger-resources/**"}; 19 | String[] regist = new String[] { "/vue/regist", "/vue/login/login"}; 20 | registry.addInterceptor(new JwtInterceptor()) 21 | .addPathPatterns("/vue/**") 22 | .excludePathPatterns(patterns); 23 | // registry.addInterceptor(new OwnerHandlerInterceptor()) 24 | // .addPathPatterns(regist); 25 | 26 | super.addInterceptors(registry); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/locales/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueI18n from 'vue-i18n' 3 | 4 | // default lang 5 | import zhCN from './lang/zh-CN' 6 | 7 | Vue.use(VueI18n) 8 | 9 | export const defaultLang = 'zh-CN' 10 | 11 | const messages = { 12 | [defaultLang]: { 13 | ...zhCN, 14 | }, 15 | } 16 | 17 | const i18n = new VueI18n({ 18 | silentTranslationWarn: true, 19 | locale: defaultLang, 20 | fallbackLocale: defaultLang, 21 | messages, 22 | }) 23 | 24 | const loadedLanguages = [defaultLang] 25 | 26 | function setI18nLanguage (lang) { 27 | i18n.locale = lang 28 | // request.headers['Accept-Language'] = lang 29 | document.querySelector('html').setAttribute('lang', lang) 30 | return lang 31 | } 32 | 33 | export function loadLanguageAsync (lang = defaultLang) { 34 | return new Promise(resolve => { 35 | // 缓存语言设置 36 | if (i18n.locale !== lang) { 37 | if (!loadedLanguages.includes(lang)) { 38 | return import(/* webpackChunkName: "lang-[request]" */ `./lang/${lang}`).then(msg => { 39 | i18n.setLocaleMessage(lang, msg.default) 40 | loadedLanguages.push(lang) 41 | return setI18nLanguage(lang) 42 | }) 43 | } 44 | return resolve(setI18nLanguage(lang)) 45 | } 46 | return resolve(lang) 47 | }) 48 | } 49 | 50 | export function i18nRender (key) { 51 | return i18n.t(`${key}`) 52 | } 53 | 54 | export default i18n 55 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/quartz.properties: -------------------------------------------------------------------------------- 1 | #org.quartz.scheduler.instanceName = 2 | # 3 | org.quartz.scheduler.instanceName = 4 | org.quartz.scheduler.instanceId=AUTO 5 | org.quartz.jobStore.misfireThreshold=60000 6 | org.quartz.jobStore.isClustered=true 7 | org.quartz.jobStore.clusterCheckinInterval=20000 8 | 9 | org.quartz.threadPool.threadCount = 5 10 | org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX 11 | org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate 12 | org.quartz.jobStore.tablePrefix = QRTZ_ 13 | org.quartz.jobStore.dataSource = myDS 14 | 15 | #MySQL数据源 16 | org.quartz.dataSource.myDS.connectionProvider.class=com.qingfeng.quartz.config.DruidConnectionProvider 17 | org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver 18 | org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/qingfeng_vue?characterEncoding=utf-8 19 | org.quartz.dataSource.myDS.user = root 20 | org.quartz.dataSource.myDS.password = Root@123 21 | org.quartz.dataSource.myDS.maxConnection = 5 22 | 23 | #Oracle数据源 24 | #org.quartz.dataSource.myDS.connectionProvider.class=com.qingfeng.quartz.config.DruidConnectionProvider 25 | #org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver 26 | #org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@localhost:1521:ORCL 27 | #org.quartz.dataSource.myDS.user = wuye 28 | #org.quartz.dataSource.myDS.password = wuye 29 | #org.quartz.dataSource.myDS.maxConnection = 5 30 | 31 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/example/iframe/Index.vue: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 54 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/GroupDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: GroupDao 11 | * @ProjectName qingfeng 12 | * @Description: 用户组DAO层 13 | * @author anxingtao 14 | * @date 2020-9-22 22:42 15 | */ 16 | @Mapper 17 | public interface GroupDao extends CrudDao { 18 | 19 | /** 20 | * @Description: saveGroupUser 21 | * @Param: [pd] 22 | * @return: void 23 | * @Author: anxingtao 24 | * @Date: 2020-9-25 23:04 25 | */ 26 | void saveGroupUser(PageData pd); 27 | 28 | /** 29 | * @Description: findGroupUser 30 | * @Param: [pd] 31 | * @return: java.util.List 32 | * @Author: anxingtao 33 | * @Date: 2020-9-25 23:04 34 | */ 35 | List findGroupUser(PageData pd); 36 | 37 | /** 38 | * @Description: delGroupUser 39 | * @Param: [pd] 40 | * @return: void 41 | * @Author: anxingtao 42 | * @Date: 2020-9-25 23:04 43 | */ 44 | void delGroupUser(PageData pd); 45 | 46 | /** 47 | * @Description: updateGroupUser 48 | * @Param: [pd] 49 | * @return: void 50 | * @Author: anxingtao 51 | * @Date: 2020-9-25 23:08 52 | */ 53 | void updateGroupUser(PageData pd); 54 | 55 | } 56 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/quartz/TimTask/Info.vue: -------------------------------------------------------------------------------- 1 | 23 | 58 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/Iframe/Index.vue: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 48 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/servlet/WebMvcConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.servlet; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.HandlerInterceptor; 6 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 8 | 9 | /** 10 | * 拦截器 11 | * Created by anxingtao on 2018-8-19. 12 | */ 13 | @Configuration 14 | public class WebMvcConfigurer extends WebMvcConfigurerAdapter { 15 | @Override 16 | public void addInterceptors(InterceptorRegistry registry) { 17 | 18 | //注册拦截器 拦截规则 19 | //多个拦截器时 以此添加 执行顺序按添加顺序 20 | // registry.addInterceptor(getHandlerInterceptor()).addPathPatterns("/**/*.do*").addPathPatterns("/"); 21 | registry.addInterceptor(getHandlerInterceptor()).addPathPatterns("/") 22 | .excludePathPatterns("/common/upload/**") 23 | .addPathPatterns("/system/**") 24 | .addPathPatterns("/common/**") 25 | .addPathPatterns("/quartz/**") 26 | .addPathPatterns("/monitor/**") 27 | .addPathPatterns("/gencode/**"); 28 | } 29 | 30 | //后台 31 | @Bean 32 | public static HandlerInterceptor getHandlerInterceptor() { 33 | return new CustomHandlerInterceptor(); 34 | } 35 | 36 | 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/MenuService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.MenuDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @Title: MenuService 14 | * @ProjectName com.qingfeng 15 | * @Description: 菜单SERVICE层 16 | * @author anxingtao 17 | * @date 2020-9-22 22:44 18 | */ 19 | @Service 20 | @Transactional 21 | public class MenuService extends CrudService { 22 | 23 | @Autowired 24 | protected MenuDao menudao; 25 | 26 | /** 27 | * @Description: findMenuList 28 | * @Param: [pd] 29 | * @return: java.util.List 30 | * @Author: anxingtao 31 | * @Date: 2020-9-27 13:09 32 | */ 33 | public List findMenuList(PageData pd){ 34 | return menudao.findMenuList(pd); 35 | } 36 | 37 | /** 38 | * @Description: findAuthMenuList 39 | * @Param: [pd] 40 | * @return: java.util.List 41 | * @Author: anxingtao 42 | * @Date: 2020-9-30 10:51 43 | */ 44 | public List findAuthMenuList(PageData pd){ 45 | return menudao.findAuthMenuList(pd); 46 | } 47 | 48 | 49 | 50 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/job/MessageJob.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.job; 2 | 3 | import com.qingfeng.quartz.service.BusTaskService; 4 | import com.qingfeng.util.PageData; 5 | import org.quartz.*; 6 | 7 | import javax.annotation.Resource; 8 | import java.io.Serializable; 9 | 10 | 11 | /** 12 | * @author anxingtao 13 | * @Title: MessageJob 14 | * @ProjectName property 15 | * @Description: TODO 16 | * @date 2019-10-3113:47 17 | */ 18 | @DisallowConcurrentExecution 19 | public class MessageJob implements Job,Serializable { 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @Resource 24 | private BusTaskService busTaskService; 25 | 26 | 27 | @Override 28 | public void execute(JobExecutionContext arg0) throws JobExecutionException { 29 | JobDetail jobDetail = arg0.getJobDetail(); 30 | System.out.println("=================开始执行==================="); 31 | System.out.println(jobDetail.getDescription()); 32 | System.out.println(jobDetail.getKey().getName()); 33 | System.out.println(jobDetail.getKey().getGroup()); 34 | System.out.println("roleService.findList:"+busTaskService.findList(new PageData()).size());; 35 | System.out.println("###########注入:"+busTaskService); 36 | //查询用户 37 | // String[] data = jobDetail.getDescription().split("#"); 38 | // String[] user_names = data[1].split(",");//根据用户名查询用户信息 39 | 40 | 41 | System.out.println("====================消息===================="); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/role.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function getListPage (parameter) { 3 | console.log(parameter); 4 | return request({ 5 | url: '/system/role/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/system/role/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function del (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/system/role/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function updateStatus(id,status) { 32 | return request({ 33 | url: '/system/role/updateStatus', 34 | method: 'post', 35 | data: { 36 | id, 37 | status 38 | } 39 | }) 40 | } 41 | 42 | export function updateAuth (parameter) { 43 | return request({ 44 | url: '/system/role/updateAuth', 45 | method: 'post', 46 | data: parameter 47 | }) 48 | } 49 | 50 | 51 | export function findRoleMenuList (parameter) { 52 | return request({ 53 | url: '/system/role/findRoleMenuList', 54 | method: 'post', 55 | data: parameter 56 | }) 57 | } 58 | 59 | 60 | 61 | 62 | export function getServiceList (parameter) { 63 | return request({ 64 | url: "", 65 | method: 'get', 66 | params: parameter 67 | }) 68 | } 69 | 70 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/entity/Cpu.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.entity; 2 | 3 | import com.qingfeng.util.CalculationUtil; 4 | import lombok.Data; 5 | 6 | import java.io.Serializable; 7 | 8 | @Data 9 | public class Cpu implements Serializable { 10 | private static final long serialVersionUID = 1L; 11 | 12 | /** 13 | * 核心数 14 | */ 15 | private int cpuNum; 16 | 17 | /** 18 | * CPU总的使用率 19 | */ 20 | private double total; 21 | 22 | /** 23 | * CPU系统使用率 24 | */ 25 | private double sys; 26 | 27 | /** 28 | * CPU用户使用率 29 | */ 30 | private double used; 31 | 32 | /** 33 | * CPU当前等待率 34 | */ 35 | private double wait; 36 | 37 | /** 38 | * CPU当前空闲率 39 | */ 40 | private double free; 41 | 42 | 43 | public double getTotal() { 44 | return CalculationUtil.round(CalculationUtil.multiply(total+"", "100"), 2); 45 | } 46 | 47 | public double getSys() { 48 | return CalculationUtil.round(CalculationUtil.multiply((sys/total)+"", "100"), 2); 49 | } 50 | 51 | public double getUsed() { 52 | return CalculationUtil.round(CalculationUtil.multiply((used / total)+"", "100"), 2); 53 | } 54 | 55 | public double getWait() { 56 | return CalculationUtil.round(CalculationUtil.multiply((wait / total)+"", "100"), 2); 57 | } 58 | 59 | public double getFree() { 60 | return CalculationUtil.round(CalculationUtil.multiply((free / total)+"", "100"), 2); 61 | } 62 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/organize.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | export function geiListPage (parameter) { 3 | console.log(parameter); 4 | return request({ 5 | url: '/system/organize/findListPage', 6 | method: 'post', 7 | data: parameter 8 | }) 9 | } 10 | 11 | export function saveOrUpdate (parameter) { 12 | console.log(parameter); 13 | return request({ 14 | url: '/system/organize/saveOrUpdate', 15 | method: 'post', 16 | data: parameter 17 | }) 18 | } 19 | 20 | export function delData (ids) { 21 | console.log(ids); 22 | return request({ 23 | url: '/system/organize/del?ids='+ids, 24 | method: 'get', 25 | headers: { 26 | 'Content-Type': 'application/json;charset=UTF-8', 27 | } 28 | }) 29 | } 30 | 31 | export function updateStatus(id,status) { 32 | return request({ 33 | url: '/system/organize/updateStatus', 34 | method: 'post', 35 | data: { 36 | id, 37 | status 38 | } 39 | }) 40 | } 41 | 42 | export function getTreeList (parameter) { 43 | return request({ 44 | url: '/system/organize/getTreeList', 45 | method: 'post', 46 | data: parameter 47 | }) 48 | } 49 | 50 | 51 | export function getRoleAuth (parameter) { 52 | return request({ 53 | url: '/system/organize/findRoleAuth', 54 | method: 'post', 55 | data: parameter 56 | }) 57 | } 58 | 59 | 60 | export function updateAuth (parameter) { 61 | return request({ 62 | url: '/system/organize/updateAuth', 63 | method: 'post', 64 | data: parameter 65 | }) 66 | } 67 | 68 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/quartz/busTask/Info.vue: -------------------------------------------------------------------------------- 1 | 26 | 61 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/core/bootstrap.js: -------------------------------------------------------------------------------- 1 | import store from '@/store' 2 | import storage from 'store' 3 | import { 4 | ACCESS_TOKEN, 5 | APP_LANGUAGE, 6 | TOGGLE_CONTENT_WIDTH, 7 | TOGGLE_FIXED_HEADER, 8 | TOGGLE_FIXED_SIDEBAR, TOGGLE_HIDE_HEADER, 9 | TOGGLE_LAYOUT, TOGGLE_NAV_THEME, TOGGLE_WEAK, 10 | TOGGLE_COLOR, TOGGLE_MULTI_TAB, 11 | } from '@/store/mutation-types' 12 | import { printANSI } from '@/utils/screenLog' 13 | import defaultSettings from '@/config/defaultSettings' 14 | 15 | export default function Initializer () { 16 | printANSI() // 请自行移除该行. please remove this line 17 | 18 | store.commit(TOGGLE_LAYOUT, storage.get(TOGGLE_LAYOUT, defaultSettings.layout)) 19 | store.commit(TOGGLE_FIXED_HEADER, storage.get(TOGGLE_FIXED_HEADER, defaultSettings.fixedHeader)) 20 | store.commit(TOGGLE_FIXED_SIDEBAR, storage.get(TOGGLE_FIXED_SIDEBAR, defaultSettings.fixSiderbar)) 21 | store.commit(TOGGLE_CONTENT_WIDTH, storage.get(TOGGLE_CONTENT_WIDTH, defaultSettings.contentWidth)) 22 | store.commit(TOGGLE_HIDE_HEADER, storage.get(TOGGLE_HIDE_HEADER, defaultSettings.autoHideHeader)) 23 | store.commit(TOGGLE_NAV_THEME, storage.get(TOGGLE_NAV_THEME, defaultSettings.navTheme)) 24 | store.commit(TOGGLE_WEAK, storage.get(TOGGLE_WEAK, defaultSettings.colorWeak)) 25 | store.commit(TOGGLE_COLOR, storage.get(TOGGLE_COLOR, defaultSettings.primaryColor)) 26 | store.commit(TOGGLE_MULTI_TAB, storage.get(TOGGLE_MULTI_TAB, defaultSettings.multiTab)) 27 | store.commit('SET_TOKEN', storage.get(ACCESS_TOKEN)) 28 | 29 | store.dispatch('setLang', storage.get(APP_LANGUAGE, 'zh-CN')) 30 | // last step 31 | } 32 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/AddressUtils.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.qingfeng.util.http.HttpUtils; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | /** 9 | * @Title: AddressUtils 10 | * @ProjectName wdata 11 | * @Description: 获取地址类 12 | * @author anxingtao 13 | * @date 2020-10-3 21:37 14 | */ 15 | public class AddressUtils 16 | { 17 | private static final Logger log = LoggerFactory.getLogger(AddressUtils.class); 18 | 19 | // IP地址查询 20 | public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp"; 21 | 22 | // 未知地址 23 | public static final String UNKNOWN = "XX XX"; 24 | 25 | public static String getRealAddressByIP(String ip) 26 | { 27 | String address = UNKNOWN; 28 | // 内网不查询 29 | if (IpUtils.internalIp(ip)) 30 | { 31 | return "内网IP"; 32 | } 33 | try 34 | { 35 | String rspStr = HttpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", "GBK"); 36 | if (Verify.verifyIsNull(rspStr)) 37 | { 38 | log.error("获取地理位置异常 {}", ip); 39 | return UNKNOWN; 40 | } 41 | JSONObject obj = JSONObject.parseObject(rspStr); 42 | String region = obj.getString("pro"); 43 | String city = obj.getString("city"); 44 | return String.format("%s %s", region, city); 45 | } 46 | catch (Exception e) 47 | { 48 | log.error("获取地理位置异常 {}", e); 49 | } 50 | return address; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/system/gencode.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | //查询表列表 4 | export function getTableListPage (parameter) { 5 | return request({ 6 | url: '/system/gencode/findTableListPage', 7 | method: 'post', 8 | data: parameter 9 | }) 10 | } 11 | 12 | //执行表的保存 13 | export function save (parameter) { 14 | return request({ 15 | url: '/system/gencode/save', 16 | method: 'post', 17 | data: parameter 18 | }) 19 | } 20 | 21 | //查询分页列表 22 | export function getListPage (parameter) { 23 | return request({ 24 | url: '/system/gencode/findListPage', 25 | method: 'post', 26 | data: parameter 27 | }) 28 | } 29 | 30 | //查询详情 31 | export function findInfo (id) { 32 | return request({ 33 | url: '/system/gencode/findInfo?id='+id, 34 | method: 'get', 35 | headers: { 36 | 'Content-Type': 'application/json;charset=UTF-8', 37 | } 38 | }) 39 | } 40 | 41 | //更新 42 | export function update (parameter) { 43 | return request({ 44 | url: '/system/gencode/update', 45 | method: 'post', 46 | data: parameter 47 | }) 48 | } 49 | 50 | //执行删除 51 | export function delData (ids) { 52 | return request({ 53 | url: '/system/gencode/del?ids='+ids, 54 | method: 'get', 55 | headers: { 56 | 'Content-Type': 'application/json;charset=UTF-8', 57 | } 58 | }) 59 | } 60 | 61 | //代码生成gencode 62 | export function gencode(id) { 63 | return request({ 64 | url: '/system/gencode/gencode?id='+id, 65 | method: 'get', 66 | headers: { 67 | 'Content-Type': 'application/json;charset=UTF-8', 68 | } 69 | }) 70 | } 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: [ 7 | 'plugin:vue/strongly-recommended', 8 | '@vue/standard', 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint', 12 | }, 13 | rules: { 14 | // enUS: all rules docs https://eslint.org/docs/rules/ 15 | // zhCN: 所有规则文档 https://eslint.bootcss.com/docs/rules/ 16 | // 基础规则 全部 ES 项目通用 17 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 18 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 19 | 'quote-props': 'off', 20 | // 结尾必须有逗号(主要缓解增加一行对象属性,导致 git 变更记录是两行的情况) 21 | 'comma-dangle': ['error', 'always-multiline'], 22 | // 逗号必须在一行的结尾 23 | 'comma-style': ['error', 'last'], 24 | // 禁止混合使用不同的操作符 'error','off' 25 | 'no-mixed-operators': 'off', 26 | // 禁止未使用过的变量 default: ['error', { vars: 'local' }] 27 | 'no-unused-vars': ['off'], 28 | 29 | /* vue 项目专用 */ 30 | 'vue/require-default-prop': 'warn', 31 | 'vue/singleline-html-element-content-newline': ['off'], 32 | 'vue/max-attributes-per-line': [ 33 | 2, 34 | { 35 | 'singleline': 5, 36 | 'multiline': { 37 | 'max': 1, 38 | 'allowFirstLine': false, 39 | }, 40 | }, 41 | ], 42 | 43 | // bug fix 44 | 'template-curly-spacing': 'off', 45 | indent: 'off', 46 | }, 47 | overrides: [ 48 | { 49 | files: [ 50 | '**/__tests__/*.{j,t}s?(x)', 51 | '**/tests/unit/**/*.spec.{j,t}s?(x)', 52 | ], 53 | env: { 54 | jest: true, 55 | }, 56 | }, 57 | ], 58 | } 59 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/port/controller/SwaggerTestController.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.port.controller; 2 | 3 | import com.qingfeng.base.controller.BaseController; 4 | import com.qingfeng.util.Json; 5 | import com.qingfeng.util.PageData; 6 | import io.swagger.annotations.Api; 7 | import io.swagger.annotations.ApiOperation; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import java.io.IOException; 15 | 16 | /** 17 | * @Title: MytreeController 18 | * @ProjectName com.qingfeng 19 | * @Description: Controller层 20 | * @author anxingtao 21 | * @date 2020-9-22 22:45 22 | */ 23 | @Api(tags = "swagger案例接口") 24 | @Controller 25 | @RequestMapping(value = "/port/swaggerTest") 26 | public class SwaggerTestController extends BaseController { 27 | 28 | 29 | /** 30 | * @Description: findList 31 | * @Param: [request, response] 32 | * @return: void 33 | * @Author: anxingtao 34 | * @Date: 2020-9-22 22:51 35 | */ 36 | @ApiOperation("查询列表数据") 37 | @RequestMapping(value = "/findList", method = RequestMethod.GET) 38 | public void findList(HttpServletRequest request, HttpServletResponse response) throws IOException { 39 | PageData pd = new PageData(request); 40 | Json json = new Json(); 41 | json.setMsg("获取数据成功。"); 42 | json.setData(pd); 43 | json.setSuccess(true); 44 | this.writeJson(response,json); 45 | } 46 | 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/servlet/SqlCostInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.servlet; 2 | 3 | 4 | import org.apache.ibatis.executor.statement.StatementHandler; 5 | import org.apache.ibatis.plugin.*; 6 | import org.apache.ibatis.session.ResultHandler; 7 | import org.apache.logging.log4j.LogManager; 8 | import org.apache.logging.log4j.Logger; 9 | 10 | import java.sql.Statement; 11 | import java.util.Properties; 12 | 13 | @Intercepts({@Signature(type = StatementHandler.class, method = "query", args = {Statement.class, ResultHandler.class}), 14 | @Signature(type = StatementHandler.class, method = "update", args = {Statement.class}), 15 | @Signature(type = StatementHandler.class, method = "batch", args = { Statement.class })}) 16 | public class SqlCostInterceptor implements Interceptor { 17 | 18 | static final Logger logger = LogManager.getLogger(SqlCostInterceptor.class.getName()); 19 | 20 | @Override 21 | public Object intercept(Invocation invocation) throws Throwable { 22 | 23 | long startTime = System.currentTimeMillis(); 24 | try { 25 | return invocation.proceed(); 26 | } finally { 27 | long endTime = System.currentTimeMillis(); 28 | long sqlCost = endTime - startTime; 29 | logger.info("执行耗时 : [" + sqlCost + "ms ] "); 30 | // System.out.println("执行耗时 : [" + sqlCost + "ms ] "); 31 | } 32 | } 33 | 34 | @Override 35 | public Object plugin(Object target) { 36 | return Plugin.wrap(target, this); 37 | } 38 | 39 | @Override 40 | public void setProperties(Properties properties) { 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/SerializeUtils.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util; 2 | 3 | import org.apache.commons.lang3.SerializationUtils; 4 | import org.apache.shiro.codec.Base64; 5 | import org.apache.shiro.session.Session; 6 | 7 | import java.io.Serializable; 8 | import java.util.Collection; 9 | import java.util.LinkedList; 10 | import java.util.List; 11 | 12 | /** 13 | * @author xiao 14 | * @date 2018/3/24 15 | */ 16 | public class SerializeUtils extends SerializationUtils{ 17 | 18 | public static String serializeToString(Serializable obj) { 19 | try { 20 | byte[] value = serialize(obj); 21 | return Base64.encodeToString(value); 22 | } catch (Exception e) { 23 | throw new RuntimeException("serialize session error", e); 24 | } 25 | } 26 | 27 | public static Session deserializeFromString(String base64) { 28 | try { 29 | byte[] objectData = Base64.decode(base64); 30 | return deserialize(objectData); 31 | } catch (Exception e) { 32 | throw new RuntimeException("deserialize session error", e); 33 | } 34 | } 35 | 36 | public static Collection deserializeFromStringController(Collection base64s) { 37 | try { 38 | List list = new LinkedList<>(); 39 | for (String base64 : base64s) { 40 | byte[] objectData = Base64.decode(base64); 41 | T t = deserialize(objectData); 42 | list.add(t); 43 | } 44 | return list; 45 | } catch (Exception e) { 46 | throw new RuntimeException("deserialize session error", e); 47 | } 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/docTemp/oweLetter.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <#list list as p> 6 | 19 | 20 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/web/oauthGrant.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 确认授权页面 6 | 7 | 8 | 9 | 30 | 31 | 32 |
33 |
34 | 35 |

是否授权:clientId

36 |
37 |
38 | 39 | 40 | 41 | 42 |
43 |
44 |
45 |
46 | 47 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/swagger/Swagger3Config.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.swagger;//package com.qingfeng.framework.swagger; 2 | 3 | import io.swagger.annotations.ApiOperation; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import springfox.documentation.builders.ApiInfoBuilder; 7 | import springfox.documentation.builders.PathSelectors; 8 | import springfox.documentation.builders.RequestHandlerSelectors; 9 | import springfox.documentation.service.ApiInfo; 10 | import springfox.documentation.service.Contact; 11 | import springfox.documentation.spi.DocumentationType; 12 | import springfox.documentation.spring.web.plugins.Docket; 13 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 14 | 15 | /** 16 | * @Title: Swagger3Config 17 | * @ProjectName wdata 18 | * @Description: TODO 19 | * @author anxingtao 20 | * @date 2020-10-18 11:33 21 | */ 22 | @Configuration 23 | @EnableSwagger2 24 | public class Swagger3Config { 25 | @Bean 26 | public Docket createRestApi() { 27 | return new Docket(DocumentationType.OAS_30) 28 | .apiInfo(apiInfo()) 29 | .select() 30 | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) 31 | .paths(PathSelectors.any()) 32 | .build(); 33 | } 34 | 35 | private ApiInfo apiInfo() { 36 | return new ApiInfoBuilder() 37 | .title("青锋在线接口文档") 38 | .description("更多请求内容请联系青锋客服。") 39 | .contact(new Contact("com.qingfeng", "http://www.com.qingfeng.cn", "axtaxt@163.com")) 40 | .version("1.0") 41 | .build(); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/api/auth/login.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | import store from '@/store' 3 | /** 4 | * login func 5 | * parameter: { 6 | * username: '', 7 | * password: '', 8 | * remember_me: true, 9 | * captcha: '12345' 10 | * } 11 | * @param parameter 12 | * @returns {*} 13 | */ 14 | export function login (parameter) { 15 | return request({ 16 | url: '/system/login/login', 17 | method: 'post', 18 | data: parameter, 19 | }) 20 | } 21 | 22 | 23 | export function getInfo () { 24 | return request({ 25 | url: '/system/user/findUserInfo', 26 | method: 'get', 27 | headers: { 28 | 'Content-Type': 'application/json;charset=UTF-8', 29 | }, 30 | }) 31 | } 32 | 33 | export function logout () { 34 | return request({ 35 | url: '/system/login/outLogin', 36 | method: 'get', 37 | headers: { 38 | 'Content-Type': 'application/json;charset=UTF-8', 39 | }, 40 | }) 41 | } 42 | 43 | export function getLoginUser () { 44 | return request({ 45 | url: '/system/user/findLoginUser', 46 | method: 'get', 47 | headers: { 48 | 'Content-Type': 'application/json;charset=UTF-8', 49 | }, 50 | }) 51 | } 52 | 53 | export function updateUser (parameter) { 54 | return request({ 55 | url: '/system/user/updateUser', 56 | method: 'post', 57 | data: parameter, 58 | }) 59 | } 60 | 61 | export function updatePwd (parameter) { 62 | return request({ 63 | url: '/system/user/updateMyPwd', 64 | method: 'post', 65 | data: parameter, 66 | }) 67 | } 68 | 69 | export function updateSwitchOrganize (parameter) { 70 | return request({ 71 | url: '/system/user/updateSwitchOrganize', 72 | method: 'post', 73 | data: parameter, 74 | }) 75 | } 76 | 77 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/OrganizeDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: OrganizeDao 11 | * @ProjectName qingfeng 12 | * @Description: 组织DAO层 13 | * @author anxingtao 14 | * @date 2020-9-22 22:42 15 | */ 16 | @Mapper 17 | public interface OrganizeDao extends CrudDao { 18 | 19 | 20 | /** 21 | * @Description: findOrganizeRoleList 22 | * @Param: [pd] 23 | * @return: java.util.List 24 | * @Author: anxingtao 25 | * @Date: 2020-9-26 15:57 26 | */ 27 | List findOrganizeRoleList(PageData pd); 28 | 29 | /** 30 | * @Description: delOrganizeRole 31 | * @Param: [pd] 32 | * @return: void 33 | * @Author: anxingtao 34 | * @Date: 2020-9-26 16:10 35 | */ 36 | void delOrganizeRole(PageData pd); 37 | 38 | /** 39 | * @Description: saveOrganizeRole 40 | * @Param: [list] 41 | * @return: void 42 | * @Author: anxingtao 43 | * @Date: 2020-9-26 16:33 44 | */ 45 | void saveOrganizeRole(List list); 46 | 47 | /** 48 | * @Description: findTreeTableList 49 | * @Param: [pd] 50 | * @return: java.util.List 51 | * @Author: anxingtao 52 | * @Date: 2020-9-26 21:54 53 | */ 54 | List findTreeTableList(PageData pd); 55 | 56 | /** 57 | * @Description: updateUserLeader 58 | * @Param: [pd] 59 | * @return: void 60 | * @Author: anxingtao 61 | * @Date: 2020-11-15 9:35 62 | */ 63 | void updateUserLeader(PageData pd); 64 | 65 | } 66 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/README.md: -------------------------------------------------------------------------------- 1 | English | [简体中文](./README.zh-CN.md) 2 | 3 |

Ant Design Vue Pro

4 |
5 | An out-of-box UI solution for enterprise applications as a Vue boilerplate. based on Ant Design of Vue 6 |
7 | 8 |
9 | 10 | [![License](https://img.shields.io/npm/l/package.json.svg?style=flat)](https://github.com/vueComponent/ant-design-vue-pro/blob/master/LICENSE) 11 | [![Release](https://img.shields.io/github/release/vueComponent/ant-design-vue-pro.svg?style=flat)](https://github.com/vueComponent/ant-design-vue-pro/releases/latest) 12 | [![Travis branch](https://travis-ci.org/vueComponent/ant-design-vue-pro.svg?branch=master)](https://travis-ci.org/vueComponent/ant-design-vue-pro) 13 | 14 |
15 | 16 | - Preview: https://preview.pro.antdv.com 17 | - Home Page: https://pro.antdv.com 18 | - Documentation: https://pro.antdv.com/docs/getting-started 19 | - ChangeLog: https://pro.antdv.com/docs/changelog 20 | - FAQ: https://pro.antdv.com/docs/faq 21 | 22 | Overview 23 | ---- 24 | 25 | ![dashboard](https://static-2.loacg.com/open/static/github/sp3.png) 26 | 27 | ### Env and dependencies 28 | 29 | - node 30 | - eslint 31 | - @vue/cli 32 | - [ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue 33 | 34 | ## Project setup 35 | ``` 36 | npm install 37 | ``` 38 | 39 | ### Compiles and hot-reloads for development 40 | ``` 41 | npm run serve 42 | ``` 43 | 44 | ### Compiles and minifies for production 45 | ``` 46 | npm run build 47 | ``` 48 | 49 | ### Lints and fixes files 50 | ``` 51 | npm run lint 52 | ``` 53 | 54 | ### Customize configuration 55 | See [Configuration Reference](https://cli.vuejs.org/config/). 56 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/controller/SystemHardwareController.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.controller; 2 | 3 | import com.qingfeng.base.controller.BaseController; 4 | import com.qingfeng.framework.monitor.server.SystemHardwareServer; 5 | import com.qingfeng.util.Json; 6 | import io.swagger.annotations.Api; 7 | import io.swagger.annotations.ApiOperation; 8 | import org.springframework.http.HttpHeaders; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.RequestHeader; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | 14 | import javax.servlet.http.HttpServletResponse; 15 | 16 | /** 17 | * @Title: SystemHardwareController 18 | * @ProjectName wdata 19 | * @Description: 监控服务 20 | * @author anxingtao 21 | * @date 2020-10-2 21:43 22 | */ 23 | @Api(tags = "服务监控信息接口") 24 | @Controller 25 | @RequestMapping(value = "/monitor/server") 26 | public class SystemHardwareController extends BaseController { 27 | 28 | /** 29 | * @Description: systemHardware 30 | * @Param: [headers, response] 31 | * @return: void 32 | * @Author: anxingtao 33 | * @Date: 2021-1-1 18:22 34 | */ 35 | @ApiOperation("查询服务监控数据接口") 36 | @RequestMapping(value = "/systemHardware", method = RequestMethod.GET) 37 | public void systemHardware(@RequestHeader HttpHeaders headers, HttpServletResponse response) throws Exception { 38 | SystemHardwareServer server = new SystemHardwareServer(); 39 | server.copyTo(); 40 | Json json = new Json(); 41 | json.setData(server); 42 | json.setSuccess(true); 43 | json.setMsg("操作成功。"); 44 | this.writeJson(response,json); 45 | } 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/dao/RoleDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: RoleDao 11 | * @ProjectName qingfeng 12 | * @Description: 角色DAO层 13 | * @author anxingtao 14 | * @date 2020-9-22 22:42 15 | */ 16 | @Mapper 17 | public interface RoleDao extends CrudDao { 18 | 19 | 20 | /** 21 | * @Description: findRoleMenuList 22 | * @Param: [pd] 23 | * @return: java.util.List 24 | * @Author: anxingtao 25 | * @Date: 2020-9-26 14:53 26 | */ 27 | List findRoleMenuList(PageData pd); 28 | 29 | /** 30 | * @Description: delRoleMenu 31 | * @Param: [pd] 32 | * @return: void 33 | * @Author: anxingtao 34 | * @Date: 2020-9-26 15:00 35 | */ 36 | void delRoleMenu(PageData pd); 37 | 38 | /** 39 | * @Description: saveRoleMenu 40 | * @Param: [list] 41 | * @return: java.util.List 42 | * @Author: anxingtao 43 | * @Date: 2020-9-26 15:12 44 | */ 45 | void saveRoleMenu(List list); 46 | 47 | /** 48 | * @Description: findSimpleList 49 | * @Param: [pd] 50 | * @return: java.util.List 51 | * @Author: anxingtao 52 | * @Date: 2020-9-26 16:33 53 | */ 54 | List findSimpleList(PageData pd); 55 | 56 | /** 57 | * @Description: findUserRoleList 58 | * @Param: [pd] 59 | * @return: java.util.List 60 | * @Author: anxingtao 61 | * @Date: 2020-9-30 10:36 62 | */ 63 | List findUserRoleList(PageData pd); 64 | 65 | } 66 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/entity/Mem.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.entity; 2 | 3 | import com.qingfeng.util.CalculationUtil; 4 | import lombok.Data; 5 | 6 | import java.io.Serializable; 7 | 8 | @Data 9 | public class Mem implements Serializable { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | /** 14 | * 内存总量 15 | */ 16 | private double total; 17 | 18 | /** 19 | * 已用内存 20 | */ 21 | private double used; 22 | 23 | /** 24 | * 剩余内存 25 | */ 26 | private double free; 27 | 28 | public double getTotal() { 29 | String value = ""; 30 | try { 31 | value = CalculationUtil.divide(total+"", (1024 * 1024 * 1024)+"", 2); 32 | }catch (Exception e){ 33 | e.printStackTrace(); 34 | } 35 | return Double.parseDouble(value); 36 | } 37 | 38 | public double getUsed() { 39 | String value = ""; 40 | try { 41 | value = CalculationUtil.divide(used+"", (1024 * 1024 * 1024)+"", 2); 42 | }catch (Exception e){ 43 | e.printStackTrace(); 44 | } 45 | return Double.parseDouble(value); 46 | } 47 | 48 | 49 | public double getFree() { 50 | String value = ""; 51 | try { 52 | value = CalculationUtil.divide(free+"", (1024 * 1024 * 1024)+"", 2); 53 | }catch (Exception e){ 54 | e.printStackTrace(); 55 | } 56 | return Double.parseDouble(value); 57 | } 58 | 59 | public double getUsage() { 60 | String value = ""; 61 | try { 62 | value = CalculationUtil.multiply(CalculationUtil.divide(used+"", total+"", 4), "100"); 63 | }catch (Exception e){ 64 | e.printStackTrace(); 65 | } 66 | return Double.parseDouble(value); 67 | } 68 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/monitor/server/UserOnlineListener.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.monitor.server; 2 | 3 | import com.qingfeng.util.PageData; 4 | 5 | import javax.servlet.ServletContext; 6 | import javax.servlet.http.HttpSession; 7 | import javax.servlet.http.HttpSessionBindingEvent; 8 | import javax.servlet.http.HttpSessionBindingListener; 9 | 10 | public class UserOnlineListener implements HttpSessionBindingListener { 11 | 12 | private PageData userMap; 13 | 14 | public UserOnlineListener(PageData userMap){ 15 | this.userMap=userMap; 16 | } 17 | 18 | @Override 19 | public void valueBound(HttpSessionBindingEvent event) { 20 | HttpSession session=event.getSession(); 21 | ServletContext application=session.getServletContext(); 22 | //从application获取当前登录用户列表 23 | PageData userOnlineObj= (PageData) application.getAttribute("userOnlineObj"); 24 | //如果该属性不存在,则初始化 25 | if(userOnlineObj==null){ 26 | userOnlineObj=new PageData(); 27 | application.setAttribute("userOnlineObj",userOnlineObj); 28 | } 29 | //将当前用户添加至用户列表 30 | userOnlineObj.putAll(this.userMap); 31 | System.out.println("session属性绑定=======>"+this.userMap); 32 | } 33 | 34 | @Override 35 | public void valueUnbound(HttpSessionBindingEvent event) { 36 | HttpSession session=event.getSession(); 37 | ServletContext application=session.getServletContext(); 38 | //从application获取当前登录用户列表 39 | PageData userOnlineObj= (PageData) application.getAttribute("userOnlineObj"); 40 | //将该用户从列表中移除 41 | String key = this.userMap.getKeys(this.userMap)[0]; 42 | System.out.println("key:"+key); 43 | userOnlineObj.remove(key); 44 | System.out.println("session属性解除绑定=======>"+this.userMap); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/gencode/dao/MytreeDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.gencode.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: MytreeDao 11 | * @ProjectName com.qingfeng 12 | * @Description: MytreeDao 13 | * @author anxingtao 14 | * @date 2020-9-22 22:42 15 | */ 16 | @Mapper 17 | public interface MytreeDao extends CrudDao { 18 | 19 | /** 20 | * @Description: updateStatus 21 | * @Param: [pd] 22 | * @return: void 23 | * @Author: anxingtao 24 | * @Date: 2020-10-13 11:10 25 | */ 26 | void updateStatus(PageData pd); 27 | 28 | 29 | 30 | /** 31 | * @Description: findChildList 32 | * @Param: [pd] 33 | * @return: java.util.List 34 | * @Author: anxingtao 35 | * @Date: 2020-10-13 11:10 36 | */ 37 | List findChildList(PageData pd); 38 | 39 | /** 40 | * @Description: saveChild 41 | * @Param: [pd] 42 | * @return: int 43 | * @Author: anxingtao 44 | * @Date: 2020-10-13 11:10 45 | */ 46 | int saveChild(PageData pd); 47 | 48 | /** 49 | * @Description: updateChild 50 | * @Param: [pd] 51 | * @return: int 52 | * @Author: anxingtao 53 | * @Date: 2020-10-13 11:10 54 | */ 55 | int updateChild(PageData pd); 56 | 57 | /** 58 | * @Description: delChild 59 | * @Param: [pd] 60 | * @return: void 61 | * @Author: anxingtao 62 | * @Date: 2020-10-13 11:10 63 | */ 64 | void delChild(String[] ids); 65 | 66 | /** 67 | * @Description: delChildForPIds 68 | * @Param: [ids] 69 | * @return: void 70 | * @Author: anxingtao 71 | * @Date: 2020-10-13 11:10 72 | */ 73 | void delChildForPIds(String[] ids); 74 | 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/main.js.bak: -------------------------------------------------------------------------------- 1 | // with polyfills 2 | import 'core-js/stable' 3 | import 'regenerator-runtime/runtime' 4 | 5 | import Vue from 'vue' 6 | import App from './App.vue' 7 | import router from './router' 8 | import store from './store' 9 | import i18n from './locales' 10 | import bootstrap from './core/bootstrap' 11 | import { ConfigProvider, Icon, Button, Tag, Menu, Dropdown, Avatar, Spin, Result, Form, Tabs, Input, Checkbox, Row, Col, Modal, Alert, Divider, notification, message,Table } from 'ant-design-vue' 12 | import ProLayout, { PageHeaderWrapper } from '@ant-design-vue/pro-layout' 13 | import { PageLoading } from '@/components' 14 | import themeConfig from './config/theme.config.js' 15 | 16 | // 路由守卫 17 | import './router/router-guards' 18 | // 其他 19 | import './styles/global.less' 20 | 21 | // Ant Design Vue 22 | Vue.use(ConfigProvider) 23 | Vue.use(Icon) 24 | Vue.use(Tag) 25 | Vue.use(Button) 26 | Vue.use(Menu) 27 | Vue.use(Dropdown) 28 | Vue.use(Avatar) 29 | Vue.use(Spin) 30 | Vue.use(Result) 31 | Vue.use(Form) 32 | Vue.use(Tabs) 33 | Vue.use(Input) 34 | Vue.use(Checkbox) 35 | Vue.use(Row) 36 | Vue.use(Col) 37 | Vue.use(Modal) 38 | Vue.use(Alert) 39 | Vue.use(Divider) 40 | Vue.use(Table ) 41 | 42 | 43 | Vue.prototype.$confirm = Modal.confirm 44 | Vue.prototype.$message = message 45 | Vue.prototype.$notification = notification 46 | Vue.prototype.$info = Modal.info 47 | Vue.prototype.$success = Modal.success 48 | Vue.prototype.$error = Modal.error 49 | Vue.prototype.$warning = Modal.warning 50 | 51 | // ProLayout 52 | Vue.component('pro-layout', ProLayout) 53 | Vue.component('page-container', PageHeaderWrapper) 54 | window.umi_plugin_ant_themeVar = themeConfig.theme 55 | 56 | // Global imports 57 | Vue.use(PageLoading) 58 | 59 | Vue.config.productionTip = false 60 | 61 | new Vue({ 62 | router, 63 | store, 64 | i18n, 65 | created: bootstrap, 66 | render: h => h(App), 67 | }).$mount('#app') 68 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/NProgress/nprogress.less: -------------------------------------------------------------------------------- 1 | @import "~ant-design-vue/es/style/themes/default"; 2 | 3 | /* Make clicks pass-through */ 4 | #nprogress { 5 | pointer-events: none; 6 | } 7 | 8 | #nprogress .bar { 9 | background: @primary-color; 10 | 11 | position: fixed; 12 | z-index: 1031; 13 | top: 0; 14 | left: 0; 15 | 16 | width: 100%; 17 | height: 2px; 18 | } 19 | 20 | /* Fancy blur effect */ 21 | #nprogress .peg { 22 | display: block; 23 | position: absolute; 24 | right: 0px; 25 | width: 100px; 26 | height: 100%; 27 | box-shadow: 0 0 10px @primary-color, 0 0 5px @primary-color; 28 | opacity: 1.0; 29 | 30 | -webkit-transform: rotate(3deg) translate(0px, -4px); 31 | -ms-transform: rotate(3deg) translate(0px, -4px); 32 | transform: rotate(3deg) translate(0px, -4px); 33 | } 34 | 35 | /* Remove these to get rid of the spinner */ 36 | #nprogress .spinner { 37 | display: block; 38 | position: fixed; 39 | z-index: 1031; 40 | top: 15px; 41 | right: 15px; 42 | } 43 | 44 | #nprogress .spinner-icon { 45 | width: 18px; 46 | height: 18px; 47 | box-sizing: border-box; 48 | 49 | border: solid 2px transparent; 50 | border-top-color: @primary-color; 51 | border-left-color: @primary-color; 52 | border-radius: 50%; 53 | 54 | -webkit-animation: nprogress-spinner 400ms linear infinite; 55 | animation: nprogress-spinner 400ms linear infinite; 56 | } 57 | 58 | .nprogress-custom-parent { 59 | overflow: hidden; 60 | position: relative; 61 | } 62 | 63 | .nprogress-custom-parent #nprogress .spinner, 64 | .nprogress-custom-parent #nprogress .bar { 65 | position: absolute; 66 | } 67 | 68 | @-webkit-keyframes nprogress-spinner { 69 | 0% { -webkit-transform: rotate(0deg); } 70 | 100% { -webkit-transform: rotate(360deg); } 71 | } 72 | @keyframes nprogress-spinner { 73 | 0% { transform: rotate(0deg); } 74 | 100% { transform: rotate(360deg); } 75 | } 76 | 77 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/README.zh-CN.md: -------------------------------------------------------------------------------- 1 | [English](./README.md) | 简体中文 2 | 3 |

Ant Design Vue Pro

4 |
5 | An out-of-box UI solution for enterprise applications as a Vue boilerplate. based on Ant Design of Vue 6 |
7 | 8 |
9 | 10 | [![License](https://img.shields.io/npm/l/package.json.svg?style=flat)](https://github.com/vueComponent/ant-design-vue-pro/blob/master/LICENSE) 11 | [![Release](https://img.shields.io/github/release/vueComponent/ant-design-vue-pro.svg?style=flat)](https://github.com/vueComponent/ant-design-vue-pro/releases/latest) 12 | [![Travis branch](https://travis-ci.org/vueComponent/ant-design-vue-pro.svg?branch=master)](https://travis-ci.org/vueComponent/ant-design-vue-pro) 13 | 14 |
15 | 16 | - 预览: https://preview.pro.antdv.com 17 | - 首页: https://pro.antdv.com 18 | - 文档: https://pro.antdv.com/docs/getting-started 19 | - 更新日志: https://pro.antdv.com/docs/changelog 20 | - 常见问题: https://pro.antdv.com/docs/faq 21 | 22 | Overview 23 | ---- 24 | 25 | 基于 [Ant Design of Vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/) 实现的 [Ant Design Pro](https://pro.ant.design/) 26 | 27 | ![dashboard](https://static-2.loacg.com/open/static/github/sp3.png) 28 | 29 | ### Env and dependencies 30 | 31 | - node 32 | - eslint 33 | - @vue/cli 34 | - [ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue 35 | 36 | ## Project setup 37 | ``` 38 | npm install 39 | ``` 40 | 41 | ### Compiles and hot-reloads for development 42 | ``` 43 | npm run serve 44 | ``` 45 | 46 | ### Compiles and minifies for production 47 | ``` 48 | npm run build 49 | ``` 50 | 51 | ### Lints and fixes files 52 | ``` 53 | npm run lint 54 | ``` 55 | 56 | ### Customize configuration 57 | See [Configuration Reference](https://cli.vuejs.org/config/). 58 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/system/modules/CreateForm.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 73 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/mapper/system/LoginMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/common/dao/UploadDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.common.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: AManageDao 11 | * @ProjectName wdata 12 | * @Description: TODO 13 | * @author anxingtao 14 | * @date 2018-12-5 16:28 15 | */ 16 | @Mapper 17 | public interface UploadDao extends CrudDao { 18 | 19 | /** 20 | * @Description: saveFile 21 | * @Param: [pd] 22 | * @return: void 23 | * @Author: anxingtao 24 | * @Date: 2018-12-6 13:46 25 | */ 26 | public void saveFile(PageData pd); 27 | 28 | 29 | /** 30 | * @Description: delFile 31 | * @Param: [pd] 32 | * @return: void 33 | * @Author: anxingtao 34 | * @Date: 2018-12-6 13:46 35 | */ 36 | public void delFile(PageData pd); 37 | 38 | 39 | 40 | /** @MethodName: delFileByObjId 41 | * @Description: 通过对象id删除相关的图片 42 | * @Param: 43 | * @Return: 44 | * @Author: zcx 45 | * @Date: 2019/12/4 46 | **/ 47 | public void delFileByObjId(PageData pd); 48 | /** 49 | * @Description: updateFile 50 | * @Param: [pd] 51 | * @return: void 52 | * @Author: anxingtao 53 | * @Date: 2018-12-6 15:08 54 | */ 55 | public void updateFile(PageData pd); 56 | 57 | /** 58 | * @Description: findFileList 59 | * @Param: [pd] 60 | * @return: java.util.List 61 | * @Author: anxingtao 62 | * @Date: 2018-12-6 16:33 63 | */ 64 | public List findFileList(PageData pd); 65 | 66 | 67 | /** 68 | * @Description: findFileInfo 69 | * @Param: [pd] 70 | * @return: com.wdata.base.util.PageData 71 | * @Author: anxingtao 72 | * @Date: 2019-10-10 18:47 73 | */ 74 | public PageData findFileInfo(PageData pd); 75 | 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/GroupService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.GroupDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @Title: GroupService 14 | * @ProjectName com.qingfeng 15 | * @Description: 用户组SERVICE层 16 | * @author anxingtao 17 | * @date 2020-9-22 22:43 18 | */ 19 | @Service 20 | @Transactional 21 | public class GroupService extends CrudService { 22 | 23 | @Autowired 24 | protected GroupDao groupdao; 25 | 26 | 27 | /** 28 | * @Description: saveGroupUser 29 | * @Param: [pd] 30 | * @return: void 31 | * @Author: anxingtao 32 | * @Date: 2020-9-25 23:03 33 | */ 34 | public void saveGroupUser(PageData pd){ 35 | groupdao.saveGroupUser(pd); 36 | } 37 | 38 | /** 39 | * @Description: findGroupUser 40 | * @Param: [pd] 41 | * @return: java.util.List 42 | * @Author: anxingtao 43 | * @Date: 2020-9-25 23:03 44 | */ 45 | public List findGroupUser(PageData pd){ 46 | return groupdao.findGroupUser(pd); 47 | } 48 | 49 | /** 50 | * @Description: delGroupUser 51 | * @Param: [pd] 52 | * @return: void 53 | * @Author: anxingtao 54 | * @Date: 2020-9-25 23:03 55 | */ 56 | public void delGroupUser(PageData pd){ 57 | groupdao.delGroupUser(pd); 58 | } 59 | 60 | /** 61 | * @Description: updateGroupUser 62 | * @Param: [pd] 63 | * @return: void 64 | * @Author: anxingtao 65 | * @Date: 2020-9-25 23:08 66 | */ 67 | public void updateGroupUser(PageData pd){ 68 | groupdao.updateGroupUser(pd); 69 | } 70 | 71 | } -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/mapper/quartz/TimTaskMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 29 | 30 | 31 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/Common/RichText.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 69 | 70 | 73 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/PageLoading/index.js: -------------------------------------------------------------------------------- 1 | import PageLoading from './PageLoading' 2 | const version = '0.0.1' 3 | const loading = {} 4 | 5 | loading.newInstance = (Vue, options) => { 6 | let loadingElement = document.querySelector('body>div[type=loading]') 7 | if (!loadingElement) { 8 | loadingElement = document.createElement('div') 9 | loadingElement.setAttribute('type', 'loading') 10 | loadingElement.setAttribute('class', 'ant-loading-wrapper') 11 | document.body.appendChild(loadingElement) 12 | } 13 | 14 | const props = Object.assign({ visible: false, size: 'large', tip: 'Loading...' }, options) 15 | const instance = new Vue({ 16 | data () { 17 | return { 18 | ...props, 19 | } 20 | }, 21 | render (h) { 22 | const { tip } = this 23 | const props = {} 24 | this.tip && (props.tip = tip) 25 | if (this.visible) { 26 | return h('page-loading', { 27 | props, 28 | }) 29 | } 30 | return null 31 | }, 32 | components: { 33 | [PageLoading.name]: PageLoading, 34 | }, 35 | }).$mount(loadingElement) 36 | 37 | function update (config) { 38 | const { visible, size, tip } = { ...props, ...config } 39 | instance.$set(instance, 'visible', visible) 40 | if (tip) { 41 | instance.$set(instance, 'tip', tip) 42 | } 43 | if (size) { 44 | instance.$set(instance, 'size', size) 45 | } 46 | } 47 | 48 | return { 49 | instance, 50 | update, 51 | } 52 | } 53 | 54 | const api = { 55 | show: function (options) { 56 | this.instance.update({ ...options, visible: true }) 57 | }, 58 | hide: function () { 59 | this.instance.update({ visible: false }) 60 | }, 61 | } 62 | 63 | const install = function (Vue, options) { 64 | if (Vue.prototype.$loading) { 65 | return 66 | } 67 | api.instance = loading.newInstance(Vue, options) 68 | Vue.prototype.$loading = api 69 | } 70 | 71 | export default { 72 | version, 73 | install, 74 | } 75 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/framework/redies/RedisConfig.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.redies; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.data.redis.connection.RedisConnectionFactory; 6 | import org.springframework.data.redis.core.RedisTemplate; 7 | import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; 8 | import org.springframework.data.redis.serializer.StringRedisSerializer; 9 | import com.fasterxml.jackson.annotation.JsonAutoDetect; 10 | import com.fasterxml.jackson.annotation.PropertyAccessor; 11 | import com.fasterxml.jackson.databind.ObjectMapper; 12 | 13 | /** 14 | * redis配置类 15 | * @author ZENG.XIAO.YAN 16 | * @date 2018年6月6日 17 | * 18 | */ 19 | @Configuration 20 | public class RedisConfig { 21 | @Bean 22 | @SuppressWarnings("all") 23 | public RedisTemplate redisTemplate(RedisConnectionFactory factory) { 24 | RedisTemplate template = new RedisTemplate(); 25 | template.setConnectionFactory(factory); 26 | Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); 27 | ObjectMapper om = new ObjectMapper(); 28 | om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); 29 | om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); 30 | jackson2JsonRedisSerializer.setObjectMapper(om); 31 | StringRedisSerializer stringRedisSerializer = new StringRedisSerializer(); 32 | // key采用String的序列化方式 33 | template.setKeySerializer(stringRedisSerializer); 34 | // hash的key也采用String的序列化方式 35 | template.setHashKeySerializer(stringRedisSerializer); 36 | // value序列化方式采用jackson 37 | template.setValueSerializer(jackson2JsonRedisSerializer); 38 | // hash的value序列化方式采用jackson 39 | template.setHashValueSerializer(jackson2JsonRedisSerializer); 40 | template.afterPropertiesSet(); 41 | return template; 42 | } 43 | } -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/thread/ThreadPoolConfig.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util.thread; 2 | 3 | import org.apache.commons.lang3.concurrent.BasicThreadFactory; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 7 | 8 | import java.util.concurrent.ScheduledExecutorService; 9 | import java.util.concurrent.ScheduledThreadPoolExecutor; 10 | import java.util.concurrent.ThreadPoolExecutor; 11 | 12 | /** 13 | * 线程池配置 14 | * 15 | * @author ruoyi 16 | **/ 17 | @Configuration 18 | public class ThreadPoolConfig 19 | { 20 | // 核心线程池大小 21 | private int corePoolSize = 50; 22 | 23 | // 最大可创建的线程数 24 | private int maxPoolSize = 200; 25 | 26 | // 队列最大长度 27 | private int queueCapacity = 1000; 28 | 29 | // 线程池维护线程所允许的空闲时间 30 | private int keepAliveSeconds = 300; 31 | 32 | @Bean(name = "threadPoolTaskExecutor") 33 | public ThreadPoolTaskExecutor threadPoolTaskExecutor() 34 | { 35 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 36 | executor.setMaxPoolSize(maxPoolSize); 37 | executor.setCorePoolSize(corePoolSize); 38 | executor.setQueueCapacity(queueCapacity); 39 | executor.setKeepAliveSeconds(keepAliveSeconds); 40 | // 线程池对拒绝任务(无线程可用)的处理策略 41 | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); 42 | return executor; 43 | } 44 | 45 | /** 46 | * 执行周期性或定时任务 47 | */ 48 | @Bean(name = "scheduledExecutorService") 49 | protected ScheduledExecutorService scheduledExecutorService() 50 | { 51 | return new ScheduledThreadPoolExecutor(corePoolSize, 52 | new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build()) 53 | { 54 | @Override 55 | protected void afterExecute(Runnable r, Throwable t) 56 | { 57 | super.afterExecute(r, t); 58 | Threads.printException(r, t); 59 | } 60 | }; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/Page.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util; 2 | 3 | 4 | /** 5 | * @Title: Page 6 | * @ProjectName qingfeng 7 | * @Description: 分页 8 | * @author anxingtao 9 | * @date 2018-8-24 11:33 10 | */ 11 | public class Page { 12 | 13 | /** 14 | * 每页显示记录数 15 | */ 16 | private int showCount = 15; 17 | 18 | /** 19 | * 当前页 20 | */ 21 | private int index; 22 | 23 | /** 24 | * 总页数 25 | */ 26 | private int totalPage; 27 | 28 | /** 29 | * 总记录数 30 | */ 31 | private int totalResult; 32 | 33 | /** 34 | *object对象 35 | */ 36 | private Object object; 37 | 38 | /** 39 | * @Description: 参数 40 | * @Param: 41 | * @return: 42 | * @Author: anxingtao 43 | * @Date: 2018-9-3 7:52 44 | */ 45 | private String param; 46 | 47 | private PageData pd = new PageData(); 48 | 49 | public Object getObject() { 50 | return object; 51 | } 52 | 53 | public void setObject(Object object) { 54 | this.object = object; 55 | } 56 | 57 | public int getIndex() { 58 | return index; 59 | } 60 | 61 | public void setIndex(int index) { 62 | this.index = index; 63 | } 64 | 65 | public int getTotalPage() { 66 | if(totalResult%showCount==0){ 67 | totalPage = totalResult/showCount; 68 | } else { 69 | totalPage = totalResult/showCount+1; 70 | } 71 | return totalPage; 72 | } 73 | 74 | public void setTotalPage(int totalPage) { 75 | this.totalPage = totalPage; 76 | } 77 | 78 | public int getTotalResult() { 79 | return totalResult; 80 | } 81 | 82 | public void setTotalResult(int totalResult) { 83 | this.totalResult = totalResult; 84 | } 85 | 86 | public int getShowCount() { 87 | return showCount; 88 | } 89 | public void setShowCount(int showCount) { 90 | this.showCount = showCount; 91 | } 92 | 93 | public PageData getPd() { 94 | return pd; 95 | } 96 | 97 | public void setPd(PageData pd) { 98 | this.pd = pd; 99 | } 100 | 101 | public String getParam() { 102 | return param; 103 | } 104 | 105 | public void setParam(String param) { 106 | this.param = param; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/styles/global.less: -------------------------------------------------------------------------------- 1 | @import '~ant-design-vue/es/style/themes/default.less'; 2 | 3 | html, 4 | body, 5 | #app, #root { 6 | height: 100%; 7 | } 8 | 9 | .colorWeak { 10 | filter: invert(80%); 11 | } 12 | 13 | .ant-layout.layout-basic { 14 | height: 100vh; 15 | min-height: 100vh; 16 | } 17 | 18 | canvas { 19 | display: block; 20 | } 21 | 22 | body { 23 | text-rendering: optimizeLegibility; 24 | -webkit-font-smoothing: antialiased; 25 | -moz-osx-font-smoothing: grayscale; 26 | } 27 | 28 | ul, 29 | ol { 30 | list-style: none; 31 | } 32 | 33 | // 数据列表 样式 34 | .table-alert { 35 | margin-bottom: 16px; 36 | } 37 | // 数据列表 操作 38 | .table-operator { 39 | margin-bottom: 18px; 40 | 41 | button { 42 | margin-right: 8px; 43 | } 44 | } 45 | // 数据列表 搜索条件 46 | .table-page-search-wrapper { 47 | 48 | .ant-form-inline { 49 | .ant-form-item { 50 | display: flex; 51 | margin-bottom: 24px; 52 | margin-right: 0; 53 | 54 | .ant-form-item-control-wrapper { 55 | flex: 1 1; 56 | display: inline-block; 57 | vertical-align: middle; 58 | } 59 | 60 | > .ant-form-item-label { 61 | line-height: 32px; 62 | padding-right: 8px; 63 | width: auto; 64 | } 65 | .ant-form-item-control { 66 | height: 32px; 67 | line-height: 32px; 68 | } 69 | } 70 | } 71 | 72 | .table-page-search-submitButtons { 73 | display: block; 74 | margin-bottom: 24px; 75 | white-space: nowrap; 76 | } 77 | } 78 | 79 | @media (max-width: @screen-xs) { 80 | .ant-table { 81 | width: 100%; 82 | overflow-x: auto; 83 | &-thead > tr, 84 | &-tbody > tr { 85 | > th, 86 | > td { 87 | white-space: pre; 88 | > span { 89 | display: block; 90 | } 91 | } 92 | } 93 | } 94 | } 95 | 96 | // 业务 97 | .ant-pro-basicLayout-content { 98 | position: relative; 99 | margin: 10px; 100 | transition: all 0.2s; 101 | } 102 | .ant-breadcrumb{ 103 | height: 26px; 104 | } 105 | .ant-btn-sm { 106 | padding: 0 4px; 107 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ant-design-vue-pro-template", 3 | "version": "3.0.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint", 9 | "lint:check": "vue-cli-service lint --no-fix", 10 | "analyz": "vue-cli-service build --mode analyz" 11 | }, 12 | "dependencies": { 13 | "@ant-design-vue/pro-layout": "^1.0.1-0", 14 | "ant-design-vue": "^1.6.4", 15 | "axios": "^0.19.2", 16 | "core-js": "^3.6.5", 17 | "mockjs": "^1.1.0", 18 | "nprogress": "^0.2.0", 19 | "quill": "^1.3.7", 20 | "store": "^2.0.12", 21 | "vue": "^2.6.11", 22 | "vue-i18n": "^8.20.0", 23 | "vue-quill-editor": "^3.0.6", 24 | "vue-router": "^3.4.9", 25 | "vue-svg-component-runtime": "^1.0.1", 26 | "vuex": "^3.4.0" 27 | }, 28 | "devDependencies": { 29 | "@ant-design/colors": "^3.2.1", 30 | "@ant-design/icons": "^2.1.1", 31 | "@vue/cli-plugin-babel": "~4.4.0", 32 | "@vue/cli-plugin-eslint": "~4.4.0", 33 | "@vue/cli-plugin-router": "~4.4.0", 34 | "@vue/cli-plugin-vuex": "~4.4.0", 35 | "@vue/cli-service": "~4.4.0", 36 | "@vue/eslint-config-standard": "^5.1.2", 37 | "babel-eslint": "^10.1.0", 38 | "babel-plugin-import": "^1.13.0", 39 | "eslint": "^6.7.2", 40 | "eslint-plugin-import": "^2.20.2", 41 | "eslint-plugin-node": "^11.1.0", 42 | "eslint-plugin-promise": "^4.2.1", 43 | "eslint-plugin-standard": "^4.0.0", 44 | "eslint-plugin-vue": "^6.2.2", 45 | "git-revision-webpack-plugin": "^3.0.6", 46 | "less": "^3.0.4", 47 | "less-loader": "^5.0.0", 48 | "lint-staged": "^9.5.0", 49 | "node-sass": "^5.0.0", 50 | "sass-loader": "^10.1.0", 51 | "umi-mock-middleware": "^1.0.0", 52 | "vue-svg-icon-loader": "^2.1.1", 53 | "vue-template-compiler": "^2.6.11", 54 | "webpack-bundle-analyzer": "^3.8.0", 55 | "webpack-theme-color-replacer": "^1.3.14" 56 | }, 57 | "gitHooks": { 58 | "pre-commit": "lint-staged" 59 | }, 60 | "lint-staged": { 61 | "*.{js,jsx,vue}": [ 62 | "vue-cli-service lint", 63 | "git add" 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/quartz/config/SchedulerConfig.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.quartz.config; 2 | 3 | import org.quartz.Scheduler; 4 | import org.quartz.ee.servlet.QuartzInitializerListener; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.beans.factory.config.PropertiesFactoryBean; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.core.io.ClassPathResource; 10 | import org.springframework.scheduling.quartz.SchedulerFactoryBean; 11 | 12 | import java.io.IOException; 13 | import java.util.Properties; 14 | 15 | /** 16 | * @Title: SchedulerConfig 17 | * @ProjectName wdata 18 | * @Description: TODO 19 | * @author anxingtao 20 | * @date 2019-6-5 14:38 21 | */ 22 | @Configuration 23 | public class SchedulerConfig { 24 | 25 | @Autowired 26 | private SpringJobFactory springJobFactory; 27 | 28 | @Bean(name="SchedulerFactory") 29 | public SchedulerFactoryBean schedulerFactoryBean() throws IOException { 30 | SchedulerFactoryBean factory = new SchedulerFactoryBean(); 31 | factory.setAutoStartup(true); 32 | factory.setStartupDelay(5);//延时5秒启动 33 | factory.setQuartzProperties(quartzProperties()); 34 | factory.setJobFactory(springJobFactory); 35 | return factory; 36 | } 37 | 38 | @Bean 39 | public Properties quartzProperties() throws IOException { 40 | PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); 41 | propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties")); 42 | propertiesFactoryBean.afterPropertiesSet(); 43 | return propertiesFactoryBean.getObject(); 44 | } 45 | 46 | /* 47 | * quartz初始化监听器 48 | */ 49 | @Bean 50 | public QuartzInitializerListener executorListener() { 51 | return new QuartzInitializerListener(); 52 | } 53 | 54 | /* 55 | * 通过SchedulerFactoryBean获取Scheduler的实例 56 | */ 57 | @Bean(name="Scheduler") 58 | public Scheduler scheduler() throws IOException { 59 | return schedulerFactoryBean().getScheduler(); 60 | } 61 | 62 | } -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/PasswordUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * MIT License 3 | * Copyright (c) 2018 yadong.zhang 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * The above copyright notice and this permission notice shall be included in all 11 | * copies or substantial portions of the Software. 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 18 | * SOFTWARE. 19 | */ 20 | package com.qingfeng.util; 21 | 22 | 23 | /** 24 | * @author: yadong.zhang 25 | * @date: 2017/12/15 17:03 26 | */ 27 | public class PasswordUtil { 28 | 29 | public static final String ZYD_SECURITY_KEY = "929123f8f17944e8b0a531045453e1f1"; 30 | 31 | /** 32 | * AES 加密 33 | * @param password 34 | * 未加密的密码 35 | * @param salt 36 | * 盐值,默认使用用户名就可 37 | * @return 38 | * @throws Exception 39 | */ 40 | public static String encrypt(String password, String salt) throws Exception { 41 | return AesUtil.encrypt(MD5.md5(salt + ZYD_SECURITY_KEY), password); 42 | } 43 | 44 | /** 45 | * AES 解密 46 | * @param encryptPassword 47 | * 加密后的密码 48 | * @param salt 49 | * 盐值,默认使用用户名就可 50 | * @return 51 | * @throws Exception 52 | */ 53 | public static String decrypt(String encryptPassword, String salt) throws Exception { 54 | return AesUtil.decrypt(MD5.md5(salt + ZYD_SECURITY_KEY), encryptPassword); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/base/dao/CrudDao.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.base.dao; 2 | 3 | 4 | import com.qingfeng.util.Page; 5 | import com.qingfeng.util.PageData; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: CrudDao 11 | * @ProjectName qingfeng 12 | * @Description: dao基础方法 13 | * @author anxingtao 14 | * @date 2020-9-22 21:04 15 | */ 16 | public interface CrudDao{ 17 | 18 | /** 19 | * @Description: findListPage 分页信息查询 20 | * @Param: [page] 21 | * @return: java.util.List 22 | * @Author: anxingtao 23 | * @Date: 2020-9-22 21:05 24 | */ 25 | public List findListPage(Page page); 26 | 27 | /** 28 | * @Description: findListSize 分页总条数 29 | * @Param: [page] 30 | * @return: java.lang.Integer 31 | * @Author: anxingtao 32 | * @Date: 2020-9-22 21:05 33 | */ 34 | public Integer findListSize(Page page); 35 | 36 | /** 37 | * @Description: findList 列表信息查询 38 | * @Param: [pd] 39 | * @return: java.util.List 40 | * @Author: anxingtao 41 | * @Date: 2020-9-22 21:05 42 | */ 43 | public List findList(PageData pd); 44 | 45 | /** 46 | * @Description: findInfo 详情信息查询 47 | * @Param: [pd] 48 | * @return: T 49 | * @Author: anxingtao 50 | * @Date: 2020-9-22 21:05 51 | */ 52 | public T findInfo(PageData pd); 53 | 54 | /** 55 | * @Description: save 保存方法 56 | * @Param: [t] 57 | * @return: int 58 | * @Author: anxingtao 59 | * @Date: 2020-9-22 21:06 60 | */ 61 | public int save(T t); 62 | 63 | /** 64 | * @Description: update 更新方法 65 | * @Param: [t] 66 | * @return: int 67 | * @Author: anxingtao 68 | * @Date: 2020-9-22 21:06 69 | */ 70 | public int update(T t); 71 | 72 | /** 73 | * @Description: delForParam 根据对象删除 74 | * @Param: [pd] 75 | * @return: void 76 | * @Author: anxingtao 77 | * @Date: 2020-9-22 21:06 78 | */ 79 | public void delForParam(PageData pd); 80 | 81 | /** 82 | * @Description: del 根据ids集合删除 83 | * @Param: [ids] 84 | * @return: void 85 | * @Author: anxingtao 86 | * @Date: 2020-9-22 21:06 87 | */ 88 | public void del(String[] ids); 89 | 90 | } 91 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/Application.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.boot.builder.SpringApplicationBuilder; 8 | import org.springframework.boot.web.servlet.ServletComponentScan; 9 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 10 | import org.springframework.context.annotation.Bean; 11 | import org.springframework.scheduling.annotation.EnableScheduling; 12 | 13 | import java.util.Properties; 14 | 15 | /** 16 | * Created by anxingtao on 2017/12/8. 17 | */ 18 | //配置SpringBoot应用标识 19 | @SpringBootApplication 20 | //拦截器、过滤器等 21 | @ServletComponentScan 22 | //定时器 23 | @EnableScheduling 24 | @MapperScan({"com.qingfeng.*.dao","com.qingfeng.*.*.dao","com.baomidou.mybatisplus.samples.quickstart.mapper"}) 25 | public class Application extends SpringBootServletInitializer { 26 | 27 | 28 | @Bean 29 | public PageHelper pageHelper() { 30 | PageHelper pageHelper = new PageHelper(); 31 | Properties p = new Properties(); 32 | p.setProperty("offsetAsPageNum", "true"); 33 | p.setProperty("rowBoundsWithCount", "true"); 34 | p.setProperty("reasonable", "true"); 35 | p.setProperty("dialect", "mysql"); 36 | // p.setProperty("dialect", "oracle"); 37 | p.setProperty("supportMethodsArguments", "false"); 38 | p.setProperty("pageSizeZero", "true"); 39 | pageHelper.setProperties(p); 40 | return pageHelper; 41 | } 42 | 43 | // // 其中 dataSource 框架会自动为我们注入 44 | // @Bean 45 | // public PlatformTransactionManager txManager(DataSource dataSource) { 46 | // return new DataSourceTransactionManager(dataSource); 47 | // } 48 | 49 | @Override 50 | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { 51 | return builder.sources(Application.class); 52 | } 53 | 54 | public static void main(String[] args) { 55 | // 程序启动入口 56 | // 启动嵌入式的 Tomcat 并初始化 Spring 环境及其各 Spring 组件 57 | SpringApplication.run(Application.class,args); 58 | } 59 | 60 | 61 | } 62 | -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/views/quartz/Cron/antCron/Index.vue: -------------------------------------------------------------------------------- 1 | 10 | 73 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/PathUtil.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util; 2 | 3 | 4 | import java.io.File; 5 | 6 | /** 7 | * 在windows和linux系统下均可正常使用 8 | * Create by yster@foxmail.com 2018/6/6/006 14:51 9 | */ 10 | public class PathUtil { 11 | //获取项目的根路径 12 | public final static String classPath; 13 | 14 | static { 15 | //获取的是classpath路径,适用于读取resources下资源 16 | classPath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); 17 | } 18 | 19 | /** 20 | * @Description: 获取系统路径 21 | * @Param: [] 22 | * @return: java.lang.String 23 | * @Author: anxingtao 24 | * @Date: 2020-10-11 21:03 25 | */ 26 | public static String getSystemPath() { 27 | return SystemPath(""); 28 | } 29 | 30 | /** 31 | * 项目根目录 32 | */ 33 | public static String getRootPath() { 34 | return RootPath(""); 35 | } 36 | 37 | /** 38 | * 自定义追加路径 39 | */ 40 | public static String getRootPath(String u_path) { 41 | return RootPath("/" + u_path); 42 | } 43 | 44 | /** 45 | * 私有处理方法 46 | */ 47 | private static String RootPath(String u_path) { 48 | String rootPath = ""; 49 | //windows下 50 | if ("\\".equals(File.separator)) { 51 | //System.out.println(classPath); 52 | rootPath = classPath + u_path; 53 | rootPath = rootPath.replaceAll("/", "\\\\"); 54 | if (rootPath.substring(0, 1).equals("\\")) { 55 | rootPath = rootPath.substring(1); 56 | } 57 | } 58 | //linux下 59 | if ("/".equals(File.separator)) { 60 | //System.out.println(classPath); 61 | rootPath = classPath + u_path; 62 | rootPath = rootPath.replaceAll("\\\\", "/"); 63 | } 64 | return rootPath; 65 | } 66 | 67 | private static String SystemPath(String u_path) { 68 | String rootPath = ""; 69 | //windows下 70 | if ("\\".equals(File.separator)) { 71 | //System.out.println(classPath); 72 | rootPath = "C://" + u_path; 73 | } 74 | //linux下 75 | if ("/".equals(File.separator)) { 76 | rootPath = "/" + u_path; 77 | } 78 | return rootPath; 79 | } 80 | 81 | 82 | } -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/framework/datasource/DruidConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.datasource; 2 | 3 | import com.alibaba.druid.support.http.StatViewServlet; 4 | import com.alibaba.druid.support.http.WebStatFilter; 5 | import org.springframework.boot.web.servlet.FilterRegistrationBean; 6 | import org.springframework.boot.web.servlet.ServletRegistrationBean; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | import java.util.HashMap; 11 | import java.util.Map; 12 | 13 | /** 14 | * @author anxingtao 15 | * @Title: DruidConfiguration 16 | * @ProjectName lkproject 17 | * @Description: TODO 18 | * @date 2019-4-269:28 19 | */ 20 | @Configuration 21 | public class DruidConfiguration{ 22 | 23 | @Bean 24 | public ServletRegistrationBean druidServlet() { 25 | ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(); 26 | servletRegistrationBean.setServlet(new StatViewServlet()); 27 | servletRegistrationBean.addUrlMappings("/druid/*"); 28 | Map initParameters = new HashMap(); 29 | // initParameters.put("loginUsername","DruidAdmin");// 用户名 30 | // initParameters.put("loginPassword","lGQ@FVCDX&3Uk8zP");// 密码 31 | initParameters.put("resetEnable","false");// 禁用HTML页面上的“Reset All”功能 32 | initParameters.put("allow",""); // IP白名单 (没有配置或者为空,则允许所有访问) 33 | 34 | //initParameters.put("deny", "192.168.20.38");// IP黑名单 35 | //(存在共同时,deny优先于allow) 36 | servletRegistrationBean.setInitParameters(initParameters); 37 | return servletRegistrationBean; 38 | } 39 | 40 | 41 | 42 | @Bean 43 | public FilterRegistrationBean filterRegistrationBean() { 44 | FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(); 45 | filterRegistrationBean.setFilter(new WebStatFilter()); 46 | filterRegistrationBean.addUrlPatterns("/*"); 47 | //@WebInitParam(name="exclusions",value="*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*")// 48 | 49 | //忽略资源 50 | filterRegistrationBean.addInitParameter("exclusions", 51 | "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"); 52 | return filterRegistrationBean; 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /qingfneg-vue-ant-design/src/components/SelectLang/index.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 65 | 66 | 92 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/framework/datasource/DataSourceConfig.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.framework.datasource; 2 | 3 | import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.boot.context.properties.ConfigurationProperties; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.context.annotation.DependsOn; 10 | import org.springframework.context.annotation.Primary; 11 | 12 | import javax.sql.DataSource; 13 | import java.util.HashMap; 14 | import java.util.Map; 15 | 16 | /** 17 | * 数据源配置 18 | * 19 | * @ClassName DataSourceConfig 20 | * @Description 多数据源配置 21 | * @author lide 22 | * @date 2018年2月27日 下午1:21:39 23 | */ 24 | @Configuration 25 | public class DataSourceConfig { 26 | private Logger logger = LoggerFactory.getLogger(this.getClass()); 27 | 28 | @Bean(name = "master",initMethod = "init",destroyMethod = "close") 29 | @ConfigurationProperties(prefix = "spring.datasource.master") 30 | public DataSource dataSource1() { 31 | logger.info("===============数据库Master部署成功。==============="); 32 | return DruidDataSourceBuilder.create().build(); 33 | } 34 | 35 | // @Bean(name = "slave",initMethod = "init",destroyMethod = "close") 36 | // @ConfigurationProperties(prefix = "spring.datasource.slave") 37 | // public DataSource dataSource2() { 38 | // logger.info("===============从配数据库Slave部署成功。==============="); 39 | // return DruidDataSourceBuilder.create().build(); 40 | // } 41 | 42 | @Bean(name="dynamicDataSource") 43 | // @DependsOn({ "master", "slave"}) 44 | @DependsOn({ "master" }) 45 | @Primary 46 | /**优先使用,多数据源**/ 47 | public DataSource dataSource() { 48 | DynamicDataSource dynamicDataSource = new DynamicDataSource(); 49 | DataSource master = dataSource1(); 50 | // DataSource slave = dataSource2(); 51 | //设置默认数据源 52 | // System.out.println("===============开启Master数据源。==============="); 53 | dynamicDataSource.setDefaultTargetDataSource(master); 54 | //配置多数据源 55 | Map map = new HashMap<>(); 56 | map.put(DataSourceType.Master.getName(), master); //key需要跟ThreadLocal中的值对应 57 | // map.put(DataSourceType.Slave.getName(), slave); 58 | dynamicDataSource.setTargetDataSources(map); 59 | return dynamicDataSource; 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/resources/templates/gencode/TemplateDao.java.ftl: -------------------------------------------------------------------------------- 1 | package ${tablePd.pack_path}.${tablePd.mod_name}.dao; 2 | 3 | import com.qingfeng.base.dao.CrudDao; 4 | import com.qingfeng.util.PageData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @Title: ${tablePd.bus_name?cap_first}Dao 11 | * @ProjectName com.qingfeng 12 | * @Description: ${tablePd.bus_name?cap_first}Dao 13 | * @author anxingtao 14 | * @date 2020-9-22 22:42 15 | */ 16 | @Mapper 17 | public interface ${tablePd.bus_name?cap_first}Dao extends CrudDao { 18 | 19 | /** 20 | * @Description: updateStatus 21 | * @Param: [pd] 22 | * @return: void 23 | * @Author: anxingtao 24 | * @Date: 2020-10-13 11:10 25 | */ 26 | public void updateStatus(PageData pd); 27 | 28 | 29 | <#if tablePd.temp_type == '1'> 30 | 31 | /** 32 | * @Description: findChildList 33 | * @Param: [pd] 34 | * @return: java.util.List 35 | * @Author: anxingtao 36 | * @Date: 2020-10-13 11:10 37 | */ 38 | public List findChildList(PageData pd); 39 | 40 | /** 41 | * @Description: saveChild 42 | * @Param: [pd] 43 | * @return: int 44 | * @Author: anxingtao 45 | * @Date: 2020-10-13 11:10 46 | */ 47 | public int saveChild(PageData pd); 48 | 49 | /** 50 | * @Description: updateChild 51 | * @Param: [pd] 52 | * @return: int 53 | * @Author: anxingtao 54 | * @Date: 2020-10-13 11:10 55 | */ 56 | public int updateChild(PageData pd); 57 | 58 | /** 59 | * @Description: delChild 60 | * @Param: [pd] 61 | * @return: void 62 | * @Author: anxingtao 63 | * @Date: 2020-10-13 11:10 64 | */ 65 | public void delChild(String[] ids); 66 | 67 | /** 68 | * @Description: delChildForPIds 69 | * @Param: [ids] 70 | * @return: void 71 | * @Author: anxingtao 72 | * @Date: 2020-10-13 11:10 73 | */ 74 | public void delChildForPIds(String[] ids); 75 | 76 | 77 | 78 | <#if tablePd.temp_type == '2'> 79 | /** 80 | * @Description: findContainChildList 81 | * @Param: [pd] 82 | * @return: java.util.List 83 | * @Author: anxingtao 84 | * @Date: 2020-10-15 23:34 85 | */ 86 | public List findContainChildList(PageData pd); 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /qingfeng-common/src/main/java/com/qingfeng/util/freemarker/DocumentHandler.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.util.freemarker; 2 | 3 | import freemarker.template.Configuration; 4 | import freemarker.template.Template; 5 | import freemarker.template.TemplateException; 6 | 7 | import java.io.*; 8 | import java.util.Map; 9 | 10 | /** 11 | * @Title: DocumentHandler 12 | * @ProjectName qingfeng 13 | * @Description: word导出 14 | * @author anxingtao 15 | * @date 2020-9-20 9:53 16 | */ 17 | public class DocumentHandler { 18 | private Configuration configuration = null; 19 | private static final String templateFolder = "D:/"; 20 | public DocumentHandler() { 21 | configuration = new Configuration(); 22 | configuration.setDefaultEncoding("utf-8"); 23 | } 24 | 25 | public void createDoc(Map dataMap,String fileName) throws IOException { 26 | //dataMap 要填入模本的数据文件 27 | //设置模本装置方法和路径,FreeMarker支持多种模板装载方法。可以重servlet,classpath,数据库装载, 28 | //这里我们的模板是放在template包下面 29 | // configuration.setDirectoryForTemplateLoading(new File(templateFolder)); 30 | configuration.setClassForTemplateLoading(this.getClass(),"/docTemp"); 31 | Template t=null; 32 | try { 33 | //test.ftl为要装载的模板 34 | t = configuration.getTemplate("oweLetter.ftl"); 35 | } catch (IOException e) { 36 | e.printStackTrace(); 37 | } 38 | //输出文档路径及名称 39 | File outFile = new File(fileName); 40 | Writer out = null; 41 | FileOutputStream fos=null; 42 | try { 43 | fos = new FileOutputStream(outFile); 44 | OutputStreamWriter oWriter = new OutputStreamWriter(fos,"UTF-8"); 45 | //这个地方对流的编码不可或缺,使用main()单独调用时,应该可以,但是如果是web请求导出时导出后word文档就会打不开,并且包XML文件错误。主要是编码格式不正确,无法解析。 46 | //out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile))); 47 | out = new BufferedWriter(oWriter); 48 | } catch (FileNotFoundException e1) { 49 | e1.printStackTrace(); 50 | } 51 | 52 | try { 53 | t.process(dataMap, out); 54 | out.close(); 55 | fos.close(); 56 | } catch (TemplateException e) { 57 | e.printStackTrace(); 58 | } catch (IOException e) { 59 | e.printStackTrace(); 60 | } 61 | 62 | //System.out.println("---------------------------"); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /qingfeng-interface/src/main/java/com/qingfeng/system/service/OrganizeService.java: -------------------------------------------------------------------------------- 1 | package com.qingfeng.system.service; 2 | 3 | import com.qingfeng.base.service.CrudService; 4 | import com.qingfeng.system.dao.OrganizeDao; 5 | import com.qingfeng.util.PageData; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @Title: OrganizeService 14 | * @ProjectName com.qingfeng 15 | * @Description: 组织SERVICE层 16 | * @author anxingtao 17 | * @date 2020-9-22 22:44 18 | */ 19 | @Service 20 | @Transactional 21 | public class OrganizeService extends CrudService { 22 | 23 | @Autowired 24 | protected OrganizeDao organizedao; 25 | 26 | 27 | /** 28 | * @Description: findOrganizeRoleList 29 | * @Param: [pd] 30 | * @return: java.util.List 31 | * @Author: anxingtao 32 | * @Date: 2020-9-26 15:56 33 | */ 34 | public List findOrganizeRoleList(PageData pd){ 35 | return organizedao.findOrganizeRoleList(pd); 36 | } 37 | 38 | /** 39 | * @Description: delOrganizeRole 40 | * @Param: [pd] 41 | * @return: void 42 | * @Author: anxingtao 43 | * @Date: 2020-9-26 16:10 44 | */ 45 | public void delOrganizeRole(PageData pd){ 46 | organizedao.delOrganizeRole(pd); 47 | } 48 | 49 | /** 50 | * @Description: saveOrganizeRole 51 | * @Param: [list] 52 | * @return: void 53 | * @Author: anxingtao 54 | * @Date: 2020-9-26 16:33 55 | */ 56 | public void saveOrganizeRole(List list){ 57 | organizedao.saveOrganizeRole(list); 58 | } 59 | 60 | /** 61 | * @Description: findTreeTableList 62 | * @Param: [pd] 63 | * @return: java.util.List 64 | * @Author: anxingtao 65 | * @Date: 2020-9-26 18:11 66 | */ 67 | public List findTreeTableList(PageData pd){ 68 | return organizedao.findTreeTableList(pd); 69 | } 70 | 71 | /** 72 | * @Description: updateUserLeader 73 | * @Param: [pd] 74 | * @return: void 75 | * @Author: anxingtao 76 | * @Date: 2020-11-15 9:35 77 | */ 78 | public void updateUserLeader(PageData pd){ 79 | organizedao.updateUserLeader(pd); 80 | } 81 | 82 | 83 | } --------------------------------------------------------------------------------