├── LICENSE ├── README.md ├── ezm-app ├── .env ├── .gitignore ├── README.md ├── alias.config.js ├── babel.config.js ├── package-lock.json ├── package.json ├── public │ ├── excel-template │ │ ├── comment-template.xlsx │ │ ├── output-detail-template.xlsx │ │ ├── receipt-detail-template.xlsx │ │ └── transfer-detail-template.xlsx │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── api │ │ ├── base │ │ │ ├── config.js │ │ │ ├── dict.js │ │ │ └── dict_detail.js │ │ ├── cfg │ │ │ ├── channel.js │ │ │ ├── industry.js │ │ │ ├── industry_user.js │ │ │ └── keywords.js │ │ ├── log │ │ │ ├── account_log.js │ │ │ └── request_log.js │ │ ├── pst │ │ │ ├── comment.js │ │ │ ├── post.js │ │ │ ├── post_cat.js │ │ │ └── statistic.js │ │ ├── sys │ │ │ ├── access.js │ │ │ └── sign.js │ │ ├── user_power │ │ │ ├── auth.js │ │ │ ├── role.js │ │ │ ├── tenant.js │ │ │ └── user.js │ │ └── wms │ │ │ ├── company.js │ │ │ ├── goods.js │ │ │ ├── inventory.js │ │ │ ├── inventory_history.js │ │ │ ├── output.js │ │ │ ├── output_detail.js │ │ │ ├── output_wms.js │ │ │ ├── receipt.js │ │ │ ├── receipt_detail.js │ │ │ ├── reservoir.js │ │ │ ├── shelf.js │ │ │ ├── transfer.js │ │ │ ├── transfer_detail.js │ │ │ ├── transfer_history.js │ │ │ ├── warehouse.js │ │ │ └── wms_output.js │ ├── api_mock │ │ └── sys │ │ │ └── auth_mock.js │ ├── assets │ │ ├── css │ │ │ ├── animate.css │ │ │ ├── animate.css.map │ │ │ ├── animate.less │ │ │ ├── common.css │ │ │ ├── common.css.map │ │ │ ├── common.less │ │ │ ├── icon-font │ │ │ │ ├── demo.css │ │ │ │ ├── demo_index.html │ │ │ │ ├── iconfont.css │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.js │ │ │ │ ├── iconfont.json │ │ │ │ ├── iconfont.svg │ │ │ │ ├── iconfont.ttf │ │ │ │ ├── iconfont.woff │ │ │ │ └── iconfont.woff2 │ │ │ ├── index.css │ │ │ ├── index.css.map │ │ │ ├── index.less │ │ │ ├── reset.css │ │ │ ├── reset.css.map │ │ │ └── reset.less │ │ └── logo.png │ ├── components │ │ ├── button │ │ │ └── ezm-dropdown-button.vue │ │ ├── display │ │ │ ├── ezm-code-formatter.vue │ │ │ ├── ezm-dialog.vue │ │ │ ├── ezm-markdown.vue │ │ │ ├── ezm-number-scroll.vue │ │ │ └── ezm-options-tag.vue │ │ ├── editor │ │ │ ├── container │ │ │ │ ├── ezm-edit-dialog.vue │ │ │ │ ├── ezm-edit-tab.vue │ │ │ │ └── ezm-edit-window.vue │ │ │ ├── ezm-edit-buttons.vue │ │ │ ├── ezm-filter-field.vue │ │ │ ├── ezm-froala-editor.vue │ │ │ ├── ezm-input.vue │ │ │ ├── ezm-switch.vue │ │ │ ├── ezm-text-input.vue │ │ │ └── table-input.vue │ │ ├── import-table │ │ │ └── ezm-import-table.vue │ │ ├── render │ │ │ ├── render-edit-input.vue │ │ │ └── render-filter-input.vue │ │ ├── selector │ │ │ ├── ezm-color-picker.vue │ │ │ ├── ezm-dict-selector.vue │ │ │ ├── ezm-icon-picker.vue │ │ │ ├── ezm-options-selector.vue │ │ │ └── ezm-tree-selector.vue │ │ ├── table │ │ │ ├── ezm-table-toolbar-filter-list.vue │ │ │ ├── ezm-table.vue │ │ │ └── table-mixin │ │ │ │ ├── TableAutoResizeMixin.js │ │ │ │ ├── TableCheckRadioMixin.js │ │ │ │ ├── TableEditMixin.js │ │ │ │ └── TableToolbarMixin.js │ │ ├── theme │ │ │ └── theme-color-picker.vue │ │ └── window │ │ │ ├── ezm-excel-import.vue │ │ │ ├── ezm-scroller.vue │ │ │ ├── ezm-window-item.vue │ │ │ ├── ezm-window.vue │ │ │ └── render-item.vue │ ├── element-variables.scss │ ├── generator │ │ ├── CodeGenerator.js │ │ ├── GeneratorConfig.js │ │ ├── GeneratorPage.js │ │ ├── MysqlUtil.js │ │ ├── model │ │ │ ├── SysModels.js │ │ │ └── WmsModels.js │ │ └── templ │ │ │ ├── ConfigMixin.templ.jst │ │ │ ├── api.templ.jst │ │ │ ├── edit.templ.vue │ │ │ ├── fields │ │ │ └── field.templ.jst │ │ │ ├── filter.templ.vue │ │ │ ├── page.templ.vue │ │ │ └── selector.templ.vue │ ├── main.js │ ├── mixin │ │ ├── EditMixin.js │ │ ├── FilterMixin.js │ │ ├── ImportMixin.js │ │ ├── ReloadMixin.js │ │ ├── RenderMixin.js │ │ ├── ScrollMixin.js │ │ ├── SelectorMixin.js │ │ └── page-mixin │ │ │ ├── PageMixin.js │ │ │ ├── PageSetGetMixin.js │ │ │ └── PageTableFieldMixin.js │ ├── model │ │ └── post.form.js │ ├── plugins │ │ ├── element.js │ │ ├── froala-editor.js │ │ ├── global-component.js │ │ ├── index.js │ │ ├── polyfill.js │ │ ├── vue-happy-scroll.js │ │ └── vxe-table.js │ ├── project │ │ ├── options.js │ │ └── wms.options.js │ ├── router │ │ ├── index.js │ │ └── route.js │ ├── setting.js │ ├── store │ │ ├── index.js │ │ └── modules │ │ │ ├── layout.js │ │ │ ├── route.js │ │ │ ├── tabs.js │ │ │ ├── tenant.js │ │ │ └── user.js │ ├── test.js │ ├── utils │ │ ├── Enum.js │ │ ├── Paginate.js │ │ ├── VNodeUtil.js │ │ ├── common.util.js │ │ ├── db.util.js │ │ ├── element.util.js │ │ ├── print.util.js │ │ ├── request.util.js │ │ ├── response.error.util.js │ │ ├── validateUtil.js │ │ └── vue.render.util.js │ └── views │ │ ├── base │ │ ├── config │ │ │ ├── ConfigConfigMixin.js │ │ │ ├── config-edit.vue │ │ │ ├── config-filter.vue │ │ │ ├── config-selector.vue │ │ │ └── config.vue │ │ ├── dict │ │ │ ├── DictConfigMixin.js │ │ │ ├── dict-edit.vue │ │ │ ├── dict-filter.vue │ │ │ ├── dict-selector.vue │ │ │ └── dict.vue │ │ └── dict_detail │ │ │ ├── DictDetailConfigMixin.js │ │ │ ├── dict_detail-edit.vue │ │ │ ├── dict_detail-filter.vue │ │ │ ├── dict_detail-selector.vue │ │ │ └── dict_detail.vue │ │ ├── log │ │ ├── account_log │ │ │ ├── AccountLogConfigMixin.js │ │ │ ├── account_log-edit.vue │ │ │ ├── account_log-filter.vue │ │ │ ├── account_log-selector.vue │ │ │ └── account_log.vue │ │ └── request_log │ │ │ ├── RequestLogConfigMixin.js │ │ │ ├── request_log-edit.vue │ │ │ ├── request_log-filter.vue │ │ │ ├── request_log-selector.vue │ │ │ └── request_log.vue │ │ ├── system │ │ ├── index │ │ │ └── index.vue │ │ ├── layout │ │ │ ├── layout-change-pass.vue │ │ │ ├── layout-left-menu-node.vue │ │ │ ├── layout-left-menu.vue │ │ │ ├── layout-middle-tab-bar.vue │ │ │ ├── layout-top-bar.vue │ │ │ ├── layout.vue │ │ │ └── layout_test.vue │ │ ├── loading │ │ │ └── loading.vue │ │ └── login │ │ │ ├── login.vue │ │ │ └── login_test.vue │ │ └── user_power │ │ ├── auth │ │ ├── AuthConfigMixin.js │ │ ├── auth-edit.vue │ │ ├── auth-filter.vue │ │ ├── auth-selector-list.vue │ │ ├── auth-selector.vue │ │ └── auth.vue │ │ ├── role │ │ ├── RoleConfigMixin.js │ │ ├── role-edit.vue │ │ ├── role-filter.vue │ │ ├── role-selector.vue │ │ └── role.vue │ │ ├── tenant │ │ ├── TenantConfigMixin.js │ │ ├── tenant-edit.vue │ │ ├── tenant-filter.vue │ │ ├── tenant-selector.vue │ │ └── tenant.vue │ │ └── user │ │ ├── UserConfigMixin.js │ │ ├── user-edit.vue │ │ ├── user-filter.vue │ │ ├── user-selector.vue │ │ └── user.vue └── vue.config.js ├── ezm-server ├── .gitignore ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── fangjc1986 │ │ │ ├── ezmpro │ │ │ ├── EzmproApplication.java │ │ │ ├── GlobalExceptionHandler.java │ │ │ ├── InterceptorConfig.java │ │ │ ├── MongoConfig.java │ │ │ ├── MyBatisPlusConfig.java │ │ │ ├── RedisSessionConfig.java │ │ │ ├── ScheduleTaskConfig.java │ │ │ ├── SwaggerConfig.java │ │ │ ├── access │ │ │ │ └── controller │ │ │ │ │ └── AccountController.java │ │ │ ├── common │ │ │ │ ├── controller │ │ │ │ │ ├── ImageCodeController.java │ │ │ │ │ ├── SignController.java │ │ │ │ │ └── SysUploadController.java │ │ │ │ ├── mapper │ │ │ │ │ └── BaseValidateMapper.java │ │ │ │ └── service │ │ │ │ │ └── ImageCodeService.java │ │ │ ├── intercepor │ │ │ │ ├── EveryInterceptor.java │ │ │ │ ├── SignInterceptor.java │ │ │ │ └── UserAuthorizationInterceptor.java │ │ │ └── sys │ │ │ │ ├── controller │ │ │ │ ├── AccountLogController.java │ │ │ │ ├── AuthController.java │ │ │ │ ├── ConfigController.java │ │ │ │ ├── DictController.java │ │ │ │ ├── DictDetailController.java │ │ │ │ ├── RequestLogController.java │ │ │ │ ├── RoleAuthController.java │ │ │ │ ├── RoleController.java │ │ │ │ ├── TenantController.java │ │ │ │ ├── UploadController.java │ │ │ │ ├── UserController.java │ │ │ │ ├── UserRoleController.java │ │ │ │ └── UserTenantController.java │ │ │ │ ├── mapper │ │ │ │ ├── AccountLogMapper.java │ │ │ │ ├── AuthMapper.java │ │ │ │ ├── ConfigMapper.java │ │ │ │ ├── DictDetailMapper.java │ │ │ │ ├── DictMapper.java │ │ │ │ ├── RequestLogMapper.java │ │ │ │ ├── RoleAuthMapper.java │ │ │ │ ├── RoleMapper.java │ │ │ │ ├── TenantMapper.java │ │ │ │ ├── UploadMapper.java │ │ │ │ ├── UserMapper.java │ │ │ │ ├── UserRoleMapper.java │ │ │ │ └── UserTenantMapper.java │ │ │ │ ├── model │ │ │ │ ├── AccountLog.java │ │ │ │ ├── Auth.java │ │ │ │ ├── Config.java │ │ │ │ ├── Dict.java │ │ │ │ ├── DictDetail.java │ │ │ │ ├── RequestLog.java │ │ │ │ ├── Role.java │ │ │ │ ├── RoleAuth.java │ │ │ │ ├── Tenant.java │ │ │ │ ├── Upload.java │ │ │ │ ├── User.java │ │ │ │ ├── UserRole.java │ │ │ │ └── UserTenant.java │ │ │ │ └── service │ │ │ │ ├── IAccountLogService.java │ │ │ │ ├── IAuthService.java │ │ │ │ ├── IConfigService.java │ │ │ │ ├── IDictDetailService.java │ │ │ │ ├── IDictService.java │ │ │ │ ├── IRequestLogService.java │ │ │ │ ├── IRoleAuthService.java │ │ │ │ ├── IRoleService.java │ │ │ │ ├── ITenantService.java │ │ │ │ ├── IUploadService.java │ │ │ │ ├── IUserRoleService.java │ │ │ │ ├── IUserService.java │ │ │ │ ├── IUserTenantService.java │ │ │ │ └── impl │ │ │ │ ├── AccountLogServiceImpl.java │ │ │ │ ├── AuthServiceImpl.java │ │ │ │ ├── ConfigServiceImpl.java │ │ │ │ ├── DictDetailServiceImpl.java │ │ │ │ ├── DictServiceImpl.java │ │ │ │ ├── RequestLogServiceImpl.java │ │ │ │ ├── RoleAuthServiceImpl.java │ │ │ │ ├── RoleServiceImpl.java │ │ │ │ ├── TenantServiceImpl.java │ │ │ │ ├── UploadServiceImpl.java │ │ │ │ ├── UserRoleServiceImpl.java │ │ │ │ ├── UserServiceImpl.java │ │ │ │ └── UserTenantServiceImpl.java │ │ │ ├── generator │ │ │ └── CodeGenerator.java │ │ │ └── support │ │ │ ├── controller │ │ │ └── BaseController.java │ │ │ ├── entity │ │ │ ├── IdsForm.java │ │ │ ├── R.java │ │ │ └── Token.java │ │ │ ├── exception │ │ │ └── ServiceException.java │ │ │ ├── helper │ │ │ ├── ChannelFilter.java │ │ │ ├── MetaHandler.java │ │ │ ├── RequestWrapper.java │ │ │ ├── ResponseFilter.java │ │ │ ├── ResponseWrapper.java │ │ │ └── SystemHelper.java │ │ │ ├── model │ │ │ ├── BaseModel.java │ │ │ ├── BaseMongoModel.java │ │ │ └── BasePidModel.java │ │ │ ├── provider │ │ │ └── SpringSecurityAuditorAware.java │ │ │ ├── service │ │ │ ├── BaseMongoService.java │ │ │ ├── BaseService.java │ │ │ ├── TokenService.java │ │ │ └── UserAuthorizationService.java │ │ │ ├── util │ │ │ ├── AESUtil.java │ │ │ ├── BeanUtil.java │ │ │ ├── CollectionUtil.java │ │ │ ├── CommonUtil.java │ │ │ ├── ConditionMongoUtil.java │ │ │ ├── ConditionUtil.java │ │ │ ├── DecimalUtil.java │ │ │ ├── DrawImageUtils.java │ │ │ ├── EPage.java │ │ │ ├── EnumText.java │ │ │ ├── ExcelUtil.java │ │ │ ├── IPUtils.java │ │ │ ├── ListFinder.java │ │ │ ├── LocalDateTimeUtil.java │ │ │ ├── Md5Util.java │ │ │ ├── MongoPageable.java │ │ │ ├── ParamsUtil.java │ │ │ ├── RedisLockUtil.java │ │ │ ├── RedisUtil.java │ │ │ ├── SerializableUtil.java │ │ │ ├── StringUtil.java │ │ │ └── ValidateUtil.java │ │ │ └── validator │ │ │ ├── Exist.java │ │ │ └── impl │ │ │ └── ExistValidator.java │ └── resources │ │ ├── application-dev.yml │ │ ├── application-prod.yml │ │ ├── application-test.yml │ │ ├── application.properties │ │ ├── application.yml │ │ ├── ireport │ │ └── receipt_report.jrxml │ │ ├── mapper │ │ └── sys │ │ │ ├── AccountLogMapper.xml │ │ │ ├── AuthMapper.xml │ │ │ ├── ConfigMapper.xml │ │ │ ├── DictDetailMapper.xml │ │ │ ├── DictMapper.xml │ │ │ ├── RequestLogMapper.xml │ │ │ ├── RoleAuthMapper.xml │ │ │ ├── RoleMapper.xml │ │ │ ├── TenantMapper.xml │ │ │ ├── UploadMapper.xml │ │ │ ├── UserMapper.xml │ │ │ ├── UserRoleMapper.xml │ │ │ └── UserTenantMapper.xml │ │ └── template │ │ └── code_generator │ │ └── controller.java.vm │ └── test │ └── java │ └── com │ └── fangjc1986 │ └── ezmpro │ ├── EzmproApplicationTests.java │ ├── common │ └── UtilTest.java │ ├── support │ └── BaseTest.java │ └── sys │ ├── UserServiceTest.java │ └── UserTest.java └── ezm_model.sql /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 eric.fang 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 | -------------------------------------------------------------------------------- /ezm-app/.env: -------------------------------------------------------------------------------- 1 | # 浏览器标题 后缀 2 | VUE_APP_TITLE='Easy Management Demo' 3 | # 后台左上角标题全称 4 | VUE_APP_TOP_TITLE='EZM DEMO' 5 | # 后台左上角标题缩进简称 6 | VUE_APP_TOP_TITLE_S='EZM' 7 | # 登录标题 8 | VUE_APP_LOGIN_TITLE='Easy Management' -------------------------------------------------------------------------------- /ezm-app/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | /ezm-pro-app-dist 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /ezm-app/alias.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | function resolve(dir) { 4 | return path.join(__dirname, dir) 5 | } 6 | 7 | module.exports = { 8 | resolve: { 9 | alias: { 10 | '@': resolve('src'), 11 | } 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /ezm-app/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /ezm-app/public/excel-template/comment-template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/public/excel-template/comment-template.xlsx -------------------------------------------------------------------------------- /ezm-app/public/excel-template/output-detail-template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/public/excel-template/output-detail-template.xlsx -------------------------------------------------------------------------------- /ezm-app/public/excel-template/receipt-detail-template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/public/excel-template/receipt-detail-template.xlsx -------------------------------------------------------------------------------- /ezm-app/public/excel-template/transfer-detail-template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/public/excel-template/transfer-detail-template.xlsx -------------------------------------------------------------------------------- /ezm-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/public/favicon.ico -------------------------------------------------------------------------------- /ezm-app/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ezm-app/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | 16 | -------------------------------------------------------------------------------- /ezm-app/src/api/base/config.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const configGetList = (params) => { 4 | return request({ 5 | url: '/sys/config/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const configGet = (params) => { 12 | return request({ 13 | url: '/sys/config/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const configSave = (data) => { 20 | return request({ 21 | url: '/sys/config/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const configUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/config/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const configRemove = (data) => { 35 | return request({ 36 | url: '/sys/config/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/base/dict.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const dictGetList = (params) => { 4 | return request({ 5 | url: '/sys/dict/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const dictGet = (params) => { 12 | return request({ 13 | url: '/sys/dict/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const dictSave = (data) => { 20 | return request({ 21 | url: '/sys/dict/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const dictUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/dict/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const dictRemove = (data) => { 35 | return request({ 36 | url: '/sys/dict/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/base/dict_detail.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const dictDetailGetList = (params) => { 4 | return request({ 5 | url: '/sys/dict-detail/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const dictDetailGet = (params) => { 12 | return request({ 13 | url: '/sys/dict-detail/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const dictDetailSave = (data) => { 20 | return request({ 21 | url: '/sys/dict-detail/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const dictDetailUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/dict-detail/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const dictDetailRemove = (data) => { 35 | return request({ 36 | url: '/sys/dict-detail/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | 43 | export const getDictToOptionsByCode = (code, needCodePrefix = true) => { 44 | return dictDetailGetList({ 45 | size: 999, 46 | dictCode: code, 47 | }).then(resp => { 48 | return resp.records.map(x => { 49 | x.label = (needCodePrefix ? (x.code + ' - ') : '') + x.name; 50 | x.value = x.code; 51 | return x; 52 | }); 53 | }) 54 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/cfg/channel.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const channelGetList = (params) => { 4 | return request({ 5 | url: '/cfg/channel/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const channelGet = (params) => { 12 | return request({ 13 | url: '/cfg/channel/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const channelSave = (data) => { 20 | return request({ 21 | url: '/cfg/channel/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const channelUpdateList = (data) => { 27 | return request({ 28 | url: '/cfg/channel/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const channelRemove = (data) => { 35 | return request({ 36 | url: '/cfg/channel/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/cfg/industry.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const industryGetList = (params) => { 4 | return request({ 5 | url: '/cfg/industry/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const industryGet = (params) => { 12 | return request({ 13 | url: '/cfg/industry/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const industrySave = (data) => { 20 | return request({ 21 | url: '/cfg/industry/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const industryUpdateList = (data) => { 27 | return request({ 28 | url: '/cfg/industry/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const industryRemove = (data) => { 35 | return request({ 36 | url: '/cfg/industry/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/cfg/industry_user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const industryUserGetList = (params) => { 4 | return request({ 5 | url: '/cfg/industry-user/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const industryUserGet = (params) => { 12 | return request({ 13 | url: '/cfg/industry-user/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const industryUserSave = (data) => { 20 | return request({ 21 | url: '/cfg/industry-user/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const industryUserUpdateList = (data) => { 27 | return request({ 28 | url: '/cfg/industry-user/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const industryUserRemove = (data) => { 35 | return request({ 36 | url: '/cfg/industry-user/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/cfg/keywords.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const keywordsGetList = (params) => { 4 | return request({ 5 | url: '/cfg/keywords/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const keywordsGet = (params) => { 12 | return request({ 13 | url: '/cfg/keywords/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const keywordsSave = (data) => { 20 | return request({ 21 | url: '/cfg/keywords/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const keywordsUpdateList = (data) => { 27 | return request({ 28 | url: '/cfg/keywords/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const keywordsRemove = (data) => { 35 | return request({ 36 | url: '/cfg/keywords/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/log/account_log.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const accountLogGetList = (params) => { 4 | return request({ 5 | url: '/sys/account-log/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const accountLogGet = (params) => { 12 | return request({ 13 | url: '/sys/account-log/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const accountLogSave = (data) => { 20 | return request({ 21 | url: '/sys/account-log/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const accountLogUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/account-log/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const accountLogRemove = (data) => { 35 | return request({ 36 | url: '/sys/account-log/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/log/request_log.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const requestLogGetList = (params) => { 4 | return request({ 5 | url: '/sys/request-log/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const requestLogGet = (params) => { 12 | return request({ 13 | url: '/sys/request-log/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const requestLogSave = (data) => { 20 | return request({ 21 | url: '/sys/request-log/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const requestLogUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/request-log/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const requestLogRemove = (data) => { 35 | return request({ 36 | url: '/sys/request-log/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/pst/comment.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const commentGetList = (params) => { 4 | return request({ 5 | url: '/pst/comment/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const commentGet = (params) => { 12 | return request({ 13 | url: '/pst/comment/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const commentSave = (data) => { 20 | return request({ 21 | url: '/pst/comment/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const commentUpdateList = (data) => { 27 | return request({ 28 | url: '/pst/comment/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const commentRemove = (data) => { 35 | return request({ 36 | url: '/pst/comment/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const commentSubmit = (data) => { 43 | return request({ 44 | url: '/pst/comment/submit', 45 | method: 'post', 46 | data, 47 | }) 48 | }; 49 | 50 | export const commentApprove = (data) => { 51 | return request({ 52 | url: '/pst/comment/approve', 53 | method: 'post', 54 | data, 55 | }) 56 | }; 57 | 58 | export const commentBindIndustry = (data) => { 59 | return request({ 60 | url: '/pst/comment/bindIndustry', 61 | method: 'post', 62 | data, 63 | }) 64 | }; 65 | 66 | export const commentBindIndustryUser = (data) => { 67 | return request({ 68 | url: '/pst/comment/bindIndustryUser', 69 | method: 'post', 70 | data, 71 | }) 72 | }; 73 | 74 | export const commentExcelImport = (data) => { 75 | return request({ 76 | url: '/pst/comment/excelImport', 77 | method: 'post', 78 | headers: { 79 | 'Content-Type':'multipart/form-data' 80 | }, 81 | data, 82 | }) 83 | }; 84 | -------------------------------------------------------------------------------- /ezm-app/src/api/pst/post.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const postGetList = (params) => { 4 | return request({ 5 | url: '/pst/post/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const postGet = (params) => { 12 | return request({ 13 | url: '/pst/post/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const postSave = (data) => { 20 | return request({ 21 | url: '/pst/post/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const postUpdateList = (data) => { 27 | return request({ 28 | url: '/pst/post/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const postRemove = (data) => { 35 | return request({ 36 | url: '/pst/post/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const postSubmit = (data) => { 43 | return request({ 44 | url: '/pst/post/submit', 45 | method: 'post', 46 | data, 47 | }) 48 | }; 49 | 50 | export const postApprove = (data) => { 51 | return request({ 52 | url: '/pst/post/approve', 53 | method: 'post', 54 | data, 55 | }) 56 | }; 57 | 58 | export const postBindIndustry = (data) => { 59 | return request({ 60 | url: '/pst/post/bindIndustry', 61 | method: 'post', 62 | data, 63 | }) 64 | }; 65 | 66 | export const postExcelImport = (data) => { 67 | return request({ 68 | url: '/pst/post/excelImport', 69 | method: 'post', 70 | headers: { 71 | 'Content-Type':'multipart/form-data' 72 | }, 73 | data, 74 | }) 75 | }; 76 | -------------------------------------------------------------------------------- /ezm-app/src/api/pst/post_cat.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const postCatGetList = (params) => { 4 | return request({ 5 | url: '/pst/post-cat/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const postCatGet = (params) => { 12 | return request({ 13 | url: '/pst/post-cat/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const postCatSave = (data) => { 20 | return request({ 21 | url: '/pst/post-cat/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const postCatUpdateList = (data) => { 27 | return request({ 28 | url: '/pst/post-cat/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const postCatRemove = (data) => { 35 | return request({ 36 | url: '/pst/post-cat/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/pst/statistic.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const pstStatisticWidgetQty = (params) => { 4 | return request({ 5 | url: '/pst/statistic/widgetQty', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const pstPostQtyChart = (params) => { 12 | return request({ 13 | url: '/pst/statistic/postQtyChart', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const pstCommentQtyChart = (params) => { 20 | return request({ 21 | url: '/pst/statistic/commentQtyChart', 22 | method: 'get', 23 | params, 24 | }) 25 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/sys/access.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | 4 | export const accessSignOut = (data) => { 5 | return request({ 6 | url: '/access/account/signOut', 7 | method: 'post', 8 | data, 9 | }) 10 | }; 11 | 12 | export const accessGetMyInfo = (params) => { 13 | return request({ 14 | url: '/access/account/getMyInfo', 15 | method: 'get', 16 | params, 17 | }) 18 | }; 19 | 20 | export const accessAuthList = (params) => { 21 | return request({ 22 | url: '/access/account/authList', 23 | method: 'get', 24 | params, 25 | }) 26 | }; 27 | 28 | export const accessChangePass = (data) => { 29 | return request({ 30 | url: '/access/account/password', 31 | method: 'post', 32 | data, 33 | }) 34 | }; 35 | 36 | export const accessTenantList = (params) => { 37 | return request({ 38 | url: '/access/account/tenantList', 39 | method: 'get', 40 | params, 41 | }) 42 | }; 43 | -------------------------------------------------------------------------------- /ezm-app/src/api/sys/sign.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | 4 | export const signInRequest = (data) => { 5 | return request({ 6 | url: '/common/sign/in', 7 | method: 'post', 8 | data, 9 | }) 10 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/user_power/auth.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const authGetList = (params) => { 4 | return request({ 5 | url: '/sys/auth/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const authGet = (params) => { 12 | return request({ 13 | url: '/sys/auth/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const authSave = (data) => { 20 | return request({ 21 | url: '/sys/auth/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const authUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/auth/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const authRemove = (data) => { 35 | return request({ 36 | url: '/sys/auth/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const authAddCRUD = (data) => { 43 | return request({ 44 | url: '/sys/auth/addCRUD', 45 | method: 'post', 46 | data, 47 | }) 48 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/user_power/role.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const roleGetList = (params) => { 4 | return request({ 5 | url: '/sys/role/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const roleGet = (params) => { 12 | return request({ 13 | url: '/sys/role/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const roleSave = (data) => { 20 | return request({ 21 | url: '/sys/role/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const roleUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/role/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const roleRemove = (data) => { 35 | return request({ 36 | url: '/sys/role/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const roleBindAuths = (data) => { 43 | return request({ 44 | url: '/sys/role/bindAuths', 45 | method: 'post', 46 | data, 47 | }) 48 | }; 49 | 50 | export const roleAuthList = (params) => { 51 | return request({ 52 | url: '/sys/role/authList', 53 | method: 'get', 54 | params, 55 | }) 56 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/user_power/tenant.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const tenantGetList = (params) => { 4 | return request({ 5 | url: '/sys/tenant/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const tenantGet = (params) => { 12 | return request({ 13 | url: '/sys/tenant/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const tenantSave = (data) => { 20 | return request({ 21 | url: '/sys/tenant/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const tenantUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/tenant/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const tenantRemove = (data) => { 35 | return request({ 36 | url: '/sys/tenant/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/user_power/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const userGetList = (params) => { 4 | return request({ 5 | url: '/sys/user/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const userGet = (params) => { 12 | return request({ 13 | url: '/sys/user/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const userSave = (data) => { 20 | return request({ 21 | url: '/sys/user/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const userUpdateList = (data) => { 27 | return request({ 28 | url: '/sys/user/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const userRemove = (data) => { 35 | return request({ 36 | url: '/sys/user/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const userUpdateURT = (data) => { 43 | return request({ 44 | url: '/sys/user/updateURT', 45 | method: 'post', 46 | data, 47 | }) 48 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/company.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const companyGetList = (params) => { 4 | return request({ 5 | url: '/wms/company/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const companyGet = (params) => { 12 | return request({ 13 | url: '/wms/company/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const companySave = (data) => { 20 | return request({ 21 | url: '/wms/company/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const companyUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/company/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const companyRemove = (data) => { 35 | return request({ 36 | url: '/wms/company/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/goods.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const goodsGetList = (params) => { 4 | return request({ 5 | url: '/wms/goods/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const goodsGet = (params) => { 12 | return request({ 13 | url: '/wms/goods/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const goodsSave = (data) => { 20 | return request({ 21 | url: '/wms/goods/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const goodsUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/goods/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const goodsRemove = (data) => { 35 | return request({ 36 | url: '/wms/goods/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/inventory.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const inventoryGetList = (params) => { 4 | return request({ 5 | url: '/wms/inventory/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const inventoryGet = (params) => { 12 | return request({ 13 | url: '/wms/inventory/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const inventorySave = (data) => { 20 | return request({ 21 | url: '/wms/inventory/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const inventoryUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/inventory/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const inventoryRemove = (data) => { 35 | return request({ 36 | url: '/wms/inventory/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/inventory_history.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const inventoryHistoryGetList = (params) => { 4 | return request({ 5 | url: '/wms/inventory-history/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const inventoryHistoryGet = (params) => { 12 | return request({ 13 | url: '/wms/inventory-history/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const inventoryHistorySave = (data) => { 20 | return request({ 21 | url: '/wms/inventory-history/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const inventoryHistoryUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/inventory-history/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const inventoryHistoryRemove = (data) => { 35 | return request({ 36 | url: '/wms/inventory-history/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/output.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const outputGetList = (params) => { 4 | return request({ 5 | url: '/wms/output/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const outputGet = (params) => { 12 | return request({ 13 | url: '/wms/output/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const outputSave = (data) => { 20 | return request({ 21 | url: '/wms/output/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const outputUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/output/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const outputRemove = (data) => { 35 | return request({ 36 | url: '/wms/output/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/output_detail.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const outputDetailGetList = (params) => { 4 | return request({ 5 | url: '/wms/output-detail/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const outputDetailGet = (params) => { 12 | return request({ 13 | url: '/wms/output-detail/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const outputDetailSave = (data) => { 20 | return request({ 21 | url: '/wms/output-detail/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const outputDetailUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/output-detail/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const outputDetailRemove = (data) => { 35 | return request({ 36 | url: '/wms/output-detail/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/output_wms.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const outputWmsGetList = (params) => { 4 | return request({ 5 | url: '/wms/output/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const outputWmsGet = (params) => { 12 | return request({ 13 | url: '/wms/output/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const outputWmsSave = (data) => { 20 | return request({ 21 | url: '/wms/output/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const outputWmsUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/output/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const outputWmsRemove = (data) => { 35 | return request({ 36 | url: '/wms/output/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | 43 | export const outputWmsSubmit = (data) => { 44 | return request({ 45 | url: '/wms/output/submit', 46 | method: 'post', 47 | data, 48 | }) 49 | }; 50 | 51 | export const outputWmsApprove = (data) => { 52 | return request({ 53 | url: '/wms/output/approve', 54 | method: 'post', 55 | data, 56 | }) 57 | }; 58 | 59 | export const outputWmsFinish = (data) => { 60 | return request({ 61 | url: '/wms/output/finish', 62 | method: 'post', 63 | data, 64 | }) 65 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/receipt.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const receiptGetList = (params) => { 4 | return request({ 5 | url: '/wms/receipt/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const receiptGet = (params) => { 12 | return request({ 13 | url: '/wms/receipt/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const receiptSave = (data) => { 20 | return request({ 21 | url: '/wms/receipt/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const receiptUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/receipt/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const receiptRemove = (data) => { 35 | return request({ 36 | url: '/wms/receipt/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const receiptSubmit = (data) => { 43 | return request({ 44 | url: '/wms/receipt/submit', 45 | method: 'post', 46 | data, 47 | }) 48 | }; 49 | 50 | export const receiptApprove = (data) => { 51 | return request({ 52 | url: '/wms/receipt/approve', 53 | method: 'post', 54 | data, 55 | }) 56 | }; 57 | 58 | export const receiptFinish = (data) => { 59 | return request({ 60 | url: '/wms/receipt/finish', 61 | method: 'post', 62 | data, 63 | }) 64 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/receipt_detail.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const receiptDetailGetList = (params) => { 4 | return request({ 5 | url: '/wms/receipt-detail/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const receiptDetailGet = (params) => { 12 | return request({ 13 | url: '/wms/receipt-detail/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const receiptDetailSave = (data) => { 20 | return request({ 21 | url: '/wms/receipt-detail/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const receiptDetailUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/receipt-detail/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const receiptDetailRemove = (data) => { 35 | return request({ 36 | url: '/wms/receipt-detail/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const receiptImportExcel = (data) => { 43 | return request({ 44 | url: '/wms/receipt-detail/importExcel', 45 | method: 'post', 46 | data, 47 | }) 48 | }; 49 | -------------------------------------------------------------------------------- /ezm-app/src/api/wms/reservoir.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const reservoirGetList = (params) => { 4 | return request({ 5 | url: '/wms/reservoir/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const reservoirGet = (params) => { 12 | return request({ 13 | url: '/wms/reservoir/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const reservoirSave = (data) => { 20 | return request({ 21 | url: '/wms/reservoir/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const reservoirUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/reservoir/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const reservoirRemove = (data) => { 35 | return request({ 36 | url: '/wms/reservoir/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/shelf.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const shelfGetList = (params) => { 4 | return request({ 5 | url: '/wms/shelf/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const shelfGet = (params) => { 12 | return request({ 13 | url: '/wms/shelf/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const shelfSave = (data) => { 20 | return request({ 21 | url: '/wms/shelf/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const shelfUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/shelf/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const shelfRemove = (data) => { 35 | return request({ 36 | url: '/wms/shelf/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/transfer.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const transferGetList = (params) => { 4 | return request({ 5 | url: '/wms/transfer/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const transferGet = (params) => { 12 | return request({ 13 | url: '/wms/transfer/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const transferSave = (data) => { 20 | return request({ 21 | url: '/wms/transfer/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const transferUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/transfer/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const transferRemove = (data) => { 35 | return request({ 36 | url: '/wms/transfer/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | 42 | export const transferSubmit = (data) => { 43 | return request({ 44 | url: '/wms/transfer/submit', 45 | method: 'post', 46 | data, 47 | }) 48 | }; 49 | 50 | export const transferApprove = (data) => { 51 | return request({ 52 | url: '/wms/transfer/approve', 53 | method: 'post', 54 | data, 55 | }) 56 | }; 57 | 58 | export const transferFinish = (data) => { 59 | return request({ 60 | url: '/wms/transfer/finish', 61 | method: 'post', 62 | data, 63 | }) 64 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/transfer_detail.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const transferDetailGetList = (params) => { 4 | return request({ 5 | url: '/wms/transfer-detail/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const transferDetailGet = (params) => { 12 | return request({ 13 | url: '/wms/transfer-detail/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const transferDetailSave = (data) => { 20 | return request({ 21 | url: '/wms/transfer-detail/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const transferDetailUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/transfer-detail/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const transferDetailRemove = (data) => { 35 | return request({ 36 | url: '/wms/transfer-detail/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/transfer_history.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const transferHistoryGetList = (params) => { 4 | return request({ 5 | url: '/wms/transfer-history/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const transferHistoryGet = (params) => { 12 | return request({ 13 | url: '/wms/transfer-history/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const transferHistorySave = (data) => { 20 | return request({ 21 | url: '/wms/transfer-history/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const transferHistoryUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/transfer-history/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const transferHistoryRemove = (data) => { 35 | return request({ 36 | url: '/wms/transfer-history/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/warehouse.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const warehouseGetList = (params) => { 4 | return request({ 5 | url: '/wms/warehouse/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const warehouseGet = (params) => { 12 | return request({ 13 | url: '/wms/warehouse/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const warehouseSave = (data) => { 20 | return request({ 21 | url: '/wms/warehouse/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const warehouseUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/warehouse/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const warehouseRemove = (data) => { 35 | return request({ 36 | url: '/wms/warehouse/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api/wms/wms_output.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const wmsOutputGetList = (params) => { 4 | return request({ 5 | url: '/wms/output/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const wmsOutputGet = (params) => { 12 | return request({ 13 | url: '/wms/output/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const wmsOutputSave = (data) => { 20 | return request({ 21 | url: '/wms/output/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const wmsOutputUpdateList = (data) => { 27 | return request({ 28 | url: '/wms/output/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const wmsOutputRemove = (data) => { 35 | return request({ 36 | url: '/wms/output/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; -------------------------------------------------------------------------------- /ezm-app/src/api_mock/sys/auth_mock.js: -------------------------------------------------------------------------------- 1 | import {mockResponseIntercept} from "@/utils/common.util"; 2 | 3 | mockResponseIntercept("/sys/auth", [ 4 | { 5 | id: '1', 6 | path: '/system/index', 7 | name: '首页', 8 | icon: 'icon-folder-open', 9 | pid: '0', 10 | }, 11 | { 12 | id: '2', 13 | path: '/sys', 14 | name: '基础配置', 15 | icon: 'icon-folder-open', 16 | pid: '0' 17 | }, 18 | { 19 | id: '3', 20 | path: '/sys/config', 21 | name: '参数配置', 22 | icon: 'icon-folder-open', 23 | pid: '2' 24 | }, 25 | { 26 | id: '4', 27 | path: '/sys/dict', 28 | name: '字典管理', 29 | icon: 'icon-folder-open', 30 | pid: '2', 31 | } 32 | ], 1, false); -------------------------------------------------------------------------------- /ezm-app/src/assets/css/animate.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/assets/css/animate.css -------------------------------------------------------------------------------- /ezm-app/src/assets/css/animate.css.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/assets/css/animate.css.map -------------------------------------------------------------------------------- /ezm-app/src/assets/css/animate.less: -------------------------------------------------------------------------------- 1 | .transitionAnimate(@name, @cls, @t : 0.5s ) { 2 | .@{name}-enter-active, .@{name}-leave-active { 3 | transition: @t; 4 | } 5 | .@{name}-enter, .@{name}-leave-to /* .fade-leave-active below version 2.1.8 */ { 6 | @cls(); 7 | } 8 | } 9 | .transitionAnimate(fade, { 10 | opacity:0; 11 | }); 12 | 13 | .transitionAnimate(fade-quick, { 14 | opacity:0; 15 | }, .3s); 16 | 17 | .transitionAnimate(fade-top, { 18 | opacity:0; 19 | transform: translateY(-20px); 20 | }, .4s); 21 | 22 | .transitionAnimate(fade-right, { 23 | opacity:0; 24 | transform: translateX(20px); 25 | }, .4s); 26 | .transitionAnimate(fade-right-quick, { 27 | opacity:0; 28 | transform: translateX(20px); 29 | }, .2s); -------------------------------------------------------------------------------- /ezm-app/src/assets/css/common.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["common.less"],"names":[],"mappings":"QAAQ;AAER;EACI,qBAAA;;AAGJ;EACI,aAAA;;AAGJ;EACI,WAAA;;AAGJ;EACI,YAAA;;AAGJ;EAPI,WAAA;EAIA,YAAA;;AAQJ;EACI,gBAAA;EACA,uBAAA;EACA,mBAAA;;AAGJ;EACI,gBAAA;EACA,uBAAA;EACA,mBAAA;;AAGJ;EACI,aAAA;;AAEA,SAAC;EACG,sBAAA;;AAGJ,SAAC;EACG,qBAAA;EACA,mBAAA;;AAGJ,SAAC;EACG,uBAAA;EACA,qBAAA;;AAGJ,SAAC;EATG,qBAAA;EACA,mBAAA;EAIA,uBAAA;EACA,qBAAA;;AAdR,SAsBI;EACI,YAAA;;AAvBR,SA0BI;EACI,cAAA;;AAGJ,SAAC,SACG;EACI,QAAA;EACA,YAAA;;AAMZ;EACI,eAAA;;AAGJ;EACI,yBAAA;;AAGJ;EACI,gBAAA;;AAGJ;EACI,kBAAA;;AAGJ;EACI,+CAAA;;AA3FH;EAgGO,aAAA;;AAhGP;EAmGO,kBAAA;;AAnGP;EAsGO,mBAAA;;AAtGP;EAyGO,mBAAA;EACA,kBAAA;;AA1GP;EA6GO,iBAAA;;AA7GP;EAgHO,oBAAA;;AAhHP;EAmHO,oBAAA;EACA,iBAAA;;AApHP;EAuHO,YAAA;;AAvHP;EA0HO,iBAAA;;AA1HP;EA6HO,kBAAA;;AA7HP;EAgIO,kBAAA;EACA,iBAAA;;AAjIP;EAoIO,gBAAA;;AApIP;EAuIO,mBAAA;;AAvIP;EA0IO,mBAAA;EACA,gBAAA;;AA3IP;EAgGO,aAAA;;AAhGP;EAmGO,kBAAA;;AAnGP;EAsGO,mBAAA;;AAtGP;EAyGO,mBAAA;EACA,kBAAA;;AA1GP;EA6GO,iBAAA;;AA7GP;EAgHO,oBAAA;;AAhHP;EAmHO,oBAAA;EACA,iBAAA;;AApHP;EAuHO,YAAA;;AAvHP;EA0HO,iBAAA;;AA1HP;EA6HO,kBAAA;;AA7HP;EAgIO,kBAAA;EACA,iBAAA;;AAjIP;EAoIO,gBAAA;;AApIP;EAuIO,mBAAA;;AAvIP;EA0IO,mBAAA;EACA,gBAAA","file":"common.css"} -------------------------------------------------------------------------------- /ezm-app/src/assets/css/icon-font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/assets/css/icon-font/iconfont.eot -------------------------------------------------------------------------------- /ezm-app/src/assets/css/icon-font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/assets/css/icon-font/iconfont.ttf -------------------------------------------------------------------------------- /ezm-app/src/assets/css/icon-font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/assets/css/icon-font/iconfont.woff -------------------------------------------------------------------------------- /ezm-app/src/assets/css/icon-font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/assets/css/icon-font/iconfont.woff2 -------------------------------------------------------------------------------- /ezm-app/src/assets/css/index.less: -------------------------------------------------------------------------------- 1 | @import "common"; 2 | @import "animate"; 3 | @import "reset"; -------------------------------------------------------------------------------- /ezm-app/src/assets/css/reset.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | width: 100%; 5 | overflow: hidden; 6 | font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; 7 | } 8 | /*# sourceMappingURL=reset.css.map */ -------------------------------------------------------------------------------- /ezm-app/src/assets/css/reset.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["reset.less"],"names":[],"mappings":"AAEA;AAAM;EACF,YAAA;EACA,WAAA;EACA,gBAAA;EACA,aAAa,oCAAoC,eAAe,oBAAoB,YAAY,mBAAmB,iCAAnH","file":"reset.css"} -------------------------------------------------------------------------------- /ezm-app/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/assets/logo.png -------------------------------------------------------------------------------- /ezm-app/src/components/button/ezm-dropdown-button.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 52 | 53 | -------------------------------------------------------------------------------- /ezm-app/src/components/display/ezm-code-formatter.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 54 | 55 | -------------------------------------------------------------------------------- /ezm-app/src/components/display/ezm-number-scroll.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 37 | 38 | -------------------------------------------------------------------------------- /ezm-app/src/components/display/ezm-options-tag.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 56 | 57 | -------------------------------------------------------------------------------- /ezm-app/src/components/editor/container/ezm-edit-tab.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 43 | 44 | -------------------------------------------------------------------------------- /ezm-app/src/components/editor/ezm-filter-field.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 48 | 49 | -------------------------------------------------------------------------------- /ezm-app/src/components/editor/ezm-input.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 41 | 42 | -------------------------------------------------------------------------------- /ezm-app/src/components/editor/ezm-switch.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 40 | 41 | -------------------------------------------------------------------------------- /ezm-app/src/components/editor/table-input.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 36 | 37 | -------------------------------------------------------------------------------- /ezm-app/src/components/render/render-edit-input.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ezm-app/src/components/render/render-filter-input.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | -------------------------------------------------------------------------------- /ezm-app/src/components/selector/ezm-color-picker.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 39 | 40 | -------------------------------------------------------------------------------- /ezm-app/src/components/table/ezm-table-toolbar-filter-list.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 55 | 56 | -------------------------------------------------------------------------------- /ezm-app/src/components/table/table-mixin/TableAutoResizeMixin.js: -------------------------------------------------------------------------------- 1 | import elementResizeDetectorMaker from 'element-resize-detector' 2 | import {debThr} from "@/utils/common.util"; 3 | 4 | export default { 5 | props: { 6 | minHeight: { 7 | default: '300px', 8 | }, 9 | height: { 10 | default: '300px' 11 | } 12 | }, 13 | data() { 14 | return { 15 | resize_detector: null, 16 | resize_tableHeight: '0', 17 | } 18 | }, 19 | mounted() { 20 | this.resize_detector = elementResizeDetectorMaker(); 21 | this.startTableHeightDetector(); 22 | }, 23 | deactivated() { 24 | this.resize_detector.removeListener(this.$refs.tableContainer, this.tableHeightDetectorListener); 25 | }, 26 | methods: { 27 | startTableHeightDetector() { 28 | this.resize_detector.listenTo(this.$refs.tableContainer, this.tableHeightDetectorListener); 29 | }, 30 | tableHeightDetectorListener(ele) { 31 | debThr.thrAndDeb(this._uid+'tableHeightDetectorListener', ()=>{ 32 | this.resize_tableHeight = ele.offsetHeight + 'px'; 33 | this.$refs.table.recalculate(); 34 | }); 35 | }, 36 | } 37 | } -------------------------------------------------------------------------------- /ezm-app/src/components/table/table-mixin/TableEditMixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: {}, 3 | data() { 4 | return { 5 | lastScrollPos: { 6 | scrollLeft: 0, 7 | scrollTop: 0, 8 | } 9 | } 10 | }, 11 | methods: { 12 | revertRow(row) { 13 | return this.$refs.table.revertData(row); 14 | }, 15 | reloadRow(row) { 16 | return this.$refs.table.reloadRow(row, row); 17 | }, 18 | currentChange({row}) { 19 | }, 20 | reloadData() { 21 | // let scroll = this.lastScrollPos; 22 | // this.$refs.table.reloadData(this.pageInstance.paginate.records).then(() => { 23 | // this.scrollToLast(scroll); 24 | // }); 25 | this.refreshThenScroll(); 26 | }, 27 | refreshThenScroll() { 28 | let scroll = this.lastScrollPos; 29 | this.pageInstance.getList(() => this.scrollToLast(scroll)); 30 | }, 31 | tableScroll(e) { 32 | this.lastScrollPos = e; 33 | }, 34 | scrollToLast(scroll = null) { 35 | let s = scroll || this.lastScrollPos; 36 | this.$refs.table.scrollTo(s.scrollLeft, s.scrollTop); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /ezm-app/src/components/window/ezm-scroller.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 45 | 46 | -------------------------------------------------------------------------------- /ezm-app/src/components/window/render-item.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ezm-app/src/element-variables.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Write your variables here. All available variables can be 3 | found in element-ui/packages/theme-chalk/src/common/var.scss. 4 | For example, to overwrite the theme color: 5 | */ 6 | $--color-primary: #409EFF; 7 | 8 | /* icon font path, required */ 9 | $--font-path: '~element-ui/lib/theme-chalk/fonts'; 10 | 11 | @import "~element-ui/packages/theme-chalk/src/index"; 12 | -------------------------------------------------------------------------------- /ezm-app/src/generator/CodeGenerator.js: -------------------------------------------------------------------------------- 1 | let Mysql = require("./MysqlUtil"); 2 | let Config = require("./GeneratorConfig"); 3 | let Generator = require("./GeneratorPage"); 4 | 5 | const schema = 'ezmpro'; 6 | 7 | for (let model of Config.models) { 8 | let mysql = new Mysql(); 9 | mysql.connection.query( 10 | `select * from information_schema.COLUMNS where table_name = '${model.tableName}' and table_schema = '${schema}'`, 11 | (error, results, fields) => { 12 | let generator = new Generator(results, model); 13 | generator.generatorPage(); 14 | generator.generatorApi(); 15 | generator.generatorEdit(); 16 | generator.generatorFilter(); 17 | generator.generatorConfigMixin(); 18 | generator.generatorSelector(); 19 | mysql.connection.end(); 20 | } 21 | ); 22 | } 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /ezm-app/src/generator/GeneratorConfig.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | excludeFields: ['id', 'tenant_id', 'create_user', 'create_time', 'update_time', 'update_user'], 3 | models: [ 4 | ...require('./model/SysModels'), 5 | ...require('./model/WmsModels'), 6 | ], 7 | }; -------------------------------------------------------------------------------- /ezm-app/src/generator/MysqlUtil.js: -------------------------------------------------------------------------------- 1 | let mysql = require('mysql'); 2 | 3 | let Mysql = class { 4 | connection = null; 5 | 6 | constructor() { 7 | this.connection = mysql.createConnection({ 8 | host: '', 9 | user: '', 10 | password: '', 11 | database: '' 12 | }); 13 | } 14 | 15 | }; 16 | 17 | module.exports = Mysql; 18 | 19 | -------------------------------------------------------------------------------- /ezm-app/src/generator/model/SysModels.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | { 3 | tableName: 'sys_dict', 4 | apiPrefix: 'sys/dict', 5 | pagePath: 'base/dict', 6 | }, 7 | { 8 | tableName: 'sys_dict_detail', 9 | apiPrefix: 'sys/dict-detail', 10 | pagePath: 'base/dict_detail', 11 | }, 12 | { 13 | tableName: 'sys_config', 14 | apiPrefix: 'sys/config', 15 | pagePath: 'base/config', 16 | }, 17 | { 18 | tableName: 'sys_auth', 19 | apiPrefix: 'sys/auth', 20 | pagePath: 'user_power/auth', 21 | }, 22 | { 23 | tableName: 'sys_role', 24 | apiPrefix: 'sys/role', 25 | pagePath: 'user_power/role', 26 | }, 27 | { 28 | tableName: 'sys_user', 29 | apiPrefix: 'sys/user', 30 | pagePath: 'user_power/user', 31 | }, 32 | { 33 | tableName: 'sys_tenant', 34 | apiPrefix: 'sys/tenant', 35 | pagePath: 'user_power/tenant', 36 | }, 37 | { 38 | tableName: 'sys_account_log', 39 | apiPrefix: 'sys/account-log', 40 | pagePath: 'log/account_log', 41 | }, 42 | { 43 | tableName: 'sys_request_log', 44 | apiPrefix: 'sys/request-log', 45 | pagePath: 'log/request_log', 46 | }, 47 | ]; -------------------------------------------------------------------------------- /ezm-app/src/generator/templ/ConfigMixin.templ.jst: -------------------------------------------------------------------------------- 1 | import {commonValidate} from "@/utils/validateUtil"; 2 | 3 | export default { 4 | data() { 5 | return { 6 | editSpan: {}, 7 | 8 | fields: [ 9 | @{fields} 10 | ] 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /ezm-app/src/generator/templ/api.templ.jst: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request.util'; 2 | 3 | export const @{nameCamel}GetList = (params) => { 4 | return request({ 5 | url: '/@{apiPrefix}/list', 6 | method: 'get', 7 | params, 8 | }) 9 | }; 10 | 11 | export const @{nameCamel}Get = (params) => { 12 | return request({ 13 | url: '/@{apiPrefix}/get', 14 | method: 'get', 15 | params, 16 | }) 17 | }; 18 | 19 | export const @{nameCamel}Save = (data) => { 20 | return request({ 21 | url: '/@{apiPrefix}/save', 22 | method: 'post', 23 | data, 24 | }) 25 | }; 26 | export const @{nameCamel}UpdateList = (data) => { 27 | return request({ 28 | url: '/@{apiPrefix}/updateList', 29 | method: 'post', 30 | data, 31 | }) 32 | }; 33 | 34 | export const @{nameCamel}Remove = (data) => { 35 | return request({ 36 | url: '/@{apiPrefix}/remove', 37 | method: 'post', 38 | data, 39 | }) 40 | }; 41 | -------------------------------------------------------------------------------- /ezm-app/src/generator/templ/fields/field.templ.jst: -------------------------------------------------------------------------------- 1 | { 2 | // COMMENT: @{comment} 3 | prop: '@{prop}', 4 | label: '@{label}', 5 | editRender: true, 6 | rules: [commonValidate.required,], 7 | filterRank: @{filterRank}, 8 | editRank: @{editRank}, 9 | }, 10 | -------------------------------------------------------------------------------- /ezm-app/src/main.js: -------------------------------------------------------------------------------- 1 | import 'babel-polyfill'; 2 | 3 | import Vue from 'vue' 4 | import App from './App.vue' 5 | import router from './router' 6 | import store from "./store" 7 | import './plugins/index.js' 8 | import './assets/css/index.less' 9 | import Enum from "@/utils/Enum"; 10 | 11 | Vue.config.productionTip = false; 12 | Vue.prototype.$enum = Enum; 13 | 14 | new Vue({ 15 | router, 16 | store, 17 | render: h => h(App), 18 | created() { 19 | Enum.vue = this; 20 | this.$store.dispatch("layout/reload"); 21 | }, 22 | }).$mount('#app'); 23 | -------------------------------------------------------------------------------- /ezm-app/src/mixin/FilterMixin.js: -------------------------------------------------------------------------------- 1 | import {getFilterFieldName} from "@/utils/element.util"; 2 | 3 | export default { 4 | props: { 5 | pageInstance: Object, 6 | }, 7 | data() { 8 | return {} 9 | }, 10 | computed: { 11 | fieldsComp() { 12 | return this.pageInstance.fields.concat().sort((a, b) => { 13 | return (a.filterRank || 0) - (b.filterRank || 0); 14 | }) 15 | } 16 | }, 17 | methods: { 18 | getFieldName(field) { 19 | let params = field.params || {}; 20 | return params.filterField || field.prop; 21 | }, 22 | getInputDisabled(field) { 23 | if( field.filterDisabled ) return true; 24 | return this.pageInstance.defaultFilterLocked && Object.keys( this.pageInstance.defaultFilterForm ).includes(this.getFieldName(field)); 25 | } 26 | 27 | }, 28 | } -------------------------------------------------------------------------------- /ezm-app/src/mixin/ImportMixin.js: -------------------------------------------------------------------------------- 1 | import PageTableFieldMixin from "@/mixin/page-mixin/PageTableFieldMixin"; 2 | 3 | export default { 4 | mixins: [PageTableFieldMixin], 5 | props: { 6 | defaultList: { 7 | default: () => [], 8 | } 9 | }, 10 | data() { 11 | return { 12 | list: [], 13 | importTable: null, 14 | } 15 | }, 16 | created() { 17 | 18 | }, 19 | mounted() { 20 | 21 | }, 22 | computed: {}, 23 | watch: { 24 | defaultList(v) { 25 | this.list = v; 26 | } 27 | }, 28 | methods: { 29 | getEditForm() { 30 | return this.fields.reduce((t, f) => { 31 | t[f.prop] = f.editValue || ''; 32 | return t; 33 | }, {}) 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /ezm-app/src/mixin/ScrollMixin.js: -------------------------------------------------------------------------------- 1 | import ReloadMixin from "@/mixin/ReloadMixin"; 2 | 3 | export default { 4 | mixins: [ReloadMixin], 5 | components: {}, 6 | props: {}, 7 | data() { 8 | return { 9 | s_last_scrollTop: 0, 10 | } 11 | }, 12 | computed: {}, 13 | watch: {}, 14 | created() { 15 | }, 16 | mounted() { 17 | }, 18 | destroyed() { 19 | }, 20 | activated() { 21 | this.$el.scrollTo(0, this.s_last_scrollTop); 22 | }, 23 | deactivated() { 24 | 25 | }, 26 | methods: { 27 | closeWindowEvent() { 28 | this.s_last_scrollTop = 0; 29 | this.unload(); 30 | }, 31 | switchOutEvent() { 32 | this.s_last_scrollTop = this.$el.scrollTop || 0; 33 | this.tabOut(); 34 | }, 35 | } 36 | } -------------------------------------------------------------------------------- /ezm-app/src/model/post.form.js: -------------------------------------------------------------------------------- 1 | export class ApproveForm { 2 | ids = []; 3 | status = 0; 4 | method = ''; 5 | reject = ''; 6 | } -------------------------------------------------------------------------------- /ezm-app/src/plugins/element.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Element from 'element-ui' 3 | import '../element-variables.scss' 4 | 5 | Vue.use(Element, { 6 | size: "mini", 7 | }); 8 | -------------------------------------------------------------------------------- /ezm-app/src/plugins/froala-editor.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueFroala from 'vue-froala-wysiwyg' 3 | import "froala-editor/css/froala_editor.pkgd.min.css" 4 | import "froala-editor/js/languages/zh_cn" 5 | 6 | Vue.use(VueFroala); 7 | -------------------------------------------------------------------------------- /ezm-app/src/plugins/global-component.js: -------------------------------------------------------------------------------- 1 | import EzmTextInput from '@/components/editor/ezm-text-input' 2 | import EzmSwitch from '@/components/editor/ezm-switch' 3 | import EzmColorPicker from '@/components/selector/ezm-color-picker' 4 | import EzmOptionsTag from '@/components/display/ezm-options-tag' 5 | import EzmOptionsSelector from '@/components/selector/ezm-options-selector'; 6 | import EzmFroalaEditor from '@/components/editor/ezm-froala-editor'; 7 | import EzmTreeSelector from '@/components/selector/ezm-tree-selector'; 8 | import EzmDictSelector from '@/components/selector/ezm-dict-selector'; 9 | import EzmInput from '@/components/editor/ezm-input'; 10 | 11 | import {vxeTableAddRender} from "@/utils/vue.render.util"; 12 | 13 | //自定义组件名 14 | vxeTableAddRender(EzmTextInput); 15 | vxeTableAddRender(EzmColorPicker); 16 | vxeTableAddRender(EzmOptionsTag); 17 | vxeTableAddRender(EzmSwitch); 18 | vxeTableAddRender(EzmOptionsSelector); 19 | vxeTableAddRender(EzmFroalaEditor); 20 | vxeTableAddRender(EzmTreeSelector); 21 | vxeTableAddRender(EzmInput); 22 | vxeTableAddRender(EzmDictSelector); 23 | 24 | 25 | -------------------------------------------------------------------------------- /ezm-app/src/plugins/index.js: -------------------------------------------------------------------------------- 1 | import './polyfill'; 2 | import './element'; 3 | import "./vxe-table"; 4 | import "./vue-happy-scroll"; 5 | import "./global-component"; 6 | import Vue from 'vue'; 7 | import "colors.css/css/colors.css"; 8 | import "./froala-editor"; 9 | import "highlight.js/styles/default.css" 10 | import VueCookies from 'vue-cookies' 11 | 12 | Vue.use(VueCookies); 13 | 14 | -------------------------------------------------------------------------------- /ezm-app/src/plugins/polyfill.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @description scrollTo/scrollBy的polyfill,IE9+ 3 | * @author zhangxinxu(.com) 4 | * @created 2019-07-27 5 | */ 6 | 7 | if (!window.scrollTo) { 8 | window.scrollTo = function (x, y) { 9 | window.pageXOffset = x; 10 | window.pageYOffset = y; 11 | }; 12 | } 13 | if (!window.scrollBy) { 14 | window.scrollBy = function (x, y) { 15 | window.pageXOffset += x; 16 | window.pageYOffset += y; 17 | }; 18 | } 19 | if (!document.body.scrollTo) { 20 | Element.prototype.scrollTo = function (x, y) { 21 | this.scrollLeft = x; 22 | this.scrollTop = y; 23 | }; 24 | } 25 | if (!document.body.scrollBy) { 26 | Element.prototype.scrollBy = function (x, y) { 27 | this.scrollLeft += x; 28 | this.scrollTop += y; 29 | }; 30 | } -------------------------------------------------------------------------------- /ezm-app/src/plugins/vue-happy-scroll.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { HappyScroll } from 'vue-happy-scroll' 3 | //自定义组件名 4 | Vue.component('happy-scroll', HappyScroll) 5 | // 引入css 6 | import 'vue-happy-scroll/docs/happy-scroll.css' 7 | -------------------------------------------------------------------------------- /ezm-app/src/plugins/vxe-table.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import 'xe-utils' 3 | import VXETable from 'vxe-table' 4 | import 'vxe-table/lib/index.css' 5 | import VXETablePluginElement from 'vxe-table-plugin-element' 6 | import 'vxe-table-plugin-element/dist/style.css' 7 | 8 | VXETable.setup({ 9 | size: 'mini', 10 | }); 11 | Vue.use(VXETable); 12 | VXETable.use(VXETablePluginElement); 13 | -------------------------------------------------------------------------------- /ezm-app/src/project/options.js: -------------------------------------------------------------------------------- 1 | export const defaultFilterOptions = [ 2 | {label: '全部', value: ''} 3 | ]; -------------------------------------------------------------------------------- /ezm-app/src/project/wms.options.js: -------------------------------------------------------------------------------- 1 | //状态:1:待提交;3:待审批;5:驳回;7:通过;9:完成 2 | export const wmsReceiptStatusOptions = [ 3 | {label: '待提交', value: 1, color: "#2D8CF0"}, 4 | {label: '待审批', value: 3, color: '#FF9900'}, 5 | {label: '审批驳回', value: 5, color: '#ED4014'}, 6 | {label: '审批通过', value: 7, color: '#19C919'}, 7 | {label: '完成入库', value: 9, color: '#9B1DEA'}, 8 | ]; 9 | 10 | //状态:1:待提交;3:待审批;5:驳回;7:通过;9:完成 11 | export const wmsOutputStatusOptions = [ 12 | {label: '待提交', value: 1, color: "#2D8CF0"}, 13 | {label: '待审批', value: 3, color: '#FF9900'}, 14 | {label: '审批驳回', value: 5, color: '#ED4014'}, 15 | {label: '审批通过', value: 7, color: '#19C919'}, 16 | {label: '完成出库', value: 9, color: '#9B1DEA'}, 17 | ]; 18 | 19 | //状态:1:待提交;3:待审批;5:驳回;7:通过;9:完成 20 | export const wmsTransferStatusOptions = [ 21 | {label: '待提交', value: 1, color: "#2D8CF0"}, 22 | {label: '待审批', value: 3, color: '#FF9900'}, 23 | {label: '审批驳回', value: 5, color: '#ED4014'}, 24 | {label: '审批通过', value: 7, color: '#19C919'}, 25 | {label: '完成移库', value: 9, color: '#9B1DEA'}, 26 | ]; -------------------------------------------------------------------------------- /ezm-app/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import route from "@/router/route"; 4 | import {changeWebTitle} from "@/utils/common.util"; 5 | 6 | Vue.use(VueRouter); 7 | 8 | const router = new VueRouter(route); 9 | router.beforeEach((t, f, n) => { 10 | changeWebTitle(t.meta.title + ' - ' + process.env.VUE_APP_TITLE); 11 | n(); 12 | }); 13 | 14 | export default router; 15 | -------------------------------------------------------------------------------- /ezm-app/src/router/route.js: -------------------------------------------------------------------------------- 1 | import {routerImport} from "@/utils/common.util"; 2 | 3 | let route = { 4 | routes: [ 5 | { 6 | path: '/back', 7 | redirect: '/index', 8 | component: routerImport('system/layout/layout'), 9 | children:[] 10 | }, 11 | { 12 | path: '/', 13 | component: routerImport('system/login/login'), 14 | meta: { 15 | title: '用户登录' 16 | } 17 | }, 18 | { 19 | path: '*', 20 | component: routerImport('system/loading/loading'), 21 | meta: { 22 | title: "初始化" 23 | } 24 | }, 25 | ] 26 | }; 27 | 28 | export default route; -------------------------------------------------------------------------------- /ezm-app/src/setting.js: -------------------------------------------------------------------------------- 1 | export default { 2 | serverBaseUrl: "/api/ezm-server", 3 | } -------------------------------------------------------------------------------- /ezm-app/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import tabs from "@/store/modules/tabs"; 4 | import route from "@/store/modules/route"; 5 | import user from "@/store/modules/user"; 6 | import layout from "@/store/modules/layout" 7 | import tenant from "@/store/modules/tenant" 8 | 9 | 10 | Vue.use(Vuex); 11 | 12 | const store = new Vuex.Store({ 13 | modules: { 14 | route, 15 | tabs, 16 | user, 17 | layout, 18 | tenant, 19 | }, 20 | }); 21 | 22 | export default store; -------------------------------------------------------------------------------- /ezm-app/src/store/modules/layout.js: -------------------------------------------------------------------------------- 1 | import {cookiesUtil} from "@/utils/common.util"; 2 | 3 | const state = { 4 | leftShrink: false, 5 | tableDefaultHeight: 500, 6 | tenantId: 0, 7 | dialogZIndex: 500, 8 | bodyPosition: { 9 | top: 0, 10 | left: 0, 11 | right: 0, 12 | bottom: 0, 13 | } 14 | }; 15 | 16 | // getters 17 | const getters = {}; 18 | 19 | // actions 20 | const actions = { 21 | reload({state}) { 22 | state.leftShrink = cookiesUtil.get('layout_leftShrink') || false; 23 | state.tableDefaultHeight = cookiesUtil.get('layout_tableDefaultHeight') || 500; 24 | state.tenantId = cookiesUtil.get('layout_tenantId') || 0; 25 | }, 26 | setTenantId({state}, tid) { 27 | state.tenantId = tid; 28 | cookiesUtil.set('layout_tenantId', tid); 29 | }, 30 | setLeftShrink({state}, status) { 31 | state.leftShrink = status; 32 | cookiesUtil.set('layout_leftShrink', status); 33 | }, 34 | setTableDefaultHeight({state}, height) { 35 | state.tableDefaultHeight = height; 36 | cookiesUtil.set('layout_tableDefaultHeight', height); 37 | }, 38 | incDialogZIndex({state}) { 39 | state.dialogZIndex++; 40 | }, 41 | setBodyPosition({state}, pos) { 42 | state.bodyPosition = pos; 43 | } 44 | }; 45 | 46 | // mutations 47 | const mutations = {}; 48 | 49 | export default { 50 | namespaced: true, 51 | state, 52 | getters, 53 | actions, 54 | mutations 55 | } -------------------------------------------------------------------------------- /ezm-app/src/store/modules/tenant.js: -------------------------------------------------------------------------------- 1 | import {cookiesUtil, DialogUtil} from "@/utils/common.util"; 2 | import {accessTenantList} from "@/api/sys/access"; 3 | import Enum from "@/utils/Enum"; 4 | 5 | const state = { 6 | tenantList: [], 7 | tenantId: '', 8 | }; 9 | 10 | // getters 11 | const getters = {}; 12 | 13 | // actions 14 | const actions = { 15 | reloadTenantList({state}) { 16 | accessTenantList().then(resp => { 17 | state.tenantList = resp.map(x => { 18 | x.label = x.name; 19 | x.value = x.id; 20 | return x; 21 | }); 22 | }) 23 | } 24 | }; 25 | 26 | // mutations 27 | const mutations = { 28 | setTenantId(state, tid) { 29 | if (state.tenantId && state.tenantId !== tid && tid) { 30 | DialogUtil.toast("正在切换租户,并刷新页面!", 'loading'); 31 | Enum.vue.$store.dispatch('tabs/closeByCmd', 'all'); 32 | setTimeout(() => { 33 | window.location.reload(); 34 | }, 500); 35 | } 36 | cookiesUtil.set("tenant_id", tid); 37 | state.tenantId = tid; 38 | }, 39 | clearTenant(state) { 40 | cookiesUtil.set("tenant_id", null); 41 | state.tenantList = []; 42 | state.tenantId = null; 43 | } 44 | }; 45 | 46 | export default { 47 | namespaced: true, 48 | state, 49 | getters, 50 | actions, 51 | mutations 52 | } -------------------------------------------------------------------------------- /ezm-app/src/store/modules/user.js: -------------------------------------------------------------------------------- 1 | import {cookiesUtil} from "@/utils/common.util"; 2 | import {accessGetMyInfo, accessSignOut} from "@/api/sys/access"; 3 | import router from "@/router"; 4 | import Enum from "@/utils/Enum"; 5 | 6 | const state = { 7 | loginUser: {}, 8 | }; 9 | 10 | // getters 11 | const getters = { 12 | }; 13 | 14 | // actions 15 | const actions = {}; 16 | 17 | // mutations 18 | const mutations = { 19 | setUser(state, user) { 20 | state.loginUser = user; 21 | cookiesUtil.set("token", user.token); 22 | Enum.vue.$store.commit('tenant/setTenantId', user.tenantId); 23 | Enum.vue.$store.dispatch('tenant/reloadTenantList'); 24 | }, 25 | clearUser(state) { 26 | state.loginUser = {}; 27 | cookiesUtil.set("token", null); 28 | Enum.vue.$store.commit('tenant/clearTenant'); 29 | }, 30 | refreshMyInfo(state) { 31 | accessGetMyInfo().then(resp => { 32 | Enum.vue.$store.commit('user/setUser', resp); 33 | }); 34 | }, 35 | signOut(state) { 36 | accessSignOut().then(resp => { 37 | Enum.vue.$store.commit("user/clearUser"); 38 | Enum.vue.$store.commit("route/clearRoute"); 39 | Enum.vue.$store.dispatch("tabs/clearTabs"); 40 | router.push({path: '/'}); 41 | }); 42 | } 43 | }; 44 | 45 | export default { 46 | namespaced: true, 47 | state, 48 | getters, 49 | actions, 50 | mutations 51 | } -------------------------------------------------------------------------------- /ezm-app/src/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/test.js -------------------------------------------------------------------------------- /ezm-app/src/utils/VNodeUtil.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 3 | renderToHtml(vNode) { 4 | if (!vNode.tag) return document.createTextNode(vNode.text); 5 | if (!vNode.tag) return document.createTextNode(vNode.text); 6 | vNode.children.forEach(x => { 7 | el.appendChild(this.renderToHtml(x)); 8 | }); 9 | return el; 10 | }, 11 | renderToHtmlText(vNode , deep = 0 ) { 12 | if (!vNode.tag) return vNode.text.trim().replace(/\n\s*$/, '') + '' ; 13 | // if (vNode.tag === 'br') return '\n' ; 14 | let s = '' ; //' '.repeat(deep); 15 | let el = s + `<${vNode.tag}>`; 16 | if( vNode.children ) { 17 | vNode.children.forEach(x => { 18 | el += s + this.renderToHtmlText(x , deep + 1) ; 19 | }); 20 | } 21 | el += s + ``; 22 | console.log( el ); 23 | return el; 24 | }, 25 | renderArrayToHtml(vNodeList) { 26 | let el = document.createElement('template'); 27 | vNodeList.forEach(x => { 28 | el.appendChild(this.renderToHtml(x)); 29 | }); 30 | return el ; 31 | }, 32 | renderArrayToHtmlText(vNodeList) { 33 | let el = ''; 34 | vNodeList = vNodeList || []; 35 | vNodeList.forEach(x => { 36 | el += this.renderToHtmlText(x); 37 | }); 38 | return el ; 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /ezm-app/src/utils/db.util.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/utils/db.util.js -------------------------------------------------------------------------------- /ezm-app/src/utils/element.util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * el-form 表单快速验证方法 3 | * @param form 4 | * @returns {Promise} 5 | */ 6 | import {DialogUtil, TypeUtil} from "@/utils/common.util"; 7 | 8 | export const formValidate = (form) => { 9 | if (!form) { 10 | console.error("表单不存在!!"); 11 | } 12 | return new Promise((resolve, reject) => { 13 | form.validate(valid => { 14 | if (valid) resolve(); 15 | else { 16 | DialogUtil.toast("请检查表单!", "error"); 17 | reject(); 18 | } 19 | }); 20 | }) 21 | }; 22 | 23 | /** 24 | * 获取字段顾虑名称 25 | * @param field 26 | * @returns {string|boolean} 27 | */ 28 | export const getFilterFieldName = (field) => { 29 | let suffix = ""; 30 | let params = field.params || {}; 31 | if (params.filterSuffix) suffix = field.params.filterSuffix; 32 | return (params.filterField || field.prop) + suffix; 33 | }; 34 | 35 | 36 | /** 37 | * 从 options 中获取参数值 38 | * @param cellValue 39 | * @param row 40 | * @param column 41 | * @returns {*} 42 | */ 43 | export const formatterByOptions = ({cellValue, row, column}) => { 44 | if (!column.params || !column.params.options) return cellValue; 45 | let ops = column.params.options; 46 | if( TypeUtil.isFunction(ops) ) return cellValue; 47 | if (!TypeUtil.isArray(ops)) return ops; 48 | return (ops.find(x => x.value === cellValue) || {}).label || cellValue; 49 | }; 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /ezm-app/src/utils/print.util.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fangjc1986/easy-management/a08e746633a50f5229aacb492a6f7c7868c2c855/ezm-app/src/utils/print.util.js -------------------------------------------------------------------------------- /ezm-app/src/utils/request.util.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import {cookiesUtil, DialogUtil, urlEncode} from "@/utils/common.util"; 3 | import {ResponseErrorBack} from "@/utils/response.error.util"; 4 | import setting from "@/setting"; 5 | 6 | 7 | axios.defaults.timeout = 120 * 1000; 8 | axios.defaults.baseURL; 9 | 10 | 11 | // 添加一个请求拦截器 12 | axios.interceptors.request.use(function (config) { 13 | // 避免 IE 缓存统一接口地址下的数据 14 | config.url += "?" + new Date().getTime(); 15 | config.baseURL = setting.serverBaseUrl; 16 | config.headers['token'] = cookiesUtil.get("token"); 17 | config.headers['tenant_id'] = cookiesUtil.get("tenant_id"); 18 | if (config.headers['serialize']) { 19 | config.data = urlEncode(config.data); 20 | } 21 | console.log({ 22 | to: config.url, 23 | method: config.method, 24 | data: config.data, 25 | params: config.params, 26 | config 27 | }); 28 | return config; 29 | }, function (error) { 30 | return Promise.reject(error); 31 | }); 32 | 33 | // 添加一个响应拦截器 34 | axios.interceptors.response.use(function (response) { 35 | // Do something with response data 36 | let resp = response.data; 37 | console[resp.code === 200 ? 'log' : 'error']({ 38 | from: response.config.url, 39 | method: response.config.method, 40 | response: resp, 41 | detail: response, 42 | }); 43 | try { 44 | ResponseErrorBack['code' + resp.code](resp, response); 45 | return Promise.reject(resp); 46 | } catch (ignore) { 47 | } 48 | return Promise.resolve(resp.data); 49 | }, function (error) { 50 | // Do something with response error 51 | if (typeof error !== 'object') { 52 | DialogUtil.toast(error, 'error'); 53 | } else { 54 | DialogUtil.toast(JSON.stringify(error), 'error'); 55 | } 56 | console.error(error); 57 | return Promise.reject(error); 58 | }); 59 | 60 | export default axios; 61 | 62 | -------------------------------------------------------------------------------- /ezm-app/src/utils/response.error.util.js: -------------------------------------------------------------------------------- 1 | import {DialogUtil} from "@/utils/common.util"; 2 | import router from "@/router"; 3 | 4 | export const ResponseErrorBack = { 5 | /** 6 | * 文本错误 7 | * @param resp 返回内容 8 | * @param response axios 的response对象 9 | */ 10 | code100(resp, response) { 11 | if( resp.message === 'failure' ) resp.message = "操作失败!"; 12 | DialogUtil.toast(resp.message, 'error'); 13 | }, 14 | /** 15 | * token非法 16 | * @param resp 返回内容 17 | * @param response axios 的response对象 18 | */ 19 | code110(resp, response) { 20 | if (router.app.$route.path === '/') return; 21 | router.push({path: '/'}) 22 | }, 23 | /** 24 | * 权限不足 25 | * @param resp 返回内容 26 | * @param response axios 的response对象 27 | */ 28 | code111(resp, response) { 29 | DialogUtil.toast("您的权限不足,请联系管理员!", 'error'); 30 | }, 31 | /** 32 | * 验证错误 33 | * @param resp 返回内容 34 | * @param response axios 的response对象 35 | */ 36 | code120(resp, response) { 37 | let str = []; 38 | Object.keys(resp.data).forEach(k => { 39 | str.push(resp.data[k]); 40 | }); 41 | return DialogUtil.toast(str.join("
"), 'error'); 42 | }, 43 | }; -------------------------------------------------------------------------------- /ezm-app/src/views/base/dict/DictConfigMixin.js: -------------------------------------------------------------------------------- 1 | import { 2 | commonValidate 3 | } from "@/utils/validateUtil"; 4 | 5 | export default { 6 | data() { 7 | return { 8 | editSpan: {}, 9 | 10 | fields: [ 11 | { 12 | // COMMENT: 编号 13 | prop: 'code', 14 | label: '编号', 15 | editLabel: true, 16 | editRender: true, 17 | rules: [commonValidate.required,], 18 | editDisabled: true, 19 | 20 | filters:[{data:''}], 21 | filterRender: true, 22 | params:{ 23 | filterSuffix: '_like', 24 | }, 25 | width: 220, 26 | }, 27 | 28 | { 29 | // COMMENT: 名称 30 | prop: 'name', 31 | label: '名称', 32 | editRender: true, 33 | width: 220, 34 | rules: [commonValidate.required,], 35 | 36 | filters:[{data:''}], 37 | filterRender: true, 38 | params:{ 39 | filterSuffix: '_like', 40 | }, 41 | tableEdit: true, 42 | }, 43 | 44 | { 45 | // COMMENT: 说明 46 | prop: 'remark', 47 | label: '说明', 48 | width: 360, 49 | editRender: { 50 | name: 'EzmTextInput', 51 | }, 52 | tableEdit: true, 53 | }, 54 | 55 | ] 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /ezm-app/src/views/system/index/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 46 | 47 | -------------------------------------------------------------------------------- /ezm-app/src/views/system/layout/layout-left-menu-node.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 44 | 45 | -------------------------------------------------------------------------------- /ezm-app/src/views/system/layout/layout-left-menu.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 47 | 48 | -------------------------------------------------------------------------------- /ezm-app/src/views/system/layout/layout_test.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 28 | 29 | -------------------------------------------------------------------------------- /ezm-app/src/views/system/loading/loading.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 41 | 42 | -------------------------------------------------------------------------------- /ezm-app/src/views/system/login/login_test.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 21 | 22 | -------------------------------------------------------------------------------- /ezm-app/src/views/user_power/role/RoleConfigMixin.js: -------------------------------------------------------------------------------- 1 | import { 2 | commonValidate 3 | } from "@/utils/validateUtil"; 4 | 5 | export default { 6 | data() { 7 | return { 8 | editSpan: {}, 9 | 10 | fields: [ 11 | { 12 | // COMMENT: 名称 13 | prop: 'name', 14 | label: '名称', 15 | editRender: true, 16 | rules: [commonValidate.required,], 17 | filterRank: 1, 18 | editRank: 1, 19 | 20 | width: 200, 21 | tableEdit: true, 22 | editLabel: true, 23 | }, 24 | 25 | { 26 | // COMMENT: 说明 27 | prop: 'remark', 28 | label: '说明', 29 | editRender: { 30 | name: 'EzmTextInput', 31 | }, 32 | filterRank: 3, 33 | editRank: 3, 34 | 35 | width: 300, 36 | tableEdit: true, 37 | }, 38 | 39 | { 40 | // COMMENT: 说明 41 | prop: 'authCount', 42 | label: '权限数量', 43 | rules: [commonValidate.required,], 44 | filterRank: 3, 45 | editRank: 3, 46 | }, 47 | 48 | ] 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /ezm-app/src/views/user_power/tenant/TenantConfigMixin.js: -------------------------------------------------------------------------------- 1 | import { 2 | commonValidate 3 | } from "@/utils/validateUtil"; 4 | 5 | export default { 6 | data() { 7 | return { 8 | editSpan: { 9 | span: 12, 10 | }, 11 | 12 | fields: [ 13 | 14 | { 15 | // COMMENT: 编号 16 | prop: 'code', 17 | label: '编号', 18 | editRender: true, 19 | rules: [commonValidate.required,], 20 | filterRank: 0, 21 | editRank: 0, 22 | editLabel: true, 23 | 24 | editDisabled: true, 25 | }, 26 | 27 | 28 | { 29 | // COMMENT: 组名 30 | prop: 'name', 31 | label: '组名', 32 | editRender: true, 33 | rules: [commonValidate.required,], 34 | filterRank: 1, 35 | editRank: 1, 36 | 37 | tableEdit: true, 38 | width: 200, 39 | }, 40 | 41 | 42 | { 43 | // COMMENT: 说明 44 | prop: 'remark', 45 | label: '说明', 46 | editRender: { 47 | name: "ElInput", 48 | props: { 49 | type: 'textarea', 50 | }, 51 | attrs: { 52 | rows: 5, 53 | } 54 | }, 55 | filterRank: 3, 56 | editRank: 3, 57 | 58 | width: 300, 59 | editSpan: {span: 24}, 60 | tableEdit: true, 61 | tableEditRender: { 62 | name: 'EzmTextInput', 63 | } 64 | }, 65 | 66 | ] 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /ezm-app/vue.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs'); 3 | const webpack = require('webpack'); 4 | 5 | function resolve(dir) { 6 | return path.join(__dirname, dir) 7 | } 8 | 9 | module.exports = { 10 | outputDir: './ezm-pro-app-dist', 11 | publicPath: './', 12 | lintOnSave: false, 13 | productionSourceMap: false, 14 | chainWebpack: (config) => { 15 | config.resolve.alias 16 | .set('@', resolve('src')); 17 | config.entry.app = ["babel-polyfill", "./src/main.js"]; 18 | }, 19 | configureWebpack: { 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env.INDEX_MD': JSON.stringify({ 23 | content: fs.readFileSync("./README.md",'utf-8') 24 | }), 25 | }) , 26 | ] 27 | }, 28 | devServer: { 29 | // 端口配置 30 | port: 2005, 31 | // 反向代理配置 32 | proxy: { 33 | '/api': { 34 | target: 'http://localhost:8085', 35 | ws: true, 36 | pathRewrite: { 37 | '^/api/ezm-server': '', 38 | } 39 | } 40 | } 41 | }, 42 | transpileDependencies: [ 43 | /[/\\]node_modules[/\\]pinyin[/\\]/, 44 | ] 45 | }; 46 | -------------------------------------------------------------------------------- /ezm-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | .mvn 16 | 17 | ### IntelliJ IDEA ### 18 | .idea 19 | *.iws 20 | *.iml 21 | *.ipr 22 | 23 | ### NetBeans ### 24 | /nbproject/private/ 25 | /nbbuild/ 26 | /dist/ 27 | /nbdist/ 28 | /.nb-gradle/ 29 | build/ 30 | 31 | ### VS Code ### 32 | .vscode/ 33 | 34 | ezmpro.mwb.bak -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/EzmproApplication.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.web.servlet.ServletComponentScan; 7 | import org.springframework.cache.annotation.EnableCaching; 8 | 9 | @SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class) 10 | @ServletComponentScan(basePackages = "com.fangjc1986") 11 | @EnableCaching 12 | public class EzmproApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(EzmproApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | import com.fangjc1986.support.entity.R; 4 | import com.fangjc1986.support.exception.ServiceException; 5 | import org.mybatis.spring.MyBatisSystemException; 6 | import org.springframework.validation.FieldError; 7 | import org.springframework.web.bind.MethodArgumentNotValidException; 8 | import org.springframework.web.bind.annotation.ControllerAdvice; 9 | import org.springframework.web.bind.annotation.ExceptionHandler; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import java.util.HashMap; 13 | import java.util.Map; 14 | 15 | @ControllerAdvice 16 | @ResponseBody 17 | public class GlobalExceptionHandler { 18 | @ExceptionHandler(value = MethodArgumentNotValidException.class) 19 | public R> myExceptionErrorHandler(MethodArgumentNotValidException ex) throws Exception { 20 | Map rMap = new HashMap<>(); 21 | for (FieldError error : ex.getBindingResult().getFieldErrors()) { 22 | rMap.put(error.getField(), error.getDefaultMessage()); 23 | } 24 | ex.printStackTrace(); 25 | return R.data(rMap).setCode(120); 26 | } 27 | 28 | 29 | @ExceptionHandler(value = ServiceException.class) 30 | public R authException(ServiceException ex) throws Exception { 31 | ex.printStackTrace(); 32 | return new R().setMessage(ex.getMessage()).setCode(ex.getCode()); 33 | } 34 | 35 | @ExceptionHandler(value = MyBatisSystemException.class) 36 | public R authException(MyBatisSystemException ex) { 37 | ex.printStackTrace(); 38 | return new R().setMessage(ex.getMessage()).setCode(100); 39 | } 40 | 41 | 42 | } -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/InterceptorConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | 4 | import com.fangjc1986.ezmpro.intercepor.EveryInterceptor; 5 | import com.fangjc1986.ezmpro.intercepor.UserAuthorizationInterceptor; 6 | import com.fangjc1986.ezmpro.intercepor.SignInterceptor; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 10 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 11 | 12 | 13 | @Configuration 14 | public class InterceptorConfig implements WebMvcConfigurer { 15 | 16 | @Bean 17 | public UserAuthorizationInterceptor userAuthorizationInterceptor() { 18 | return new UserAuthorizationInterceptor(); 19 | } 20 | 21 | 22 | @Bean 23 | public SignInterceptor signInterceptor() { 24 | return new SignInterceptor(); 25 | } 26 | 27 | @Bean 28 | public EveryInterceptor everyInterceptor() { 29 | return new EveryInterceptor(); 30 | } 31 | 32 | @Override 33 | public void addInterceptors(InterceptorRegistry registry) { 34 | 35 | registry.addInterceptor(everyInterceptor()) 36 | .addPathPatterns("/**"); 37 | 38 | registry.addInterceptor(userAuthorizationInterceptor()) 39 | .addPathPatterns("/**") 40 | .excludePathPatterns("/common/**") 41 | .excludePathPatterns("/access/**") 42 | .excludePathPatterns( 43 | "/**/*.html", "/**/*.json", "/**/*.css", 44 | "/**/*.js", "/**/*.png", "/**/*.jpg", "/**/*.jpeg", 45 | "/**/*.ttf", "/swagger-resources/**", "/v2/*", 46 | "/webjars/**", "/error" 47 | ); 48 | 49 | registry.addInterceptor(signInterceptor()) 50 | .addPathPatterns("/access/**") 51 | .excludePathPatterns("/common/**"); 52 | } 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/MongoConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.data.mongodb.config.EnableMongoAuditing; 5 | 6 | @Configuration 7 | @EnableMongoAuditing 8 | public class MongoConfig { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/RedisSessionConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; 5 | 6 | @Configuration 7 | @EnableRedisHttpSession 8 | public class RedisSessionConfig { 9 | } 10 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/ScheduleTaskConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | import com.fangjc1986.ezmpro.sys.service.impl.AccountLogServiceImpl; 4 | import com.fangjc1986.ezmpro.sys.service.impl.RequestLogServiceImpl; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.data.mongodb.core.query.Criteria; 8 | import org.springframework.data.mongodb.core.query.Query; 9 | import org.springframework.scheduling.annotation.EnableScheduling; 10 | import org.springframework.scheduling.annotation.Scheduled; 11 | import org.springframework.stereotype.Component; 12 | 13 | import java.time.LocalDateTime; 14 | 15 | @Component 16 | @Configuration 17 | @EnableScheduling 18 | public class ScheduleTaskConfig { 19 | 20 | @Autowired 21 | private AccountLogServiceImpl accountLogService; 22 | @Autowired 23 | private RequestLogServiceImpl requestLogService; 24 | 25 | @Scheduled(cron = "0 0 2 * * ?") 26 | public void deleteAccountLog() { 27 | accountLogService.delete( 28 | new Query().addCriteria( 29 | Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(6L)) 30 | ) 31 | ); 32 | } 33 | 34 | @Scheduled(cron = "0 0 2 * * ?") 35 | public void deleteRequestLog() { 36 | requestLogService.delete( 37 | new Query().addCriteria( 38 | Criteria.where("create_time").lt(LocalDateTime.now().minusMonths(6L)) 39 | ) 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import springfox.documentation.builders.ApiInfoBuilder; 6 | import springfox.documentation.builders.PathSelectors; 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.service.ApiInfo; 9 | import springfox.documentation.spi.DocumentationType; 10 | import springfox.documentation.spring.web.plugins.Docket; 11 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 12 | 13 | @Configuration 14 | @EnableSwagger2 15 | public class SwaggerConfig { 16 | 17 | @Bean 18 | public Docket createRestApi() { 19 | return new Docket(DocumentationType.SWAGGER_2) 20 | .apiInfo(apiInfo()) 21 | .select() 22 | .apis(RequestHandlerSelectors.basePackage("com.fangjc1986.ezmpro")) 23 | .paths(PathSelectors.any()) 24 | .build(); 25 | } 26 | 27 | private ApiInfo apiInfo() { 28 | return new ApiInfoBuilder() 29 | .title("EZMPRO后台 api 文档") 30 | .description("") 31 | .termsOfServiceUrl("") 32 | .version("1.0") 33 | .build(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/common/controller/ImageCodeController.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.common.controller; 2 | 3 | import com.fangjc1986.support.util.DrawImageUtils; 4 | import io.swagger.annotations.Api; 5 | import io.swagger.annotations.ApiOperation; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | 14 | @Controller 15 | @RequestMapping("/common/image-code") 16 | @Api(description = "图片验证码") 17 | public class ImageCodeController { 18 | 19 | @GetMapping(value = "/getLoginCode") 20 | @ApiOperation(value = "图片验证码地址") 21 | @ResponseBody 22 | public void getLoginCode(HttpServletRequest request, HttpServletResponse response) throws Exception { 23 | DrawImageUtils d = new DrawImageUtils(); 24 | String code = d.doGet(request, response); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/common/mapper/BaseValidateMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.common.mapper; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.apache.ibatis.annotations.Select; 5 | 6 | public interface BaseValidateMapper { 7 | 8 | @Select("select count(*) from ${table} where ${where} ") 9 | Integer exist(@Param("table") String table, @Param("where") String where); 10 | 11 | @Select("select count(*) from ${table} where `${field}` = ${value}") 12 | Integer exist(@Param("table") String table, @Param("field") String field, @Param("value") String value); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/common/service/ImageCodeService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.common.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.User; 4 | import com.fangjc1986.support.exception.ServiceException; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | 10 | @Service 11 | public class ImageCodeService { 12 | 13 | @Autowired 14 | private HttpServletRequest request; 15 | 16 | /** 17 | * 检查验证码是否正确 18 | * 19 | * @param signUser 20 | * @return 21 | */ 22 | public boolean validateCode(User signUser) { 23 | String authCode = authCode(); 24 | clearCode(); 25 | return signUser.getAuthCode().equalsIgnoreCase(authCode); 26 | } 27 | 28 | /** 29 | * 获取当前session下的 验证码 30 | * 31 | * @return 32 | */ 33 | public String authCode() { 34 | if (request.getSession().getAttribute("imageCode") == null) { 35 | throw new ServiceException("验证码不存在!"); 36 | } 37 | return (String) request.getSession().getAttribute("imageCode"); 38 | } 39 | 40 | /** 41 | * 清掉当前session中的 图片验证码 42 | */ 43 | public void clearCode() { 44 | request.getSession().removeAttribute("imageCode"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/intercepor/EveryInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.intercepor; 2 | 3 | import com.fangjc1986.ezmpro.sys.service.impl.RequestLogServiceImpl; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.servlet.HandlerInterceptor; 6 | import org.springframework.web.servlet.ModelAndView; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | public class EveryInterceptor implements HandlerInterceptor { 12 | 13 | @Autowired 14 | private RequestLogServiceImpl requestLogService; 15 | 16 | @Override 17 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 18 | return true; 19 | } 20 | 21 | @Override 22 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 23 | 24 | } 25 | 26 | @Override 27 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/intercepor/SignInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.intercepor; 2 | 3 | import com.fangjc1986.ezmpro.sys.service.impl.RequestLogServiceImpl; 4 | import com.fangjc1986.support.service.TokenService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.servlet.HandlerInterceptor; 7 | import org.springframework.web.servlet.ModelAndView; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | 12 | public class SignInterceptor implements HandlerInterceptor { 13 | 14 | @Autowired 15 | private TokenService tokenService; 16 | @Autowired 17 | private RequestLogServiceImpl requestLogService; 18 | 19 | @Override 20 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 21 | tokenService.stringToUser(request.getHeader("token")); 22 | requestLogService.saveByRequest(); 23 | return true; 24 | } 25 | 26 | @Override 27 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 28 | 29 | } 30 | 31 | @Override 32 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/intercepor/UserAuthorizationInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.intercepor; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.User; 4 | import com.fangjc1986.ezmpro.sys.service.impl.RequestLogServiceImpl; 5 | import com.fangjc1986.support.service.TokenService; 6 | import com.fangjc1986.support.service.UserAuthorizationService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.servlet.HandlerInterceptor; 9 | import org.springframework.web.servlet.ModelAndView; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | 14 | public class UserAuthorizationInterceptor implements HandlerInterceptor { 15 | 16 | @Autowired 17 | private TokenService tokenService; 18 | @Autowired 19 | private UserAuthorizationService userAuthorizationService; 20 | @Autowired 21 | private RequestLogServiceImpl requestLogService; 22 | 23 | @Override 24 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 25 | User user = tokenService.stringToUser(request.getHeader("token")); 26 | requestLogService.saveByRequest(); 27 | return userAuthorizationService.validateAuth(user); 28 | } 29 | 30 | @Override 31 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { 32 | 33 | } 34 | 35 | @Override 36 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/controller/AccountLogController.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.controller; 2 | 3 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.fangjc1986.ezmpro.sys.model.AccountLog; 6 | import com.fangjc1986.ezmpro.sys.service.impl.AccountLogServiceImpl; 7 | import com.fangjc1986.support.controller.BaseController; 8 | import com.fangjc1986.support.entity.R; 9 | import com.fangjc1986.support.util.ConditionMongoUtil; 10 | import com.fangjc1986.support.util.EPage; 11 | import io.swagger.annotations.Api; 12 | import io.swagger.annotations.ApiOperation; 13 | import lombok.AllArgsConstructor; 14 | import org.springframework.web.bind.annotation.GetMapping; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.RequestParam; 17 | import org.springframework.web.bind.annotation.RestController; 18 | 19 | import java.util.Map; 20 | 21 | 22 | /** 23 | * @author EricFang 24 | * @since 2020-04-10 25 | */ 26 | 27 | @RestController 28 | @AllArgsConstructor 29 | @Api(description = "AccountLogController") 30 | @RequestMapping("/sys/account-log") 31 | public class AccountLogController extends BaseController { 32 | 33 | private AccountLogServiceImpl service; 34 | 35 | @GetMapping("/list") 36 | @ApiOperation(value = "查询列表") 37 | R> list(@RequestParam Map filter, EPage page) { 38 | return R.data( 39 | service.page( 40 | page.setDefaultDescId(), 41 | ConditionMongoUtil.getMQ(filter, AccountLog.class) 42 | ) 43 | ); 44 | } 45 | 46 | @GetMapping("/get") 47 | @ApiOperation(value = "id 查询") 48 | R get(String id) { 49 | return R.data( 50 | service.getById(id) 51 | ); 52 | } 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/controller/RequestLogController.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.controller; 2 | 3 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; 5 | import com.fangjc1986.ezmpro.sys.model.RequestLog; 6 | import com.fangjc1986.ezmpro.sys.service.impl.RequestLogServiceImpl; 7 | import com.fangjc1986.support.controller.BaseController; 8 | import com.fangjc1986.support.entity.R; 9 | import com.fangjc1986.support.util.ConditionMongoUtil; 10 | import com.fangjc1986.support.util.EPage; 11 | import io.swagger.annotations.Api; 12 | import io.swagger.annotations.ApiOperation; 13 | import lombok.AllArgsConstructor; 14 | import org.springframework.web.bind.annotation.GetMapping; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.RequestParam; 17 | import org.springframework.web.bind.annotation.RestController; 18 | 19 | import java.util.Map; 20 | 21 | 22 | /** 23 | * @author EricFang 24 | * @since 2020-04-10 25 | */ 26 | 27 | @RestController 28 | @AllArgsConstructor 29 | @Api(description = "RequestLogController") 30 | @RequestMapping("/sys/request-log") 31 | public class RequestLogController extends BaseController { 32 | 33 | private RequestLogServiceImpl service; 34 | 35 | @GetMapping("/list") 36 | @ApiOperation(value = "查询列表") 37 | R> list(@RequestParam Map filter, EPage page) { 38 | return R.data( 39 | service.page( 40 | page.setDefaultDescCreateTime(), 41 | ConditionMongoUtil.getMQ(filter, RequestLog.class) 42 | ) 43 | ); 44 | } 45 | 46 | @GetMapping("/get") 47 | @ApiOperation(value = "id 查询") 48 | R get(String id) { 49 | return R.data( 50 | service.getById(id) 51 | ); 52 | } 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/AccountLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.AccountLog; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * 账号登录登出日志 Mapper 接口 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-04-10 13 | */ 14 | public interface AccountLogMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/AuthMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Auth; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * 菜单权限表 Mapper 接口 12 | *

13 | * 14 | * @author EricFang 15 | * @since 2020-03-18 16 | */ 17 | public interface AuthMapper extends BaseMapper { 18 | 19 | // 根据用户从数据库中查询是否有符合权限的 auth 信息 20 | Auth getUserAuthorization(@Param("userId") Long uid, @Param("tenantId") Long tenantId, @Param("path") String path); 21 | 22 | // 根据角色id查找 23 | List listByRoleId(@Param("roleId") Long roleId); 24 | 25 | // 根据用户id和tenant_id 查找 26 | List listByUserIdAndTenantId(@Param("userId") Long userId, @Param("tenantId") Long tenantId); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/ConfigMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Config; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface ConfigMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/DictDetailMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.DictDetail; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface DictDetailMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/DictMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Dict; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface DictMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/RequestLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.RequestLog; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-04-10 13 | */ 14 | public interface RequestLogMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/RoleAuthMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.RoleAuth; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface RoleAuthMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.Wrapper; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.core.toolkit.Constants; 7 | import com.fangjc1986.ezmpro.sys.model.Role; 8 | import org.apache.ibatis.annotations.Param; 9 | 10 | /** 11 | *

12 | * Mapper 接口 13 | *

14 | * 15 | * @author EricFang 16 | * @since 2020-03-18 17 | */ 18 | public interface RoleMapper extends BaseMapper { 19 | 20 | IPage selectWhere(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper queryWrapper); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/TenantMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.fangjc1986.ezmpro.sys.model.Tenant; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * Mapper 接口 12 | *

13 | * 14 | * @author EricFang 15 | * @since 2020-03-18 16 | */ 17 | public interface TenantMapper extends BaseMapper { 18 | 19 | List selectByUserId(@Param("userId") Long userId); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/UploadMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Upload; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-04-02 13 | */ 14 | public interface UploadMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.Wrapper; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | import com.baomidou.mybatisplus.core.toolkit.Constants; 7 | import com.fangjc1986.ezmpro.sys.model.User; 8 | import org.apache.ibatis.annotations.Mapper; 9 | import org.apache.ibatis.annotations.Param; 10 | 11 | /** 12 | *

13 | * Mapper 接口 14 | *

15 | * 16 | * @author EricFang 17 | * @since 2020-03-18 18 | */ 19 | @Mapper 20 | public interface UserMapper extends BaseMapper { 21 | 22 | IPage selectWhere(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper queryWrapper); 23 | 24 | // 根据用户 ids 删除用户 过滤 root用户 25 | int removeByUserIds(@Param("userIds") String userIds); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/UserRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.UserRole; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author EricFang 13 | * @since 2020-03-18 14 | */ 15 | public interface UserRoleMapper extends BaseMapper { 16 | 17 | // 根据用户 id 列表删除 1,2,3,4,5 18 | int removeByUserIds(@Param("userIds") String userIds); 19 | 20 | // 根据角色 id 列表删除 1,2,3,4,5 21 | int removeByRoleIds(@Param("roleIds") String roleIds); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/mapper/UserTenantMapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.mapper; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.UserTenant; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author EricFang 13 | * @since 2020-03-18 14 | */ 15 | public interface UserTenantMapper extends BaseMapper { 16 | 17 | // 根据用户 ids 删除 18 | int removeByUserIds(@Param("userIds") String userIds); 19 | 20 | // 根据组合 ids 删除 21 | int removeByTenantIds(@Param("tenantIds") String tenantIds); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/AccountLog.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.fangjc1986.support.model.BaseMongoModel; 4 | import io.swagger.annotations.ApiModel; 5 | import io.swagger.annotations.ApiModelProperty; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.experimental.Accessors; 9 | import org.springframework.data.mongodb.core.mapping.Document; 10 | import org.springframework.data.mongodb.core.mapping.Field; 11 | 12 | /** 13 | *

14 | * 账号登录登出日志 15 | *

16 | * 17 | * @author EricFang 18 | * @since 2020-04-10 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = true) 22 | @Accessors(chain = true) 23 | @Document(collection = "sys_account_log") 24 | @ApiModel(value = "AccountLog对象", description = "账号登录登出日志") 25 | public class AccountLog extends BaseMongoModel { 26 | 27 | private static final long serialVersionUID = 1L; 28 | public static final Integer TYPE_LOGIN = 1; 29 | public static final Integer TYPE_LOGOUT = 2; 30 | 31 | @ApiModelProperty(value = "用户id") 32 | @Field("user_id") 33 | private Long userId; 34 | 35 | @ApiModelProperty(value = "用户名") 36 | @Field("user_name") 37 | private String userName; 38 | 39 | @ApiModelProperty(value = "类型:1:登录;2:登出") 40 | private Integer type; 41 | 42 | @ApiModelProperty(value = "是否成功") 43 | private Integer success; 44 | 45 | @ApiModelProperty(value = "登录ip") 46 | private String ip; 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/Auth.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.fangjc1986.support.model.BasePidModel; 5 | import io.swagger.annotations.ApiModel; 6 | import io.swagger.annotations.ApiModelProperty; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | import lombok.experimental.Accessors; 10 | 11 | /** 12 | *

13 | * 菜单权限表 14 | *

15 | * 16 | * @author EricFang 17 | * @since 2020-03-18 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = true) 21 | @Accessors(chain = true) 22 | @TableName("sys_auth") 23 | @ApiModel(value = "Auth对象", description = "菜单权限表") 24 | public class Auth extends BasePidModel { 25 | 26 | private static final long serialVersionUID = 1L; 27 | 28 | @ApiModelProperty(value = "类型:1:页面;2:API;") 29 | private Integer type; 30 | 31 | @ApiModelProperty(value = "权限名称") 32 | private String name; 33 | 34 | @ApiModelProperty(value = "路径") 35 | private String path; 36 | 37 | @ApiModelProperty(value = "图标") 38 | private String icon; 39 | 40 | @ApiModelProperty(value = "分类") 41 | private String category; 42 | 43 | @ApiModelProperty(value = "备注说明") 44 | private String remark; 45 | 46 | @ApiModelProperty(value = "排序") 47 | private Integer rank; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/Config.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.fangjc1986.support.model.BaseModel; 7 | import io.swagger.annotations.ApiModel; 8 | import io.swagger.annotations.ApiModelProperty; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | /** 14 | *

15 | * 16 | *

17 | * 18 | * @author EricFang 19 | * @since 2020-03-18 20 | */ 21 | @Data 22 | @EqualsAndHashCode(callSuper = true) 23 | @Accessors(chain = true) 24 | @TableName("sys_config") 25 | @ApiModel(value = "Config对象", description = "") 26 | public class Config extends BaseModel { 27 | 28 | private static final long serialVersionUID = 1L; 29 | 30 | // 单点登录 31 | public static final String SSO = "SSO"; 32 | // 过期时间(s) 33 | public static final String TOKEN_EXPIRE = "TOKEN_EXPIRE"; 34 | // 信任GET 请求(GET 请求不验证权限) 35 | public static final String GET_TRUST = "GET_TRUST"; 36 | 37 | 38 | @ApiModelProperty(value = "编码(作为查询 key)") 39 | @TableField(fill = FieldFill.INSERT) 40 | private String code; 41 | 42 | @ApiModelProperty(value = "参数值") 43 | private String value; 44 | 45 | @ApiModelProperty(value = "类型:1:文本框输入,2:波尔量开关") 46 | private String type; 47 | 48 | @ApiModelProperty(value = "备注说明") 49 | private String remark; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/Dict.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.fangjc1986.support.model.BaseModel; 7 | import io.swagger.annotations.ApiModel; 8 | import io.swagger.annotations.ApiModelProperty; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | import javax.validation.constraints.NotBlank; 14 | 15 | /** 16 | *

17 | * 18 | *

19 | * 20 | * @author EricFang 21 | * @since 2020-03-18 22 | */ 23 | @Data 24 | @EqualsAndHashCode(callSuper = true) 25 | @Accessors(chain = true) 26 | @TableName("sys_dict") 27 | @ApiModel(value = "Dict对象", description = "") 28 | public class Dict extends BaseModel { 29 | 30 | private static final long serialVersionUID = 1L; 31 | 32 | @NotBlank(message = "编号不能为空") 33 | @TableField(fill = FieldFill.INSERT) 34 | private String code; 35 | 36 | private String name; 37 | 38 | private String remark; 39 | 40 | @TableField(exist = false) 41 | @ApiModelProperty(value = "明细数量") 42 | private Integer detailCount; 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/DictDetail.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.FieldFill; 4 | import com.baomidou.mybatisplus.annotation.FieldStrategy; 5 | import com.baomidou.mybatisplus.annotation.TableField; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import com.fangjc1986.support.model.BaseModel; 8 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 9 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; 10 | import io.swagger.annotations.ApiModel; 11 | import io.swagger.annotations.ApiModelProperty; 12 | import lombok.Data; 13 | import lombok.EqualsAndHashCode; 14 | import lombok.experimental.Accessors; 15 | 16 | /** 17 | *

18 | * 19 | *

20 | * 21 | * @author EricFang 22 | * @since 2020-03-18 23 | */ 24 | @Data 25 | @EqualsAndHashCode(callSuper = true) 26 | @Accessors(chain = true) 27 | @TableName("sys_dict_detail") 28 | @ApiModel(value = "DictDetail对象", description = "") 29 | public class DictDetail extends BaseModel { 30 | 31 | private static final long serialVersionUID = 1L; 32 | 33 | @TableField(fill = FieldFill.INSERT) 34 | private String code; 35 | 36 | private String name; 37 | 38 | @ApiModelProperty(value = "字典分类 id") 39 | @JsonSerialize(using = ToStringSerializer.class) 40 | private Long dictId; 41 | 42 | @ApiModelProperty(value = "字典分类 CODE") 43 | private String dictCode; 44 | 45 | @TableField(updateStrategy = FieldStrategy.IGNORED) 46 | private String color; 47 | 48 | private String remark; 49 | 50 | private Integer rank; 51 | 52 | } 53 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/RequestLog.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.fangjc1986.support.model.BaseMongoModel; 4 | import io.swagger.annotations.ApiModel; 5 | import io.swagger.annotations.ApiModelProperty; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.experimental.Accessors; 9 | import org.springframework.data.mongodb.core.mapping.Document; 10 | import org.springframework.data.mongodb.core.mapping.Field; 11 | 12 | /** 13 | *

14 | * 15 | *

16 | * 17 | * @author EricFang 18 | * @since 2020-04-10 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = true) 22 | @Accessors(chain = true) 23 | @Document(collection = "sys_request_log") 24 | @ApiModel(value = "RequestLog对象", description = "") 25 | public class RequestLog extends BaseMongoModel { 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | @ApiModelProperty(value = "用户名") 30 | @Field("user_name") 31 | private String userName; 32 | 33 | @ApiModelProperty(value = "用户id") 34 | @Field("user_id") 35 | private Long userId; 36 | 37 | @ApiModelProperty(value = "访问API") 38 | private String api; 39 | 40 | @ApiModelProperty(value = "参数JSON") 41 | private String params; 42 | 43 | @ApiModelProperty(value = "是否成功") 44 | private Integer success; 45 | 46 | private String response; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/Role.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import com.fangjc1986.support.model.BaseModel; 6 | import io.swagger.annotations.ApiModel; 7 | import io.swagger.annotations.ApiModelProperty; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | *

16 | * 17 | *

18 | * 19 | * @author EricFang 20 | * @since 2020-03-18 21 | */ 22 | @Data 23 | @EqualsAndHashCode(callSuper = true) 24 | @Accessors(chain = true) 25 | @TableName("sys_role") 26 | @ApiModel(value = "Role对象", description = "") 27 | public class Role extends BaseModel { 28 | 29 | private static final long serialVersionUID = 1L; 30 | 31 | private String name; 32 | 33 | private Long pid; 34 | 35 | private String remark; 36 | 37 | @TableField(exist = false) 38 | @ApiModelProperty(value = "权限数量") 39 | private Integer authCount; 40 | 41 | @TableField(exist = false) 42 | @ApiModelProperty(value = "权限 ids 列表") 43 | private List authIds; 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/RoleAuth.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.fangjc1986.support.model.BaseModel; 5 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 6 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; 7 | import io.swagger.annotations.ApiModel; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import lombok.experimental.Accessors; 11 | 12 | /** 13 | *

14 | * 15 | *

16 | * 17 | * @author EricFang 18 | * @since 2020-03-18 19 | */ 20 | @Data 21 | @EqualsAndHashCode(callSuper = true) 22 | @Accessors(chain = true) 23 | @TableName("sys_role_auth") 24 | @ApiModel(value="RoleAuth对象", description="") 25 | public class RoleAuth extends BaseModel { 26 | 27 | private static final long serialVersionUID=1L; 28 | 29 | public RoleAuth(){} 30 | public RoleAuth(Long roleId, Long authId){ 31 | this.roleId = roleId; 32 | this.authId = authId; 33 | } 34 | 35 | @JsonSerialize(using = ToStringSerializer.class) 36 | private Long roleId; 37 | 38 | @JsonSerialize(using = ToStringSerializer.class) 39 | private Long authId; 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/Tenant.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.fangjc1986.support.model.BaseModel; 5 | import io.swagger.annotations.ApiModel; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.experimental.Accessors; 9 | 10 | /** 11 | *

12 | * 13 | *

14 | * 15 | * @author EricFang 16 | * @since 2020-03-18 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = true) 20 | @Accessors(chain = true) 21 | @TableName("sys_tenant") 22 | @ApiModel(value="Tenant对象", description="") 23 | public class Tenant extends BaseModel { 24 | 25 | private static final long serialVersionUID=1L; 26 | 27 | private String name; 28 | 29 | private String code; 30 | 31 | private String remark; 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/Upload.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.fangjc1986.support.model.BaseModel; 5 | import io.swagger.annotations.ApiModel; 6 | import io.swagger.annotations.ApiModelProperty; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | import lombok.experimental.Accessors; 10 | 11 | /** 12 | *

13 | * 14 | *

15 | * 16 | * @author EricFang 17 | * @since 2020-04-02 18 | */ 19 | @Data 20 | @EqualsAndHashCode(callSuper = true) 21 | @Accessors(chain = true) 22 | @TableName("sys_upload") 23 | @ApiModel(value="Upload对象", description="") 24 | public class Upload extends BaseModel { 25 | 26 | private static final long serialVersionUID=1L; 27 | 28 | @ApiModelProperty(value = "是否为图片") 29 | private Integer image; 30 | 31 | private String url; 32 | 33 | private String suffix; 34 | 35 | @ApiModelProperty(value = "业务编码: 1:CMS系统附件") 36 | private Integer bizCode; 37 | 38 | @ApiModelProperty(value = "原始名称") 39 | private String orgName; 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/UserRole.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.fangjc1986.support.model.BaseModel; 5 | import io.swagger.annotations.ApiModel; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | import lombok.experimental.Accessors; 9 | 10 | /** 11 | *

12 | * 13 | *

14 | * 15 | * @author EricFang 16 | * @since 2020-03-18 17 | */ 18 | @Data 19 | @EqualsAndHashCode(callSuper = true) 20 | @Accessors(chain = true) 21 | @TableName("sys_user_role") 22 | @ApiModel(value = "UserRole对象", description = "") 23 | public class UserRole extends BaseModel { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | public UserRole() {} 28 | 29 | public UserRole(Long userId, Long roleId, Long tenantId) { 30 | setUserId(userId); 31 | setRoleId(roleId); 32 | setTenantId(tenantId); 33 | } 34 | 35 | private Long userId; 36 | 37 | private Long roleId; 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/model/UserTenant.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableName; 4 | import com.fangjc1986.support.model.BaseModel; 5 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 6 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; 7 | import io.swagger.annotations.ApiModel; 8 | import io.swagger.annotations.ApiModelProperty; 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | import lombok.experimental.Accessors; 12 | 13 | /** 14 | *

15 | * 16 | *

17 | * 18 | * @author EricFang 19 | * @since 2020-03-18 20 | */ 21 | @Data 22 | @EqualsAndHashCode(callSuper = true) 23 | @Accessors(chain = true) 24 | @TableName("sys_user_tenant") 25 | @ApiModel(value = "UserTenant对象", description = "") 26 | public class UserTenant extends BaseModel { 27 | 28 | private static final long serialVersionUID = 1L; 29 | 30 | public UserTenant() {} 31 | 32 | public UserTenant(Long userId, Long tenantId) { 33 | setUserId(userId); 34 | setTenantId(tenantId); 35 | } 36 | 37 | @JsonSerialize(using = ToStringSerializer.class) 38 | private Long userId; 39 | 40 | @ApiModelProperty(value = "是否为默认") 41 | private Integer def; 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IAccountLogService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.AccountLog; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 账号登录登出日志 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-04-10 13 | */ 14 | public interface IAccountLogService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IAuthService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Auth; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 菜单权限表 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IAuthService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IConfigService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Config; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IConfigService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IDictDetailService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.DictDetail; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IDictDetailService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IDictService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Dict; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IDictService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IRequestLogService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.RequestLog; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-04-10 13 | */ 14 | public interface IRequestLogService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IRoleAuthService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.RoleAuth; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IRoleAuthService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IRoleService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Role; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IRoleService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/ITenantService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Tenant; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface ITenantService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IUploadService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Upload; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-04-02 13 | */ 14 | public interface IUploadService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IUserRoleService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.UserRole; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IUserRoleService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.User; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IUserService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/IUserTenantService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.UserTenant; 4 | import com.baomidou.mybatisplus.extension.service.IService; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author EricFang 12 | * @since 2020-03-18 13 | */ 14 | public interface IUserTenantService extends IService { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/impl/AccountLogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service.impl; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.AccountLog; 4 | import com.fangjc1986.ezmpro.sys.model.User; 5 | import com.fangjc1986.support.service.BaseMongoService; 6 | import com.fangjc1986.support.util.IPUtils; 7 | import org.springframework.data.mongodb.core.query.Update; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | *

12 | * 账号登录登出日志 服务实现类 13 | *

14 | * 15 | * @author EricFang 16 | * @since 2020-04-10 17 | */ 18 | @Service 19 | public class AccountLogServiceImpl extends BaseMongoService { 20 | 21 | @Override 22 | public void setUpdateFields(Update update, AccountLog doc) { 23 | 24 | } 25 | 26 | /** 27 | * 根据用户和类型保存 28 | * 29 | * @param user 30 | * @param type 31 | */ 32 | public void save(User user, Integer type) { 33 | AccountLog accountLog = new AccountLog(); 34 | accountLog.setUserId(user.getId()); 35 | accountLog.setUserName(user.getUserName()); 36 | accountLog.setType(type); 37 | accountLog.setIp(IPUtils.getRemoteIP(request)); 38 | accountLog.setSuccess(1); 39 | save(accountLog); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/impl/DictDetailServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service.impl; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.DictDetail; 4 | import com.fangjc1986.ezmpro.sys.mapper.DictDetailMapper; 5 | import com.fangjc1986.ezmpro.sys.service.IDictDetailService; 6 | import com.fangjc1986.support.service.BaseService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author EricFang 15 | * @since 2020-03-18 16 | */ 17 | @Service 18 | public class DictDetailServiceImpl extends BaseService implements IDictDetailService { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/impl/DictServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service.impl; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Dict; 4 | import com.fangjc1986.ezmpro.sys.mapper.DictMapper; 5 | import com.fangjc1986.ezmpro.sys.service.IDictService; 6 | import com.fangjc1986.support.service.BaseService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author EricFang 15 | * @since 2020-03-18 16 | */ 17 | @Service 18 | public class DictServiceImpl extends BaseService implements IDictService { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/impl/RoleAuthServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service.impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 4 | import com.fangjc1986.ezmpro.sys.model.Role; 5 | import com.fangjc1986.ezmpro.sys.model.RoleAuth; 6 | import com.fangjc1986.ezmpro.sys.mapper.RoleAuthMapper; 7 | import com.fangjc1986.ezmpro.sys.service.IRoleAuthService; 8 | import com.fangjc1986.support.service.BaseService; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | 14 | /** 15 | *

16 | * 服务实现类 17 | *

18 | * 19 | * @author EricFang 20 | * @since 2020-03-18 21 | */ 22 | @Service 23 | public class RoleAuthServiceImpl extends BaseService implements IRoleAuthService { 24 | 25 | /** 26 | * 更新角色权限 27 | * @param role 28 | */ 29 | public boolean updateAuth(Role role) { 30 | remove( 31 | new QueryWrapper().eq("role_id", role.getId()) 32 | ); 33 | List roleAuths = new ArrayList<>(); 34 | for (Long authId : role.getAuthIds()) { 35 | roleAuths.add(new RoleAuth(role.getId(), authId)); 36 | } 37 | return saveBatch(roleAuths); 38 | } 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/impl/RoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service.impl; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Role; 4 | import com.fangjc1986.ezmpro.sys.mapper.RoleMapper; 5 | import com.fangjc1986.ezmpro.sys.service.IRoleService; 6 | import com.fangjc1986.support.service.BaseService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author EricFang 15 | * @since 2020-03-18 16 | */ 17 | @Service 18 | public class RoleServiceImpl extends BaseService implements IRoleService { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/ezmpro/sys/service/impl/TenantServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys.service.impl; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Tenant; 4 | import com.fangjc1986.ezmpro.sys.mapper.TenantMapper; 5 | import com.fangjc1986.ezmpro.sys.service.ITenantService; 6 | import com.fangjc1986.support.service.BaseService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author EricFang 15 | * @since 2020-03-18 16 | */ 17 | @Service 18 | public class TenantServiceImpl extends BaseService implements ITenantService { 19 | 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/entity/IdsForm.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.entity; 2 | 3 | import com.fangjc1986.support.util.SerializableUtil; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.experimental.Accessors; 7 | import org.apache.commons.lang.StringUtils; 8 | 9 | import javax.validation.constraints.NotEmpty; 10 | import java.util.List; 11 | 12 | @Data 13 | @EqualsAndHashCode(callSuper = true) 14 | @Accessors(chain = true) 15 | public class IdsForm extends SerializableUtil { 16 | 17 | @NotEmpty(message = "ids 不能为空") 18 | private List ids; 19 | 20 | /** 21 | * 获取字符串 ids 22 | * 用于 in( 1,2,3,4 ) 的场景 23 | * 24 | * @return 25 | */ 26 | public String getIdsStr() { 27 | return StringUtils.join(ids, ","); 28 | } 29 | 30 | // 额外参数1 31 | private String p1; 32 | // 额外参数2 33 | private String p2; 34 | // 额外参数3 35 | private String p3; 36 | // 额外参数3 37 | private String p4; 38 | } 39 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/entity/Token.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.entity; 2 | 3 | 4 | import com.fangjc1986.ezmpro.sys.model.User; 5 | import lombok.Data; 6 | 7 | @Data 8 | public class Token { 9 | 10 | public static final Long EXPIRE_TIME = 7200L; 11 | 12 | private Long id; 13 | private String userName; 14 | private Long startTime; 15 | 16 | public Token() { 17 | } 18 | 19 | public Token(User user) { 20 | id = user.getId(); 21 | userName = user.getUserName(); 22 | startTime = System.currentTimeMillis(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/exception/ServiceException.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.exception; 2 | 3 | 4 | public class ServiceException extends RuntimeException { 5 | 6 | private int code; 7 | 8 | public ServiceException(String msg) { 9 | super(msg); 10 | this.code = 100; 11 | } 12 | 13 | public ServiceException(String msg, int code) { 14 | super(msg); 15 | this.code = code; 16 | } 17 | 18 | public int getCode() { 19 | return code; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/helper/ChannelFilter.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.helper; 2 | 3 | 4 | import javax.servlet.*; 5 | import javax.servlet.annotation.WebFilter; 6 | import javax.servlet.http.HttpServletRequest; 7 | import java.io.IOException; 8 | 9 | @WebFilter(urlPatterns = "/*",filterName = "channelFilter") 10 | public class ChannelFilter implements Filter { 11 | 12 | @Override 13 | public void init(FilterConfig filterConfig) throws ServletException { 14 | 15 | } 16 | 17 | @Override 18 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { 19 | ServletRequest requestWrapper = null; 20 | if (servletRequest instanceof HttpServletRequest) { 21 | requestWrapper = new RequestWrapper((HttpServletRequest) servletRequest); 22 | } 23 | if (requestWrapper == null) { 24 | filterChain.doFilter(servletRequest, servletResponse); 25 | } else { 26 | filterChain.doFilter(requestWrapper, servletResponse); 27 | } 28 | } 29 | 30 | 31 | @Override 32 | public void destroy() { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/helper/MetaHandler.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.helper; 2 | 3 | import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; 4 | import com.fangjc1986.ezmpro.sys.model.User; 5 | import org.apache.ibatis.reflection.MetaObject; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.time.LocalDateTime; 9 | 10 | @Component 11 | public class MetaHandler implements MetaObjectHandler { 12 | 13 | @Override 14 | public void insertFill(MetaObject metaObject) { 15 | this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); 16 | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); 17 | User user = SystemHelper.loginUserOrNull(); 18 | if (user == null) return; 19 | this.setFieldValByName("createUser", user.getUserName(), metaObject); 20 | this.setFieldValByName("updateUser", user.getUserName(), metaObject); 21 | } 22 | 23 | @Override 24 | public void updateFill(MetaObject metaObject) { 25 | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); 26 | User user = SystemHelper.loginUserOrNull(); 27 | if (user == null) return; 28 | this.setFieldValByName("updateUser", user.getUserName(), metaObject); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/helper/ResponseWrapper.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.helper; 2 | 3 | 4 | import javax.servlet.ServletOutputStream; 5 | import javax.servlet.WriteListener; 6 | import javax.servlet.http.HttpServletResponse; 7 | import javax.servlet.http.HttpServletResponseWrapper; 8 | import java.io.ByteArrayOutputStream; 9 | import java.io.IOException; 10 | 11 | /** 12 | * @param 13 | * @author 14 | * @create 2019-06-10 13:31 15 | * @return 16 | * @description : 17 | */ 18 | public class ResponseWrapper extends HttpServletResponseWrapper { 19 | private ByteArrayOutputStream buffer; 20 | 21 | private ServletOutputStream out; 22 | 23 | public ResponseWrapper(HttpServletResponse httpServletResponse) { 24 | super(httpServletResponse); 25 | buffer = new ByteArrayOutputStream(); 26 | out = new ResponseWrapper.WrapperOutputStream(buffer); 27 | } 28 | 29 | @Override 30 | public ServletOutputStream getOutputStream() 31 | throws IOException { 32 | return out; 33 | } 34 | 35 | @Override 36 | public void flushBuffer() 37 | throws IOException { 38 | if (out != null) { 39 | out.flush(); 40 | } 41 | } 42 | 43 | public byte[] getContent() 44 | throws IOException { 45 | flushBuffer(); 46 | return buffer.toByteArray(); 47 | } 48 | 49 | class WrapperOutputStream extends ServletOutputStream { 50 | private ByteArrayOutputStream bos; 51 | 52 | public WrapperOutputStream(ByteArrayOutputStream bos) { 53 | this.bos = bos; 54 | } 55 | 56 | @Override 57 | public void write(int b) 58 | throws IOException { 59 | bos.write(b); 60 | } 61 | 62 | @Override 63 | public boolean isReady() { 64 | return false; 65 | } 66 | 67 | @Override 68 | public void setWriteListener(WriteListener arg0) { 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/model/BaseMongoModel.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.model; 2 | 3 | import com.fangjc1986.support.util.SerializableUtil; 4 | import com.fasterxml.jackson.annotation.JsonFormat; 5 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 6 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; 7 | import io.swagger.annotations.ApiModelProperty; 8 | import lombok.Data; 9 | import lombok.EqualsAndHashCode; 10 | import org.springframework.data.annotation.*; 11 | import org.springframework.data.mongodb.core.mapping.Field; 12 | 13 | import java.time.LocalDateTime; 14 | 15 | @Data 16 | @EqualsAndHashCode(callSuper = true) 17 | public class BaseMongoModel extends SerializableUtil { 18 | @Id 19 | private String id; 20 | 21 | 22 | 23 | @JsonFormat(pattern = BaseModel.DATE_TIME) 24 | @ApiModelProperty(value = "创建时间", example = BaseModel.DATE_TIME_EXAMPLE) 25 | @CreatedDate 26 | @Field("create_time") 27 | private LocalDateTime createTime; 28 | 29 | @JsonFormat(pattern = BaseModel.DATE_TIME) 30 | @ApiModelProperty(value = "修改时间", example = BaseModel.DATE_TIME_EXAMPLE) 31 | @LastModifiedDate 32 | @Field("update_time") 33 | private LocalDateTime updateTime; 34 | 35 | @CreatedBy 36 | @Field("update_user") 37 | private String updateUser; 38 | 39 | @LastModifiedBy 40 | @Field("create_user") 41 | private String createUser; 42 | 43 | @JsonSerialize(using = ToStringSerializer.class) 44 | private Long tenantId; 45 | } 46 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/model/BasePidModel.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.model; 2 | 3 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 4 | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; 5 | import io.swagger.annotations.ApiModelProperty; 6 | import lombok.Data; 7 | import lombok.EqualsAndHashCode; 8 | 9 | @Data 10 | @EqualsAndHashCode(callSuper = true) 11 | public class BasePidModel extends BaseModel { 12 | 13 | @JsonSerialize(using = ToStringSerializer.class) 14 | @ApiModelProperty(value = "父id") 15 | private Long pid; 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/provider/SpringSecurityAuditorAware.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.provider; 2 | 3 | import com.fangjc1986.support.helper.SystemHelper; 4 | import org.springframework.data.domain.AuditorAware; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.Optional; 8 | 9 | 10 | @Component 11 | public class SpringSecurityAuditorAware implements AuditorAware { 12 | 13 | @Override 14 | public Optional getCurrentAuditor() { 15 | return Optional.ofNullable(SystemHelper.loginUserName()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/service/UserAuthorizationService.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.service; 2 | 3 | import com.fangjc1986.ezmpro.sys.model.Auth; 4 | import com.fangjc1986.ezmpro.sys.model.Config; 5 | import com.fangjc1986.ezmpro.sys.model.User; 6 | import com.fangjc1986.ezmpro.sys.service.impl.AuthServiceImpl; 7 | import com.fangjc1986.ezmpro.sys.service.impl.ConfigServiceImpl; 8 | import com.fangjc1986.ezmpro.sys.service.impl.UserTenantServiceImpl; 9 | import com.fangjc1986.support.entity.R; 10 | import com.fangjc1986.support.exception.ServiceException; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Service; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | 16 | @Service 17 | public class UserAuthorizationService { 18 | 19 | @Autowired 20 | private HttpServletRequest request; 21 | @Autowired 22 | private ConfigServiceImpl configService; 23 | @Autowired 24 | private UserTenantServiceImpl userTenantService; 25 | @Autowired 26 | private AuthServiceImpl authService; 27 | 28 | /** 29 | * 验证权限 30 | * 31 | * @param user 32 | * @return 33 | */ 34 | public boolean validateAuth(User user) { 35 | if (user.getActivated().equals(0)) throw new ServiceException("用户未激活!", R.SIGN_ERROR); 36 | if (user.getRoot().equals(1)) return true; 37 | if (request.getMethod().equalsIgnoreCase("get") && 38 | configService.get(Config.GET_TRUST, 1) == 1 39 | ) return true; 40 | Auth auth = authService.getBaseMapper().getUserAuthorization(user.getId(), (Long) request.getAttribute("tenant_id"), request.getRequestURI()); 41 | if (auth == null) throw new ServiceException("权限不足,请联系管理员!", R.AUTH_ERROR); 42 | return true; 43 | } 44 | 45 | 46 | } 47 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/CollectionUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class CollectionUtil { 7 | /** 8 | * 分割 集合 9 | * 10 | * @param collection 11 | * @param len 12 | * @param 13 | * @return 14 | */ 15 | public static List> splitCollection(List collection, int len) { 16 | List> res = new ArrayList<>(); 17 | List group = new ArrayList<>(); 18 | for (int i = 0; i < collection.size(); i++) { 19 | int index = i % len; 20 | if (index == 0 && i != 0) { 21 | group = new ArrayList<>(); 22 | } 23 | group.add(collection.get(i)); 24 | if (index + 1 == len) { 25 | res.add(group); 26 | } 27 | } 28 | if (group.size() < len) { 29 | res.add(group); 30 | } 31 | return res; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/CommonUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import java.util.Random; 4 | 5 | public class CommonUtil { 6 | 7 | /** 8 | * 生成字母数字 9 | * 10 | * @param length 11 | * @return 12 | */ 13 | public static String getStringRandom(int length) { 14 | StringBuilder val = new StringBuilder(); 15 | Random random = new Random(); 16 | for (int i = 0; i < length; i++) { 17 | String charOrNum = random.nextInt(2) % 2 == 0 ? "char" : "num"; 18 | if ("char".equalsIgnoreCase(charOrNum)) { 19 | int temp = random.nextInt(2) % 2 == 0 ? 65 : 97; 20 | val.append((char) (random.nextInt(26) + temp)); 21 | } else { 22 | val.append(String.valueOf(random.nextInt(10))); 23 | } 24 | } 25 | return val.toString(); 26 | } 27 | 28 | /** 29 | * 随机数 30 | * 31 | * @return 32 | */ 33 | public static String getNumberRandom(int min, int max) { 34 | int ran2 = (int) (Math.random() * (max - min) + min); 35 | return ran2 + ""; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/DecimalUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import java.math.BigDecimal; 4 | 5 | public class DecimalUtil { 6 | 7 | /** 8 | * 大于 0 9 | * 10 | * @param decimal 11 | * @return 12 | */ 13 | public static boolean ltZero(BigDecimal decimal) { 14 | return decimal != null && decimal.compareTo(BigDecimal.ZERO) < 0; 15 | } 16 | 17 | /** 18 | * 小于0 19 | * 20 | * @param decimal 21 | * @return 22 | */ 23 | public static boolean gtZero(BigDecimal decimal) { 24 | return decimal != null && decimal.compareTo(BigDecimal.ZERO) > 0; 25 | } 26 | 27 | /** 28 | * 等于 0 29 | * 30 | * @param decimal 31 | * @return 32 | */ 33 | public static boolean eqZero(BigDecimal decimal) { 34 | return decimal == null || decimal.compareTo(BigDecimal.ZERO) == 0; 35 | } 36 | 37 | /** 38 | * 小于等于 0 39 | * 40 | * @param decimal 41 | * @return 42 | */ 43 | public static boolean leZero(BigDecimal decimal) { 44 | return ltZero(decimal) || eqZero(decimal); 45 | } 46 | 47 | /** 48 | * 大于等于 0 49 | * 50 | * @param decimal 51 | * @return 52 | */ 53 | public static boolean geZero(BigDecimal decimal) { 54 | return gtZero(decimal) || eqZero(decimal); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/EnumText.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | public class EnumText { 4 | public static final String DATE_TIME = "yyyy-MM-dd HH:mm:ss"; 5 | public static final String DATA_TIME_EXAMPLE = "2019-11-22 05:26:56"; 6 | public static final String LOGIN_USER = "LOGIN_USER"; 7 | } 8 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/IPUtils.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | 5 | /** 6 | * ClassName: IPUtils
7 | * Description: IP查询工具
8 | * Date: 2016年4月28日 上午11:23:53
9 | *
10 | * 11 | * @author Administrator(邮箱) 12 | *

13 | * 修改记录 14 | * @version 产品版本信息 yyyy-mm-dd 姓名(邮箱) 修改信息
15 | */ 16 | 17 | public class IPUtils { 18 | /** 19 | * getRemoteIP:获取远程请求客户端的外网IP
20 | * 21 | * @param request 请求实体对象 22 | * @return ip 外网ip
23 | */ 24 | public static String getRemoteIP(HttpServletRequest request) { 25 | String ip = request.getHeader("x-forwarded-for"); 26 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 27 | ip = request.getHeader("Proxy-Client-IP"); 28 | } 29 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 30 | ip = request.getHeader("WL-Proxy-Client-IP"); 31 | } 32 | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { 33 | ip = request.getRemoteAddr(); 34 | } 35 | return ip; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/ListFinder.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class ListFinder { 9 | 10 | private List list; 11 | 12 | public ListFinder(List list) { 13 | this.list = list; 14 | } 15 | 16 | public interface Comparator { 17 | boolean compare(T entity); 18 | } 19 | 20 | public T find(Comparator comparator) { 21 | for (T entity : list) { 22 | if (comparator.compare(entity)) { 23 | return entity; 24 | } 25 | } 26 | return null; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/LocalDateTimeUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import java.time.DayOfWeek; 4 | import java.time.LocalDate; 5 | import java.time.LocalDateTime; 6 | import java.time.LocalTime; 7 | 8 | public class LocalDateTimeUtil { 9 | 10 | /** 11 | * 获取当天开始时间 12 | * 13 | * @return 14 | */ 15 | public static LocalDateTime todayStart() { 16 | return LocalDateTime.of(LocalDate.now(), LocalTime.MIN); 17 | } 18 | 19 | /** 20 | * 获取当天结束 21 | * 22 | * @return 23 | */ 24 | public static LocalDateTime todayEnd() { 25 | return LocalDateTime.of(LocalDate.now(), LocalTime.MAX); 26 | } 27 | 28 | /** 29 | * 获取本周开始时间 30 | * 31 | * @return 32 | */ 33 | public static LocalDateTime weekStart() { 34 | return LocalDateTime.of(LocalDate.now().with(DayOfWeek.MONDAY), LocalTime.MIN); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/Md5Util.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import org.springframework.util.DigestUtils; 4 | 5 | public class Md5Util { 6 | /** 7 | * 生成md5 8 | * 9 | * @param str 被加密字符串 10 | * @return String 11 | */ 12 | private static String getMD5(String str) { 13 | return DigestUtils.md5DigestAsHex(str.getBytes()); 14 | } 15 | 16 | public static String getMD5(String... str) { 17 | StringBuilder sb = new StringBuilder(""); 18 | for (String s : str) { 19 | sb.append(s); 20 | } 21 | return getMD5(sb.toString()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/MongoPageable.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | 4 | import com.baomidou.mybatisplus.core.metadata.OrderItem; 5 | import com.fangjc1986.support.model.BaseMongoModel; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.data.domain.Sort; 8 | 9 | public class MongoPageable extends SerializableUtil implements Pageable { 10 | 11 | public EPage page; 12 | 13 | public MongoPageable(EPage page) { 14 | this.page = page; 15 | } 16 | 17 | @Override 18 | public int getPageNumber() { 19 | return (int) page.getCurrent(); 20 | } 21 | 22 | @Override 23 | public int getPageSize() { 24 | return (int) page.getSize(); 25 | } 26 | 27 | @Override 28 | public long getOffset() { 29 | return page.getSize() * (page.getCurrent() - 1); 30 | } 31 | 32 | @Override 33 | public Sort getSort() { 34 | if (page.getOrders().size() > 0) { 35 | OrderItem item = page.getOrders().get(0); 36 | Sort.Direction direction = item.isAsc() ? Sort.Direction.ASC : Sort.Direction.DESC; 37 | return new Sort(direction, item.getColumn()); 38 | } 39 | return new Sort(Sort.Direction.ASC, "id"); 40 | } 41 | 42 | @Override 43 | public Pageable next() { 44 | return null; 45 | } 46 | 47 | @Override 48 | public Pageable previousOrFirst() { 49 | return null; 50 | } 51 | 52 | @Override 53 | public Pageable first() { 54 | return null; 55 | } 56 | 57 | @Override 58 | public boolean hasPrevious() { 59 | return false; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/ParamsUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import lombok.Data; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.stereotype.Component; 6 | 7 | @Component 8 | @Data 9 | public class ParamsUtil { 10 | 11 | @Value("${AES_SECRET}") 12 | private String aesSecret; 13 | } 14 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/SerializableUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.alibaba.fastjson.serializer.SerializerFeature; 5 | 6 | import java.io.Serializable; 7 | 8 | public class SerializableUtil implements Serializable { 9 | 10 | @Override 11 | public String toString() { 12 | return JSONObject.toJSONString(this, SerializerFeature.WriteMapNullValue); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/StringUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import java.util.regex.Matcher; 4 | import java.util.regex.Pattern; 5 | 6 | 7 | public class StringUtil { 8 | private static Pattern linePattern = Pattern.compile("_(\\w)"); 9 | 10 | /** 11 | * 下划线转驼峰 12 | */ 13 | public static String lineToHump(String str) { 14 | str = str.toLowerCase(); 15 | Matcher matcher = linePattern.matcher(str); 16 | StringBuffer sb = new StringBuffer(); 17 | while (matcher.find()) { 18 | matcher.appendReplacement(sb, matcher.group(1).toUpperCase()); 19 | } 20 | matcher.appendTail(sb); 21 | return sb.toString(); 22 | } 23 | 24 | /** 25 | * 驼峰转下划线(简单写法,效率低于{@link #humpToLineBetter(String)}) 26 | */ 27 | public static String humpToLine(String str) { 28 | return str.replaceAll("[A-Z]", "_$0").toLowerCase(); 29 | } 30 | 31 | private static Pattern humpPattern = Pattern.compile("[A-Z]"); 32 | 33 | /** 34 | * 驼峰转下划线,效率比上面高 35 | */ 36 | public static String humpToLineBetter(String str) { 37 | Matcher matcher = humpPattern.matcher(str); 38 | StringBuffer sb = new StringBuffer(); 39 | while (matcher.find()) { 40 | matcher.appendReplacement(sb, "_" + matcher.group(0).toLowerCase()); 41 | } 42 | matcher.appendTail(sb); 43 | return sb.toString(); 44 | } 45 | 46 | /** 47 | * 获取文件名后缀 48 | * 49 | * @param path 50 | * @return 51 | */ 52 | public static String getSuffix(String path) { 53 | return path.substring(path.lastIndexOf(".")); 54 | } 55 | 56 | public static boolean isEmpty(String str) { 57 | return str == null || str.equals(""); 58 | } 59 | 60 | public static String null2EmptyStr(String str) { 61 | return str == null ? "" : str; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/util/ValidateUtil.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.util; 2 | 3 | import com.fangjc1986.support.exception.ServiceException; 4 | 5 | import javax.validation.*; 6 | import java.util.List; 7 | import java.util.Set; 8 | 9 | public class ValidateUtil { 10 | 11 | private static Validator createValidator() { 12 | Configuration config = Validation.byDefaultProvider().configure(); 13 | ValidatorFactory factory = config.buildValidatorFactory(); 14 | Validator validator = factory.getValidator(); 15 | factory.close(); 16 | return validator; 17 | } 18 | 19 | /** 20 | * Controller层验证List类型的参数 21 | * 22 | * @return 23 | */ 24 | public static void validate(List list) { 25 | Validator validator = createValidator(); 26 | for (T dto : list) { 27 | Set> violations = validator.validate(dto); 28 | if (violations.size() != 0) { 29 | for (ConstraintViolation violation : violations) { 30 | throw new ServiceException(violation.getMessage()); 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/validator/Exist.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.validator; 2 | 3 | import com.fangjc1986.support.validator.impl.ExistValidator; 4 | 5 | import javax.validation.Constraint; 6 | import javax.validation.Payload; 7 | import java.lang.annotation.*; 8 | 9 | @Documented 10 | @Constraint(validatedBy = ExistValidator.class) 11 | @Target({ElementType.METHOD, ElementType.FIELD}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface Exist { 14 | String message() default "存在"; 15 | 16 | String table(); 17 | 18 | String field(); 19 | 20 | boolean isExist() default true; 21 | 22 | Class[] groups() default {}; 23 | 24 | Class[] payload() default {}; 25 | } -------------------------------------------------------------------------------- /ezm-server/src/main/java/com/fangjc1986/support/validator/impl/ExistValidator.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.support.validator.impl; 2 | 3 | 4 | import com.fangjc1986.ezmpro.common.mapper.BaseValidateMapper; 5 | import com.fangjc1986.support.util.BeanUtil; 6 | import com.fangjc1986.support.validator.Exist; 7 | 8 | import javax.validation.ConstraintValidator; 9 | import javax.validation.ConstraintValidatorContext; 10 | 11 | public class ExistValidator implements ConstraintValidator { 12 | 13 | private Exist exist; 14 | 15 | @Override 16 | public void initialize(Exist exist) { 17 | this.exist = exist; 18 | } 19 | 20 | @Override 21 | public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) { 22 | String where = exist.field() + " = '" + o.toString() + "'"; 23 | String table = exist.table(); 24 | BaseValidateMapper baseValidateMapper = BeanUtil.getBean(BaseValidateMapper.class); 25 | Integer num = baseValidateMapper.exist(table, where); 26 | return exist.isExist() ? num > 0 : num < 1; 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /ezm-server/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # 用于给 token 加密的 AES 秘钥 2 | AES_SECRET=1234567890 3 | # 阿里秘钥 4 | p.uploadDir=E:\\upload 5 | ali.accessKeyId= 6 | ali.accessKeySecret= 7 | ali.OSSBucket= 8 | ali.OSSEndPoint= 9 | ali.OSSDomain= -------------------------------------------------------------------------------- /ezm-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: 3 | active: @package.environment@ 4 | 5 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/ireport/receipt_report.jrxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <band height="79" splitType="Stretch"/> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |

25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/AccountLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/AuthMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 26 | 37 | 38 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/ConfigMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/DictDetailMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/DictMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/RequestLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/RoleAuthMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/RoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/TenantMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 16 | 17 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/UploadMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 27 | 28 | 29 | delete 30 | from sys_user 31 | where root = 0 32 | and id in (${userIds}) 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/UserRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | delete 7 | from sys_user_role 8 | where user_id in ( 9 | select sys_user.id from sys_user where root = 0 and sys_user.id in (${userIds}) 10 | ) 11 | 12 | 13 | delete 14 | from sys_user_role 15 | where role_id in (${roleIds}) 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ezm-server/src/main/resources/mapper/sys/UserTenantMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | delete 7 | from sys_user_tenant 8 | where user_id in ( 9 | select sys_user.id from sys_user where root = 0 and sys_user.id in (${userIds}) 10 | ) 11 | 12 | 13 | delete 14 | from sys_user_tenant 15 | where tenant_id in (${tenantIds}) 16 | 17 | 18 | -------------------------------------------------------------------------------- /ezm-server/src/test/java/com/fangjc1986/ezmpro/EzmproApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class EzmproApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ezm-server/src/test/java/com/fangjc1986/ezmpro/common/UtilTest.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.common; 2 | 3 | import com.fangjc1986.ezmpro.support.BaseTest; 4 | import com.fangjc1986.support.util.AESUtil; 5 | import org.junit.Test; 6 | 7 | public class UtilTest extends BaseTest { 8 | 9 | @Test 10 | public void aesTest(){ 11 | AESUtil.test(); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ezm-server/src/test/java/com/fangjc1986/ezmpro/support/BaseTest.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.support; 2 | 3 | import com.fangjc1986.support.entity.R; 4 | import org.junit.Before; 5 | import org.junit.runner.RunWith; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | import org.springframework.test.context.junit4.SpringRunner; 9 | import org.springframework.test.context.web.WebAppConfiguration; 10 | import org.springframework.test.web.servlet.MockMvc; 11 | import org.springframework.test.web.servlet.MvcResult; 12 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 13 | import org.springframework.web.context.WebApplicationContext; 14 | 15 | import java.io.UnsupportedEncodingException; 16 | 17 | @RunWith(SpringRunner.class) 18 | @SpringBootTest 19 | //由于是Web项目,Junit需要模拟ServletContext,因此我们需要给我们的测试类加上@WebAppConfiguration。 20 | @WebAppConfiguration 21 | public class BaseTest { 22 | 23 | public MockMvc mockMvc; 24 | 25 | @Autowired 26 | public WebApplicationContext webApplicationContext; 27 | 28 | @Before 29 | public void before() { 30 | mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build(); 31 | } 32 | 33 | /** 34 | * 将 mvcResult 转换成 R 35 | * 36 | * @param mvcResult 37 | * @param 38 | * @return 39 | * @throws UnsupportedEncodingException 40 | */ 41 | public R getR(MvcResult mvcResult) throws UnsupportedEncodingException { 42 | return R.fromJSON(mvcResult.getResponse().getContentAsString()); 43 | } 44 | 45 | /** 46 | * 打印 mvcResult 47 | * @param result 48 | * @throws UnsupportedEncodingException 49 | */ 50 | public void printlnMvcResult(MvcResult result) throws UnsupportedEncodingException { 51 | System.out.println(result.getResponse().getContentAsString()); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ezm-server/src/test/java/com/fangjc1986/ezmpro/sys/UserServiceTest.java: -------------------------------------------------------------------------------- 1 | package com.fangjc1986.ezmpro.sys; 2 | 3 | import com.fangjc1986.ezmpro.support.BaseTest; 4 | import com.fangjc1986.ezmpro.sys.service.impl.UserServiceImpl; 5 | import com.fangjc1986.support.service.TokenService; 6 | import org.junit.Test; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | 9 | 10 | public class UserServiceTest extends BaseTest { 11 | 12 | @Autowired 13 | private TokenService tokenService; 14 | @Autowired 15 | private UserServiceImpl userService; 16 | 17 | @Test 18 | public void createToken(){ 19 | 20 | System.out.println( userService.list()); 21 | 22 | //User user = userService.getById(1L); 23 | //System.out.println(user); 24 | //String tokenString = tokenService.createTokenString(user); 25 | //System.out.println(tokenString); 26 | } 27 | 28 | 29 | } 30 | --------------------------------------------------------------------------------