From 92839e2d670a1e63c2602452f5ae734fc57e1402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 8 May 2026 17:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .idea/.gitignore | 5 + .idea/ApifoxUploaderProjectSetting.xml | 6 + .idea/app-java.iml | 9 + .idea/compiler.xml | 18 + .idea/dictionaries/project.xml | 8 + .idea/encodings.xml | 6 + .idea/jarRepositories.xml | 25 + .idea/misc.xml | 14 + .idea/paopao-java.iml | 12 + .idea/vcs.xml | 6 + .workbuddy/memory/2026-05-05.md | 73 + .workbuddy/memory/2026-05-06.md | 19 + Dockerfile | 51 + README.md | 218 ++ docker-compose.yml | 38 + docker-deploy-guide.md | 188 ++ docs/db_paopao_v2.sql | 1026 +++++++++ docs/db_system.sql | 1866 +++++++++++++++ docs/output/generate_plan.py | 366 +++ docs/output/paopao开发计划表.xlsx | Bin 0 -> 18049 bytes docs/功能明细.md | 124 + docs/数据库对比分析.md | 193 ++ docs/核心业务流程整理.md | 93 + mvnw | 310 +++ mvnw.cmd | 182 ++ pom.xml | 224 ++ .../java/com/gxwebsoft/MainApplication.java | 26 + .../com/gxwebsoft/common/core/Constants.java | 93 + .../common/core/annotation/OperationLog.java | 41 + .../core/annotation/OperationModule.java | 21 + .../common/core/annotation/QueryField.java | 22 + .../common/core/annotation/QueryType.java | 42 + .../core/aspect/OperationLogAspect.java | 210 ++ .../common/core/config/ConfigProperties.java | 75 + .../common/core/config/MybatisPlusConfig.java | 77 + .../common/core/config/SwaggerConfig.java | 72 + .../common/core/config/WebMvcConfig.java | 31 + .../core/exception/BusinessException.java | 48 + .../exception/GlobalExceptionHandler.java | 56 + .../core/security/JwtAccessDeniedHandler.java | 29 + .../security/JwtAuthenticationEntryPoint.java | 30 + .../security/JwtAuthenticationFilter.java | 85 + .../common/core/security/JwtSubject.java | 31 + .../common/core/security/JwtUtil.java | 141 ++ .../common/core/security/SecurityConfig.java | 79 + .../common/core/utils/CommonUtil.java | 174 ++ .../common/core/utils/FileServerUtil.java | 394 ++++ .../common/core/utils/JChardetFacadeUtil.java | 2025 +++++++++++++++++ .../gxwebsoft/common/core/utils/JSONUtil.java | 69 + .../common/core/utils/OpenOfficeUtil.java | 124 + .../gxwebsoft/common/core/web/ApiResult.java | 88 + .../common/core/web/BaseController.java | 160 ++ .../gxwebsoft/common/core/web/BaseParam.java | 59 + .../gxwebsoft/common/core/web/BatchParam.java | 57 + .../common/core/web/ExistenceParam.java | 96 + .../gxwebsoft/common/core/web/PageParam.java | 343 +++ .../gxwebsoft/common/core/web/PageResult.java | 51 + .../controller/DictionaryController.java | 152 ++ .../controller/DictionaryDataController.java | 131 ++ .../system/controller/EmailController.java | 49 + .../system/controller/FileController.java | 242 ++ .../controller/LoginRecordController.java | 58 + .../system/controller/MainController.java | 140 ++ .../system/controller/MenuController.java | 126 + .../controller/OperationRecordController.java | 62 + .../controller/OrganizationController.java | 139 ++ .../system/controller/RoleController.java | 152 ++ .../system/controller/RoleMenuController.java | 100 + .../system/controller/UserController.java | 298 +++ .../system/controller/UserFileController.java | 164 ++ .../common/system/entity/Dictionary.java | 53 + .../common/system/entity/DictionaryData.java | 61 + .../common/system/entity/EmailRecord.java | 56 + .../common/system/entity/FileRecord.java | 78 + .../common/system/entity/LoginRecord.java | 72 + .../gxwebsoft/common/system/entity/Menu.java | 81 + .../common/system/entity/OperationRecord.java | 95 + .../common/system/entity/Organization.java | 77 + .../gxwebsoft/common/system/entity/Role.java | 53 + .../common/system/entity/RoleMenu.java | 44 + .../common/system/entity/Tenant.java | 46 + .../gxwebsoft/common/system/entity/User.java | 121 + .../common/system/entity/UserFile.java | 76 + .../common/system/entity/UserRole.java | 46 + .../system/mapper/DictionaryDataMapper.java | 47 + .../system/mapper/DictionaryMapper.java | 14 + .../system/mapper/EmailRecordMapper.java | 14 + .../system/mapper/FileRecordMapper.java | 47 + .../system/mapper/LoginRecordMapper.java | 48 + .../common/system/mapper/MenuMapper.java | 14 + .../system/mapper/OperationRecordMapper.java | 48 + .../system/mapper/OrganizationMapper.java | 37 + .../common/system/mapper/RoleMapper.java | 14 + .../common/system/mapper/RoleMenuMapper.java | 39 + .../common/system/mapper/UserFileMapper.java | 14 + .../common/system/mapper/UserMapper.java | 48 + .../common/system/mapper/UserRoleMapper.java | 45 + .../mapper/xml/DictionaryDataMapper.xml | 71 + .../system/mapper/xml/DictionaryMapper.xml | 5 + .../system/mapper/xml/EmailRecordMapper.xml | 5 + .../system/mapper/xml/FileRecordMapper.xml | 66 + .../system/mapper/xml/LoginRecordMapper.xml | 62 + .../common/system/mapper/xml/MenuMapper.xml | 5 + .../mapper/xml/OperationRecordMapper.xml | 71 + .../system/mapper/xml/OrganizationMapper.xml | 81 + .../common/system/mapper/xml/RoleMapper.xml | 5 + .../system/mapper/xml/RoleMenuMapper.xml | 42 + .../system/mapper/xml/UserFileMapper.xml | 5 + .../common/system/mapper/xml/UserMapper.xml | 140 ++ .../system/mapper/xml/UserRoleMapper.xml | 34 + .../system/param/DictionaryDataParam.java | 55 + .../common/system/param/DictionaryParam.java | 38 + .../common/system/param/FileRecordParam.java | 56 + .../common/system/param/LoginParam.java | 31 + .../common/system/param/LoginRecordParam.java | 60 + .../common/system/param/MenuParam.java | 56 + .../system/param/OperationRecordParam.java | 67 + .../system/param/OrganizationParam.java | 65 + .../common/system/param/RoleParam.java | 38 + .../system/param/UpdatePasswordParam.java | 28 + .../common/system/param/UserFileParam.java | 40 + .../common/system/param/UserImportParam.java | 42 + .../common/system/param/UserParam.java | 88 + .../common/system/result/CaptchaResult.java | 30 + .../common/system/result/LoginResult.java | 31 + .../system/service/DictionaryDataService.java | 51 + .../system/service/DictionaryService.java | 14 + .../system/service/EmailRecordService.java | 50 + .../system/service/FileRecordService.java | 58 + .../system/service/LoginRecordService.java | 54 + .../common/system/service/MenuService.java | 14 + .../service/OperationRecordService.java | 49 + .../system/service/OrganizationService.java | 42 + .../system/service/RoleMenuService.java | 35 + .../common/system/service/RoleService.java | 14 + .../system/service/UserFileService.java | 14 + .../system/service/UserRoleService.java | 42 + .../common/system/service/UserService.java | 93 + .../impl/DictionaryDataServiceImpl.java | 52 + .../service/impl/DictionaryServiceImpl.java | 18 + .../service/impl/EmailRecordServiceImpl.java | 72 + .../service/impl/FileRecordServiceImpl.java | 64 + .../service/impl/LoginRecordServiceImpl.java | 78 + .../system/service/impl/MenuServiceImpl.java | 18 + .../impl/OperationRecordServiceImpl.java | 52 + .../service/impl/OrganizationServiceImpl.java | 45 + .../service/impl/RoleMenuServiceImpl.java | 31 + .../system/service/impl/RoleServiceImpl.java | 18 + .../service/impl/UserFileServiceImpl.java | 18 + .../service/impl/UserRoleServiceImpl.java | 37 + .../system/service/impl/UserServiceImpl.java | 181 ++ src/main/resources/application-dev.yml | 99 + src/main/resources/application-prod.yml | 130 ++ src/main/resources/application-test.yml | 77 + src/main/resources/application.yml | 265 +++ .../resources/wechat/10550/apiclient_cert.p12 | Bin 0 -> 2798 bytes .../resources/wechat/10550/apiclient_cert.pem | 25 + .../resources/wechat/10550/apiclient_key.pem | 28 + .../resources/wechat/10584/apiclient_cert.p12 | Bin 0 -> 2774 bytes .../resources/wechat/10584/apiclient_cert.pem | 25 + .../resources/wechat/10584/apiclient_key.pem | 28 + .../gxwebsoft/WebSoftApplicationTests.java | 13 + .../com/gxwebsoft/generator/AppGenerator.java | 474 ++++ .../engine/BeetlTemplateEnginePlus.java | 50 + .../generator/templates/add.config.ts.btl | 4 + .../gxwebsoft/generator/templates/add.tsx.btl | 115 + .../templates/columns.config.vue.btl | 47 + .../templates/components.edit.vue.btl | 221 ++ .../templates/components.search.vue.btl | 42 + .../generator/templates/controller.java.btl | 278 +++ .../generator/templates/entity.java.btl | 157 ++ .../generator/templates/index.config.ts.btl | 4 + .../generator/templates/index.ts.btl | 105 + .../generator/templates/index.ts.uniapp.btl | 101 + .../generator/templates/index.tsx.btl | 171 ++ .../generator/templates/index.vue.btl | 242 ++ .../generator/templates/mapper.java.btl | 41 + .../generator/templates/mapper.xml.btl | 100 + .../generator/templates/model.ts.btl | 43 + .../generator/templates/model.ts.uniapp.btl | 43 + .../generator/templates/param.java.btl | 146 ++ .../generator/templates/service.java.btl | 55 + .../generator/templates/serviceImpl.java.btl | 62 + .../generator/templates/smart-columns.vue.btl | 89 + .../templates/table-columns-config.js | 60 + .../templates/table-with-column-settings.vue | 263 +++ 187 files changed, 19265 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/ApifoxUploaderProjectSetting.xml create mode 100644 .idea/app-java.iml create mode 100644 .idea/compiler.xml create mode 100644 .idea/dictionaries/project.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/paopao-java.iml create mode 100644 .idea/vcs.xml create mode 100644 .workbuddy/memory/2026-05-05.md create mode 100644 .workbuddy/memory/2026-05-06.md create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml create mode 100644 docker-deploy-guide.md create mode 100644 docs/db_paopao_v2.sql create mode 100644 docs/db_system.sql create mode 100644 docs/output/generate_plan.py create mode 100644 docs/output/paopao开发计划表.xlsx create mode 100644 docs/功能明细.md create mode 100644 docs/数据库对比分析.md create mode 100644 docs/核心业务流程整理.md create mode 100644 mvnw create mode 100644 mvnw.cmd create mode 100644 pom.xml create mode 100644 src/main/java/com/gxwebsoft/MainApplication.java create mode 100644 src/main/java/com/gxwebsoft/common/core/Constants.java create mode 100644 src/main/java/com/gxwebsoft/common/core/annotation/OperationLog.java create mode 100644 src/main/java/com/gxwebsoft/common/core/annotation/OperationModule.java create mode 100644 src/main/java/com/gxwebsoft/common/core/annotation/QueryField.java create mode 100644 src/main/java/com/gxwebsoft/common/core/annotation/QueryType.java create mode 100644 src/main/java/com/gxwebsoft/common/core/aspect/OperationLogAspect.java create mode 100644 src/main/java/com/gxwebsoft/common/core/config/ConfigProperties.java create mode 100644 src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java create mode 100644 src/main/java/com/gxwebsoft/common/core/config/SwaggerConfig.java create mode 100644 src/main/java/com/gxwebsoft/common/core/config/WebMvcConfig.java create mode 100644 src/main/java/com/gxwebsoft/common/core/exception/BusinessException.java create mode 100644 src/main/java/com/gxwebsoft/common/core/exception/GlobalExceptionHandler.java create mode 100644 src/main/java/com/gxwebsoft/common/core/security/JwtAccessDeniedHandler.java create mode 100644 src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationEntryPoint.java create mode 100644 src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationFilter.java create mode 100644 src/main/java/com/gxwebsoft/common/core/security/JwtSubject.java create mode 100644 src/main/java/com/gxwebsoft/common/core/security/JwtUtil.java create mode 100644 src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java create mode 100644 src/main/java/com/gxwebsoft/common/core/utils/CommonUtil.java create mode 100644 src/main/java/com/gxwebsoft/common/core/utils/FileServerUtil.java create mode 100644 src/main/java/com/gxwebsoft/common/core/utils/JChardetFacadeUtil.java create mode 100644 src/main/java/com/gxwebsoft/common/core/utils/JSONUtil.java create mode 100644 src/main/java/com/gxwebsoft/common/core/utils/OpenOfficeUtil.java create mode 100644 src/main/java/com/gxwebsoft/common/core/web/ApiResult.java create mode 100644 src/main/java/com/gxwebsoft/common/core/web/BaseController.java create mode 100644 src/main/java/com/gxwebsoft/common/core/web/BaseParam.java create mode 100644 src/main/java/com/gxwebsoft/common/core/web/BatchParam.java create mode 100644 src/main/java/com/gxwebsoft/common/core/web/ExistenceParam.java create mode 100644 src/main/java/com/gxwebsoft/common/core/web/PageParam.java create mode 100644 src/main/java/com/gxwebsoft/common/core/web/PageResult.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/DictionaryController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/DictionaryDataController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/EmailController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/FileController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/LoginRecordController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/MainController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/MenuController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/OperationRecordController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/OrganizationController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/RoleController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/RoleMenuController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/UserController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/controller/UserFileController.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/Dictionary.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/DictionaryData.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/EmailRecord.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/LoginRecord.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/Menu.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/OperationRecord.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/Organization.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/Role.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/RoleMenu.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/Tenant.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/User.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/UserFile.java create mode 100644 src/main/java/com/gxwebsoft/common/system/entity/UserRole.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/DictionaryDataMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/DictionaryMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/EmailRecordMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/FileRecordMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/LoginRecordMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/MenuMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/OperationRecordMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/OrganizationMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/RoleMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/RoleMenuMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/UserFileMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/UserMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/UserRoleMapper.java create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryDataMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/EmailRecordMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/FileRecordMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/LoginRecordMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/MenuMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/OperationRecordMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/OrganizationMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMenuMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/UserFileMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/mapper/xml/UserRoleMapper.xml create mode 100644 src/main/java/com/gxwebsoft/common/system/param/DictionaryDataParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/DictionaryParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/FileRecordParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/LoginParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/LoginRecordParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/MenuParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/OperationRecordParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/OrganizationParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/RoleParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/UpdatePasswordParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/UserFileParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/UserImportParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/param/UserParam.java create mode 100644 src/main/java/com/gxwebsoft/common/system/result/CaptchaResult.java create mode 100644 src/main/java/com/gxwebsoft/common/system/result/LoginResult.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/DictionaryDataService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/DictionaryService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/EmailRecordService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/FileRecordService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/LoginRecordService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/MenuService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/OperationRecordService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/OrganizationService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/RoleMenuService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/RoleService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/UserFileService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/UserRoleService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/UserService.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryDataServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/EmailRecordServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/FileRecordServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/LoginRecordServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/MenuServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/OperationRecordServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/OrganizationServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/RoleMenuServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/RoleServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/UserFileServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/UserRoleServiceImpl.java create mode 100644 src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java create mode 100644 src/main/resources/application-dev.yml create mode 100644 src/main/resources/application-prod.yml create mode 100644 src/main/resources/application-test.yml create mode 100644 src/main/resources/application.yml create mode 100644 src/main/resources/wechat/10550/apiclient_cert.p12 create mode 100644 src/main/resources/wechat/10550/apiclient_cert.pem create mode 100644 src/main/resources/wechat/10550/apiclient_key.pem create mode 100644 src/main/resources/wechat/10584/apiclient_cert.p12 create mode 100644 src/main/resources/wechat/10584/apiclient_cert.pem create mode 100644 src/main/resources/wechat/10584/apiclient_key.pem create mode 100644 src/test/java/com/gxwebsoft/WebSoftApplicationTests.java create mode 100644 src/test/java/com/gxwebsoft/generator/AppGenerator.java create mode 100644 src/test/java/com/gxwebsoft/generator/engine/BeetlTemplateEnginePlus.java create mode 100644 src/test/java/com/gxwebsoft/generator/templates/add.config.ts.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/add.tsx.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/columns.config.vue.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/components.edit.vue.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/components.search.vue.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/controller.java.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/entity.java.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/index.config.ts.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/index.ts.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/index.ts.uniapp.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/index.tsx.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/index.vue.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/mapper.java.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/mapper.xml.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/model.ts.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/model.ts.uniapp.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/param.java.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/service.java.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/serviceImpl.java.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/smart-columns.vue.btl create mode 100644 src/test/java/com/gxwebsoft/generator/templates/table-columns-config.js create mode 100644 src/test/java/com/gxwebsoft/generator/templates/table-with-column-settings.vue diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..10b731c --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ diff --git a/.idea/ApifoxUploaderProjectSetting.xml b/.idea/ApifoxUploaderProjectSetting.xml new file mode 100644 index 0000000..d22fb1b --- /dev/null +++ b/.idea/ApifoxUploaderProjectSetting.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/app-java.iml b/.idea/app-java.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/app-java.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..0ef07cd --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml new file mode 100644 index 0000000..8a3c0c2 --- /dev/null +++ b/.idea/dictionaries/project.xml @@ -0,0 +1,8 @@ + + + + websoft + websopy + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..63e9001 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..5580c3c --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..82dbec8 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/paopao-java.iml b/.idea/paopao-java.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/paopao-java.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.workbuddy/memory/2026-05-05.md b/.workbuddy/memory/2026-05-05.md new file mode 100644 index 0000000..bfb6324 --- /dev/null +++ b/.workbuddy/memory/2026-05-05.md @@ -0,0 +1,73 @@ +# 2026-05-05 工作日志 + +## 修复编译错误 - 恢复被误删的文件 + +### 问题 +用户报告编译错误:`CloudStorageProvider.java:3:32 - package com.gxwebsoft.app.entity does not exist` + +原因:`AppResource.java` 实体类被删除,但 `CloudStorageProvider.java` 仍依赖它。 + +### 解决方案 +从 git 历史中恢复了多个被误删的文件: + +#### 恢复的实体类 (entity) +- `AppResource.java` - 云资源实体(最初报告缺失) +- `AppProduct.java` - 应用产品实体 +- `ResourceAccessLevel.java` - 资源访问级别 +- `AppCloudCredential.java` - 云凭证 +- `AppPermissionRequest.java` - 权限请求 +- `AppRechargeCode.java` - 充值码 +- `AppRechargeRecord.java` - 充值记录 + +#### 恢复的控制器 (controller) +- `AppResourceController.java` +- `AppProductController.java` + +#### 恢复的服务接口 (service) +- `AppResourceService.java` +- `AppProductService.java` +- `AppCloudCredentialService.java` +- `AppPermissionRequestService.java` +- `AppRechargeCodeService.java` +- `AppRechargeRecordService.java` + +#### 恢复的服务实现 (service/impl) +- `AppResourceServiceImpl.java` +- `AppProductServiceImpl.java` +- `AppCloudCredentialServiceImpl.java` +- `AppPermissionRequestServiceImpl.java` +- `AppRechargeCodeServiceImpl.java` +- `AppRechargeRecordServiceImpl.java` + +#### 恢复的 Mapper 接口 +- `AppResourceMapper.java` +- `AppProductMapper.java` +- `AppCloudCredentialMapper.java` +- `AppPermissionRequestMapper.java` +- `AppRechargeCodeMapper.java` +- `AppRechargeRecordMapper.java` + +#### 恢复的参数类 (param) +- `AppResourceParam.java` +- `AppProductParam.java` +- `AppCloudCredentialParam.java` + +#### 恢复的云存储接口 +- `CloudStorageProvider.java` + +### 恢复方法 +使用 git 命令从删除前的提交中恢复文件: +```bash +git show HEAD~1:src/main/java/com/gxwebsoft/app/entity/AppResource.java > AppResource.java +``` + +对于在更早提交中删除的文件(如 `AppResourceController.java`),找到删除前的提交(如 `2202f1f`)进行恢复。 + +### 后续步骤 +1. 用户需要在 IDE 中刷新/重建项目(IntelliJ: Build → Rebuild Project) +2. 如果还有编译错误,提供文件名、行号、错误信息,继续修复 + +### 注意事项 +- 这些文件在提交 `8e30f34` 中被删除(该提交旨在移除与项目无关的功能) +- 但其中一些文件仍被其他代码引用,导致编译错误 +- 需要权衡:是继续恢复文件,还是修改引用代码以移除依赖 diff --git a/.workbuddy/memory/2026-05-06.md b/.workbuddy/memory/2026-05-06.md new file mode 100644 index 0000000..ca3c927 --- /dev/null +++ b/.workbuddy/memory/2026-05-06.md @@ -0,0 +1,19 @@ +# 2026-05-06 工作日志 + +## 清理孤立实体类 +- **任务**:对比 `docs/db_paopao.sql`(38张表)与 `entity/` 目录(26个实体),删除 SQL 中不存在的表对应的实体及其全套关联文件 +- **删除了 21 个孤立实体**:AppApiKey, AppArticleCategory, AppBuild, AppCloudCredential, AppConfig, AppContract, AppCredential, AppEvent, AppGitAccount, AppInviteToken, AppPermissionRequest, AppPipeline, AppRechargeCode, AppResource, AppSetting, AppSubscription, AppTicket, AppTicketReply, AppUserCache, AppVersion, ResourceAccessLevel +- **共删除 107 个文件**:Entity(21) + Mapper(21) + Param(16) + Service接口(18) + ServiceImpl(22) + Controller(20) + 其他被牵连文件(9) +- **保留的 5 个有效实体**:AppUser, AppArticle, AppNotification, AppProduct, AppRechargeRecord +- 被牵连删除的文件包括:云存储Provider全家桶(4个)、UserController、WxLoginController、SyncMessageConsumer、WxMiniprogramUtil、UserCacheRefreshTask 等 + +## 重新组织目录结构:子模块合并到顶层 +- **目标**:将 user/、product/、order/、finance/、marketing/、distribution/、activity/、cms/ 子模块全部合并到顶层,统一按层(entity/mapper/controller/param/service/service/impl)组织 +- **删除了 8 个子模块目录**:user/、product/、order/、finance/、marketing/、distribution/、activity/、cms/ +- **迁移了独有文件到顶层**(修正 package 和 import): + - **Service 接口(4)**: AppMemberLevelService, AppUserAddressService, AppUserMemberOrderService, AppProductCategoryService, AppOrderService + - **Service 实现(5)**: AppMemberLevelServiceImpl, AppUserAddressServiceImpl, AppUserMemberOrderServiceImpl, AppUserServiceImpl, AppProductCategoryServiceImpl, AppOrderServiceImpl + - **Mapper(10)**: AppCartMapper, AppOrderMapper, AppOrderItemMapper, AppOrderRefundMapper, AppMemberLevelMapper, AppUserAddressMapper, AppUserMemberOrderMapper, AppProductBrandMapper, AppProductCategoryMapper, AppProductSkuMapper, AppProductSpecMapper, AppProductSpecValueMapper + - **Param(4)**: AppMemberLevelParam, AppUserAddressParam, AppUserMemberOrderParam, AppOrderParam +- **最终结构**:纯扁平按层分,entity/(38个) + mapper/ + param/ + controller/ + service/ + service/impl/ +- 剩余 129 个 Java 文件,无子模块残留 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..84ae9f9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,51 @@ +# 使用更小的 Alpine Linux + OpenJDK 17 镜像 +FROM openjdk:17-jdk-alpine + +# 设置工作目录 +WORKDIR /app + +# 创建日志目录 +RUN mkdir -p /app/logs + +# 创建上传文件目录 +RUN mkdir -p /app/uploads + +# 安装必要工具和中文字体支持 +# fontconfig: 字体配置库 +# ttf-dejavu: 包含DejaVu字体,支持中文显示 +# wqy-zenhei: 文泉驿正黑字体,开源中文字体 +RUN apk add --no-cache wget fontconfig ttf-dejavu && \ + # 下载并安装文泉驿微米黑字体(更好的中文支持) + wget -O /tmp/wqy-microhei.ttc https://github.com/anthonyfok/fonts-wqy-microhei/raw/master/wqy-microhei.ttc && \ + mkdir -p /usr/share/fonts/truetype/wqy && \ + mv /tmp/wqy-microhei.ttc /usr/share/fonts/truetype/wqy/ && \ + # 刷新字体缓存 + fc-cache -fv && \ + # 创建应用用户(安全考虑) + addgroup -g 1000 appgroup && \ + adduser -D -u 1000 -G appgroup appuser + +# 复制jar包到容器 +COPY target/*.jar app.jar + +# 设置目录权限 +RUN chown -R appuser:appgroup /app + +# 切换到应用用户 +USER appuser + +# 暴露端口 +EXPOSE 9200 + +# 设置JVM参数 +ENV JAVA_OPTS="-Xms512m -Xmx1024m -Djava.security.egd=file:/dev/./urandom" + +# 设置Spring Profile +ENV SPRING_PROFILES_ACTIVE=prod + +# 健康检查 +HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://localhost:9200/actuator/health || exit 1 + +# 启动应用 +ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..ebe5ad5 --- /dev/null +++ b/README.md @@ -0,0 +1,218 @@ +# WebSoft API + +WebSoft API 是一个基于 `Spring Boot + Spring Security + MyBatis-Plus` 的后端 API 项目,覆盖 CMS、商城、支付、系统配置、消息同步等业务场景。 + +## 当前技术栈 + +以下信息以仓库当前代码为准: + +| 技术 | 当前版本 | 说明 | +|------|------|------| +| Java | 17 | 运行时与编译版本 | +| Spring Boot | 2.7.18 | 应用基础框架 | +| Spring Security | 5.7.x(随 Boot 2.7.18) | 认证与授权 | +| MyBatis-Plus | 3.4.3.3 | ORM 与通用 CRUD | +| MyBatis-Plus-Join | 1.4.5 | 连表查询扩展 | +| Druid | 1.2.20 | 数据源连接池 | +| Redis | Starter 管理 | 缓存 | +| RabbitMQ | Starter 管理 | 消息队列 | +| SpringDoc OpenAPI | 1.7.0 | OpenAPI 文档 | +| Knife4j | 4.3.0 | 接口文档增强 | +| Maven | 3.6+ | 构建工具 | + +## 主要能力 + +- 用户认证与权限控制 +- CMS 内容管理 +- 商城商品、订单、优惠券 +- 微信支付、支付宝支付 +- Redis 缓存 +- RabbitMQ 消息同步 +- WebSocket 实时通信 +- Excel 导入导出 +- 多云对象存储接入 + +## 项目结构 + +```text +src/main/java/com/gxwebsoft/ +├── WebSoftApplication.java +├── app/ # 应用配置、任务、通用业务模块 +├── cms/ # 内容管理 +├── common/ # 公共能力、核心配置、MQ、系统模块 +├── payment/ # 支付领域 +└── shop/ # 商城领域 +``` + +资源与配置文件位于 `src/main/resources/`: + +- `application.yml` +- `application-dev.yml` +- `application-test.yml` +- `application-prod.yml` +- `application-websopy.yml` + +## 环境要求 + +- JDK 17 +- Maven 3.6+ +- MySQL 8.x +- Redis +- RabbitMQ + +## 本地开发 + +### 1. 安装依赖环境 + +确保本地已经启动: + +- MySQL +- Redis +- RabbitMQ + +### 2. 配置开发环境 + +默认激活的 Spring Profile 在 [src/main/resources/application.yml](/Users/gxwebsoft/JAVA/websopy-java/src/main/resources/application.yml:5) 中配置为 `dev`。 + +开发环境配置文件为: + +- [src/main/resources/application-dev.yml](/Users/gxwebsoft/JAVA/websopy-java/src/main/resources/application-dev.yml) + +建议优先使用环境变量或本地未提交配置覆盖以下信息: + +- 数据库连接 +- Redis 连接 +- RabbitMQ 连接 +- 邮件账号 +- OSS / 支付 / 第三方平台密钥 + +### 3. 启动项目 + +```bash +mvn spring-boot:run +``` + +或在 IDE 中直接运行启动类: + +- [WebSoftApplication.java](/Users/gxwebsoft/JAVA/websopy-java/src/main/java/com/gxwebsoft/WebSoftApplication.java:25) + +### 4. 访问地址 + +开发环境默认端口是 `9200`: + +- 接口根地址:`http://localhost:9200` +- Swagger UI:`http://localhost:9200/swagger-ui/index.html` +- Knife4j:`http://localhost:9200/doc.html` + +测试环境默认端口是 `9300`,生产环境默认端口是 `9500`。 + +## 配置说明 + +### 多环境配置 + +- `dev`:本地开发 +- `test`:测试环境 +- `prod`:生产环境 +- `websopy`:额外业务环境配置 + +### 文件上传 + +主配置中定义了上传目录相关参数,生产部署前请根据服务器目录调整: + +- `config.upload-path` +- `config.local-upload-path` + +### 证书与支付 + +项目内包含微信支付、支付宝证书目录和密钥相关配置。建议: + +- 不要在仓库中保存真实密钥 +- 使用环境变量、挂载文件或配置中心注入 +- 区分开发和生产证书 + +## 打包与运行 + +### Maven 打包 + +```bash +mvn clean package -Dmaven.test.skip=true +``` + +打包后运行: + +```bash +java -jar target/websopy-api-1.5.0.jar --spring.profiles.active=prod +``` + +## Docker 部署 + +仓库包含以下文件: + +- [Dockerfile](/Users/gxwebsoft/JAVA/websopy-java/Dockerfile) +- [docker-compose.yml](/Users/gxwebsoft/JAVA/websopy-java/docker-compose.yml) + +### Dockerfile 当前行为 + +- 基础镜像:`openjdk:17-jdk-alpine` +- 容器内默认激活:`SPRING_PROFILES_ACTIVE=prod` +- 暴露端口:`9200` + +### 注意 + +当前仓库内存在一个端口差异: + +- `application-prod.yml` 默认端口是 `9500` +- `Dockerfile` 和 `docker-compose.yml` 仍按 `9200` 编排 + +如果直接按当前 Docker 配置部署,建议先统一端口设置后再上线,避免健康检查和端口映射不一致。 + +### 构建镜像 + +```bash +docker build -t websopy-api . +``` + +### 运行容器 + +以下命令仅适用于你已经把应用监听端口与 Docker 映射端口统一为 `9200` 的情况: + +```bash +docker run -d \ + --name websopy-api \ + -p 9200:9200 \ + -e SPRING_PROFILES_ACTIVE=prod \ + websopy-api +``` + +### 使用 Compose + +`docker-compose.yml` 同样建议在统一端口后再直接使用: + +```bash +docker compose up -d --build +``` + +## 接口文档 + +项目当前使用 `SpringDoc OpenAPI + Knife4j`: + +- Swagger UI:`/swagger-ui/index.html` +- Knife4j:`/doc.html` + +## 开发说明 + +### 代码分层 + +- `controller`:接口层 +- `service`:业务层 +- `mapper`:数据访问层 +- `entity / dto / vo / param`:模型层 + +### 构建说明 + +- `src/main/java` 下同时存放了 Java 代码和 `*Mapper.xml` +- Maven 构建已显式把 `*Mapper.xml` 作为资源文件打包 + +## 文档维护说明 + +历史 README 中的 `Java 1.8`、`Spring Boot 2.5.4`、部分目录结构与当前代码不一致,本次已按现有仓库状态更新。后续如果升级到 `Spring Boot 3.x` 或调整 Docker 端口,建议同步更新本文档。 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ea6a7d7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +version: '3.8' + +services: + # 应用服务 + cms-api: + build: . + container_name: cms-api + ports: + - "9200:9200" + environment: + - SPRING_PROFILES_ACTIVE=prod + - JAVA_OPTS=-Xms512m -Xmx1024m + volumes: + # 证书挂载卷 - 将宿主机证书目录挂载到容器 + - ./certs:/app/certs:ro + # 日志挂载卷 + - ./logs:/app/logs + # 上传文件挂载卷 + - ./uploads:/app/uploads + networks: + - cms-network + restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9200/actuator/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + +networks: + cms-network: + driver: bridge + +volumes: + mysql_data: + driver: local + redis_data: + driver: local diff --git a/docker-deploy-guide.md b/docker-deploy-guide.md new file mode 100644 index 0000000..4961d64 --- /dev/null +++ b/docker-deploy-guide.md @@ -0,0 +1,188 @@ +# Docker容器化部署指南 + +## 支付证书问题解决方案 + +本项目已经解决了Docker容器中支付证书路径失效的问题,支持多种证书加载方式。 + +## 目录结构 + +``` +project-root/ +├── Dockerfile +├── docker-compose.yml +├── certs/ # 证书目录(需要手动创建) +│ ├── wechat/ # 微信支付证书 +│ │ ├── apiclient_key.pem +│ │ ├── apiclient_cert.pem +│ │ └── wechatpay_cert.pem +│ └── alipay/ # 支付宝证书 +│ ├── app_private_key.pem +│ ├── appCertPublicKey.crt +│ ├── alipayCertPublicKey.crt +│ └── alipayRootCert.crt +├── logs/ # 日志目录 +├── uploads/ # 上传文件目录 +└── src/ +``` + +## 部署步骤 + +### 1. 准备证书文件 + +创建证书目录并放置证书文件: + +```bash +# 创建证书目录 +mkdir -p certs/wechat +mkdir -p certs/alipay + +# 复制微信支付证书到对应目录 +cp /path/to/your/apiclient_key.pem certs/wechat/ +cp /path/to/your/apiclient_cert.pem certs/wechat/ +cp /path/to/your/wechatpay_cert.pem certs/wechat/ + +# 复制支付宝证书到对应目录 +cp /path/to/your/app_private_key.pem certs/alipay/ +cp /path/to/your/appCertPublicKey.crt certs/alipay/ +cp /path/to/your/alipayCertPublicKey.crt certs/alipay/ +cp /path/to/your/alipayRootCert.crt certs/alipay/ + +# 设置证书文件权限(只读) +chmod -R 444 certs/ +``` + +### 2. 配置环境变量 + +创建 `.env` 文件(可选): + +```bash +# 应用配置 +SPRING_PROFILES_ACTIVE=prod +JAVA_OPTS=-Xms512m -Xmx1024m + +# 数据库配置 +MYSQL_ROOT_PASSWORD=root123456 +MYSQL_DATABASE=modules +MYSQL_USER=modules +MYSQL_PASSWORD=8YdLnk7KsPAyDXGA + +# Redis配置 +REDIS_PASSWORD=redis_WSDb88 +``` + +### 3. 构建和启动 + +```bash +# 构建应用 +mvn clean package -DskipTests + +# 启动所有服务 +docker-compose up -d + +# 查看服务状态 +docker-compose ps + +# 查看应用日志 +docker-compose logs -f cms-app +``` + +### 4. 验证部署 + +```bash +# 检查应用健康状态 +curl http://localhost:9200/actuator/health + +# 检查证书是否正确加载 +docker exec cms-java-app ls -la /app/certs/ +``` + +## 证书加载模式 + +### 开发环境 (CLASSPATH) +- 证书文件放在 `src/main/resources/certs/` 目录下 +- 打包时会包含在jar包中 +- 适合开发和测试环境 + +### 生产环境 (VOLUME) +- 证书文件通过Docker挂载卷加载 +- 证书文件在宿主机上,挂载到容器的 `/app/certs` 目录 +- 支持证书文件的动态更新(重启容器后生效) + +### 文件系统模式 (FILESYSTEM) +- 直接从文件系统路径加载证书 +- 适合传统部署方式 + +## 配置说明 + +### application.yml 配置 + +```yaml +certificate: + load-mode: VOLUME # 证书加载模式 + cert-root-path: /app/certs # 证书根目录 + + wechat-pay: + dev: + api-v3-key: "your-api-v3-key" + private-key-file: "apiclient_key.pem" + apiclient-cert-file: "apiclient_cert.pem" + wechatpay-cert-file: "wechatpay_cert.pem" +``` + +### 环境特定配置 + +- **开发环境**: `application-dev.yml` - 使用CLASSPATH模式 +- **生产环境**: `application-prod.yml` - 使用VOLUME模式 + +## 故障排除 + +### 1. 证书文件找不到 + +```bash +# 检查证书文件是否存在 +docker exec cms-java-app ls -la /app/certs/ + +# 检查文件权限 +docker exec cms-java-app ls -la /app/certs/wechat/ +``` + +### 2. 支付接口调用失败 + +```bash +# 查看应用日志 +docker-compose logs cms-app | grep -i cert + +# 检查证书配置 +docker exec cms-java-app cat /app/application.yml | grep -A 10 certificate +``` + +### 3. 容器启动失败 + +```bash +# 查看详细错误信息 +docker-compose logs cms-app + +# 检查容器状态 +docker-compose ps +``` + +## 安全建议 + +1. **证书文件权限**: 设置为只读权限 (444) +2. **证书目录权限**: 限制访问权限 +3. **敏感信息**: 使用环境变量或Docker secrets管理敏感配置 +4. **网络安全**: 使用内部网络,限制端口暴露 + +## 更新证书 + +1. 停止应用容器:`docker-compose stop cms-app` +2. 更新证书文件到 `certs/` 目录 +3. 重启应用容器:`docker-compose start cms-app` + +## 监控和日志 + +- 应用日志:`./logs/` 目录 +- 容器日志:`docker-compose logs` +- 健康检查:访问 `/actuator/health` 端点 + +通过以上配置,你的应用在Docker容器中就能正确加载支付证书了! diff --git a/docs/db_paopao_v2.sql b/docs/db_paopao_v2.sql new file mode 100644 index 0000000..27d1a36 --- /dev/null +++ b/docs/db_paopao_v2.sql @@ -0,0 +1,1026 @@ +/* + paopao 电商系统数据库设计 + 适配功能明细.md + 核心业务流程整理.md + 更新版本: 2026-05-08 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ============================================= +-- 一、用户模块 +-- ============================================= + +-- 用户表 +DROP TABLE IF EXISTS `app_user`; +CREATE TABLE `app_user` ( + `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `openid` varchar(100) DEFAULT NULL COMMENT '微信openid', + `unionid` varchar(100) DEFAULT NULL COMMENT '微信unionid', + `nickname` varchar(100) DEFAULT NULL COMMENT '昵称', + `avatar` varchar(500) DEFAULT NULL COMMENT '头像', + `phone` varchar(20) DEFAULT NULL COMMENT '手机号', + `gender` tinyint DEFAULT '0' COMMENT '性别: 0未知 1男 2女', + `birthday` date DEFAULT NULL COMMENT '生日', + `balance` decimal(15,2) DEFAULT '0.00' COMMENT '余额', + `points` int DEFAULT '0' COMMENT '积分', + `member_level_id` int DEFAULT NULL COMMENT '会员等级ID', + `member_expire_time` datetime DEFAULT NULL COMMENT '会员到期时间', + `inviter_id` bigint DEFAULT NULL COMMENT '邀请人用户ID', + `display_id` varchar(20) DEFAULT NULL COMMENT '显示ID(用户专属推广码)', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1正常', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `register_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间', + `last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`user_id`), + UNIQUE KEY `uk_openid` (`openid`), + UNIQUE KEY `uk_phone` (`phone`), + UNIQUE KEY `uk_display_id` (`display_id`), + KEY `idx_inviter_id` (`inviter_id`), + KEY `idx_member_level` (`member_level_id`), + KEY `idx_status` (`status`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表'; + +-- 用户地址表 +DROP TABLE IF EXISTS `app_user_address`; +CREATE TABLE `app_user_address` ( + `address_id` bigint NOT NULL AUTO_INCREMENT COMMENT '地址ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `consignee` varchar(50) NOT NULL COMMENT '收货人姓名', + `phone` varchar(20) NOT NULL COMMENT '收货人电话', + `province` varchar(50) DEFAULT NULL COMMENT '省份', + `city` varchar(50) DEFAULT NULL COMMENT '城市', + `district` varchar(50) DEFAULT NULL COMMENT '区/县', + `detail` varchar(200) NOT NULL COMMENT '详细地址', + `is_default` tinyint DEFAULT '0' COMMENT '是否默认: 0否 1是', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`address_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_is_default` (`is_default`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户地址表'; + +-- 会员等级表 +DROP TABLE IF EXISTS `app_member_level`; +CREATE TABLE `app_member_level` ( + `level_id` int NOT NULL AUTO_INCREMENT COMMENT '等级ID', + `level_name` varchar(50) NOT NULL COMMENT '等级名称', + `level_code` varchar(20) DEFAULT NULL COMMENT '等级编码', + `price` decimal(10,2) NOT NULL COMMENT '开通价格(注册费)', + `member_fee` decimal(10,2) DEFAULT '0.00' COMMENT '下级会员费(会员收取下级的费用)', + `duration_days` int DEFAULT NULL COMMENT '时长(天),NULL表示永久', + `discount_rate` decimal(5,2) DEFAULT '100.00' COMMENT '折扣率(%)', + `commission_rate` decimal(5,2) DEFAULT '0.00' COMMENT '分销佣金比例(%)', + `description` varchar(500) DEFAULT NULL COMMENT '等级描述', + `privileges` text COMMENT '会员权益(JSON)', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`level_id`), + UNIQUE KEY `uk_level_code` (`level_code`), + KEY `idx_status` (`status`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='会员等级表'; + +-- 用户会员购买记录表 +DROP TABLE IF EXISTS `app_user_member_order`; +CREATE TABLE `app_user_member_order` ( + `order_id` bigint NOT NULL AUTO_INCREMENT COMMENT '订单ID', + `order_no` varchar(64) NOT NULL COMMENT '订单编号', + `user_id` bigint NOT NULL COMMENT '用户ID', + `level_id` int NOT NULL COMMENT '会员等级ID', + `level_name` varchar(50) DEFAULT NULL COMMENT '等级名称(冗余)', + `price` decimal(10,2) NOT NULL COMMENT '支付金额(注册费)', + `pay_type` tinyint DEFAULT '0' COMMENT '支付方式: 0余额 1微信 2支付宝', + `pay_status` tinyint DEFAULT '0' COMMENT '支付状态: 0未支付 1已支付', + `pay_time` datetime DEFAULT NULL COMMENT '支付时间', + `transaction_id` varchar(128) DEFAULT NULL COMMENT '第三方交易号', + `start_time` datetime DEFAULT NULL COMMENT '开始时间', + `expire_time` datetime DEFAULT NULL COMMENT '到期时间', + `status` tinyint DEFAULT '0' COMMENT '状态: 0待支付 1已支付 2已取消', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`order_id`), + UNIQUE KEY `uk_order_no` (`order_no`), + KEY `idx_user_id` (`user_id`), + KEY `idx_level_id` (`level_id`), + KEY `idx_pay_status` (`pay_status`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户会员购买记录表'; + +-- 会员推广下级记录表(会员录入下级手机号) +DROP TABLE IF EXISTS `app_member_subordinate`; +CREATE TABLE `app_member_subordinate` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `member_id` bigint NOT NULL COMMENT '会员ID(上级)', + `sub_phone` varchar(20) NOT NULL COMMENT '下级手机号', + `sub_user_id` bigint DEFAULT NULL COMMENT '下级用户ID(注册后填充)', + `member_fee` decimal(10,2) NOT NULL COMMENT '收取的下级会员费', + `fee_paid` tinyint DEFAULT '0' COMMENT '会员费是否已收: 0未确认 1已确认', + `register_status` tinyint DEFAULT '0' COMMENT '注册状态: 0待注册 1已注册', + `status` tinyint DEFAULT '0' COMMENT '状态: 0待处理 1已完成 2已取消', + `remark` varchar(200) DEFAULT NULL COMMENT '备注', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + KEY `idx_member_id` (`member_id`), + KEY `idx_sub_phone` (`sub_phone`), + KEY `idx_sub_user_id` (`sub_user_id`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='会员推广下级记录表'; + +-- ============================================= +-- 二、商品模块 +-- ============================================= + +-- 商品分类表(三级分类) +DROP TABLE IF EXISTS `app_product_category`; +CREATE TABLE `app_product_category` ( + `category_id` int NOT NULL AUTO_INCREMENT COMMENT '分类ID', + `category_name` varchar(100) NOT NULL COMMENT '分类名称', + `parent_id` int DEFAULT '0' COMMENT '父级分类ID,0表示一级分类', + `level` tinyint DEFAULT '1' COMMENT '分类层级: 1一级 2二级 3三级', + `image` varchar(500) DEFAULT NULL COMMENT '分类图片', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `is_show` tinyint DEFAULT '1' COMMENT '是否显示: 0否 1是', + `is_recommend` tinyint DEFAULT '0' COMMENT '是否推荐: 0否 1是', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`category_id`), + KEY `idx_parent_id` (`parent_id`), + KEY `idx_level` (`level`), + KEY `idx_is_show` (`is_show`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品分类表(三级分类)'; + +-- 商品品牌表 +DROP TABLE IF EXISTS `app_product_brand`; +CREATE TABLE `app_product_brand` ( + `brand_id` int NOT NULL AUTO_INCREMENT COMMENT '品牌ID', + `brand_name` varchar(100) NOT NULL COMMENT '品牌名称', + `brand_logo` varchar(500) DEFAULT NULL COMMENT '品牌LOGO', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `is_show` tinyint DEFAULT '1' COMMENT '是否显示: 0否 1是', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`brand_id`), + KEY `idx_is_show` (`is_show`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品品牌表'; + +-- 商品规格表 +DROP TABLE IF EXISTS `app_product_spec`; +CREATE TABLE `app_product_spec` ( + `spec_id` int NOT NULL AUTO_INCREMENT COMMENT '规格ID', + `spec_name` varchar(50) NOT NULL COMMENT '规格名称(如:颜色、尺码)', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`spec_id`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品规格表'; + +-- 商品规格值表 +DROP TABLE IF EXISTS `app_product_spec_value`; +CREATE TABLE `app_product_spec_value` ( + `value_id` int NOT NULL AUTO_INCREMENT COMMENT '规格值ID', + `spec_id` int NOT NULL COMMENT '规格ID', + `spec_value` varchar(100) NOT NULL COMMENT '规格值(如:红色、XL)', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`value_id`), + KEY `idx_spec_id` (`spec_id`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品规格值表'; + +-- 商品表 +DROP TABLE IF EXISTS `app_product`; +CREATE TABLE `app_product` ( + `product_id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品ID', + `product_name` varchar(200) NOT NULL COMMENT '商品名称', + `product_code` varchar(100) DEFAULT NULL COMMENT '商品编码', + `category_id` int DEFAULT NULL COMMENT '三级分类ID', + `brand_id` int DEFAULT NULL COMMENT '品牌ID', + `main_image` varchar(500) NOT NULL COMMENT '主图', + `images` text COMMENT '商品图片(JSON数组)', + `video_url` varchar(500) DEFAULT NULL COMMENT '商品视频URL', + `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '售价', + `market_price` decimal(10,2) DEFAULT NULL COMMENT '市场价/划线价', + `cost_price` decimal(10,2) DEFAULT NULL COMMENT '成本价', + `stock` int DEFAULT '0' COMMENT '总库存', + `sales` int DEFAULT '0' COMMENT '销量', + `description` longtext COMMENT '商品详情', + `spec_type` tinyint DEFAULT '0' COMMENT '规格类型: 0单规格 1多规格', + `commission_rate` decimal(5,2) DEFAULT '0.00' COMMENT '分销佣金比例(%)', + `points_give` int DEFAULT '0' COMMENT '赠送积分', + `is_hot` tinyint DEFAULT '0' COMMENT '是否热销: 0否 1是', + `is_recommend` tinyint DEFAULT '0' COMMENT '是否推荐: 0否 1是', + `is_new` tinyint DEFAULT '0' COMMENT '是否新品: 0否 1是', + `status` tinyint DEFAULT '1' COMMENT '状态: 0下架 1上架', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`product_id`), + UNIQUE KEY `uk_product_code` (`product_code`), + KEY `idx_category_id` (`category_id`), + KEY `idx_brand_id` (`brand_id`), + KEY `idx_status` (`status`), + KEY `idx_is_hot` (`is_hot`), + KEY `idx_is_recommend` (`is_recommend`), + KEY `idx_sales` (`sales`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品表'; + +-- 商品SKU表(多规格) +DROP TABLE IF EXISTS `app_product_sku`; +CREATE TABLE `app_product_sku` ( + `sku_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'SKU ID', + `product_id` bigint NOT NULL COMMENT '商品ID', + `sku_code` varchar(100) DEFAULT NULL COMMENT 'SKU编码', + `spec_json` text COMMENT '规格组合JSON(如: [{"spec_name":"颜色","spec_value":"红色"},...])', + `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '售价', + `market_price` decimal(10,2) DEFAULT NULL COMMENT '市场价', + `stock` int DEFAULT '0' COMMENT '库存', + `sales` int DEFAULT '0' COMMENT '销量', + `image` varchar(500) DEFAULT NULL COMMENT 'SKU图片', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`sku_id`), + UNIQUE KEY `uk_sku_code` (`sku_code`), + KEY `idx_product_id` (`product_id`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品SKU表(多规格)'; + +-- ============================================= +-- 三、订单模块 +-- ============================================= + +-- 购物车表 +DROP TABLE IF EXISTS `app_cart`; +CREATE TABLE `app_cart` ( + `cart_id` bigint NOT NULL AUTO_INCREMENT COMMENT '购物车ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `product_id` bigint NOT NULL COMMENT '商品ID', + `sku_id` bigint DEFAULT NULL COMMENT 'SKU ID,单规格为NULL', + `quantity` int NOT NULL DEFAULT '1' COMMENT '数量', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`cart_id`), + UNIQUE KEY `uk_user_product_sku` (`user_id`,`product_id`,`sku_id`), + KEY `idx_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='购物车表'; + +-- 订单表 +DROP TABLE IF EXISTS `app_order`; +CREATE TABLE `app_order` ( + `order_id` bigint NOT NULL AUTO_INCREMENT COMMENT '订单ID', + `order_no` varchar(64) NOT NULL COMMENT '订单编号', + `user_id` bigint NOT NULL COMMENT '用户ID', + `total_amount` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '订单总金额', + `discount_amount` decimal(15,2) DEFAULT '0.00' COMMENT '优惠金额(优惠券等)', + `shipping_fee` decimal(10,2) DEFAULT '0.00' COMMENT '运费', + `pay_amount` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT '实际支付金额', + `points_used` int DEFAULT '0' COMMENT '使用积分', + `points_discount` decimal(10,2) DEFAULT '0.00' COMMENT '积分抵扣金额', + `coupon_id` bigint DEFAULT NULL COMMENT '使用优惠券ID', + `coupon_discount` decimal(10,2) DEFAULT '0.00' COMMENT '优惠券优惠金额', + `pay_type` tinyint DEFAULT '0' COMMENT '支付方式: 0余额 1微信 2支付宝', + `pay_status` tinyint DEFAULT '0' COMMENT '支付状态: 0未支付 1已支付 2已退款', + `pay_time` datetime DEFAULT NULL COMMENT '支付时间', + `transaction_id` varchar(128) DEFAULT NULL COMMENT '第三方交易号', + `order_status` tinyint DEFAULT '0' COMMENT '订单状态: 0待支付 1待发货 2待收货 3已完成 4已取消 5已关闭 6退款中 7已退款', + `shipping_name` varchar(50) DEFAULT NULL COMMENT '快递公司', + `shipping_no` varchar(100) DEFAULT NULL COMMENT '快递单号', + `shipping_time` datetime DEFAULT NULL COMMENT '发货时间', + `receive_time` datetime DEFAULT NULL COMMENT '收货时间', + `cancel_time` datetime DEFAULT NULL COMMENT '取消时间', + `cancel_reason` varchar(200) DEFAULT NULL COMMENT '取消原因', + `address_id` bigint DEFAULT NULL COMMENT '收货地址ID', + `consignee` varchar(50) DEFAULT NULL COMMENT '收货人姓名', + `consignee_phone` varchar(20) DEFAULT NULL COMMENT '收货人电话', + `consignee_address` varchar(500) DEFAULT NULL COMMENT '收货地址', + `remark` varchar(500) DEFAULT NULL COMMENT '订单备注', + `commission_status` tinyint DEFAULT '0' COMMENT '佣金结算状态: 0未结算 1已结算', + `commission_amount` decimal(15,2) DEFAULT '0.00' COMMENT '佣金总额', + `aftersale_end_time` datetime DEFAULT NULL COMMENT '售后期结束时间', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`order_id`), + UNIQUE KEY `uk_order_no` (`order_no`), + KEY `idx_user_id` (`user_id`), + KEY `idx_pay_status` (`pay_status`), + KEY `idx_order_status` (`order_status`), + KEY `idx_commission_status` (`commission_status`), + KEY `idx_create_time` (`create_time`), + KEY `idx_pay_time` (`pay_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订单表'; + +-- 订单商品表 +DROP TABLE IF EXISTS `app_order_item`; +CREATE TABLE `app_order_item` ( + `item_id` bigint NOT NULL AUTO_INCREMENT COMMENT '订单商品ID', + `order_id` bigint NOT NULL COMMENT '订单ID', + `product_id` bigint NOT NULL COMMENT '商品ID', + `product_name` varchar(200) DEFAULT NULL COMMENT '商品名称(冗余)', + `sku_id` bigint DEFAULT NULL COMMENT 'SKU ID', + `spec_json` text COMMENT '规格组合JSON(冗余)', + `price` decimal(10,2) NOT NULL COMMENT '商品单价', + `quantity` int NOT NULL COMMENT '购买数量', + `total_price` decimal(15,2) NOT NULL COMMENT '商品总价', + `image` varchar(500) DEFAULT NULL COMMENT '商品图片(冗余)', + `commission_rate` decimal(5,2) DEFAULT '0.00' COMMENT '佣金比例(%)', + `commission_amount` decimal(10,2) DEFAULT '0.00' COMMENT '佣金金额', + `refund_status` tinyint DEFAULT '0' COMMENT '退款状态: 0无退款 1申请退款 2退款中 3已退款', + `refund_amount` decimal(10,2) DEFAULT '0.00' COMMENT '退款金额', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`item_id`), + KEY `idx_order_id` (`order_id`), + KEY `idx_product_id` (`product_id`), + KEY `idx_refund_status` (`refund_status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订单商品表'; + +-- 订单支付记录表 +DROP TABLE IF EXISTS `app_order_payment`; +CREATE TABLE `app_order_payment` ( + `payment_id` bigint NOT NULL AUTO_INCREMENT COMMENT '支付记录ID', + `order_id` bigint NOT NULL COMMENT '订单ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `pay_amount` decimal(15,2) NOT NULL COMMENT '支付金额', + `pay_type` tinyint NOT NULL COMMENT '支付方式: 0余额 1微信 2支付宝', + `pay_status` tinyint DEFAULT '0' COMMENT '支付状态: 0失败 1成功', + `transaction_id` varchar(128) DEFAULT NULL COMMENT '第三方交易号', + `pay_time` datetime DEFAULT NULL COMMENT '支付时间', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`payment_id`), + KEY `idx_order_id` (`order_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_pay_status` (`pay_status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订单支付记录表'; + +-- 退款/售后表 +DROP TABLE IF EXISTS `app_order_refund`; +CREATE TABLE `app_order_refund` ( + `refund_id` bigint NOT NULL AUTO_INCREMENT COMMENT '退款ID', + `refund_no` varchar(64) NOT NULL COMMENT '退款单号', + `order_id` bigint NOT NULL COMMENT '订单ID', + `order_item_id` bigint DEFAULT NULL COMMENT '订单商品ID(部分退款)', + `user_id` bigint NOT NULL COMMENT '用户ID', + `refund_amount` decimal(10,2) NOT NULL COMMENT '退款金额', + `refund_reason` varchar(500) DEFAULT NULL COMMENT '退款原因', + `refund_desc` text COMMENT '退款说明', + `images` text COMMENT '凭证图片(JSON数组)', + `refund_status` tinyint DEFAULT '0' COMMENT '退款状态: 0待审核 1审核通过 2审核拒绝 3退款中 4已退款 5已关闭', + `review_time` datetime DEFAULT NULL COMMENT '审核时间', + `review_note` varchar(500) DEFAULT NULL COMMENT '审核备注', + `refund_time` datetime DEFAULT NULL COMMENT '退款完成时间', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`refund_id`), + UNIQUE KEY `uk_refund_no` (`refund_no`), + KEY `idx_order_id` (`order_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_refund_status` (`refund_status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='退款/售后表'; + +-- ============================================= +-- 四、积分与营销模块 +-- ============================================= + +-- 积分记录表 +DROP TABLE IF EXISTS `app_points_record`; +CREATE TABLE `app_points_record` ( + `record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `points` int NOT NULL COMMENT '积分变动(正数为获得,负数为消费)', + `balance` int DEFAULT '0' COMMENT '变动后余额', + `type` varchar(20) NOT NULL COMMENT '类型: signin签到 shop购物 consume消费 refund退款 admin管理员操作', + `relation_id` bigint DEFAULT NULL COMMENT '关联ID(订单ID等)', + `remark` varchar(200) DEFAULT NULL COMMENT '备注', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`record_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_type` (`type`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='积分记录表'; + +-- 签到记录表 +DROP TABLE IF EXISTS `app_signin_record`; +CREATE TABLE `app_signin_record` ( + `record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `signin_date` date NOT NULL COMMENT '签到日期', + `points` int NOT NULL COMMENT '获得积分', + `continuous_days` int DEFAULT '1' COMMENT '连续签到天数', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`record_id`), + UNIQUE KEY `uk_user_date` (`user_id`,`signin_date`), + KEY `idx_user_id` (`user_id`), + KEY `idx_signin_date` (`signin_date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='签到记录表'; + +-- 优惠券表 +DROP TABLE IF EXISTS `app_coupon`; +CREATE TABLE `app_coupon` ( + `coupon_id` bigint NOT NULL AUTO_INCREMENT COMMENT '优惠券ID', + `coupon_name` varchar(100) NOT NULL COMMENT '优惠券名称', + `type` tinyint NOT NULL COMMENT '类型: 1无门槛 2满减券 3折扣券 4场地使用券', + `discount_amount` decimal(10,2) DEFAULT NULL COMMENT '减免金额(满减券)', + `discount_rate` decimal(5,2) DEFAULT NULL COMMENT '折扣率(折扣券,如: 80表示8折)', + `min_amount` decimal(10,2) DEFAULT '0.00' COMMENT '最低消费金额', + `valid_days` int DEFAULT NULL COMMENT '领取后有效天数', + `start_time` datetime DEFAULT NULL COMMENT '有效期开始', + `end_time` datetime DEFAULT NULL COMMENT '有效期结束', + `total_count` int DEFAULT '0' COMMENT '发放总量,0表示不限', + `receive_count` int DEFAULT '0' COMMENT '已领取数量', + `per_limit` int DEFAULT '1' COMMENT '每人限领数量', + `is_member_only` tinyint DEFAULT '0' COMMENT '是否仅会员领取: 0否 1是', + `is_specified_user` tinyint DEFAULT '0' COMMENT '是否指定用户: 0否 1是', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`coupon_id`), + KEY `idx_type` (`type`), + KEY `idx_status` (`status`), + KEY `idx_start_time` (`start_time`), + KEY `idx_end_time` (`end_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='优惠券表'; + +-- 用户优惠券表 +DROP TABLE IF EXISTS `app_user_coupon`; +CREATE TABLE `app_user_coupon` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `coupon_id` bigint NOT NULL COMMENT '优惠券ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `coupon_name` varchar(100) DEFAULT NULL COMMENT '优惠券名称(冗余)', + `type` tinyint DEFAULT NULL COMMENT '类型(冗余)', + `discount_amount` decimal(10,2) DEFAULT NULL COMMENT '减免金额(冗余)', + `discount_rate` decimal(5,2) DEFAULT NULL COMMENT '折扣率(冗余)', + `min_amount` decimal(10,2) DEFAULT NULL COMMENT '最低消费金额(冗余)', + `status` tinyint DEFAULT '0' COMMENT '状态: 0未使用 1已使用 2已过期', + `use_time` datetime DEFAULT NULL COMMENT '使用时间', + `order_id` bigint DEFAULT NULL COMMENT '使用的订单ID', + `receive_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '领取时间', + `expire_time` datetime DEFAULT NULL COMMENT '过期时间', + `receive_type` tinyint DEFAULT '0' COMMENT '领取方式: 0主动领取 1后台发放 2活动奖励', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + KEY `idx_coupon_id` (`coupon_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_status` (`status`), + KEY `idx_expire_time` (`expire_time`), + KEY `idx_receive_time` (`receive_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户优惠券表'; + +-- 优惠券指定用户表(后台定向发放) +DROP TABLE IF EXISTS `app_coupon_specified_user`; +CREATE TABLE `app_coupon_specified_user` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `coupon_id` bigint NOT NULL COMMENT '优惠券ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `status` tinyint DEFAULT '0' COMMENT '发送状态: 0待发送 1已发送 2已拒绝', + `send_time` datetime DEFAULT NULL COMMENT '发送时间', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + KEY `idx_coupon_id` (`coupon_id`), + KEY `idx_user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='优惠券指定用户表'; + +-- 积分兑换商品表 +DROP TABLE IF EXISTS `app_points_product`; +CREATE TABLE `app_points_product` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `product_name` varchar(200) NOT NULL COMMENT '商品名称', + `product_image` varchar(500) DEFAULT NULL COMMENT '商品图片', + `product_type` tinyint DEFAULT '0' COMMENT '商品类型: 0实物 1优惠券 2虚拟商品', + `coupon_id` bigint DEFAULT NULL COMMENT '优惠券ID(商品类型为优惠券时)', + `points_price` int NOT NULL COMMENT '兑换所需积分', + `money_price` decimal(10,2) DEFAULT '0.00' COMMENT '补差价金额', + `stock` int DEFAULT '0' COMMENT '库存', + `sales` int DEFAULT '0' COMMENT '兑换量', + `description` text COMMENT '商品描述', + `is_hot` tinyint DEFAULT '0' COMMENT '是否热门: 0否 1是', + `status` tinyint DEFAULT '1' COMMENT '状态: 0下架 1上架', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + KEY `idx_status` (`status`), + KEY `idx_is_hot` (`is_hot`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='积分兑换商品表'; + +-- 积分兑换订单表 +DROP TABLE IF EXISTS `app_points_order`; +CREATE TABLE `app_points_order` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `order_no` varchar(64) NOT NULL COMMENT '订单编号', + `user_id` bigint NOT NULL COMMENT '用户ID', + `product_id` bigint NOT NULL COMMENT '积分商品ID', + `product_name` varchar(200) DEFAULT NULL COMMENT '商品名称(冗余)', + `points_price` int NOT NULL COMMENT '兑换积分', + `money_price` decimal(10,2) DEFAULT '0.00' COMMENT '补差价金额', + `pay_type` tinyint DEFAULT '0' COMMENT '支付方式: 0余额 1微信 2支付宝', + `pay_status` tinyint DEFAULT '0' COMMENT '支付状态: 0未支付 1已支付', + `order_status` tinyint DEFAULT '0' COMMENT '订单状态: 0待处理 1已发货 2已完成 3已取消', + `shipping_name` varchar(50) DEFAULT NULL COMMENT '快递公司', + `shipping_no` varchar(100) DEFAULT NULL COMMENT '快递单号', + `shipping_time` datetime DEFAULT NULL COMMENT '发货时间', + `receive_time` datetime DEFAULT NULL COMMENT '收货时间', + `address_id` bigint DEFAULT NULL COMMENT '收货地址ID', + `consignee` varchar(50) DEFAULT NULL COMMENT '收货人姓名', + `consignee_phone` varchar(20) DEFAULT NULL COMMENT '收货人电话', + `consignee_address` varchar(500) DEFAULT NULL COMMENT '收货地址', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_order_no` (`order_no`), + KEY `idx_user_id` (`user_id`), + KEY `idx_order_status` (`order_status`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='积分兑换订单表'; + +-- ============================================= +-- 五、会员分销模块 +-- ============================================= + +-- 分销关系表 +DROP TABLE IF EXISTS `app_distribution_relation`; +CREATE TABLE `app_distribution_relation` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `inviter_id` bigint NOT NULL COMMENT '邀请人ID', + `level` tinyint DEFAULT '1' COMMENT '关系层级: 1直接下级 2间接下级', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_user_inviter` (`user_id`,`inviter_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_inviter_id` (`inviter_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='分销关系表'; + +-- 佣金记录表 +DROP TABLE IF EXISTS `app_commission_record`; +CREATE TABLE `app_commission_record` ( + `record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID', + `user_id` bigint NOT NULL COMMENT '获得佣金的用户ID(上级)', + `from_user_id` bigint NOT NULL COMMENT '消费用户ID(下级)', + `order_id` bigint DEFAULT NULL COMMENT '订单ID', + `order_item_id` bigint DEFAULT NULL COMMENT '订单商品ID', + `product_id` bigint DEFAULT NULL COMMENT '商品ID', + `product_name` varchar(200) DEFAULT NULL COMMENT '商品名称', + `order_amount` decimal(15,2) DEFAULT '0.00' COMMENT '订单金额', + `commission_rate` decimal(5,2) DEFAULT '0.00' COMMENT '佣金比例(%)', + `commission_amount` decimal(15,2) NOT NULL COMMENT '佣金金额', + `status` tinyint DEFAULT '0' COMMENT '状态: 0待结算 1已结算 2已失效', + `settle_time` datetime DEFAULT NULL COMMENT '结算时间', + `order_settle_time` datetime DEFAULT NULL COMMENT '订单过售后期时间', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`record_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_from_user_id` (`from_user_id`), + KEY `idx_order_id` (`order_id`), + KEY `idx_status` (`status`), + KEY `idx_create_time` (`create_time`), + KEY `idx_settle_time` (`settle_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='佣金记录表'; + +-- 佣金提现表 +DROP TABLE IF EXISTS `app_commission_withdraw`; +CREATE TABLE `app_commission_withdraw` ( + `withdraw_id` bigint NOT NULL AUTO_INCREMENT COMMENT '提现ID', + `withdraw_no` varchar(64) NOT NULL COMMENT '提现单号', + `user_id` bigint NOT NULL COMMENT '用户ID', + `amount` decimal(15,2) NOT NULL COMMENT '提现金额', + `balance_before` decimal(15,2) DEFAULT '0.00' COMMENT '提现前余额', + `balance_after` decimal(15,2) DEFAULT '0.00' COMMENT '提现后余额', + `payee_account` varchar(100) DEFAULT NULL COMMENT '收款账号(微信openid等)', + `payee_name` varchar(50) DEFAULT NULL COMMENT '收款人姓名', + `status` tinyint DEFAULT '0' COMMENT '状态: 0待审核 1审核通过 2审核拒绝 3提现中 4已到账 5已取消', + `review_time` datetime DEFAULT NULL COMMENT '审核时间', + `review_note` varchar(500) DEFAULT NULL COMMENT '审核备注', + `transfer_time` datetime DEFAULT NULL COMMENT '转账时间', + `transaction_id` varchar(128) DEFAULT NULL COMMENT '第三方交易号', + `daily_limit` decimal(15,2) DEFAULT '2000.00' COMMENT '每日提现限额', + `single_limit` decimal(15,2) DEFAULT '200.00' COMMENT '单次提现限额(最低)', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`withdraw_id`), + UNIQUE KEY `uk_withdraw_no` (`withdraw_no`), + KEY `idx_user_id` (`user_id`), + KEY `idx_status` (`status`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='佣金提现表'; + +-- ============================================= +-- 六、活动与预约模块 +-- ============================================= + +-- 活动表 +DROP TABLE IF EXISTS `app_activity`; +CREATE TABLE `app_activity` ( + `activity_id` bigint NOT NULL AUTO_INCREMENT COMMENT '活动ID', + `activity_name` varchar(200) NOT NULL COMMENT '活动名称', + `activity_type` tinyint DEFAULT '0' COMMENT '活动类型: 0比赛 1普通活动', + `image` varchar(500) DEFAULT NULL COMMENT '活动封面图', + `images` text COMMENT '活动图片(JSON数组)', + `content` longtext COMMENT '活动详情', + `start_time` datetime NOT NULL COMMENT '活动开始时间', + `end_time` datetime NOT NULL COMMENT '活动结束时间', + `signup_start` datetime DEFAULT NULL COMMENT '报名开始时间', + `signup_end` datetime DEFAULT NULL COMMENT '报名结束时间', + `max_participants` int DEFAULT '0' COMMENT '最大报名人数,0表示不限', + `max_teams` int DEFAULT '0' COMMENT '最大报名队伍数,0表示不限', + `current_participants` int DEFAULT '0' COMMENT '当前报名人数', + `price` decimal(10,2) DEFAULT '0.00' COMMENT '报名费用,0表示免费', + `size_options` text COMMENT '尺码选项JSON(比赛活动用,如: ["S","M","L","XL"])', + `required_fields` text COMMENT '必填项JSON(如: ["姓名","手机号","身份证"])', + `is_hot` tinyint DEFAULT '0' COMMENT '是否热门: 0否 1是', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`activity_id`), + KEY `idx_activity_type` (`activity_type`), + KEY `idx_status` (`status`), + KEY `idx_is_hot` (`is_hot`), + KEY `idx_start_time` (`start_time`), + KEY `idx_end_time` (`end_time`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='活动表'; + +-- 活动报名表 +DROP TABLE IF EXISTS `app_activity_signup`; +CREATE TABLE `app_activity_signup` ( + `signup_id` bigint NOT NULL AUTO_INCREMENT COMMENT '报名ID', + `activity_id` bigint NOT NULL COMMENT '活动ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `signup_data` text COMMENT '报名填写数据JSON(根据活动必填项)', + `size_option` varchar(20) DEFAULT NULL COMMENT '尺码选择(比赛活动)', + `pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '支付金额', + `pay_status` tinyint DEFAULT '0' COMMENT '支付状态: 0未支付 1已支付', + `pay_time` datetime DEFAULT NULL COMMENT '支付时间', + `transaction_id` varchar(128) DEFAULT NULL COMMENT '第三方交易号', + `status` tinyint DEFAULT '0' COMMENT '状态: 0已报名 1已取消', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`signup_id`), + UNIQUE KEY `uk_activity_user` (`activity_id`,`user_id`), + KEY `idx_activity_id` (`activity_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_pay_status` (`pay_status`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='活动报名表'; + +-- 门店表 +DROP TABLE IF EXISTS `app_store`; +CREATE TABLE `app_store` ( + `store_id` bigint NOT NULL AUTO_INCREMENT COMMENT '门店ID', + `store_name` varchar(100) NOT NULL COMMENT '门店名称', + `address` varchar(500) NOT NULL COMMENT '门店地址', + `longitude` decimal(10,7) DEFAULT NULL COMMENT '经度', + `latitude` decimal(10,7) DEFAULT NULL COMMENT '纬度', + `phone` varchar(20) DEFAULT NULL COMMENT '联系电话', + `business_hours` varchar(200) DEFAULT NULL COMMENT '营业时间(如: 09:00-21:00)', + `description` text COMMENT '门店描述', + `images` text COMMENT '门店图片(JSON数组)', + `username` varchar(50) DEFAULT NULL COMMENT '登录账号', + `password` varchar(255) DEFAULT NULL COMMENT '登录密码(加密)', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`store_id`), + UNIQUE KEY `uk_username` (`username`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='门店表'; + +-- 穿线预约表 +DROP TABLE IF EXISTS `app_stringing_appointment`; +CREATE TABLE `app_stringing_appointment` ( + `appointment_id` bigint NOT NULL AUTO_INCREMENT COMMENT '预约ID', + `appointment_no` varchar(64) NOT NULL COMMENT '预约编号', + `user_id` bigint NOT NULL COMMENT '用户ID', + `store_id` bigint NOT NULL COMMENT '门店ID', + `store_name` varchar(100) DEFAULT NULL COMMENT '门店名称(冗余)', + `appointment_time` datetime NOT NULL COMMENT '预约时间', + `contact_name` varchar(50) NOT NULL COMMENT '联系人姓名', + `contact_phone` varchar(20) NOT NULL COMMENT '联系人电话', + `racket_info` varchar(500) DEFAULT NULL COMMENT '球拍信息', + `string_info` varchar(500) DEFAULT NULL COMMENT '穿线信息', + `remark` text COMMENT '备注', + `status` tinyint DEFAULT '0' COMMENT '状态: 0待处理 1已确认 2已完成 3已取消', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`appointment_id`), + UNIQUE KEY `uk_appointment_no` (`appointment_no`), + KEY `idx_user_id` (`user_id`), + KEY `idx_store_id` (`store_id`), + KEY `idx_appointment_time` (`appointment_time`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='穿线预约表'; + +-- ============================================= +-- 七、内容管理模块 +-- ============================================= + +-- 轮播图表 +DROP TABLE IF EXISTS `app_banner`; +CREATE TABLE `app_banner` ( + `banner_id` int NOT NULL AUTO_INCREMENT COMMENT '轮播图ID', + `title` varchar(100) DEFAULT NULL COMMENT '标题', + `image` varchar(500) NOT NULL COMMENT '图片地址', + `link_type` tinyint DEFAULT '0' COMMENT '链接类型: 0无 1商品 2活动 3文章 4外链', + `link_id` bigint DEFAULT NULL COMMENT '链接ID(商品ID/活动ID等)', + `link_url` varchar(500) DEFAULT NULL COMMENT '外链地址', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `is_show` tinyint DEFAULT '1' COMMENT '是否显示: 0否 1是', + `position` varchar(20) DEFAULT 'home' COMMENT '展示位置: home首页 store商城 activity活动', + `start_time` datetime DEFAULT NULL COMMENT '开始时间', + `end_time` datetime DEFAULT NULL COMMENT '结束时间', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`banner_id`), + KEY `idx_is_show` (`is_show`), + KEY `idx_position` (`position`), + KEY `idx_sort_number` (`sort_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='轮播图表'; + +-- 文章/公告表 +DROP TABLE IF EXISTS `app_article`; +CREATE TABLE `app_article` ( + `article_id` int NOT NULL AUTO_INCREMENT COMMENT '文章ID', + `title` varchar(200) NOT NULL COMMENT '文章标题', + `type` varchar(20) DEFAULT 'article' COMMENT '类型: article普通文章 announcement公告', + `category_id` int DEFAULT NULL COMMENT '分类ID', + `image` varchar(500) DEFAULT NULL COMMENT '封面图', + `content` longtext COMMENT '正文内容', + `overview` varchar(500) DEFAULT NULL COMMENT '摘要', + `source` varchar(120) DEFAULT NULL COMMENT '来源', + `author` varchar(80) DEFAULT NULL COMMENT '作者', + `views` int DEFAULT '0' COMMENT '阅读量', + `is_recommend` tinyint DEFAULT '0' COMMENT '是否推荐: 0否 1是', + `is_show_index` tinyint DEFAULT '0' COMMENT '是否首页显示: 0否 1是', + `sort_number` int DEFAULT '0' COMMENT '排序值', + `status` tinyint DEFAULT '1' COMMENT '状态: 0草稿 1已发布 2已下架', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `publish_time` datetime DEFAULT NULL COMMENT '发布时间', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`article_id`), + KEY `idx_type` (`type`), + KEY `idx_category_id` (`category_id`), + KEY `idx_status` (`status`), + KEY `idx_is_recommend` (`is_recommend`), + KEY `idx_sort_number` (`sort_number`), + KEY `idx_publish_time` (`publish_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='文章/公告表'; + +-- 协议内容表(隐私政策、服务协议等) +DROP TABLE IF EXISTS `app_agreement`; +CREATE TABLE `app_agreement` ( + `agreement_id` int NOT NULL AUTO_INCREMENT COMMENT '协议ID', + `agreement_key` varchar(50) NOT NULL COMMENT '协议标识: privacy隐私政策 service服务协议 copyright版权信息 about关于我们', + `agreement_name` varchar(100) NOT NULL COMMENT '协议名称', + `title` varchar(200) DEFAULT NULL COMMENT '前端显示标题', + `content` longtext COMMENT '协议正文内容', + `version` varchar(20) DEFAULT '1.0' COMMENT '版本号', + `is_show` tinyint DEFAULT '1' COMMENT '是否显示: 0否 1是', + `is_required` tinyint DEFAULT '1' COMMENT '是否必读: 0否 1是', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`agreement_id`), + UNIQUE KEY `uk_agreement_key` (`agreement_key`), + KEY `idx_status` (`status`), + KEY `idx_is_show` (`is_show`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='协议内容表'; + +-- 消息通知表 +DROP TABLE IF EXISTS `app_notification`; +CREATE TABLE `app_notification` ( + `notification_id` bigint NOT NULL AUTO_INCREMENT COMMENT '通知ID', + `user_id` bigint NOT NULL COMMENT '接收用户ID,0表示全站通知', + `type` varchar(20) NOT NULL COMMENT '类型: system系统 order订单 payment支付 commission佣金 activity活动', + `title` varchar(200) NOT NULL COMMENT '通知标题', + `content` varchar(500) DEFAULT NULL COMMENT '通知内容', + `ref_id` bigint DEFAULT NULL COMMENT '关联ID(订单ID/活动ID等)', + `ref_type` varchar(30) DEFAULT NULL COMMENT '关联类型', + `is_read` tinyint DEFAULT '0' COMMENT '是否已读: 0未读 1已读', + `read_time` datetime DEFAULT NULL COMMENT '读取时间', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`notification_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_type` (`type`), + KEY `idx_is_read` (`is_read`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='消息通知表'; + +-- ============================================= +-- 八、系统管理模块 +-- ============================================= + +-- 系统用户表(后台管理员) +DROP TABLE IF EXISTS `app_admin_user`; +CREATE TABLE `app_admin_user` ( + `admin_id` int NOT NULL AUTO_INCREMENT COMMENT '管理员ID', + `username` varchar(50) NOT NULL COMMENT '用户名', + `password` varchar(255) NOT NULL COMMENT '密码(加密)', + `nickname` varchar(50) DEFAULT NULL COMMENT '昵称', + `avatar` varchar(500) DEFAULT NULL COMMENT '头像', + `phone` varchar(20) DEFAULT NULL COMMENT '手机号', + `email` varchar(100) DEFAULT NULL COMMENT '邮箱', + `role_id` int DEFAULT NULL COMMENT '角色ID', + `last_login_ip` varchar(50) DEFAULT NULL COMMENT '最后登录IP', + `last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1正常', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`admin_id`), + UNIQUE KEY `uk_username` (`username`), + KEY `idx_role_id` (`role_id`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='后台管理员表'; + +-- 角色表 +DROP TABLE IF EXISTS `app_role`; +CREATE TABLE `app_role` ( + `role_id` int NOT NULL AUTO_INCREMENT COMMENT '角色ID', + `role_name` varchar(50) NOT NULL COMMENT '角色名称', + `role_code` varchar(50) DEFAULT NULL COMMENT '角色编码', + `description` varchar(200) DEFAULT NULL COMMENT '角色描述', + `permissions` text COMMENT '权限列表(JSON或逗号分隔)', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`role_id`), + UNIQUE KEY `uk_role_code` (`role_code`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色表'; + +-- 系统配置表 +DROP TABLE IF EXISTS `app_system_config`; +CREATE TABLE `app_system_config` ( + `config_id` int NOT NULL AUTO_INCREMENT COMMENT '配置ID', + `config_key` varchar(100) NOT NULL COMMENT '配置键', + `config_value` text COMMENT '配置值', + `config_group` varchar(50) DEFAULT 'base' COMMENT '配置分组: base基础 wechat微信 payment支付 sms短信', + `config_type` varchar(20) DEFAULT 'string' COMMENT '值类型: string/json/number/boolean', + `description` varchar(200) DEFAULT NULL COMMENT '配置说明', + `is_public` tinyint DEFAULT '0' COMMENT '是否公开: 0否 1是(前端可读取)', + `sort_number` int DEFAULT '0' COMMENT '排序号', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`config_id`), + UNIQUE KEY `uk_config_key` (`config_key`), + KEY `idx_config_group` (`config_group`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统配置表'; + +-- 文件上传记录表 +DROP TABLE IF EXISTS `app_file_upload`; +CREATE TABLE `app_file_upload` ( + `file_id` bigint NOT NULL AUTO_INCREMENT COMMENT '文件ID', + `file_name` varchar(200) NOT NULL COMMENT '文件原始名称', + `file_path` varchar(500) NOT NULL COMMENT '文件路径', + `file_url` varchar(500) NOT NULL COMMENT '文件访问URL', + `file_size` bigint DEFAULT '0' COMMENT '文件大小(字节)', + `file_type` varchar(50) DEFAULT NULL COMMENT '文件类型(MIME)', + `file_ext` varchar(10) DEFAULT NULL COMMENT '文件扩展名', + `user_id` bigint DEFAULT NULL COMMENT '上传用户ID,0表示系统', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`file_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_file_type` (`file_type`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='文件上传记录表'; + +-- ============================================= +-- 九、财务模块 +-- ============================================= + +-- 余额充值记录表 +DROP TABLE IF EXISTS `app_recharge_record`; +CREATE TABLE `app_recharge_record` ( + `record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录ID', + `record_no` varchar(64) NOT NULL COMMENT '充值单号', + `user_id` bigint NOT NULL COMMENT '用户ID', + `amount` decimal(15,2) NOT NULL COMMENT '充值金额', + `pay_type` tinyint DEFAULT '0' COMMENT '支付方式: 0余额 1微信 2支付宝(实际是从余额扣)', + `pay_status` tinyint DEFAULT '0' COMMENT '支付状态: 0未支付 1已支付', + `pay_time` datetime DEFAULT NULL COMMENT '支付时间', + `transaction_id` varchar(128) DEFAULT NULL COMMENT '第三方交易号', + `balance_before` decimal(15,2) DEFAULT '0.00' COMMENT '充值前余额', + `balance_after` decimal(15,2) DEFAULT '0.00' COMMENT '充值后余额', + `status` tinyint DEFAULT '0' COMMENT '状态: 0待支付 1已完成 2已取消', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`record_id`), + UNIQUE KEY `uk_record_no` (`record_no`), + KEY `idx_user_id` (`user_id`), + KEY `idx_pay_status` (`pay_status`), + KEY `idx_status` (`status`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='余额充值记录表'; + +-- 资金流水表 +DROP TABLE IF EXISTS `app_fund_flow`; +CREATE TABLE `app_fund_flow` ( + `flow_id` bigint NOT NULL AUTO_INCREMENT COMMENT '流水ID', + `user_id` bigint NOT NULL COMMENT '用户ID', + `flow_type` varchar(20) NOT NULL COMMENT '流水类型: recharge充值 consume消费 refund退款 commission佣金 withdraw提现', + `amount` decimal(15,2) NOT NULL COMMENT '变动金额(正数为收入,负数为支出)', + `balance` decimal(15,2) DEFAULT '0.00' COMMENT '变动后余额', + `relation_id` bigint DEFAULT NULL COMMENT '关联ID(订单ID/充值ID等)', + `remark` varchar(200) DEFAULT NULL COMMENT '备注', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `create_time` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`flow_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_flow_type` (`flow_type`), + KEY `idx_create_time` (`create_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='资金流水表'; + +-- 积分抵扣配置表 +DROP TABLE IF EXISTS `app_points_config`; +CREATE TABLE `app_points_config` ( + `config_id` int NOT NULL AUTO_INCREMENT COMMENT '配置ID', + `points_per_yuan` int DEFAULT '1' COMMENT '多少积分抵1元', + `max_percent` decimal(5,2) DEFAULT '10.00' COMMENT '最多可抵扣订单金额比例(%)', + `status` tinyint DEFAULT '1' COMMENT '状态: 0禁用(不可使用积分抵扣) 1启用', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`config_id`), + KEY `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='积分抵扣配置表'; + +-- 签到配置表 +DROP TABLE IF EXISTS `app_signin_config`; +CREATE TABLE `app_signin_config` ( + `config_id` int NOT NULL AUTO_INCREMENT COMMENT '配置ID', + `day_number` int NOT NULL COMMENT '第几天(1-7循环)', + `points` int NOT NULL COMMENT '获得积分数', + `deleted` tinyint DEFAULT '0' COMMENT '是否删除: 0否 1是', + PRIMARY KEY (`config_id`), + KEY `idx_day_number` (`day_number`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='签到积分配置表'; + +-- ============================================= +-- 初始化数据 +-- ============================================= + +-- 初始化默认协议 +INSERT INTO `app_agreement` (`agreement_key`, `agreement_name`, `title`, `content`, `version`, `is_show`, `is_required`) VALUES +('privacy', '隐私政策', '隐私政策', '隐私政策内容...', '1.0', 1, 1), +('service', '服务协议', '服务协议', '服务协议内容...', '1.0', 1, 1); + +-- 初始化系统配置 +INSERT INTO `app_system_config` (`config_key`, `config_value`, `config_group`, `config_type`, `description`, `is_public`) VALUES +('app_name', '泡菜甄选', 'base', 'string', '小程序名称', 1), +('app_logo', '/uploads/logo.png', 'base', 'string', '小程序LOGO', 1), +('signin_points', '10', 'base', 'number', '每日签到积分', 1), +('withdraw_min_amount', '200', 'base', 'number', '最低提现金额', 1), +('withdraw_daily_limit', '2000', 'base', 'number', '每日提现上限', 1); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/docs/db_system.sql b/docs/db_system.sql new file mode 100644 index 0000000..0d86a0e --- /dev/null +++ b/docs/db_system.sql @@ -0,0 +1,1866 @@ +/* + Navicat Premium Data Transfer + + Source Server : localhost + Source Server Type : MySQL + Source Server Version : 50731 + Source Host : localhost:3306 + Source Schema : ele-admin-api + + Target Server Type : MySQL + Target Server Version : 50731 + File Encoding : 65001 + + Date: 29/02/2024 10:50:47 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_dictionary +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dictionary`; +CREATE TABLE `sys_dictionary` ( + `dict_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '字典id', + `dict_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典标识', + `dict_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称', + `sort_number` int(11) NOT NULL DEFAULT 1 COMMENT '排序号', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `deleted` int(1) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`dict_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_dictionary +-- ---------------------------- +INSERT INTO `sys_dictionary` VALUES (1, 'sex', '性别', 1, NULL, 0, '2020-03-15 13:04:39', '2022-03-11 22:46:15'); +INSERT INTO `sys_dictionary` VALUES (2, 'organization_type', '机构类型', 2, NULL, 0, '2020-03-16 00:32:36', '2022-03-11 22:46:17'); + +-- ---------------------------- +-- Table structure for sys_dictionary_data +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dictionary_data`; +CREATE TABLE `sys_dictionary_data` ( + `dict_data_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '字典项id', + `dict_id` int(11) NOT NULL COMMENT '字典id', + `dict_data_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典项标识', + `dict_data_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典项名称', + `sort_number` int(11) NOT NULL DEFAULT 1 COMMENT '排序号', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `deleted` int(1) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`dict_data_id`) USING BTREE, + INDEX `dict_id`(`dict_id`) USING BTREE, + CONSTRAINT `sys_dictionary_data_ibfk_1` FOREIGN KEY (`dict_id`) REFERENCES `sys_dictionary` (`dict_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典项' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_dictionary_data +-- ---------------------------- +INSERT INTO `sys_dictionary_data` VALUES (1, 1, '1', '男', 1, NULL, 0, '2020-03-15 13:07:28', '2022-03-11 22:46:24'); +INSERT INTO `sys_dictionary_data` VALUES (2, 1, '2', '女', 2, NULL, 0, '2020-03-15 13:07:41', '2022-03-11 22:46:25'); +INSERT INTO `sys_dictionary_data` VALUES (3, 2, '1', '公司', 1, NULL, 0, '2020-03-16 00:34:32', '2022-03-11 22:46:27'); +INSERT INTO `sys_dictionary_data` VALUES (4, 2, '2', '子公司', 2, NULL, 0, '2020-03-16 00:35:02', '2022-03-11 22:46:28'); +INSERT INTO `sys_dictionary_data` VALUES (5, 2, '3', '部门', 3, NULL, 0, '2020-03-16 00:35:18', '2022-03-11 22:46:30'); +INSERT INTO `sys_dictionary_data` VALUES (6, 2, '4', '小组', 4, NULL, 0, '2020-03-16 00:35:36', '2022-03-11 22:46:31'); + +-- ---------------------------- +-- Table structure for sys_email_record +-- ---------------------------- +DROP TABLE IF EXISTS `sys_email_record`; +CREATE TABLE `sys_email_record` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件标题', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '邮件内容', + `receiver` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收件邮箱', + `sender` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发件邮箱', + `create_user_id` int(11) NULL DEFAULT NULL COMMENT '创建人', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `create_user_id`(`create_user_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_email_record_ibfk_1` FOREIGN KEY (`create_user_id`) REFERENCES `sys_user` (`user_id`) ON DELETE CASCADE ON UPDATE RESTRICT, + CONSTRAINT `sys_email_record_ibfk_2` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邮件发送记录' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_email_record +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_file_record +-- ---------------------------- +DROP TABLE IF EXISTS `sys_file_record`; +CREATE TABLE `sys_file_record` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称', + `path` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件存储路径', + `length` int(11) NULL DEFAULT NULL COMMENT '文件大小', + `content_type` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件类型', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `create_user_id` int(11) NULL DEFAULT NULL COMMENT '创建人', + `deleted` int(11) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `create_user_id`(`create_user_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_file_record_ibfk_1` FOREIGN KEY (`create_user_id`) REFERENCES `sys_user` (`user_id`) ON DELETE CASCADE ON UPDATE RESTRICT, + CONSTRAINT `sys_file_record_ibfk_2` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 193 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件上传记录' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_file_record +-- ---------------------------- +INSERT INTO `sys_file_record` VALUES (1, 'avatar.jpg', '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 11:28:16', '2022-07-22 16:15:47'); +INSERT INTO `sys_file_record` VALUES (2, 'logo.svg', '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', NULL, 1, 0, 1, '2022-07-22 11:28:21', '2022-07-22 16:15:48'); +INSERT INTO `sys_file_record` VALUES (3, 'favicon.ico', '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', NULL, 1, 0, 1, '2022-07-22 11:29:11', '2022-07-22 16:15:49'); +INSERT INTO `sys_file_record` VALUES (4, '用户导入模板.xlsx', '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', NULL, 1, 0, 1, '2022-07-22 11:29:24', '2022-07-22 16:15:50'); +INSERT INTO `sys_file_record` VALUES (5, 'classes.json', '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', NULL, 1, 0, 1, '2022-07-22 11:29:28', '2022-07-22 16:15:50'); +INSERT INTO `sys_file_record` VALUES (6, 'pro202012301.png', '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', NULL, 1, 0, 1, '2022-07-22 11:34:39', '2022-07-22 16:15:51'); +INSERT INTO `sys_file_record` VALUES (7, 'pro202012302.png', '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', NULL, 1, 0, 1, '2022-07-22 11:34:43', '2022-07-22 16:15:51'); +INSERT INTO `sys_file_record` VALUES (8, 'pro202012303.png', '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', NULL, 1, 0, 1, '2022-07-22 11:34:47', '2022-07-22 16:15:52'); +INSERT INTO `sys_file_record` VALUES (9, 'eleadmin20201020172822.png', '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', NULL, 1, 0, 1, '2022-07-22 13:02:52', '2022-07-22 16:15:53'); +INSERT INTO `sys_file_record` VALUES (10, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:34:41', '2022-07-22 16:15:54'); +INSERT INTO `sys_file_record` VALUES (11, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:34:49', '2022-07-22 16:15:54'); +INSERT INTO `sys_file_record` VALUES (12, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:34:54', '2022-07-22 16:15:55'); +INSERT INTO `sys_file_record` VALUES (13, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:35:03', '2022-07-22 16:15:56'); +INSERT INTO `sys_file_record` VALUES (14, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:35:08', '2022-07-22 16:15:56'); +INSERT INTO `sys_file_record` VALUES (15, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:35:11', '2022-07-22 16:15:57'); +INSERT INTO `sys_file_record` VALUES (16, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:35:17', '2022-07-22 16:15:57'); +INSERT INTO `sys_file_record` VALUES (17, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:35:26', '2022-07-22 16:15:58'); +INSERT INTO `sys_file_record` VALUES (18, 'faa0202700ee455b90fe77d8bef98bc0.jpg', '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:36:21', '2022-07-22 16:15:59'); +INSERT INTO `sys_file_record` VALUES (19, 'fe9196dd091e438fba115205c1003ee7.jpg', '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:36:34', '2022-07-22 16:15:59'); +INSERT INTO `sys_file_record` VALUES (20, '21222950dc174485b2ec5088435a46a3.jpg', '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:37:49', '2022-07-22 16:16:00'); +INSERT INTO `sys_file_record` VALUES (21, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:37:53', '2022-07-22 16:16:01'); +INSERT INTO `sys_file_record` VALUES (22, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:37:56', '2022-07-22 16:16:01'); +INSERT INTO `sys_file_record` VALUES (23, 'b6a811873e704db49db994053a5019b2.jpg', '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:38:00', '2022-07-22 16:16:02'); +INSERT INTO `sys_file_record` VALUES (24, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:38:09', '2022-07-22 16:16:03'); +INSERT INTO `sys_file_record` VALUES (25, 'c184eef391ae48dba87e3057e70238fb.jpg', '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:38:15', '2022-07-22 16:16:04'); +INSERT INTO `sys_file_record` VALUES (26, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:38:22', '2022-07-22 16:16:04'); +INSERT INTO `sys_file_record` VALUES (27, '8931360b593040238d894a542c9037bc.jpg', '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:38:26', '2022-07-22 16:16:05'); +INSERT INTO `sys_file_record` VALUES (28, 'e36594e7423147748b2592ccb720ae9e.jpg', '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:16', '2022-07-22 16:16:05'); +INSERT INTO `sys_file_record` VALUES (29, 'f6bc05af944a4f738b54128717952107.jpg', '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:20', '2022-07-22 16:16:06'); +INSERT INTO `sys_file_record` VALUES (30, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:24', '2022-07-22 16:16:06'); +INSERT INTO `sys_file_record` VALUES (31, '0bfaa58e801b47fb9f56dcb128206d94.jpg', '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:28', '2022-07-22 16:16:12'); +INSERT INTO `sys_file_record` VALUES (32, '12b3d575a2a24e0789a014bd6ce7585b.jpg', '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:32', '2022-07-22 16:16:13'); +INSERT INTO `sys_file_record` VALUES (33, '2d98970a51b34b6b859339c96b240dcd.jpg', '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:36', '2022-07-22 16:16:13'); +INSERT INTO `sys_file_record` VALUES (34, '3cc0f65fefbe448191aa728d80f6b97e.jpg', '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:40', '2022-07-22 16:16:14'); +INSERT INTO `sys_file_record` VALUES (35, '41d81834e87546f49d3ff48c3806ea92.jpg', '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:45', '2022-07-22 16:16:14'); +INSERT INTO `sys_file_record` VALUES (36, '4e60a84551fa48439bf42ecdb9673331.jpg', '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:49', '2022-07-22 16:16:14'); +INSERT INTO `sys_file_record` VALUES (37, '66e6f6c60cfa44b288d6343027b544d0.jpg', '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:53', '2022-07-22 16:16:15'); +INSERT INTO `sys_file_record` VALUES (38, 'd6442cfa99b64b51aabfc470055b05dc.jpg', '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:39:58', '2022-07-22 16:16:15'); +INSERT INTO `sys_file_record` VALUES (39, '948344a2a77c47a7a7b332fe12ff749a.jpg', '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:40:04', '2022-07-22 16:16:16'); +INSERT INTO `sys_file_record` VALUES (40, '20200708230820.png', '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', NULL, 1, 0, 1, '2022-07-22 13:52:55', '2022-07-22 16:16:16'); +INSERT INTO `sys_file_record` VALUES (41, 'china-provinces.geo.json', '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', NULL, 1, 0, 1, '2022-07-22 13:55:46', '2022-07-22 16:16:17'); +INSERT INTO `sys_file_record` VALUES (42, 'word.geo.json', '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', NULL, 1, 0, 1, '2022-07-22 13:55:51', '2022-07-22 16:16:17'); +INSERT INTO `sys_file_record` VALUES (43, '20200708224450.pdf', '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', NULL, 1, 0, 1, '2022-07-22 13:55:55', '2022-07-22 16:16:18'); +INSERT INTO `sys_file_record` VALUES (44, '20200708224450.docx', '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', NULL, 1, 0, 1, '2022-07-22 13:55:58', '2022-07-22 16:16:18'); +INSERT INTO `sys_file_record` VALUES (45, 'document.json', '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', NULL, 1, 0, 1, '2022-07-22 13:57:16', '2022-07-22 16:16:19'); +INSERT INTO `sys_file_record` VALUES (46, 'archive.json', '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', NULL, 1, 0, 1, '2022-07-22 13:57:19', '2022-07-22 16:16:19'); +INSERT INTO `sys_file_record` VALUES (47, 'eleadmin-copyright.jpg', '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:57:23', '2022-07-22 16:16:20'); +INSERT INTO `sys_file_record` VALUES (48, 'eleadmin-pro-copyright.jpg', '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', NULL, 1, 0, 1, '2022-07-22 13:57:25', '2022-07-22 16:16:22'); +INSERT INTO `sys_file_record` VALUES (49, 'avatar.jpg', '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 11:28:16', '2022-07-22 11:28:16'); +INSERT INTO `sys_file_record` VALUES (50, 'logo.svg', '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', NULL, 14, 0, 2, '2022-07-22 11:28:21', '2022-07-22 11:28:21'); +INSERT INTO `sys_file_record` VALUES (51, 'favicon.ico', '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', NULL, 14, 0, 2, '2022-07-22 11:29:11', '2022-07-22 11:29:11'); +INSERT INTO `sys_file_record` VALUES (52, '用户导入模板.xlsx', '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', NULL, 14, 0, 2, '2022-07-22 11:29:24', '2022-07-22 11:29:24'); +INSERT INTO `sys_file_record` VALUES (53, 'classes.json', '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', NULL, 14, 0, 2, '2022-07-22 11:29:28', '2022-07-22 11:29:28'); +INSERT INTO `sys_file_record` VALUES (54, 'pro202012301.png', '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', NULL, 14, 0, 2, '2022-07-22 11:34:39', '2022-07-22 11:34:39'); +INSERT INTO `sys_file_record` VALUES (55, 'pro202012302.png', '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', NULL, 14, 0, 2, '2022-07-22 11:34:43', '2022-07-22 11:34:43'); +INSERT INTO `sys_file_record` VALUES (56, 'pro202012303.png', '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', NULL, 14, 0, 2, '2022-07-22 11:34:47', '2022-07-22 11:34:47'); +INSERT INTO `sys_file_record` VALUES (57, 'eleadmin20201020172822.png', '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', NULL, 14, 0, 2, '2022-07-22 13:02:52', '2022-07-22 13:02:52'); +INSERT INTO `sys_file_record` VALUES (58, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:34:41', '2022-07-22 13:34:41'); +INSERT INTO `sys_file_record` VALUES (59, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:34:49', '2022-07-22 13:34:49'); +INSERT INTO `sys_file_record` VALUES (60, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:34:54', '2022-07-22 13:34:54'); +INSERT INTO `sys_file_record` VALUES (61, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:35:03', '2022-07-22 13:35:03'); +INSERT INTO `sys_file_record` VALUES (62, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:35:08', '2022-07-22 13:35:08'); +INSERT INTO `sys_file_record` VALUES (63, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:35:11', '2022-07-22 13:35:11'); +INSERT INTO `sys_file_record` VALUES (64, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:35:17', '2022-07-22 13:35:17'); +INSERT INTO `sys_file_record` VALUES (65, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:35:26', '2022-07-22 13:35:26'); +INSERT INTO `sys_file_record` VALUES (66, 'faa0202700ee455b90fe77d8bef98bc0.jpg', '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:36:21', '2022-07-22 13:36:21'); +INSERT INTO `sys_file_record` VALUES (67, 'fe9196dd091e438fba115205c1003ee7.jpg', '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:36:34', '2022-07-22 13:36:34'); +INSERT INTO `sys_file_record` VALUES (68, '21222950dc174485b2ec5088435a46a3.jpg', '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:37:49', '2022-07-22 13:37:49'); +INSERT INTO `sys_file_record` VALUES (69, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:37:53', '2022-07-22 13:37:53'); +INSERT INTO `sys_file_record` VALUES (70, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:37:56', '2022-07-22 13:37:56'); +INSERT INTO `sys_file_record` VALUES (71, 'b6a811873e704db49db994053a5019b2.jpg', '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:38:00', '2022-07-22 13:38:00'); +INSERT INTO `sys_file_record` VALUES (72, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:38:09', '2022-07-22 13:38:09'); +INSERT INTO `sys_file_record` VALUES (73, 'c184eef391ae48dba87e3057e70238fb.jpg', '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:38:15', '2022-07-22 13:38:15'); +INSERT INTO `sys_file_record` VALUES (74, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:38:22', '2022-07-22 13:38:22'); +INSERT INTO `sys_file_record` VALUES (75, '8931360b593040238d894a542c9037bc.jpg', '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:38:26', '2022-07-22 13:38:26'); +INSERT INTO `sys_file_record` VALUES (76, 'e36594e7423147748b2592ccb720ae9e.jpg', '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:16', '2022-07-22 13:39:16'); +INSERT INTO `sys_file_record` VALUES (77, 'f6bc05af944a4f738b54128717952107.jpg', '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:20', '2022-07-22 13:39:20'); +INSERT INTO `sys_file_record` VALUES (78, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:24', '2022-07-22 13:39:24'); +INSERT INTO `sys_file_record` VALUES (79, '0bfaa58e801b47fb9f56dcb128206d94.jpg', '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:28', '2022-07-22 13:39:28'); +INSERT INTO `sys_file_record` VALUES (80, '12b3d575a2a24e0789a014bd6ce7585b.jpg', '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:32', '2022-07-22 13:39:32'); +INSERT INTO `sys_file_record` VALUES (81, '2d98970a51b34b6b859339c96b240dcd.jpg', '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:36', '2022-07-22 13:39:36'); +INSERT INTO `sys_file_record` VALUES (82, '3cc0f65fefbe448191aa728d80f6b97e.jpg', '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:40', '2022-07-22 13:39:40'); +INSERT INTO `sys_file_record` VALUES (83, '41d81834e87546f49d3ff48c3806ea92.jpg', '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:45', '2022-07-22 13:39:45'); +INSERT INTO `sys_file_record` VALUES (84, '4e60a84551fa48439bf42ecdb9673331.jpg', '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:49', '2022-07-22 13:39:49'); +INSERT INTO `sys_file_record` VALUES (85, '66e6f6c60cfa44b288d6343027b544d0.jpg', '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:53', '2022-07-22 13:39:53'); +INSERT INTO `sys_file_record` VALUES (86, 'd6442cfa99b64b51aabfc470055b05dc.jpg', '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:39:58', '2022-07-22 13:39:58'); +INSERT INTO `sys_file_record` VALUES (87, '948344a2a77c47a7a7b332fe12ff749a.jpg', '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:40:04', '2022-07-22 13:40:04'); +INSERT INTO `sys_file_record` VALUES (88, '20200708230820.png', '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', NULL, 14, 0, 2, '2022-07-22 13:52:55', '2022-07-22 13:52:55'); +INSERT INTO `sys_file_record` VALUES (89, 'china-provinces.geo.json', '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', NULL, 14, 0, 2, '2022-07-22 13:55:46', '2022-07-22 13:55:46'); +INSERT INTO `sys_file_record` VALUES (90, 'word.geo.json', '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', NULL, 14, 0, 2, '2022-07-22 13:55:51', '2022-07-22 13:55:51'); +INSERT INTO `sys_file_record` VALUES (91, '20200708224450.pdf', '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', NULL, 14, 0, 2, '2022-07-22 13:55:55', '2022-07-22 13:55:55'); +INSERT INTO `sys_file_record` VALUES (92, '20200708224450.docx', '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', NULL, 14, 0, 2, '2022-07-22 13:55:58', '2022-07-22 13:55:58'); +INSERT INTO `sys_file_record` VALUES (93, 'document.json', '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', NULL, 14, 0, 2, '2022-07-22 13:57:16', '2022-07-22 13:57:16'); +INSERT INTO `sys_file_record` VALUES (94, 'archive.json', '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', NULL, 14, 0, 2, '2022-07-22 13:57:19', '2022-07-22 13:57:19'); +INSERT INTO `sys_file_record` VALUES (95, 'eleadmin-copyright.jpg', '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:57:23', '2022-07-22 13:57:23'); +INSERT INTO `sys_file_record` VALUES (96, 'eleadmin-pro-copyright.jpg', '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', NULL, 14, 0, 2, '2022-07-22 13:57:25', '2022-07-22 13:57:25'); +INSERT INTO `sys_file_record` VALUES (97, 'avatar.jpg', '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 11:28:16', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (98, 'logo.svg', '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', NULL, 27, 0, 3, '2022-07-22 11:28:21', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (99, 'favicon.ico', '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', NULL, 27, 0, 3, '2022-07-22 11:29:11', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (100, '用户导入模板.xlsx', '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', NULL, 27, 0, 3, '2022-07-22 11:29:24', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (101, 'classes.json', '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', NULL, 27, 0, 3, '2022-07-22 11:29:28', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (102, 'pro202012301.png', '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', NULL, 27, 0, 3, '2022-07-22 11:34:39', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (103, 'pro202012302.png', '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', NULL, 27, 0, 3, '2022-07-22 11:34:43', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (104, 'pro202012303.png', '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', NULL, 27, 0, 3, '2022-07-22 11:34:47', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (105, 'eleadmin20201020172822.png', '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', NULL, 27, 0, 3, '2022-07-22 13:02:52', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (106, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:34:41', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (107, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:34:49', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (108, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:34:54', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (109, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:35:03', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (110, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:35:08', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (111, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:35:11', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (112, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:35:17', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (113, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:35:26', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (114, 'faa0202700ee455b90fe77d8bef98bc0.jpg', '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:36:21', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (115, 'fe9196dd091e438fba115205c1003ee7.jpg', '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:36:34', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (116, '21222950dc174485b2ec5088435a46a3.jpg', '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:37:49', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (117, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:37:53', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (118, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:37:56', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (119, 'b6a811873e704db49db994053a5019b2.jpg', '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:38:00', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (120, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:38:09', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (121, 'c184eef391ae48dba87e3057e70238fb.jpg', '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:38:15', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (122, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:38:22', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (123, '8931360b593040238d894a542c9037bc.jpg', '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:38:26', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (124, 'e36594e7423147748b2592ccb720ae9e.jpg', '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:16', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (125, 'f6bc05af944a4f738b54128717952107.jpg', '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:20', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (126, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:24', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (127, '0bfaa58e801b47fb9f56dcb128206d94.jpg', '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:28', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (128, '12b3d575a2a24e0789a014bd6ce7585b.jpg', '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:32', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (129, '2d98970a51b34b6b859339c96b240dcd.jpg', '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:36', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (130, '3cc0f65fefbe448191aa728d80f6b97e.jpg', '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:40', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (131, '41d81834e87546f49d3ff48c3806ea92.jpg', '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:45', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (132, '4e60a84551fa48439bf42ecdb9673331.jpg', '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:49', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (133, '66e6f6c60cfa44b288d6343027b544d0.jpg', '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:53', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (134, 'd6442cfa99b64b51aabfc470055b05dc.jpg', '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:39:58', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (135, '948344a2a77c47a7a7b332fe12ff749a.jpg', '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:40:04', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (136, '20200708230820.png', '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', NULL, 27, 0, 3, '2022-07-22 13:52:55', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (137, 'china-provinces.geo.json', '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', NULL, 27, 0, 3, '2022-07-22 13:55:46', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (138, 'word.geo.json', '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', NULL, 27, 0, 3, '2022-07-22 13:55:51', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (139, '20200708224450.pdf', '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', NULL, 27, 0, 3, '2022-07-22 13:55:55', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (140, '20200708224450.docx', '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', NULL, 27, 0, 3, '2022-07-22 13:55:58', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (141, 'document.json', '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', NULL, 27, 0, 3, '2022-07-22 13:57:16', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (142, 'archive.json', '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', NULL, 27, 0, 3, '2022-07-22 13:57:19', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (143, 'eleadmin-copyright.jpg', '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:57:23', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (144, 'eleadmin-pro-copyright.jpg', '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', NULL, 27, 0, 3, '2022-07-22 13:57:25', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (145, 'avatar.jpg', '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 11:28:16', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (146, 'logo.svg', '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', NULL, 40, 0, 4, '2022-07-22 11:28:21', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (147, 'favicon.ico', '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', NULL, 40, 0, 4, '2022-07-22 11:29:11', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (148, '用户导入模板.xlsx', '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', NULL, 40, 0, 4, '2022-07-22 11:29:24', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (149, 'classes.json', '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', NULL, 40, 0, 4, '2022-07-22 11:29:28', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (150, 'pro202012301.png', '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', NULL, 40, 0, 4, '2022-07-22 11:34:39', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (151, 'pro202012302.png', '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', NULL, 40, 0, 4, '2022-07-22 11:34:43', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (152, 'pro202012303.png', '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', NULL, 40, 0, 4, '2022-07-22 11:34:47', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (153, 'eleadmin20201020172822.png', '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', NULL, 40, 0, 4, '2022-07-22 13:02:52', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (154, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:34:41', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (155, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:34:49', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (156, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:34:54', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (157, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:35:03', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (158, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:35:08', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (159, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:35:11', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (160, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:35:17', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (161, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:35:26', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (162, 'faa0202700ee455b90fe77d8bef98bc0.jpg', '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:36:21', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (163, 'fe9196dd091e438fba115205c1003ee7.jpg', '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:36:34', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (164, '21222950dc174485b2ec5088435a46a3.jpg', '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:37:49', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (165, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:37:53', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (166, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:37:56', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (167, 'b6a811873e704db49db994053a5019b2.jpg', '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:38:00', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (168, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:38:09', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (169, 'c184eef391ae48dba87e3057e70238fb.jpg', '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:38:15', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (170, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:38:22', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (171, '8931360b593040238d894a542c9037bc.jpg', '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:38:26', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (172, 'e36594e7423147748b2592ccb720ae9e.jpg', '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:16', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (173, 'f6bc05af944a4f738b54128717952107.jpg', '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:20', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (174, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:24', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (175, '0bfaa58e801b47fb9f56dcb128206d94.jpg', '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:28', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (176, '12b3d575a2a24e0789a014bd6ce7585b.jpg', '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:32', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (177, '2d98970a51b34b6b859339c96b240dcd.jpg', '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:36', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (178, '3cc0f65fefbe448191aa728d80f6b97e.jpg', '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:40', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (179, '41d81834e87546f49d3ff48c3806ea92.jpg', '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:45', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (180, '4e60a84551fa48439bf42ecdb9673331.jpg', '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:49', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (181, '66e6f6c60cfa44b288d6343027b544d0.jpg', '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:53', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (182, 'd6442cfa99b64b51aabfc470055b05dc.jpg', '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:39:58', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (183, '948344a2a77c47a7a7b332fe12ff749a.jpg', '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:40:04', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (184, '20200708230820.png', '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', NULL, 40, 0, 4, '2022-07-22 13:52:55', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (185, 'china-provinces.geo.json', '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', NULL, 40, 0, 4, '2022-07-22 13:55:46', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (186, 'word.geo.json', '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', NULL, 40, 0, 4, '2022-07-22 13:55:51', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (187, '20200708224450.pdf', '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', NULL, 40, 0, 4, '2022-07-22 13:55:55', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (188, '20200708224450.docx', '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', NULL, 40, 0, 4, '2022-07-22 13:55:58', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (189, 'document.json', '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', NULL, 40, 0, 4, '2022-07-22 13:57:16', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (190, 'archive.json', '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', NULL, 40, 0, 4, '2022-07-22 13:57:19', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (191, 'eleadmin-copyright.jpg', '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:57:23', '2023-02-07 09:13:53'); +INSERT INTO `sys_file_record` VALUES (192, 'eleadmin-pro-copyright.jpg', '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', NULL, 40, 0, 4, '2022-07-22 13:57:25', '2023-02-07 09:13:53'); + +-- ---------------------------- +-- Table structure for sys_login_record +-- ---------------------------- +DROP TABLE IF EXISTS `sys_login_record`; +CREATE TABLE `sys_login_record` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号', + `os` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作系统', + `device` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备名', + `browser` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器类型', + `ip` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地址', + `login_type` int(11) NOT NULL COMMENT '操作类型, 0登录成功, 1登录失败, 2退出登录, 3续签token', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_login_record_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '登录日志' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_login_record +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( + `menu_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '菜单id', + `parent_id` int(11) NOT NULL DEFAULT 0 COMMENT '上级id, 0是顶级', + `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称', + `path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单路由地址', + `component` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单组件地址, 目录可为空', + `menu_type` int(11) NULL DEFAULT 0 COMMENT '类型, 0菜单, 1按钮', + `sort_number` int(11) NOT NULL DEFAULT 1 COMMENT '排序号', + `authority` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限标识', + `icon` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单图标', + `hide` int(11) NOT NULL DEFAULT 0 COMMENT '是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)', + `meta` varchar(800) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其它路由元信息', + `deleted` int(1) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`menu_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_menu_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 3101 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_menu +-- ---------------------------- +INSERT INTO `sys_menu` VALUES (1, 0, '系统管理', '/system', NULL, 0, 1, NULL, 'el-icon-setting', 0, '{\"badge\": \"New\", \"badgeColor\": \"warning\"}', 0, 1, '2020-02-26 12:51:23', '2023-12-06 15:06:55'); +INSERT INTO `sys_menu` VALUES (2, 1, '用户管理', '/system/user', '/system/user', 0, 1, NULL, 'el-icon-_user-group', 0, NULL, 0, 1, '2020-02-26 12:51:55', '2021-05-21 17:56:28'); +INSERT INTO `sys_menu` VALUES (3, 2, '查询用户', NULL, NULL, 1, 1, 'sys:user:list', NULL, 0, NULL, 0, 1, '2020-02-26 12:52:06', '2020-09-16 11:05:35'); +INSERT INTO `sys_menu` VALUES (4, 2, '添加用户', NULL, NULL, 1, 2, 'sys:user:save', NULL, 0, NULL, 0, 1, '2020-02-26 12:52:26', '2020-03-21 18:45:29'); +INSERT INTO `sys_menu` VALUES (5, 2, '修改用户', NULL, NULL, 1, 3, 'sys:user:update', NULL, 0, NULL, 0, 1, '2020-02-26 12:52:50', '2020-03-21 18:45:30'); +INSERT INTO `sys_menu` VALUES (6, 2, '删除用户', NULL, NULL, 1, 4, 'sys:user:remove', NULL, 0, NULL, 0, 1, '2020-02-26 12:53:13', '2020-03-21 18:45:32'); +INSERT INTO `sys_menu` VALUES (7, 1, '角色管理', '/system/role', '/system/role', 0, 2, NULL, 'el-icon-postcard', 0, NULL, 0, 1, '2020-03-13 13:29:08', '2021-05-21 17:56:34'); +INSERT INTO `sys_menu` VALUES (8, 7, '查询角色', NULL, NULL, 1, 1, 'sys:role:list', NULL, 0, NULL, 0, 1, '2020-03-13 13:30:41', '2020-03-21 18:45:34'); +INSERT INTO `sys_menu` VALUES (9, 7, '添加角色', NULL, NULL, 1, 2, 'sys:role:save', NULL, 0, NULL, 0, 1, '2020-03-15 13:02:07', '2020-03-21 18:45:35'); +INSERT INTO `sys_menu` VALUES (10, 7, '修改角色', NULL, NULL, 1, 3, 'sys:role:update', NULL, 0, NULL, 0, 1, '2020-03-15 13:02:49', '2020-03-21 18:45:36'); +INSERT INTO `sys_menu` VALUES (11, 7, '删除角色', NULL, NULL, 1, 4, 'sys:role:remove', NULL, 0, NULL, 0, 1, '2020-03-20 17:58:51', '2020-03-21 18:45:38'); +INSERT INTO `sys_menu` VALUES (12, 1, '菜单管理', '/system/menu', '/system/menu', 0, 3, NULL, 'el-icon-s-operation', 0, NULL, 0, 1, '2020-03-21 01:07:13', '2021-05-21 17:56:39'); +INSERT INTO `sys_menu` VALUES (13, 12, '查询菜单', NULL, NULL, 1, 1, 'sys:menu:list', NULL, 0, NULL, 0, 1, '2020-03-21 16:43:30', '2020-03-21 18:45:40'); +INSERT INTO `sys_menu` VALUES (14, 12, '添加菜单', NULL, NULL, 1, 2, 'sys:menu:save', NULL, 0, NULL, 0, 1, '2020-03-21 16:43:54', '2020-03-21 18:45:41'); +INSERT INTO `sys_menu` VALUES (15, 12, '修改菜单', NULL, NULL, 1, 3, 'sys:menu:update', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:17', '2020-03-21 18:45:43'); +INSERT INTO `sys_menu` VALUES (16, 12, '删除菜单', NULL, NULL, 1, 4, 'sys:menu:remove', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:18', '2020-03-21 18:45:44'); +INSERT INTO `sys_menu` VALUES (17, 1, '机构管理', '/system/organization', '/system/organization', 0, 4, NULL, 'el-icon-office-building', 0, NULL, 0, 1, '2020-03-21 18:24:20', '2021-11-05 16:13:26'); +INSERT INTO `sys_menu` VALUES (18, 17, '查询机构', NULL, NULL, 1, 1, 'sys:org:list', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:21', '2020-03-21 18:44:36'); +INSERT INTO `sys_menu` VALUES (19, 17, '添加机构', NULL, NULL, 1, 2, 'sys:org:save', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:22', '2020-03-21 18:45:51'); +INSERT INTO `sys_menu` VALUES (20, 17, '修改机构', NULL, NULL, 1, 3, 'sys:org:update', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:24', '2020-03-21 18:45:52'); +INSERT INTO `sys_menu` VALUES (21, 17, '删除机构', NULL, NULL, 1, 4, 'sys:org:remove', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:25', '2020-03-21 18:45:54'); +INSERT INTO `sys_menu` VALUES (22, 1, '字典管理', '/system/dictionary', '/system/dictionary', 0, 5, NULL, 'el-icon-notebook-2', 0, NULL, 0, 1, '2020-03-21 18:24:26', '2021-11-05 16:13:30'); +INSERT INTO `sys_menu` VALUES (23, 22, '查询字典', NULL, NULL, 1, 1, 'sys:dict:list', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:27', '2020-03-21 18:44:42'); +INSERT INTO `sys_menu` VALUES (24, 22, '添加字典', NULL, NULL, 1, 2, 'sys:dict:save', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:28', '2020-03-21 18:45:59'); +INSERT INTO `sys_menu` VALUES (25, 22, '修改字典', NULL, NULL, 1, 3, 'sys:dict:update', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:29', '2020-03-21 18:46:01'); +INSERT INTO `sys_menu` VALUES (26, 22, '删除字典', NULL, NULL, 1, 4, 'sys:dict:remove', NULL, 0, NULL, 0, 1, '2020-03-21 18:24:31', '2020-03-21 18:46:02'); +INSERT INTO `sys_menu` VALUES (27, 1, '登录日志', '/system/login-record', '/system/login-record', 0, 7, 'sys:login-record:list', 'el-icon-date', 0, NULL, 0, 1, '2020-03-21 18:24:33', '2021-11-05 17:28:53'); +INSERT INTO `sys_menu` VALUES (28, 1, '操作日志', '/system/operation-record', '/system/operation-record', 0, 8, 'sys:operation-record:list', 'el-icon-_retrieve', 0, NULL, 0, 1, '2020-03-21 18:24:34', '2021-11-05 17:28:56'); +INSERT INTO `sys_menu` VALUES (29, 1, '文件管理', '/system/file', '/system/file', 0, 6, NULL, 'el-icon-folder', 0, NULL, 0, 1, '2020-09-17 23:19:43', '2023-09-06 08:49:09'); +INSERT INTO `sys_menu` VALUES (30, 29, '上传文件', NULL, NULL, 1, 1, 'sys:file:upload', NULL, 0, NULL, 0, 1, '2020-09-17 23:21:04', '2022-07-20 16:40:21'); +INSERT INTO `sys_menu` VALUES (31, 29, '删除文件', NULL, NULL, 1, 2, 'sys:file:remove', NULL, 0, NULL, 0, 1, '2020-09-17 23:21:53', '2022-07-20 16:40:23'); +INSERT INTO `sys_menu` VALUES (32, 29, '查看记录', NULL, NULL, 1, 3, 'sys:file:list', NULL, 0, NULL, 0, 1, '2020-09-17 23:20:29', '2022-07-20 16:40:24'); +INSERT INTO `sys_menu` VALUES (33, 2, '用户详情', '/system/user/details', '/system/user/details', 0, 5, NULL, 'el-icon-user', 1, '{\"active\": \"/system/user\"}', 0, 1, '2021-05-21 11:07:54', '2022-07-20 16:39:29'); +INSERT INTO `sys_menu` VALUES (34, 1, '修改个人密码', NULL, NULL, 1, 9, 'sys:auth:password', NULL, 0, NULL, 0, 1, '2020-09-17 23:22:45', '2023-04-19 08:40:53'); +INSERT INTO `sys_menu` VALUES (35, 1, '修改个人资料', NULL, NULL, 1, 10, 'sys:auth:user', NULL, 0, NULL, 0, 1, '2020-09-17 23:23:24', '2023-04-19 08:40:54'); +INSERT INTO `sys_menu` VALUES (36, 0, 'Dashboard', '/dashboard', NULL, 0, 0, NULL, 'el-icon-house', 0, NULL, 0, 1, '2021-02-02 20:00:34', '2021-11-05 16:37:00'); +INSERT INTO `sys_menu` VALUES (37, 36, '工作台', '/dashboard/workplace', '/dashboard/workplace', 0, 1, NULL, 'el-icon-monitor', 0, NULL, 0, 1, '2021-02-02 20:00:37', '2021-11-05 16:36:59'); +INSERT INTO `sys_menu` VALUES (38, 36, '分析页', '/dashboard/analysis', '/dashboard/analysis', 0, 2, NULL, 'el-icon-data-analysis', 0, '{\"badge\": 1}', 0, 1, '2021-02-02 20:00:40', '2022-03-11 16:45:44'); +INSERT INTO `sys_menu` VALUES (39, 36, '监控页', '/dashboard/monitor', '/dashboard/monitor', 0, 3, NULL, 'el-icon-odometer', 0, NULL, 0, 1, '2021-02-02 20:03:12', '2021-11-05 16:36:56'); +INSERT INTO `sys_menu` VALUES (40, 0, '表单页面', '/form', NULL, 0, 2, NULL, 'el-icon-tickets', 0, NULL, 0, 1, '2021-02-02 20:03:28', '2023-12-06 15:07:08'); +INSERT INTO `sys_menu` VALUES (41, 40, '基础表单', '/form/basic', '/form/basic', 0, 1, NULL, 'el-icon-_feedback', 0, NULL, 0, 1, '2021-02-02 20:03:51', '2021-11-05 16:36:53'); +INSERT INTO `sys_menu` VALUES (42, 40, '复杂表单', '/form/advanced', '/form/advanced', 0, 2, NULL, 'el-icon-_visa', 0, NULL, 0, 1, '2021-02-02 20:03:56', '2021-11-05 16:36:52'); +INSERT INTO `sys_menu` VALUES (43, 40, '分步表单', '/form/step', '/form/step', 0, 3, NULL, 'el-icon-c-scale-to-original', 0, NULL, 0, 1, '2021-02-02 20:04:06', '2021-11-05 16:36:50'); +INSERT INTO `sys_menu` VALUES (44, 0, '列表页面', '/list', NULL, 0, 3, NULL, 'el-icon-_table', 0, NULL, 0, 1, '2021-02-02 20:05:07', '2021-11-05 16:36:49'); +INSERT INTO `sys_menu` VALUES (45, 44, '基础列表', '/list/basic', '/list/basic', 0, 1, NULL, 'el-icon-document', 0, NULL, 0, 1, '2021-02-02 20:05:10', '2021-11-05 16:36:48'); +INSERT INTO `sys_menu` VALUES (46, 44, '复杂列表', '/list/advanced', '/list/advanced', 0, 2, NULL, 'el-icon-_cols', 0, NULL, 0, 1, '2021-02-02 20:05:26', '2021-11-05 16:36:47'); +INSERT INTO `sys_menu` VALUES (47, 44, '卡片列表', '/list/card', '/list/card', 0, 3, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2021-02-02 20:05:30', '2021-11-05 16:36:45'); +INSERT INTO `sys_menu` VALUES (48, 47, '项目列表', '/list/card/project', '/list/card/project', 0, 1, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2021-02-02 20:06:35', '2021-11-05 16:36:44'); +INSERT INTO `sys_menu` VALUES (49, 47, '应用列表', '/list/card/application', '/list/card/application', 0, 2, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2021-02-02 20:06:39', '2021-11-05 16:36:42'); +INSERT INTO `sys_menu` VALUES (50, 47, '文章列表', '/list/card/article', '/list/card/article', 0, 3, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2021-02-02 20:06:48', '2021-11-05 16:36:41'); +INSERT INTO `sys_menu` VALUES (51, 45, '添加用户', '/list/basic/add', '/list/basic/add', 0, 1, NULL, 'el-icon-user', 1, '{\"active\": \"/list/basic\"}', 0, 1, '2022-03-11 21:56:38', '2022-07-20 16:42:25'); +INSERT INTO `sys_menu` VALUES (52, 45, '修改用户', '/list/basic/edit', '/list/basic/edit', 0, 2, NULL, 'el-icon-user', 1, '{\"active\": \"/list/basic\"}', 0, 1, '2022-03-11 21:56:38', '2022-07-20 16:42:26'); +INSERT INTO `sys_menu` VALUES (53, 45, '用户详情', '/list/basic/details/:id', '/list/basic/details', 0, 3, NULL, 'el-icon-user', 1, '{\"active\": \"/list/basic\"}', 0, 1, '2022-03-11 21:56:38', '2022-07-20 16:42:27'); +INSERT INTO `sys_menu` VALUES (54, 0, '结果页面', '/result', NULL, 0, 4, NULL, 'el-icon-circle-check', 0, NULL, 0, 1, '2021-02-02 20:07:33', '2021-11-05 16:36:40'); +INSERT INTO `sys_menu` VALUES (55, 54, '成功页', '/result/success', '/result/success', 0, 1, NULL, 'el-icon-circle-check', 0, NULL, 0, 1, '2021-02-02 20:07:40', '2021-11-05 16:36:38'); +INSERT INTO `sys_menu` VALUES (56, 54, '失败页', '/result/fail', '/result/fail', 0, 2, NULL, 'el-icon-circle-close', 0, NULL, 0, 1, '2021-02-02 20:07:41', '2021-11-05 16:36:37'); +INSERT INTO `sys_menu` VALUES (57, 0, '异常页面', '/exception', NULL, 0, 5, NULL, 'el-icon-document-delete', 0, NULL, 0, 1, '2021-02-02 20:08:44', '2021-11-05 16:36:36'); +INSERT INTO `sys_menu` VALUES (58, 57, '403', '/exception/403', '/exception/403', 0, 1, NULL, 'el-icon-document-checked', 0, NULL, 0, 1, '2021-02-02 20:08:47', '2021-11-05 16:36:35'); +INSERT INTO `sys_menu` VALUES (59, 57, '404', '/exception/404', '/exception/404', 0, 2, NULL, 'el-icon-document-remove', 0, NULL, 0, 1, '2021-02-02 20:08:49', '2021-11-05 16:36:34'); +INSERT INTO `sys_menu` VALUES (60, 57, '500', '/exception/500', '/exception/500', 0, 3, NULL, 'el-icon-document-delete', 0, NULL, 0, 1, '2021-02-02 20:08:52', '2021-11-05 16:36:33'); +INSERT INTO `sys_menu` VALUES (61, 0, '个人中心', '/user', NULL, 0, 6, NULL, 'el-icon-set-up', 0, NULL, 0, 1, '2021-02-02 20:09:54', '2021-11-05 16:36:31'); +INSERT INTO `sys_menu` VALUES (62, 61, '我的资料', '/user/profile', '/user/profile', 0, 1, NULL, 'el-icon-user', 0, NULL, 0, 1, '2021-02-02 20:09:58', '2021-11-05 16:36:30'); +INSERT INTO `sys_menu` VALUES (63, 61, '我的消息', '/user/message', '/user/message', 0, 2, NULL, 'el-icon-chat-dot-round', 0, NULL, 0, 1, '2021-02-02 20:10:03', '2021-11-05 16:36:27'); +INSERT INTO `sys_menu` VALUES (64, 0, '扩展组件', '/extension', NULL, 0, 7, NULL, 'el-icon-open', 0, NULL, 0, 1, '2021-02-02 20:10:52', '2021-11-05 16:36:26'); +INSERT INTO `sys_menu` VALUES (65, 64, '图标扩展', '/extension/icon', '/extension/icon', 0, 1, NULL, 'el-icon-_heart', 0, NULL, 0, 1, '2021-02-02 20:10:55', '2022-03-11 21:36:27'); +INSERT INTO `sys_menu` VALUES (66, 64, '标签组件', '/extension/tag', '/extension/tag', 0, 2, NULL, 'el-icon-price-tag', 0, NULL, 0, 1, '2021-10-05 11:13:35', '2022-03-11 21:42:50'); +INSERT INTO `sys_menu` VALUES (67, 64, '弹窗扩展', '/extension/dialog', '/extension/dialog', 0, 3, NULL, 'el-icon-copy-document', 0, NULL, 0, 1, '2021-10-05 11:32:12', '2022-03-11 21:42:52'); +INSERT INTO `sys_menu` VALUES (68, 64, '文件列表', '/extension/file', '/extension/file', 0, 4, NULL, 'el-icon-folder', 0, NULL, 0, 1, '2021-02-02 20:10:58', '2022-03-11 21:37:16'); +INSERT INTO `sys_menu` VALUES (69, 64, '图片上传', '/extension/upload', '/extension/upload', 0, 5, NULL, 'el-icon-picture-outline', 0, NULL, 0, 1, '2021-02-02 20:10:58', '2022-07-20 16:49:27'); +INSERT INTO `sys_menu` VALUES (70, 64, '拖拽排序', '/extension/dragsort', '/extension/dragsort', 0, 6, NULL, 'el-icon-rank', 0, NULL, 0, 1, '2021-02-02 20:11:48', '2022-07-20 16:43:38'); +INSERT INTO `sys_menu` VALUES (71, 64, '消息提示', '/extension/message', '/extension/message', 0, 7, NULL, 'el-icon-chat-line-square', 0, NULL, 0, 1, '2021-10-05 11:14:28', '2022-07-20 16:43:39'); +INSERT INTO `sys_menu` VALUES (72, 64, '城市选择', '/extension/regions', '/extension/regions', 0, 8, NULL, 'el-icon-office-building', 0, NULL, 0, 1, '2021-10-05 11:25:15', '2022-07-20 16:43:40'); +INSERT INTO `sys_menu` VALUES (73, 64, '打印插件', '/extension/printer', '/extension/printer', 0, 9, NULL, 'el-icon-printer', 0, NULL, 0, 1, '2021-02-02 20:11:00', '2022-07-20 16:43:42'); +INSERT INTO `sys_menu` VALUES (74, 64, 'excel插件', '/extension/excel', '/extension/excel', 0, 10, NULL, 'el-icon-_table', 0, NULL, 0, 1, '2021-02-02 20:11:03', '2022-07-20 16:43:43'); +INSERT INTO `sys_menu` VALUES (75, 64, '滚动数字', '/extension/count-up', '/extension/count-up', 0, 11, NULL, 'el-icon-more', 0, NULL, 0, 1, '2021-10-05 11:29:03', '2022-07-20 16:43:45'); +INSERT INTO `sys_menu` VALUES (76, 64, '空状态', '/extension/empty', '/extension/empty', 0, 12, NULL, 'el-icon-receiving', 0, NULL, 0, 1, '2021-10-05 11:20:35', '2022-07-20 16:43:47'); +INSERT INTO `sys_menu` VALUES (77, 64, '步骤条', '/extension/steps', '/extension/steps', 0, 13, NULL, 'el-icon-_timeline', 0, NULL, 0, 1, '2021-10-05 11:16:39', '2022-07-20 16:43:49'); +INSERT INTO `sys_menu` VALUES (78, 64, '菜单导航', '/extension/menu', '/extension/menu', 0, 14, NULL, 'el-icon-s-operation', 0, NULL, 0, 1, '2021-10-05 11:18:35', '2022-07-20 16:43:51'); +INSERT INTO `sys_menu` VALUES (79, 64, '树形下拉', '/extension/tree-select', '/extension/tree-select', 0, 15, NULL, 'el-icon-_condition', 0, NULL, 0, 1, '2021-10-10 16:21:12', '2022-07-20 16:43:52'); +INSERT INTO `sys_menu` VALUES (80, 64, '表格下拉', '/extension/table-select', '/extension/table-select', 0, 16, NULL, 'el-icon-_table', 0, NULL, 0, 1, '2021-10-10 16:21:45', '2022-07-20 16:43:54'); +INSERT INTO `sys_menu` VALUES (81, 64, '分割布局', '/extension/split-layout', '/extension/split-layout', 0, 17, NULL, NULL, 0, NULL, 1, 1, '2021-10-10 16:21:45', '2022-07-20 16:45:04'); +INSERT INTO `sys_menu` VALUES (82, 64, '视频播放', '/extension/player', '/extension/player', 0, 18, NULL, 'el-icon-_video', 0, NULL, 0, 1, '2021-02-02 20:13:49', '2022-07-20 16:44:01'); +INSERT INTO `sys_menu` VALUES (83, 64, '地图组件', '/extension/map', '/extension/map', 0, 19, NULL, 'el-icon-map-location', 0, NULL, 0, 1, '2021-02-02 20:11:49', '2022-07-20 16:44:03'); +INSERT INTO `sys_menu` VALUES (84, 64, '二维码', '/extension/qr-code', '/extension/qr-code', 0, 20, NULL, 'el-icon-_qrcode', 0, NULL, 0, 1, '2021-10-05 11:29:56', '2022-07-20 16:44:04'); +INSERT INTO `sys_menu` VALUES (85, 64, '条形码', '/extension/bar-code', '/extension/bar-code', 0, 21, NULL, 'el-icon-_barcode', 0, NULL, 0, 1, '2021-10-05 11:29:56', '2022-07-20 16:49:58'); +INSERT INTO `sys_menu` VALUES (86, 64, '富文本框', '/extension/editor', '/extension/editor', 0, 22, NULL, 'el-icon-_font-family', 0, NULL, 0, 1, '2021-02-02 20:13:57', '2022-07-20 16:44:07'); +INSERT INTO `sys_menu` VALUES (87, 64, 'markdown', '/extension/markdown', '/extension/markdown', 0, 23, NULL, 'el-icon-_feedback', 0, NULL, 0, 1, '2022-03-11 21:58:13', '2022-07-20 16:44:40'); +INSERT INTO `sys_menu` VALUES (88, 64, '仪表盘', '/extension/dashboard', '/extension/dashboard', 0, 24, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2022-03-11 21:58:13', '2023-04-21 22:35:55'); +INSERT INTO `sys_menu` VALUES (89, 64, '引导组件', '/extension/tour', '/extension/tour', 0, 25, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2022-03-11 21:58:13', '2023-04-21 22:35:56'); +INSERT INTO `sys_menu` VALUES (90, 0, '常用实例', '/example', NULL, 0, 8, NULL, 'el-icon-_integral', 0, NULL, 0, 1, '2021-02-02 20:15:01', '2021-11-05 16:52:47'); +INSERT INTO `sys_menu` VALUES (91, 90, '表格实例', '/example/table', '/example/table', 0, 1, NULL, 'el-icon-_table', 0, NULL, 0, 1, '2021-10-06 22:26:55', '2022-03-11 21:53:34'); +INSERT INTO `sys_menu` VALUES (92, 90, '菜单徽章', '/example/menu-badge', '/example/menu-badge', 0, 2, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2022-03-11 21:57:35', '2023-04-21 22:32:42'); +INSERT INTO `sys_menu` VALUES (93, 90, '内嵌页面', '/example/eleadmin', 'https://www.eleadmin.com', 0, 3, NULL, 'el-icon-connection', 0, NULL, 0, 1, '2021-05-21 11:11:57', '2022-07-20 16:45:55'); +INSERT INTO `sys_menu` VALUES (94, 90, '内嵌文档', '/example/eleadmin-doc', 'https://eleadmin.com/doc/eleadmin/', 0, 4, NULL, 'el-icon-connection', 0, NULL, 0, 1, '2021-05-21 11:11:57', '2022-07-20 16:45:56'); +INSERT INTO `sys_menu` VALUES (95, 90, '批量选择', '/example/choose', '/example/choose', 0, 5, NULL, 'el-icon-finished', 0, NULL, 0, 1, '2021-02-02 20:15:11', '2022-07-20 16:45:57'); +INSERT INTO `sys_menu` VALUES (96, 90, '案卷调整', '/example/document', '/example/document', 0, 6, NULL, 'el-icon-files', 0, NULL, 0, 1, '2021-02-02 20:15:03', '2022-07-20 16:45:59'); +INSERT INTO `sys_menu` VALUES (97, 64, '水印组件', '/extension/watermark', '/extension/watermark', 0, 26, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2021-02-02 20:15:03', '2023-04-21 22:35:58'); +INSERT INTO `sys_menu` VALUES (98, 64, '分割面板', '/extension/split', '/extension/split', 0, 27, NULL, 'el-icon-_menu', 0, NULL, 0, 1, '2021-02-02 20:15:03', '2023-04-21 22:35:59'); +INSERT INTO `sys_menu` VALUES (99, 0, '获取授权', 'https://eleadmin.com/goods/8', NULL, 0, 9, NULL, 'el-icon-_prerogative', 0, NULL, 0, 1, '2021-02-02 20:15:18', '2022-03-11 21:33:18'); +INSERT INTO `sys_menu` VALUES (101, 0, '系统管理', '/system', NULL, 0, 1, NULL, 'setting-outlined', 0, '{\"badge\": \"New\", \"badgeColor\": \"#faad14\"}', 0, 2, '2020-02-26 12:51:23', '2022-03-11 16:47:36'); +INSERT INTO `sys_menu` VALUES (102, 101, '用户管理', '/system/user', '/system/user', 0, 1, NULL, 'team-outlined', 0, NULL, 0, 2, '2020-02-26 12:51:55', '2021-11-05 17:32:50'); +INSERT INTO `sys_menu` VALUES (103, 102, '查询用户', NULL, NULL, 1, 1, 'sys:user:list', NULL, 0, NULL, 0, 2, '2020-02-26 12:52:06', '2020-09-16 11:05:35'); +INSERT INTO `sys_menu` VALUES (104, 102, '添加用户', NULL, NULL, 1, 2, 'sys:user:save', NULL, 0, NULL, 0, 2, '2020-02-26 12:52:26', '2020-03-21 18:45:29'); +INSERT INTO `sys_menu` VALUES (105, 102, '修改用户', NULL, NULL, 1, 3, 'sys:user:update', NULL, 0, NULL, 0, 2, '2020-02-26 12:52:50', '2020-03-21 18:45:30'); +INSERT INTO `sys_menu` VALUES (106, 102, '删除用户', NULL, NULL, 1, 4, 'sys:user:remove', NULL, 0, NULL, 0, 2, '2020-02-26 12:53:13', '2020-03-21 18:45:32'); +INSERT INTO `sys_menu` VALUES (107, 101, '角色管理', '/system/role', '/system/role', 0, 2, NULL, 'idcard-outlined', 0, NULL, 0, 2, '2020-03-13 13:29:08', '2021-11-05 17:32:55'); +INSERT INTO `sys_menu` VALUES (108, 107, '查询角色', NULL, NULL, 1, 1, 'sys:role:list', NULL, 0, NULL, 0, 2, '2020-03-13 13:30:41', '2020-03-21 18:45:34'); +INSERT INTO `sys_menu` VALUES (109, 107, '添加角色', NULL, NULL, 1, 2, 'sys:role:save', NULL, 0, NULL, 0, 2, '2020-03-15 13:02:07', '2020-03-21 18:45:35'); +INSERT INTO `sys_menu` VALUES (110, 107, '修改角色', NULL, NULL, 1, 3, 'sys:role:update', NULL, 0, NULL, 0, 2, '2020-03-15 13:02:49', '2020-03-21 18:45:36'); +INSERT INTO `sys_menu` VALUES (111, 107, '删除角色', NULL, NULL, 1, 4, 'sys:role:remove', NULL, 0, NULL, 0, 2, '2020-03-20 17:58:51', '2020-03-21 18:45:38'); +INSERT INTO `sys_menu` VALUES (112, 101, '菜单管理', '/system/menu', '/system/menu', 0, 3, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2020-03-21 01:07:13', '2022-03-11 15:37:11'); +INSERT INTO `sys_menu` VALUES (113, 112, '查询菜单', NULL, NULL, 1, 1, 'sys:menu:list', NULL, 0, NULL, 0, 2, '2020-03-21 16:43:30', '2020-03-21 18:45:40'); +INSERT INTO `sys_menu` VALUES (114, 112, '添加菜单', NULL, NULL, 1, 2, 'sys:menu:save', NULL, 0, NULL, 0, 2, '2020-03-21 16:43:54', '2020-03-21 18:45:41'); +INSERT INTO `sys_menu` VALUES (115, 112, '修改菜单', NULL, NULL, 1, 3, 'sys:menu:update', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:17', '2020-03-21 18:45:43'); +INSERT INTO `sys_menu` VALUES (116, 112, '删除菜单', NULL, NULL, 1, 4, 'sys:menu:remove', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:18', '2020-03-21 18:45:44'); +INSERT INTO `sys_menu` VALUES (117, 101, '机构管理', '/system/organization', '/system/organization', 0, 5, NULL, 'bank-outlined', 0, NULL, 0, 2, '2020-03-21 18:24:20', '2022-03-11 17:08:48'); +INSERT INTO `sys_menu` VALUES (118, 117, '查询机构', NULL, NULL, 1, 1, 'sys:org:list', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:21', '2020-03-21 18:44:36'); +INSERT INTO `sys_menu` VALUES (119, 117, '添加机构', NULL, NULL, 1, 2, 'sys:org:save', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:22', '2020-03-21 18:45:51'); +INSERT INTO `sys_menu` VALUES (120, 117, '修改机构', NULL, NULL, 1, 3, 'sys:org:update', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:24', '2020-03-21 18:45:52'); +INSERT INTO `sys_menu` VALUES (121, 117, '删除机构', NULL, NULL, 1, 4, 'sys:org:remove', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:25', '2020-03-21 18:45:54'); +INSERT INTO `sys_menu` VALUES (122, 101, '字典管理', '/system/dictionary', '/system/dictionary', 0, 4, NULL, 'profile-outlined', 0, NULL, 0, 2, '2020-03-21 18:24:26', '2022-03-11 17:08:47'); +INSERT INTO `sys_menu` VALUES (123, 122, '查询字典', NULL, NULL, 1, 1, 'sys:dict:list', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:27', '2020-03-21 18:44:42'); +INSERT INTO `sys_menu` VALUES (124, 122, '添加字典', NULL, NULL, 1, 2, 'sys:dict:save', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:28', '2020-03-21 18:45:59'); +INSERT INTO `sys_menu` VALUES (125, 122, '修改字典', NULL, NULL, 1, 3, 'sys:dict:update', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:29', '2020-03-21 18:46:01'); +INSERT INTO `sys_menu` VALUES (126, 122, '删除字典', NULL, NULL, 1, 4, 'sys:dict:remove', NULL, 0, NULL, 0, 2, '2020-03-21 18:24:31', '2020-03-21 18:46:02'); +INSERT INTO `sys_menu` VALUES (127, 101, '登录日志', '/system/login-record', '/system/login-record', 0, 7, 'sys:login-record:list', 'calendar-outlined', 0, NULL, 0, 2, '2020-03-21 18:24:33', '2022-07-20 17:23:18'); +INSERT INTO `sys_menu` VALUES (128, 101, '操作日志', '/system/operation-record', '/system/operation-record', 0, 8, 'sys:operation-record:list', 'file-search-outlined', 0, NULL, 0, 2, '2020-03-21 18:24:34', '2022-07-20 17:23:22'); +INSERT INTO `sys_menu` VALUES (129, 101, '文件管理', '/system/file', '/system/file', 0, 6, NULL, 'folder-outlined', 0, NULL, 0, 2, '2020-09-17 23:19:43', '2022-07-20 22:27:22'); +INSERT INTO `sys_menu` VALUES (130, 129, '上传文件', NULL, NULL, 1, 1, 'sys:file:upload', NULL, 0, NULL, 0, 2, '2020-09-17 23:21:04', '2022-07-20 17:27:58'); +INSERT INTO `sys_menu` VALUES (131, 129, '删除文件', NULL, NULL, 1, 2, 'sys:file:remove', NULL, 0, NULL, 0, 2, '2020-09-17 23:21:53', '2022-07-20 17:27:59'); +INSERT INTO `sys_menu` VALUES (132, 129, '查看记录', NULL, NULL, 1, 3, 'sys:file:list', NULL, 0, NULL, 0, 2, '2020-09-17 23:20:29', '2022-07-20 17:28:00'); +INSERT INTO `sys_menu` VALUES (133, 102, '用户详情', '/system/user/details', '/system/user/details', 0, 5, NULL, 'team-outlined', 1, '{\"active\": \"/system/user\"}', 0, 2, '2021-05-21 11:07:54', '2022-07-20 23:05:19'); +INSERT INTO `sys_menu` VALUES (134, 101, '修改个人密码', NULL, NULL, 1, 10, 'sys:auth:password', NULL, 0, NULL, 0, 2, '2020-09-17 23:22:45', '2023-04-19 08:40:56'); +INSERT INTO `sys_menu` VALUES (135, 101, '修改个人资料', NULL, NULL, 1, 11, 'sys:auth:user', NULL, 0, NULL, 0, 2, '2020-09-17 23:23:24', '2023-04-19 08:40:57'); +INSERT INTO `sys_menu` VALUES (136, 0, 'Dashboard', '/dashboard', NULL, 0, 0, NULL, 'home-outlined', 0, NULL, 0, 2, '2021-02-02 20:00:34', '2021-11-05 17:33:42'); +INSERT INTO `sys_menu` VALUES (137, 136, '工作台', '/dashboard/workplace', '/dashboard/workplace', 0, 1, NULL, 'desktop-outlined', 0, NULL, 0, 2, '2021-02-02 20:00:37', '2021-11-05 17:34:32'); +INSERT INTO `sys_menu` VALUES (138, 136, '分析页', '/dashboard/analysis', '/dashboard/analysis', 0, 2, NULL, 'bar-chart-outlined', 0, '{\"badge\": 1}', 0, 2, '2021-02-02 20:00:40', '2022-03-11 16:47:54'); +INSERT INTO `sys_menu` VALUES (139, 136, '监控页', '/dashboard/monitor', '/dashboard/monitor', 0, 3, NULL, 'dashboard-outlined', 0, NULL, 0, 2, '2021-02-02 20:03:12', '2021-11-05 17:34:41'); +INSERT INTO `sys_menu` VALUES (140, 0, '表单页面', '/form', NULL, 0, 2, NULL, 'file-text-outlined', 0, NULL, 0, 2, '2021-02-02 20:03:28', '2021-11-05 17:34:53'); +INSERT INTO `sys_menu` VALUES (141, 140, '基础表单', '/form/basic', '/form/basic', 0, 1, NULL, 'file-text-outlined', 0, NULL, 0, 2, '2021-02-02 20:03:51', '2022-03-11 15:40:07'); +INSERT INTO `sys_menu` VALUES (142, 140, '复杂表单', '/form/advanced', '/form/advanced', 0, 2, NULL, 'audit-outlined', 0, NULL, 0, 2, '2021-02-02 20:03:56', '2021-11-05 17:35:07'); +INSERT INTO `sys_menu` VALUES (143, 140, '分步表单', '/form/step', '/form/step', 0, 3, NULL, 'one-to-one-outlined', 0, NULL, 0, 2, '2021-02-02 20:04:06', '2021-11-05 17:35:17'); +INSERT INTO `sys_menu` VALUES (144, 0, '列表页面', '/list', NULL, 0, 3, NULL, 'table-outlined', 0, NULL, 0, 2, '2021-02-02 20:05:07', '2021-11-05 17:35:24'); +INSERT INTO `sys_menu` VALUES (145, 144, '基础列表', '/list/basic', '/list/basic', 0, 1, NULL, 'table-outlined', 0, NULL, 0, 2, '2021-02-02 20:05:10', '2022-03-11 15:40:17'); +INSERT INTO `sys_menu` VALUES (146, 144, '复杂列表', '/list/advanced', '/list/advanced', 0, 2, NULL, 'profile-outlined', 0, NULL, 0, 2, '2021-02-02 20:05:26', '2022-03-11 21:21:33'); +INSERT INTO `sys_menu` VALUES (147, 144, '卡片列表', '/list/card', '/list/card', 0, 3, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-02-02 20:05:30', '2021-11-05 17:35:45'); +INSERT INTO `sys_menu` VALUES (148, 147, '项目列表', '/list/card/project', '/list/card/project', 0, 1, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-02-02 20:06:35', '2021-11-05 17:35:53'); +INSERT INTO `sys_menu` VALUES (149, 147, '应用列表', '/list/card/application', '/list/card/application', 0, 2, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-02-02 20:06:39', '2021-11-05 17:35:54'); +INSERT INTO `sys_menu` VALUES (150, 147, '文章列表', '/list/card/article', '/list/card/article', 0, 3, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-02-02 20:06:48', '2021-11-05 17:35:56'); +INSERT INTO `sys_menu` VALUES (151, 145, '添加用户', '/list/basic/add', '/list/basic/add', 0, 4, NULL, 'team-outlined', 1, '{\"active\": \"/list/basic\"}', 0, 2, '2021-02-02 20:05:26', '2022-03-11 17:03:11'); +INSERT INTO `sys_menu` VALUES (152, 145, '修改用户', '/list/basic/edit', '/list/basic/edit', 0, 4, NULL, 'team-outlined', 1, '{\"active\": \"/list/basic\"}', 0, 2, '2021-02-02 20:05:26', '2022-03-11 17:03:11'); +INSERT INTO `sys_menu` VALUES (153, 145, '用户详情', '/list/basic/details/:id', '/list/basic/details', 0, 4, NULL, 'team-outlined', 1, '{\"active\": \"/list/basic\"}', 0, 2, '2021-02-02 20:05:26', '2022-03-11 17:03:11'); +INSERT INTO `sys_menu` VALUES (154, 0, '结果页面', '/result', NULL, 0, 4, NULL, 'check-circle-outlined', 0, NULL, 0, 2, '2021-02-02 20:07:33', '2021-11-05 17:36:06'); +INSERT INTO `sys_menu` VALUES (155, 154, '成功页', '/result/success', '/result/success', 0, 1, NULL, 'check-circle-outlined', 0, NULL, 0, 2, '2021-02-02 20:07:40', '2021-11-05 17:36:12'); +INSERT INTO `sys_menu` VALUES (156, 154, '失败页', '/result/fail', '/result/fail', 0, 2, NULL, 'close-circle-outlined', 0, NULL, 0, 2, '2021-02-02 20:07:41', '2021-11-05 17:36:20'); +INSERT INTO `sys_menu` VALUES (157, 0, '异常页面', '/exception', NULL, 0, 5, NULL, 'warning-outlined', 0, NULL, 0, 2, '2021-02-02 20:08:44', '2021-11-05 17:36:36'); +INSERT INTO `sys_menu` VALUES (158, 157, '403', '/exception/403', '/exception/403', 0, 1, NULL, 'exclamation-circle-outlined', 0, NULL, 0, 2, '2021-02-02 20:08:47', '2021-11-05 17:36:43'); +INSERT INTO `sys_menu` VALUES (159, 157, '404', '/exception/404', '/exception/404', 0, 2, NULL, 'question-circle-outlined', 0, NULL, 0, 2, '2021-02-02 20:08:49', '2021-11-05 17:36:52'); +INSERT INTO `sys_menu` VALUES (160, 157, '500', '/exception/500', '/exception/500', 0, 3, NULL, 'close-circle-outlined', 0, NULL, 0, 2, '2021-02-02 20:08:52', '2021-11-05 17:36:59'); +INSERT INTO `sys_menu` VALUES (161, 0, '个人中心', '/user', NULL, 0, 6, NULL, 'control-outlined', 0, NULL, 0, 2, '2021-02-02 20:09:54', '2021-11-05 17:37:11'); +INSERT INTO `sys_menu` VALUES (162, 161, '我的资料', '/user/profile', '/user/profile', 0, 1, NULL, 'user-outlined', 0, NULL, 0, 2, '2021-02-02 20:09:58', '2021-11-05 17:37:17'); +INSERT INTO `sys_menu` VALUES (163, 161, '我的消息', '/user/message', '/user/message', 0, 2, NULL, 'sound-outlined', 0, NULL, 0, 2, '2021-02-02 20:10:03', '2021-11-05 17:37:19'); +INSERT INTO `sys_menu` VALUES (164, 0, '扩展组件', '/extension', NULL, 0, 7, NULL, 'appstore-add-outlined', 0, NULL, 0, 2, '2021-02-02 20:10:52', '2021-11-05 17:37:51'); +INSERT INTO `sys_menu` VALUES (165, 164, '标签组件', '/extension/tag', '/extension/tag', 0, 1, NULL, 'tag-outlined', 0, NULL, 0, 2, '2021-10-05 11:13:35', '2022-03-11 21:32:21'); +INSERT INTO `sys_menu` VALUES (166, 164, '弹窗扩展', '/extension/dialog', '/extension/dialog', 0, 2, NULL, 'block-outlined', 0, NULL, 0, 2, '2021-10-05 11:32:12', '2022-03-11 21:32:08'); +INSERT INTO `sys_menu` VALUES (167, 164, '文件列表', '/extension/file', '/extension/file', 0, 3, NULL, 'folder-outlined', 0, NULL, 0, 2, '2021-02-02 20:10:58', '2022-03-11 20:57:04'); +INSERT INTO `sys_menu` VALUES (168, 164, '图片上传', '/extension/upload', '/extension/upload', 0, 4, NULL, 'picture-outlined', 0, NULL, 0, 2, '2021-02-02 20:10:58', '2022-07-20 17:34:08'); +INSERT INTO `sys_menu` VALUES (169, 164, '拖拽排序', '/extension/dragsort', '/extension/dragsort', 0, 5, NULL, 'drag-outlined', 0, NULL, 0, 2, '2021-02-02 20:11:48', '2022-07-20 17:27:15'); +INSERT INTO `sys_menu` VALUES (170, 164, '颜色选择', '/extension/color-picker', '/extension/color-picker', 0, 6, NULL, 'bg-colors-outlined', 0, NULL, 0, 2, '2021-10-05 11:16:39', '2022-07-20 17:27:16'); +INSERT INTO `sys_menu` VALUES (171, 164, '城市选择', '/extension/regions', '/extension/regions', 0, 7, NULL, 'apartment-outlined', 0, NULL, 0, 2, '2021-10-05 11:25:15', '2022-07-20 17:27:17'); +INSERT INTO `sys_menu` VALUES (172, 164, '打印插件', '/extension/printer', '/extension/printer', 0, 8, NULL, 'printer-outlined', 0, NULL, 0, 2, '2021-02-02 20:11:00', '2022-07-20 17:27:18'); +INSERT INTO `sys_menu` VALUES (173, 164, 'excel插件', '/extension/excel', '/extension/excel', 0, 9, NULL, 'table-outlined', 0, NULL, 0, 2, '2021-02-02 20:11:03', '2022-07-20 17:27:19'); +INSERT INTO `sys_menu` VALUES (174, 164, '滚动数字', '/extension/count-up', '/extension/count-up', 0, 10, NULL, 'ellipsis-outlined', 0, NULL, 0, 2, '2021-10-05 11:29:03', '2022-07-20 17:27:20'); +INSERT INTO `sys_menu` VALUES (175, 164, '无限滚动', '/extension/infinite-scroll', '/extension/infinite-scroll', 0, 11, NULL, NULL, 0, NULL, 1, 2, '2021-10-10 16:21:45', '2022-07-20 17:27:21'); +INSERT INTO `sys_menu` VALUES (176, 164, '表格下拉', '/extension/table-select', '/extension/table-select', 0, 12, NULL, 'table-outlined', 0, NULL, 0, 2, '2021-10-10 16:21:45', '2022-07-20 17:27:22'); +INSERT INTO `sys_menu` VALUES (177, 164, '分割布局', '/extension/split-layout', '/extension/split-layout', 0, 13, NULL, NULL, 0, NULL, 1, 2, '2021-10-10 16:21:45', '2022-07-20 17:27:23'); +INSERT INTO `sys_menu` VALUES (178, 164, '视频播放', '/extension/player', '/extension/player', 0, 14, NULL, 'youtube-outlined', 0, NULL, 0, 2, '2021-02-02 20:13:49', '2022-07-20 17:27:24'); +INSERT INTO `sys_menu` VALUES (179, 164, '地图组件', '/extension/map', '/extension/map', 0, 15, NULL, 'environment-outlined', 0, NULL, 0, 2, '2021-02-02 20:11:49', '2022-07-20 17:27:28'); +INSERT INTO `sys_menu` VALUES (180, 164, '二维码', '/extension/qr-code', '/extension/qr-code', 0, 16, NULL, 'qrcode-outlined', 0, NULL, 0, 2, '2021-10-05 11:29:56', '2022-07-20 17:27:29'); +INSERT INTO `sys_menu` VALUES (181, 164, '条形码', '/extension/bar-code', '/extension/bar-code', 0, 17, NULL, 'barcode-outlined', 0, NULL, 0, 2, '2021-10-05 11:29:56', '2022-07-20 17:34:50'); +INSERT INTO `sys_menu` VALUES (182, 164, '富文本框', '/extension/editor', '/extension/editor', 0, 18, NULL, 'font-size-outlined', 0, NULL, 0, 2, '2021-02-02 20:13:57', '2022-07-20 17:27:31'); +INSERT INTO `sys_menu` VALUES (183, 164, 'markdown', '/extension/markdown', '/extension/markdown', 0, 19, NULL, 'picLeft-outlined', 0, NULL, 0, 2, '2021-10-10 16:21:45', '2022-07-20 17:27:32'); +INSERT INTO `sys_menu` VALUES (184, 164, '仪表盘', '/extension/dashboard', '/extension/dashboard', 0, 20, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-10-05 11:14:28', '2023-04-17 18:00:25'); +INSERT INTO `sys_menu` VALUES (185, 164, '引导组件', '/extension/tour', '/extension/tour', 0, 21, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-10-05 11:18:35', '2023-04-17 18:00:26'); +INSERT INTO `sys_menu` VALUES (186, 164, '水印组件', '/extension/watermark', '/extension/watermark', 0, 22, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-02-02 20:10:55', '2023-04-17 18:00:27'); +INSERT INTO `sys_menu` VALUES (187, 164, '分割面板', '/extension/split', '/extension/split', 0, 23, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-02-02 20:10:55', '2023-04-17 18:00:37'); +INSERT INTO `sys_menu` VALUES (188, 0, '常用实例', '/example', NULL, 0, 8, NULL, 'compass-outlined', 0, NULL, 0, 2, '2021-02-02 20:15:01', '2021-11-05 17:39:02'); +INSERT INTO `sys_menu` VALUES (189, 188, '表格实例', '/example/table', '/example/table', 0, 1, NULL, 'table-outlined', 0, NULL, 0, 2, '2021-10-06 22:26:55', '2022-03-11 21:32:10'); +INSERT INTO `sys_menu` VALUES (190, 188, '菜单徽章', '/example/menu-badge', '/example/menu-badge', 0, 5, NULL, 'appstore-outlined', 0, NULL, 0, 2, '2021-02-02 20:05:26', '2022-07-20 21:36:51'); +INSERT INTO `sys_menu` VALUES (191, 188, '内嵌页面', '/example/eleadmin', 'https://www.eleadmin.com', 0, 2, NULL, 'link-outlined', 0, NULL, 0, 2, '2021-05-21 11:11:57', '2022-07-20 21:36:45'); +INSERT INTO `sys_menu` VALUES (192, 188, '内嵌文档', '/example/eleadmin-doc', 'https://www.eleadmin.com/doc/eleadminpro/', 0, 3, NULL, 'link-outlined', 0, NULL, 0, 2, '2021-05-21 11:11:57', '2023-05-11 10:51:05'); +INSERT INTO `sys_menu` VALUES (193, 188, '批量选择', '/example/choose', '/example/choose', 0, 4, NULL, 'check-square-outlined', 0, NULL, 0, 2, '2021-02-02 20:15:11', '2022-07-20 21:36:40'); +INSERT INTO `sys_menu` VALUES (194, 188, '案卷调整', '/example/document', '/example/document', 0, 6, NULL, 'interaction-outlined', 0, NULL, 0, 2, '2021-02-02 20:15:03', '2022-07-20 17:26:57'); +INSERT INTO `sys_menu` VALUES (195, 188, '预留1', NULL, NULL, 0, 7, NULL, NULL, 0, NULL, 1, 2, '2021-10-05 11:20:35', '2022-07-20 17:26:59'); +INSERT INTO `sys_menu` VALUES (196, 188, '预留2', NULL, NULL, 0, 8, NULL, NULL, 0, NULL, 1, 2, '2021-10-10 16:21:12', '2022-07-20 17:27:01'); +INSERT INTO `sys_menu` VALUES (197, 188, '预留3', NULL, NULL, 0, 9, NULL, NULL, 0, NULL, 1, 2, '2021-10-10 16:21:12', '2022-07-20 17:27:02'); +INSERT INTO `sys_menu` VALUES (198, 188, '预留4', NULL, NULL, 0, 10, NULL, NULL, 0, NULL, 1, 2, '2021-10-10 16:21:12', '2022-07-20 17:27:03'); +INSERT INTO `sys_menu` VALUES (199, 0, '获取授权', 'https://eleadmin.com/goods/9', NULL, 0, 9, NULL, 'sketch-outlined', 0, '{\"modal\": true}', 0, 2, '2021-02-02 20:15:18', '2024-01-15 16:53:20'); +INSERT INTO `sys_menu` VALUES (201, 0, '系统管理', 'javascript:;', NULL, 0, 1, NULL, 'layui-icon layui-icon-set', 0, NULL, 0, 3, '2020-02-26 12:51:23', '2022-03-11 13:11:06'); +INSERT INTO `sys_menu` VALUES (202, 201, '用户管理', '#/system/user', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2020-02-26 12:51:55', '2022-03-11 13:12:19'); +INSERT INTO `sys_menu` VALUES (203, 202, '查询用户', NULL, NULL, 1, 1, 'sys:user:list', NULL, 0, NULL, 0, 3, '2020-02-26 12:52:06', '2022-03-11 13:12:24'); +INSERT INTO `sys_menu` VALUES (204, 202, '添加用户', NULL, NULL, 1, 2, 'sys:user:save', NULL, 0, NULL, 0, 3, '2020-02-26 12:52:26', '2022-03-11 13:12:25'); +INSERT INTO `sys_menu` VALUES (205, 202, '修改用户', NULL, NULL, 1, 3, 'sys:user:update', NULL, 0, NULL, 0, 3, '2020-02-26 12:52:50', '2022-03-11 13:12:26'); +INSERT INTO `sys_menu` VALUES (206, 202, '删除用户', NULL, NULL, 1, 4, 'sys:user:remove', NULL, 0, NULL, 0, 3, '2020-02-26 12:53:13', '2022-03-11 13:12:26'); +INSERT INTO `sys_menu` VALUES (207, 201, '角色管理', '#/system/role', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2020-03-13 13:29:08', '2022-03-11 13:13:39'); +INSERT INTO `sys_menu` VALUES (208, 207, '查询角色', NULL, NULL, 1, 1, 'sys:role:list', NULL, 0, NULL, 0, 3, '2020-03-13 13:30:41', '2022-03-11 13:12:53'); +INSERT INTO `sys_menu` VALUES (209, 207, '添加角色', NULL, NULL, 1, 2, 'sys:role:save', NULL, 0, NULL, 0, 3, '2020-03-15 13:02:07', '2022-03-11 13:12:54'); +INSERT INTO `sys_menu` VALUES (210, 207, '修改角色', NULL, NULL, 1, 3, 'sys:role:update', NULL, 0, NULL, 0, 3, '2020-03-15 13:02:49', '2022-03-11 13:12:55'); +INSERT INTO `sys_menu` VALUES (211, 207, '删除角色', NULL, NULL, 1, 4, 'sys:role:remove', NULL, 0, NULL, 0, 3, '2020-03-20 17:58:51', '2022-03-11 13:12:55'); +INSERT INTO `sys_menu` VALUES (212, 201, '菜单管理', '#/system/authorities', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2020-03-21 01:07:13', '2022-03-11 13:13:40'); +INSERT INTO `sys_menu` VALUES (213, 212, '查询菜单', NULL, NULL, 1, 1, 'sys:menu:list', NULL, 0, NULL, 0, 3, '2020-03-21 16:43:30', '2022-03-11 13:12:57'); +INSERT INTO `sys_menu` VALUES (214, 212, '添加菜单', NULL, NULL, 1, 2, 'sys:menu:save', NULL, 0, NULL, 0, 3, '2020-03-21 16:43:54', '2022-03-11 13:12:58'); +INSERT INTO `sys_menu` VALUES (215, 212, '修改菜单', NULL, NULL, 1, 3, 'sys:menu:update', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:17', '2022-03-11 13:12:58'); +INSERT INTO `sys_menu` VALUES (216, 212, '删除菜单', NULL, NULL, 1, 4, 'sys:menu:remove', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:18', '2022-03-11 13:12:59'); +INSERT INTO `sys_menu` VALUES (217, 201, '机构管理', '#/system/organization', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2020-03-21 18:24:20', '2022-03-11 13:13:42'); +INSERT INTO `sys_menu` VALUES (218, 217, '查询机构', NULL, NULL, 1, 1, 'sys:org:list', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:21', '2022-03-11 13:13:01'); +INSERT INTO `sys_menu` VALUES (219, 217, '添加机构', NULL, NULL, 1, 2, 'sys:org:save', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:22', '2022-03-11 13:13:02'); +INSERT INTO `sys_menu` VALUES (220, 217, '修改机构', NULL, NULL, 1, 3, 'sys:org:update', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:24', '2022-03-11 13:13:02'); +INSERT INTO `sys_menu` VALUES (221, 217, '删除机构', NULL, NULL, 1, 4, 'sys:org:remove', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:25', '2022-03-11 13:13:03'); +INSERT INTO `sys_menu` VALUES (222, 201, '字典管理', '#/system/dictionary', NULL, 0, 5, NULL, NULL, 0, NULL, 0, 3, '2020-03-21 18:24:26', '2022-03-11 13:13:43'); +INSERT INTO `sys_menu` VALUES (223, 222, '查询字典', NULL, NULL, 1, 1, 'sys:dict:list', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:27', '2022-03-11 13:13:05'); +INSERT INTO `sys_menu` VALUES (224, 222, '添加字典', NULL, NULL, 1, 2, 'sys:dict:save', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:28', '2022-03-11 13:13:05'); +INSERT INTO `sys_menu` VALUES (225, 222, '修改字典', NULL, NULL, 1, 3, 'sys:dict:update', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:29', '2022-03-11 13:13:06'); +INSERT INTO `sys_menu` VALUES (226, 222, '删除字典', NULL, NULL, 1, 4, 'sys:dict:remove', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:31', '2022-03-11 13:13:07'); +INSERT INTO `sys_menu` VALUES (227, 201, '登录日志', '#/system/login-record', NULL, 0, 7, 'sys:login-record:list', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:33', '2022-07-29 14:35:58'); +INSERT INTO `sys_menu` VALUES (228, 201, '操作日志', '#/system/oper-record', NULL, 0, 8, 'sys:operation-record:list', NULL, 0, NULL, 0, 3, '2020-03-21 18:24:34', '2022-07-29 14:36:00'); +INSERT INTO `sys_menu` VALUES (229, 201, '上传文件', NULL, NULL, 1, 9, 'sys:file:upload', NULL, 0, NULL, 0, 3, '2020-09-17 23:21:04', '2022-07-20 22:14:23'); +INSERT INTO `sys_menu` VALUES (230, 201, '修改个人密码', NULL, NULL, 1, 10, 'sys:auth:password', NULL, 0, NULL, 0, 3, '2020-09-17 23:22:45', '2022-03-11 13:12:40'); +INSERT INTO `sys_menu` VALUES (231, 201, '修改个人资料', NULL, NULL, 1, 11, 'sys:auth:user', NULL, 0, NULL, 0, 3, '2020-09-17 23:23:24', '2022-03-11 13:12:41'); +INSERT INTO `sys_menu` VALUES (232, 0, 'Dashboard', 'javascript:;', NULL, 0, 0, NULL, 'layui-icon layui-icon-home', 0, NULL, 0, 3, '2021-02-02 20:00:34', '2022-03-11 13:11:23'); +INSERT INTO `sys_menu` VALUES (233, 232, '工作台', '#/console/workplace', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:00:37', '2022-03-11 13:16:13'); +INSERT INTO `sys_menu` VALUES (234, 232, '控制台', '#/console/console', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:00:40', '2022-03-11 13:16:14'); +INSERT INTO `sys_menu` VALUES (235, 232, '分析页', '#/console/dashboard', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:03:12', '2022-03-11 13:16:15'); +INSERT INTO `sys_menu` VALUES (236, 0, '模板页面', 'javascript:;', NULL, 0, 2, NULL, 'layui-icon layui-icon-template', 0, NULL, 0, 3, '2021-02-02 20:03:12', '2022-03-11 13:19:11'); +INSERT INTO `sys_menu` VALUES (237, 236, '表单页', 'javascript:;', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:03:28', '2022-03-11 13:19:17'); +INSERT INTO `sys_menu` VALUES (238, 237, '基础表单', '#/template/form/form-basic', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:03:51', '2022-03-11 13:19:34'); +INSERT INTO `sys_menu` VALUES (239, 237, '复杂表单', '#/template/form/form-advance', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:03:56', '2022-03-11 13:19:34'); +INSERT INTO `sys_menu` VALUES (240, 237, '分步表单', '#/template/form/form-step', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:04:06', '2022-03-11 13:19:35'); +INSERT INTO `sys_menu` VALUES (241, 236, '表格页', 'javascript:;', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:05:07', '2022-03-11 13:19:19'); +INSERT INTO `sys_menu` VALUES (242, 241, '数据表格', '#/template/table/table-basic', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:05:10', '2022-03-11 13:19:37'); +INSERT INTO `sys_menu` VALUES (243, 241, '复杂表格', '#/template/table/table-advance', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:05:26', '2022-03-11 13:19:38'); +INSERT INTO `sys_menu` VALUES (244, 241, '图片表格', '#/template/table/table-img', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:05:30', '2022-03-11 13:19:38'); +INSERT INTO `sys_menu` VALUES (245, 241, '卡片列表', '#/template/table/table-card', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:06:35', '2022-03-11 13:19:39'); +INSERT INTO `sys_menu` VALUES (246, 236, '错误页', 'javascript:;', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:08:44', '2022-03-11 13:19:20'); +INSERT INTO `sys_menu` VALUES (247, 246, '500', '#/template/error/error-500', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:08:47', '2022-03-11 13:19:41'); +INSERT INTO `sys_menu` VALUES (248, 246, '404', '#/template/error/error-404', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:08:49', '2022-03-11 13:19:42'); +INSERT INTO `sys_menu` VALUES (249, 246, '403', '#/template/error/error-403', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:08:52', '2022-03-11 13:19:42'); +INSERT INTO `sys_menu` VALUES (250, 236, '登录页', 'javascript:;', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:09:54', '2022-03-11 13:19:25'); +INSERT INTO `sys_menu` VALUES (251, 250, '登录页', 'login.html', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:09:58', '2022-03-11 13:26:56'); +INSERT INTO `sys_menu` VALUES (252, 250, '注册页', 'components/template/login/reg.html', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:10:03', '2022-03-11 13:26:54'); +INSERT INTO `sys_menu` VALUES (253, 250, '忘记密码', 'components/template/login/forget.html', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:06:39', '2022-03-11 13:26:52'); +INSERT INTO `sys_menu` VALUES (254, 236, '个人中心', '#/template/user-info', NULL, 0, 5, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:06:48', '2022-03-11 13:19:27'); +INSERT INTO `sys_menu` VALUES (255, 0, '扩展组件', 'javascript:;', NULL, 0, 3, NULL, 'layui-icon layui-icon-component', 0, NULL, 0, 3, '2021-02-02 20:10:52', '2022-03-11 13:20:43'); +INSERT INTO `sys_menu` VALUES (256, 255, '常用组件', 'javascript:;', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:10:55', '2022-03-11 13:20:49'); +INSERT INTO `sys_menu` VALUES (257, 256, '弹窗扩展', '#/plugin/basic/dialog', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:10:58', '2022-03-11 13:24:20'); +INSERT INTO `sys_menu` VALUES (258, 256, '下拉菜单', '#/plugin/basic/dropdown', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:11:00', '2022-07-29 14:38:27'); +INSERT INTO `sys_menu` VALUES (259, 256, '消息通知', '#/plugin/basic/notice', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:11:03', '2022-07-29 14:38:29'); +INSERT INTO `sys_menu` VALUES (260, 256, '标签输入', '#/plugin/basic/tagsInput', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:11:48', '2022-07-29 14:38:30'); +INSERT INTO `sys_menu` VALUES (261, 256, '级联选择', '#/plugin/basic/cascader', NULL, 0, 5, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:11:49', '2022-07-29 14:38:32'); +INSERT INTO `sys_menu` VALUES (262, 256, '步骤条', '#/plugin/basic/steps', NULL, 0, 6, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:13:49', '2022-07-29 14:38:34'); +INSERT INTO `sys_menu` VALUES (263, 255, '进阶组件', 'javascript:;', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:13:57', '2022-03-11 13:24:29'); +INSERT INTO `sys_menu` VALUES (264, 263, '打印插件', '#/plugin/advance/printer', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:25:15', '2022-03-11 13:28:43'); +INSERT INTO `sys_menu` VALUES (265, 263, '分割面板', '#/plugin/advance/split', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:32:12', '2022-03-11 13:28:44'); +INSERT INTO `sys_menu` VALUES (266, 263, '表单扩展', '#/plugin/advance/formX', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:15:01', '2022-03-11 13:24:33'); +INSERT INTO `sys_menu` VALUES (267, 263, '表格扩展', '#/plugin/advance/tableX', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2021-10-06 22:26:55', '2022-03-11 13:28:45'); +INSERT INTO `sys_menu` VALUES (268, 263, '数据列表', '#/plugin/advance/dataGrid', NULL, 0, 5, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:15:03', '2022-03-11 13:24:36'); +INSERT INTO `sys_menu` VALUES (269, 263, '鼠标右键', '#/plugin/advance/contextMenu', NULL, 0, 6, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:15:11', '2022-03-11 13:24:37'); +INSERT INTO `sys_menu` VALUES (270, 255, '其他组件', 'javascript:;', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-05-21 11:11:57', '2022-03-11 13:24:44'); +INSERT INTO `sys_menu` VALUES (271, 270, '圆形进度条', '#/plugin/other/circleProgress', '', 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-02-02 20:15:18', '2022-03-11 13:24:45'); +INSERT INTO `sys_menu` VALUES (272, 270, '富文本编辑', '#/plugin/other/editor', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:14:28', '2022-03-11 13:28:47'); +INSERT INTO `sys_menu` VALUES (273, 270, '鼠标滚轮', '#/plugin/other/mousewheel', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:16:39', '2022-03-11 13:28:51'); +INSERT INTO `sys_menu` VALUES (274, 270, '更多组件', '#/plugin/other/other', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:18:35', '2022-03-11 13:28:53'); +INSERT INTO `sys_menu` VALUES (275, 255, '更多扩展', '#/plugin/more', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:20:35', '2022-03-11 13:28:54'); +INSERT INTO `sys_menu` VALUES (276, 0, '经典实例', 'javascript:;', NULL, 0, 4, NULL, 'layui-icon layui-icon-app', 0, NULL, 0, 3, '2021-10-05 11:13:35', '2022-03-11 13:28:56'); +INSERT INTO `sys_menu` VALUES (277, 276, '弹窗实例', '#/example/dialog', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:29:03', '2022-03-11 13:28:57'); +INSERT INTO `sys_menu` VALUES (278, 276, '课程管理', '#/example/course', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:29:56', '2022-03-11 13:28:59'); +INSERT INTO `sys_menu` VALUES (279, 276, '排课管理', '#/example/calendar', NULL, 0, 3, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:12', '2022-03-11 13:29:01'); +INSERT INTO `sys_menu` VALUES (280, 276, '添加试题', '#/example/question', NULL, 0, 4, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 13:29:02'); +INSERT INTO `sys_menu` VALUES (281, 276, '文件管理', '#/example/file', NULL, 0, 5, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 13:29:04'); +INSERT INTO `sys_menu` VALUES (282, 276, '表格CRUD', '#/example/table-crud', NULL, 0, 6, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 13:29:06'); +INSERT INTO `sys_menu` VALUES (283, 276, '路由传参', '#/example/router-demo', NULL, 0, 7, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 13:29:07'); +INSERT INTO `sys_menu` VALUES (284, 276, '多系统模式', 'side-more.html', NULL, 0, 8, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 13:29:09'); +INSERT INTO `sys_menu` VALUES (285, 0, 'LayUI组件', 'javascript:;', NULL, 0, 5, NULL, 'layui-icon layui-icon-release', 0, NULL, 0, 3, '2021-10-05 11:13:35', '2022-03-11 13:29:11'); +INSERT INTO `sys_menu` VALUES (286, 285, '组件演示', '#/plugin/other/layui', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:29:03', '2022-03-11 13:29:12'); +INSERT INTO `sys_menu` VALUES (287, 285, '开发文档', '#/layui/doc', 'https://eleadmin.com/doc/spa/', 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-10-05 11:29:56', '2022-08-01 23:44:18'); +INSERT INTO `sys_menu` VALUES (288, 0, '多级菜单', 'javascript:;', NULL, 0, 6, NULL, 'layui-icon layui-icon-unlink', 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 13:29:19'); +INSERT INTO `sys_menu` VALUES (289, 288, '二级菜单', 'javascript:;', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 14:07:48'); +INSERT INTO `sys_menu` VALUES (290, 289, '内嵌官网', '#/baidu', 'https://www.eleadmin.com', 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-08-01 23:44:34'); +INSERT INTO `sys_menu` VALUES (291, 289, '三级菜单', 'javascript:;', NULL, 0, 2, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-07-20 22:15:26'); +INSERT INTO `sys_menu` VALUES (292, 291, '四级菜单', 'javascript:;', NULL, 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-03-11 13:29:45'); +INSERT INTO `sys_menu` VALUES (293, 292, '五级菜单', '#/eleadmin-doc', 'https://eleadmin.com/goods/2', 0, 1, NULL, NULL, 0, NULL, 0, 3, '2021-10-10 16:21:45', '2022-08-01 23:45:16'); +INSERT INTO `sys_menu` VALUES (294, 0, '一级菜单', '#/eleadmin', 'https://eleadmin.com/goods/3', 0, 7, NULL, 'layui-icon layui-icon-unlink', 0, NULL, 0, 3, '2021-10-05 11:13:35', '2022-08-01 23:45:14'); +INSERT INTO `sys_menu` VALUES (295, 0, '路由传参', '#/example/router-param', NULL, 0, 8, NULL, NULL, 1, NULL, 0, 3, '2021-10-05 11:13:35', '2022-03-11 13:29:52'); +INSERT INTO `sys_menu` VALUES (301, 0, '系统管理', '/system', NULL, 0, 1, NULL, 'SettingOutlined', 0, '{\"props\": {\"badge\": {\"value\": \"New\", \"type\": \"warning\"}}, \"lang\": {\"zh_TW\": \"系統管理\", \"en\": \"System\"}}', 0, 4, '2020-02-26 12:51:23', '2024-02-25 13:59:21'); +INSERT INTO `sys_menu` VALUES (302, 301, '用户管理', '/system/user', '/system/user', 0, 1, NULL, 'UserOutlined', 0, '{\"lang\": {\"zh_TW\": \"用戶管理\", \"en\": \"User\"}}', 0, 4, '2020-02-26 12:51:55', '2024-02-25 13:59:26'); +INSERT INTO `sys_menu` VALUES (303, 302, '查询用户', NULL, NULL, 1, 1, 'sys:user:list', NULL, 0, NULL, 0, 4, '2020-02-26 12:52:06', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (304, 302, '添加用户', NULL, NULL, 1, 2, 'sys:user:save', NULL, 0, NULL, 0, 4, '2020-02-26 12:52:26', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (305, 302, '修改用户', NULL, NULL, 1, 3, 'sys:user:update', NULL, 0, NULL, 0, 4, '2020-02-26 12:52:50', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (306, 302, '删除用户', NULL, NULL, 1, 4, 'sys:user:remove', NULL, 0, NULL, 0, 4, '2020-02-26 12:53:13', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (307, 301, '角色管理', '/system/role', '/system/role', 0, 2, NULL, 'IdcardOutlined', 0, '{\"lang\": {\"zh_TW\": \"角色管理\", \"en\": \"Role\"}}', 0, 4, '2020-03-13 13:29:08', '2024-02-25 13:59:34'); +INSERT INTO `sys_menu` VALUES (308, 307, '查询角色', NULL, NULL, 1, 1, 'sys:role:list', NULL, 0, NULL, 0, 4, '2020-03-13 13:30:41', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (309, 307, '添加角色', NULL, NULL, 1, 2, 'sys:role:save', NULL, 0, NULL, 0, 4, '2020-03-15 13:02:07', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (310, 307, '修改角色', NULL, NULL, 1, 3, 'sys:role:update', NULL, 0, NULL, 0, 4, '2020-03-15 13:02:49', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (311, 307, '删除角色', NULL, NULL, 1, 4, 'sys:role:remove', NULL, 0, NULL, 0, 4, '2020-03-20 17:58:51', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (312, 301, '菜单管理', '/system/menu', '/system/menu', 0, 3, NULL, 'AppstoreOutlined', 0, '{\"lang\": {\"zh_TW\": \"選單管理\", \"en\": \"Menu\"}}', 0, 4, '2020-03-21 01:07:13', '2024-02-25 13:59:39'); +INSERT INTO `sys_menu` VALUES (313, 312, '查询菜单', NULL, NULL, 1, 1, 'sys:menu:list', NULL, 0, NULL, 0, 4, '2020-03-21 16:43:30', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (314, 312, '添加菜单', NULL, NULL, 1, 2, 'sys:menu:save', NULL, 0, NULL, 0, 4, '2020-03-21 16:43:54', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (315, 312, '修改菜单', NULL, NULL, 1, 3, 'sys:menu:update', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:17', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (316, 312, '删除菜单', NULL, NULL, 1, 4, 'sys:menu:remove', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:18', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (317, 301, '机构管理', '/system/organization', '/system/organization', 0, 4, NULL, 'CityOutlined', 0, '{\"hideFooter\":true, \"lang\": {\"zh_TW\": \"機构管理\", \"en\": \"Organization\"}}', 0, 4, '2020-03-21 18:24:20', '2024-02-25 13:59:40'); +INSERT INTO `sys_menu` VALUES (318, 317, '查询机构', NULL, NULL, 1, 1, 'sys:org:list', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:21', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (319, 317, '添加机构', NULL, NULL, 1, 2, 'sys:org:save', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:22', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (320, 317, '修改机构', NULL, NULL, 1, 3, 'sys:org:update', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:24', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (321, 317, '删除机构', NULL, NULL, 1, 4, 'sys:org:remove', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:25', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (322, 301, '字典管理', '/system/dictionary', '/system/dictionary', 0, 5, NULL, 'BookOutlined', 0, '{\"hideFooter\":true, \"lang\": {\"zh_TW\": \"字典管理\", \"en\": \"Dictionary\"}}', 0, 4, '2020-03-21 18:24:26', '2024-02-25 13:59:44'); +INSERT INTO `sys_menu` VALUES (323, 322, '查询字典', NULL, NULL, 1, 1, 'sys:dict:list', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:27', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (324, 322, '添加字典', NULL, NULL, 1, 2, 'sys:dict:save', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:28', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (325, 322, '修改字典', NULL, NULL, 1, 3, 'sys:dict:update', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:29', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (326, 322, '删除字典', NULL, NULL, 1, 4, 'sys:dict:remove', NULL, 0, NULL, 0, 4, '2020-03-21 18:24:31', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (327, 301, '登录日志', '/system/login-record', '/system/login-record', 0, 7, 'sys:login-record:list', 'CalendarOutlined', 0, '{\"lang\": {\"zh_TW\": \"登入日誌\", \"en\": \"LoginRecord\"}}', 0, 4, '2020-03-21 18:24:33', '2024-02-25 14:00:00'); +INSERT INTO `sys_menu` VALUES (328, 301, '操作日志', '/system/operation-record', '/system/operation-record', 0, 8, 'sys:operation-record:list', 'LogOutlined', 0, '{\"lang\": {\"zh_TW\": \"操作日誌\", \"en\": \"OperationRecord\"}}', 0, 4, '2020-03-21 18:24:34', '2024-02-25 14:00:05'); +INSERT INTO `sys_menu` VALUES (329, 301, '文件管理', '/system/file', '/system/file', 0, 6, NULL, 'FolderOutlined', 0, '{\"lang\": {\"zh_TW\": \"檔案管理\", \"en\": \"File\"}}', 0, 4, '2020-09-17 23:19:43', '2024-02-25 14:00:10'); +INSERT INTO `sys_menu` VALUES (330, 329, '上传文件', NULL, NULL, 1, 1, 'sys:file:upload', NULL, 0, NULL, 0, 4, '2020-09-17 23:21:04', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (331, 329, '删除文件', NULL, NULL, 1, 2, 'sys:file:remove', NULL, 0, NULL, 0, 4, '2020-09-17 23:21:53', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (332, 329, '查看记录', NULL, NULL, 1, 3, 'sys:file:list', NULL, 0, NULL, 0, 4, '2020-09-17 23:20:29', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (333, 302, '用户详情', '/system/user/details/:id', '/system/user/details', 0, 5, NULL, 'UserOutlined', 1, '{\"active\": \"/system/user\", \"lang\": {\"zh_TW\": \"用戶詳情\", \"en\": \"UserDetails\"}}', 0, 4, '2021-05-21 11:07:54', '2024-02-25 14:00:16'); +INSERT INTO `sys_menu` VALUES (334, 301, '修改个人密码', NULL, NULL, 1, 10, 'sys:auth:password', NULL, 0, NULL, 0, 4, '2020-09-17 23:22:45', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (335, 301, '修改个人资料', NULL, NULL, 1, 11, 'sys:auth:user', NULL, 0, NULL, 0, 4, '2020-09-17 23:23:24', '2023-05-24 11:59:06'); +INSERT INTO `sys_menu` VALUES (336, 0, 'Dashboard', '/dashboard', NULL, 0, 0, NULL, 'HomeOutlined', 0, NULL, 0, 4, '2021-02-02 20:00:34', '2024-02-25 14:00:21'); +INSERT INTO `sys_menu` VALUES (337, 336, '工作台', '/dashboard/workplace', '/dashboard/workplace', 0, 1, NULL, 'DesktopOutlined', 0, '{\"lang\": {\"zh_TW\": \"工作臺\", \"en\": \"Workplace\"}}', 0, 4, '2021-02-02 20:00:37', '2024-02-25 14:00:26'); +INSERT INTO `sys_menu` VALUES (338, 336, '分析页', '/dashboard/analysis', '/dashboard/analysis', 0, 2, NULL, 'AnalysisOutlined', 0, '{\"props\": {\"badge\": {\"value\": 1}}, \"lang\": {\"zh_TW\": \"分析頁\", \"en\": \"Analysis\"}}', 0, 4, '2021-02-02 20:00:40', '2024-02-25 14:00:30'); +INSERT INTO `sys_menu` VALUES (339, 336, '监控页', '/dashboard/monitor', '/dashboard/monitor', 0, 3, NULL, 'DashboardOutlined', 0, '{\"lang\": {\"zh_TW\": \"監控頁\", \"en\": \"Monitor\"}}', 0, 4, '2021-02-02 20:03:12', '2024-02-25 14:00:36'); +INSERT INTO `sys_menu` VALUES (340, 0, '表单页面', '/form', NULL, 0, 2, NULL, 'FormOutlined', 0, '{\"lang\": {\"zh_TW\": \"表單頁面\", \"en\": \"Form\"}}', 0, 4, '2021-02-02 20:03:28', '2024-02-25 14:00:40'); +INSERT INTO `sys_menu` VALUES (341, 340, '基础表单', '/form/basic', '/form/basic', 0, 1, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"基礎表單\", \"en\": \"Basic Form\"}}', 0, 4, '2021-02-02 20:03:51', '2024-02-25 14:00:43'); +INSERT INTO `sys_menu` VALUES (342, 340, '复杂表单', '/form/advanced', '/form/advanced', 0, 2, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"複雜表單\", \"en\": \"Advanced Form\"}}', 0, 4, '2021-02-02 20:03:56', '2024-02-25 14:00:44'); +INSERT INTO `sys_menu` VALUES (343, 340, '分步表单', '/form/step', '/form/step', 0, 3, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"分步表單\", \"en\": \"Step Form\"}}', 0, 4, '2021-02-02 20:04:06', '2024-02-25 14:00:44'); +INSERT INTO `sys_menu` VALUES (344, 0, '列表页面', '/list', NULL, 0, 3, NULL, 'TableOutlined', 0, '{\"props\": {\"hideTimeout\": 450}, \"lang\": {\"zh_TW\": \"清單頁面\", \"en\": \"List\"}}', 0, 4, '2021-02-02 20:05:07', '2024-02-25 14:03:16'); +INSERT INTO `sys_menu` VALUES (345, 344, '基础列表', '/list/basic', '/list/basic', 0, 1, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"基礎清單\", \"en\": \"Basic List\"}}', 0, 4, '2021-02-02 20:05:10', '2024-02-25 14:00:45'); +INSERT INTO `sys_menu` VALUES (346, 344, '复杂列表', '/list/advanced', '/list/advanced', 0, 2, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"複雜清單\", \"en\": \"Advanced List\"}}', 0, 4, '2021-02-02 20:05:26', '2024-02-25 14:00:46'); +INSERT INTO `sys_menu` VALUES (347, 344, '卡片列表', '/list/card', '/list/card', 0, 3, NULL, 'LinkOutlined', 0, '{\"props\": {\"hideTimeout\": 100}, \"lang\": {\"zh_TW\": \"卡片清單\", \"en\": \"Card List\"}}', 0, 4, '2021-02-02 20:05:30', '2024-02-25 14:00:47'); +INSERT INTO `sys_menu` VALUES (348, 347, '项目列表', '/list/card/project', '/list/card/project', 0, 1, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"項目清單\", \"en\": \"Project\"}}', 0, 4, '2021-02-02 20:06:35', '2024-02-25 14:00:48'); +INSERT INTO `sys_menu` VALUES (349, 347, '应用列表', '/list/card/application', '/list/card/application', 0, 2, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"應用清單\", \"en\": \"Application\"}}', 0, 4, '2021-02-02 20:06:39', '2024-02-25 14:00:51'); +INSERT INTO `sys_menu` VALUES (350, 347, '文章列表', '/list/card/article', '/list/card/article', 0, 3, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"文章清單\", \"en\": \"Article\"}}', 0, 4, '2021-02-02 20:06:48', '2024-02-25 14:00:52'); +INSERT INTO `sys_menu` VALUES (351, 345, '添加用户', '/list/basic/add', '/list/basic/add', 0, 4, NULL, 'LinkOutlined', 1, '{\"active\": \"/list/basic\", \"lang\": {\"zh_TW\": \"添加用戶\", \"en\": \"Add User\"}}', 0, 4, '2021-02-02 20:05:26', '2024-02-25 14:00:52'); +INSERT INTO `sys_menu` VALUES (352, 345, '修改用户', '/list/basic/edit/:id', '/list/basic/edit', 0, 4, NULL, 'LinkOutlined', 1, '{\"active\": \"/list/basic\", \"lang\": {\"zh_TW\": \"編輯用戶\", \"en\": \"Edit User\"}}', 0, 4, '2021-02-02 20:05:26', '2024-02-25 14:00:53'); +INSERT INTO `sys_menu` VALUES (353, 340, '表单构建', '/form/build', '/form/build', 0, 4, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"表單構建\", \"en\": \"Form Build\"}}', 0, 4, '2021-02-02 20:05:26', '2024-02-25 14:57:33'); +INSERT INTO `sys_menu` VALUES (354, 0, '结果页面', '/result', NULL, 0, 4, NULL, 'CheckCircleOutlined', 0, '{\"lang\": {\"zh_TW\": \"結果頁面\", \"en\": \"Result\"}}', 0, 4, '2021-02-02 20:07:33', '2024-02-25 14:02:32'); +INSERT INTO `sys_menu` VALUES (355, 354, '成功页', '/result/success', '/result/success', 0, 1, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"成功頁\", \"en\": \"Success\"}}', 0, 4, '2021-02-02 20:07:40', '2024-02-25 14:00:55'); +INSERT INTO `sys_menu` VALUES (356, 354, '失败页', '/result/fail', '/result/fail', 0, 2, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"失敗頁\", \"en\": \"Fail\"}}', 0, 4, '2021-02-02 20:07:41', '2024-02-25 14:00:56'); +INSERT INTO `sys_menu` VALUES (357, 0, '异常页面', '/exception', NULL, 0, 5, NULL, 'WarningOutlined', 0, '{\"lang\": {\"zh_TW\": \"异常頁面\", \"en\": \"Exception\"}}', 0, 4, '2021-02-02 20:08:44', '2024-02-25 14:03:57'); +INSERT INTO `sys_menu` VALUES (358, 357, '403', '/exception/403', '/exception/403', 0, 1, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:08:47', '2024-02-25 14:00:57'); +INSERT INTO `sys_menu` VALUES (359, 357, '404', '/exception/404', '/exception/404', 0, 2, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:08:49', '2024-02-25 14:00:58'); +INSERT INTO `sys_menu` VALUES (360, 357, '500', '/exception/500', '/exception/500', 0, 3, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:08:52', '2024-02-25 14:00:59'); +INSERT INTO `sys_menu` VALUES (361, 0, '个人中心', '/user', NULL, 0, 6, NULL, 'ControlOutlined', 0, '{\"lang\": {\"zh_TW\": \"個人中心\", \"en\": \"User\"}}', 0, 4, '2021-02-02 20:09:54', '2024-02-25 14:02:19'); +INSERT INTO `sys_menu` VALUES (362, 361, '我的资料', '/user/profile', '/user/profile', 0, 1, NULL, 'UserOutlined', 0, '{\"lang\": {\"zh_TW\": \"個人資料\", \"en\": \"Profile\"}}', 0, 4, '2021-02-02 20:09:58', '2024-02-25 14:02:18'); +INSERT INTO `sys_menu` VALUES (363, 361, '我的消息', '/user/message', '/user/message', 0, 2, NULL, 'MessageOutlined', 0, '{\"lang\": {\"zh_TW\": \"我的消息\", \"en\": \"Message\"}}', 0, 4, '2021-02-02 20:10:03', '2024-02-25 14:02:07'); +INSERT INTO `sys_menu` VALUES (364, 0, '扩展组件', '/extension', NULL, 0, 7, NULL, 'AppstoreAddOutlined', 0, NULL, 0, 4, '2021-02-02 20:10:52', '2024-02-25 14:04:19'); +INSERT INTO `sys_menu` VALUES (365, 364, '标签输入', '/extension/tag', '/extension/tag', 0, 3, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:13:35', '2024-02-25 14:01:02'); +INSERT INTO `sys_menu` VALUES (366, 364, '高级弹窗', '/extension/modal', '/extension/modal', 0, 4, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:32:12', '2024-02-25 14:01:03'); +INSERT INTO `sys_menu` VALUES (367, 364, '文件列表', '/extension/file', '/extension/file', 0, 5, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:10:58', '2024-02-25 14:01:04'); +INSERT INTO `sys_menu` VALUES (368, 364, '图片上传', '/extension/upload', '/extension/upload', 0, 6, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:10:58', '2024-02-25 14:01:04'); +INSERT INTO `sys_menu` VALUES (369, 364, '拖拽排序', '/extension/dragsort', '/extension/dragsort', 0, 24, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:11:48', '2024-02-25 14:01:05'); +INSERT INTO `sys_menu` VALUES (370, 364, '消息提示', '/extension/message', '/extension/message', 0, 1, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:16:39', '2024-02-25 14:01:06'); +INSERT INTO `sys_menu` VALUES (371, 364, '城市选择', '/extension/regions', '/extension/regions', 0, 26, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:25:15', '2024-02-25 14:01:06'); +INSERT INTO `sys_menu` VALUES (372, 364, '打印组件', '/extension/printer', '/extension/printer', 0, 11, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:11:00', '2024-02-25 14:01:07'); +INSERT INTO `sys_menu` VALUES (373, 364, '导入导出', '/extension/excel', '/extension/excel', 0, 27, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:11:03', '2024-02-25 14:01:08'); +INSERT INTO `sys_menu` VALUES (374, 364, '下拉树', '/extension/tree-select', '/extension/tree-select', 0, 18, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:29:03', '2024-02-25 14:01:09'); +INSERT INTO `sys_menu` VALUES (375, 364, '可选卡片', '/extension/check-card', '/extension/check-card', 0, 21, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-10 16:21:45', '2024-02-25 14:01:11'); +INSERT INTO `sys_menu` VALUES (376, 364, '下拉表格', '/extension/table-select', '/extension/table-select', 0, 10, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-10 16:21:45', '2024-02-25 14:01:30'); +INSERT INTO `sys_menu` VALUES (377, 364, '分割面板', '/extension/split', '/extension/split', 0, 7, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-10 16:21:45', '2024-02-25 14:01:31'); +INSERT INTO `sys_menu` VALUES (378, 364, '视频播放', '/extension/player', '/extension/player', 0, 28, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:13:49', '2024-02-25 14:01:31'); +INSERT INTO `sys_menu` VALUES (379, 364, '地图组件', '/extension/map', '/extension/map', 0, 25, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:11:49', '2024-02-25 14:01:28'); +INSERT INTO `sys_menu` VALUES (380, 364, '二维码', '/extension/qr-code', '/extension/qr-code', 0, 20, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:29:56', '2024-02-25 14:01:27'); +INSERT INTO `sys_menu` VALUES (381, 364, '条形码', '/extension/bar-code', '/extension/bar-code', 0, 19, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:29:56', '2024-02-25 14:01:26'); +INSERT INTO `sys_menu` VALUES (382, 364, '富文本框', '/extension/editor', '/extension/editor', 0, 29, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:13:57', '2024-02-25 14:01:26'); +INSERT INTO `sys_menu` VALUES (383, 364, 'markdown', '/extension/markdown', '/extension/markdown', 0, 30, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-10 16:21:45', '2024-02-25 14:01:25'); +INSERT INTO `sys_menu` VALUES (384, 364, '头像组合', '/extension/avatar', '/extension/avatar', 0, 2, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:14:28', '2024-02-25 14:01:24'); +INSERT INTO `sys_menu` VALUES (385, 364, '图标选择', '/extension/icon', '/extension/icon', 0, 8, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-05 11:18:35', '2024-02-25 14:01:23'); +INSERT INTO `sys_menu` VALUES (386, 364, '文本组件', '/extension/text', '/extension/text', 0, 12, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:10:55', '2024-02-25 14:01:22'); +INSERT INTO `sys_menu` VALUES (387, 364, '高级表格', '/extension/table', '/extension/table', 0, 9, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:10:55', '2024-02-25 14:01:21'); +INSERT INTO `sys_menu` VALUES (388, 364, '状态文本', '/extension/circle-wave', '/extension/circle-wave', 0, 31, NULL, 'LinkOutlined', 0, NULL, 1, 4, '2021-02-02 20:15:01', '2024-02-25 14:01:21'); +INSERT INTO `sys_menu` VALUES (389, 364, '标签页', '/extension/tabs', '/extension/tabs', 0, 16, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-10-06 22:26:55', '2024-02-25 14:01:20'); +INSERT INTO `sys_menu` VALUES (390, 364, '步骤条', '/extension/steps', '/extension/steps', 0, 15, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:05:26', '2024-02-25 14:01:19'); +INSERT INTO `sys_menu` VALUES (391, 364, '导航菜单', '/extension/menu', '/extension/menu', 0, 14, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-05-21 11:11:57', '2024-02-25 14:01:18'); +INSERT INTO `sys_menu` VALUES (392, 364, '水印组件', '/extension/watermark', '/extension/watermark', 0, 22, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-05-21 11:11:57', '2024-02-25 14:01:17'); +INSERT INTO `sys_menu` VALUES (393, 364, '引导组件', '/extension/tour', '/extension/tour', 0, 13, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:15:11', '2024-02-25 14:01:17'); +INSERT INTO `sys_menu` VALUES (394, 364, '分段器', '/extension/segmented', '/extension/segmented', 0, 17, NULL, 'LinkOutlined', 0, NULL, 0, 4, '2021-02-02 20:15:03', '2024-02-25 14:01:16'); +INSERT INTO `sys_menu` VALUES (395, 0, '内嵌页面', '/iframe', NULL, 0, 8, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"內嵌頁面\", \"en\": \"IFrame\"}}', 0, 4, '2021-10-05 11:20:35', '2024-02-25 14:01:15'); +INSERT INTO `sys_menu` VALUES (396, 395, '官网', '/iframe/eleadmin', 'https://www.eleadmin.com', 0, 1, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"官網\", \"en\": \"Website\"}}', 0, 4, '2021-10-10 16:21:12', '2024-02-25 14:01:14'); +INSERT INTO `sys_menu` VALUES (397, 395, '文档', '/iframe/eleadmin-doc', 'https://www.eleadmin.com/doc/eleadminplus/', 0, 2, NULL, 'LinkOutlined', 0, '{\"lang\": {\"zh_TW\": \"檔案\", \"en\": \"Document\"}}', 0, 4, '2021-10-10 16:21:12', '2024-02-25 14:01:13'); +INSERT INTO `sys_menu` VALUES (398, 0, '功能演示', '/example', '/example', 0, 9, NULL, 'CompassOutlined', 0, '{\"lang\": {\"zh_TW\": \"功能演示\", \"en\": \"Demo\"}}', 0, 4, '2021-10-10 16:21:12', '2024-02-25 14:01:47'); +INSERT INTO `sys_menu` VALUES (399, 0, '获取授权', 'https://eleadmin.com/goods/11', NULL, 0, 10, NULL, 'ProtectOutlined', 0, '{\"lang\": {\"zh_TW\": \"獲取授權\", \"en\": \"Authorization\"}}', 0, 4, '2021-02-02 20:15:18', '2024-02-25 14:04:32'); + +-- ---------------------------- +-- Table structure for sys_operation_record +-- ---------------------------- +DROP TABLE IF EXISTS `sys_operation_record`; +CREATE TABLE `sys_operation_record` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `user_id` int(11) NULL DEFAULT NULL COMMENT '用户id', + `module` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作模块', + `description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作功能', + `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求地址', + `request_method` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求方式', + `method` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '调用方法', + `params` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求参数', + `result` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '返回结果', + `error` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '异常信息', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `spend_time` int(11) NULL DEFAULT NULL COMMENT '消耗时间, 单位毫秒', + `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作系统', + `device` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备名称', + `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器类型', + `ip` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地址', + `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态, 0成功, 1异常', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `user_id`(`user_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_operation_record_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`user_id`) ON DELETE CASCADE ON UPDATE RESTRICT, + CONSTRAINT `sys_operation_record_ibfk_2` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_operation_record +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_organization +-- ---------------------------- +DROP TABLE IF EXISTS `sys_organization`; +CREATE TABLE `sys_organization` ( + `organization_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '机构id', + `parent_id` int(11) NOT NULL DEFAULT 0 COMMENT '上级id, 0是顶级', + `organization_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '机构名称', + `organization_full_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构全称', + `organization_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构代码', + `organization_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '机构类型', + `leader_id` int(11) NULL DEFAULT NULL COMMENT '负责人id', + `sort_number` int(11) NOT NULL DEFAULT 1 COMMENT '排序号', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `deleted` int(1) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`organization_id`) USING BTREE, + INDEX `leader_id`(`leader_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_organization_ibfk_1` FOREIGN KEY (`leader_id`) REFERENCES `sys_user` (`user_id`) ON DELETE SET NULL ON UPDATE RESTRICT, + CONSTRAINT `sys_organization_ibfk_2` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织机构' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_organization +-- ---------------------------- +INSERT INTO `sys_organization` VALUES (1, 0, 'XXX公司', '武汉易云智科技有限公司', '91420111MA49EPRW0A', '1', NULL, 1, NULL, 0, 1, '2020-03-15 13:14:55', '2022-03-11 22:47:18'); +INSERT INTO `sys_organization` VALUES (2, 1, '研发部', '研发部', NULL, '3', NULL, 2, NULL, 0, 1, '2020-03-15 13:15:16', '2022-03-11 22:47:19'); +INSERT INTO `sys_organization` VALUES (3, 2, '研发一组', '研发一组', NULL, '4', NULL, 3, NULL, 0, 1, '2020-03-15 13:15:45', '2022-07-20 15:10:43'); +INSERT INTO `sys_organization` VALUES (4, 2, '研发二组', '研发二组', NULL, '4', NULL, 4, NULL, 0, 1, '2020-03-15 13:16:15', '2022-07-20 15:10:45'); +INSERT INTO `sys_organization` VALUES (5, 2, '研发三组', '研发三组', NULL, '4', NULL, 5, NULL, 0, 1, '2020-03-15 13:16:37', '2022-07-20 15:10:48'); +INSERT INTO `sys_organization` VALUES (6, 2, '研发四组', '研发四组', NULL, '4', NULL, 6, NULL, 0, 1, '2020-03-15 13:16:57', '2022-07-20 15:10:50'); +INSERT INTO `sys_organization` VALUES (7, 1, '测试部', '测试部', NULL, '3', NULL, 7, NULL, 0, 1, '2020-03-15 13:17:19', '2022-03-11 22:47:27'); +INSERT INTO `sys_organization` VALUES (8, 1, '设计部', '设计部', NULL, '3', NULL, 8, NULL, 0, 1, '2020-03-15 13:17:56', '2022-07-20 15:10:55'); +INSERT INTO `sys_organization` VALUES (9, 1, '市场部', '市场部', NULL, '3', NULL, 9, NULL, 0, 1, '2020-03-15 13:18:15', '2022-03-11 22:47:30'); +INSERT INTO `sys_organization` VALUES (10, 1, '运维部', '运维部', NULL, '3', NULL, 10, NULL, 0, 1, '2021-10-15 16:34:05', '2021-10-15 16:34:05'); +INSERT INTO `sys_organization` VALUES (11, 0, 'XXX公司', '武汉易云智科技有限公司', NULL, '1', NULL, 1, NULL, 0, 2, '2020-03-15 13:14:55', '2022-03-11 22:47:32'); +INSERT INTO `sys_organization` VALUES (12, 11, '研发部', '研发部', NULL, '3', NULL, 2, NULL, 0, 2, '2020-03-15 13:15:16', '2022-03-11 22:47:35'); +INSERT INTO `sys_organization` VALUES (13, 12, '研发一组', '研发一组', NULL, '4', NULL, 3, NULL, 0, 2, '2020-03-15 13:15:45', '2022-07-20 15:11:06'); +INSERT INTO `sys_organization` VALUES (14, 12, '研发二组', '研发二组', NULL, '4', NULL, 4, NULL, 0, 2, '2020-03-15 13:16:15', '2022-07-20 15:11:10'); +INSERT INTO `sys_organization` VALUES (15, 12, '研发三组', '研发三组', NULL, '4', NULL, 5, NULL, 0, 2, '2020-03-15 13:16:37', '2022-07-20 15:11:13'); +INSERT INTO `sys_organization` VALUES (16, 12, '研发四组', '研发四组', NULL, '4', NULL, 6, NULL, 0, 2, '2020-03-15 13:16:57', '2022-07-20 15:11:16'); +INSERT INTO `sys_organization` VALUES (17, 11, '测试部', '测试部', NULL, '3', NULL, 7, NULL, 0, 2, '2020-03-15 13:17:19', '2022-03-11 22:47:43'); +INSERT INTO `sys_organization` VALUES (18, 11, '设计部', '设计部', NULL, '3', NULL, 8, NULL, 0, 2, '2020-03-15 13:17:56', '2022-03-11 22:47:44'); +INSERT INTO `sys_organization` VALUES (19, 11, '市场部', '市场部', NULL, '3', NULL, 9, NULL, 0, 2, '2020-03-15 13:18:15', '2022-03-11 22:47:46'); +INSERT INTO `sys_organization` VALUES (20, 11, '运维部', '运维部', NULL, '3', NULL, 10, NULL, 0, 2, '2021-10-15 16:35:15', '2022-03-11 22:47:49'); +INSERT INTO `sys_organization` VALUES (21, 0, 'XXX公司', '武汉易云智科技有限公司', '91420111MA49EPRW0A', '1', NULL, 1, NULL, 0, 3, '2020-03-15 13:14:55', '2022-03-11 22:47:50'); +INSERT INTO `sys_organization` VALUES (22, 21, '研发部', '研发部', NULL, '3', NULL, 2, NULL, 0, 3, '2020-03-15 13:15:16', '2022-03-11 22:47:52'); +INSERT INTO `sys_organization` VALUES (23, 22, '研发一组', '研发一组', NULL, '4', NULL, 3, NULL, 0, 3, '2020-03-15 13:15:45', '2022-07-20 15:11:26'); +INSERT INTO `sys_organization` VALUES (24, 22, '研发二组', '研发二组', NULL, '4', NULL, 4, NULL, 0, 3, '2020-03-15 13:16:15', '2022-07-20 15:11:30'); +INSERT INTO `sys_organization` VALUES (25, 22, '研发三组', '研发三组', NULL, '4', NULL, 5, NULL, 0, 3, '2020-03-15 13:16:37', '2022-07-20 15:11:34'); +INSERT INTO `sys_organization` VALUES (26, 22, '研发四组', '研发四组', NULL, '4', NULL, 6, NULL, 0, 3, '2020-03-15 13:16:57', '2022-07-20 15:12:05'); +INSERT INTO `sys_organization` VALUES (27, 21, '测试部', '测试部', NULL, '3', NULL, 7, NULL, 0, 3, '2020-03-15 13:17:19', '2022-03-11 22:48:02'); +INSERT INTO `sys_organization` VALUES (28, 21, '设计部', 'UI设计部门', NULL, '3', NULL, 8, NULL, 0, 3, '2020-03-15 13:17:56', '2022-03-11 22:48:03'); +INSERT INTO `sys_organization` VALUES (29, 21, '市场部', '市场部', NULL, '3', NULL, 9, NULL, 0, 3, '2020-03-15 13:18:15', '2022-03-11 22:48:04'); +INSERT INTO `sys_organization` VALUES (30, 21, '运维部', '运维部', NULL, '3', NULL, 10, NULL, 0, 3, '2021-10-15 16:34:05', '2021-10-15 16:34:05'); +INSERT INTO `sys_organization` VALUES (31, 0, 'XXX公司', '武汉易云智科技有限公司', '91420111MA49EPRW0A', '1', NULL, 1, NULL, 0, 4, '2020-03-15 13:14:55', '2022-03-11 22:47:50'); +INSERT INTO `sys_organization` VALUES (32, 31, '研发部', '研发部', NULL, '3', NULL, 2, NULL, 0, 4, '2020-03-15 13:15:16', '2022-03-11 22:47:52'); +INSERT INTO `sys_organization` VALUES (33, 32, '研发一组', '研发一组', NULL, '4', NULL, 3, NULL, 0, 4, '2020-03-15 13:15:45', '2022-07-20 15:11:26'); +INSERT INTO `sys_organization` VALUES (34, 32, '研发二组', '研发二组', NULL, '4', NULL, 4, NULL, 0, 4, '2020-03-15 13:16:15', '2022-07-20 15:11:30'); +INSERT INTO `sys_organization` VALUES (35, 32, '研发三组', '研发三组', NULL, '4', NULL, 5, NULL, 0, 4, '2020-03-15 13:16:37', '2022-07-20 15:11:34'); +INSERT INTO `sys_organization` VALUES (36, 32, '研发四组', '研发四组', NULL, '4', NULL, 6, NULL, 0, 4, '2020-03-15 13:16:57', '2022-07-20 15:12:05'); +INSERT INTO `sys_organization` VALUES (37, 31, '测试部', '测试部', NULL, '3', NULL, 7, NULL, 0, 4, '2020-03-15 13:17:19', '2022-03-11 22:48:02'); +INSERT INTO `sys_organization` VALUES (38, 31, '设计部', 'UI设计部门', NULL, '3', NULL, 8, NULL, 0, 4, '2020-03-15 13:17:56', '2022-03-11 22:48:03'); +INSERT INTO `sys_organization` VALUES (39, 31, '市场部', '市场部', NULL, '3', NULL, 9, NULL, 0, 4, '2020-03-15 13:18:15', '2022-03-11 22:48:04'); +INSERT INTO `sys_organization` VALUES (40, 31, '运维部', '运维部', NULL, '3', NULL, 10, NULL, 0, 4, '2021-10-15 16:34:05', '2021-10-15 16:34:05'); + +-- ---------------------------- +-- Table structure for sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_role` ( + `role_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '角色id', + `role_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称', + `role_code` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色标识', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `deleted` int(1) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`role_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_role_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_role +-- ---------------------------- +INSERT INTO `sys_role` VALUES (1, '管理员', 'admin', '管理员', 0, 1, '2020-02-26 15:18:37', '2020-03-21 15:15:54'); +INSERT INTO `sys_role` VALUES (2, '普通用户', 'user', '普通用户', 0, 1, '2020-02-26 15:18:52', '2020-03-21 15:16:02'); +INSERT INTO `sys_role` VALUES (3, '游客', 'guest', '游客', 0, 1, '2020-02-26 15:19:49', '2020-03-21 15:16:57'); +INSERT INTO `sys_role` VALUES (4, '管理员', 'admin', '管理员', 0, 2, '2020-02-26 15:18:37', '2020-03-21 15:15:54'); +INSERT INTO `sys_role` VALUES (5, '普通用户', 'user', '普通用户', 0, 2, '2020-02-26 15:18:52', '2020-03-21 15:16:02'); +INSERT INTO `sys_role` VALUES (6, '游客', 'guest', '游客', 0, 2, '2020-02-26 15:19:49', '2020-03-21 15:16:57'); +INSERT INTO `sys_role` VALUES (7, '管理员', 'admin', '管理员', 0, 3, '2020-02-26 15:18:37', '2020-03-21 15:15:54'); +INSERT INTO `sys_role` VALUES (8, '普通用户', 'user', '普通用户', 0, 3, '2020-02-26 15:18:52', '2020-03-21 15:16:02'); +INSERT INTO `sys_role` VALUES (9, '游客', 'guest', '游客', 0, 3, '2020-02-26 15:19:49', '2020-03-21 15:16:57'); +INSERT INTO `sys_role` VALUES (10, '管理员', 'admin', '管理员', 0, 4, '2020-02-26 15:18:37', '2020-03-21 15:15:54'); +INSERT INTO `sys_role` VALUES (11, '普通用户', 'user', '普通用户', 0, 4, '2020-02-26 15:18:52', '2020-03-21 15:16:02'); +INSERT INTO `sys_role` VALUES (12, '游客', 'guest', '游客', 0, 4, '2020-02-26 15:19:49', '2020-03-21 15:16:57'); + +-- ---------------------------- +-- Table structure for sys_role_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_menu`; +CREATE TABLE `sys_role_menu` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `role_id` int(11) NOT NULL COMMENT '角色id', + `menu_id` int(11) NOT NULL COMMENT '菜单id', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `FK_sys_role_permission_role`(`role_id`) USING BTREE, + INDEX `menu_id`(`menu_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_role_menu_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`role_id`) ON DELETE CASCADE ON UPDATE RESTRICT, + CONSTRAINT `sys_role_menu_ibfk_2` FOREIGN KEY (`menu_id`) REFERENCES `sys_menu` (`menu_id`) ON DELETE CASCADE ON UPDATE RESTRICT, + CONSTRAINT `sys_role_menu_ibfk_3` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 1972 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色权限' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_role_menu +-- ---------------------------- +INSERT INTO `sys_role_menu` VALUES (315, 3, 40, 1, '2022-07-29 13:59:39', '2022-07-29 13:59:39'); +INSERT INTO `sys_role_menu` VALUES (316, 3, 41, 1, '2022-07-29 13:59:39', '2022-07-29 13:59:39'); +INSERT INTO `sys_role_menu` VALUES (317, 3, 42, 1, '2022-07-29 13:59:39', '2022-07-29 13:59:39'); +INSERT INTO `sys_role_menu` VALUES (318, 3, 43, 1, '2022-07-29 13:59:39', '2022-07-29 13:59:39'); +INSERT INTO `sys_role_menu` VALUES (338, 6, 140, 2, '2022-07-29 14:14:00', '2022-07-29 14:14:00'); +INSERT INTO `sys_role_menu` VALUES (339, 6, 141, 2, '2022-07-29 14:14:00', '2022-07-29 14:14:00'); +INSERT INTO `sys_role_menu` VALUES (340, 6, 142, 2, '2022-07-29 14:14:00', '2022-07-29 14:14:00'); +INSERT INTO `sys_role_menu` VALUES (341, 6, 143, 2, '2022-07-29 14:14:00', '2022-07-29 14:14:00'); +INSERT INTO `sys_role_menu` VALUES (594, 7, 201, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (595, 7, 202, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (596, 7, 203, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (597, 7, 207, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (598, 7, 208, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (599, 7, 212, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (600, 7, 213, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (601, 7, 217, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (602, 7, 218, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (603, 7, 222, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (604, 7, 223, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (605, 7, 227, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (606, 7, 228, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (607, 7, 232, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (608, 7, 233, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (609, 7, 234, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (610, 7, 235, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (611, 7, 236, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (612, 7, 237, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (613, 7, 238, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (614, 7, 239, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (615, 7, 240, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (616, 7, 241, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (617, 7, 242, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (618, 7, 243, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (619, 7, 244, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (620, 7, 245, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (621, 7, 246, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (622, 7, 247, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (623, 7, 248, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (624, 7, 249, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (625, 7, 250, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (626, 7, 251, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (627, 7, 252, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (628, 7, 253, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (629, 7, 254, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (630, 7, 255, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (631, 7, 256, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (632, 7, 257, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (633, 7, 258, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (634, 7, 259, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (635, 7, 260, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (636, 7, 261, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (637, 7, 262, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (638, 7, 263, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (639, 7, 264, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (640, 7, 265, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (641, 7, 266, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (642, 7, 267, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (643, 7, 268, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (644, 7, 269, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (645, 7, 270, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (646, 7, 271, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (647, 7, 272, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (648, 7, 273, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (649, 7, 274, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (650, 7, 275, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (651, 7, 276, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (652, 7, 277, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (653, 7, 278, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (654, 7, 279, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (655, 7, 280, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (656, 7, 281, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (657, 7, 282, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (658, 7, 283, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (659, 7, 284, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (660, 7, 285, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (661, 7, 286, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (662, 7, 287, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (663, 7, 288, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (664, 7, 289, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (665, 7, 290, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (666, 7, 291, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (667, 7, 292, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (668, 7, 293, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (669, 7, 294, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (670, 7, 295, 3, '2021-11-05 17:45:05', '2021-11-05 17:45:05'); +INSERT INTO `sys_role_menu` VALUES (671, 8, 201, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (672, 8, 202, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (673, 8, 203, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (674, 8, 207, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (675, 8, 208, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (676, 8, 212, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (677, 8, 213, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (678, 8, 217, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (679, 8, 218, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (680, 8, 222, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (681, 8, 223, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (682, 8, 227, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (683, 8, 228, 3, '2022-07-29 14:29:41', '2022-07-29 14:29:41'); +INSERT INTO `sys_role_menu` VALUES (684, 9, 236, 3, '2022-07-29 14:30:21', '2022-07-29 14:30:21'); +INSERT INTO `sys_role_menu` VALUES (685, 9, 237, 3, '2022-07-29 14:30:21', '2022-07-29 14:30:21'); +INSERT INTO `sys_role_menu` VALUES (686, 9, 238, 3, '2022-07-29 14:30:21', '2022-07-29 14:30:21'); +INSERT INTO `sys_role_menu` VALUES (687, 9, 239, 3, '2022-07-29 14:30:21', '2022-07-29 14:30:21'); +INSERT INTO `sys_role_menu` VALUES (688, 9, 240, 3, '2022-07-29 14:30:21', '2022-07-29 14:30:21'); +INSERT INTO `sys_role_menu` VALUES (689, 9, 254, 3, '2022-07-29 14:30:21', '2022-07-29 14:30:21'); +INSERT INTO `sys_role_menu` VALUES (816, 12, 340, 4, '2023-06-13 22:41:31', '2023-06-13 22:41:31'); +INSERT INTO `sys_role_menu` VALUES (817, 12, 341, 4, '2023-06-13 22:41:31', '2023-06-13 22:41:31'); +INSERT INTO `sys_role_menu` VALUES (818, 12, 342, 4, '2023-06-13 22:41:31', '2023-06-13 22:41:31'); +INSERT INTO `sys_role_menu` VALUES (819, 12, 343, 4, '2023-06-13 22:41:31', '2023-06-13 22:41:31'); +INSERT INTO `sys_role_menu` VALUES (1556, 10, 336, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1557, 10, 337, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1558, 10, 338, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1559, 10, 339, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1560, 10, 301, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1561, 10, 302, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1562, 10, 303, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1563, 10, 304, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1564, 10, 305, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1565, 10, 306, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1566, 10, 333, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1567, 10, 307, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1568, 10, 308, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1569, 10, 309, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1570, 10, 310, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1571, 10, 311, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1572, 10, 312, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1573, 10, 313, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1574, 10, 314, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1575, 10, 315, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1576, 10, 316, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1577, 10, 317, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1578, 10, 318, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1579, 10, 319, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1580, 10, 320, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1581, 10, 321, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1582, 10, 322, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1583, 10, 323, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1584, 10, 324, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1585, 10, 325, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1586, 10, 326, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1587, 10, 329, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1588, 10, 330, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1589, 10, 331, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1590, 10, 332, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1591, 10, 327, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1592, 10, 328, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1593, 10, 334, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1594, 10, 335, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1595, 10, 340, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1596, 10, 341, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1597, 10, 342, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1598, 10, 343, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1599, 10, 344, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1600, 10, 345, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1601, 10, 351, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1602, 10, 352, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1603, 10, 353, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1604, 10, 346, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1605, 10, 347, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1606, 10, 348, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1607, 10, 349, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1608, 10, 350, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1609, 10, 354, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1610, 10, 355, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1611, 10, 356, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1612, 10, 357, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1613, 10, 358, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1614, 10, 359, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1615, 10, 360, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1616, 10, 361, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1617, 10, 362, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1618, 10, 363, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1619, 10, 364, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1620, 10, 370, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1621, 10, 384, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1622, 10, 375, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1623, 10, 365, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1624, 10, 366, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1625, 10, 367, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1626, 10, 368, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1627, 10, 377, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1628, 10, 385, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1629, 10, 387, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1630, 10, 376, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1631, 10, 372, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1632, 10, 386, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1633, 10, 393, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1634, 10, 391, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1635, 10, 390, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1636, 10, 389, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1637, 10, 394, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1638, 10, 381, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1639, 10, 380, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1640, 10, 388, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1641, 10, 392, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1642, 10, 374, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1643, 10, 369, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1644, 10, 379, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1645, 10, 371, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1646, 10, 373, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1647, 10, 378, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1648, 10, 382, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1649, 10, 383, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1650, 10, 395, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1651, 10, 396, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1652, 10, 397, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1653, 10, 398, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1654, 10, 399, 4, '2023-06-16 11:22:08', '2023-06-16 11:22:08'); +INSERT INTO `sys_role_menu` VALUES (1655, 11, 337, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1656, 11, 338, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1657, 11, 301, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1658, 11, 302, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1659, 11, 303, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1660, 11, 304, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1661, 11, 305, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1662, 11, 306, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1663, 11, 333, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1664, 11, 307, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1665, 11, 308, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1666, 11, 309, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1667, 11, 310, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1668, 11, 311, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1669, 11, 312, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1670, 11, 313, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1671, 11, 314, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1672, 11, 315, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1673, 11, 316, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1674, 11, 317, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1675, 11, 318, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1676, 11, 319, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1677, 11, 320, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1678, 11, 321, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1679, 11, 322, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1680, 11, 323, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1681, 11, 324, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1682, 11, 325, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1683, 11, 326, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1684, 11, 329, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1685, 11, 330, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1686, 11, 331, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1687, 11, 332, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1688, 11, 327, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1689, 11, 328, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1690, 11, 334, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1691, 11, 335, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1692, 11, 395, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1693, 11, 396, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1694, 11, 397, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1695, 11, 399, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1696, 11, 336, 4, '2023-06-16 11:22:36', '2023-06-16 11:22:36'); +INSERT INTO `sys_role_menu` VALUES (1697, 4, 136, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1698, 4, 137, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1699, 4, 138, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1700, 4, 139, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1701, 4, 101, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1702, 4, 102, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1703, 4, 103, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1704, 4, 104, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1705, 4, 105, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1706, 4, 106, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1707, 4, 133, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1708, 4, 107, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1709, 4, 108, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1710, 4, 109, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1711, 4, 110, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1712, 4, 111, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1713, 4, 112, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1714, 4, 113, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1715, 4, 114, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1716, 4, 115, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1717, 4, 116, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1718, 4, 122, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1719, 4, 123, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1720, 4, 124, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1721, 4, 125, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1722, 4, 126, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1723, 4, 117, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1724, 4, 118, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1725, 4, 119, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1726, 4, 120, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1727, 4, 121, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1728, 4, 129, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1729, 4, 130, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1730, 4, 131, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1731, 4, 132, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1732, 4, 127, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1733, 4, 128, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1734, 4, 134, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1735, 4, 135, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1736, 4, 140, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1737, 4, 141, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1738, 4, 142, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1739, 4, 143, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1740, 4, 144, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1741, 4, 145, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1742, 4, 151, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1743, 4, 152, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1744, 4, 153, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1745, 4, 146, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1746, 4, 147, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1747, 4, 148, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1748, 4, 149, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1749, 4, 150, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1750, 4, 154, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1751, 4, 155, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1752, 4, 156, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1753, 4, 157, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1754, 4, 158, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1755, 4, 159, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1756, 4, 160, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1757, 4, 161, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1758, 4, 162, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1759, 4, 163, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1760, 4, 164, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1761, 4, 165, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1762, 4, 166, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1763, 4, 167, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1764, 4, 168, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1765, 4, 169, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1766, 4, 170, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1767, 4, 171, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1768, 4, 172, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1769, 4, 173, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1770, 4, 174, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1771, 4, 176, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1772, 4, 178, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1773, 4, 179, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1774, 4, 180, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1775, 4, 181, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1776, 4, 182, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1777, 4, 183, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1778, 4, 184, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1779, 4, 185, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1780, 4, 186, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1781, 4, 187, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1782, 4, 188, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1783, 4, 189, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1784, 4, 191, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1785, 4, 192, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1786, 4, 193, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1787, 4, 190, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1788, 4, 194, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1789, 4, 199, 2, '2023-06-16 11:24:32', '2023-06-16 11:24:32'); +INSERT INTO `sys_role_menu` VALUES (1790, 5, 137, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1791, 5, 136, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1792, 5, 138, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1793, 5, 101, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1794, 5, 102, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1795, 5, 103, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1796, 5, 104, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1797, 5, 105, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1798, 5, 106, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1799, 5, 133, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1800, 5, 107, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1801, 5, 108, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1802, 5, 109, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1803, 5, 110, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1804, 5, 111, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1805, 5, 112, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1806, 5, 113, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1807, 5, 114, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1808, 5, 115, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1809, 5, 116, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1810, 5, 122, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1811, 5, 123, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1812, 5, 124, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1813, 5, 125, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1814, 5, 126, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1815, 5, 117, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1816, 5, 118, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1817, 5, 119, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1818, 5, 120, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1819, 5, 121, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1820, 5, 129, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1821, 5, 130, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1822, 5, 131, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1823, 5, 132, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1824, 5, 127, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1825, 5, 128, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1826, 5, 134, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1827, 5, 135, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1828, 5, 191, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1829, 5, 188, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1830, 5, 192, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1831, 5, 199, 2, '2023-06-16 11:25:12', '2023-06-16 11:25:12'); +INSERT INTO `sys_role_menu` VALUES (1832, 1, 36, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1833, 1, 37, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1834, 1, 38, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1835, 1, 39, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1836, 1, 1, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1837, 1, 2, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1838, 1, 3, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1839, 1, 4, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1840, 1, 5, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1841, 1, 6, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1842, 1, 33, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1843, 1, 7, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1844, 1, 8, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1845, 1, 9, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1846, 1, 10, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1847, 1, 11, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1848, 1, 12, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1849, 1, 13, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1850, 1, 14, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1851, 1, 15, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1852, 1, 16, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1853, 1, 17, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1854, 1, 18, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1855, 1, 19, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1856, 1, 20, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1857, 1, 21, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1858, 1, 22, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1859, 1, 23, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1860, 1, 24, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1861, 1, 25, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1862, 1, 26, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1863, 1, 29, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1864, 1, 30, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1865, 1, 31, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1866, 1, 32, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1867, 1, 27, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1868, 1, 28, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1869, 1, 34, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1870, 1, 35, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1871, 1, 40, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1872, 1, 41, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1873, 1, 42, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1874, 1, 43, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1875, 1, 44, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1876, 1, 45, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1877, 1, 51, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1878, 1, 52, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1879, 1, 53, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1880, 1, 46, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1881, 1, 47, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1882, 1, 48, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1883, 1, 49, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1884, 1, 50, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1885, 1, 54, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1886, 1, 55, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1887, 1, 56, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1888, 1, 57, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1889, 1, 58, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1890, 1, 59, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1891, 1, 60, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1892, 1, 61, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1893, 1, 62, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1894, 1, 63, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1895, 1, 64, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1896, 1, 65, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1897, 1, 66, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1898, 1, 67, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1899, 1, 68, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1900, 1, 69, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1901, 1, 70, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1902, 1, 71, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1903, 1, 72, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1904, 1, 73, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1905, 1, 74, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1906, 1, 75, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1907, 1, 76, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1908, 1, 77, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1909, 1, 78, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1910, 1, 79, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1911, 1, 80, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1912, 1, 82, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1913, 1, 83, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1914, 1, 84, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1915, 1, 85, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1916, 1, 86, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1917, 1, 87, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1918, 1, 88, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1919, 1, 89, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1920, 1, 97, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1921, 1, 98, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1922, 1, 90, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1923, 1, 91, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1924, 1, 92, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1925, 1, 93, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1926, 1, 94, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1927, 1, 95, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1928, 1, 96, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1929, 1, 99, 1, '2023-06-16 11:27:23', '2023-06-16 11:27:23'); +INSERT INTO `sys_role_menu` VALUES (1930, 2, 37, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1931, 2, 38, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1932, 2, 1, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1933, 2, 2, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1934, 2, 3, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1935, 2, 4, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1936, 2, 5, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1937, 2, 6, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1938, 2, 33, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1939, 2, 7, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1940, 2, 8, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1941, 2, 9, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1942, 2, 10, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1943, 2, 11, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1944, 2, 12, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1945, 2, 13, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1946, 2, 14, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1947, 2, 15, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1948, 2, 16, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1949, 2, 17, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1950, 2, 18, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1951, 2, 19, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1952, 2, 20, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1953, 2, 21, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1954, 2, 22, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1955, 2, 23, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1956, 2, 24, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1957, 2, 25, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1958, 2, 26, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1959, 2, 29, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1960, 2, 30, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1961, 2, 31, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1962, 2, 32, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1963, 2, 27, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1964, 2, 28, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1965, 2, 34, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1966, 2, 35, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1967, 2, 93, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1968, 2, 94, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1969, 2, 99, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1970, 2, 36, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); +INSERT INTO `sys_role_menu` VALUES (1971, 2, 90, 1, '2023-06-16 11:27:47', '2023-06-16 11:27:47'); + +-- ---------------------------- +-- Table structure for sys_tenant +-- ---------------------------- +DROP TABLE IF EXISTS `sys_tenant`; +CREATE TABLE `sys_tenant` ( + `tenant_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '租户id', + `tenant_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称', + `comments` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `deleted` int(1) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`tenant_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_tenant +-- ---------------------------- +INSERT INTO `sys_tenant` VALUES (1, 'websopyAdmin', NULL, 0, '2021-08-25 13:33:33', '2021-10-13 21:44:52'); +INSERT INTO `sys_tenant` VALUES (2, 'websopyOA', NULL, 0, '2021-10-13 21:44:59', '2021-10-13 21:44:59'); +INSERT INTO `sys_tenant` VALUES (3, 'websopyWeb', NULL, 0, '2022-03-11 10:03:00', '2023-05-24 10:38:31'); +INSERT INTO `sys_tenant` VALUES (4, 'websopyShop', NULL, 0, '2023-05-24 10:38:26', '2023-05-24 10:38:26'); + +-- ---------------------------- +-- Table structure for sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户id', + `username` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '账号', + `password` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码', + `nickname` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '昵称', + `avatar` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像', + `sex` int(11) NULL DEFAULT NULL COMMENT '性别', + `phone` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号', + `email` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱', + `email_verified` int(1) NOT NULL DEFAULT 0 COMMENT '邮箱是否验证, 0否, 1是', + `real_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真实姓名', + `id_card` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份证号', + `birthday` date NULL DEFAULT NULL COMMENT '出生日期', + `introduction` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '个人简介', + `organization_id` int(11) NULL DEFAULT NULL COMMENT '机构id', + `status` int(1) NOT NULL DEFAULT 0 COMMENT '状态, 0正常, 1冻结', + `deleted` int(1) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`user_id`) USING BTREE, + INDEX `organization_id`(`organization_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_user_ibfk_1` FOREIGN KEY (`organization_id`) REFERENCES `sys_organization` (`organization_id`) ON DELETE SET NULL ON UPDATE RESTRICT, + CONSTRAINT `sys_user_ibfk_2` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_user +-- ---------------------------- +INSERT INTO `sys_user` VALUES (1, 'admin', '$2a$10$sWH.qQmf/dHMURzE4kN0puBOdB7VWwcDFB2NvwpMaHYz6OFZwQGBy', '管理员', 'https://cdn.eleadmin.com/20200610/avatar.jpg', 1, '12345678901', NULL, 0, NULL, NULL, '2021-05-21', '遗其欲,则心静!', 1, 0, 0, 1, '2020-01-13 14:43:52', '2023-02-06 09:05:19'); +INSERT INTO `sys_user` VALUES (2, 'user01', '$2a$10$y3j0Bnn4cMOErMLv31LUw.Drs/xs1peDQwT7YYHJbFX6xGDQcXUaK', '用户一', NULL, 2, '12345678902', NULL, 0, NULL, NULL, NULL, NULL, 1, 0, 0, 1, '2020-09-15 17:49:37', '2023-02-06 09:04:21'); +INSERT INTO `sys_user` VALUES (3, 'user02', '$2a$10$fF2qbzA1.zIOUZpedxtvoubQ9doxlSNSunGQLwYxnvSqM8Wx6AeGC', '用户二', NULL, 1, '12345678903', NULL, 0, NULL, NULL, NULL, NULL, 1, 0, 0, 1, '2020-09-15 17:50:20', '2023-02-06 09:04:22'); +INSERT INTO `sys_user` VALUES (4, 'user03', '$2a$10$iP1vojXrDgjTaU6ZY3dGfefXGmyftJbPhTuU7cWBxkNI3w20WwZOW', '用户三', NULL, 2, '12345678904', NULL, 0, NULL, NULL, NULL, NULL, 1, 0, 0, 1, '2020-09-15 17:50:51', '2023-02-06 09:04:24'); +INSERT INTO `sys_user` VALUES (5, 'user04', '$2a$10$iMsEmh.rPlzwy/SVe6KW3.62vlwqMJpibhCF9jYN.fMqxdqymzMzu', '用户四', NULL, 1, '12345678905', NULL, 0, NULL, NULL, NULL, NULL, 2, 0, 0, 1, '2020-09-15 17:51:50', '2023-02-06 09:04:26'); +INSERT INTO `sys_user` VALUES (6, 'user05', '$2a$10$6bdw9kiSq6cefcwN1nvcyOyWxgKxNipVsR7M1QvmG9pPZ4ggldr4a', '用户五', NULL, 2, '12345678906', NULL, 0, NULL, NULL, NULL, NULL, 2, 0, 0, 1, '2020-09-15 17:52:22', '2023-02-06 09:04:28'); +INSERT INTO `sys_user` VALUES (7, 'user06', '$2a$10$fKDoXZPU43tiFxXyzPXcu.kCpiv9ACtlgkxFeB/NBl4ti7GqI.EE.', '用户六', NULL, 1, '12345678907', NULL, 0, NULL, NULL, NULL, NULL, 2, 0, 0, 1, '2020-09-15 17:53:31', '2023-02-06 09:04:29'); +INSERT INTO `sys_user` VALUES (8, 'user07', '$2a$10$R4JW6t3GK7fz3B830WsRI.uoW5LZq9EG.VAopRyKXVemXDkpybYni', '用户七', NULL, 1, '12345678908', NULL, 0, NULL, NULL, NULL, NULL, 3, 0, 0, 1, '2020-10-20 23:28:40', '2023-02-06 09:04:31'); +INSERT INTO `sys_user` VALUES (9, 'user08', '$2a$10$EhZLneJiZjVd3qWXpiUXV.OC3mtTMNLepIjhUyQzgPqtvpBclMCm2', '用户八', NULL, 2, '12345678909', NULL, 0, NULL, NULL, NULL, NULL, 3, 1, 0, 1, '2020-10-20 23:29:03', '2023-02-06 09:04:33'); +INSERT INTO `sys_user` VALUES (10, 'user09', '$2a$10$jP8jv8A.uVSfKFzVpoNgmetdTK9pMAMjJh5wEQLH.sFVdMDILaXMS', '用户九', NULL, 2, '12345678910', NULL, 0, NULL, NULL, NULL, NULL, 4, 0, 0, 1, '2020-10-20 23:29:30', '2023-02-06 09:04:35'); +INSERT INTO `sys_user` VALUES (11, 'user10', '$2a$10$R/2v6h8bRhYsgryPwzgv8eFBl3jnALsqJ/O7DRHzLxuU/.T/JqO96', '用户十', NULL, 1, '12345678911', NULL, 0, NULL, NULL, NULL, NULL, 4, 1, 0, 1, '2020-10-20 23:29:55', '2023-02-06 09:04:38'); +INSERT INTO `sys_user` VALUES (12, 'user11', '$2a$10$mR4uT3Qley1UkXm6zJ4zd.OMXzUovwCYX52eFVC80FwCrkDeFwYl6', '用户十一', NULL, 1, '12345678912', NULL, 0, NULL, NULL, NULL, NULL, 5, 0, 0, 1, '2020-10-20 23:30:28', '2023-02-06 09:04:36'); +INSERT INTO `sys_user` VALUES (13, 'user12', '$2a$10$UveBloenMd4weP/6fHIkeeYZqPWNS6Y0NRxRGwXA1KzmwycklSAqa', '用户十二', NULL, 2, '12345678913', NULL, 0, NULL, NULL, NULL, NULL, 6, 0, 0, 1, '2020-10-20 23:30:53', '2023-02-06 09:04:40'); +INSERT INTO `sys_user` VALUES (14, 'admin', '$2a$10$sWH.qQmf/dHMURzE4kN0puBOdB7VWwcDFB2NvwpMaHYz6OFZwQGBy', '管理员', 'https://cdn.eleadmin.com/20200610/avatar.jpg', 1, '12345678901', NULL, 0, NULL, NULL, '2021-05-21', '遗其欲,则心静!', 11, 0, 0, 2, '2020-01-13 14:43:52', '2023-02-06 09:06:51'); +INSERT INTO `sys_user` VALUES (15, 'user01', '$2a$10$y3j0Bnn4cMOErMLv31LUw.Drs/xs1peDQwT7YYHJbFX6xGDQcXUaK', '用户一', NULL, 2, '12345678902', NULL, 0, NULL, NULL, NULL, NULL, 11, 0, 0, 2, '2020-09-15 17:49:37', '2023-02-06 09:06:28'); +INSERT INTO `sys_user` VALUES (16, 'user02', '$2a$10$fF2qbzA1.zIOUZpedxtvoubQ9doxlSNSunGQLwYxnvSqM8Wx6AeGC', '用户二', NULL, 1, '12345678903', NULL, 0, NULL, NULL, NULL, NULL, 11, 0, 0, 2, '2020-09-15 17:50:20', '2023-02-06 09:06:30'); +INSERT INTO `sys_user` VALUES (17, 'user03', '$2a$10$iP1vojXrDgjTaU6ZY3dGfefXGmyftJbPhTuU7cWBxkNI3w20WwZOW', '用户三', NULL, 2, '12345678904', NULL, 0, NULL, NULL, NULL, NULL, 11, 0, 0, 2, '2020-09-15 17:50:51', '2023-02-06 09:06:31'); +INSERT INTO `sys_user` VALUES (18, 'user04', '$2a$10$iMsEmh.rPlzwy/SVe6KW3.62vlwqMJpibhCF9jYN.fMqxdqymzMzu', '用户四', NULL, 1, '12345678905', NULL, 0, NULL, NULL, NULL, NULL, 12, 0, 0, 2, '2020-09-15 17:51:50', '2023-02-06 09:06:33'); +INSERT INTO `sys_user` VALUES (19, 'user05', '$2a$10$6bdw9kiSq6cefcwN1nvcyOyWxgKxNipVsR7M1QvmG9pPZ4ggldr4a', '用户五', NULL, 2, '12345678906', NULL, 0, NULL, NULL, NULL, NULL, 12, 0, 0, 2, '2020-09-15 17:52:22', '2023-02-06 09:06:34'); +INSERT INTO `sys_user` VALUES (20, 'user06', '$2a$10$fKDoXZPU43tiFxXyzPXcu.kCpiv9ACtlgkxFeB/NBl4ti7GqI.EE.', '用户六', NULL, 1, '12345678907', NULL, 0, NULL, NULL, NULL, NULL, 12, 0, 0, 2, '2020-09-15 17:53:31', '2023-02-06 09:06:36'); +INSERT INTO `sys_user` VALUES (21, 'user07', '$2a$10$R4JW6t3GK7fz3B830WsRI.uoW5LZq9EG.VAopRyKXVemXDkpybYni', '用户七', NULL, 1, '12345678908', NULL, 0, NULL, NULL, NULL, NULL, 13, 0, 0, 2, '2020-10-20 23:28:40', '2023-02-06 09:06:38'); +INSERT INTO `sys_user` VALUES (22, 'user08', '$2a$10$EhZLneJiZjVd3qWXpiUXV.OC3mtTMNLepIjhUyQzgPqtvpBclMCm2', '用户八', NULL, 2, '12345678909', NULL, 0, NULL, NULL, NULL, NULL, 13, 1, 0, 2, '2020-10-20 23:29:03', '2023-02-06 09:06:40'); +INSERT INTO `sys_user` VALUES (23, 'user09', '$2a$10$jP8jv8A.uVSfKFzVpoNgmetdTK9pMAMjJh5wEQLH.sFVdMDILaXMS', '用户九', NULL, 2, '12345678910', NULL, 0, NULL, NULL, NULL, NULL, 14, 0, 0, 2, '2020-10-20 23:29:30', '2023-02-06 09:06:41'); +INSERT INTO `sys_user` VALUES (24, 'user10', '$2a$10$R/2v6h8bRhYsgryPwzgv8eFBl3jnALsqJ/O7DRHzLxuU/.T/JqO96', '用户十', NULL, 1, '12345678911', NULL, 0, NULL, NULL, NULL, NULL, 14, 1, 0, 2, '2020-10-20 23:29:55', '2023-02-06 09:06:44'); +INSERT INTO `sys_user` VALUES (25, 'user11', '$2a$10$mR4uT3Qley1UkXm6zJ4zd.OMXzUovwCYX52eFVC80FwCrkDeFwYl6', '用户十一', NULL, 1, '12345678912', NULL, 0, NULL, NULL, NULL, NULL, 15, 0, 0, 2, '2020-10-20 23:30:28', '2023-02-06 09:06:46'); +INSERT INTO `sys_user` VALUES (26, 'user12', '$2a$10$UveBloenMd4weP/6fHIkeeYZqPWNS6Y0NRxRGwXA1KzmwycklSAqa', '用户十二', NULL, 2, '12345678913', NULL, 0, NULL, NULL, NULL, NULL, 16, 0, 0, 2, '2020-10-20 23:30:53', '2023-02-06 09:06:49'); +INSERT INTO `sys_user` VALUES (27, 'admin', '$2a$10$sWH.qQmf/dHMURzE4kN0puBOdB7VWwcDFB2NvwpMaHYz6OFZwQGBy', '管理员', 'https://cdn.eleadmin.com/20200610/avatar.jpg', 2, '12345678901', 'eleadmin@eclouds.com', 0, NULL, NULL, '2021-05-21', '遗其欲,则心静!', 21, 0, 0, 3, '2020-01-13 14:43:52', '2023-04-10 15:08:51'); +INSERT INTO `sys_user` VALUES (28, 'user01', '$2a$10$y3j0Bnn4cMOErMLv31LUw.Drs/xs1peDQwT7YYHJbFX6xGDQcXUaK', '用户一', NULL, 2, '12345678902', NULL, 0, NULL, NULL, NULL, NULL, 21, 0, 0, 3, '2020-09-15 17:49:37', '2023-03-18 09:35:41'); +INSERT INTO `sys_user` VALUES (29, 'user02', '$2a$10$fF2qbzA1.zIOUZpedxtvoubQ9doxlSNSunGQLwYxnvSqM8Wx6AeGC', '用户二', NULL, 1, '12345678903', NULL, 0, NULL, NULL, NULL, NULL, 21, 0, 0, 3, '2020-09-15 17:50:20', '2023-02-06 09:10:16'); +INSERT INTO `sys_user` VALUES (30, 'user03', '$2a$10$iP1vojXrDgjTaU6ZY3dGfefXGmyftJbPhTuU7cWBxkNI3w20WwZOW', '用户三', NULL, 2, '12345678904', NULL, 0, NULL, NULL, NULL, NULL, 21, 0, 0, 3, '2020-09-15 17:50:51', '2023-02-28 16:35:11'); +INSERT INTO `sys_user` VALUES (31, 'user04', '$2a$10$iMsEmh.rPlzwy/SVe6KW3.62vlwqMJpibhCF9jYN.fMqxdqymzMzu', '用户四', NULL, 1, '12345678905', NULL, 0, NULL, NULL, NULL, NULL, 22, 0, 0, 3, '2020-09-15 17:51:50', '2023-02-06 09:10:19'); +INSERT INTO `sys_user` VALUES (32, 'user05', '$2a$10$6bdw9kiSq6cefcwN1nvcyOyWxgKxNipVsR7M1QvmG9pPZ4ggldr4a', '用户五', NULL, 2, '12345678906', NULL, 0, NULL, NULL, NULL, NULL, 22, 0, 0, 3, '2020-09-15 17:52:22', '2023-02-06 09:10:21'); +INSERT INTO `sys_user` VALUES (33, 'user06', '$2a$10$fKDoXZPU43tiFxXyzPXcu.kCpiv9ACtlgkxFeB/NBl4ti7GqI.EE.', '用户六', NULL, 1, '12345678907', NULL, 0, NULL, NULL, NULL, NULL, 22, 0, 0, 3, '2020-09-15 17:53:31', '2023-02-06 09:10:23'); +INSERT INTO `sys_user` VALUES (34, 'user07', '$2a$10$R4JW6t3GK7fz3B830WsRI.uoW5LZq9EG.VAopRyKXVemXDkpybYni', '用户七', NULL, 1, '12345678908', NULL, 0, NULL, NULL, NULL, NULL, 23, 0, 0, 3, '2020-10-20 23:28:40', '2023-02-06 09:10:25'); +INSERT INTO `sys_user` VALUES (35, 'user08', '$2a$10$AFQ5PLZCf.Y1N9vqoNIJouTTdydXyogoc3AG.7eJylS1LCSJnt7JW', '用户八', NULL, 2, '12345678909', NULL, 0, NULL, NULL, NULL, NULL, 23, 1, 0, 3, '2020-10-20 23:29:03', '2023-04-10 17:43:34'); +INSERT INTO `sys_user` VALUES (36, 'user09', '$2a$10$jP8jv8A.uVSfKFzVpoNgmetdTK9pMAMjJh5wEQLH.sFVdMDILaXMS', '用户九', NULL, 2, '12345678910', NULL, 0, NULL, NULL, NULL, NULL, 24, 0, 0, 3, '2020-10-20 23:29:30', '2023-02-06 09:10:29'); +INSERT INTO `sys_user` VALUES (37, 'user10', '$2a$10$NUC0kr7w91XBwsQivqALF.9STqNUgr2X7jtArwkfVba7meNfWxYn6', '用户十', NULL, 1, '12345678911', NULL, 0, NULL, NULL, NULL, NULL, 24, 1, 0, 3, '2020-10-20 23:29:55', '2023-04-11 22:05:46'); +INSERT INTO `sys_user` VALUES (38, 'user11', '$2a$10$mR4uT3Qley1UkXm6zJ4zd.OMXzUovwCYX52eFVC80FwCrkDeFwYl6', '用户十一', NULL, 1, '12345678912', NULL, 0, NULL, NULL, NULL, NULL, 25, 0, 0, 3, '2020-10-20 23:30:28', '2023-02-06 09:10:32'); +INSERT INTO `sys_user` VALUES (39, 'user12', '$2a$10$UveBloenMd4weP/6fHIkeeYZqPWNS6Y0NRxRGwXA1KzmwycklSAqa', '用户十二', NULL, 2, '12345678913', NULL, 0, NULL, NULL, NULL, NULL, 26, 0, 0, 3, '2020-10-20 23:30:53', '2023-03-06 15:51:07'); +INSERT INTO `sys_user` VALUES (40, 'admin', '$2a$10$sWH.qQmf/dHMURzE4kN0puBOdB7VWwcDFB2NvwpMaHYz6OFZwQGBy', '管理员', 'https://cdn.eleadmin.com/20200610/avatar.jpg', 2, '12345678901', 'eleadmin@eclouds.com', 0, NULL, NULL, '2021-05-21', '遗其欲,则心静!', 31, 0, 0, 4, '2020-01-13 14:43:52', '2023-04-10 15:08:51'); +INSERT INTO `sys_user` VALUES (41, 'user01', '$2a$10$y3j0Bnn4cMOErMLv31LUw.Drs/xs1peDQwT7YYHJbFX6xGDQcXUaK', '用户一', 'https://cdn.eleadmin.com/20200610/avatar.jpg', 2, '12345678902', NULL, 0, NULL, NULL, NULL, NULL, 31, 0, 0, 4, '2020-09-15 17:49:37', '2023-06-15 00:37:45'); +INSERT INTO `sys_user` VALUES (42, 'user02', '$2a$10$fF2qbzA1.zIOUZpedxtvoubQ9doxlSNSunGQLwYxnvSqM8Wx6AeGC', '用户二', NULL, 1, '12345678903', NULL, 0, NULL, NULL, NULL, NULL, 31, 0, 0, 4, '2020-09-15 17:50:20', '2023-05-24 23:21:38'); +INSERT INTO `sys_user` VALUES (43, 'user03', '$2a$10$iP1vojXrDgjTaU6ZY3dGfefXGmyftJbPhTuU7cWBxkNI3w20WwZOW', '用户三', NULL, 2, '12345678904', NULL, 0, NULL, NULL, NULL, NULL, 31, 0, 0, 4, '2020-09-15 17:50:51', '2023-06-02 00:11:21'); +INSERT INTO `sys_user` VALUES (44, 'user04', '$2a$10$iMsEmh.rPlzwy/SVe6KW3.62vlwqMJpibhCF9jYN.fMqxdqymzMzu', '用户四', NULL, 1, '12345678905', NULL, 0, NULL, NULL, NULL, NULL, 32, 0, 0, 4, '2020-09-15 17:51:50', '2023-02-06 09:10:19'); +INSERT INTO `sys_user` VALUES (45, 'user05', '$2a$10$6bdw9kiSq6cefcwN1nvcyOyWxgKxNipVsR7M1QvmG9pPZ4ggldr4a', '用户五', NULL, 2, '12345678906', NULL, 0, NULL, NULL, NULL, NULL, 32, 0, 0, 4, '2020-09-15 17:52:22', '2023-02-06 09:10:21'); +INSERT INTO `sys_user` VALUES (46, 'user06', '$2a$10$fKDoXZPU43tiFxXyzPXcu.kCpiv9ACtlgkxFeB/NBl4ti7GqI.EE.', '用户六', NULL, 1, '12345678907', NULL, 0, NULL, NULL, NULL, NULL, 32, 0, 0, 4, '2020-09-15 17:53:31', '2023-02-06 09:10:23'); +INSERT INTO `sys_user` VALUES (47, 'user07', '$2a$10$R4JW6t3GK7fz3B830WsRI.uoW5LZq9EG.VAopRyKXVemXDkpybYni', '用户七', NULL, 1, '12345678908', NULL, 0, NULL, NULL, NULL, NULL, 33, 0, 0, 4, '2020-10-20 23:28:40', '2023-02-06 09:10:25'); +INSERT INTO `sys_user` VALUES (48, 'user08', '$2a$10$AFQ5PLZCf.Y1N9vqoNIJouTTdydXyogoc3AG.7eJylS1LCSJnt7JW', '用户八', NULL, 2, '12345678909', NULL, 0, NULL, NULL, NULL, NULL, 33, 1, 0, 4, '2020-10-20 23:29:03', '2023-06-13 21:57:35'); +INSERT INTO `sys_user` VALUES (49, 'user09', '$2a$10$jP8jv8A.uVSfKFzVpoNgmetdTK9pMAMjJh5wEQLH.sFVdMDILaXMS', '用户九', NULL, 2, '12345678910', NULL, 0, NULL, NULL, NULL, NULL, 34, 0, 0, 4, '2020-10-20 23:29:30', '2023-02-06 09:10:29'); +INSERT INTO `sys_user` VALUES (50, 'user10', '$2a$10$NUC0kr7w91XBwsQivqALF.9STqNUgr2X7jtArwkfVba7meNfWxYn6', '用户十', NULL, 1, '12345678911', NULL, 0, NULL, NULL, NULL, NULL, 34, 1, 0, 4, '2020-10-20 23:29:55', '2023-06-13 23:03:56'); +INSERT INTO `sys_user` VALUES (51, 'user11', '$2a$10$mR4uT3Qley1UkXm6zJ4zd.OMXzUovwCYX52eFVC80FwCrkDeFwYl6', '用户十一', NULL, 1, '12345678912', NULL, 0, NULL, NULL, NULL, NULL, 35, 0, 0, 4, '2020-10-20 23:30:28', '2023-06-13 23:04:05'); +INSERT INTO `sys_user` VALUES (52, 'user12', '$2a$10$UveBloenMd4weP/6fHIkeeYZqPWNS6Y0NRxRGwXA1KzmwycklSAqa', '用户十二', NULL, 2, '12345678913', NULL, 0, NULL, NULL, NULL, NULL, 36, 0, 0, 4, '2020-10-20 23:30:53', '2023-06-11 22:49:13'); + +-- ---------------------------- +-- Table structure for sys_user_file +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user_file`; +CREATE TABLE `sys_user_file` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `user_id` int(11) NOT NULL COMMENT '用户id', + `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称', + `is_directory` int(11) NULL DEFAULT NULL COMMENT '是否是文件夹', + `parent_id` int(11) NULL DEFAULT NULL COMMENT '上级id', + `path` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件路径', + `length` int(11) NULL DEFAULT NULL COMMENT '文件大小', + `content_type` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件类型', + `deleted` int(11) NOT NULL DEFAULT 0 COMMENT '是否删除, 0否, 1是', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 209 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户文件' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_user_file +-- ---------------------------- +INSERT INTO `sys_user_file` VALUES (1, 1, '我的图片', 1, 0, NULL, NULL, NULL, 0, 1, '2022-07-22 11:28:02', '2022-07-22 16:08:28'); +INSERT INTO `sys_user_file` VALUES (2, 1, '我的文件', 1, 0, NULL, NULL, NULL, 0, 1, '2022-07-22 11:28:09', '2022-07-22 16:08:30'); +INSERT INTO `sys_user_file` VALUES (3, 1, 'avatar.jpg', 0, 0, '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', 0, 1, '2022-07-22 11:28:16', '2022-07-22 16:08:31'); +INSERT INTO `sys_user_file` VALUES (4, 1, 'logo.svg', 0, 0, '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', 0, 1, '2022-07-22 11:28:21', '2022-07-22 16:08:32'); +INSERT INTO `sys_user_file` VALUES (5, 1, 'favicon.ico', 0, 0, '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', 0, 1, '2022-07-22 11:29:11', '2022-07-22 16:08:32'); +INSERT INTO `sys_user_file` VALUES (6, 1, '用户导入模板.xlsx', 0, 0, '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 0, 1, '2022-07-22 11:29:24', '2022-07-22 16:08:35'); +INSERT INTO `sys_user_file` VALUES (7, 1, 'classes.json', 0, 0, '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', 0, 1, '2022-07-22 11:29:28', '2022-07-22 16:08:34'); +INSERT INTO `sys_user_file` VALUES (8, 1, '壁纸', 1, 1, NULL, NULL, NULL, 0, 1, '2022-07-22 11:30:58', '2022-07-22 16:08:36'); +INSERT INTO `sys_user_file` VALUES (9, 1, '头像', 1, 1, NULL, NULL, NULL, 0, 1, '2022-07-22 11:31:02', '2022-07-22 16:08:37'); +INSERT INTO `sys_user_file` VALUES (10, 1, 'pro202012301.png', 0, 1, '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', 0, 1, '2022-07-22 11:34:39', '2022-07-22 16:08:37'); +INSERT INTO `sys_user_file` VALUES (11, 1, 'pro202012302.png', 0, 1, '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', 0, 1, '2022-07-22 11:34:43', '2022-07-22 16:08:38'); +INSERT INTO `sys_user_file` VALUES (12, 1, 'pro202012303.png', 0, 1, '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', 0, 1, '2022-07-22 11:34:47', '2022-07-22 16:08:39'); +INSERT INTO `sys_user_file` VALUES (13, 1, 'eleadmin20201020172822.png', 0, 1, '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', 0, 1, '2022-07-22 13:02:52', '2022-07-22 16:08:39'); +INSERT INTO `sys_user_file` VALUES (14, 1, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', 0, 8, '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', 0, 1, '2022-07-22 13:34:41', '2022-07-22 16:08:40'); +INSERT INTO `sys_user_file` VALUES (15, 1, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', 0, 8, '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', 0, 1, '2022-07-22 13:34:49', '2022-07-22 16:08:41'); +INSERT INTO `sys_user_file` VALUES (16, 1, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', 0, 8, '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', 0, 1, '2022-07-22 13:34:54', '2022-07-22 16:08:42'); +INSERT INTO `sys_user_file` VALUES (17, 1, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', 0, 8, '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', 0, 1, '2022-07-22 13:35:03', '2022-07-22 16:08:42'); +INSERT INTO `sys_user_file` VALUES (18, 1, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', 0, 8, '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', 0, 1, '2022-07-22 13:35:08', '2022-07-22 16:08:43'); +INSERT INTO `sys_user_file` VALUES (19, 1, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', 0, 8, '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', 0, 1, '2022-07-22 13:35:12', '2022-07-22 16:08:43'); +INSERT INTO `sys_user_file` VALUES (20, 1, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', 0, 8, '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', 0, 1, '2022-07-22 13:35:17', '2022-07-22 16:08:44'); +INSERT INTO `sys_user_file` VALUES (21, 1, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', 0, 8, '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', 0, 1, '2022-07-22 13:35:26', '2022-07-22 16:08:45'); +INSERT INTO `sys_user_file` VALUES (22, 1, 'faa0202700ee455b90fe77d8bef98bc0.jpg', 0, 9, '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', 0, 1, '2022-07-22 13:36:21', '2022-07-22 16:08:45'); +INSERT INTO `sys_user_file` VALUES (23, 1, 'fe9196dd091e438fba115205c1003ee7.jpg', 0, 9, '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', 0, 1, '2022-07-22 13:36:34', '2022-07-22 16:08:46'); +INSERT INTO `sys_user_file` VALUES (24, 1, '21222950dc174485b2ec5088435a46a3.jpg', 0, 9, '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', 0, 1, '2022-07-22 13:37:49', '2022-07-22 16:08:47'); +INSERT INTO `sys_user_file` VALUES (25, 1, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', 0, 9, '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', 0, 1, '2022-07-22 13:37:53', '2022-07-22 16:08:47'); +INSERT INTO `sys_user_file` VALUES (26, 1, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', 0, 9, '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', 0, 1, '2022-07-22 13:37:56', '2022-07-22 16:08:48'); +INSERT INTO `sys_user_file` VALUES (27, 1, 'b6a811873e704db49db994053a5019b2.jpg', 0, 9, '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', 0, 1, '2022-07-22 13:38:00', '2022-07-22 16:08:49'); +INSERT INTO `sys_user_file` VALUES (28, 1, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', 0, 9, '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', 0, 1, '2022-07-22 13:38:09', '2022-07-22 16:08:49'); +INSERT INTO `sys_user_file` VALUES (29, 1, 'c184eef391ae48dba87e3057e70238fb.jpg', 0, 9, '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', 0, 1, '2022-07-22 13:38:15', '2022-07-22 16:08:50'); +INSERT INTO `sys_user_file` VALUES (30, 1, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', 0, 9, '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', 0, 1, '2022-07-22 13:38:22', '2022-07-22 16:08:51'); +INSERT INTO `sys_user_file` VALUES (31, 1, '8931360b593040238d894a542c9037bc.jpg', 0, 9, '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', 0, 1, '2022-07-22 13:38:26', '2022-07-22 16:08:52'); +INSERT INTO `sys_user_file` VALUES (32, 1, 'e36594e7423147748b2592ccb720ae9e.jpg', 0, 9, '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', 0, 1, '2022-07-22 13:39:16', '2022-07-22 16:08:58'); +INSERT INTO `sys_user_file` VALUES (33, 1, 'f6bc05af944a4f738b54128717952107.jpg', 0, 9, '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', 0, 1, '2022-07-22 13:39:20', '2022-07-22 16:08:59'); +INSERT INTO `sys_user_file` VALUES (34, 1, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', 0, 9, '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', 0, 1, '2022-07-22 13:39:24', '2022-07-22 16:08:59'); +INSERT INTO `sys_user_file` VALUES (35, 1, '0bfaa58e801b47fb9f56dcb128206d94.jpg', 0, 9, '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', 0, 1, '2022-07-22 13:39:28', '2022-07-22 16:09:00'); +INSERT INTO `sys_user_file` VALUES (36, 1, '12b3d575a2a24e0789a014bd6ce7585b.jpg', 0, 9, '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', 0, 1, '2022-07-22 13:39:32', '2022-07-22 16:09:01'); +INSERT INTO `sys_user_file` VALUES (37, 1, '2d98970a51b34b6b859339c96b240dcd.jpg', 0, 9, '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', 0, 1, '2022-07-22 13:39:36', '2022-07-22 16:09:02'); +INSERT INTO `sys_user_file` VALUES (38, 1, '3cc0f65fefbe448191aa728d80f6b97e.jpg', 0, 9, '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', 0, 1, '2022-07-22 13:39:40', '2022-07-22 16:09:02'); +INSERT INTO `sys_user_file` VALUES (39, 1, '41d81834e87546f49d3ff48c3806ea92.jpg', 0, 9, '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', 0, 1, '2022-07-22 13:39:45', '2022-07-22 16:09:03'); +INSERT INTO `sys_user_file` VALUES (40, 1, '4e60a84551fa48439bf42ecdb9673331.jpg', 0, 9, '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', 0, 1, '2022-07-22 13:39:49', '2022-07-22 16:09:04'); +INSERT INTO `sys_user_file` VALUES (41, 1, '66e6f6c60cfa44b288d6343027b544d0.jpg', 0, 9, '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', 0, 1, '2022-07-22 13:39:53', '2022-07-22 16:09:04'); +INSERT INTO `sys_user_file` VALUES (42, 1, 'd6442cfa99b64b51aabfc470055b05dc.jpg', 0, 9, '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', 0, 1, '2022-07-22 13:39:58', '2022-07-22 16:09:05'); +INSERT INTO `sys_user_file` VALUES (43, 1, '948344a2a77c47a7a7b332fe12ff749a.jpg', 0, 9, '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', 0, 1, '2022-07-22 13:40:04', '2022-07-22 16:09:05'); +INSERT INTO `sys_user_file` VALUES (44, 1, '20200708230820.png', 0, 2, '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', 0, 1, '2022-07-22 13:52:55', '2022-07-22 16:09:06'); +INSERT INTO `sys_user_file` VALUES (45, 1, 'china-provinces.geo.json', 0, 2, '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', 0, 1, '2022-07-22 13:55:46', '2022-07-22 16:09:07'); +INSERT INTO `sys_user_file` VALUES (46, 1, 'word.geo.json', 0, 2, '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', 0, 1, '2022-07-22 13:55:51', '2022-07-22 16:09:08'); +INSERT INTO `sys_user_file` VALUES (47, 1, '20200708224450.pdf', 0, 2, '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', 0, 1, '2022-07-22 13:55:55', '2022-07-22 16:09:10'); +INSERT INTO `sys_user_file` VALUES (48, 1, '20200708224450.docx', 0, 2, '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 0, 1, '2022-07-22 13:55:58', '2022-07-22 16:09:10'); +INSERT INTO `sys_user_file` VALUES (49, 1, 'document.json', 0, 2, '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', 0, 1, '2022-07-22 13:57:16', '2022-07-22 16:09:11'); +INSERT INTO `sys_user_file` VALUES (50, 1, 'archive.json', 0, 2, '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', 0, 1, '2022-07-22 13:57:19', '2022-07-22 16:09:13'); +INSERT INTO `sys_user_file` VALUES (51, 1, 'eleadmin-copyright.jpg', 0, 2, '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', 0, 1, '2022-07-22 13:57:23', '2022-07-22 16:09:14'); +INSERT INTO `sys_user_file` VALUES (52, 1, 'eleadmin-pro-copyright.jpg', 0, 2, '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', 0, 1, '2022-07-22 13:57:25', '2022-07-22 16:09:16'); +INSERT INTO `sys_user_file` VALUES (53, 14, '我的图片', 1, 0, NULL, NULL, NULL, 0, 2, '2022-07-22 11:28:02', '2022-07-22 11:28:02'); +INSERT INTO `sys_user_file` VALUES (54, 14, '我的文件', 1, 0, NULL, NULL, NULL, 0, 2, '2022-07-22 11:28:09', '2022-07-22 11:28:09'); +INSERT INTO `sys_user_file` VALUES (55, 14, 'avatar.jpg', 0, 0, '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', 0, 2, '2022-07-22 11:28:16', '2022-07-22 11:28:16'); +INSERT INTO `sys_user_file` VALUES (56, 14, 'logo.svg', 0, 0, '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', 0, 2, '2022-07-22 11:28:21', '2022-07-22 11:28:21'); +INSERT INTO `sys_user_file` VALUES (57, 14, 'favicon.ico', 0, 0, '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', 0, 2, '2022-07-22 11:29:11', '2022-07-22 11:29:11'); +INSERT INTO `sys_user_file` VALUES (58, 14, '用户导入模板.xlsx', 0, 0, '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 0, 2, '2022-07-22 11:29:24', '2022-07-22 11:29:24'); +INSERT INTO `sys_user_file` VALUES (59, 14, 'classes.json', 0, 0, '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', 0, 2, '2022-07-22 11:29:28', '2022-07-22 11:29:28'); +INSERT INTO `sys_user_file` VALUES (60, 14, '壁纸', 1, 53, NULL, NULL, NULL, 0, 2, '2022-07-22 11:30:58', '2022-07-22 16:10:42'); +INSERT INTO `sys_user_file` VALUES (61, 14, '头像', 1, 53, NULL, NULL, NULL, 0, 2, '2022-07-22 11:31:02', '2022-07-22 16:10:43'); +INSERT INTO `sys_user_file` VALUES (62, 14, 'pro202012301.png', 0, 53, '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', 0, 2, '2022-07-22 11:34:39', '2022-07-22 16:10:44'); +INSERT INTO `sys_user_file` VALUES (63, 14, 'pro202012302.png', 0, 53, '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', 0, 2, '2022-07-22 11:34:43', '2022-07-22 16:10:44'); +INSERT INTO `sys_user_file` VALUES (64, 14, 'pro202012303.png', 0, 53, '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', 0, 2, '2022-07-22 11:34:47', '2022-07-22 16:10:45'); +INSERT INTO `sys_user_file` VALUES (65, 14, 'eleadmin20201020172822.png', 0, 53, '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', 0, 2, '2022-07-22 13:02:52', '2022-07-22 16:10:46'); +INSERT INTO `sys_user_file` VALUES (66, 14, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', 0, 60, '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', 0, 2, '2022-07-22 13:34:41', '2022-07-22 16:10:55'); +INSERT INTO `sys_user_file` VALUES (67, 14, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', 0, 60, '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', 0, 2, '2022-07-22 13:34:49', '2022-07-22 16:10:56'); +INSERT INTO `sys_user_file` VALUES (68, 14, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', 0, 60, '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', 0, 2, '2022-07-22 13:34:54', '2022-07-22 16:10:57'); +INSERT INTO `sys_user_file` VALUES (69, 14, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', 0, 60, '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', 0, 2, '2022-07-22 13:35:03', '2022-07-22 16:10:57'); +INSERT INTO `sys_user_file` VALUES (70, 14, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', 0, 60, '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', 0, 2, '2022-07-22 13:35:08', '2022-07-22 16:10:58'); +INSERT INTO `sys_user_file` VALUES (71, 14, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', 0, 60, '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', 0, 2, '2022-07-22 13:35:12', '2022-07-22 16:10:59'); +INSERT INTO `sys_user_file` VALUES (72, 14, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', 0, 60, '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', 0, 2, '2022-07-22 13:35:17', '2022-07-22 16:10:59'); +INSERT INTO `sys_user_file` VALUES (73, 14, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', 0, 60, '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', 0, 2, '2022-07-22 13:35:26', '2022-07-22 16:11:00'); +INSERT INTO `sys_user_file` VALUES (74, 14, 'faa0202700ee455b90fe77d8bef98bc0.jpg', 0, 61, '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', 0, 2, '2022-07-22 13:36:21', '2022-07-22 16:11:04'); +INSERT INTO `sys_user_file` VALUES (75, 14, 'fe9196dd091e438fba115205c1003ee7.jpg', 0, 61, '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', 0, 2, '2022-07-22 13:36:34', '2022-07-22 16:11:05'); +INSERT INTO `sys_user_file` VALUES (76, 14, '21222950dc174485b2ec5088435a46a3.jpg', 0, 61, '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', 0, 2, '2022-07-22 13:37:49', '2022-07-22 16:11:06'); +INSERT INTO `sys_user_file` VALUES (77, 14, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', 0, 61, '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', 0, 2, '2022-07-22 13:37:53', '2022-07-22 16:11:06'); +INSERT INTO `sys_user_file` VALUES (78, 14, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', 0, 61, '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', 0, 2, '2022-07-22 13:37:56', '2022-07-22 16:11:07'); +INSERT INTO `sys_user_file` VALUES (79, 14, 'b6a811873e704db49db994053a5019b2.jpg', 0, 61, '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', 0, 2, '2022-07-22 13:38:00', '2022-07-22 16:11:08'); +INSERT INTO `sys_user_file` VALUES (80, 14, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', 0, 61, '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', 0, 2, '2022-07-22 13:38:09', '2022-07-22 16:11:09'); +INSERT INTO `sys_user_file` VALUES (81, 14, 'c184eef391ae48dba87e3057e70238fb.jpg', 0, 61, '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', 0, 2, '2022-07-22 13:38:15', '2022-07-22 16:11:09'); +INSERT INTO `sys_user_file` VALUES (82, 14, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', 0, 61, '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', 0, 2, '2022-07-22 13:38:22', '2022-07-22 16:11:10'); +INSERT INTO `sys_user_file` VALUES (83, 14, '8931360b593040238d894a542c9037bc.jpg', 0, 61, '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', 0, 2, '2022-07-22 13:38:26', '2022-07-22 16:11:11'); +INSERT INTO `sys_user_file` VALUES (84, 14, 'e36594e7423147748b2592ccb720ae9e.jpg', 0, 61, '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', 0, 2, '2022-07-22 13:39:16', '2022-07-22 16:11:12'); +INSERT INTO `sys_user_file` VALUES (85, 14, 'f6bc05af944a4f738b54128717952107.jpg', 0, 61, '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', 0, 2, '2022-07-22 13:39:20', '2022-07-22 16:11:13'); +INSERT INTO `sys_user_file` VALUES (86, 14, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', 0, 61, '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', 0, 2, '2022-07-22 13:39:24', '2022-07-22 16:11:19'); +INSERT INTO `sys_user_file` VALUES (87, 14, '0bfaa58e801b47fb9f56dcb128206d94.jpg', 0, 61, '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', 0, 2, '2022-07-22 13:39:28', '2022-07-22 16:11:20'); +INSERT INTO `sys_user_file` VALUES (88, 14, '12b3d575a2a24e0789a014bd6ce7585b.jpg', 0, 61, '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', 0, 2, '2022-07-22 13:39:32', '2022-07-22 16:11:20'); +INSERT INTO `sys_user_file` VALUES (89, 14, '2d98970a51b34b6b859339c96b240dcd.jpg', 0, 61, '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', 0, 2, '2022-07-22 13:39:36', '2022-07-22 16:11:21'); +INSERT INTO `sys_user_file` VALUES (90, 14, '3cc0f65fefbe448191aa728d80f6b97e.jpg', 0, 61, '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', 0, 2, '2022-07-22 13:39:40', '2022-07-22 16:11:21'); +INSERT INTO `sys_user_file` VALUES (91, 14, '41d81834e87546f49d3ff48c3806ea92.jpg', 0, 61, '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', 0, 2, '2022-07-22 13:39:45', '2022-07-22 16:11:22'); +INSERT INTO `sys_user_file` VALUES (92, 14, '4e60a84551fa48439bf42ecdb9673331.jpg', 0, 61, '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', 0, 2, '2022-07-22 13:39:49', '2022-07-22 16:11:23'); +INSERT INTO `sys_user_file` VALUES (93, 14, '66e6f6c60cfa44b288d6343027b544d0.jpg', 0, 61, '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', 0, 2, '2022-07-22 13:39:53', '2022-07-22 16:11:24'); +INSERT INTO `sys_user_file` VALUES (94, 14, 'd6442cfa99b64b51aabfc470055b05dc.jpg', 0, 61, '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', 0, 2, '2022-07-22 13:39:58', '2022-07-22 16:11:24'); +INSERT INTO `sys_user_file` VALUES (95, 14, '948344a2a77c47a7a7b332fe12ff749a.jpg', 0, 61, '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', 0, 2, '2022-07-22 13:40:04', '2022-07-22 16:11:25'); +INSERT INTO `sys_user_file` VALUES (96, 14, '20200708230820.png', 0, 54, '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', 0, 2, '2022-07-22 13:52:55', '2022-07-22 16:11:32'); +INSERT INTO `sys_user_file` VALUES (97, 14, 'china-provinces.geo.json', 0, 54, '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', 0, 2, '2022-07-22 13:55:46', '2022-07-22 16:11:32'); +INSERT INTO `sys_user_file` VALUES (98, 14, 'word.geo.json', 0, 54, '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', 0, 2, '2022-07-22 13:55:51', '2022-07-22 16:11:33'); +INSERT INTO `sys_user_file` VALUES (99, 14, '20200708224450.pdf', 0, 54, '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', 0, 2, '2022-07-22 13:55:55', '2022-07-22 16:11:33'); +INSERT INTO `sys_user_file` VALUES (100, 14, '20200708224450.docx', 0, 54, '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 0, 2, '2022-07-22 13:55:58', '2022-07-22 16:11:34'); +INSERT INTO `sys_user_file` VALUES (101, 14, 'document.json', 0, 54, '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', 0, 2, '2022-07-22 13:57:16', '2022-07-22 16:11:35'); +INSERT INTO `sys_user_file` VALUES (102, 14, 'archive.json', 0, 54, '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', 0, 2, '2022-07-22 13:57:19', '2022-07-22 16:11:36'); +INSERT INTO `sys_user_file` VALUES (103, 14, 'eleadmin-copyright.jpg', 0, 54, '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', 0, 2, '2022-07-22 13:57:23', '2022-07-22 16:11:36'); +INSERT INTO `sys_user_file` VALUES (104, 14, 'eleadmin-pro-copyright.jpg', 0, 54, '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', 0, 2, '2022-07-22 13:57:25', '2022-07-22 16:11:37'); +INSERT INTO `sys_user_file` VALUES (105, 27, '我的图片', 1, 0, NULL, NULL, NULL, 0, 3, '2022-07-22 11:28:02', '2022-07-22 16:08:28'); +INSERT INTO `sys_user_file` VALUES (106, 27, '我的文件', 1, 0, NULL, NULL, NULL, 0, 3, '2022-07-22 11:28:09', '2022-07-22 16:08:30'); +INSERT INTO `sys_user_file` VALUES (107, 27, 'avatar.jpg', 0, 0, '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', 0, 3, '2022-07-22 11:28:16', '2022-07-22 16:08:31'); +INSERT INTO `sys_user_file` VALUES (108, 27, 'logo.svg', 0, 0, '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', 0, 3, '2022-07-22 11:28:21', '2022-07-22 16:08:32'); +INSERT INTO `sys_user_file` VALUES (109, 27, 'favicon.ico', 0, 0, '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', 0, 3, '2022-07-22 11:29:11', '2022-07-22 16:08:32'); +INSERT INTO `sys_user_file` VALUES (110, 27, '用户导入模板.xlsx', 0, 0, '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 0, 3, '2022-07-22 11:29:24', '2022-07-22 16:08:35'); +INSERT INTO `sys_user_file` VALUES (111, 27, 'classes.json', 0, 0, '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', 0, 3, '2022-07-22 11:29:28', '2022-07-22 16:08:34'); +INSERT INTO `sys_user_file` VALUES (112, 27, '壁纸', 1, 105, NULL, NULL, NULL, 0, 3, '2022-07-22 11:30:58', '2022-07-22 16:08:36'); +INSERT INTO `sys_user_file` VALUES (113, 27, '头像', 1, 105, NULL, NULL, NULL, 0, 3, '2022-07-22 11:31:02', '2022-07-22 16:08:37'); +INSERT INTO `sys_user_file` VALUES (114, 27, 'pro202012301.png', 0, 105, '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', 0, 3, '2022-07-22 11:34:39', '2022-07-22 16:08:37'); +INSERT INTO `sys_user_file` VALUES (115, 27, 'pro202012302.png', 0, 105, '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', 0, 3, '2022-07-22 11:34:43', '2022-07-22 16:08:38'); +INSERT INTO `sys_user_file` VALUES (116, 27, 'pro202012303.png', 0, 105, '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', 0, 3, '2022-07-22 11:34:47', '2022-07-22 16:08:39'); +INSERT INTO `sys_user_file` VALUES (117, 27, 'eleadmin20201020172822.png', 0, 105, '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', 0, 3, '2022-07-22 13:02:52', '2022-07-22 16:08:39'); +INSERT INTO `sys_user_file` VALUES (118, 27, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', 0, 112, '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', 0, 3, '2022-07-22 13:34:41', '2022-07-22 16:08:40'); +INSERT INTO `sys_user_file` VALUES (119, 27, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', 0, 112, '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', 0, 3, '2022-07-22 13:34:49', '2022-07-22 16:08:41'); +INSERT INTO `sys_user_file` VALUES (120, 27, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', 0, 112, '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', 0, 3, '2022-07-22 13:34:54', '2022-07-22 16:08:42'); +INSERT INTO `sys_user_file` VALUES (121, 27, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', 0, 112, '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', 0, 3, '2022-07-22 13:35:03', '2022-07-22 16:08:42'); +INSERT INTO `sys_user_file` VALUES (122, 27, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', 0, 112, '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', 0, 3, '2022-07-22 13:35:08', '2022-07-22 16:08:43'); +INSERT INTO `sys_user_file` VALUES (123, 27, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', 0, 112, '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', 0, 3, '2022-07-22 13:35:12', '2022-07-22 16:08:43'); +INSERT INTO `sys_user_file` VALUES (124, 27, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', 0, 112, '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', 0, 3, '2022-07-22 13:35:17', '2022-07-22 16:08:44'); +INSERT INTO `sys_user_file` VALUES (125, 27, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', 0, 112, '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', 0, 3, '2022-07-22 13:35:26', '2022-07-22 16:08:45'); +INSERT INTO `sys_user_file` VALUES (126, 27, 'faa0202700ee455b90fe77d8bef98bc0.jpg', 0, 113, '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', 0, 3, '2022-07-22 13:36:21', '2022-07-22 16:08:45'); +INSERT INTO `sys_user_file` VALUES (127, 27, 'fe9196dd091e438fba115205c1003ee7.jpg', 0, 113, '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', 0, 3, '2022-07-22 13:36:34', '2022-07-22 16:08:46'); +INSERT INTO `sys_user_file` VALUES (128, 27, '21222950dc174485b2ec5088435a46a3.jpg', 0, 113, '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', 0, 3, '2022-07-22 13:37:49', '2022-07-22 16:08:47'); +INSERT INTO `sys_user_file` VALUES (129, 27, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', 0, 113, '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', 0, 3, '2022-07-22 13:37:53', '2022-07-22 16:08:47'); +INSERT INTO `sys_user_file` VALUES (130, 27, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', 0, 113, '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', 0, 3, '2022-07-22 13:37:56', '2022-07-22 16:08:48'); +INSERT INTO `sys_user_file` VALUES (131, 27, 'b6a811873e704db49db994053a5019b2.jpg', 0, 113, '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', 0, 3, '2022-07-22 13:38:00', '2022-07-22 16:08:49'); +INSERT INTO `sys_user_file` VALUES (132, 27, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', 0, 113, '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', 0, 3, '2022-07-22 13:38:09', '2022-07-22 16:08:49'); +INSERT INTO `sys_user_file` VALUES (133, 27, 'c184eef391ae48dba87e3057e70238fb.jpg', 0, 113, '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', 0, 3, '2022-07-22 13:38:15', '2022-07-22 16:08:50'); +INSERT INTO `sys_user_file` VALUES (134, 27, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', 0, 113, '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', 0, 3, '2022-07-22 13:38:22', '2022-07-22 16:08:51'); +INSERT INTO `sys_user_file` VALUES (135, 27, '8931360b593040238d894a542c9037bc.jpg', 0, 113, '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', 0, 3, '2022-07-22 13:38:26', '2022-07-22 16:08:52'); +INSERT INTO `sys_user_file` VALUES (136, 27, 'e36594e7423147748b2592ccb720ae9e.jpg', 0, 113, '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', 0, 3, '2022-07-22 13:39:16', '2022-07-22 16:08:58'); +INSERT INTO `sys_user_file` VALUES (137, 27, 'f6bc05af944a4f738b54128717952107.jpg', 0, 113, '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', 0, 3, '2022-07-22 13:39:20', '2022-07-22 16:08:59'); +INSERT INTO `sys_user_file` VALUES (138, 27, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', 0, 113, '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', 0, 3, '2022-07-22 13:39:24', '2022-07-22 16:08:59'); +INSERT INTO `sys_user_file` VALUES (139, 27, '0bfaa58e801b47fb9f56dcb128206d94.jpg', 0, 113, '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', 0, 3, '2022-07-22 13:39:28', '2022-07-22 16:09:00'); +INSERT INTO `sys_user_file` VALUES (140, 27, '12b3d575a2a24e0789a014bd6ce7585b.jpg', 0, 113, '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', 0, 3, '2022-07-22 13:39:32', '2022-07-22 16:09:01'); +INSERT INTO `sys_user_file` VALUES (141, 27, '2d98970a51b34b6b859339c96b240dcd.jpg', 0, 113, '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', 0, 3, '2022-07-22 13:39:36', '2022-07-22 16:09:02'); +INSERT INTO `sys_user_file` VALUES (142, 27, '3cc0f65fefbe448191aa728d80f6b97e.jpg', 0, 113, '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', 0, 3, '2022-07-22 13:39:40', '2022-07-22 16:09:02'); +INSERT INTO `sys_user_file` VALUES (143, 27, '41d81834e87546f49d3ff48c3806ea92.jpg', 0, 113, '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', 0, 3, '2022-07-22 13:39:45', '2022-07-22 16:09:03'); +INSERT INTO `sys_user_file` VALUES (144, 27, '4e60a84551fa48439bf42ecdb9673331.jpg', 0, 113, '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', 0, 3, '2022-07-22 13:39:49', '2022-07-22 16:09:04'); +INSERT INTO `sys_user_file` VALUES (145, 27, '66e6f6c60cfa44b288d6343027b544d0.jpg', 0, 113, '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', 0, 3, '2022-07-22 13:39:53', '2022-07-22 16:09:04'); +INSERT INTO `sys_user_file` VALUES (146, 27, 'd6442cfa99b64b51aabfc470055b05dc.jpg', 0, 113, '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', 0, 3, '2022-07-22 13:39:58', '2022-07-22 16:09:05'); +INSERT INTO `sys_user_file` VALUES (147, 27, '948344a2a77c47a7a7b332fe12ff749a.jpg', 0, 113, '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', 0, 3, '2022-07-22 13:40:04', '2022-07-22 16:09:05'); +INSERT INTO `sys_user_file` VALUES (148, 27, '20200708230820.png', 0, 106, '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', 0, 3, '2022-07-22 13:52:55', '2022-07-22 16:09:06'); +INSERT INTO `sys_user_file` VALUES (149, 27, 'china-provinces.geo.json', 0, 106, '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', 0, 3, '2022-07-22 13:55:46', '2022-07-22 16:09:07'); +INSERT INTO `sys_user_file` VALUES (150, 27, 'word.geo.json', 0, 106, '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', 0, 3, '2022-07-22 13:55:51', '2022-07-22 16:09:08'); +INSERT INTO `sys_user_file` VALUES (151, 27, '20200708224450.pdf', 0, 106, '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', 0, 3, '2022-07-22 13:55:55', '2022-07-22 16:09:10'); +INSERT INTO `sys_user_file` VALUES (152, 27, '20200708224450.docx', 0, 106, '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 0, 3, '2022-07-22 13:55:58', '2022-07-22 16:09:10'); +INSERT INTO `sys_user_file` VALUES (153, 27, 'document.json', 0, 106, '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', 0, 3, '2022-07-22 13:57:16', '2022-07-22 16:09:11'); +INSERT INTO `sys_user_file` VALUES (154, 27, 'archive.json', 0, 106, '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', 0, 3, '2022-07-22 13:57:19', '2022-07-22 16:09:13'); +INSERT INTO `sys_user_file` VALUES (155, 27, 'eleadmin-copyright.jpg', 0, 106, '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', 0, 3, '2022-07-22 13:57:23', '2022-07-22 16:09:14'); +INSERT INTO `sys_user_file` VALUES (156, 27, 'eleadmin-pro-copyright.jpg', 0, 106, '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', 0, 3, '2022-07-22 13:57:25', '2022-07-22 16:09:16'); +INSERT INTO `sys_user_file` VALUES (157, 40, '我的图片', 1, 0, NULL, NULL, NULL, 0, 4, '2022-07-22 11:28:02', '2022-07-22 16:08:28'); +INSERT INTO `sys_user_file` VALUES (158, 40, '我的文件', 1, 0, NULL, NULL, NULL, 0, 4, '2022-07-22 11:28:09', '2022-07-22 16:08:30'); +INSERT INTO `sys_user_file` VALUES (159, 40, 'avatar.jpg', 0, 0, '20220722/19b623b787514f8eb7d1e8edf2e9ff15.jpg', 12805, 'image/jpeg', 0, 4, '2022-07-22 11:28:16', '2022-07-22 16:08:31'); +INSERT INTO `sys_user_file` VALUES (160, 40, 'logo.svg', 0, 0, '20220722/e77995c100de46409cce84e848a63f7d.svg', 1605, 'image/svg+xml', 0, 4, '2022-07-22 11:28:21', '2022-07-22 16:08:32'); +INSERT INTO `sys_user_file` VALUES (161, 40, 'favicon.ico', 0, 0, '20220722/acb31ddb5ce44530933c48741c3bbfe2.ico', 4286, 'image/vnd.microsoft.icon', 0, 4, '2022-07-22 11:29:11', '2022-07-22 16:08:32'); +INSERT INTO `sys_user_file` VALUES (162, 40, '用户导入模板.xlsx', 0, 0, '20220722/b4fa501bf6084f2e8bed971e68462ce3.xlsx', 10221, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 0, 4, '2022-07-22 11:29:24', '2022-07-22 16:08:35'); +INSERT INTO `sys_user_file` VALUES (163, 40, 'classes.json', 0, 0, '20220722/8d59c7d48453444d9ee84bd2b4c27a12.json', 6789, 'application/json', 0, 4, '2022-07-22 11:29:28', '2022-07-22 16:08:34'); +INSERT INTO `sys_user_file` VALUES (164, 40, '壁纸', 1, 157, NULL, NULL, NULL, 0, 4, '2022-07-22 11:30:58', '2022-07-22 16:08:36'); +INSERT INTO `sys_user_file` VALUES (165, 40, '头像', 1, 157, NULL, NULL, NULL, 0, 4, '2022-07-22 11:31:02', '2022-07-22 16:08:37'); +INSERT INTO `sys_user_file` VALUES (166, 40, 'pro202012301.png', 0, 157, '20220722/4cbac74d9c5c45858854b24ee5db8e87.png', 59257, 'image/png', 0, 4, '2022-07-22 11:34:39', '2022-07-22 16:08:37'); +INSERT INTO `sys_user_file` VALUES (167, 40, 'pro202012302.png', 0, 157, '20220722/24ba2b0906f64394ae0fb5e8f813cb30.png', 64832, 'image/png', 0, 4, '2022-07-22 11:34:43', '2022-07-22 16:08:38'); +INSERT INTO `sys_user_file` VALUES (168, 40, 'pro202012303.png', 0, 157, '20220722/9d269d1fe7294ea4b5ca6f11c6ac8a95.png', 74518, 'image/png', 0, 4, '2022-07-22 11:34:47', '2022-07-22 16:08:39'); +INSERT INTO `sys_user_file` VALUES (169, 40, 'eleadmin20201020172822.png', 0, 157, '20220722/45c686ab54264822963bc40716222591.png', 103558, 'image/png', 0, 4, '2022-07-22 13:02:52', '2022-07-22 16:08:39'); +INSERT INTO `sys_user_file` VALUES (170, 40, 'RZ8FQmZfHkcffMlTBCJllBFjEhEsObVo.jpg', 0, 164, '20220722/099d2f77dfad41c7af776ad81af7aab5.jpg', 38206, 'image/jpeg', 0, 4, '2022-07-22 13:34:41', '2022-07-22 16:08:40'); +INSERT INTO `sys_user_file` VALUES (171, 40, 'WLXm7gp1EbLDtvVQgkeQeyq5OtDm00Jd.jpg', 0, 164, '20220722/faf7fec118824f309fb66961866d9712.jpg', 60365, 'image/jpeg', 0, 4, '2022-07-22 13:34:49', '2022-07-22 16:08:41'); +INSERT INTO `sys_user_file` VALUES (172, 40, '4Z0QR2L0J1XStxBh99jVJ8qLfsGsOgjU.jpg', 0, 164, '20220722/d845f1a4e91143dc81ec9fa96ce6f074.jpg', 50118, 'image/jpeg', 0, 4, '2022-07-22 13:34:54', '2022-07-22 16:08:42'); +INSERT INTO `sys_user_file` VALUES (173, 40, 'ttkIjNPlVDuv4lUTvRX8GIlM2QqSe0jg.jpg', 0, 164, '20220722/4fc98decedcb4029bc954369c5e8c294.jpg', 29948, 'image/jpeg', 0, 4, '2022-07-22 13:35:03', '2022-07-22 16:08:42'); +INSERT INTO `sys_user_file` VALUES (174, 40, 'fAenQ8nvRjL7x0i0jEfuDBZHvJfHf3v6.jpg', 0, 164, '20220722/9787d2f5b37d4813a48b72e950d00395.jpg', 48228, 'image/jpeg', 0, 4, '2022-07-22 13:35:08', '2022-07-22 16:08:43'); +INSERT INTO `sys_user_file` VALUES (175, 40, 'LrCTN2j94lo9N7wEql7cBr1Ux4rHMvmZ.jpg', 0, 164, '20220722/9dacd9d48efa483ab204ae8ad0b60864.jpg', 37320, 'image/jpeg', 0, 4, '2022-07-22 13:35:12', '2022-07-22 16:08:43'); +INSERT INTO `sys_user_file` VALUES (176, 40, 'yeKvhT20lMU0f1T3Y743UlGEOLLnZSnp.jpg', 0, 164, '20220722/f74da7fd19524bc0a4e75e6159d041ac.jpg', 29040, 'image/jpeg', 0, 4, '2022-07-22 13:35:17', '2022-07-22 16:08:44'); +INSERT INTO `sys_user_file` VALUES (177, 40, 'CyrCNmTJfv7D6GFAg39bjT3eRkkRm5dI.jpg', 0, 164, '20220722/7539f0f90c4749cbbb56b111e2b8d6af.jpg', 39560, 'image/jpeg', 0, 4, '2022-07-22 13:35:26', '2022-07-22 16:08:45'); +INSERT INTO `sys_user_file` VALUES (178, 40, 'faa0202700ee455b90fe77d8bef98bc0.jpg', 0, 165, '20220722/5079a6bc43b64bf2b86b87275dfaf7a2.jpg', 10250, 'image/jpeg', 0, 4, '2022-07-22 13:36:21', '2022-07-22 16:08:45'); +INSERT INTO `sys_user_file` VALUES (179, 40, 'fe9196dd091e438fba115205c1003ee7.jpg', 0, 165, '20220722/db6740d4bb6e4938a8ce502a6af4554d.jpg', 10726, 'image/jpeg', 0, 4, '2022-07-22 13:36:34', '2022-07-22 16:08:46'); +INSERT INTO `sys_user_file` VALUES (180, 40, '21222950dc174485b2ec5088435a46a3.jpg', 0, 165, '20220722/ef84d66c378549e7807b98b64282d222.jpg', 15201, 'image/jpeg', 0, 4, '2022-07-22 13:37:49', '2022-07-22 16:08:47'); +INSERT INTO `sys_user_file` VALUES (181, 40, 'adb3ad5e05614fd2a59cf886ffc37f74.jpg', 0, 165, '20220722/c326e31373084a83a99387ac7929ecc7.jpg', 12782, 'image/jpeg', 0, 4, '2022-07-22 13:37:53', '2022-07-22 16:08:47'); +INSERT INTO `sys_user_file` VALUES (182, 40, 'b3ce64e10db7497b8b9f5a31df1b4eb2.jpg', 0, 165, '20220722/2f5d639d26e0478ea50935edde4fd229.jpg', 13086, 'image/jpeg', 0, 4, '2022-07-22 13:37:56', '2022-07-22 16:08:48'); +INSERT INTO `sys_user_file` VALUES (183, 40, 'b6a811873e704db49db994053a5019b2.jpg', 0, 165, '20220722/8da9136eed1f41cb8d4907cb77199ca5.jpg', 12591, 'image/jpeg', 0, 4, '2022-07-22 13:38:00', '2022-07-22 16:08:49'); +INSERT INTO `sys_user_file` VALUES (184, 40, 'be7dc0c24fc342fda44e12a2c2a2b7bb.jpg', 0, 165, '20220722/2576207113104107935e743b5d5cd52a.jpg', 13554, 'image/jpeg', 0, 4, '2022-07-22 13:38:09', '2022-07-22 16:08:49'); +INSERT INTO `sys_user_file` VALUES (185, 40, 'c184eef391ae48dba87e3057e70238fb.jpg', 0, 165, '20220722/15528efcdd1042ad8fce23d0f36905df.jpg', 17857, 'image/jpeg', 0, 4, '2022-07-22 13:38:15', '2022-07-22 16:08:50'); +INSERT INTO `sys_user_file` VALUES (186, 40, 'd3519518b00d42d3936b2ab5ce3a4cc3.jpg', 0, 165, '20220722/6b8cfc0ee93144d680375a5c588da1e4.jpg', 10333, 'image/jpeg', 0, 4, '2022-07-22 13:38:22', '2022-07-22 16:08:51'); +INSERT INTO `sys_user_file` VALUES (187, 40, '8931360b593040238d894a542c9037bc.jpg', 0, 165, '20220722/0e88d170dc284263898422dba5de257c.jpg', 10377, 'image/jpeg', 0, 4, '2022-07-22 13:38:26', '2022-07-22 16:08:52'); +INSERT INTO `sys_user_file` VALUES (188, 40, 'e36594e7423147748b2592ccb720ae9e.jpg', 0, 165, '20220722/14a5f30c639b450c9ac7c01bb18b26b5.jpg', 12451, 'image/jpeg', 0, 4, '2022-07-22 13:39:16', '2022-07-22 16:08:58'); +INSERT INTO `sys_user_file` VALUES (189, 40, 'f6bc05af944a4f738b54128717952107.jpg', 0, 165, '20220722/d67c079e3f41407c826ef9a110145d49.jpg', 11724, 'image/jpeg', 0, 4, '2022-07-22 13:39:20', '2022-07-22 16:08:59'); +INSERT INTO `sys_user_file` VALUES (190, 40, '0568caaf0a7e41dda2d901d4ac2f3243.jpg', 0, 165, '20220722/b8f43e929d6048a7b6354b0fe4fae440.jpg', 24290, 'image/jpeg', 0, 4, '2022-07-22 13:39:24', '2022-07-22 16:08:59'); +INSERT INTO `sys_user_file` VALUES (191, 40, '0bfaa58e801b47fb9f56dcb128206d94.jpg', 0, 165, '20220722/ebc5a81452694c6787b4e77ea579a12f.jpg', 4578, 'image/jpeg', 0, 4, '2022-07-22 13:39:28', '2022-07-22 16:09:00'); +INSERT INTO `sys_user_file` VALUES (192, 40, '12b3d575a2a24e0789a014bd6ce7585b.jpg', 0, 165, '20220722/1ba37747d5014a5e9f6f0de5771326c9.jpg', 20909, 'image/jpeg', 0, 4, '2022-07-22 13:39:32', '2022-07-22 16:09:01'); +INSERT INTO `sys_user_file` VALUES (193, 40, '2d98970a51b34b6b859339c96b240dcd.jpg', 0, 165, '20220722/6389dd41857b499a93ce3c5ce050da45.jpg', 11855, 'image/jpeg', 0, 4, '2022-07-22 13:39:36', '2022-07-22 16:09:02'); +INSERT INTO `sys_user_file` VALUES (194, 40, '3cc0f65fefbe448191aa728d80f6b97e.jpg', 0, 165, '20220722/bc90af738f2641abb497092781055030.jpg', 15237, 'image/jpeg', 0, 4, '2022-07-22 13:39:40', '2022-07-22 16:09:02'); +INSERT INTO `sys_user_file` VALUES (195, 40, '41d81834e87546f49d3ff48c3806ea92.jpg', 0, 165, '20220722/d08de988712a40e2b315ddbff750e730.jpg', 10983, 'image/jpeg', 0, 4, '2022-07-22 13:39:45', '2022-07-22 16:09:03'); +INSERT INTO `sys_user_file` VALUES (196, 40, '4e60a84551fa48439bf42ecdb9673331.jpg', 0, 165, '20220722/5f5d6d56e4a74744906c542685770c28.jpg', 12075, 'image/jpeg', 0, 4, '2022-07-22 13:39:49', '2022-07-22 16:09:04'); +INSERT INTO `sys_user_file` VALUES (197, 40, '66e6f6c60cfa44b288d6343027b544d0.jpg', 0, 165, '20220722/da9cb7ee91c04dedb462aebaa9321e15.jpg', 8346, 'image/jpeg', 0, 4, '2022-07-22 13:39:53', '2022-07-22 16:09:04'); +INSERT INTO `sys_user_file` VALUES (198, 40, 'd6442cfa99b64b51aabfc470055b05dc.jpg', 0, 165, '20220722/b4fa02e6f1834586a05cede521394960.jpg', 14678, 'image/jpeg', 0, 4, '2022-07-22 13:39:58', '2022-07-22 16:09:05'); +INSERT INTO `sys_user_file` VALUES (199, 40, '948344a2a77c47a7a7b332fe12ff749a.jpg', 0, 165, '20220722/a9e7971f1b084cf1a69544ae984ee9f7.jpg', 14334, 'image/jpeg', 0, 4, '2022-07-22 13:40:04', '2022-07-22 16:09:05'); +INSERT INTO `sys_user_file` VALUES (200, 40, '20200708230820.png', 0, 158, '20220722/530578a3237745d791106053856f162f.png', 3799, 'image/png', 0, 4, '2022-07-22 13:52:55', '2022-07-22 16:09:06'); +INSERT INTO `sys_user_file` VALUES (201, 40, 'china-provinces.geo.json', 0, 158, '20220722/74fc77a305f341f0a40d2448efaa047d.json', 54238, 'application/json', 0, 4, '2022-07-22 13:55:46', '2022-07-22 16:09:07'); +INSERT INTO `sys_user_file` VALUES (202, 40, 'word.geo.json', 0, 158, '20220722/6f4b5f19e7754120868c810c5fcbeeb6.json', 1504924, 'application/json', 0, 4, '2022-07-22 13:55:51', '2022-07-22 16:09:08'); +INSERT INTO `sys_user_file` VALUES (203, 40, '20200708224450.pdf', 0, 158, '20220722/21a93c2641b5486aae6d29b46a353073.pdf', 839977, 'application/pdf', 0, 4, '2022-07-22 13:55:55', '2022-07-22 16:09:10'); +INSERT INTO `sys_user_file` VALUES (204, 40, '20200708224450.docx', 0, 158, '20220722/4a4f2df9ba4249e9b00df0427691ce57.docx', 2586229, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 0, 4, '2022-07-22 13:55:58', '2022-07-22 16:09:10'); +INSERT INTO `sys_user_file` VALUES (205, 40, 'document.json', 0, 158, '20220722/e988a1140259460095dd154a0ab54ff0.json', 1675, 'application/json', 0, 4, '2022-07-22 13:57:16', '2022-07-22 16:09:11'); +INSERT INTO `sys_user_file` VALUES (206, 40, 'archive.json', 0, 158, '20220722/fab7f40d28c44000b104205bd6d9e227.json', 1998, 'application/json', 0, 4, '2022-07-22 13:57:19', '2022-07-22 16:09:13'); +INSERT INTO `sys_user_file` VALUES (207, 40, 'eleadmin-copyright.jpg', 0, 158, '20220722/881ef0f83ef347a18177ee26ccb33d1a.jpg', 79297, 'image/jpeg', 0, 4, '2022-07-22 13:57:23', '2022-07-22 16:09:14'); +INSERT INTO `sys_user_file` VALUES (208, 40, 'eleadmin-pro-copyright.jpg', 0, 158, '20220722/b7bac0f9abdb4b0f94b911940a77ad3b.jpg', 151976, 'image/jpeg', 0, 4, '2022-07-22 13:57:25', '2022-07-22 16:09:16'); + +-- ---------------------------- +-- Table structure for sys_user_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user_role`; +CREATE TABLE `sys_user_role` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `user_id` int(11) NOT NULL COMMENT '用户id', + `role_id` int(11) NOT NULL COMMENT '角色id', + `tenant_id` int(11) NOT NULL DEFAULT 1 COMMENT '租户id', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `FK_sys_user_role`(`user_id`) USING BTREE, + INDEX `FK_sys_user_role_role`(`role_id`) USING BTREE, + INDEX `tenant_id`(`tenant_id`) USING BTREE, + CONSTRAINT `sys_user_role_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`user_id`) ON DELETE CASCADE ON UPDATE RESTRICT, + CONSTRAINT `sys_user_role_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`role_id`) ON DELETE CASCADE ON UPDATE RESTRICT, + CONSTRAINT `sys_user_role_ibfk_3` FOREIGN KEY (`tenant_id`) REFERENCES `sys_tenant` (`tenant_id`) ON DELETE CASCADE ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_user_role +-- ---------------------------- +INSERT INTO `sys_user_role` VALUES (1, 1, 1, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (2, 2, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (3, 3, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (4, 4, 2, 1, '2021-05-21 15:23:41', '2023-02-07 09:20:33'); +INSERT INTO `sys_user_role` VALUES (5, 5, 2, 1, '2021-05-21 15:23:41', '2021-10-18 02:29:00'); +INSERT INTO `sys_user_role` VALUES (6, 6, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (7, 7, 2, 1, '2021-05-21 15:23:41', '2023-02-07 09:20:33'); +INSERT INTO `sys_user_role` VALUES (8, 8, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (9, 9, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (10, 10, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (11, 11, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (12, 12, 2, 1, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (13, 13, 2, 1, '2021-05-21 15:23:41', '2023-02-07 09:20:33'); +INSERT INTO `sys_user_role` VALUES (14, 14, 4, 2, '2021-05-21 15:23:41', '2023-02-07 09:20:33'); +INSERT INTO `sys_user_role` VALUES (15, 15, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (16, 16, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (17, 17, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (18, 18, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (19, 19, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (20, 20, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (21, 21, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (22, 22, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (23, 23, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (24, 24, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (25, 25, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (26, 26, 5, 2, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (27, 27, 7, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (28, 28, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (29, 29, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (30, 30, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (31, 31, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (32, 32, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (33, 33, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (34, 34, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (35, 35, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (36, 36, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (37, 37, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (38, 38, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (39, 39, 8, 3, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (42, 42, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (43, 43, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (44, 44, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (45, 45, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (46, 46, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (47, 47, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (48, 48, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (49, 49, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (50, 50, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (51, 51, 11, 4, '2021-05-21 15:23:41', '2021-10-13 21:45:16'); +INSERT INTO `sys_user_role` VALUES (53, 52, 11, 4, '2023-05-27 12:13:29', '2023-05-27 12:13:29'); +INSERT INTO `sys_user_role` VALUES (57, 41, 11, 4, '2023-05-28 21:33:14', '2023-05-28 21:33:14'); +INSERT INTO `sys_user_role` VALUES (58, 40, 10, 4, '2023-05-28 21:33:18', '2023-05-28 21:33:18'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/docs/output/generate_plan.py b/docs/output/generate_plan.py new file mode 100644 index 0000000..ba8f128 --- /dev/null +++ b/docs/output/generate_plan.py @@ -0,0 +1,366 @@ +from openpyxl import Workbook +from openpyxl.styles import PatternFill, Font, Border, Side, Alignment +from openpyxl.utils import get_column_letter + +wb = Workbook() + +# ====== Sheet 1: 总览 ====== +ws_summary = wb.active +ws_summary.title = "开发计划总览" +ws_summary.sheet_view.showGridLines = False + +# 颜色定义 +header_fill = PatternFill(start_color="1F4E79", end_color="1F4E79", fill_type="solid") +subheader_fill = PatternFill(start_color="2E75B6", end_color="2E75B6", fill_type="solid") +p1_fill = PatternFill(start_color="C00000", end_color="C00000", fill_type="solid") +p2_fill = PatternFill(start_color="FF7C00", end_color="FF7C00", fill_type="solid") +p3_fill = PatternFill(start_color="70AD47", end_color="70AD47", fill_type="solid") +white_font = Font(color="FFFFFF", bold=True, size=11) +normal_font = Font(size=10) +thin_border = Border( + left=Side(style='thin', color='CCCCCC'), + right=Side(style='thin', color='CCCCCC'), + top=Side(style='thin', color='CCCCCC'), + bottom=Side(style='thin', color='CCCCCC') +) + +# 标题 +ws_summary['B2'] = "paopao 电商系统开发计划表" +ws_summary['B2'].font = Font(size=18, bold=True, color="1F4E79") +ws_summary['B2'].alignment = Alignment(horizontal='left', vertical='center') +ws_summary.row_dimensions[2].height = 36 + +# 统计信息 +stats = [ + ("总功能点", "64"), + ("小程序端", "24"), + ("后台管理端", "40"), + ("核心流程", "9"), +] +for i, (label, val) in enumerate(stats): + col = get_column_letter(2 + i) + ws_summary[f'{col}4'] = label + ws_summary[f'{col}4'].font = Font(bold=True, size=10, color="1F4E79") + ws_summary[f'{col}4'].alignment = Alignment(horizontal='center') + ws_summary[f'{col}5'] = val + ws_summary[f'{col}5'].font = Font(size=24, bold=True, color="1F4E79") + ws_summary[f'{col}5'].alignment = Alignment(horizontal='center') + ws_summary.row_dimensions[5].height = 30 + +# 模块列表 +modules = [ + ("序号", "模块名称", "端", "功能点数", "优先级", "预计工时(h)", "状态"), +] +row = 7 +for m in modules: + for col_idx, val in enumerate(m, 2): + cell = ws_summary.cell(row=row, column=col_idx, value=val) + cell.fill = header_fill + cell.font = white_font + cell.alignment = Alignment(horizontal='center', vertical='center') + cell.border = thin_border + ws_summary.row_dimensions[row].height = 24 + +module_data = [ + (1, "登录/注册", "小程序端", 3, "P1", 16, "待开发"), + (2, "首页模块", "小程序端", 11, "P1", 40, "待开发"), + (3, "会员中心", "小程序端", 4, "P1", 32, "待开发"), + (4, "商城模块", "小程序端", 3, "P1", 24, "待开发"), + (5, "购物车", "小程序端", 3, "P1", 16, "待开发"), + (6, "我的页面", "小程序端", 10, "P1", 32, "待开发"), + (7, "首页统计", "后台管理端", 2, "P1", 8, "待开发"), + (8, "会员管理", "后台管理端", 2, "P1", 16, "待开发"), + (9, "商品管理", "后台管理端", 5, "P1", 40, "待开发"), + (10, "比赛活动", "后台管理端", 2, "P1", 24, "待开发"), + (11, "预约管理", "后台管理端", 1, "P2", 8, "待开发"), + (12, "营销模块", "后台管理端", 5, "P2", 32, "待开发"), + (13, "系统管理", "后台管理端", 3, "P2", 16, "待开发"), + (14, "财务模块", "后台管理端", 6, "P1", 32, "待开发"), +] + +for i, row_data in enumerate(module_data): + row = 8 + i + for col_idx, val in enumerate(row_data, 2): + cell = ws_summary.cell(row=row, column=col_idx, value=val) + cell.font = normal_font + cell.alignment = Alignment(horizontal='center', vertical='center') + cell.border = thin_border + # 优先级着色 + if col_idx == 6: # 优先级列 + if val == "P1": + cell.fill = p1_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + elif val == "P2": + cell.fill = p2_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + ws_summary.row_dimensions[row].height = 20 + +# 列宽 +widths = [4, 18, 14, 10, 10, 12, 10] +for i, w in enumerate(widths, 2): + ws_summary.column_dimensions[get_column_letter(i)].width = w + +# ====== Sheet 2: 小程序端详细计划 ====== +ws_mini = wb.create_sheet("小程序端详细计划") +ws_mini.sheet_view.showGridLines = False + +ws_mini['B2'] = "小程序端(用户端)功能开发计划" +ws_mini['B2'].font = Font(size=16, bold=True, color="1F4E79") + +headers = ["序号", "功能模块", "功能名称", "功能描述", "优先级", "预计工时(h)", "关联流程", "备注"] +for col_idx, h in enumerate(headers, 2): + cell = ws_mini.cell(row=4, column=col_idx, value=h) + cell.fill = header_fill + cell.font = white_font + cell.alignment = Alignment(horizontal='center', vertical='center') + cell.border = thin_border +ws_mini.row_dimensions[4].height = 24 + +mini_data = [ + # 登录注册 + (1, "登录注册", "手机短信验证码登录/注册", "可通过手机短信验证方式注册,修改密码", "P1", 8, "用户注册与登录流程", ""), + (2, "登录注册", "微信授权登录/注册", "可直接通过微信账号注册进入小程序", "P1", 4, "用户注册与登录流程", ""), + (3, "登录注册", "隐私/政策协议", "可自由上传修改文案内容", "P3", 4, "用户注册与登录流程", ""), + # 首页 + (4, "首页", "LOGO+小程序名称", "可自由修改", "P1", 2, "", ""), + (5, "首页", "搜索", "关键字搜索:可通过搜索栏搜索关键字查找到商城内相应商品(模糊查询)", "P1", 8, "商品购物与支付流程", ""), + (6, "首页", "消息通知", "系统通知:所有小程序内订单状态变化及支付记录,佣金收入等通知", "P1", 6, "", ""), + (7, "首页", "轮播图", "自定义替换图片:可自由设置图片尺寸规格", "P1", 4, "", ""), + (8, "首页", "精选商城入口", "入口跳转至商城页面", "P2", 2, "", ""), + (9, "首页", "活动报名入口", "活动列表:展示活动名称,活动时间等概要信息", "P1", 6, "活动报名流程", ""), + (10, "首页", "穿线预约入口", "显示门店名称、地址、营业时间,距离;点击定位跳转地图;点击电话拨打", "P1", 8, "穿线预约流程", ""), + (11, "首页", "积分商城入口", "显示总积分,可积分兑换的商品、查询兑换订单进度", "P1", 8, "积分商城与使用流程", ""), + (12, "首页", "热销商品展示", "展示购买率高的商品列表", "P2", 4, "", ""), + (13, "首页", "会员登录入口", "点击跳转会员中心;点商品会员价跳转注册界面", "P1", 4, "会员开通与推广流程", ""), + (14, "首页", "热门活动展示", "后台设置的热门活动展示", "P2", 4, "", ""), + (15, "首页", "领券中心入口", "优惠券领取入口", "P2", 4, "优惠券领取与使用流程", ""), + (16, "首页", "积分签到", "每天签到固定可获取X积分", "P2", 6, "积分商城与使用流程", ""), + # 会员中心 + (17, "会员中心", "购买会员/会员升级", "会员升级成为会员获取推广权益,线下收取下级会员费后录入注册", "P1", 12, "会员开通与推广流程", ""), + (18, "会员中心", "分佣查看", "自己下级在平台产生消费,会员可获得相应比例的分佣", "P1", 8, "佣金结算与提现流程", ""), + (19, "会员中心", "分佣结算", "订单完成货款到账后(过了售后期),佣金才能结算到上级账户", "P1", 6, "佣金结算与提现流程", ""), + (20, "会员中心", "可提现佣金", "申请提现至微信;设置提现时间和上限(单次200以上,每天不超过2000)", "P1", 6, "佣金结算与提现流程", ""), + # 商城 + (21, "商城", "商品搜索", "关键字搜索查找到相应商品(模糊查询)", "P1", 6, "商品购物与支付流程", ""), + (22, "商城", "商品分类", "三级分类导航", "P1", 6, "", ""), + (23, "商城", "商品详情", "商品主图/视频、规格、价格等详情展示", "P1", 12, "商品购物与支付流程", ""), + # 购物车 + (24, "购物车", "商品列表展示", "显示已添加的商品列表", "P1", 4, "", ""), + (25, "购物车", "购物车管理", "删除选购商品", "P1", 4, "", ""), + (26, "购物车", "下单结算", "多选商品下单支付,同一订单只收一笔快递费", "P1", 8, "商品购物与支付流程", ""), + # 我的 + (27, "我的", "头像昵称设置", "设置头像、昵称、性别、手机号、显示ID、注册时间", "P1", 6, "", ""), + (28, "我的", "消息中心", "系统通知、公告消息", "P2", 4, "", ""), + (29, "我的", "设置页面", "服务协议、隐私政策、版权信息、关于我们", "P2", 4, "", ""), + (30, "我的", "会员等级显示", "展示当前会员等级", "P1", 2, "", ""), + (31, "我的", "我的钱包", "余额充值功能", "P1", 6, "", ""), + (32, "我的", "我的积分", "积分查询", "P1", 2, "", ""), + (33, "我的", "我的优惠券", "已使用、未使用、已过期;显示已领取优惠券", "P1", 6, "优惠券领取与使用流程", ""), + (34, "我的", "我的订单", "全部订单:待支付、待发货、待收货、商品评价、申请售后(部分退款)", "P1", 12, "商品购物与支付流程", ""), + (35, "我的", "我的活动", "已报名活动列表,可取消报名", "P1", 6, "活动报名流程", ""), + (36, "我的", "分销推广入口", "我的邀请人查看", "P1", 4, "", ""), +] + +for i, row_data in enumerate(mini_data): + row = 5 + i + for col_idx, val in enumerate(row_data, 2): + cell = ws_mini.cell(row=row, column=col_idx, value=val) + cell.font = normal_font + cell.border = thin_border + if col_idx == 2: + cell.alignment = Alignment(horizontal='center', vertical='center') + elif col_idx == 6 or col_idx == 7: + cell.alignment = Alignment(horizontal='center', vertical='center') + else: + cell.alignment = Alignment(horizontal='left', vertical='center', wrap_text=True) + # 优先级着色 + if col_idx == 6: + if val == "P1": + cell.fill = p1_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + elif val == "P2": + cell.fill = p2_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + elif val == "P3": + cell.fill = p3_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + ws_mini.row_dimensions[row].height = 30 + +# 列宽 +mini_widths = [4, 12, 16, 50, 8, 10, 18, 10] +for i, w in enumerate(mini_widths, 2): + ws_mini.column_dimensions[get_column_letter(i)].width = w + +# ====== Sheet 3: 后台管理端详细计划 ====== +ws_admin = wb.create_sheet("后台管理端详细计划") +ws_admin.sheet_view.showGridLines = False + +ws_admin['B2'] = "后台管理端(Web端)功能开发计划" +ws_admin['B2'].font = Font(size=16, bold=True, color="1F4E79") + +for col_idx, h in enumerate(headers, 2): + cell = ws_admin.cell(row=4, column=col_idx, value=h) + cell.fill = header_fill + cell.font = white_font + cell.alignment = Alignment(horizontal='center', vertical='center') + cell.border = thin_border +ws_admin.row_dimensions[4].height = 24 + +admin_data = [ + # 首页统计 + (1, "首页统计", "普通会员统计", "普通会员人数统计", "P1", 2, "", ""), + (2, "首页统计", "趋势图", "注册人数、会员人数趋势", "P1", 6, "", ""), + # 会员管理 + (3, "会员管理", "会员列表", "普通会员:登录注册的用户信息,手机号、昵称、余额、积分等", "P1", 8, "后台管理核心流程", ""), + (4, "会员管理", "会员权限设置", "VIP会员开通价格、会员时间、享受权限等", "P1", 8, "", ""), + # 商城管理 + (5, "商城管理", "商品管理", "商品添加、上下架、商品规格设置(如服装码数,颜色等商品参数)", "P1", 16, "后台管理核心流程", ""), + (6, "商城管理", "批量导入导出", "能实现线上导出导入数据,实现批量修改导入数据", "P1", 8, "", ""), + (7, "商城管理", "商品分销设置", "商品单独设置分销佣金", "P1", 6, "", ""), + (8, "商城管理", "订单管理", "商品订单:待支付,待发货,待收货,商品评价,退款/售后", "P1", 12, "后台管理核心流程", ""), + (9, "商城管理", "商品品牌管理", "品牌列表管理", "P2", 4, "", ""), + (10, "商城管理", "商品类型管理", "三级分类管理", "P1", 6, "", ""), + # 比赛活动 + (11, "比赛活动", "活动列表", "添加比赛信息,限制报名人数,可设置热门;后台自定义参赛人员必填项;衣服尺码后台设置;限制报名人数或队伍数", "P1", 16, "后台管理核心流程", ""), + (12, "比赛活动", "预约报名管理", "活动报名人员管理", "P1", 8, "", ""), + # 预约管理 + (13, "预约管理", "预约订单查询", "用户预约穿线订单,分门店查询", "P2", 8, "穿线预约流程", ""), + # 营销 + (14, "营销", "优惠券管理", "场地使用券、无门槛、满减券、折扣券;可设置优惠券指定发放给会员/非会员/单独某个账户", "P1", 12, "优惠券领取与使用流程", ""), + (15, "营销", "优惠券使用记录", "优惠券使用记录,核销门店等信息", "P1", 6, "", ""), + (16, "营销", "积分抵扣设置", "积分抵扣规则配置", "P2", 6, "", ""), + (17, "营销", "积分商城管理", "积分兑换商品管理", "P2", 8, "积分商城与使用流程", ""), + (18, "营销", "轮播图管理", "广告图替换", "P2", 4, "", ""), + (19, "营销", "系统公告发布", "发布系统公告通知", "P2", 4, "", ""), + # 系统管理 + (20, "系统管理", "用户管理", "添加系统用户账户", "P2", 8, "后台管理核心流程", ""), + (21, "系统管理", "角色权限管理", "用户角色权限设置", "P2", 8, "", ""), + (22, "系统管理", "门店管理", "添加门店信息、账号、密码", "P2", 8, "", ""), + # 财务 + (23, "财务", "账务概况", "订单、会员、分销分别进行数据统计,可按日期查询,可导出表格", "P1", 12, "后台管理核心流程", ""), + (24, "财务", "充值记录查询", "查询所有充值记录,可按账号、日期查询,可导出表格", "P1", 6, "", ""), + (25, "财务", "资金记录查询", "查询所有账号资金账单,可按账号、日期查询,可导出表格", "P1", 6, "", ""), + (26, "财务", "积分记录查询", "查询所有账号积分情况,可按账号、日期查询,可导出表格", "P1", 6, "", ""), + (27, "财务", "佣金提现审核", "审核所有佣金提现申请", "P1", 8, "佣金结算与提现流程", ""), + (28, "财务", "佣金记录查询", "所有佣金账单,可按账号、日期查询,可导出表格", "P1", 6, "", ""), +] + +for i, row_data in enumerate(admin_data): + row = 5 + i + for col_idx, val in enumerate(row_data, 2): + cell = ws_admin.cell(row=row, column=col_idx, value=val) + cell.font = normal_font + cell.border = thin_border + if col_idx == 2: + cell.alignment = Alignment(horizontal='center', vertical='center') + elif col_idx == 6 or col_idx == 7: + cell.alignment = Alignment(horizontal='center', vertical='center') + else: + cell.alignment = Alignment(horizontal='left', vertical='center', wrap_text=True) + if col_idx == 6: + if val == "P1": + cell.fill = p1_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + elif val == "P2": + cell.fill = p2_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + elif val == "P3": + cell.fill = p3_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + ws_admin.row_dimensions[row].height = 30 + +# 列宽 +admin_widths = [4, 12, 16, 50, 8, 10, 18, 10] +for i, w in enumerate(admin_widths, 2): + ws_admin.column_dimensions[get_column_letter(i)].width = w + +# ====== Sheet 4: 核心业务流程 ====== +ws_flow = wb.create_sheet("核心业务流程") +ws_flow.sheet_view.showGridLines = False + +ws_flow['B2'] = "系统核心业务流程" +ws_flow['B2'].font = Font(size=16, bold=True, color="1F4E79") + +flow_headers = ["序号", "流程名称", "流程说明", "涉及模块", "关联页面", "关键节点"] +for col_idx, h in enumerate(flow_headers, 2): + cell = ws_flow.cell(row=4, column=col_idx, value=h) + cell.fill = header_fill + cell.font = white_font + cell.alignment = Alignment(horizontal='center', vertical='center') + cell.border = thin_border +ws_flow.row_dimensions[4].height = 24 + +flow_data = [ + (1, "用户注册与登录流程", "用户进入小程序选择短信验证码登录或微信授权登录,阅读并同意隐私政策/服务协议后进入首页。需修改密码通过短信验证码重置。会员身份通过手机号匹配后激活。", "登录注册、首页", "登录页、首页", "手机号验证 → 身份匹配 → 权限激活"), + (2, "会员开通与推广下级流程", "用户购买会员支付198元注册费,会员获得推广权限。会员线下收取下级298元会员费后在平台为下级录入手机号。下级用该手机号登录系统自动匹配身份成为该会员下级。", "会员中心、用户管理", "会员中心、注册页", "支付注册费 → 录入下级手机号 → 下级登录匹配"), + (3, "商品购物与支付流程", "用户通过首页/商城搜索/分类查找商品,查看详情后加入购物车。购物车勾选商品统一结算,同一订单仅收一笔运费。完成支付生成待发货订单,商家发货用户收货后进入售后,售后期结束货款到账后佣金自动结算。", "首页、商城、购物车、订单", "商品详情、购物车、订单页", "加入购物车 → 统一结算 → 支付发货 → 售后结算"), + (4, "积分商城与积分使用流程", "用户每日签到获得固定积分。进入积分商城查看总积分与可兑商品/优惠券。积分充足直接兑换,积分不足积分+补差价兑换。提交兑换订单后平台审核/配送。", "首页、积分商城", "积分商城页、兑换订单页", "每日签到 → 积分累积 → 兑换商品/优惠券"), + (5, "佣金结算与提现流程", "下级完成订单并过售后期后佣金结算至可提现佣金。会员进入会员中心查看可提现金额,发起提现至绑定微信(遵守200元起/单日上限2000元规则)。后台审核提现申请,审核通过资金到账用户微信。", "会员中心、财务", "会员中心、提现申请页", "订单完成 → 佣金结算 → 申请提现 → 后台审核"), + (6, "活动报名流程", "用户在首页查看活动列表(名称、时间、人数限制),选择活动填写后台设置的必填信息(尺码等),提交报名后可在我的服务查看/取消报名。", "首页、我的-我的活动", "活动列表页、报名表单页", "查看活动 → 填写信息 → 提交报名 → 查看/取消"), + (7, "穿线预约流程", "用户进入穿线预约查看门店列表(名称、地址、距离、营业时间),支持按门店名称搜索。点击地址跳转地图,点击电话直接拨号。选择门店提交预约生成预约订单,后台按门店查询预约订单进行核销服务。", "首页、预约管理", "门店列表页、预约订单页", "查看门店 → 选择预约 → 生成订单 → 门店核销"), + (8, "优惠券领取与使用流程", "用户从首页进入领券中心领取优惠券(满减/无门槛/折扣),在我的优惠券查看未使用/已使用/已过期。下单时自动匹配可用券抵扣金额。后台可定向发券给会员/非会员/指定用户并记录使用与核销信息。", "首页、营销、订单", "领券中心、我的优惠券、订单页", "领取优惠券 → 下单匹配 → 抵扣金额 → 核销记录"), + (9, "后台管理核心流程", "包含商品与订单管理(商品添加/上下架/规格/佣金,订单状态处理)、会员与分销管理(会员信息/价格/权限,下级关系与佣金跟踪)、活动与预约管理(创建活动/查看名单/处理预约)、营销与内容配置(轮播图/公告/积分/优惠券/积分商城)、财务与数据统计(按日期统计/导出/审核提现/查询记录)、系统权限管理(后台用户/角色权限/门店管理)等六大模块。", "所有后台模块", "各后台管理页面", "全链路业务支撑"), +] + +for i, row_data in enumerate(flow_data): + row = 5 + i + for col_idx, val in enumerate(row_data, 2): + cell = ws_flow.cell(row=row, column=col_idx, value=val) + cell.font = normal_font + cell.border = thin_border + cell.alignment = Alignment(horizontal='left', vertical='center', wrap_text=True) + ws_flow.row_dimensions[row].height = 60 + +# 列宽 +flow_widths = [4, 20, 60, 20, 16, 28] +for i, w in enumerate(flow_widths, 2): + ws_flow.column_dimensions[get_column_letter(i)].width = w + +# ====== Sheet 5: 开发里程碑 ====== +ws_mile = wb.create_sheet("开发里程碑") +ws_mile.sheet_view.showGridLines = False + +ws_mile['B2'] = "开发里程碑计划" +ws_mile['B2'].font = Font(size=16, bold=True, color="1F4E79") + +mile_headers = ["阶段", "里程碑名称", "主要交付物", "包含模块", "预计周期", "开始日期", "结束日期", "状态"] +for col_idx, h in enumerate(mile_headers, 2): + cell = ws_mile.cell(row=4, column=col_idx, value=h) + cell.fill = header_fill + cell.font = white_font + cell.alignment = Alignment(horizontal='center', vertical='center') + cell.border = thin_border +ws_mile.row_dimensions[4].height = 24 + +mile_data = [ + ("Phase 1", "基础架构搭建", "完成项目框架搭建、数据库设计、API接口定义", "整体架构", "2周", "Day 1", "Day 14", "待启动"), + ("Phase 2", "用户端核心功能", "登录注册、首页框架、商城基础功能", "登录注册、首页、商城", "3周", "Day 15", "Day 35", "待启动"), + ("Phase 3", "交易核心功能", "购物车、订单流程、支付集成", "购物车、订单、支付", "2周", "Day 36", "Day 49", "待启动"), + ("Phase 4", "会员与分销系统", "会员中心、佣金体系、提现功能", "会员中心、财务", "2周", "Day 50", "Day 63", "待启动"), + ("Phase 5", "营销与活动", "优惠券、积分商城、活动报名", "营销、比赛活动", "2周", "Day 64", "Day 77", "待启动"), + ("Phase 6", "后台管理端", "商品管理、订单管理、会员管理、财务统计", "后台所有模块", "3周", "Day 78", "Day 98", "待启动"), + ("Phase 7", "系统集成测试", "全链路测试、Bug修复、性能优化", "全部模块", "2周", "Day 99", "Day 112", "待启动"), + ("Phase 8", "上线部署", "生产环境部署、数据迁移、上线文档", "全部模块", "1周", "Day 113", "Day 119", "待启动"), +] + +for i, row_data in enumerate(mile_data): + row = 5 + i + for col_idx, val in enumerate(row_data, 2): + cell = ws_mile.cell(row=row, column=col_idx, value=val) + cell.font = normal_font + cell.border = thin_border + cell.alignment = Alignment(horizontal='center', vertical='center', wrap_text=True) + if col_idx == 8: # 状态列 + cell.fill = p3_fill + cell.font = Font(color="FFFFFF", bold=True, size=10) + ws_mile.row_dimensions[row].height = 30 + +# 列宽 +mile_widths = [8, 18, 30, 24, 10, 10, 10, 10] +for i, w in enumerate(mile_widths, 2): + ws_mile.column_dimensions[get_column_letter(i)].width = w + +# 保存 +output_path = "/Users/gxwebsoft/JAVA/paopao-java/docs/output/paopao开发计划表.xlsx" +wb.save(output_path) +print(f"✅ 开发计划表已生成: {output_path}") diff --git a/docs/output/paopao开发计划表.xlsx b/docs/output/paopao开发计划表.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..84f4771a80941bd561a049f4704b96e7d736ec7a GIT binary patch literal 18049 zcmZ^~V{m3cw>BKxxxk;ON3=avgGF{Lfnm%DTz~f4>dzJ##4X%r(uF-5d6Xyy z_chsg8Yl^?H}T+5PQ1zaW6))|GiV{dV^k(FRPv4|96n4Td!akA6#o|l^Io*Vn}1uU z1p@&={r^KSad0;K4~D7ae(OOdgm441zjDG3X{XWPb15 z`q?b4(5rLvHwyWJwa>!Hp!tKl%!$LEoE>!u!teCFs9vBbPq4YsX3~$9Uf97Zsd;-a z`e(>)q7~c*AtK7+Nx?Xpf5XO1ZJK96F%b8HIlcSeXJ*YZ=K}G0E~$mp)cX$k=JLzy z!hRTrqe5Zz!dqe**L_7z;TvWg0GFB= z#+G`hm2DxmgsGvQKAolDtg4c>g8@#l5exVr~;o?NYy^D&Ni5W7lUc>}qRw!I}nu+7C*v!<)h>vc(GRdFf` z3om{<7ul9MaB(^c3pO5G3-M7SwX>dxJ$DKbgLP3O)w8Y_Ruq(wuE$VHLtm&P`^foA(pM?anjkuopTc*kw7?y z=42IpfkLg(y93Gdx{1p()Gdm*Fj-?kPZGhz!<)d*r;M)g5?1eAKb~ou)Bvk$(DJLU z?3t7gm(#=i@{|=h;c3U;bg*~tq&h|sl=i&n&OCS)!oD-l&q<}^EHgK+a2N7?7KG~Q z^?EZihk3Eiq+MIjntsm;685Akm3>VlE2-jSV)|!zCyD+=Te|+0vmkhz%1HJm zos?kJL|X1jF?Gs{+b<6M;TB;z&*%LG`I^HHhnMsNAI#!MlQ?mxRo5*6kSso{b^w)D znBN$O1J}6)GpN<6GSpBTZDh_a(D^ZPD8E&22AuHM$jLV;OY^rV=HGC@s3 zWbGd@6Sp)&u&1Uv%qmlPT#Mg!4nKOeT z5net9nHFgyifjNo+Zr-D@ixQul{-4XuBjn?0dxpZ3G7~3&5&7V1e`Xp$X7O2?9}lj zL)YM7F8N@i%&f&8NbP}RN21Ivl&Bv=1Z$~EFS?? z9upo-(j*nDOuFa+N2TY4R%%F%t5=M*6)gk%_rdX~le|hhntLlU7)wVNccr%(vqjnc z4m|=aolc|{+P<9L)zV3JPMtT2`&))bzv2C-7Y zFe<347#L|99uy`P%c0_Rav~Hu=v3;s=q*^VX&GK%<{NzXJwgXH#&j(|cYqjONVvTI zJUJR5x*h?N7|Z$K<|f73BX;GDF32uamBn-kYeFQd|0k=n$f_#&L)|(BeAvdm>QonQ z4~3!3ptpT4J>~a?{^HMOte@f!#lLn5nj&1Xz1s)GYQ8m>30_%txE(imw!!s}(dk4= z{QLc)qXSW^je9zQ3a{ijyv;s$K}6Xf%Nr%nTe}Fpi`CktrnIO6GSI$+$xtS-I*)7y z2>|2TvWD7`b!G&wK+Ok)LUXR22(c_&)}@#l?l?FHp(Vj1fsI8(%V$J3yd+3{=3lKG z#fS26e4Af4i1hy`cYFfHXn9hS@=afUFaNfMEZR0P%2ewsEmEGjnxe{O{wx zQlvJ^E+Lx>Wwcj1ReEVFd*33PBWiKVy^C^7s#@K{Z;Ij)iXE2Qkn^fdU?Y)gl>%J1 zv=!p^AX2Ro@cykO0mPGgobSjbST8t0y0Dw&3e6vb}?DW2p0yQaXCS|5CDfI65QN z`la$x11_`>1$)gr)0@2!P%}lo#lKZnJrPOqcALepaOKYbY03A#;{Gt_j+*Pn7?A(g z)ihW*=p#Gf`pco$?82Hgzv|31m!F(*<6Or7w?Z~b$DGd5#{3sA_p;rZYoj-HweQNR zHMIMhKR@|f<_FVg#S%d^68Ji{;z~g^^fETn3Wyu_?MUDYJ4#%TBcfzPkS&7g4uPsk z0bRAXBmJ+95^2mP5&?NQ-t=$~49YZC^jsL)g?({O>e`x~tSh;B|5`Xd&V}Hm{lvq! znZv6e(J1?b+dagZN+k(^(FX4F(D7AWi&P??d?%|qm+|vwn2l$;}tpn%IZ=~ys{0VhgtWOidryc&{UPj zsVlc1;lc;bTNFKL?KR+(HN1{i!)s}&)#$MpvF;S+L{ry|EMyrglg1I%6s$^2 zxv+@F`{7q91rXMe4(jZQdER{ch&zM&QSH`zm;fVOPXtsNnZry?t1dBIe~crwWUsvI z7E)HvHnOIPO%wMWP5l9@Qr%si5Ud8vbba*ZhIAsoe%T>HOf`4p6-}zA#JfeUAl+rI z;)FB(6yOtCH5~8X1Pfw{&{;6WZl49=_VPoHV8zD24nh(^Wz>-yK(6#ImU@IzdCGFC zKXi2UC%R@?W5bD@ULpS@1|9xyXPy%leh{Wi&@aEfVbQhP%EZ;Jcg``QO4P9r z5I$2=1Qvr8pVt081aWa6qT)P@0WopnQLa{?hquGP?66Bb&A1jeJ{31!E+LFK120c_ zF5@LI)sQb_t%2Y&^W>N78nb05w@=Cftygy#Qez0&Xm1Y`7zu+g2UH=jS~u8GH3asa z0D}8)wQ;FrhNJZ7rciLfp=YqaAb}8ncmeQ&vA|F>1T~rfChSD(k_52p$+>~iEtB+# zGLT%1`UdKRRfrujyYjS+v0D#Cn)(w(`gX3twgq;@5~8sMIw;Ln+NPO-Ejs=ao{BrK zkT8i8@d!H{RL|i8Hk>`vC}9E)Nfmi>9S$mnw)`z=+x}5kx<7izGu*J@w9bm83p<%e zwd%9uqyMLDEbKk2Y=PU{@l6 z8`gdXM!k+Fv7%Q0Cm)1@h@vy!prGhAtTRQs0)fV%r_G~!>H2VHG@|?}d!cLVdeS3i`1xS#+^OT! z{nPB}u+CT8fgpqT#qGhX;j>YT-r-Xu0U6##Gepdot!}Woz(r;e7De z^!@41spIt`VrlU0b&6Wx%Kz`t*TYubr;(G_o!P6`(}nd5kdct%dZQ@A+2_06dwm<2 zFV9h};2<9mc(X0D%)fi{_vQ24>&K^GW4DgLcY8rFu;Max7RMf z`2|RzPUulPTl)Uj!(j#ayQ6n& ztDBp>oU*N2VG@YkWw1QMSv@PZH1Xc=1NVoIr68G>y+t{CZ{2KeyFVRtTNIavpkwE%P?8 za>;NIe0c*iZjb)ezC%Y}-*$P1GTZ%6Zu4^j;ijQOH?BqBdpYK0?={EudAE*|gO&Lg!T;5z}KD9`+HT= zwC`yy-d@d1-HQzlI{wapx+TAbTqT`)A>?WTf4}^an-shomD7*~JGG)o8BZB$NuLGB zE1$FQ$#k-wY`Qr=#Di%!sr@C>DCs>9yAo=t-xTC5iQCJ6>Yr8Gg8<}G0?NsuX38V# z8M2-+meac*4juuFFx`dO7WE;9sS(B|-AX8(kWn{MQSuO3E14k$sxZ?1BSMwG8IIgq zWX1?HK8)`q5O{tM#v|jRgO$gdRym~Ic&LPq@k$qE*Q_g8(+jnc4&xrPb6xyRYLbR# zWk=M1QN(RERhmnsZKT%Cf||3!@!!YGT@{^`h59DB7rOs~`2?ikex@Di_av%6>(Nai zT?P@H^+W4tL3hke&7N`|wv+j@Um>?G3z{e6-X>U0_tjcCUex3#2I};3wNppQC%0Kf z02I;4t&#O)mOpTt<(3ta0$aVDW|Pt42EvlsK!?FT(UGEbXnu-9gnCM0Xx!0Ciy&KGz~=c=cK>S*<{Os9lkrjd3atip3UB{C$G~p7*w1FQ1J=GY z{t?EEi}&UkNFKY6gFVHZG!jzsGugj=7W6E)mVG*@<1EJg4>Hn{a%?5HiO;nrI` zx+F}%7F-;Nx}2oCB?Ld4-hL|ifkMQwzW&Fu zaPdnjnm5L_4VBvc_IUKxb=}W)L6I{rM|+rVHy8s9%Mkr-z)J4LY+4l21Y$Z=M6n1U z=yaA|1VsokGVuP)VUS)TC=$?LYap=oD28%$Q3PXOLVe5!l*AB0t)(HJ1@B}B2!#;I zsG0!R$-9+E4F#8`u(1nZ!hLra0v(!VP_dD=SRg_wKtjgWO;wm85Bde8EU|nbKu22y zgV2;D4M4-kX}Asu0P|omKchup85oIsCi7xEaORxTwoh0G=_5lEHad?cUWsqKaz=3u zA)SU9gXR9*@pTwA9bH&fClaq$MB~*og4M7nNHqa!?>(E7Njzn;{zgi3oS<^=3X@fc z(3TDqLazV=g(Hf}Ht;LJ;J6`{;lN~$T8Zy&>{Y;s*GEM4gQt;(kv@bN%o{ee_PUH? z2cj(HST%u=b!|~LTW#PgTg=>7-d7fdESd9)d)zDC&hZooTSIG!q?B8ucn)sf9I=&S z79x-WgYXb?6SI!VMTHjN)WOh_ENv;-ZHXy4!Yn^>fJ3pKMV&9hda9WmaX17LX#-I| zF2@H6TJq(_w|RW{*T9~v9AJyEQ4AiqOJw`!al8{+lzR~^g!i5|*QHf89$0<{XYP5i z;Dp19six2*OBT<>GKHTRR5RJOXg7je;)}D0EuL}j z(a2TDx-$z)u!9cJVx#0yZg@=uIVLw2%n6xa;#8m@tQ(u>J$sczyOzpotd_tcv5$F6 z4tL?-8xG4UrTk1lB3VdL_K7w6a`AOp{B!5T7RRziqc<*}LA+j$i&3UYj=Y3cl2A>d z>^}QWMx9pDp>cCQ5%&2OtcI=pMX7Z8$YPC!^qD=PDiLBC% zb$u8He~AtOSYYIt=W;@gI+$Q#Oe0#4vRSVv%I?a9!5@EYE$o-h7AscuTm^n3UfGFM zMWHP~c=qRwaVd;+zuGzvoW>JrY+;>`oM+dwC?(8 z7!4uT=5ggRirCg&`IX&T3(+>4Zskae;Fp#Bi_ex3Yb2p++DN@$RWR@GF|`^ffZLI4 zh&yAWmj(AffHjHNBO`W23#$Hod&ftX}&GXLy0};+S(nK zW|e$Q3MOw}Mz9fOVNNavugHhXU(7XyOj8??xMViT#evqm!Caw=i)u|{z9{8t!uO4Z zEIi7)Z5Dcfm&;^D*{4UKjzyonzr_G=pfDOhqsQB6JYmoAe09$rCH6Q|SPB<8W=yp1 z4GjOX?u4T`r5TfgmOP^&iYhoer4)l2&5WBd)QxEhJe0(KX!$9O(+^MMJ@T`X@+MhL zYfXH8D6|!<&d8{~78^vRa7C zn>i?t5tu9ohf4|Mpsv!QtuU-5I$7V__{kRIdYfLDMyp9S)&V7{MOL6tny6lfIX4Bz8T3z) zzo3ax&!cIaqW-I35Yb@iW+)V1FFUOIQV+sX)CW$#__?jIg|zOio>UOQ-K^NJ>cwJs z&()jrQh6L!5R4T(5S5sU1(u8@&9idvIUIVU^=-B#(;F$ylh^PSc6_9~|ClF!gR~ z%trUPNXlyvNU`b}?n`Cty+7v>W0{6e);;2?x9lX8h(t#=5aYP2I=O%)%9O5TN)|Wa zXjfXqgxVZ66LK0A&TinFG9O;XVvr3%ndxRv8}IPw{(HM|W~M3}Em7>+Nw3T)nhR1Y zfbJK?*J+`5OPZ~!Tl_lQo5UfvujCn_(D5yXMb*ov*gtmNXNVcU=S0)Cd0OYFm|y-H zPU0;kPR(n@qS^r@$E&&y$ly_ZWXUJG3{co6ox^WQI25BjdH0x0D>1gnWTW2qLQ+tv zcfwsuK++HGvgQ#}ouw{v93m-If%v6Y?j#W{8Go0g)kUjJ<`(NfSf8y}Us32a{7J<3V0@Fb_VyFcv}dWmKkV5k3Fiz%6t$wkU4P3Hpq}Gevv;f=V7g zMwuQY{cNaLq87M=P*l*B8qJavA4P|oD)r7>A%m)` zHlsHtwAxVcd{uxBC z{TF+$J(~rLv@qq+;`c6IVfJPjb;CJqj{V8MW-7SwZzs|^i{-}VbdnG;y^xek)(nM? zHLM=x(UZ#5qASS7I)6rEEiqNICe3NtQmauPG)XwLZ+EA#1J+DeL`EpP@=%%NG%zL( z-WwakOR&os*I_@;I@s-QF{lbpEpmQgxHK+8hMFG2*u|{KP^*>qiiy4H9FA)xmGwgY z(kv?<{D*K{DsA7DNX%XSw`0%OEiHWbsGg6-rrj&_eRO?x3I(GkiOYy-MuLA!Uqv*6 zUL(mA!^2^XA?tV!c(J?_GM!Pq9bLyXT+J-@5kvI|6nJ1nT*ltd|=j>_#D6eT-dCSl`dHQ5f zfTPPhO$QHOPZ@)6cRSim1Tep5{_OH!zXW7$5E4vjbo#Ya63C06N(cB>+E-56r@6bes3j|mO;z#C6MuL*bi!Gj<9 zh(5qcJO!VcGkUrad=|?KZjk|d;C{HN0fI-?RG;9bxjLLU?i4$<^3~bZgI{j$OdKoo ze+V5~8WPmw^7@{p4PV<9gm&~UPUJavKH)10&f{JWCwy6GysYXbg9E#dA(!%%1AD$D zo*LfM?4(-|7E)1}^80X5D3t-nK1z;8Kv;5zI!wwfr(*xRg6}gV&hF(0D@Q2ABHTmv z!991b-vL~Bl6$ThB(rAZn?+~?a{$$KB`|a|>HV%bw5QS*ct{!*v>S05z<{32u$uHf zTAE~_4mOGy9YQm)mh?PhCYd_g^hVP(Y!fRC(Q;57#;|ZbLS6jY1BB)aehgHEd=` z9$6Ae5XVHSD`PUE%_0E#p=JAfIc}h0KRuUBr865tuJ~HMkrXacWRaZ{2`kzh~D&ap}+@oY2OU5fE#ON-v{Sgod@VNw~^+c40 z#I4;3^|PEkteF3quDGj7RrFO40uO0^PJLVk_(qACfFR7rMs5fn#Rx zw}!18;IO{tpVa93D>0ERYRVXl!-TE^B)cLvNfxoh_4#lh4m>W&50|ut7Vm-vmk_zW zjv@Z30gYX`X2pm{hGe=JlS7ReMcz0-bMS`n8eQ7=c|#k?p6BuLmKe+Gfpmeptg|ka zCBy6i_j*g{aX?ir(26gPSoU4kIebYm2B}6GPu*;h5VfyLG$YPPCd4DJ=(KuAYvQ)b7vrs(`|%|#caV= zC?|$2Y{#IzUaw34fTxxoht?~ke~63fWY$lg{6%rn8BE>8c9v=TAiTF(;c5XpXy@{l z`7xVg5NE2^!CC6#fFvwFNnEwRPo5S1={U&^D3i9mTSSwUOMk%NL|2Nq&x3O;W<&0( zM&7xf1U)crl^h{x&qg*-Dp98gJLs$u`7DA5eKr&t@zu8CYJq^naTc6t9+)WZMbdzYM7h;dmxjf>lw(Aq@;yl?``d#82>18)34* zVX~MbnnXFiyl0xhT;rno)(R%`svlKz6?69rLBNm!7M+S+&Ja!U~uc%g6djWEfcz0Y}T@rl3B zC!*WId+AI6vMG;qQ#yg2u)uwJV{Q&E0j{|Q zB~@o%Dboen;+TB<#EHylk6ORd4tN+ycthU11V;eN)XHd^ z93(8Vx;SQ8`MD%npRuP|KFd$QVcEj@Q`+a zimf5Qa>{ud?I=8Dpi^98?wjpb5bH)m=7GyxIp z0yTTyP^=jBnd10xF;y20IF1@lq|_UeLJ#EczMw)FEL1$r*`DcK)yEzri$2DJ0W9n% ziUobFMaXylG#Q|?ZoPsgpQzA{;xrYu?Yx+fxE6#lW?r}(Y99>(4wax-s0v%UX6FxJ zFjbooO3!cJR-&Fq8i^vJR?p1)PZJxt1l8^;6IZiE6{7yK2uKXUYC^6~Mbt*e4X-Pi zX$j~i#W3g3ob)_)r&3);T(XpZs^%QH$}GALn`yF7*Jjqyr8AgmDmsyQo0X;lNbIkf zOf%Kc@b25SYF?KTE(Zm<+#_d_l>Sd7wKY4-vW|B$Qb$FF?SlAc|s=f=@5V=mO zu?kATKlUR3T>$wiDh0V>EE1=0g^z~CFqsq(N;5Z=puvp>*)Uuz8LXkhAm{pA6|0n{ zlpi=W{_ zXN#Vsu3(}`Mp_Cl9vcv=nm=48_IHW=2@@Xc0-xwQa2!2TJ=%^X4t{T6+&jFrMy?|X zOhZblD`C{yvkn~8I}LFFE_}Sz=MDH%n)8vQ-eTeZ2Xdy6yojuuu%tY=wEO|p9~2{G zgie*}6vfEoc^EhmHZeWxYiRZ{2k11Fv1XUX;W^fhcL+Wj~9Z>!q;La1ME6Dh*-AJ;I&) zxoGA%A$TZ1dYc4>49hG0YeT)3C(XH}{;k48qKxX(4j+rM&(R-U+D30XAp;YI1Jg!d zTwCsP^ah}Q0CsV+@Hf+B5k6PN&!r2EG-dLHC&pTErNkE@n*9;+iF*mEfP>K6@joaw(dPXJDE4XL_P2Q(-y-{5N%l2t zeziG(U!!{T+z|KlUE%$+vWKY`X7K}IdFuQBNkG72uv|0yr@T9G{GZA@+kcezS{=KD z4UYdtw=OdV)qE+J{6MoFvv_xrV6-=%no`sn#XbJTJyYzyKM}bBa!BNJ*H0ovX`<5z zCr5jZ;yqqlR{=ly5C)x|HWm&Z_S`=m`Fea;+#(W?2N#ZSuddBJ!#VTa-^-^^?O*b{ z1}FVjHzTAJ5^@dyxGH2{J-l60@cH!icCGnw^V{b~yu2^%O)e~$f4^t%IlXvy9beq_ zD{RalOMDk}b$PA%68ICufBSp&MszVKb?opX&O}^Yd$kbqZ`JKY-fTOaQHG*^uOR^= zE^n6hj9%XCd%M3W9mB)wpC%Zu2kl>~13nXczF|g?69z|%DLaEESN5)M|9WBb)~w`K{uGw{?vgw7!f+Y_#YAuOk$)852hH-GKpw`)DoYFHSF> zFyBCZry6Y_zdtvghk_FW%x$w@j~;xxz5l~X9X8|Y9|#;uNtXUUa*9sDJQ*SJ=xo3G zrv5;nQ({l_Ps!Fh1tV5T=s}8o*K^xn+dp@$ENxdqRJ;mo2PPv4Z58ZXHF>n;C-``F zg?Wv3RXdQ~`1m1e6xt$d7{!`=Rk6Ly?70Cyex7K*RbRysQg$fbzm@R@1M<{gP`^N5 z$iPmgH&n?k$Z09pR1@WJ0?CbtklNDe0Wk_h?!gI=;mc!ksuaZK#9wf0+rfl&L0GtcXM2G%oMIbH&#P zx-^5!s;v1IVp#W4RZe` zqTm?xLqHL)R1nRk4xOZY^nr*M6@^JDVk{>_xBPBfdkbUzBes$fbpx<%)&;to?>`E+ z_srh{a o0h!rw%G?Q#bZjJ)HQav5SI;>%&C`h5oJMljRgU31|SRzPz)-d8AN?% z+7}etP(;L<$7ZCCu(jMhCqG9|jGDsbbecKLAR5caFcO_MQ?XrCoIvl!WZ-TQC+G~9>hgn8hwo$7DJl~&tXj`?h=D;P=%#Sql6D>&LsdbO07x{D$m#^&YMu?A3nO$>;l^0hB!(N4E&a+$)@sPW5jRHgA|IDaHLbeCYICwqJJuS zohV)I!x$oP$DdgYWljim^vBh;$;uY3=a2mAe4v|P=f-4a#iHW&MCGj7G@Yks0do~@ zu>gG42Zp!Cg|`ZeNX^c+J`U!J#$=x6qK0@k55Xc<66l<+9O{-knW-yXI_go-Kxo4- z*$q&G?CKcv4+*XkrNF}$FyTIcAc}X^tz`8v$EV1yWoGVqn%MYH7q=+L8F892)*pMAA_@Af zI)6AOYKLr{{_0ao;!KPG6r2s6bVBB#3ycjXd#EZFOBLwOAGZl&U|oBUHMqmOKkk`% zge$Z)mEWO>`x;mr(>QwgH8d9P>kfBU*?pYUi9w3~i)Wt{HY^om+J|f#3-g!oZOmQp z&;((MDeT?`S}uB;7eN=c{;Rs+XV2||FOgGy@;=y57spT++&)H-=ZZ541J|`BOhVd2 zETtPyywuc#<3HO@Cb`qRz^5jFIifOkPi%LNP7THcg-aM$h@2mkk^7c|O^_3Wi4Y9C zRKPwwF^Y~F%F*Fwj=`JYIgpQ#CrCzyZFsBb@GbnTZ4q@OeCrMq}bc}`GwhK8S3otDJIrt z+IN=^^1V4Z)Q>C=HDaEe>k1~9(Xbe&F=8~BCnv9wh14JheoR0uax3Je0J5#td>Ivj&wFzdluLPO}$n(|bns(M8Eq5YN4jwkEw6Q{pt9gc+FD#L@W1 z455t}v}`=4yMp-gs5v%If^mAOg}rVrl*_gJahj(egoJ?@%zhbCh1{}z3XO9rZ|3wk|w+%rND%;zpjmSSxSv0?0Q z%S?S>+ruB(4+3Wr5oR+;c~~>gWj!IwkiFI)5j1^NgkL_u0BU7&F-EMdB>qsb_?WiV z?9uqE==4X=Ilc(kWO+qCwr?Sb z2_%|S9^0Qn*lN20D(iqf#?q@w&QJ3WaA-Am&d8x!HlUUnt#BTTWC;K2d&bZ;n+s-R zi9az}K+l(W>K{BVbmI4qtdw(UNTKhVAc_M$n9fKA*O>pDaH2v@{ zsJSg+<)=q|Ld#YRWX|l<29TrIUV^Fa+zoXzrXNbYWa=2JkxdqY(>_rDh};QFCv=FT zt(0CqfF8MnFSFHPu+ei&ja+dwtx%VgA03a3@iMd*#oX{su8!8{Y$z^m4C9p2*a&nk zL(^EzRKI3wCH6U{{tHz0J63gV#pdSmCq_e}?8lTJR)Flg>ZF|y{B>2VO3Jztzg23D zDE8X&R~Z^#=RgDDtc&f|B-iFA0oO>8=d+q9$F>Zeo9OE{j&Hr{{qz-kp4J$H7Jcd4 zPtmi!hj@|uAmfY?A_;|576Nyd0li!$1t($HhWg{HAE}V84I#PT_J&S`4#LIpJIvTt zR&vv7H54ybtRVSvXK{6%pBrHuw2F)EuSTV+6XW@WL;)#%Y@n3GR4F3PAnzR2m@$8qK!@A_Z++esOWrK7-e@oEHpc0}jDW&QzpDPH; z0ly;v7)^w0wC8-C0V&G92%Ft_UaB4`*CH)NR>*-ucMU z8CwkF0ox@Tms~jWMt=Jj$6k7G=*4G$6Zy(_=I;{*{jTH1TvYt9NoNUWiP&ZjoOS&2~PIjwbS*U&=Qg8y>~cS3Xjv z=davZJ}yb$e{A}OXNt#dJ>RVF;JZfn{EjG*v{-uvPF3kDgqw3|mMV--wti&cV_7{# z&TshqX@&eC#LM;}G>B%|P}9chvv0~r_+^tq*n^+DslW*9Nxo|VCeHvPN{(UyM!^7M zN}hN^tao2P6Ld~HnL z#{QY$*um_&&OWCurzc<(!s0N+rZRE8Mc0MGS7r-i2d%iop%fGCnl#lHH$nPjYXkdd zr@%>z(-qIo!aWZRqJW$%m@yib$^Jio68M7h1FM0dQMh*dEg)99YS637IQ=BkEQ11D zGci`tAxUvs*oMe_GB!@DM~q&D!YfkA($l-D#sMcoDaOO{U(jf1e3jbRx4Jz}`y+Tn zb77z+2s>A3&CDriWGoaeJ#^oXj$sa)USmSXQSgF6*^KCkz4te{S}>zDBUhI}S2K43 zvoLDujqo^jK_xhsv^1JFSgoqjEJQg;G|hD|Jkn2MYEUG)JtGbn(37-A$~pzzo&bqo z7Hj!!aP3J;zX7rHeQEX&7}wvvy^n3u#vqP7z=iQo>6__nf#W>7+;S+=lU&4YgswC|Y0{BIl}xncH%*n2v*1e{vN(1TJjJR_R#ks`=XKQ+s zxQ?e%yqQ2=%2@SBjx~mizszrwy3+N1)eU~t(e!kjqDL5P!Sb@U!gX?4f8q~8X6tog z5~2(^^l0x4Ww{@SZOCc0u&(-EY>#=N`&RbP(T~0f=%?LZl|M9SY%u|dI(#))*C-mf zk0jcGOzG8_nB^K5*xi3K^<;nn8X_&2D_~7jc zSJ9GHHSw!G%_Rn%H+)w5%^t~Y7o{cJHY1U}J^8v}=*tkpZoQlgnF-TXxai7>WK#;rE}WoR10&V-acZUS(-};xbOMf*DUjoE&TBnE+{c%@zDk;kJ4MDeI%F}h;3*AX3EUsj5Lc!Tp< z`yJfn;{+(&pG@^&+b&RAWc$uKbB%#d>=pb$x}7^Ero}(Lb;+fuW_$S;V^z>nUxxmY zQGWPzePjIJlHic6P{sxv1f&oH1O)Maszh8|y==`~{=@#aG>shAnNU7ymHhjXQE19FfBf}7JPO6QwpF&h_hPWI zpymk6>Fl|fqWDF%p59=CtE!Q#a*}sjnT;}yiLu}(HT`#*4Y|OGy1fFgvShaMhoH=- z;cnlepqUA!MOa0_94o<}o1(LA?P_&+@+suwL5JeMV~2m~S_6=Lm@a4XE-u)xB`!0@ z8nO9p6onRzE_7;Zn5L0mQ98+?_uys4SVOw_T zATz3m>U@Jh^+%6?ZKDw~#I#|0ia9*IQZ;zn1Zg~S+yi@&BrqN54WG&!Xt*(pq^;Z} z6N0)NvgEj?N{TdWTf(~l8ZSGzG=|<3b-F`}9oz%Fj zWnl50%duB=Yqw(Vxyf7buV%&Jil=Y+afy#*MK~MhZydZZeKpYSZp!Jt9#d;oW0g3* z4iQbTYY#as6{{ilP}P`+fft(#(v9Sc8CBryjOljaF?heL$MT8>WB}~8Vu+nZ!EJ!2 z57=&DV-F*iVs-Ps%%(_;n#ZSdSdA}o)TYEPU+N{li*?p)_uu3iFnz`1@sUDK)7GEF6dd~CbV{O}i z^9HK4(SMgvZyeqgt{{q*oh_vY^!5C~6MXEEel-@8Zex?ns#>?iw^RBYe12!1&x?^q zjWuE71;ajuRta=MfPZ)ph_i@|A2rNuZNR`O&S9Qlru&h6ihMje9kpaeXoVMH1TaEn zFAqkCgvD&53I=ZBmLXzi65c-k);ws6vlv_O3YT`zv*!UEbU*k4v7qD4xHd0`UA7Ty{WLS4$i%vWhy=|C5eohTF!rMUYyM!A+ z5!tmGLX`!z>`P=?yy=&?A$9o9yI&VDv-tjhihnbryYTw{{f+4VN~8aIP(ciw&1_v5 z8UEAfCU@BXD~c8j7@o~zf}SOgWHr0Pgm?v2FG5~LgNzo-?FFuvIwiv6c>Ux<+a$0O zyy7Zpjj6=`L{YZVUTO!GY$gAfE1e`q$-JvpS(ppU|dBV9{H^lP0VY zbuwoX+Q{+%fvl~~6)Bpfk|UWHZc5+M1)Q$|CoqNN(w)bq@UUWa#9PH?BlJp;Hxl1k z%$WR=B=#!b7Xu2~(kT*bt10re8w68QmFf;9Inqtjko9K|5Rt(8sC_jm4wJ-~*3B3z zcJMEwS9!4SK*Ta_JTjpRSk$U^1YDVA%>$*cpL{H|V8n&x;iDb^=?{g6lq76Zn&&dPv!2|<3^2wa<$m($KiU zm!3l7Xt3(}m zc;f3GF8xG5DeV3K=5~BLbH#kuk4&iE54ijPv^FrszXx`|K>PZmo%8cbQu9jULn;eW zi(^5l{_GTAf6%!H|GlohzLM6{&m2|GxNZY;y~37vQl{};doTX2zEd`vMM^YS{i64x zBj0}S*|=2a{&zWpte$N%j*3pK7h(F$)pO)ZFp!??^$0z56 zBD_{y?Fc`euJJT1_{*gardsKnEgFtlRJ{_84ioc!zx9-AVa%JHkIj>0I5fk{EF(1g zjr}@~MmkCVlr30MecO>^RYQg@^IosRk&7-eWv*wuoY-kB7aO@shHH90@AM@vm`^Zi zGZbZmdsUhv!9 z@Tfm0@BMP_QgeQhyJq{2-%qc(wEx2KBqh5%^+%8Ml}e6iyVYGI~}nWKmp#Y Uz>`Nn9Rgm4Fkt6E)EUGB0AE<4ZvX%Q literal 0 HcmV?d00001 diff --git a/docs/功能明细.md b/docs/功能明细.md new file mode 100644 index 0000000..29431a7 --- /dev/null +++ b/docs/功能明细.md @@ -0,0 +1,124 @@ +# 系统功能明细(用户端小程序 + 后台管理Web端) +## 一、用户端(小程序端) +### 登录/注册 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 手机短信验证码登录/注册 | 可通过手机短信验证方式注册,修改密码 | +| 微信授权登录/注册 | 可直接通过微信账号注册进入小程序 | +| 隐私/政策协议 | 可自由上传修改文案内容 | + +### 首页 +| 功能名称 | 需求效果 | +| ---- | ---- | +| LOGO+小程序名称 | 可自由修改 | +| 搜索 | 关键字搜索:可通过搜索栏搜索关键字查找到商城内相应商品(模糊查询) | +| 消息 | 系统通知:所有小程序内订单状态变化及支付记录,佣金收入等通知 | +| 轮播图 | 自定义替换图片:可自由设置图片尺寸规格 | +| 精选商城 | “精选商城”同“商城”内容 | +| 活动报名 | 活动列表:展示活动名称,活动时间等概要信息,如对应的信息过长时可自动换行,把重要信息展示完全 | +| 穿线预约 | 1. 显示门店名称、地址、营业时间,距离;2. 点击定位可跳转到地图显示;3. 点击电话可直接拨打;4. 门店名称查找 | +| 积分商城 | 1. 显示总积分,可积分兑换的商品、查询兑换订单进度;2. 可兑实物或优惠券(积分不足时可补差价) | +| 热销商品 | 展示购买率高的商品列表 | +| 会员登录 | 1. 点击自动跳转到会员中心页面;2. 点商品内的会员价也会跳转到会员登录注册界面 | +| 热门活动 | 后台设置 | +| 领券中心 | - | +| 积分签到 | 每天签到固定可获取X积分 | + +### 会员中心 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 购买会员 | 1. 会员升级:成为会员即可获得推广的权益,会员在进行推广时,会员需线下收取下级的会员费(298元),再由会员帮自己下级录入注册信息(手机号,如录错需要修改,则需经过平台客服),支付198元的注册费,之后自己下级在平台注册登录时,通过判断手机号匹配身份,匹配成功,下级即成为平台会员;2. 会员权益包:成为会员后,可在平台申请兑换权益包,再由平台进行配送 | +| 分佣 | 自己下级在平台产生消费,会员可获得相应比例的分佣(必须保持会员身份才能持续获得) | +| 分佣结算 | 订单完成货款到账后(过了售后期),佣金才能结算到上级的佣金账户 | +| 可提现佣金 | 1. 用户可申请提现至会员手机号绑定的微信;2. 可对返佣金时间可以进行设置,提现上限进行设置;3. 温馨提示:单次提现200以下,每天不超过2000元 | + +### 商城 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 搜索 | 可通过搜索栏搜索关键字查找到商城内相应商品(模糊查询) | +| 商品分类 | 三级分类 | +| 商品详情 | 商品主图/视频 | + +### 购物车 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 商品列表 | - | +| 管理 | 删除选购商品 | +| 下单 | 多选商品,下单支付,同一个订单中,只收取一笔快递费(可设置多种模板) | + +### 我的 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 头像昵称 | - | +| 消息 | 系统通知、公告消息 | +| 设置 | 1. 点头像:设置头像、昵称、性别、手机号、显示ID、注册时间;2. 点设置:服务协议、隐私政策、版权信息、关于我们 | +| 会员 | 会员等级 | +| 我的钱包 | 余额充值 | +| 积分 | 我的积分 | +| 优惠券 | 1. 已使用、未使用、已过期;2. 显示所有已领取优惠券(可指定发放用户) | +| 我的订单 | 在全部订单列表,订单支付:待支付,待发货,待收货,商品评价、申请售后(可部分退款) | +| 我的服务 | 我的活动:已报名活动,取消报名 | +| 分销推广 | 我的邀请人 | +| 门店登录 | 根据用户账号权限判断 | + +--- + +## 二、后台管理端(Web端) +### 首页 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 统计 | 普通会员人数 | +| 趋势图 | 注册人数、会员人数趋势 | + +### 会员管理 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 会员列表 | 普通会员:登录注册的用户信息,手机号、昵称、余额、积分等 | +| 会员权限 | VIP会员开通价格、会员时间、享受权限等 | + +### 商城 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 商品管理 | 1. 商品添加、上下架、商品规格设置(如服装码数,颜色等商品参数);2. 能实现线上导出导入数据,实现批量修改导入数据 | +| 商品设置 | 商品单独设置分销佣金 | +| 订单管理 | 商品订单:待支付,待发货,待收货,商品评价,退款/售后 | +| 商品品牌 | - | +| 商品类型 | 三级分类 | + +### 比赛活动 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 活动列表 | 1. 添加比赛信息,限制报名人数,可设置热门;2. 后台可自定义参赛人员需填信息的必填项;3. 衣服尺码改为后台自由设置尺码规格;4. 限制报名人数或者队伍数 | +| 预约报名 | 活动报名人员 | + +### 预约管理 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 预约订单 | 用户预约穿线订单,分门店查询 | + +### 营销 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 优惠券 | 1. 场地使用券、无门槛、满减券、折扣券;2. 可设置优惠券指定发放给:会员或者非会员、单独某个账户 | +| 使用记录 | 优惠券使用记录,核销门店等信息 | +| 积分抵扣 | 积分抵扣设置 | +| 积分商城 | 使用积分兑换商品 | +| 轮播图 | 广告图替换 | +| 系统公告 | 发布系统公告通知 | + +### 系统管理 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 用户管理 | 添加系统用户账户 | +| 角色管理 | 用户角色权限设置 | +| 门店管理 | 添加门店信息、账号、密码 | + +### 财务 +| 功能名称 | 需求效果 | +| ---- | ---- | +| 账务概况 | 订单、会员、分销分别进行数据统计,可按日期查询,可导出表格 | +| 充值记录 | 查询所有充值记录,可按账号、日期查询,可导出表格 | +| 资金记录 | 查询所有账号资金账单,可按账号、日期查询,可导出表格 | +| 积分记录 | 查询所有账号积分情况,可按账号、日期查询,可导出表格 | +| 佣金提现 | 审核所有佣金提现 | +| 佣金记录 | 所有佣金账单,可按账号、日期查询,可导出表格 | diff --git a/docs/数据库对比分析.md b/docs/数据库对比分析.md new file mode 100644 index 0000000..56eb759 --- /dev/null +++ b/docs/数据库对比分析.md @@ -0,0 +1,193 @@ +# 数据库设计对比分析报告 + +## 📋 分析时间 +2026-05-08 + +## 📊 对比结果概览 + +| 项目 | 原始版本 | 新版本(v2) | 变化 | +|------|---------|-----------|------| +| 表数量 | 32张 | 36张 | +4张 | +| 新增表 | - | 4张 | ✅ | +| 调整字段 | 3处 | - | ✅ | + +--- + +## ✅ 已匹配的功能模块(32项) + +| 功能模块 | 对应表 | 状态 | +|---------|--------|------| +| 用户登录注册 | `app_user` | ✅ 完整 | +| 会员等级管理 | `app_member_level` | ✅ 完整 | +| 会员购买记录 | `app_user_member_order` | ✅ 完整 | +| 商品分类(三级) | `app_product_category` | ✅ 完整 | +| 商品品牌 | `app_product_brand` | ✅ 完整 | +| 商品规格 | `app_product_spec` + `app_product_spec_value` | ✅ 完整 | +| 商品主表 | `app_product` | ✅ 完整 | +| 商品SKU | `app_product_sku` | ✅ 完整 | +| 购物车 | `app_cart` | ✅ 完整 | +| 订单 | `app_order` | ✅ 完整 | +| 订单商品 | `app_order_item` | ✅ 完整 | +| 退款/售后 | `app_order_refund` | ✅ 完整 | +| 积分记录 | `app_points_record` | ✅ 完整 | +| 签到记录 | `app_signin_record` | ✅ 完整 | +| 优惠券 | `app_coupon` | ✅ 完整 | +| 用户优惠券 | `app_user_coupon` | ✅ 完整 | +| 积分兑换商品 | `app_points_product` | ✅ 完整 | +| 积分兑换订单 | `app_points_order` | ✅ 完整 | +| 分销关系 | `app_distribution_relation` | ✅ 完整 | +| 佣金记录 | `app_commission_record` | ✅ 完整 | +| 佣金提现 | `app_commission_withdraw` | ✅ 完整 | +| 活动 | `app_activity` | ✅ 完整 | +| 活动报名 | `app_activity_signup` | ✅ 完整 | +| 门店 | `app_store` | ✅ 完整 | +| 穿线预约 | `app_stringing_appointment` | ✅ 完整 | +| 轮播图 | `app_banner` | ✅ 完整 | +| 文章/公告 | `app_article` | ✅ 完整 | +| 后台管理员 | `app_admin_user` | ✅ 完整 | +| 角色权限 | `app_role` | ✅ 完整 | +| 余额充值 | `app_recharge_record` | ✅ 完整 | +| 资金流水 | `app_fund_flow` | ✅ 完整 | +| 积分配置 | `app_points_config` | ✅ 完整 | +| 签到配置 | `app_signin_config` | ✅ 完整 | +| 系统配置 | `app_system_config` | ✅ 完整 | +| 消息通知 | `app_notification` | ✅ 完整 | +| 文件上传 | `app_file_upload` | ✅ 完整 | +| 用户地址 | `app_user_address` | ✅ 完整 | +| 订单支付 | `app_order_payment` | ✅ 完整 | + +--- + +## 🆕 新增表(4张) + +### 1. 会员推广下级记录表 +**表名**: `app_member_subordinate` +**用途**: 会员录入下级手机号记录(核心业务流程:会员开通与推广下级流程) +**关键字段**: +- `member_id` - 会员ID(上级) +- `sub_phone` - 下级手机号 +- `sub_user_id` - 下级用户ID(注册后填充) +- `member_fee` - 收取的下级会员费(298元) +- `fee_paid` - 会员费是否已收 +- `register_status` - 注册状态 + +### 2. 优惠券指定用户表 +**表名**: `app_coupon_specified_user` +**用途**: 后台定向发放优惠券给指定用户 +**关键字段**: +- `coupon_id` - 优惠券ID +- `user_id` - 指定用户ID +- `status` - 发送状态 + +### 3. 协议内容表 +**表名**: `app_agreement` +**用途**: 隐私政策、服务协议等协议内容管理 +**关键字段**: +- `agreement_key` - 协议标识(privacy/service/copyright/about) +- `agreement_name` - 协议名称 +- `title` - 前端显示标题 +- `content` - 协议正文 +- `version` - 版本号 +- `is_required` - 是否必读 + +### 4. (订单表新增字段) +**表名**: `app_order` +**新增字段**: +- `aftersale_end_time` - 售后期结束时间(支持佣金结算) + +--- + +## 🔧 调整字段 + +### 1. 用户表 `app_user` +| 字段名 | 调整内容 | 原因 | +|-------|---------|------| +| 新增 `display_id` | 用户专属推广码 | 分销推广功能需要显示ID | + +### 2. 会员等级表 `app_member_level` +| 字段名 | 调整内容 | 原因 | +|-------|---------|------| +| 新增 `member_fee` | 下级会员费 | 会员收取下级的298元费用 | + +### 3. 活动表 `app_activity` +| 字段名 | 调整内容 | 原因 | +|-------|---------|------| +| 新增 `max_teams` | 最大报名队伍数 | 支持限制队伍数 | + +### 4. 用户优惠券表 `app_user_coupon` +| 字段名 | 调整内容 | 原因 | +|-------|---------|------| +| 新增 `receive_type` | 领取方式 | 区分主动领取/后台发放/活动奖励 | + +### 5. 佣金提现表 `app_commission_withdraw` +| 字段名 | 调整内容 | 原因 | +|-------|---------|------| +| 调整 `single_limit` 注释 | 单次提现限额(最低) | 200元起提 | + +--- + +## 📌 与开发计划的完整映射 + +### 小程序端功能 → 数据库表 + +| 功能 | 数据库表 | 备注 | +|-----|---------|------| +| 手机短信登录 | `app_user.phone` | ✅ | +| 微信授权登录 | `app_user.openid/unionid` | ✅ | +| 隐私政策协议 | `app_agreement` | 🆕新增 | +| LOGO/名称 | `app_system_config` | ✅ | +| 搜索商品 | `app_product` | ✅ | +| 消息通知 | `app_notification` | ✅ | +| 轮播图 | `app_banner` | ✅ | +| 活动报名 | `app_activity` + `app_activity_signup` | ✅ | +| 穿线预约 | `app_store` + `app_stringing_appointment` | ✅ | +| 积分商城 | `app_points_product` | ✅ | +| 积分签到 | `app_signin_record` | ✅ | +| 会员升级 | `app_member_level` + `app_user_member_order` | ✅ | +| 分佣查看 | `app_commission_record` | ✅ | +| 佣金提现 | `app_commission_withdraw` | ✅ | +| 商城/分类 | `app_product` + `app_product_category` | ✅ | +| 购物车 | `app_cart` | ✅ | +| 我的订单 | `app_order` + `app_order_item` | ✅ | +| 优惠券 | `app_user_coupon` | ✅ | + +### 后台管理端功能 → 数据库表 + +| 功能 | 数据库表 | 备注 | +|-----|---------|------| +| 会员列表 | `app_user` + `app_member_level` | ✅ | +| 商品管理 | `app_product` | ✅ | +| 商品规格 | `app_product_spec` | ✅ | +| 批量导入导出 | 业务逻辑层实现 | ✅ | +| 订单管理 | `app_order` | ✅ | +| 退款/售后 | `app_order_refund` | ✅ | +| 优惠券管理 | `app_coupon` | ✅ | +| 定向发券 | `app_coupon_specified_user` | 🆕新增 | +| 积分抵扣设置 | `app_points_config` | ✅ | +| 积分商城管理 | `app_points_product` | ✅ | +| 轮播图管理 | `app_banner` | ✅ | +| 系统公告 | `app_article` | ✅ | +| 用户管理 | `app_admin_user` | ✅ | +| 角色权限 | `app_role` | ✅ | +| 门店管理 | `app_store` | ✅ | +| 账务概况 | `app_fund_flow` + `app_recharge_record` | ✅ | +| 佣金提现审核 | `app_commission_withdraw` | ✅ | +| 佣金记录 | `app_commission_record` | ✅ | +| 积分记录 | `app_points_record` | ✅ | + +--- + +## ✅ 结论 + +**数据库设计与开发计划完全匹配!** + +- 新版本 SQL 文件:`/Users/gxwebsoft/JAVA/paopao-java/docs/db_paopao_v2.sql` +- 包含 36 张数据表,覆盖所有功能需求 +- 支持 9 大核心业务流程 +- 包含初始化数据(默认协议、系统配置) + +### 建表执行命令 +```bash +# 连接数据库执行 +mysql -h 47.119.165.234 -P 13308 -u root -p db_paopao < db_paopao_v2.sql +``` diff --git a/docs/核心业务流程整理.md b/docs/核心业务流程整理.md new file mode 100644 index 0000000..530d3c9 --- /dev/null +++ b/docs/核心业务流程整理.md @@ -0,0 +1,93 @@ +# 核心业务流程整理 +## 一、用户注册与登录流程 +1. 用户进入小程序,选择**短信验证码登录/注册**或**微信授权登录** +2. 阅读并同意**隐私政策/服务协议** +3. 验证通过→进入小程序首页 +4. 需修改密码→通过短信验证码重置 +5. 会员身份校验→手机号匹配后激活会员权限 + +--- + +## 二、会员开通与推广下级流程 +1. 用户购买会员→支付**198元注册费** +2. 会员获得推广权限,线下收取下级**298元会员费** +3. 会员在平台为下级录入手机号(录错需平台客服修改) +4. 下级用该手机号登录→系统自动匹配身份→成为该会员的下级 +5. 会员保持身份有效→持续获得下级消费分佣 + +--- + +## 三、商品购物与支付流程 +1. 首页/商城搜索/分类查找商品 +2. 查看商品详情(主图/视频/规格)→加入购物车 +3. 购物车勾选商品→统一结算(同一订单仅收一笔运费) +4. 选择支付方式→完成支付→生成待发货订单 +5. 商家发货→用户收货→订单完成→进入售后期 +6. 售后期结束→货款到账→佣金自动结算到上级账户 + +--- + +## 四、积分商城与积分使用流程 +1. 用户每日签到获得固定积分 +2. 进入积分商城→查看总积分与可兑商品/优惠券 +3. 积分充足→直接兑换;积分不足→积分+补差价兑换 +4. 提交兑换订单→平台审核/配送→查看兑换进度 + +--- + +## 五、佣金结算与提现流程 +1. 下级完成订单并过售后期→佣金结算至可提现佣金 +2. 会员进入会员中心→查看可提现金额 +3. 发起提现→提现至绑定微信(遵守**200元起/单日上限2000元**规则) +4. 后台审核提现申请→审核通过→资金到账用户微信 + +--- + +## 六、活动报名流程 +1. 首页查看活动列表(名称、时间、人数限制) +2. 选择活动→填写后台设置的必填信息(尺码等) +3. 提交报名→报名成功→可在“我的服务”查看/取消报名 + +--- + +## 七、穿线预约流程 +1. 进入穿线预约→查看门店列表(名称、地址、距离、营业时间) +2. 支持按门店名称搜索 +3. 点击地址→跳转地图;点击电话→直接拨号 +4. 选择门店→提交预约→生成预约订单 +5. 后台按门店查询预约订单→门店核销服务 + +--- + +## 八、优惠券领取与使用流程 +1. 首页进入领券中心领取优惠券(满减/无门槛/折扣) +2. 我的优惠券→查看未使用/已使用/已过期 +3. 下单时自动匹配可用券→抵扣金额 +4. 后台可定向发券给会员/非会员/指定用户→记录使用与核销信息 + +--- + +## 九、后台管理核心流程 +### 1. 商品与订单管理 +- 商品添加/上下架/设置规格/佣金→批量导入导出数据 +- 订单状态处理(待支付/待发货/待收货/售后退款) + +### 2. 会员与分销管理 +- 查看普通会员/VIP会员信息→设置会员价格与权限 +- 统计会员发展下级关系→跟踪下级消费与上级佣金 + +### 3. 活动与预约管理 +- 创建比赛活动→设置报名人数/必填项/尺码规格 +- 查看活动报名名单→处理穿线预约订单 + +### 4. 营销与内容配置 +- 配置轮播图/首页名称/LOGO→发布系统公告 +- 设置积分抵扣/优惠券规则→积分商城商品上下架 + +### 5. 财务与数据统计 +- 按日期统计订单/会员/分销数据→导出表格 +- 审核佣金提现→查询充值/资金/积分/佣金记录 + +### 6. 系统权限管理 +- 添加后台用户→设置角色权限 +- 管理门店信息与账号→分配门店操作权限 diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..a16b543 --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..c8d4337 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..fa81a8b --- /dev/null +++ b/pom.xml @@ -0,0 +1,224 @@ + + + 4.0.0 + + com.paopao + paopao-api + 1.0.0 + + paopao-api + Paopao Java API project for Spring Boot + + + org.springframework.boot + spring-boot-starter-parent + 2.5.4 + + + + + 1.8 + UTF-8 + UTF-8 + + + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + + + org.projectlombok + lombok + true + + + + + mysql + mysql-connector-java + runtime + + + + + com.alibaba + druid-spring-boot-starter + 1.2.6 + + + + + com.baomidou + mybatis-plus-boot-starter + 3.4.3.3 + + + + + com.baomidou + mybatis-plus-generator + 3.4.1 + + + + + cn.hutool + hutool-core + 5.7.11 + + + cn.hutool + hutool-extra + 5.7.11 + + + cn.hutool + hutool-http + 5.7.11 + + + cn.hutool + hutool-crypto + 5.7.11 + + + + + cn.afterturn + easypoi-base + 4.4.0 + + + + + org.apache.tika + tika-core + 2.1.0 + + + + + com.github.livesense + jodconverter-core + 1.0.5 + + + + + org.springframework.boot + spring-boot-starter-mail + + + + + com.ibeetl + beetl + 3.6.1.RELEASE + + + + + io.springfox + springfox-boot-starter + 3.0.0 + + + + + org.springframework.boot + spring-boot-starter-security + + + + + io.jsonwebtoken + jjwt-impl + 0.11.2 + + + io.jsonwebtoken + jjwt-jackson + 0.11.2 + + + + + com.github.whvcse + easy-captcha + 1.6.2 + + + + + + + + src/main/java + + **/*Mapper.xml + + + + src/main/resources + + ** + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + + + aliYunMaven + https://maven.aliyun.com/repository/public + + + + diff --git a/src/main/java/com/gxwebsoft/MainApplication.java b/src/main/java/com/gxwebsoft/MainApplication.java new file mode 100644 index 0000000..60c0f93 --- /dev/null +++ b/src/main/java/com/gxwebsoft/MainApplication.java @@ -0,0 +1,26 @@ +package com.gxwebsoft; + +import com.eleadmin.common.core.config.ConfigProperties; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +/** + * 启动类 + * Created by EleAdmin on 2018-02-22 11:29:03 + */ +@EnableAsync +@EnableTransactionManagement +@MapperScan("com.gxwebsoft.**.mapper") +@EnableConfigurationProperties(ConfigProperties.class) +@SpringBootApplication +public class MainApplication { + + public static void main(String[] args) { + SpringApplication.run(MainApplication.class, args); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/Constants.java b/src/main/java/com/gxwebsoft/common/core/Constants.java new file mode 100644 index 0000000..a0eecd9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/Constants.java @@ -0,0 +1,93 @@ +package com.eleadmin.common.core; + +/** + * 系统常量 + * Created by EleAdmin on 2019-10-29 15:55 + */ +public class Constants { + /** + * 默认成功码 + */ + public static final int RESULT_OK_CODE = 0; + + /** + * 默认失败码 + */ + public static final int RESULT_ERROR_CODE = 1; + + /** + * 默认成功信息 + */ + public static final String RESULT_OK_MSG = "操作成功"; + + /** + * 默认失败信息 + */ + public static final String RESULT_ERROR_MSG = "操作失败"; + + /** + * 无权限错误码 + */ + public static final int UNAUTHORIZED_CODE = 403; + + /** + * 无权限提示信息 + */ + public static final String UNAUTHORIZED_MSG = "没有访问权限"; + + /** + * 未认证错误码 + */ + public static final int UNAUTHENTICATED_CODE = 401; + + /** + * 未认证提示信息 + */ + public static final String UNAUTHENTICATED_MSG = "请先登录"; + + /** + * 登录过期错误码 + */ + public static final int TOKEN_EXPIRED_CODE = 401; + + /** + * 登录过期提示信息 + */ + public static final String TOKEN_EXPIRED_MSG = "登录已过期"; + + /** + * 非法token错误码 + */ + public static final int BAD_CREDENTIALS_CODE = 401; + + /** + * 非法token提示信息 + */ + public static final String BAD_CREDENTIALS_MSG = "请退出重新登录"; + + /** + * 表示升序的值 + */ + public static final String ORDER_ASC_VALUE = "asc"; + + /** + * 表示降序的值 + */ + public static final String ORDER_DESC_VALUE = "desc"; + + /** + * token通过header传递的名称 + */ + public static final String TOKEN_HEADER_NAME = "Authorization"; + + /** + * token通过参数传递的名称 + */ + public static final String TOKEN_PARAM_NAME = "access_token"; + + /** + * token认证类型 + */ + public static final String TOKEN_TYPE = "Bearer"; + +} diff --git a/src/main/java/com/gxwebsoft/common/core/annotation/OperationLog.java b/src/main/java/com/gxwebsoft/common/core/annotation/OperationLog.java new file mode 100644 index 0000000..05bb33a --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/annotation/OperationLog.java @@ -0,0 +1,41 @@ +package com.eleadmin.common.core.annotation; + +import java.lang.annotation.*; + +/** + * 操作日志记录注解 + * + * @author EleAdmin + * @since 2020-03-21 17:03:08 + */ +@Documented +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface OperationLog { + + /** + * 操作功能 + */ + String value() default ""; + + /** + * 操作模块 + */ + String module() default ""; + + /** + * 备注 + */ + String comments() default ""; + + /** + * 是否记录请求参数 + */ + boolean param() default true; + + /** + * 是否记录返回结果 + */ + boolean result() default true; + +} diff --git a/src/main/java/com/gxwebsoft/common/core/annotation/OperationModule.java b/src/main/java/com/gxwebsoft/common/core/annotation/OperationModule.java new file mode 100644 index 0000000..56aa532 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/annotation/OperationModule.java @@ -0,0 +1,21 @@ +package com.eleadmin.common.core.annotation; + +import java.lang.annotation.*; + +/** + * 操作日志模块注解 + * + * @author EleAdmin + * @since 2021-09-01 20:48:16 + */ +@Documented +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface OperationModule { + + /** + * 模块名称 + */ + String value(); + +} diff --git a/src/main/java/com/gxwebsoft/common/core/annotation/QueryField.java b/src/main/java/com/gxwebsoft/common/core/annotation/QueryField.java new file mode 100644 index 0000000..fe9470b --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/annotation/QueryField.java @@ -0,0 +1,22 @@ +package com.eleadmin.common.core.annotation; + +import java.lang.annotation.*; + +/** + * 查询条件注解 + * + * @author EleAdmin + * @since 2021-09-01 20:48:16 + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE}) +public @interface QueryField { + + // 字段名称 + String value() default ""; + + // 查询方式 + QueryType type() default QueryType.LIKE; + +} diff --git a/src/main/java/com/gxwebsoft/common/core/annotation/QueryType.java b/src/main/java/com/gxwebsoft/common/core/annotation/QueryType.java new file mode 100644 index 0000000..a6de06e --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/annotation/QueryType.java @@ -0,0 +1,42 @@ +package com.eleadmin.common.core.annotation; + +/** + * 查询方式 + * + * @author EleAdmin + * @since 2021-09-01 20:48:16 + */ +public enum QueryType { + // 等于 + EQ, + // 不等于 + NE, + // 大于 + GT, + // 大于等于 + GE, + // 小于 + LT, + // 小于等于 + LE, + // 包含 + LIKE, + // 不包含 + NOT_LIKE, + // 结尾等于 + LIKE_LEFT, + // 开头等于 + LIKE_RIGHT, + // 为NULL + IS_NULL, + // 不为空 + IS_NOT_NULL, + // IN + IN, + // NOT IN + NOT_IN, + // IN条件解析逗号分割 + IN_STR, + // NOT IN条件解析逗号分割 + NOT_IN_STR +} diff --git a/src/main/java/com/gxwebsoft/common/core/aspect/OperationLogAspect.java b/src/main/java/com/gxwebsoft/common/core/aspect/OperationLogAspect.java new file mode 100644 index 0000000..431eed4 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/aspect/OperationLogAspect.java @@ -0,0 +1,210 @@ +package com.eleadmin.common.core.aspect; + +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.servlet.ServletUtil; +import cn.hutool.http.useragent.UserAgent; +import cn.hutool.http.useragent.UserAgentUtil; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.annotation.OperationModule; +import com.eleadmin.common.core.utils.JSONUtil; +import com.eleadmin.common.system.entity.OperationRecord; +import com.eleadmin.common.system.entity.User; +import com.eleadmin.common.system.service.OperationRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.*; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.Method; +import java.util.Map; + +/** + * 操作日志记录 + * + * @author EleAdmin + * @since 2020-03-21 16:58:16:05 + */ +@Aspect +@Component +public class OperationLogAspect { + @Resource + private OperationRecordService operationRecordService; + // 参数、返回结果、错误信息等最大保存长度 + private static final int MAX_LENGTH = 1000; + // 用于记录请求耗时 + private final ThreadLocal startTime = new ThreadLocal<>(); + + @Pointcut("@annotation(com.eleadmin.common.core.annotation.OperationLog)") + public void operationLog() { + } + + @Before("operationLog()") + public void doBefore(JoinPoint joinPoint) throws Throwable { + startTime.set(System.currentTimeMillis()); + } + + @AfterReturning(pointcut = "operationLog()", returning = "result") + public void doAfterReturning(JoinPoint joinPoint, Object result) { + saveLog(joinPoint, result, null); + } + + @AfterThrowing(value = "operationLog()", throwing = "e") + public void doAfterThrowing(JoinPoint joinPoint, Exception e) { + saveLog(joinPoint, null, e); + } + + /** + * 保存操作记录 + */ + private void saveLog(JoinPoint joinPoint, Object result, Exception e) { + OperationRecord record = new OperationRecord(); + // 记录操作耗时 + if (startTime.get() != null) { + record.setSpendTime(System.currentTimeMillis() - startTime.get()); + } + // 记录当前登录用户id、租户id + User user = getLoginUser(); + if (user != null) { + record.setUserId(user.getUserId()); + record.setTenantId(user.getTenantId()); + } + // 记录请求地址、请求方式、ip + ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + HttpServletRequest request = (attributes == null ? null : attributes.getRequest()); + if (request != null) { + record.setUrl(request.getRequestURI()); + record.setRequestMethod(request.getMethod()); + UserAgent ua = UserAgentUtil.parse(ServletUtil.getHeaderIgnoreCase(request, "User-Agent")); + record.setOs(ua.getPlatform().toString()); + record.setDevice(ua.getOs().toString()); + record.setBrowser(ua.getBrowser().toString()); + record.setIp(ServletUtil.getClientIP(request)); + } + // 记录异常信息 + if (e != null) { + record.setStatus(1); + record.setError(StrUtil.sub(e.toString(), 0, MAX_LENGTH)); + } + // 记录模块名、操作功能、请求方法、请求参数、返回结果 + MethodSignature signature = (MethodSignature) joinPoint.getSignature(); + record.setMethod(joinPoint.getTarget().getClass().getName() + "." + signature.getName()); + Method method = signature.getMethod(); + if (method != null) { + OperationLog ol = method.getAnnotation(OperationLog.class); + if (ol != null) { + // 记录操作功能 + record.setDescription(getDescription(method, ol)); + // 记录操作模块 + record.setModule(getModule(joinPoint, ol)); + // 记录备注 + if (StrUtil.isNotEmpty(ol.comments())) { + record.setComments(ol.comments()); + } + // 记录请求参数 + if (ol.param() && request != null) { + record.setParams(StrUtil.sub(getParams(joinPoint, request), 0, MAX_LENGTH)); + } + // 记录请求结果 + if (ol.result() && result != null) { + record.setResult(StrUtil.sub(JSONUtil.toJSONString(result), 0, MAX_LENGTH)); + } + } + } + operationRecordService.saveAsync(record); + } + + /** + * 获取当前登录用户 + */ + private User getLoginUser() { + Authentication subject = SecurityContextHolder.getContext().getAuthentication(); + if (subject != null) { + Object object = subject.getPrincipal(); + if (object instanceof User) { + return (User) object; + } + } + return null; + } + + /** + * 获取请求参数 + * + * @param joinPoint JoinPoint + * @param request HttpServletRequest + * @return String + */ + private String getParams(JoinPoint joinPoint, HttpServletRequest request) { + String params; + Map paramsMap = ServletUtil.getParamMap(request); + if (paramsMap.keySet().size() > 0) { + params = JSONUtil.toJSONString(paramsMap); + } else { + StringBuilder sb = new StringBuilder(); + for (Object arg : joinPoint.getArgs()) { + if (ObjectUtil.isNull(arg) + || arg instanceof MultipartFile + || arg instanceof HttpServletRequest + || arg instanceof HttpServletResponse) { + continue; + } + sb.append(JSONUtil.toJSONString(arg)).append(" "); + } + params = sb.toString(); + } + return params; + } + + /** + * 获取操作模块 + * + * @param joinPoint JoinPoint + * @param ol OperationLog + * @return String + */ + private String getModule(JoinPoint joinPoint, OperationLog ol) { + if (StrUtil.isNotEmpty(ol.module())) { + return ol.module(); + } + OperationModule om = joinPoint.getTarget().getClass().getAnnotation(OperationModule.class); + if (om != null && StrUtil.isNotEmpty(om.value())) { + return om.value(); + } + Api api = joinPoint.getTarget().getClass().getAnnotation(Api.class); + if (api != null && api.tags() != null) { + return ArrayUtil.join(api.tags(), ","); + } + return null; + } + + /** + * 获取操作功能 + * + * @param method Method + * @param ol OperationLog + * @return String + */ + private String getDescription(Method method, OperationLog ol) { + if (StrUtil.isNotEmpty(ol.value())) { + return ol.value(); + } + ApiOperation ao = method.getAnnotation(ApiOperation.class); + if (ao != null && StrUtil.isNotEmpty(ao.value())) { + return ao.value(); + } + return null; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/config/ConfigProperties.java b/src/main/java/com/gxwebsoft/common/core/config/ConfigProperties.java new file mode 100644 index 0000000..3425da9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/config/ConfigProperties.java @@ -0,0 +1,75 @@ +package com.eleadmin.common.core.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * 系统配置属性 + * + * @author EleAdmin + * @since 2021-08-30 17:58:16 + */ +@Data +@ConfigurationProperties(prefix = "config") +public class ConfigProperties { + /** + * 文件上传磁盘位置 + */ + private Integer uploadLocation = 0; + + /** + * 文件上传是否使用uuid命名 + */ + private Boolean uploadUuidName = true; + + /** + * 文件上传生成缩略图的大小(kb) + */ + private Integer thumbnailSize = 60; + + /** + * OpenOffice的安装目录 + */ + private String openOfficeHome; + + /** + * swagger扫描包 + */ + private String swaggerBasePackage; + + /** + * swagger文档标题 + */ + private String swaggerTitle; + + /** + * swagger文档描述 + */ + private String swaggerDescription; + + /** + * swagger文档版本号 + */ + private String swaggerVersion; + + /** + * swagger地址 + */ + private String swaggerHost; + + /** + * token过期时间, 单位秒 + */ + private Long tokenExpireTime = 60 * 60 * 24L; + + /** + * token快要过期自动刷新时间, 单位分钟 + */ + private int tokenRefreshTime = 30; + + /** + * 生成token的密钥Key的base64字符 + */ + private String tokenKey; + +} diff --git a/src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java b/src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java new file mode 100644 index 0000000..cd1db72 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java @@ -0,0 +1,77 @@ +package com.eleadmin.common.core.config; + +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; +import com.eleadmin.common.system.entity.User; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.LongValue; +import net.sf.jsqlparser.expression.NullValue; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; + +import java.util.Arrays; + +/** + * MybatisPlus配置 + * + * @author EleAdmin + * @since 2018-02-22 11:29:28 + */ +@Configuration +public class MybatisPlusConfig { + + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + + // 多租户插件配置 + TenantLineHandler tenantLineHandler = new TenantLineHandler() { + @Override + public Expression getTenantId() { + return getLoginUserTenantId(); + } + + @Override + public boolean ignoreTable(String tableName) { + return Arrays.asList( + "sys_tenant", + "sys_dictionary", + "sys_dictionary_data" + ).contains(tableName); + } + }; + TenantLineInnerInterceptor tenantLineInnerInterceptor = new TenantLineInnerInterceptor(tenantLineHandler); + interceptor.addInnerInterceptor(tenantLineInnerInterceptor); + + // 分页插件配置 + PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(); + interceptor.addInnerInterceptor(paginationInnerInterceptor); + + return interceptor; + } + + /** + * 获取当前登录用户的租户id + * + * @return Integer + */ + public Expression getLoginUserTenantId() { + try { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + if (authentication != null) { + Object object = authentication.getPrincipal(); + if (object instanceof User) { + return new LongValue(((User) object).getTenantId()); + } + } + } catch (Exception e) { + System.out.println(e.getMessage()); + } + return new NullValue(); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/config/SwaggerConfig.java b/src/main/java/com/gxwebsoft/common/core/config/SwaggerConfig.java new file mode 100644 index 0000000..d090493 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/config/SwaggerConfig.java @@ -0,0 +1,72 @@ +package com.eleadmin.common.core.config; + +import cn.hutool.core.util.StrUtil; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.oas.annotations.EnableOpenApi; +import springfox.documentation.service.*; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +/** + * Swagger配置 + * + * @author EleAdmin + * @since 2018-02-22 11:29:05 + */ +@EnableOpenApi +@Configuration +public class SwaggerConfig { + @Resource + private ConfigProperties config; + + @Bean + public Docket createRestApi() { + Docket docket = new Docket(DocumentationType.OAS_30); + if (StrUtil.isNotBlank(config.getSwaggerHost())) { + docket.host(config.getSwaggerHost()); + } + return docket + .apiInfo(apiInfo()) + .select() + .apis(RequestHandlerSelectors.basePackage(config.getSwaggerBasePackage())) + .paths(PathSelectors.any()) + .build() + .securitySchemes(securitySchemes()) + .securityContexts(securityContexts()); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title(config.getSwaggerTitle()) + .description(config.getSwaggerDescription()) + .version(config.getSwaggerVersion()) + .termsOfServiceUrl("") + .build(); + } + + private List securitySchemes() { + return Collections.singletonList( + new ApiKey("Authorization", "Authorization", "header") + ); + } + + private List securityContexts() { + AuthorizationScope[] scopes = {new AuthorizationScope("global", "accessEverything")}; + List references = Collections.singletonList( + new SecurityReference("Authorization", scopes) + ); + return Collections.singletonList(SecurityContext.builder() + .securityReferences(references) + .build()); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/config/WebMvcConfig.java b/src/main/java/com/gxwebsoft/common/core/config/WebMvcConfig.java new file mode 100644 index 0000000..cdee50e --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/config/WebMvcConfig.java @@ -0,0 +1,31 @@ +package com.eleadmin.common.core.config; + +import com.eleadmin.common.core.Constants; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * WebMvc配置, 拦截器、资源映射等都在此配置 + * + * @author EleAdmin + * @since 2019-06-12 10:11:16 + */ +@Configuration +public class WebMvcConfig implements WebMvcConfigurer { + + /** + * 支持跨域访问 + */ + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOriginPatterns("*") + .allowedHeaders("*") + .exposedHeaders(Constants.TOKEN_HEADER_NAME) + .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH") + .allowCredentials(true) + .maxAge(3600); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/exception/BusinessException.java b/src/main/java/com/gxwebsoft/common/core/exception/BusinessException.java new file mode 100644 index 0000000..5a27d96 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/exception/BusinessException.java @@ -0,0 +1,48 @@ +package com.eleadmin.common.core.exception; + +import com.eleadmin.common.core.Constants; + +/** + * 自定义业务异常 + * + * @author EleAdmin + * @since 2018-02-22 11:29:28 + */ +public class BusinessException extends RuntimeException { + private static final long serialVersionUID = 1L; + + private Integer code; + + public BusinessException() { + this(Constants.RESULT_ERROR_MSG); + } + + public BusinessException(String message) { + this(Constants.RESULT_ERROR_CODE, message); + } + + public BusinessException(Integer code, String message) { + super(message); + this.code = code; + } + + public BusinessException(Integer code, String message, Throwable cause) { + super(message, cause); + this.code = code; + } + + public BusinessException(Integer code, String message, Throwable cause, + boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + this.code = code; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/exception/GlobalExceptionHandler.java b/src/main/java/com/gxwebsoft/common/core/exception/GlobalExceptionHandler.java new file mode 100644 index 0000000..faa10fd --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/exception/GlobalExceptionHandler.java @@ -0,0 +1,56 @@ +package com.eleadmin.common.core.exception; + +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.core.web.ApiResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.web.HttpRequestMethodNotSupportedException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.HttpServletResponse; + +/** + * 全局异常处理器 + * + * @author EleAdmin + * @since 2018-02-22 11:29:30 + */ +@ControllerAdvice +public class GlobalExceptionHandler { + private final Logger logger = LoggerFactory.getLogger(getClass()); + + @ResponseBody + @ExceptionHandler(HttpRequestMethodNotSupportedException.class) + public ApiResult methodNotSupportedExceptionHandler(HttpRequestMethodNotSupportedException e, + HttpServletResponse response) { + CommonUtil.addCrossHeaders(response); + return new ApiResult<>(Constants.RESULT_ERROR_CODE, "请求方式不正确").setError(e.toString()); + } + + @ResponseBody + @ExceptionHandler(AccessDeniedException.class) + public ApiResult accessDeniedExceptionHandler(AccessDeniedException e, HttpServletResponse response) { + CommonUtil.addCrossHeaders(response); + return new ApiResult<>(Constants.UNAUTHORIZED_CODE, Constants.UNAUTHORIZED_MSG).setError(e.toString()); + } + + @ResponseBody + @ExceptionHandler(BusinessException.class) + public ApiResult businessExceptionHandler(BusinessException e, HttpServletResponse response) { + CommonUtil.addCrossHeaders(response); + return new ApiResult<>(e.getCode(), e.getMessage()); + } + + @ResponseBody + @ExceptionHandler(Throwable.class) + public ApiResult exceptionHandler(Throwable e, HttpServletResponse response) { + logger.error(e.getMessage(), e); + CommonUtil.addCrossHeaders(response); + return new ApiResult<>(Constants.RESULT_ERROR_CODE, Constants.RESULT_ERROR_MSG).setError(e.toString()); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/security/JwtAccessDeniedHandler.java b/src/main/java/com/gxwebsoft/common/core/security/JwtAccessDeniedHandler.java new file mode 100644 index 0000000..2c1d4d9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/security/JwtAccessDeniedHandler.java @@ -0,0 +1,29 @@ +package com.eleadmin.common.core.security; + +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.core.utils.CommonUtil; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.web.access.AccessDeniedHandler; +import org.springframework.stereotype.Component; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * 没有访问权限异常处理 + * + * @author EleAdmin + * @since 2020-03-25 00:35:03 + */ +@Component +public class JwtAccessDeniedHandler implements AccessDeniedHandler { + + @Override + public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException e) + throws IOException, ServletException { + CommonUtil.responseError(response, Constants.UNAUTHORIZED_CODE, Constants.UNAUTHORIZED_MSG, e.getMessage()); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationEntryPoint.java b/src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationEntryPoint.java new file mode 100644 index 0000000..4cc1657 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationEntryPoint.java @@ -0,0 +1,30 @@ +package com.eleadmin.common.core.security; + +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.core.utils.CommonUtil; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * 没有登录异常处理 + * + * @author EleAdmin + * @since 2020-03-25 00:35:03 + */ +@Component +public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { + + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) + throws IOException, ServletException { + CommonUtil.responseError(response, Constants.UNAUTHENTICATED_CODE, Constants.UNAUTHENTICATED_MSG, + e.getMessage()); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationFilter.java b/src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationFilter.java new file mode 100644 index 0000000..5242a44 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/security/JwtAuthenticationFilter.java @@ -0,0 +1,85 @@ +package com.eleadmin.common.core.security; + +import cn.hutool.core.util.StrUtil; +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.core.config.ConfigProperties; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.system.entity.LoginRecord; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.entity.User; +import com.eleadmin.common.system.service.LoginRecordService; +import com.eleadmin.common.system.service.UserService; +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.ExpiredJwtException; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Component; +import org.springframework.web.filter.OncePerRequestFilter; + +import javax.annotation.Resource; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 处理携带token的请求过滤器 + * + * @author EleAdmin + * @since 2020-03-30 20:48:05 + */ +@Component +public class JwtAuthenticationFilter extends OncePerRequestFilter { + @Resource + private ConfigProperties configProperties; + @Resource + private UserService userService; + @Resource + private LoginRecordService loginRecordService; + + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) + throws ServletException, IOException { + String access_token = JwtUtil.getAccessToken(request); + if (StrUtil.isNotBlank(access_token)) { + try { + // 解析token + Claims claims = JwtUtil.parseToken(access_token, configProperties.getTokenKey()); + JwtSubject jwtSubject = JwtUtil.getJwtSubject(claims); + User user = userService.getByUsername(jwtSubject.getUsername(), jwtSubject.getTenantId()); + if (user == null) { + throw new UsernameNotFoundException("Username not found"); + } + List authorities = user.getAuthorities().stream() + .filter(m -> StrUtil.isNotBlank(m.getAuthority())).collect(Collectors.toList()); + UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken( + user, null, authorities); + SecurityContextHolder.getContext().setAuthentication(authentication); + // token将要过期签发新token, 防止突然退出登录 + long expiration = (claims.getExpiration().getTime() - new Date().getTime()) / 1000 / 60; + if (expiration < configProperties.getTokenRefreshTime()) { + String token = JwtUtil.buildToken(jwtSubject, configProperties.getTokenExpireTime(), + configProperties.getTokenKey()); + response.addHeader(Constants.TOKEN_HEADER_NAME, token); + loginRecordService.saveAsync(user.getUsername(), LoginRecord.TYPE_REFRESH, null, + user.getTenantId(), request); + } + } catch (ExpiredJwtException e) { + CommonUtil.responseError(response, Constants.TOKEN_EXPIRED_CODE, Constants.TOKEN_EXPIRED_MSG, + e.getMessage()); + return; + } catch (Exception e) { + CommonUtil.responseError(response, Constants.BAD_CREDENTIALS_CODE, Constants.BAD_CREDENTIALS_MSG, + e.toString()); + return; + } + } + chain.doFilter(request, response); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/security/JwtSubject.java b/src/main/java/com/gxwebsoft/common/core/security/JwtSubject.java new file mode 100644 index 0000000..af4725d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/security/JwtSubject.java @@ -0,0 +1,31 @@ +package com.eleadmin.common.core.security; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * Jwt载体 + * + * @author EleAdmin + * @since 2021-09-03 00:11:12 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class JwtSubject implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 账号 + */ + private String username; + + /** + * 租户id + */ + private Integer tenantId; + +} diff --git a/src/main/java/com/gxwebsoft/common/core/security/JwtUtil.java b/src/main/java/com/gxwebsoft/common/core/security/JwtUtil.java new file mode 100644 index 0000000..858c7e5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/security/JwtUtil.java @@ -0,0 +1,141 @@ +package com.eleadmin.common.core.security; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.servlet.ServletUtil; +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.core.utils.JSONUtil; +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; +import io.jsonwebtoken.io.Decoders; +import io.jsonwebtoken.io.Encoders; +import io.jsonwebtoken.security.Keys; + +import javax.servlet.http.HttpServletRequest; +import java.security.Key; +import java.util.Date; + +/** + * JWT工具类 + * + * @author EleAdmin + * @since 2018-01-21 16:30:59 + */ +public class JwtUtil { + + /** + * 获取请求中的access_token + * + * @param request HttpServletRequest + * @return String + */ + public static String getAccessToken(HttpServletRequest request) { + String access_token = ServletUtil.getHeaderIgnoreCase(request, Constants.TOKEN_HEADER_NAME); + if (StrUtil.isNotBlank(access_token)) { + if (access_token.startsWith(Constants.TOKEN_TYPE)) { + access_token = StrUtil.removePrefix(access_token, Constants.TOKEN_TYPE).trim(); + } + } else { + access_token = request.getParameter(Constants.TOKEN_PARAM_NAME); + } + return access_token; + } + + /** + * 生成token + * + * @param subject 载体 + * @param expire 过期时间 + * @param base64EncodedKey base64编码的Key + * @return token + */ + public static String buildToken(JwtSubject subject, Long expire, String base64EncodedKey) { + return buildToken(JSONUtil.toJSONString(subject), expire, decodeKey(base64EncodedKey)); + } + + /** + * 生成token + * + * @param subject 载体 + * @param expire 过期时间 + * @param key 密钥 + * @return token + */ + public static String buildToken(String subject, Long expire, Key key) { + Date expireDate = new Date(new Date().getTime() + 1000 * expire); + return Jwts.builder() + .setSubject(subject) + .setExpiration(expireDate) + .setIssuedAt(new Date()) + .signWith(key) + .compact(); + } + + /** + * 解析token + * + * @param token token + * @param base64EncodedKey base64编码的Key + * @return Claims + */ + public static Claims parseToken(String token, String base64EncodedKey) { + return parseToken(token, decodeKey(base64EncodedKey)); + } + + /** + * 解析token + * + * @param token token + * @param key 密钥 + * @return Claims + */ + public static Claims parseToken(String token, Key key) { + return Jwts.parserBuilder() + .setSigningKey(key) + .build() + .parseClaimsJws(token) + .getBody(); + } + + /** + * 获取JwtSubject + * + * @param claims Claims + * @return JwtSubject + */ + public static JwtSubject getJwtSubject(Claims claims) { + return JSONUtil.parseObject(claims.getSubject(), JwtSubject.class); + } + + /** + * 生成Key + * + * @return Key + */ + public static Key randomKey() { + return Keys.secretKeyFor(SignatureAlgorithm.HS256); + } + + /** + * base64编码key + * + * @return String + */ + public static String encodeKey(Key key) { + return Encoders.BASE64.encode(key.getEncoded()); + } + + /** + * base64编码Key + * + * @param base64EncodedKey base64编码的key + * @return Key + */ + public static Key decodeKey(String base64EncodedKey) { + if (StrUtil.isBlank(base64EncodedKey)) { + return null; + } + return Keys.hmacShaKeyFor(Decoders.BASE64.decode(base64EncodedKey)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java b/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java new file mode 100644 index 0000000..6c1241f --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java @@ -0,0 +1,79 @@ +package com.eleadmin.common.core.security; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpMethod; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; + +import javax.annotation.Resource; + +/** + * Spring Security配置 + * + * @author EleAdmin + * @since 2020-03-23 18:04:52 + */ +@Configuration +@EnableWebSecurity +@EnableGlobalMethodSecurity(prePostEnabled = true) +public class SecurityConfig extends WebSecurityConfigurerAdapter { + @Resource + private JwtAccessDeniedHandler jwtAccessDeniedHandler; + @Resource + private JwtAuthenticationEntryPoint jwtAuthenticationEntryPoint; + @Resource + private JwtAuthenticationFilter jwtAuthenticationFilter; + + @Override + protected void configure(HttpSecurity http) throws Exception { + http.authorizeRequests() + .antMatchers(HttpMethod.OPTIONS, "/**") + .permitAll() + .antMatchers(HttpMethod.GET, "/api/file/**", "/api/captcha", "/") + .permitAll() + .antMatchers( + "/api/login", + "/druid/**", + "/swagger-ui.html", + "/swagger-resources/**", + "/webjars/**", + "/v2/api-docs", + "/v3/api-docs", + "/swagger-ui/**" + ) + .permitAll() + .anyRequest() + .authenticated() + .and() + .sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.STATELESS) + .and() + .csrf() + .disable() + .cors() + .and() + .logout() + .disable() + .headers() + .frameOptions() + .disable() + .and() + .exceptionHandling() + .accessDeniedHandler(jwtAccessDeniedHandler) + .authenticationEntryPoint(jwtAuthenticationEntryPoint) + .and() + .addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); + } + + @Bean + public BCryptPasswordEncoder bCryptPasswordEncoder() { + return new BCryptPasswordEncoder(); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/utils/CommonUtil.java b/src/main/java/com/gxwebsoft/common/core/utils/CommonUtil.java new file mode 100644 index 0000000..6b89b7a --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/utils/CommonUtil.java @@ -0,0 +1,174 @@ +package com.eleadmin.common.core.utils; + +import cn.hutool.core.util.ObjectUtil; +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.core.web.ApiResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Function; + +/** + * 常用工具方法 + * + * @author EleAdmin + * @since 2017-06-10 10:10:22 + */ +public class CommonUtil { + // 生成uuid的字符 + private static final String[] chars = new String[]{ + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", + "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", + "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", + "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" + }; + + /** + * 生成8位uuid + * + * @return String + */ + public static String randomUUID8() { + StringBuilder sb = new StringBuilder(); + String uuid = UUID.randomUUID().toString().replace("-", ""); + for (int i = 0; i < 8; i++) { + String str = uuid.substring(i * 4, i * 4 + 4); + int x = Integer.parseInt(str, 16); + sb.append(chars[x % 0x3E]); + } + return sb.toString(); + } + + /** + * 生成16位uuid + * + * @return String + */ + public static String randomUUID16() { + StringBuilder sb = new StringBuilder(); + String uuid = UUID.randomUUID().toString().replace("-", ""); + for (int i = 0; i < 16; i++) { + String str = uuid.substring(i * 2, i * 2 + 2); + int x = Integer.parseInt(str, 16); + sb.append(chars[x % 0x3E]); + } + return sb.toString(); + } + + /** + * 检查List是否有重复元素 + * + * @param list List + * @param mapper 获取需要检查的字段的Function + * @param 数据的类型 + * @param 需要检查的字段的类型 + * @return boolean + */ + public static boolean checkRepeat(List list, Function mapper) { + for (int i = 0; i < list.size(); i++) { + for (int j = 0; j < list.size(); j++) { + if (i != j && mapper.apply(list.get(i)).equals(mapper.apply(list.get(j)))) { + return true; + } + } + } + return false; + } + + /** + * List转为树形结构 + * + * @param data List + * @param parentId 顶级的parentId + * @param parentIdMapper 获取parentId的Function + * @param idMapper 获取id的Function + * @param consumer 赋值children的Consumer + * @param 数据的类型 + * @param parentId的类型 + * @return List + */ + public static List toTreeData(List data, R parentId, + Function parentIdMapper, + Function idMapper, + BiConsumer> consumer) { + List result = new ArrayList<>(); + for (T d : data) { + R dParentId = parentIdMapper.apply(d); + if (ObjectUtil.equals(parentId, dParentId)) { + R dId = idMapper.apply(d); + List children = toTreeData(data, dId, parentIdMapper, idMapper, consumer); + consumer.accept(d, children); + result.add(d); + } + } + return result; + } + + /** + * 遍历树形结构数据 + * + * @param data List + * @param consumer 回调 + * @param mapper 获取children的Function + * @param 数据的类型 + */ + public static void eachTreeData(List data, Consumer consumer, Function> mapper) { + for (T d : data) { + consumer.accept(d); + List children = mapper.apply(d); + if (children != null && children.size() > 0) { + eachTreeData(children, consumer, mapper); + } + } + } + + /** + * 获取集合中的第一条数据 + * + * @param records 集合 + * @return 第一条数据 + */ + public static T listGetOne(List records) { + return records == null || records.size() == 0 ? null : records.get(0); + } + + /** + * 支持跨域 + * + * @param response HttpServletResponse + */ + public static void addCrossHeaders(HttpServletResponse response) { + response.setHeader("Access-Control-Max-Age", "3600"); + response.setHeader("Access-Control-Allow-Origin", "*"); + response.setHeader("Access-Control-Allow-Methods", "*"); + response.setHeader("Access-Control-Allow-Headers", "*"); + response.setHeader("Access-Control-Expose-Headers", Constants.TOKEN_HEADER_NAME); + } + + /** + * 输出错误信息 + * + * @param response HttpServletResponse + * @param code 错误码 + * @param message 提示信息 + * @param error 错误信息 + */ + public static void responseError(HttpServletResponse response, Integer code, String message, String error) { + response.setContentType("application/json;charset=UTF-8"); + try { + PrintWriter out = response.getWriter(); + out.write(JSONUtil.toJSONString(new ApiResult<>(code, message, null, error))); + out.flush(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/utils/FileServerUtil.java b/src/main/java/com/gxwebsoft/common/core/utils/FileServerUtil.java new file mode 100644 index 0000000..932ea37 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/utils/FileServerUtil.java @@ -0,0 +1,394 @@ +package com.eleadmin.common.core.utils; + +import cn.hutool.core.img.ImgUtil; +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.IORuntimeException; +import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.StrUtil; +import org.apache.tika.Tika; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.MalformedURLException; +import java.net.URLEncoder; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * 文件上传下载工具类 + * + * @author EleAdmin + * @since 2018-12-14 08:38:53 + */ +public class FileServerUtil { + // 除 text/* 外也需要设置输出编码的 content-type + private final static List SET_CHARSET_CONTENT_TYPES = Arrays.asList( + "application/json", + "application/javascript" + ); + + /** + * 上传文件 + * + * @param file MultipartFile + * @param directory 文件保存的目录 + * @param uuidName 是否用uuid命名 + * @return File + */ + public static File upload(MultipartFile file, String directory, boolean uuidName) + throws IOException, IllegalStateException { + File outFile = getUploadFile(file.getOriginalFilename(), directory, uuidName); + if (!outFile.getParentFile().exists()) { + if (!outFile.getParentFile().mkdirs()) { + throw new RuntimeException("make directory fail"); + } + } + file.transferTo(outFile); + return outFile; + } + + /** + * 上传base64格式文件 + * + * @param base64 base64编码字符 + * @param fileName 文件名称, 为空使用uuid命名 + * @param directory 文件保存的目录 + * @return File + */ + public static File upload(String base64, String fileName, String directory) + throws FileNotFoundException, IORuntimeException { + if (StrUtil.isBlank(base64) || !base64.startsWith("data:image/") || !base64.contains(";base64,")) { + throw new RuntimeException("base64 data error"); + } + String suffix = "." + base64.substring(11, base64.indexOf(";")); // 获取文件后缀 + boolean uuidName = StrUtil.isBlank(fileName); + File outFile = getUploadFile(uuidName ? suffix : fileName, directory, uuidName); + byte[] bytes = Base64.getDecoder().decode(base64.substring(base64.indexOf(";") + 8).getBytes()); + IoUtil.write(new FileOutputStream(outFile), true, bytes); + return outFile; + } + + /** + * 获取上传文件位置 + * + * @param name 文件名称 + * @param directory 上传目录 + * @param uuidName 是否使用uuid命名 + * @return File + */ + public static File getUploadFile(String name, String directory, boolean uuidName) { + // 当前日期作为上传子目录 + String dir = new SimpleDateFormat("yyyyMMdd/").format(new Date()); + // 获取文件后缀 + String suffix = (name == null || !name.contains(".")) ? "" : name.substring(name.lastIndexOf(".")); + // 使用uuid命名 + if (uuidName || name == null) { + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + return new File(directory, dir + uuid + suffix); + } + // 使用原名称, 存在相同则加(1) + File file = new File(directory, dir + name); + String prefix = StrUtil.removeSuffix(name, suffix); + int sameSize = 2; + while (file.exists()) { + file = new File(directory, dir + prefix + "(" + sameSize + ")" + suffix); + sameSize++; + } + return file; + } + + /** + * 查看文件, 支持断点续传 + * + * @param file 文件 + * @param pdfDir office转pdf输出目录 + * @param officeHome openOffice安装目录 + * @param response HttpServletResponse + * @param request HttpServletRequest + */ + public static void preview(File file, String pdfDir, String officeHome, + HttpServletResponse response, HttpServletRequest request) { + preview(file, false, null, pdfDir, officeHome, response, request); + } + + /** + * 查看文件, 支持断点续传 + * + * @param file 文件 + * @param forceDownload 是否强制下载 + * @param fileName 强制下载的文件名称 + * @param pdfDir office转pdf输出目录 + * @param officeHome openOffice安装目录 + * @param response HttpServletResponse + * @param request HttpServletRequest + */ + public static void preview(File file, boolean forceDownload, String fileName, String pdfDir, String officeHome, + HttpServletResponse response, HttpServletRequest request) { + CommonUtil.addCrossHeaders(response); + if (file == null || !file.exists()) { + outNotFund(response); + return; + } + if (forceDownload) { + setDownloadHeader(response, StrUtil.isBlank(fileName) ? file.getName() : fileName); + } else { + // office转pdf预览 + if (OpenOfficeUtil.canConverter(file.getName())) { + File pdfFile = OpenOfficeUtil.converterToPDF(file.getAbsolutePath(), pdfDir, officeHome); + if (pdfFile != null) { + file = pdfFile; + } + } + // 获取文件类型 + String contentType = getContentType(file); + if (contentType != null) { + response.setContentType(contentType); + // 设置编码 + if (contentType.startsWith("text/") || SET_CHARSET_CONTENT_TYPES.contains(contentType)) { + try { + String charset = JChardetFacadeUtil.detectCodepage(file.toURI().toURL()); + if (charset != null) { + response.setCharacterEncoding(charset); + } + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + } else { + setDownloadHeader(response, file.getName()); + } + } + response.setHeader("Cache-Control", "public"); + output(file, response, request); + } + + /** + * 查看缩略图 + * + * @param file 原文件 + * @param thumbnail 缩略图文件 + * @param size 缩略图文件的最大值(kb) + * @param response HttpServletResponse + * @param request HttpServletRequest + */ + public static void previewThumbnail(File file, File thumbnail, Integer size, + HttpServletResponse response, HttpServletRequest request) { + // 如果是图片并且缩略图不存在则生成 + if (!thumbnail.exists() && isImage(file)) { + long fileSize = file.length(); + if ((fileSize / 1024) > size) { + try { + if (thumbnail.getParentFile().mkdirs()) { + ImgUtil.scale(file, thumbnail, size / (fileSize / 1024f)); + if (thumbnail.exists() && thumbnail.length() > file.length()) { + FileUtil.copy(file, thumbnail, true); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } else { + preview(file, null, null, response, request); + return; + } + } + preview(thumbnail.exists() ? thumbnail : file, null, null, response, request); + } + + /** + * 输出文件流, 支持断点续传 + * + * @param file 文件 + * @param response HttpServletResponse + * @param request HttpServletRequest + */ + public static void output(File file, HttpServletResponse response, HttpServletRequest request) { + long length = file.length(); // 文件总大小 + long start = 0, to = length - 1; // 开始读取位置, 结束读取位置 + long lastModified = file.lastModified(); // 文件修改时间 + response.setHeader("Accept-Ranges", "bytes"); + response.setHeader("ETag", "\"" + length + "-" + lastModified + "\""); + response.setHeader("Last-Modified", new Date(lastModified).toString()); + String range = request.getHeader("Range"); + if (range != null) { + response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT); + String[] ranges = range.replace("bytes=", "").split("-"); + start = Long.parseLong(ranges[0].trim()); + if (ranges.length > 1) { + to = Long.parseLong(ranges[1].trim()); + } + response.setHeader("Content-Range", "bytes " + start + "-" + to + "/" + length); + } + response.setHeader("Content-Length", String.valueOf(to - start + 1)); + try { + output(file, response.getOutputStream(), 2048, start, to); + } catch (IOException e) { + e.printStackTrace(); + } + } + + /** + * 输出文件流 + * + * @param file 文件 + * @param os 输出流 + */ + public static void output(File file, OutputStream os) { + output(file, os, null); + } + + /** + * 输出文件流 + * + * @param file 文件 + * @param os 输出流 + * @param size 读取缓冲区大小 + */ + public static void output(File file, OutputStream os, Integer size) { + output(file, os, size, null, null); + } + + /** + * 输出文件流, 支持分片 + * + * @param file 文件 + * @param os 输出流 + * @param size 读取缓冲区大小 + * @param start 开始位置 + * @param to 结束位置 + */ + public static void output(File file, OutputStream os, Integer size, Long start, Long to) { + BufferedInputStream is = null; + try { + is = new BufferedInputStream(new FileInputStream(file)); + if (start != null) { + long skip = is.skip(start); + if (skip < start) { + System.out.println("ERROR: skip fail[ skipped=" + skip + ", start= " + start + " ]"); + } + to = to - start + 1; + } + byte[] bytes = new byte[size == null ? 2048 : size]; + int len; + if (to == null) { + while ((len = is.read(bytes)) != -1) { + os.write(bytes, 0, len); + } + } else { + while (to > 0 && (len = is.read(bytes)) != -1) { + os.write(bytes, 0, to < len ? (int) ((long) to) : len); + to -= len; + } + } + os.flush(); + } catch (IOException ignored) { + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (os != null) { + try { + os.close(); + } catch (IOException ignored) { + } + } + if (is != null) { + try { + is.close(); + } catch (IOException e) { + System.out.println(e.getMessage()); + } + } + } + } + + /** + * 获取文件类型 + * + * @param file 文件 + * @return String + */ + public static String getContentType(File file) { + String contentType = null; + if (file.exists()) { + try { + contentType = new Tika().detect(file); + } catch (IOException e) { + e.printStackTrace(); + } + } + return contentType; + } + + /** + * 判断文件是否是图片类型 + * + * @param file 文件 + * @return boolean + */ + public static boolean isImage(File file) { + return isImage(getContentType(file)); + } + + /** + * 判断文件是否是图片类型 + * + * @param contentType 文件类型 + * @return boolean + */ + public static boolean isImage(String contentType) { + return contentType != null && contentType.startsWith("image/"); + } + + /** + * 设置下载文件的header + * + * @param response HttpServletResponse + * @param fileName 文件名称 + */ + public static void setDownloadHeader(HttpServletResponse response, String fileName) { + response.setContentType("application/force-download"); + try { + fileName = URLEncoder.encode(fileName, "utf-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + response.setHeader("Content-Disposition", "attachment;fileName=" + fileName); + } + + /** + * 输出404错误页面 + * + * @param response HttpServletResponse + */ + public static void outNotFund(HttpServletResponse response) { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + outMessage("404 Not Found", null, response); + } + + /** + * 输出错误页面 + * + * @param title 标题 + * @param message 内容 + * @param response HttpServletResponse + */ + public static void outMessage(String title, String message, HttpServletResponse response) { + response.setContentType("text/html;charset=UTF-8"); + try { + PrintWriter writer = response.getWriter(); + writer.write(""); + writer.write("" + title + ""); + writer.write("

" + title + "

"); + if (message != null) { + writer.write(message); + } + writer.write("

EleAdmin File Server

"); + writer.flush(); + } catch (IOException e) { + e.printStackTrace(); + } + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/utils/JChardetFacadeUtil.java b/src/main/java/com/gxwebsoft/common/core/utils/JChardetFacadeUtil.java new file mode 100644 index 0000000..6bcbbb9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/utils/JChardetFacadeUtil.java @@ -0,0 +1,2025 @@ +package com.eleadmin.common.core.utils; + +import java.io.*; +import java.net.URL; +import java.nio.charset.Charset; +import java.nio.charset.UnsupportedCharsetException; + +/** + * 文件编码检测工具, 核心代码来自 cpDetector 和 jChardet, 可以检测大多数文件的编码 + * + * @author EleAdmin + * @since 2020-09-15 09:24:20 + */ +public class JChardetFacadeUtil { + + public static String detectCodepage(URL url) { + try { + Charset ret = JChardetFacade.getInstance().detectCodepage(url); + return ret == null ? null : ret.name(); + } catch (Exception ignored) { + } + return null; + } + + /** + * 下面代码来自: https://github.com/r91987/cpdetector + */ + public static class JChardetFacade extends AbstractCodepageDetector implements nsICharsetDetectionObserver { + private static JChardetFacade instance = null; + private static nsDetector det; + private byte[] buf = new byte[4096]; + private Charset codpage = null; + private boolean m_guessing = true; + private int amountOfVerifiers = 0; + + private JChardetFacade() { + det = new nsDetector(0); + det.Init(this); + this.amountOfVerifiers = det.getProbableCharsets().length; + } + + public static JChardetFacade getInstance() { + if (instance == null) { + instance = new JChardetFacade(); + } + + return instance; + } + + public synchronized Charset detectCodepage(InputStream in, int length) throws IOException { + this.Reset(); + int read = 0; + boolean done = false; + boolean isAscii = true; + Charset ret = null; + + int len; + do { + len = in.read(this.buf, 0, Math.min(this.buf.length, length - read)); + if (len > 0) { + read += len; + } + + if (!done) { + done = det.DoIt(this.buf, len, false); + } + } while (len > 0 && !done); + + det.DataEnd(); + if (this.codpage == null) { + if (this.m_guessing) { + ret = this.guess(); + } + } else { + ret = this.codpage; + } + return ret; + } + + private Charset guess() { + Charset ret = null; + String[] possibilities = det.getProbableCharsets(); + if (possibilities.length == this.amountOfVerifiers) { + ret = Charset.forName("US-ASCII"); + } else { + String check = possibilities[0]; + if (!check.equalsIgnoreCase("nomatch")) { + for (int i = 0; ret == null && i < possibilities.length; ++i) { + try { + ret = Charset.forName(possibilities[i]); + } catch (UnsupportedCharsetException ignored) { + } + } + } + } + return ret; + } + + public void Notify(String charset) { + this.codpage = Charset.forName(charset); + } + + public void Reset() { + det.Reset(); + this.codpage = null; + } + + public boolean isGuessing() { + return this.m_guessing; + } + + public synchronized void setGuessing(boolean guessing) { + this.m_guessing = guessing; + } + } + + /** + * + */ + public static abstract class AbstractCodepageDetector implements ICodepageDetector { + public AbstractCodepageDetector() { + } + + public Charset detectCodepage(URL url) throws IOException { + BufferedInputStream in = new BufferedInputStream(url.openStream()); + Charset result = this.detectCodepage(in, 2147483647); + in.close(); + return result; + } + + public final Reader open(URL url) throws IOException { + Reader ret = null; + Charset cs = this.detectCodepage(url); + if (cs != null) { + ret = new InputStreamReader(new BufferedInputStream(url.openStream()), cs); + } + + return ret; + } + + public int compareTo(Object o) { + String other = o.getClass().getName(); + String mine = this.getClass().getName(); + return mine.compareTo(other); + } + } + + /** + * + */ + interface ICodepageDetector extends Serializable, Comparable { + Reader open(URL var1) throws IOException; + + Charset detectCodepage(URL var1) throws IOException; + + Charset detectCodepage(InputStream var1, int var2) throws IOException; + } + + /** + * 以下代码开始是由Mozilla组织提供的JChardet, 它可以检测大多数文件的编码 + * http://jchardet.sourceforge.net/ + */ + public static class nsDetector extends nsPSMDetector implements nsICharsetDetector { + nsICharsetDetectionObserver mObserver = null; + + public nsDetector() { + } + + public nsDetector(int var1) { + super(var1); + } + + public void Init(nsICharsetDetectionObserver var1) { + this.mObserver = var1; + } + + public boolean DoIt(byte[] var1, int var2, boolean var3) { + if (var1 != null && !var3) { + this.HandleData(var1, var2); + return this.mDone; + } else { + return false; + } + } + + public void Done() { + this.DataEnd(); + } + + public void Report(String var1) { + if (this.mObserver != null) { + this.mObserver.Notify(var1); + } + + } + + public boolean isAscii(byte[] var1, int var2) { + for (int var3 = 0; var3 < var2; ++var3) { + if ((128 & var1[var3]) != 0) { + return false; + } + } + + return true; + } + } + + /** + * + */ + public static abstract class nsPSMDetector { + public static final int ALL = 0; + public static final int JAPANESE = 1; + public static final int CHINESE = 2; + public static final int SIMPLIFIED_CHINESE = 3; + public static final int TRADITIONAL_CHINESE = 4; + public static final int KOREAN = 5; + public static final int NO_OF_LANGUAGES = 6; + public static final int MAX_VERIFIERS = 16; + nsVerifier[] mVerifier; + nsEUCStatistics[] mStatisticsData; + nsEUCSampler mSampler = new nsEUCSampler(); + byte[] mState = new byte[16]; + int[] mItemIdx = new int[16]; + int mItems; + int mClassItems; + boolean mDone; + boolean mRunSampler; + boolean mClassRunSampler; + + public nsPSMDetector() { + this.initVerifiers(0); + this.Reset(); + } + + public nsPSMDetector(int var1) { + this.initVerifiers(var1); + this.Reset(); + } + + public nsPSMDetector(int var1, nsVerifier[] var2, nsEUCStatistics[] var3) { + this.mClassRunSampler = var3 != null; + this.mStatisticsData = var3; + this.mVerifier = var2; + this.mClassItems = var1; + this.Reset(); + } + + public void Reset() { + this.mRunSampler = this.mClassRunSampler; + this.mDone = false; + this.mItems = this.mClassItems; + + for (int var1 = 0; var1 < this.mItems; this.mItemIdx[var1] = var1++) { + this.mState[var1] = 0; + } + + this.mSampler.Reset(); + } + + protected void initVerifiers(int var1) { + boolean var2 = false; + int var3; + if (var1 >= 0 && var1 < 6) { + var3 = var1; + } else { + var3 = 0; + } + + this.mVerifier = null; + this.mStatisticsData = null; + if (var3 == 4) { + this.mVerifier = new nsVerifier[]{new nsUTF8Verifier(), new nsBIG5Verifier(), new nsISO2022CNVerifier(), new nsEUCTWVerifier(), new nsCP1252Verifier(), new nsUCS2BEVerifier(), new nsUCS2LEVerifier()}; + this.mStatisticsData = new nsEUCStatistics[]{null, new Big5Statistics(), null, new EUCTWStatistics(), null, null, null}; + } else if (var3 == 5) { + this.mVerifier = new nsVerifier[]{new nsUTF8Verifier(), new nsEUCKRVerifier(), new nsISO2022KRVerifier(), new nsCP1252Verifier(), new nsUCS2BEVerifier(), new nsUCS2LEVerifier()}; + } else if (var3 == 3) { + this.mVerifier = new nsVerifier[]{new nsUTF8Verifier(), new nsGB2312Verifier(), new nsGB18030Verifier(), new nsISO2022CNVerifier(), new nsHZVerifier(), new nsCP1252Verifier(), new nsUCS2BEVerifier(), new nsUCS2LEVerifier()}; + } else if (var3 == 1) { + this.mVerifier = new nsVerifier[]{new nsUTF8Verifier(), new nsSJISVerifier(), new nsEUCJPVerifier(), new nsISO2022JPVerifier(), new nsCP1252Verifier(), new nsUCS2BEVerifier(), new nsUCS2LEVerifier()}; + } else if (var3 == 2) { + this.mVerifier = new nsVerifier[]{new nsUTF8Verifier(), new nsGB2312Verifier(), new nsGB18030Verifier(), new nsBIG5Verifier(), new nsISO2022CNVerifier(), new nsHZVerifier(), new nsEUCTWVerifier(), new nsCP1252Verifier(), new nsUCS2BEVerifier(), new nsUCS2LEVerifier()}; + this.mStatisticsData = new nsEUCStatistics[]{null, new GB2312Statistics(), null, new Big5Statistics(), null, null, new EUCTWStatistics(), null, null, null}; + } else if (var3 == 0) { + this.mVerifier = new nsVerifier[]{new nsUTF8Verifier(), new nsSJISVerifier(), new nsEUCJPVerifier(), new nsISO2022JPVerifier(), new nsEUCKRVerifier(), new nsISO2022KRVerifier(), new nsBIG5Verifier(), new nsEUCTWVerifier(), new nsGB2312Verifier(), new nsGB18030Verifier(), new nsISO2022CNVerifier(), new nsHZVerifier(), new nsCP1252Verifier(), new nsUCS2BEVerifier(), new nsUCS2LEVerifier()}; + this.mStatisticsData = new nsEUCStatistics[]{null, null, new EUCJPStatistics(), null, new EUCKRStatistics(), null, new Big5Statistics(), new EUCTWStatistics(), new GB2312Statistics(), null, null, null, null, null, null}; + } + + this.mClassRunSampler = this.mStatisticsData != null; + this.mClassItems = this.mVerifier.length; + } + + public abstract void Report(String var1); + + public boolean HandleData(byte[] var1, int var2) { + for (int var3 = 0; var3 < var2; ++var3) { + byte var5 = var1[var3]; + int var4 = 0; + + while (var4 < this.mItems) { + byte var6 = nsVerifier.getNextState(this.mVerifier[this.mItemIdx[var4]], var5, this.mState[var4]); + if (var6 == 2) { + this.Report(this.mVerifier[this.mItemIdx[var4]].charset()); + this.mDone = true; + return this.mDone; + } + + if (var6 == 1) { + --this.mItems; + if (var4 < this.mItems) { + this.mItemIdx[var4] = this.mItemIdx[this.mItems]; + this.mState[var4] = this.mState[this.mItems]; + } + } else { + this.mState[var4++] = var6; + } + } + + if (this.mItems <= 1) { + if (1 == this.mItems) { + this.Report(this.mVerifier[this.mItemIdx[0]].charset()); + } + + this.mDone = true; + return this.mDone; + } + + int var7 = 0; + int var8 = 0; + + for (var4 = 0; var4 < this.mItems; ++var4) { + if (!this.mVerifier[this.mItemIdx[var4]].isUCS2() && !this.mVerifier[this.mItemIdx[var4]].isUCS2()) { + ++var7; + var8 = var4; + } + } + + if (1 == var7) { + this.Report(this.mVerifier[this.mItemIdx[var8]].charset()); + this.mDone = true; + return this.mDone; + } + } + + if (this.mRunSampler) { + this.Sample(var1, var2); + } + + return this.mDone; + } + + public void DataEnd() { + if (!this.mDone) { + if (this.mItems == 2) { + if (this.mVerifier[this.mItemIdx[0]].charset().equals("GB18030")) { + this.Report(this.mVerifier[this.mItemIdx[1]].charset()); + this.mDone = true; + } else if (this.mVerifier[this.mItemIdx[1]].charset().equals("GB18030")) { + this.Report(this.mVerifier[this.mItemIdx[0]].charset()); + this.mDone = true; + } + } + + if (this.mRunSampler) { + this.Sample((byte[]) null, 0, true); + } + + } + } + + public void Sample(byte[] var1, int var2) { + this.Sample(var1, var2, false); + } + + public void Sample(byte[] var1, int var2, boolean var3) { + int var4 = 0; + int var6 = 0; + + int var5; + for (var5 = 0; var5 < this.mItems; ++var5) { + if (null != this.mStatisticsData[this.mItemIdx[var5]]) { + ++var6; + } + + if (!this.mVerifier[this.mItemIdx[var5]].isUCS2() && !this.mVerifier[this.mItemIdx[var5]].charset().equals("GB18030")) { + ++var4; + } + } + + this.mRunSampler = var6 > 1; + if (this.mRunSampler) { + this.mRunSampler = this.mSampler.Sample(var1, var2); + if ((var3 && this.mSampler.GetSomeData() || this.mSampler.EnoughData()) && var6 == var4) { + this.mSampler.CalFreq(); + int var7 = -1; + int var8 = 0; + float var9 = 0.0F; + + for (var5 = 0; var5 < this.mItems; ++var5) { + if (null != this.mStatisticsData[this.mItemIdx[var5]] && !this.mVerifier[this.mItemIdx[var5]].charset().equals("Big5")) { + float var10 = this.mSampler.GetScore(this.mStatisticsData[this.mItemIdx[var5]].mFirstByteFreq(), this.mStatisticsData[this.mItemIdx[var5]].mFirstByteWeight(), this.mStatisticsData[this.mItemIdx[var5]].mSecondByteFreq(), this.mStatisticsData[this.mItemIdx[var5]].mSecondByteWeight()); + if (0 == var8++ || var9 > var10) { + var9 = var10; + var7 = var5; + } + } + } + + if (var7 >= 0) { + this.Report(this.mVerifier[this.mItemIdx[var7]].charset()); + this.mDone = true; + } + } + } + + } + + public String[] getProbableCharsets() { + String[] var1; + if (this.mItems <= 0) { + var1 = new String[]{"nomatch"}; + return var1; + } else { + var1 = new String[this.mItems]; + + for (int var2 = 0; var2 < this.mItems; ++var2) { + var1[var2] = this.mVerifier[this.mItemIdx[var2]].charset(); + } + + return var1; + } + } + } + + /** + * + */ + public static interface nsICharsetDetectionObserver { + void Notify(String var1); + } + + /** + * + */ + public static interface nsICharsetDetector { + void Init(nsICharsetDetectionObserver var1); + + boolean DoIt(byte[] var1, int var2, boolean var3); + + void Done(); + } + + /** + * + */ + public static abstract class nsVerifier { + static final byte eStart = 0; + static final byte eError = 1; + static final byte eItsMe = 2; + static final int eidxSft4bits = 3; + static final int eSftMsk4bits = 7; + static final int eBitSft4bits = 2; + static final int eUnitMsk4bits = 15; + + nsVerifier() { + } + + public abstract String charset(); + + public abstract int stFactor(); + + public abstract int[] cclass(); + + public abstract int[] states(); + + public abstract boolean isUCS2(); + + public static byte getNextState(nsVerifier var0, byte var1, byte var2) { + return (byte) (255 & var0.states()[(var2 * var0.stFactor() + (var0.cclass()[(var1 & 255) >> 3] >> ((var1 & 7) << 2) & 15) & 255) >> 3] >> ((var2 * var0.stFactor() + (var0.cclass()[(var1 & 255) >> 3] >> ((var1 & 7) << 2) & 15) & 255 & 7) << 2) & 15); + } + } + + /** + * + */ + public static class nsEUCSampler { + int mTotal = 0; + int mThreshold = 200; + int mState = 0; + public int[] mFirstByteCnt = new int[94]; + public int[] mSecondByteCnt = new int[94]; + public float[] mFirstByteFreq = new float[94]; + public float[] mSecondByteFreq = new float[94]; + + public nsEUCSampler() { + this.Reset(); + } + + public void Reset() { + this.mTotal = 0; + this.mState = 0; + + for (int var1 = 0; var1 < 94; ++var1) { + this.mFirstByteCnt[var1] = this.mSecondByteCnt[var1] = 0; + } + + } + + boolean EnoughData() { + return this.mTotal > this.mThreshold; + } + + boolean GetSomeData() { + return this.mTotal > 1; + } + + boolean Sample(byte[] var1, int var2) { + if (this.mState == 1) { + return false; + } else { + int var3 = 0; + + for (int var4 = 0; var4 < var2 && 1 != this.mState; ++var3) { + int var10002; + switch (this.mState) { + case 0: + if ((var1[var3] & 128) != 0) { + if (255 != (255 & var1[var3]) && 161 <= (255 & var1[var3])) { + ++this.mTotal; + var10002 = this.mFirstByteCnt[(255 & var1[var3]) - 161]++; + this.mState = 2; + } else { + this.mState = 1; + } + } + case 1: + break; + case 2: + if ((var1[var3] & 128) != 0) { + if (255 != (255 & var1[var3]) && 161 <= (255 & var1[var3])) { + ++this.mTotal; + var10002 = this.mSecondByteCnt[(255 & var1[var3]) - 161]++; + this.mState = 0; + } else { + this.mState = 1; + } + } else { + this.mState = 1; + } + break; + default: + this.mState = 1; + } + + ++var4; + } + + return 1 != this.mState; + } + } + + void CalFreq() { + for (int var1 = 0; var1 < 94; ++var1) { + this.mFirstByteFreq[var1] = (float) this.mFirstByteCnt[var1] / (float) this.mTotal; + this.mSecondByteFreq[var1] = (float) this.mSecondByteCnt[var1] / (float) this.mTotal; + } + + } + + float GetScore(float[] var1, float var2, float[] var3, float var4) { + return var2 * this.GetScore(var1, this.mFirstByteFreq) + var4 * this.GetScore(var3, this.mSecondByteFreq); + } + + float GetScore(float[] var1, float[] var2) { + float var4 = 0.0F; + + for (int var5 = 0; var5 < 94; ++var5) { + float var3 = var1[var5] - var2[var5]; + var4 += var3 * var3; + } + + return (float) Math.sqrt((double) var4) / 94.0F; + } + } + + /** + * + */ + public static abstract class nsEUCStatistics { + public abstract float[] mFirstByteFreq(); + + public abstract float mFirstByteStdDev(); + + public abstract float mFirstByteMean(); + + public abstract float mFirstByteWeight(); + + public abstract float[] mSecondByteFreq(); + + public abstract float mSecondByteStdDev(); + + public abstract float mSecondByteMean(); + + public abstract float mSecondByteWeight(); + + public nsEUCStatistics() { + } + } + + /** + * + */ + public static class EUCJPStatistics extends nsEUCStatistics { + static float[] mFirstByteFreq; + static float mFirstByteStdDev; + static float mFirstByteMean; + static float mFirstByteWeight; + static float[] mSecondByteFreq; + static float mSecondByteStdDev; + static float mSecondByteMean; + static float mSecondByteWeight; + + public float[] mFirstByteFreq() { + return mFirstByteFreq; + } + + public float mFirstByteStdDev() { + return mFirstByteStdDev; + } + + public float mFirstByteMean() { + return mFirstByteMean; + } + + public float mFirstByteWeight() { + return mFirstByteWeight; + } + + public float[] mSecondByteFreq() { + return mSecondByteFreq; + } + + public float mSecondByteStdDev() { + return mSecondByteStdDev; + } + + public float mSecondByteMean() { + return mSecondByteMean; + } + + public float mSecondByteWeight() { + return mSecondByteWeight; + } + + public EUCJPStatistics() { + mFirstByteFreq = new float[]{0.364808F, 0.0F, 0.0F, 0.145325F, 0.304891F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.001835F, 0.010771F, 0.006462F, 0.001157F, 0.002114F, 0.003231F, 0.001356F, 0.00742F, 0.004189F, 0.003231F, 0.003032F, 0.03319F, 0.006303F, 0.006064F, 0.009973F, 0.002354F, 0.00367F, 0.009135F, 0.001675F, 0.002792F, 0.002194F, 0.01472F, 0.011928F, 8.78E-4F, 0.013124F, 0.001077F, 0.009295F, 0.003471F, 0.002872F, 0.002433F, 9.57E-4F, 0.001636F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 8.0E-5F, 2.79E-4F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 8.0E-5F, 0.0F}; + mFirstByteStdDev = 0.050407F; + mFirstByteMean = 0.010638F; + mFirstByteWeight = 0.640871F; + mSecondByteFreq = new float[]{0.002473F, 0.039134F, 0.152745F, 0.009694F, 3.59E-4F, 0.02218F, 7.58E-4F, 0.004308F, 1.6E-4F, 0.002513F, 0.003072F, 0.001316F, 0.00383F, 0.001037F, 0.00359F, 9.57E-4F, 1.6E-4F, 2.39E-4F, 0.006462F, 0.001596F, 0.031554F, 0.001316F, 0.002194F, 0.016555F, 0.003271F, 6.78E-4F, 5.98E-4F, 0.206438F, 7.18E-4F, 0.001077F, 0.00371F, 0.001356F, 0.001356F, 4.39E-4F, 0.004388F, 0.005704F, 8.78E-4F, 0.010172F, 0.007061F, 0.01468F, 6.38E-4F, 0.02573F, 0.002792F, 7.18E-4F, 0.001795F, 0.091551F, 7.58E-4F, 0.003909F, 5.58E-4F, 0.031195F, 0.007061F, 0.001316F, 0.022579F, 0.006981F, 0.00726F, 0.001117F, 2.39E-4F, 0.012127F, 8.78E-4F, 0.00379F, 0.001077F, 7.58E-4F, 0.002114F, 0.002234F, 6.78E-4F, 0.002992F, 0.003311F, 0.023416F, 0.001237F, 0.002753F, 0.005146F, 0.002194F, 0.007021F, 0.008497F, 0.013763F, 0.011768F, 0.006303F, 0.001915F, 6.38E-4F, 0.008776F, 9.18E-4F, 0.003431F, 0.057603F, 4.39E-4F, 4.39E-4F, 7.58E-4F, 0.002872F, 0.001675F, 0.01105F, 0.0F, 2.79E-4F, 0.012127F, 7.18E-4F, 0.00738F}; + mSecondByteStdDev = 0.028247F; + mSecondByteMean = 0.010638F; + mSecondByteWeight = 0.359129F; + } + } + + /** + * + */ + public static class nsEUCJPVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsEUCJPVerifier() { + cclass = new int[32]; + cclass[0] = 1145324612; + cclass[1] = 1430537284; + cclass[2] = 1145324612; + cclass[3] = 1145328708; + cclass[4] = 1145324612; + cclass[5] = 1145324612; + cclass[6] = 1145324612; + cclass[7] = 1145324612; + cclass[8] = 1145324612; + cclass[9] = 1145324612; + cclass[10] = 1145324612; + cclass[11] = 1145324612; + cclass[12] = 1145324612; + cclass[13] = 1145324612; + cclass[14] = 1145324612; + cclass[15] = 1145324612; + cclass[16] = 1431655765; + cclass[17] = 827675989; + cclass[18] = 1431655765; + cclass[19] = 1431655765; + cclass[20] = 572662309; + cclass[21] = 572662306; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 572662306; + cclass[25] = 572662306; + cclass[26] = 572662306; + cclass[27] = 572662306; + cclass[28] = 0; + cclass[29] = 0; + cclass[30] = 0; + cclass[31] = 1342177280; + states = new int[5]; + states[0] = 286282563; + states[1] = 572657937; + states[2] = 286265378; + states[3] = 319885329; + states[4] = 4371; + charset = "EUC-JP"; + stFactor = 6; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class EUCKRStatistics extends nsEUCStatistics { + static float[] mFirstByteFreq; + static float mFirstByteStdDev; + static float mFirstByteMean; + static float mFirstByteWeight; + static float[] mSecondByteFreq; + static float mSecondByteStdDev; + static float mSecondByteMean; + static float mSecondByteWeight; + + public float[] mFirstByteFreq() { + return mFirstByteFreq; + } + + public float mFirstByteStdDev() { + return mFirstByteStdDev; + } + + public float mFirstByteMean() { + return mFirstByteMean; + } + + public float mFirstByteWeight() { + return mFirstByteWeight; + } + + public float[] mSecondByteFreq() { + return mSecondByteFreq; + } + + public float mSecondByteStdDev() { + return mSecondByteStdDev; + } + + public float mSecondByteMean() { + return mSecondByteMean; + } + + public float mSecondByteWeight() { + return mSecondByteWeight; + } + + public EUCKRStatistics() { + mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 4.12E-4F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.057502F, 0.033182F, 0.002267F, 0.016076F, 0.014633F, 0.032976F, 0.004122F, 0.011336F, 0.058533F, 0.024526F, 0.025969F, 0.054411F, 0.01958F, 0.063273F, 0.113974F, 0.029885F, 0.150041F, 0.059151F, 0.002679F, 0.009893F, 0.014839F, 0.026381F, 0.015045F, 0.069456F, 0.08986F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F}; + mFirstByteStdDev = 0.025593F; + mFirstByteMean = 0.010638F; + mFirstByteWeight = 0.647437F; + mSecondByteFreq = new float[]{0.016694F, 0.0F, 0.012778F, 0.030091F, 0.002679F, 0.006595F, 0.001855F, 8.24E-4F, 0.005977F, 0.00474F, 0.003092F, 8.24E-4F, 0.01958F, 0.037304F, 0.008244F, 0.014633F, 0.001031F, 0.0F, 0.003298F, 0.002061F, 0.006183F, 0.005977F, 8.24E-4F, 0.021847F, 0.014839F, 0.052968F, 0.017312F, 0.007626F, 4.12E-4F, 8.24E-4F, 0.011129F, 0.0F, 4.12E-4F, 0.001649F, 0.005977F, 0.065746F, 0.020198F, 0.021434F, 0.014633F, 0.004122F, 0.001649F, 8.24E-4F, 8.24E-4F, 0.051937F, 0.01958F, 0.023289F, 0.026381F, 0.040396F, 0.009068F, 0.001443F, 0.00371F, 0.00742F, 0.001443F, 0.01319F, 0.002885F, 4.12E-4F, 0.003298F, 0.025969F, 4.12E-4F, 4.12E-4F, 0.006183F, 0.003298F, 0.066983F, 0.002679F, 0.002267F, 0.011129F, 4.12E-4F, 0.010099F, 0.015251F, 0.007626F, 0.043899F, 0.00371F, 0.002679F, 0.001443F, 0.010923F, 0.002885F, 0.009068F, 0.019992F, 4.12E-4F, 0.00845F, 0.005153F, 0.0F, 0.010099F, 0.0F, 0.001649F, 0.01216F, 0.011542F, 0.006595F, 0.001855F, 0.010923F, 4.12E-4F, 0.023702F, 0.00371F, 0.001855F}; + mSecondByteStdDev = 0.013937F; + mSecondByteMean = 0.010638F; + mSecondByteWeight = 0.352563F; + } + } + + /** + * + */ + public static class nsEUCKRVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsEUCKRVerifier() { + cclass = new int[32]; + cclass[0] = 286331153; + cclass[1] = 1118481; + cclass[2] = 286331153; + cclass[3] = 286327057; + cclass[4] = 286331153; + cclass[5] = 286331153; + cclass[6] = 286331153; + cclass[7] = 286331153; + cclass[8] = 286331153; + cclass[9] = 286331153; + cclass[10] = 286331153; + cclass[11] = 286331153; + cclass[12] = 286331153; + cclass[13] = 286331153; + cclass[14] = 286331153; + cclass[15] = 286331153; + cclass[16] = 0; + cclass[17] = 0; + cclass[18] = 0; + cclass[19] = 0; + cclass[20] = 572662304; + cclass[21] = 858923554; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 572662306; + cclass[25] = 572662322; + cclass[26] = 572662306; + cclass[27] = 572662306; + cclass[28] = 572662306; + cclass[29] = 572662306; + cclass[30] = 572662306; + cclass[31] = 35791394; + states = new int[2]; + states[0] = 286331649; + states[1] = 1122850; + charset = "EUC-KR"; + stFactor = 4; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class EUCTWStatistics extends nsEUCStatistics { + static float[] mFirstByteFreq; + static float mFirstByteStdDev; + static float mFirstByteMean; + static float mFirstByteWeight; + static float[] mSecondByteFreq; + static float mSecondByteStdDev; + static float mSecondByteMean; + static float mSecondByteWeight; + + public float[] mFirstByteFreq() { + return mFirstByteFreq; + } + + public float mFirstByteStdDev() { + return mFirstByteStdDev; + } + + public float mFirstByteMean() { + return mFirstByteMean; + } + + public float mFirstByteWeight() { + return mFirstByteWeight; + } + + public float[] mSecondByteFreq() { + return mSecondByteFreq; + } + + public float mSecondByteStdDev() { + return mSecondByteStdDev; + } + + public float mSecondByteMean() { + return mSecondByteMean; + } + + public float mSecondByteWeight() { + return mSecondByteWeight; + } + + public EUCTWStatistics() { + mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.119286F, 0.052233F, 0.044126F, 0.052494F, 0.045906F, 0.019038F, 0.032465F, 0.026252F, 0.025502F, 0.015963F, 0.052493F, 0.019256F, 0.015137F, 0.031782F, 0.01737F, 0.018494F, 0.015575F, 0.016621F, 0.007444F, 0.011642F, 0.013916F, 0.019159F, 0.016445F, 0.007851F, 0.011079F, 0.022842F, 0.015513F, 0.010033F, 0.00995F, 0.010347F, 0.013103F, 0.015371F, 0.012502F, 0.007436F, 0.018253F, 0.014134F, 0.008907F, 0.005411F, 0.00957F, 0.013598F, 0.006092F, 0.007409F, 0.008432F, 0.005816F, 0.009349F, 0.005472F, 0.00717F, 0.00742F, 0.003681F, 0.007523F, 0.00461F, 0.006154F, 0.003348F, 0.005074F, 0.005922F, 0.005254F, 0.004682F, 0.002093F, 0.0F}; + mFirstByteStdDev = 0.016681F; + mFirstByteMean = 0.010638F; + mFirstByteWeight = 0.715599F; + mSecondByteFreq = new float[]{0.028933F, 0.011371F, 0.011053F, 0.007232F, 0.010192F, 0.004093F, 0.015043F, 0.011752F, 0.022387F, 0.00841F, 0.012448F, 0.007473F, 0.003594F, 0.007139F, 0.018912F, 0.006083F, 0.003302F, 0.010215F, 0.008791F, 0.024236F, 0.014107F, 0.014108F, 0.010303F, 0.009728F, 0.007877F, 0.009719F, 0.007952F, 0.021028F, 0.005764F, 0.009341F, 0.006591F, 0.012517F, 0.005921F, 0.008982F, 0.008771F, 0.012802F, 0.005926F, 0.008342F, 0.003086F, 0.006843F, 0.007576F, 0.004734F, 0.016404F, 0.008803F, 0.008071F, 0.005349F, 0.008566F, 0.01084F, 0.015401F, 0.031904F, 0.00867F, 0.011479F, 0.010936F, 0.007617F, 0.008995F, 0.008114F, 0.008658F, 0.005934F, 0.010452F, 0.009142F, 0.004519F, 0.008339F, 0.007476F, 0.007027F, 0.006025F, 0.021804F, 0.024248F, 0.015895F, 0.003768F, 0.010171F, 0.010007F, 0.010178F, 0.008316F, 0.006832F, 0.006364F, 0.009141F, 0.009148F, 0.012081F, 0.011914F, 0.004464F, 0.014257F, 0.006907F, 0.011292F, 0.018622F, 0.008149F, 0.004636F, 0.006612F, 0.013478F, 0.012614F, 0.005186F, 0.048285F, 0.006816F, 0.006743F, 0.008671F}; + mSecondByteStdDev = 0.00663F; + mSecondByteMean = 0.010638F; + mSecondByteWeight = 0.284401F; + } + } + + /** + * + */ + public static class nsEUCTWVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsEUCTWVerifier() { + cclass = new int[32]; + cclass[0] = 572662306; + cclass[1] = 2236962; + cclass[2] = 572662306; + cclass[3] = 572654114; + cclass[4] = 572662306; + cclass[5] = 572662306; + cclass[6] = 572662306; + cclass[7] = 572662306; + cclass[8] = 572662306; + cclass[9] = 572662306; + cclass[10] = 572662306; + cclass[11] = 572662306; + cclass[12] = 572662306; + cclass[13] = 572662306; + cclass[14] = 572662306; + cclass[15] = 572662306; + cclass[16] = 0; + cclass[17] = 100663296; + cclass[18] = 0; + cclass[19] = 0; + cclass[20] = 1145324592; + cclass[21] = 286331221; + cclass[22] = 286331153; + cclass[23] = 286331153; + cclass[24] = 858985233; + cclass[25] = 858993459; + cclass[26] = 858993459; + cclass[27] = 858993459; + cclass[28] = 858993459; + cclass[29] = 858993459; + cclass[30] = 858993459; + cclass[31] = 53687091; + states = new int[6]; + states[0] = 338898961; + states[1] = 571543825; + states[2] = 269623842; + states[3] = 286330880; + states[4] = 1052949; + states[5] = 16; + charset = "x-euc-tw"; + stFactor = 7; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class Big5Statistics extends nsEUCStatistics { + static float[] mFirstByteFreq; + static float mFirstByteStdDev; + static float mFirstByteMean; + static float mFirstByteWeight; + static float[] mSecondByteFreq; + static float mSecondByteStdDev; + static float mSecondByteMean; + static float mSecondByteWeight; + + public float[] mFirstByteFreq() { + return mFirstByteFreq; + } + + public float mFirstByteStdDev() { + return mFirstByteStdDev; + } + + public float mFirstByteMean() { + return mFirstByteMean; + } + + public float mFirstByteWeight() { + return mFirstByteWeight; + } + + public float[] mSecondByteFreq() { + return mSecondByteFreq; + } + + public float mSecondByteStdDev() { + return mSecondByteStdDev; + } + + public float mSecondByteMean() { + return mSecondByteMean; + } + + public float mSecondByteWeight() { + return mSecondByteWeight; + } + + public Big5Statistics() { + mFirstByteFreq = new float[]{0.0F, 0.0F, 0.0F, 0.114427F, 0.061058F, 0.075598F, 0.048386F, 0.063966F, 0.027094F, 0.095787F, 0.029525F, 0.031331F, 0.036915F, 0.021805F, 0.019349F, 0.037496F, 0.018068F, 0.01276F, 0.030053F, 0.017339F, 0.016731F, 0.019501F, 0.01124F, 0.032973F, 0.016658F, 0.015872F, 0.021458F, 0.012378F, 0.017003F, 0.020802F, 0.012454F, 0.009239F, 0.012829F, 0.007922F, 0.010079F, 0.009815F, 0.010104F, 0.0F, 0.0F, 0.0F, 5.3E-5F, 3.5E-5F, 1.05E-4F, 3.1E-5F, 8.8E-5F, 2.7E-5F, 2.7E-5F, 2.6E-5F, 3.5E-5F, 2.4E-5F, 3.4E-5F, 3.75E-4F, 2.5E-5F, 2.8E-5F, 2.0E-5F, 2.4E-5F, 2.8E-5F, 3.1E-5F, 5.9E-5F, 4.0E-5F, 3.0E-5F, 7.9E-5F, 3.7E-5F, 4.0E-5F, 2.3E-5F, 3.0E-5F, 2.7E-5F, 6.4E-5F, 2.0E-5F, 2.7E-5F, 2.5E-5F, 7.4E-5F, 1.9E-5F, 2.3E-5F, 2.1E-5F, 1.8E-5F, 1.7E-5F, 3.5E-5F, 2.1E-5F, 1.9E-5F, 2.5E-5F, 1.7E-5F, 3.7E-5F, 1.8E-5F, 1.8E-5F, 1.9E-5F, 2.2E-5F, 3.3E-5F, 3.2E-5F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F}; + mFirstByteStdDev = 0.020606F; + mFirstByteMean = 0.010638F; + mFirstByteWeight = 0.675261F; + mSecondByteFreq = new float[]{0.020256F, 0.003293F, 0.045811F, 0.01665F, 0.007066F, 0.004146F, 0.009229F, 0.007333F, 0.003296F, 0.005239F, 0.008282F, 0.003791F, 0.006116F, 0.003536F, 0.004024F, 0.016654F, 0.009334F, 0.005429F, 0.033392F, 0.006121F, 0.008983F, 0.002801F, 0.004221F, 0.010357F, 0.014695F, 0.077937F, 0.006314F, 0.00402F, 0.007331F, 0.00715F, 0.005341F, 0.009195F, 0.00535F, 0.005698F, 0.004472F, 0.007242F, 0.004039F, 0.011154F, 0.016184F, 0.004741F, 0.012814F, 0.007679F, 0.008045F, 0.016631F, 0.009451F, 0.016487F, 0.007287F, 0.012688F, 0.017421F, 0.013205F, 0.03148F, 0.003404F, 0.009149F, 0.008921F, 0.007514F, 0.008683F, 0.008203F, 0.031403F, 0.011733F, 0.015617F, 0.015306F, 0.004004F, 0.010899F, 0.009961F, 0.008388F, 0.01092F, 0.003925F, 0.008585F, 0.009108F, 0.015546F, 0.004659F, 0.006934F, 0.007023F, 0.020252F, 0.005387F, 0.024704F, 0.006963F, 0.002625F, 0.009512F, 0.002971F, 0.008233F, 0.01F, 0.011973F, 0.010553F, 0.005945F, 0.006349F, 0.009401F, 0.008577F, 0.008186F, 0.008159F, 0.005033F, 0.008714F, 0.010614F, 0.006554F}; + mSecondByteStdDev = 0.009909F; + mSecondByteMean = 0.010638F; + mSecondByteWeight = 0.324739F; + } + } + + /** + * + */ + public static class nsBIG5Verifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsBIG5Verifier() { + cclass = new int[32]; + cclass[0] = 286331153; + cclass[1] = 1118481; + cclass[2] = 286331153; + cclass[3] = 286327057; + cclass[4] = 286331153; + cclass[5] = 286331153; + cclass[6] = 286331153; + cclass[7] = 286331153; + cclass[8] = 572662306; + cclass[9] = 572662306; + cclass[10] = 572662306; + cclass[11] = 572662306; + cclass[12] = 572662306; + cclass[13] = 572662306; + cclass[14] = 572662306; + cclass[15] = 304226850; + cclass[16] = 1145324612; + cclass[17] = 1145324612; + cclass[18] = 1145324612; + cclass[19] = 1145324612; + cclass[20] = 858993460; + cclass[21] = 858993459; + cclass[22] = 858993459; + cclass[23] = 858993459; + cclass[24] = 858993459; + cclass[25] = 858993459; + cclass[26] = 858993459; + cclass[27] = 858993459; + cclass[28] = 858993459; + cclass[29] = 858993459; + cclass[30] = 858993459; + cclass[31] = 53687091; + states = new int[3]; + states[0] = 286339073; + states[1] = 304226833; + states[2] = 1; + charset = "Big5"; + stFactor = 5; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class GB2312Statistics extends nsEUCStatistics { + static float[] mFirstByteFreq; + static float mFirstByteStdDev; + static float mFirstByteMean; + static float mFirstByteWeight; + static float[] mSecondByteFreq; + static float mSecondByteStdDev; + static float mSecondByteMean; + static float mSecondByteWeight; + + public float[] mFirstByteFreq() { + return mFirstByteFreq; + } + + public float mFirstByteStdDev() { + return mFirstByteStdDev; + } + + public float mFirstByteMean() { + return mFirstByteMean; + } + + public float mFirstByteWeight() { + return mFirstByteWeight; + } + + public float[] mSecondByteFreq() { + return mSecondByteFreq; + } + + public float mSecondByteStdDev() { + return mSecondByteStdDev; + } + + public float mSecondByteMean() { + return mSecondByteMean; + } + + public float mSecondByteWeight() { + return mSecondByteWeight; + } + + public GB2312Statistics() { + mFirstByteFreq = new float[]{0.011628F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.011628F, 0.012403F, 0.009302F, 0.003876F, 0.017829F, 0.037209F, 0.008527F, 0.010078F, 0.01938F, 0.054264F, 0.010078F, 0.041085F, 0.02093F, 0.018605F, 0.010078F, 0.013178F, 0.016279F, 0.006202F, 0.009302F, 0.017054F, 0.011628F, 0.008527F, 0.004651F, 0.006202F, 0.017829F, 0.024806F, 0.020155F, 0.013953F, 0.032558F, 0.035659F, 0.068217F, 0.010853F, 0.036434F, 0.117054F, 0.027907F, 0.100775F, 0.010078F, 0.017829F, 0.062016F, 0.012403F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.00155F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F}; + mFirstByteStdDev = 0.020081F; + mFirstByteMean = 0.010638F; + mFirstByteWeight = 0.586533F; + mSecondByteFreq = new float[]{0.006202F, 0.031008F, 0.005426F, 0.003101F, 0.00155F, 0.003101F, 0.082171F, 0.014729F, 0.006977F, 0.00155F, 0.013953F, 0.0F, 0.013953F, 0.010078F, 0.008527F, 0.006977F, 0.004651F, 0.003101F, 0.003101F, 0.003101F, 0.008527F, 0.003101F, 0.005426F, 0.005426F, 0.005426F, 0.003101F, 0.00155F, 0.006202F, 0.014729F, 0.010853F, 0.0F, 0.011628F, 0.0F, 0.031783F, 0.013953F, 0.030233F, 0.039535F, 0.008527F, 0.015504F, 0.0F, 0.003101F, 0.008527F, 0.016279F, 0.005426F, 0.00155F, 0.013953F, 0.013953F, 0.044961F, 0.003101F, 0.004651F, 0.006977F, 0.00155F, 0.005426F, 0.012403F, 0.00155F, 0.015504F, 0.0F, 0.006202F, 0.00155F, 0.0F, 0.007752F, 0.006977F, 0.00155F, 0.009302F, 0.011628F, 0.004651F, 0.010853F, 0.012403F, 0.017829F, 0.005426F, 0.024806F, 0.0F, 0.006202F, 0.0F, 0.082171F, 0.015504F, 0.004651F, 0.0F, 0.006977F, 0.004651F, 0.0F, 0.008527F, 0.012403F, 0.004651F, 0.003876F, 0.003101F, 0.022481F, 0.024031F, 0.00155F, 0.047287F, 0.009302F, 0.00155F, 0.005426F, 0.017054F}; + mSecondByteStdDev = 0.014156F; + mSecondByteMean = 0.010638F; + mSecondByteWeight = 0.413467F; + } + } + + /** + * + */ + public static class nsGB2312Verifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsGB2312Verifier() { + cclass = new int[32]; + cclass[0] = 286331153; + cclass[1] = 1118481; + cclass[2] = 286331153; + cclass[3] = 286327057; + cclass[4] = 286331153; + cclass[5] = 286331153; + cclass[6] = 286331153; + cclass[7] = 286331153; + cclass[8] = 286331153; + cclass[9] = 286331153; + cclass[10] = 286331153; + cclass[11] = 286331153; + cclass[12] = 286331153; + cclass[13] = 286331153; + cclass[14] = 286331153; + cclass[15] = 286331153; + cclass[16] = 0; + cclass[17] = 0; + cclass[18] = 0; + cclass[19] = 0; + cclass[20] = 572662304; + cclass[21] = 858993442; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 572662306; + cclass[25] = 572662306; + cclass[26] = 572662306; + cclass[27] = 572662306; + cclass[28] = 572662306; + cclass[29] = 572662306; + cclass[30] = 572662306; + cclass[31] = 35791394; + states = new int[2]; + states[0] = 286331649; + states[1] = 1122850; + charset = "GB2312"; + stFactor = 4; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsGB18030Verifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsGB18030Verifier() { + cclass = new int[32]; + cclass[0] = 286331153; + cclass[1] = 1118481; + cclass[2] = 286331153; + cclass[3] = 286327057; + cclass[4] = 286331153; + cclass[5] = 286331153; + cclass[6] = 858993459; + cclass[7] = 286331187; + cclass[8] = 572662306; + cclass[9] = 572662306; + cclass[10] = 572662306; + cclass[11] = 572662306; + cclass[12] = 572662306; + cclass[13] = 572662306; + cclass[14] = 572662306; + cclass[15] = 1109533218; + cclass[16] = 1717986917; + cclass[17] = 1717986918; + cclass[18] = 1717986918; + cclass[19] = 1717986918; + cclass[20] = 1717986918; + cclass[21] = 1717986918; + cclass[22] = 1717986918; + cclass[23] = 1717986918; + cclass[24] = 1717986918; + cclass[25] = 1717986918; + cclass[26] = 1717986918; + cclass[27] = 1717986918; + cclass[28] = 1717986918; + cclass[29] = 1717986918; + cclass[30] = 1717986918; + cclass[31] = 107374182; + states = new int[6]; + states[0] = 318767105; + states[1] = 571543825; + states[2] = 17965602; + states[3] = 286326804; + states[4] = 303109393; + states[5] = 17; + charset = "GB18030"; + stFactor = 7; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsISO2022CNVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsISO2022CNVerifier() { + cclass = new int[32]; + cclass[0] = 2; + cclass[1] = 0; + cclass[2] = 0; + cclass[3] = 4096; + cclass[4] = 0; + cclass[5] = 48; + cclass[6] = 0; + cclass[7] = 0; + cclass[8] = 16384; + cclass[9] = 0; + cclass[10] = 0; + cclass[11] = 0; + cclass[12] = 0; + cclass[13] = 0; + cclass[14] = 0; + cclass[15] = 0; + cclass[16] = 572662306; + cclass[17] = 572662306; + cclass[18] = 572662306; + cclass[19] = 572662306; + cclass[20] = 572662306; + cclass[21] = 572662306; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 572662306; + cclass[25] = 572662306; + cclass[26] = 572662306; + cclass[27] = 572662306; + cclass[28] = 572662306; + cclass[29] = 572662306; + cclass[30] = 572662306; + cclass[31] = 572662306; + states = new int[8]; + states[0] = 304; + states[1] = 286331152; + states[2] = 572662289; + states[3] = 336663074; + states[4] = 286335249; + states[5] = 286331237; + states[6] = 286335249; + states[7] = 18944273; + charset = "ISO-2022-CN"; + stFactor = 9; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsISO2022JPVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsISO2022JPVerifier() { + cclass = new int[32]; + cclass[0] = 2; + cclass[1] = 570425344; + cclass[2] = 0; + cclass[3] = 4096; + cclass[4] = 458752; + cclass[5] = 3; + cclass[6] = 0; + cclass[7] = 0; + cclass[8] = 1030; + cclass[9] = 1280; + cclass[10] = 0; + cclass[11] = 0; + cclass[12] = 0; + cclass[13] = 0; + cclass[14] = 0; + cclass[15] = 0; + cclass[16] = 572662306; + cclass[17] = 572662306; + cclass[18] = 572662306; + cclass[19] = 572662306; + cclass[20] = 572662306; + cclass[21] = 572662306; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 572662306; + cclass[25] = 572662306; + cclass[26] = 572662306; + cclass[27] = 572662306; + cclass[28] = 572662306; + cclass[29] = 572662306; + cclass[30] = 572662306; + cclass[31] = 572662306; + states = new int[6]; + states[0] = 304; + states[1] = 286331153; + states[2] = 572662306; + states[3] = 1091653905; + states[4] = 303173905; + states[5] = 287445265; + charset = "ISO-2022-JP"; + stFactor = 8; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsISO2022KRVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsISO2022KRVerifier() { + cclass = new int[32]; + cclass[0] = 2; + cclass[1] = 0; + cclass[2] = 0; + cclass[3] = 4096; + cclass[4] = 196608; + cclass[5] = 64; + cclass[6] = 0; + cclass[7] = 0; + cclass[8] = 20480; + cclass[9] = 0; + cclass[10] = 0; + cclass[11] = 0; + cclass[12] = 0; + cclass[13] = 0; + cclass[14] = 0; + cclass[15] = 0; + cclass[16] = 572662306; + cclass[17] = 572662306; + cclass[18] = 572662306; + cclass[19] = 572662306; + cclass[20] = 572662306; + cclass[21] = 572662306; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 572662306; + cclass[25] = 572662306; + cclass[26] = 572662306; + cclass[27] = 572662306; + cclass[28] = 572662306; + cclass[29] = 572662306; + cclass[30] = 572662306; + cclass[31] = 572662306; + states = new int[5]; + states[0] = 285212976; + states[1] = 572657937; + states[2] = 289476898; + states[3] = 286593297; + states[4] = 8465; + charset = "ISO-2022-KR"; + stFactor = 6; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsUCS2BEVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsUCS2BEVerifier() { + cclass = new int[32]; + cclass[0] = 0; + cclass[1] = 2097408; + cclass[2] = 0; + cclass[3] = 12288; + cclass[4] = 0; + cclass[5] = 3355440; + cclass[6] = 0; + cclass[7] = 0; + cclass[8] = 0; + cclass[9] = 0; + cclass[10] = 0; + cclass[11] = 0; + cclass[12] = 0; + cclass[13] = 0; + cclass[14] = 0; + cclass[15] = 0; + cclass[16] = 0; + cclass[17] = 0; + cclass[18] = 0; + cclass[19] = 0; + cclass[20] = 0; + cclass[21] = 0; + cclass[22] = 0; + cclass[23] = 0; + cclass[24] = 0; + cclass[25] = 0; + cclass[26] = 0; + cclass[27] = 0; + cclass[28] = 0; + cclass[29] = 0; + cclass[30] = 0; + cclass[31] = 1409286144; + states = new int[7]; + states[0] = 288626549; + states[1] = 572657937; + states[2] = 291923490; + states[3] = 1713792614; + states[4] = 393569894; + states[5] = 1717659269; + states[6] = 1140326; + charset = "UTF-16BE"; + stFactor = 6; + } + + public boolean isUCS2() { + return true; + } + } + + /** + * + */ + public static class nsUCS2LEVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsUCS2LEVerifier() { + cclass = new int[32]; + cclass[0] = 0; + cclass[1] = 2097408; + cclass[2] = 0; + cclass[3] = 12288; + cclass[4] = 0; + cclass[5] = 3355440; + cclass[6] = 0; + cclass[7] = 0; + cclass[8] = 0; + cclass[9] = 0; + cclass[10] = 0; + cclass[11] = 0; + cclass[12] = 0; + cclass[13] = 0; + cclass[14] = 0; + cclass[15] = 0; + cclass[16] = 0; + cclass[17] = 0; + cclass[18] = 0; + cclass[19] = 0; + cclass[20] = 0; + cclass[21] = 0; + cclass[22] = 0; + cclass[23] = 0; + cclass[24] = 0; + cclass[25] = 0; + cclass[26] = 0; + cclass[27] = 0; + cclass[28] = 0; + cclass[29] = 0; + cclass[30] = 0; + cclass[31] = 1409286144; + states = new int[7]; + states[0] = 288647014; + states[1] = 572657937; + states[2] = 303387938; + states[3] = 1712657749; + states[4] = 357927015; + states[5] = 1427182933; + states[6] = 1381717; + charset = "UTF-16LE"; + stFactor = 6; + } + + public boolean isUCS2() { + return true; + } + } + + /** + * + */ + public static class nsCP1252Verifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsCP1252Verifier() { + cclass = new int[32]; + cclass[0] = 572662305; + cclass[1] = 2236962; + cclass[2] = 572662306; + cclass[3] = 572654114; + cclass[4] = 572662306; + cclass[5] = 572662306; + cclass[6] = 572662306; + cclass[7] = 572662306; + cclass[8] = 572662306; + cclass[9] = 572662306; + cclass[10] = 572662306; + cclass[11] = 572662306; + cclass[12] = 572662306; + cclass[13] = 572662306; + cclass[14] = 572662306; + cclass[15] = 572662306; + cclass[16] = 572662274; + cclass[17] = 16851234; + cclass[18] = 572662304; + cclass[19] = 285286690; + cclass[20] = 572662306; + cclass[21] = 572662306; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 286331153; + cclass[25] = 286331153; + cclass[26] = 554766609; + cclass[27] = 286331153; + cclass[28] = 286331153; + cclass[29] = 286331153; + cclass[30] = 554766609; + cclass[31] = 286331153; + states = new int[3]; + states[0] = 571543601; + states[1] = 340853778; + states[2] = 65; + charset = "windows-1252"; + stFactor = 3; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsHZVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsHZVerifier() { + cclass = new int[32]; + cclass[0] = 1; + cclass[1] = 0; + cclass[2] = 0; + cclass[3] = 4096; + cclass[4] = 0; + cclass[5] = 0; + cclass[6] = 0; + cclass[7] = 0; + cclass[8] = 0; + cclass[9] = 0; + cclass[10] = 0; + cclass[11] = 0; + cclass[12] = 0; + cclass[13] = 0; + cclass[14] = 0; + cclass[15] = 38813696; + cclass[16] = 286331153; + cclass[17] = 286331153; + cclass[18] = 286331153; + cclass[19] = 286331153; + cclass[20] = 286331153; + cclass[21] = 286331153; + cclass[22] = 286331153; + cclass[23] = 286331153; + cclass[24] = 286331153; + cclass[25] = 286331153; + cclass[26] = 286331153; + cclass[27] = 286331153; + cclass[28] = 286331153; + cclass[29] = 286331153; + cclass[30] = 286331153; + cclass[31] = 286331153; + states = new int[6]; + states[0] = 285213456; + states[1] = 572657937; + states[2] = 335548706; + states[3] = 341120533; + states[4] = 336872468; + states[5] = 36; + charset = "HZ-GB-2312"; + stFactor = 6; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsSJISVerifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsSJISVerifier() { + cclass = new int[32]; + cclass[0] = 286331152; + cclass[1] = 1118481; + cclass[2] = 286331153; + cclass[3] = 286327057; + cclass[4] = 286331153; + cclass[5] = 286331153; + cclass[6] = 286331153; + cclass[7] = 286331153; + cclass[8] = 572662306; + cclass[9] = 572662306; + cclass[10] = 572662306; + cclass[11] = 572662306; + cclass[12] = 572662306; + cclass[13] = 572662306; + cclass[14] = 572662306; + cclass[15] = 304226850; + cclass[16] = 858993459; + cclass[17] = 858993459; + cclass[18] = 858993459; + cclass[19] = 858993459; + cclass[20] = 572662308; + cclass[21] = 572662306; + cclass[22] = 572662306; + cclass[23] = 572662306; + cclass[24] = 572662306; + cclass[25] = 572662306; + cclass[26] = 572662306; + cclass[27] = 572662306; + cclass[28] = 858993459; + cclass[29] = 1145393971; + cclass[30] = 1145324612; + cclass[31] = 279620; + states = new int[3]; + states[0] = 286339073; + states[1] = 572657937; + states[2] = 4386; + charset = "Shift_JIS"; + stFactor = 6; + } + + public boolean isUCS2() { + return false; + } + } + + /** + * + */ + public static class nsUTF8Verifier extends nsVerifier { + static int[] cclass; + static int[] states; + static int stFactor; + static String charset; + + public int[] cclass() { + return cclass; + } + + public int[] states() { + return states; + } + + public int stFactor() { + return stFactor; + } + + public String charset() { + return charset; + } + + public nsUTF8Verifier() { + cclass = new int[32]; + cclass[0] = 286331153; + cclass[1] = 1118481; + cclass[2] = 286331153; + cclass[3] = 286327057; + cclass[4] = 286331153; + cclass[5] = 286331153; + cclass[6] = 286331153; + cclass[7] = 286331153; + cclass[8] = 286331153; + cclass[9] = 286331153; + cclass[10] = 286331153; + cclass[11] = 286331153; + cclass[12] = 286331153; + cclass[13] = 286331153; + cclass[14] = 286331153; + cclass[15] = 286331153; + cclass[16] = 858989090; + cclass[17] = 1145324612; + cclass[18] = 1145324612; + cclass[19] = 1145324612; + cclass[20] = 1431655765; + cclass[21] = 1431655765; + cclass[22] = 1431655765; + cclass[23] = 1431655765; + cclass[24] = 1717986816; + cclass[25] = 1717986918; + cclass[26] = 1717986918; + cclass[27] = 1717986918; + cclass[28] = -2004318073; + cclass[29] = -2003269496; + cclass[30] = -1145324614; + cclass[31] = 16702940; + states = new int[26]; + states[0] = -1408167679; + states[1] = 878082233; + states[2] = 286331153; + states[3] = 286331153; + states[4] = 572662306; + states[5] = 572662306; + states[6] = 290805009; + states[7] = 286331153; + states[8] = 290803985; + states[9] = 286331153; + states[10] = 293041937; + states[11] = 286331153; + states[12] = 293015825; + states[13] = 286331153; + states[14] = 295278865; + states[15] = 286331153; + states[16] = 294719761; + states[17] = 286331153; + states[18] = 298634257; + states[19] = 286331153; + states[20] = 297865489; + states[21] = 286331153; + states[22] = 287099921; + states[23] = 286331153; + states[24] = 285212689; + states[25] = 286331153; + charset = "UTF-8"; + stFactor = 16; + } + + public boolean isUCS2() { + return false; + } + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/utils/JSONUtil.java b/src/main/java/com/gxwebsoft/common/core/utils/JSONUtil.java new file mode 100644 index 0000000..7fa3f0f --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/utils/JSONUtil.java @@ -0,0 +1,69 @@ +package com.eleadmin.common.core.utils; + +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectWriter; + +/** + * JSON解析工具类 + * + * @author EleAdmin + * @since 2017-06-10 10:10:39 + */ +public class JSONUtil { + private static final ObjectMapper objectMapper = new ObjectMapper(); + private static final ObjectWriter objectWriter = objectMapper.writerWithDefaultPrettyPrinter(); + + /** + * 对象转json字符串 + * + * @param value 对象 + * @return String + */ + public static String toJSONString(Object value) { + return toJSONString(value, false); + } + + /** + * 对象转json字符串 + * + * @param value 对象 + * @param pretty 是否格式化输出 + * @return String + */ + public static String toJSONString(Object value, boolean pretty) { + if (value != null) { + if (value instanceof String) { + return (String) value; + } + try { + if (pretty) { + return objectWriter.writeValueAsString(value); + } + return objectMapper.writeValueAsString(value); + } catch (Exception e) { + e.printStackTrace(); + } + } + return null; + } + + /** + * json字符串转对象 + * + * @param json String + * @param clazz Class + * @return T + */ + public static T parseObject(String json, Class clazz) { + if (StrUtil.isNotBlank(json) && clazz != null) { + try { + return objectMapper.readValue(json, clazz); + } catch (Exception e) { + e.printStackTrace(); + } + } + return null; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/utils/OpenOfficeUtil.java b/src/main/java/com/gxwebsoft/common/core/utils/OpenOfficeUtil.java new file mode 100644 index 0000000..f54ebb5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/utils/OpenOfficeUtil.java @@ -0,0 +1,124 @@ +package com.eleadmin.common.core.utils; + +import cn.hutool.core.util.StrUtil; +import org.artofsolving.jodconverter.OfficeDocumentConverter; +import org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration; +import org.artofsolving.jodconverter.office.OfficeManager; + +import java.io.File; +import java.util.Arrays; +import java.util.Base64; + +/** + * OpenOfficeUtil + * + * @author EleAdmin + * @since 2018-12-14 08:38:19 + */ +public class OpenOfficeUtil { + // 支持转换pdf的文件后缀列表 + private static final String[] CAN_CONVERTER_FILES = new String[]{ + "doc", "docx", "xls", "xlsx", "ppt", "pptx" + }; + + /** + * 文件转pdf + * + * @param filePath 源文件路径 + * @param outDir 输出目录 + * @param officeHome OpenOffice安装路径 + * @return File + */ + public static File converterToPDF(String filePath, String outDir, String officeHome) { + return converterToPDF(filePath, outDir, officeHome, true); + } + + /** + * 文件转pdf + * + * @param filePath 源文件路径 + * @param outDir 输出目录 + * @param officeHome OpenOffice安装路径 + * @param cache 是否使用上次转换过的文件 + * @return File + */ + public static File converterToPDF(String filePath, String outDir, String officeHome, boolean cache) { + if (StrUtil.isBlank(filePath)) { + return null; + } + File srcFile = new File(filePath); + if (!srcFile.exists()) { + return null; + } + // 是否转换过 + String outPath = Base64.getEncoder().encodeToString(filePath.getBytes()) + .replace("/", "-").replace("+", "-"); + File outFile = new File(outDir, outPath + ".pdf"); + if (cache && outFile.exists()) { + return outFile; + } + // 转换 + OfficeManager officeManager = null; + try { + officeManager = getOfficeManager(officeHome); + OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager); + return converterFile(srcFile, outFile, converter); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (officeManager != null) { + officeManager.stop(); + } + } + return null; + } + + /** + * 转换文件 + * + * @param inFile 源文件 + * @param outFile 输出文件 + * @param converter OfficeDocumentConverter + * @return File + */ + public static File converterFile(File inFile, File outFile, OfficeDocumentConverter converter) { + if (!outFile.getParentFile().exists()) { + if (!outFile.getParentFile().mkdirs()) { + return outFile; + } + } + converter.convert(inFile, outFile); + return outFile; + } + + /** + * 判断文件后缀是否可以转换pdf + * + * @param path 文件路径 + * @return boolean + */ + public static boolean canConverter(String path) { + try { + String suffix = path.substring(path.lastIndexOf(".") + 1); + return Arrays.asList(CAN_CONVERTER_FILES).contains(suffix); + } catch (Exception e) { + return false; + } + } + + /** + * 连接并启动OpenOffice + * + * @param officeHome OpenOffice安装路径 + * @return OfficeManager + */ + public static OfficeManager getOfficeManager(String officeHome) { + if (officeHome == null || officeHome.trim().isEmpty()) return null; + DefaultOfficeManagerConfiguration config = new DefaultOfficeManagerConfiguration(); + config.setOfficeHome(officeHome); // 设置OpenOffice安装目录 + OfficeManager officeManager = config.buildOfficeManager(); + officeManager.start(); // 启动OpenOffice服务 + return officeManager; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/web/ApiResult.java b/src/main/java/com/gxwebsoft/common/core/web/ApiResult.java new file mode 100644 index 0000000..f95a55d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/ApiResult.java @@ -0,0 +1,88 @@ +package com.eleadmin.common.core.web; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + +/** + * 返回结果 + * + * @author EleAdmin + * @since 2017-06-10 10:10:50 + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ApiResult implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "状态码") + private Integer code; + + @ApiModelProperty(value = "状态信息") + private String message; + + @ApiModelProperty(value = "返回数据") + private T data; + + @ApiModelProperty(value = "错误信息") + private String error; + + public ApiResult() { + } + + public ApiResult(Integer code) { + this(code, null); + } + + public ApiResult(Integer code, String message) { + this(code, message, null); + } + + public ApiResult(Integer code, String message, T data) { + this(code, message, data, null); + } + + public ApiResult(Integer code, String message, T data, String error) { + setCode(code); + setMessage(message); + setData(data); + setError(error); + } + + public Integer getCode() { + return this.code; + } + + public ApiResult setCode(Integer code) { + this.code = code; + return this; + } + + public String getMessage() { + return this.message; + } + + public ApiResult setMessage(String message) { + this.message = message; + return this; + } + + public T getData() { + return this.data; + } + + public ApiResult setData(T data) { + this.data = data; + return this; + } + + public String getError() { + return this.error; + } + + public ApiResult setError(String error) { + this.error = error; + return this; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/web/BaseController.java b/src/main/java/com/gxwebsoft/common/core/web/BaseController.java new file mode 100644 index 0000000..ef0da8d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/BaseController.java @@ -0,0 +1,160 @@ +package com.eleadmin.common.core.web; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.system.entity.User; +import org.springframework.beans.propertyeditors.StringTrimmerEditor; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.InitBinder; + +import java.util.List; + +/** + * Controller基类 + * + * @author EleAdmin + * @since 2017-06-10 10:10:19 + */ +public class BaseController { + + /** + * 获取当前登录的user + * + * @return User + */ + public User getLoginUser() { + try { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + if (authentication != null) { + Object object = authentication.getPrincipal(); + if (object instanceof User) { + return (User) object; + } + } + } catch (Exception e) { + System.out.println(e.getMessage()); + } + return null; + } + + /** + * 获取当前登录的userId + * + * @return userId + */ + public Integer getLoginUserId() { + User loginUser = getLoginUser(); + return loginUser == null ? null : loginUser.getUserId(); + } + + /** + * 返回成功 + * + * @return ApiResult + */ + public ApiResult success() { + return new ApiResult<>(Constants.RESULT_OK_CODE, Constants.RESULT_OK_MSG); + } + + /** + * 返回成功 + * + * @param message 状态信息 + * @return ApiResult + */ + public ApiResult success(String message) { + return success().setMessage(message); + } + + /** + * 返回成功 + * + * @param data 返回数据 + * @return ApiResult + */ + public ApiResult success(T data) { + return new ApiResult<>(Constants.RESULT_OK_CODE, Constants.RESULT_OK_MSG, data); + } + + /** + * 返回成功 + * + * @param message 状态信息 + * @return ApiResult + */ + public ApiResult success(String message, T data) { + return success(data).setMessage(message); + } + + /** + * 返回分页查询数据 + * + * @param list 当前页数据 + * @param count 总数量 + * @return ApiResult + */ + public ApiResult> success(List list, Long count) { + return success(new PageResult<>(list, count)); + } + + /** + * 返回分页查询数据 + * + * @param iPage IPage + * @return ApiResult + */ + public ApiResult> success(IPage iPage) { + return success(iPage.getRecords(), iPage.getTotal()); + } + + /** + * 返回失败 + * + * @return ApiResult + */ + public ApiResult fail() { + return new ApiResult<>(Constants.RESULT_ERROR_CODE, Constants.RESULT_ERROR_MSG); + } + + /** + * 返回失败 + * + * @param message 状态信息 + * @return ApiResult + */ + public ApiResult fail(String message) { + return fail().setMessage(message); + } + + /** + * 返回失败 + * + * @param data 返回数据 + * @return ApiResult + */ + public ApiResult fail(T data) { + return fail(Constants.RESULT_ERROR_MSG, data); + } + + /** + * 返回失败 + * + * @param message 状态信息 + * @param data 返回数据 + * @return ApiResult + */ + public ApiResult fail(String message, T data) { + return new ApiResult<>(Constants.RESULT_ERROR_CODE, message, data); + } + + /** + * 请求参数的空字符串转为null + */ + @InitBinder + public void initBinder(WebDataBinder binder) { + binder.registerCustomEditor(String.class, new StringTrimmerEditor(true)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/web/BaseParam.java b/src/main/java/com/gxwebsoft/common/core/web/BaseParam.java new file mode 100644 index 0000000..03f3156 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/BaseParam.java @@ -0,0 +1,59 @@ +package com.eleadmin.common.core.web; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.utils.CommonUtil; +import lombok.Data; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.List; + +/** + * 查询参数基本字段 + * + * @author EleAdmin + * @since 2021-08-26 22:14:43 + */ +@Data +public class BaseParam implements Serializable { + private static final long serialVersionUID = 1L; + + @TableField(exist = false) + @ApiModelProperty("分页查询页码") + private Long page; + + @TableField(exist = false) + @ApiModelProperty("分页查询每页数量") + private Long limit; + + @TableField(exist = false) + @ApiModelProperty(value = "排序字段", notes = "排序字段或sql, 如果是sql则order字段无用, 如: `id asc, name desc`") + private String sort; + + @TableField(exist = false) + @ApiModelProperty(value = "排序方式", notes = "sort是字段名称时对应的排序方式, asc升序, desc降序") + private String order; + + @QueryField(value = "create_time", type = QueryType.GE) + @TableField(exist = false) + @ApiModelProperty("创建时间起始值") + private String createTimeStart; + + @QueryField(value = "create_time", type = QueryType.LE) + @TableField(exist = false) + @ApiModelProperty("创建时间结束值") + private String createTimeEnd; + + /** + * 获取集合中的第一条数据 + * + * @param records 集合 + * @return 第一条数据 + */ + public T getOne(List records) { + return CommonUtil.listGetOne(records); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/web/BatchParam.java b/src/main/java/com/gxwebsoft/common/core/web/BatchParam.java new file mode 100644 index 0000000..ed9e83e --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/BatchParam.java @@ -0,0 +1,57 @@ +package com.eleadmin.common.core.web; + +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; +import com.baomidou.mybatisplus.extension.service.IService; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 批量修改通用参数 + * + * @author EleAdmin + * @since 2020-03-13 00:11:06 + */ +@Data +public class BatchParam implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "需要修改的数据id集合") + private List ids; + + @ApiModelProperty(value = "需要修改的字段和值") + private T data; + + /** + * 通用批量修改方法 + * + * @param service IService + * @param idField id字段名称 + * @return boolean + */ + public boolean update(IService service, String idField) { + if (this.data == null) { + return false; + } + return service.update(this.data, new UpdateWrapper().in(idField, this.ids)); + } + + /** + * 通用批量修改方法 + * + * @param service IService + * @param idField id字段名称 + * @return boolean + */ + public boolean update(IService service, SFunction idField) { + if (this.data == null) { + return false; + } + return service.update(this.data, new LambdaUpdateWrapper().in(idField, this.ids)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/web/ExistenceParam.java b/src/main/java/com/gxwebsoft/common/core/web/ExistenceParam.java new file mode 100644 index 0000000..a4f9586 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/ExistenceParam.java @@ -0,0 +1,96 @@ +package com.eleadmin.common.core.web; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; +import com.baomidou.mybatisplus.extension.service.IService; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 检查是否存在通用参数 + * + * @author EleAdmin + * @since 2021-09-07 22:24:39 + */ +@Data +public class ExistenceParam implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "检查的字段") + private String field; + + @ApiModelProperty(value = "字段的值") + private String value; + + @ApiModelProperty(value = "修改时的主键") + private Integer id; + + /** + * 检查是否存在 + * + * @param service IService + * @param idField 修改时的主键字段 + * @return boolean + */ + public boolean isExistence(IService service, String idField) { + return isExistence(service, idField, true); + } + + /** + * 检查是否存在 + * + * @param service IService + * @param idField 修改时的主键字段 + * @param isToUnderlineCase 是否需要把field转为下划线格式 + * @return boolean + */ + public boolean isExistence(IService service, String idField, boolean isToUnderlineCase) { + if (StrUtil.hasBlank(this.field, this.value)) { + return false; + } + String fieldName = isToUnderlineCase ? StrUtil.toUnderlineCase(field) : field; + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(fieldName, value); + if (id != null) { + wrapper.ne(idField, id); + } + return service.count(wrapper) > 0; + } + + /** + * 检查是否存在 + * + * @param service IService + * @param idField 修改时的主键字段 + * @return boolean + */ + public boolean isExistence(IService service, SFunction idField) { + return isExistence(service, idField, true); + } + + /** + * 检查是否存在 + * + * @param service IService + * @param idField 修改时的主键字段 + * @param isToUnderlineCase 是否需要把field转为下划线格式 + * @return boolean + */ + public boolean isExistence(IService service, SFunction idField, boolean isToUnderlineCase) { + if (StrUtil.hasBlank(this.field, this.value)) { + return false; + } + String fieldName = isToUnderlineCase ? StrUtil.toUnderlineCase(field) : field; + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.apply(fieldName + " = {0}", value); + if (id != null) { + wrapper.ne(idField, id); + } + return service.count(wrapper) > 0; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/web/PageParam.java b/src/main/java/com/gxwebsoft/common/core/web/PageParam.java new file mode 100644 index 0000000..90e1270 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/PageParam.java @@ -0,0 +1,343 @@ +package com.eleadmin.common.core.web; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.ReflectUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.OrderItem; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.eleadmin.common.core.Constants; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.utils.CommonUtil; + +import java.lang.reflect.Field; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 分页、排序、搜索参数封装 + * + * @author EleAdmin + * @since 2019-04-26 10:34:35 + */ +public class PageParam extends Page { + private static final long serialVersionUID = 1L; + + /** + * 租户id字段名称 + */ + private static final String TENANT_ID_FIELD = "tenantId"; + + /** + * 查询条件 + */ + private final U where; + + /** + * 是否把字段名称驼峰转下划线 + */ + private final boolean isToUnderlineCase; + + public PageParam() { + this(null); + } + + public PageParam(U where) { + this(where, true); + } + + public PageParam(U where, boolean isToUnderlineCase) { + super(); + this.where = where; + this.isToUnderlineCase = isToUnderlineCase; + if (where != null) { + // 获取分页页码 + if (where.getPage() != null) { + setCurrent(where.getPage()); + } + // 获取分页每页数量 + if (where.getLimit() != null) { + setSize(where.getLimit()); + } + // 获取排序方式 + if (where.getSort() != null) { + if (sortIsSQL(where.getSort())) { + setOrders(parseOrderSQL(where.getSort())); + } else { + List orderItems = new ArrayList<>(); + String column = this.isToUnderlineCase ? StrUtil.toUnderlineCase(where.getSort()) : where.getSort(); + boolean asc = !Constants.ORDER_DESC_VALUE.equals(where.getOrder()); + orderItems.add(new OrderItem(column, asc)); + setOrders(orderItems); + } + } + } + } + + /** + * 排序字段是否是sql + */ + private boolean sortIsSQL(String sort) { + return sort != null && (sort.contains(",") || sort.trim().contains(" ")); + } + + /** + * 解析排序sql + */ + private List parseOrderSQL(String orderSQL) { + List orders = new ArrayList<>(); + if (StrUtil.isNotBlank(orderSQL)) { + for (String item : orderSQL.split(",")) { + String[] temp = item.trim().split(" "); + if (!temp[0].isEmpty()) { + String column = this.isToUnderlineCase ? StrUtil.toUnderlineCase(temp[0]) : temp[0]; + boolean asc = temp.length == 1 || !temp[temp.length - 1].equals(Constants.ORDER_DESC_VALUE); + orders.add(new OrderItem(column, asc)); + } + } + } + return orders; + } + + /** + * 设置默认排序方式 + * + * @param orderItems 排序方式 + * @return PageParam + */ + public PageParam setDefaultOrder(List orderItems) { + if (orders() == null || orders().size() == 0) { + setOrders(orderItems); + } + return this; + } + + /** + * 设置默认排序方式 + * + * @param orderSQL 排序方式 + * @return PageParam + */ + public PageParam setDefaultOrder(String orderSQL) { + setDefaultOrder(parseOrderSQL(orderSQL)); + return this; + } + + /** + * 获取查询条件 + * + * @param excludes 不包含的字段 + * @return QueryWrapper + */ + public QueryWrapper getWrapper(String... excludes) { + return buildWrapper(null, Arrays.asList(excludes)); + } + + /** + * 获取查询条件 + * + * @param columns 只包含的字段 + * @return QueryWrapper + */ + public QueryWrapper getWrapperWith(String... columns) { + return buildWrapper(Arrays.asList(columns), null); + } + + /** + * 构建QueryWrapper + * + * @param columns 包含的字段 + * @param excludes 排除的字段 + * @return QueryWrapper + */ + private QueryWrapper buildWrapper(List columns, List excludes) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + Map map = BeanUtil.beanToMap(where, false, true); + for (String fieldName : map.keySet()) { + Object fieldValue = map.get(fieldName); + Field field = ReflectUtil.getField(where.getClass(), fieldName); + + // 过滤不包含的字段 + if (columns != null && !columns.contains(fieldName)) { + continue; + } + + // 过滤排除的字段 + if (excludes != null && excludes.contains(fieldName)) { + continue; + } + + // 过滤逻辑删除字段 + if (field.getAnnotation(TableLogic.class) != null) { + continue; + } + + // 过滤租户id字段 + if (fieldName.equals(TENANT_ID_FIELD)) { + continue; + } + + // 获取注解指定的查询字段及查询方式 + QueryType queryType = QueryType.LIKE; + QueryField queryField = field.getAnnotation(QueryField.class); + if (queryField != null) { + if (StrUtil.isNotEmpty(queryField.value())) { + fieldName = queryField.value(); + } + if (queryField.type() != null) { + queryType = queryField.type(); + } + } else { + // 过滤非本表的字段 + TableField tableField = field.getAnnotation(TableField.class); + if (tableField != null && !tableField.exist()) { + continue; + } + } + + // 字段名驼峰转下划线 + if (this.isToUnderlineCase) { + fieldName = StrUtil.toUnderlineCase(fieldName); + } + + // + switch (queryType) { + case EQ: + queryWrapper.eq(fieldName, fieldValue); + break; + case NE: + queryWrapper.ne(fieldName, fieldValue); + break; + case GT: + queryWrapper.gt(fieldName, fieldValue); + break; + case GE: + queryWrapper.ge(fieldName, fieldValue); + break; + case LT: + queryWrapper.lt(fieldName, fieldValue); + break; + case LE: + queryWrapper.le(fieldName, fieldValue); + break; + case LIKE: + queryWrapper.like(fieldName, fieldValue); + break; + case NOT_LIKE: + queryWrapper.notLike(fieldName, fieldValue); + break; + case LIKE_LEFT: + queryWrapper.likeLeft(fieldName, fieldValue); + break; + case LIKE_RIGHT: + queryWrapper.likeRight(fieldName, fieldValue); + break; + case IS_NULL: + queryWrapper.isNull(fieldName); + break; + case IS_NOT_NULL: + queryWrapper.isNotNull(fieldName); + break; + case IN: + queryWrapper.in(fieldName, fieldValue); + break; + case NOT_IN: + queryWrapper.notIn(fieldName, fieldValue); + break; + case IN_STR: + if (fieldValue instanceof String) { + queryWrapper.in(fieldName, Arrays.asList(((String) fieldValue).split(","))); + } + break; + case NOT_IN_STR: + if (fieldValue instanceof String) { + queryWrapper.notIn(fieldName, Arrays.asList(((String) fieldValue).split(","))); + } + break; + } + } + return queryWrapper; + } + + /** + * 获取包含排序的查询条件 + * + * @return 包含排序的QueryWrapper + */ + public QueryWrapper getOrderWrapper() { + return getOrderWrapper(getWrapper()); + } + + /** + * 获取包含排序的查询条件 + * + * @param queryWrapper 不含排序的QueryWrapper + * @return 包含排序的QueryWrapper + */ + public QueryWrapper getOrderWrapper(QueryWrapper queryWrapper) { + if (queryWrapper == null) { + queryWrapper = new QueryWrapper<>(); + } + for (OrderItem orderItem : orders()) { + if (orderItem.isAsc()) { + queryWrapper.orderByAsc(orderItem.getColumn()); + } else { + queryWrapper.orderByDesc(orderItem.getColumn()); + } + } + return queryWrapper; + } + + /** + * 获取集合中的第一条数据 + * + * @param records 集合 + * @return 第一条数据 + */ + public T getOne(List records) { + return CommonUtil.listGetOne(records); + } + + /** + * 代码排序集合 + * + * @param records 集合 + * @return 排序后的集合 + */ + public List sortRecords(List records) { + List orderItems = orders(); + if (records == null || records.size() < 2 || orderItems == null || orderItems.size() == 0) { + return records; + } + Comparator comparator = null; + for (OrderItem item : orderItems) { + if (item.getColumn() == null) { + continue; + } + String field = this.isToUnderlineCase ? StrUtil.toCamelCase(item.getColumn()) : item.getColumn(); + Function keyExtractor = t -> ReflectUtil.getFieldValue(t, field); + if (comparator == null) { + if (item.isAsc()) { + comparator = Comparator.comparing(keyExtractor); + } else { + comparator = Comparator.comparing(keyExtractor, Comparator.reverseOrder()); + } + } else { + if (item.isAsc()) { + comparator.thenComparing(keyExtractor); + } else { + comparator.thenComparing(keyExtractor, Comparator.reverseOrder()); + } + } + } + if (comparator != null) { + return records.stream().sorted(comparator).collect(Collectors.toList()); + } + return records; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/core/web/PageResult.java b/src/main/java/com/gxwebsoft/common/core/web/PageResult.java new file mode 100644 index 0000000..35f7b91 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/core/web/PageResult.java @@ -0,0 +1,51 @@ +package com.eleadmin.common.core.web; + +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.List; + +/** + * 分页查询返回结果 + * + * @author EleAdmin + * @since 2017-06-10 10:10:02 + */ +public class PageResult implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "当前页数据") + private List list; + + @ApiModelProperty(value = "总数量") + private Long count; + + public PageResult() { + } + + public PageResult(List list) { + this(list, null); + } + + public PageResult(List list, Long count) { + setList(list); + setCount(count); + } + + public List getList() { + return this.list; + } + + public void setList(List list) { + this.list = list; + } + + public Long getCount() { + return this.count; + } + + public void setCount(Long count) { + this.count = count; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/DictionaryController.java b/src/main/java/com/gxwebsoft/common/system/controller/DictionaryController.java new file mode 100644 index 0000000..08aede6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/DictionaryController.java @@ -0,0 +1,152 @@ +package com.eleadmin.common.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.core.web.*; +import com.eleadmin.common.system.entity.Dictionary; +import com.eleadmin.common.system.param.DictionaryParam; +import com.eleadmin.common.system.service.DictionaryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 字典控制器 + * + * @author EleAdmin + * @since 2020-03-14 11:29:03 + */ +@Api(tags = "字典管理") +@RestController +@RequestMapping("/api/system/dictionary") +public class DictionaryController extends BaseController { + @Resource + private DictionaryService dictionaryService; + + @PreAuthorize("hasAuthority('sys:dict:list')") + @OperationLog + @ApiOperation("分页查询字典") + @GetMapping("/page") + public ApiResult> page(DictionaryParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return success(dictionaryService.page(page, page.getWrapper())); + } + + @PreAuthorize("hasAuthority('sys:dict:list')") + @OperationLog + @ApiOperation("查询全部字典") + @GetMapping() + public ApiResult> list(DictionaryParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return success(dictionaryService.list(page.getOrderWrapper())); + } + + @PreAuthorize("hasAuthority('sys:dict:list')") + @OperationLog + @ApiOperation("根据id查询字典") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(dictionaryService.getById(id)); + } + + @PreAuthorize("hasAuthority('sys:dict:save')") + @ApiOperation("添加字典") + @PostMapping() + public ApiResult add(@RequestBody Dictionary dictionary) { + if (dictionaryService.count(new LambdaQueryWrapper() + .eq(Dictionary::getDictCode, dictionary.getDictCode())) > 0) { + return fail("字典标识已存在"); + } + if (dictionaryService.count(new LambdaQueryWrapper() + .eq(Dictionary::getDictName, dictionary.getDictName())) > 0) { + return fail("字典名称已存在"); + } + if (dictionaryService.save(dictionary)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:dict:update')") + @OperationLog + @ApiOperation("修改字典") + @PutMapping() + public ApiResult update(@RequestBody Dictionary dictionary) { + if (dictionaryService.count(new LambdaQueryWrapper() + .eq(Dictionary::getDictCode, dictionary.getDictCode()) + .ne(Dictionary::getDictId, dictionary.getDictId())) > 0) { + return fail("字典标识已存在"); + } + if (dictionaryService.count(new LambdaQueryWrapper() + .eq(Dictionary::getDictName, dictionary.getDictName()) + .ne(Dictionary::getDictId, dictionary.getDictId())) > 0) { + return fail("字典名称已存在"); + } + if (dictionaryService.updateById(dictionary)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:dict:remove')") + @OperationLog + @ApiOperation("删除字典") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (dictionaryService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:dict:save')") + @OperationLog + @ApiOperation("批量添加字典") + @PostMapping("/batch") + public ApiResult> saveBatch(@RequestBody List list) { + if (CommonUtil.checkRepeat(list, Dictionary::getDictCode)) { + return fail("字典标识不能重复", null); + } + if (CommonUtil.checkRepeat(list, Dictionary::getDictName)) { + return fail("字典名称不能重复", null); + } + List codeExists = dictionaryService.list(new LambdaQueryWrapper() + .in(Dictionary::getDictCode, list.stream().map(Dictionary::getDictCode) + .collect(Collectors.toList()))); + if (codeExists.size() > 0) { + return fail("字典标识已存在", codeExists.stream().map(Dictionary::getDictCode) + .collect(Collectors.toList())).setCode(2); + } + List nameExists = dictionaryService.list(new LambdaQueryWrapper() + .in(Dictionary::getDictName, list.stream().map(Dictionary::getDictCode) + .collect(Collectors.toList()))); + if (nameExists.size() > 0) { + return fail("字典名称已存在", nameExists.stream().map(Dictionary::getDictName) + .collect(Collectors.toList())).setCode(3); + } + if (dictionaryService.saveBatch(list)) { + return success("添加成功", null); + } + return fail("添加失败", null); + } + + @PreAuthorize("hasAuthority('sys:dict:remove')") + @OperationLog + @ApiOperation("批量删除字典") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (dictionaryService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/DictionaryDataController.java b/src/main/java/com/gxwebsoft/common/system/controller/DictionaryDataController.java new file mode 100644 index 0000000..ad4e2a6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/DictionaryDataController.java @@ -0,0 +1,131 @@ +package com.eleadmin.common.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.web.*; +import com.eleadmin.common.system.entity.DictionaryData; +import com.eleadmin.common.system.param.DictionaryDataParam; +import com.eleadmin.common.system.service.DictionaryDataService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 字典数据控制器 + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +@Api(tags = "字典数据管理") +@RestController +@RequestMapping("/api/system/dictionary-data") +public class DictionaryDataController extends BaseController { + @Resource + private DictionaryDataService dictionaryDataService; + + @PreAuthorize("hasAuthority('sys:dict:list')") + @OperationLog + @ApiOperation("分页查询字典数据") + @GetMapping("/page") + public ApiResult> page(DictionaryDataParam param) { + return success(dictionaryDataService.pageRel(param)); + } + + @PreAuthorize("hasAuthority('sys:dict:list')") + @OperationLog + @ApiOperation("查询全部字典数据") + @GetMapping() + public ApiResult> list(DictionaryDataParam param) { + return success(dictionaryDataService.listRel(param)); + } + + @PreAuthorize("hasAuthority('sys:dict:list')") + @OperationLog + @ApiOperation("根据id查询字典数据") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(dictionaryDataService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('sys:dict:save')") + @OperationLog + @ApiOperation("添加字典数据") + @PostMapping() + public ApiResult add(@RequestBody DictionaryData dictionaryData) { + if (dictionaryDataService.count(new LambdaQueryWrapper() + .eq(DictionaryData::getDictId, dictionaryData.getDictId()) + .eq(DictionaryData::getDictDataName, dictionaryData.getDictDataName())) > 0) { + return fail("字典数据名称已存在"); + } + if (dictionaryDataService.count(new LambdaQueryWrapper() + .eq(DictionaryData::getDictId, dictionaryData.getDictId()) + .eq(DictionaryData::getDictDataCode, dictionaryData.getDictDataCode())) > 0) { + return fail("字典数据标识已存在"); + } + if (dictionaryDataService.save(dictionaryData)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:dict:update')") + @OperationLog + @ApiOperation("修改字典数据") + @PutMapping() + public ApiResult update(@RequestBody DictionaryData dictionaryData) { + if (dictionaryDataService.count(new LambdaQueryWrapper() + .eq(DictionaryData::getDictId, dictionaryData.getDictId()) + .eq(DictionaryData::getDictDataName, dictionaryData.getDictDataName()) + .ne(DictionaryData::getDictDataId, dictionaryData.getDictDataId())) > 0) { + return fail("字典数据名称已存在"); + } + if (dictionaryDataService.count(new LambdaQueryWrapper() + .eq(DictionaryData::getDictId, dictionaryData.getDictId()) + .eq(DictionaryData::getDictDataCode, dictionaryData.getDictDataCode()) + .ne(DictionaryData::getDictDataId, dictionaryData.getDictDataId())) > 0) { + return fail("字典数据标识已存在"); + } + if (dictionaryDataService.updateById(dictionaryData)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:dict:remove')") + @OperationLog + @ApiOperation("删除字典数据") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (dictionaryDataService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:dict:save')") + @OperationLog + @ApiOperation("批量添加字典数据") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List dictDataList) { + if (dictionaryDataService.saveBatch(dictDataList)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:dict:remove')") + @OperationLog + @ApiOperation("批量删除字典数据") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (dictionaryDataService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/EmailController.java b/src/main/java/com/gxwebsoft/common/system/controller/EmailController.java new file mode 100644 index 0000000..3346fa2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/EmailController.java @@ -0,0 +1,49 @@ +package com.eleadmin.common.system.controller; + +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.system.entity.EmailRecord; +import com.eleadmin.common.system.service.EmailRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.mail.MessagingException; + +/** + * 邮件功能控制器 + * + * @author EleAdmin + * @since 2020-03-21 00:37:11 + */ +@Api(tags = "邮件功能") +@RestController +@RequestMapping("/api/system/email") +public class EmailController extends BaseController { + @Resource + private EmailRecordService emailRecordService; + + @PreAuthorize("hasAuthority('sys:email:send')") + @OperationLog + @ApiOperation("发送邮件") + @PostMapping() + public ApiResult send(@RequestBody EmailRecord emailRecord) { + try { + emailRecordService.sendFullTextEmail(emailRecord.getTitle(), emailRecord.getContent(), + emailRecord.getReceiver().split(",")); + emailRecord.setCreateUserId(getLoginUserId()); + emailRecordService.save(emailRecord); + return success("发送成功"); + } catch (MessagingException e) { + e.printStackTrace(); + } + return fail("发送失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/FileController.java b/src/main/java/com/gxwebsoft/common/system/controller/FileController.java new file mode 100644 index 0000000..b3fd871 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/FileController.java @@ -0,0 +1,242 @@ +package com.eleadmin.common.system.controller; + +import cn.hutool.core.util.StrUtil; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.config.ConfigProperties; +import com.eleadmin.common.core.utils.FileServerUtil; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.FileRecord; +import com.eleadmin.common.system.param.FileRecordParam; +import com.eleadmin.common.system.service.FileRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * 文件上传下载控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:24 + */ +@Api(tags = "文件上传下载") +@RestController +@RequestMapping("/api/file") +public class FileController extends BaseController { + @Resource + private ConfigProperties config; + @Resource + private FileRecordService fileRecordService; + + @PreAuthorize("hasAuthority('sys:file:upload')") + @OperationLog + @ApiOperation("上传文件") + @PostMapping("/upload") + public ApiResult upload(@RequestParam MultipartFile file, HttpServletRequest request) { + FileRecord result = null; + try { + String dir = getUploadDir(); + File upload = FileServerUtil.upload(file, dir, config.getUploadUuidName()); + String path = upload.getAbsolutePath().replace("\\", "/").substring(dir.length() - 1); + String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/upload"); + String originalName = file.getOriginalFilename(); + result = new FileRecord(); + result.setCreateUserId(getLoginUserId()); + result.setName(StrUtil.isBlank(originalName) ? upload.getName() : originalName); + result.setLength(upload.length()); + result.setPath(path); + result.setUrl(requestURL + "/" + path); + String contentType = FileServerUtil.getContentType(upload); + result.setContentType(contentType); + if (FileServerUtil.isImage(contentType)) { + result.setThumbnail(requestURL + "/thumbnail/" + path); + } + result.setDownloadUrl(requestURL + "/download/" + path); + fileRecordService.save(result); + return success(result); + } catch (Exception e) { + e.printStackTrace(); + return fail("上传失败", result).setError(e.toString()); + } + } + + @PreAuthorize("hasAuthority('sys:file:upload')") + @OperationLog + @ApiOperation("上传base64文件") + @ApiImplicitParams({ + @ApiImplicitParam(name = "base64", value = "base64", required = true, dataType = "string"), + @ApiImplicitParam(name = "fileName", value = "文件名称", dataType = "string") + }) + @PostMapping("/upload/base64") + public ApiResult uploadBase64(String base64, String fileName, HttpServletRequest request) { + FileRecord result = null; + try { + String dir = getUploadDir(); + File upload = FileServerUtil.upload(base64, fileName, getUploadDir()); + String path = upload.getAbsolutePath().substring(dir.length()).replace("\\", "/"); + String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/upload/base64"); + result = new FileRecord(); + result.setCreateUserId(getLoginUserId()); + result.setName(StrUtil.isBlank(fileName) ? upload.getName() : fileName); + result.setLength(upload.length()); + result.setPath(path); + result.setUrl(requestURL + path); + result.setThumbnail(FileServerUtil.isImage(upload) ? (requestURL + "/thumbnail" + path) : null); + fileRecordService.save(result); + return success(result); + } catch (Exception e) { + e.printStackTrace(); + return fail("上传失败", result).setError(e.toString()); + } + } + + @ApiOperation("查看原文件") + @GetMapping("/{dir}/{name:.+}") + public void preview(@PathVariable("dir") String dir, @PathVariable("name") String name, + HttpServletResponse response, HttpServletRequest request) { + File file = new File(getUploadDir(), dir + "/" + name); + FileServerUtil.preview(file, getPdfOutDir(), config.getOpenOfficeHome(), response, request); + } + + @ApiOperation("下载原文件") + @GetMapping("/download/{dir}/{name:.+}") + public void download(@PathVariable("dir") String dir, @PathVariable("name") String name, + HttpServletResponse response, HttpServletRequest request) { + String path = dir + "/" + name; + FileRecord record = fileRecordService.getByIdPath(path); + File file = new File(getUploadDir(), path); + String fileName = record == null ? file.getName() : record.getName(); + FileServerUtil.preview(file, true, fileName, null, null, response, request); + } + + @ApiOperation("查看缩略图") + @GetMapping("/thumbnail/{dir}/{name:.+}") + public void thumbnail(@PathVariable("dir") String dir, @PathVariable("name") String name, + HttpServletResponse response, HttpServletRequest request) { + File file = new File(getUploadDir(), dir + "/" + name); + File thumbnail = new File(getUploadSmDir(), dir + "/" + name); + FileServerUtil.previewThumbnail(file, thumbnail, config.getThumbnailSize(), response, request); + } + + @PreAuthorize("hasAuthority('sys:file:remove')") + @OperationLog + @ApiOperation("删除文件") + @DeleteMapping("/remove/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + FileRecord record = fileRecordService.getById(id); + if (fileRecordService.removeById(id)) { + if (StrUtil.isNotBlank(record.getPath())) { + fileRecordService.deleteFileAsync(Arrays.asList( + new File(getUploadDir(), record.getPath()), + new File(getUploadSmDir(), record.getPath()) + )); + } + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:file:remove')") + @OperationLog + @ApiOperation("批量删除文件") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "id数组", required = true, dataType = "string") + }) + @DeleteMapping("/remove/batch") + public ApiResult deleteBatch(@RequestBody List ids) { + List fileRecords = fileRecordService.listByIds(ids); + if (fileRecordService.removeByIds(ids)) { + List files = new ArrayList<>(); + for (FileRecord record : fileRecords) { + if (StrUtil.isNotBlank(record.getPath())) { + files.add(new File(getUploadDir(), record.getPath())); + files.add(new File(getUploadSmDir(), record.getPath())); + } + } + fileRecordService.deleteFileAsync(files); + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:file:list')") + @OperationLog + @ApiOperation("分页查询文件") + @GetMapping("/page") + public ApiResult> page(FileRecordParam param, HttpServletRequest request) { + PageResult result = fileRecordService.pageRel(param); + String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/page"); + for (FileRecord record : result.getList()) { + if (StrUtil.isNotBlank(record.getPath())) { + record.setUrl(requestURL + "/" + record.getPath()); + if (FileServerUtil.isImage(record.getContentType())) { + record.setThumbnail(requestURL + "/thumbnail/" + record.getPath()); + } + record.setDownloadUrl(requestURL + "/download/" + record.getPath()); + } + } + return success(result); + } + + @PreAuthorize("hasAuthority('sys:file:list')") + @OperationLog + @ApiOperation("查询全部文件") + @GetMapping("/list") + public ApiResult> list(FileRecordParam param, HttpServletRequest request) { + List records = fileRecordService.listRel(param); + String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/list"); + for (FileRecord record : records) { + if (StrUtil.isNotBlank(record.getPath())) { + record.setUrl(requestURL + "/" + record.getPath()); + if (FileServerUtil.isImage(record.getContentType())) { + record.setThumbnail(requestURL + "/thumbnail/" + record.getPath()); + } + record.setDownloadUrl(requestURL + "/download/" + record.getPath()); + } + } + return success(records); + } + + /** + * 文件上传基目录 + */ + private String getUploadBaseDir() { + return File.listRoots()[config.getUploadLocation()].getAbsolutePath() + .replace("\\", "/") + "/upload/"; + } + + /** + * 文件上传位置 + */ + private String getUploadDir() { + return getUploadBaseDir() + "file/"; + } + + /** + * 缩略图生成位置 + */ + private String getUploadSmDir() { + return getUploadBaseDir() + "thumbnail/"; + } + + /** + * office转pdf输出位置 + */ + private String getPdfOutDir() { + return getUploadBaseDir() + "pdf/"; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/LoginRecordController.java b/src/main/java/com/gxwebsoft/common/system/controller/LoginRecordController.java new file mode 100644 index 0000000..fa1a971 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/LoginRecordController.java @@ -0,0 +1,58 @@ +package com.eleadmin.common.system.controller; + +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.LoginRecord; +import com.eleadmin.common.system.param.LoginRecordParam; +import com.eleadmin.common.system.service.LoginRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 登录日志控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:31 + */ +@Api(tags = "登录日志") +@RestController +@RequestMapping("/api/system/login-record") +public class LoginRecordController extends BaseController { + @Resource + private LoginRecordService loginRecordService; + + @PreAuthorize("hasAuthority('sys:login-record:list')") + @OperationLog + @ApiOperation("分页查询登录日志") + @GetMapping("/page") + public ApiResult> page(LoginRecordParam param) { + return success(loginRecordService.pageRel(param)); + } + + @PreAuthorize("hasAuthority('sys:login-record:list')") + @OperationLog + @ApiOperation("查询全部登录日志") + @GetMapping() + public ApiResult> list(LoginRecordParam param) { + return success(loginRecordService.listRel(param)); + } + + @PreAuthorize("hasAuthority('sys:login-record:list')") + @OperationLog + @ApiOperation("根据id查询登录日志") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(loginRecordService.getByIdRel(id)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/MainController.java b/src/main/java/com/gxwebsoft/common/system/controller/MainController.java new file mode 100644 index 0000000..4c60e70 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/MainController.java @@ -0,0 +1,140 @@ +package com.eleadmin.common.system.controller; + +import cn.hutool.core.util.StrUtil; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.config.ConfigProperties; +import com.eleadmin.common.core.security.JwtSubject; +import com.eleadmin.common.core.security.JwtUtil; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.system.entity.LoginRecord; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.entity.User; +import com.eleadmin.common.system.result.CaptchaResult; +import com.eleadmin.common.system.param.LoginParam; +import com.eleadmin.common.system.result.LoginResult; +import com.eleadmin.common.system.param.UpdatePasswordParam; +import com.eleadmin.common.system.service.LoginRecordService; +import com.eleadmin.common.system.service.RoleMenuService; +import com.eleadmin.common.system.service.UserService; +import com.wf.captcha.SpecCaptcha; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.*; + +/** + * 登录认证控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:11 + */ +@Api(tags = "登录认证") +@RestController +@RequestMapping("/api") +public class MainController extends BaseController { + @Resource + private ConfigProperties configProperties; + @Resource + private UserService userService; + @Resource + private RoleMenuService roleMenuService; + @Resource + private LoginRecordService loginRecordService; + + @ApiOperation("用户登录") + @PostMapping("/login") + public ApiResult login(@RequestBody LoginParam param, HttpServletRequest request) { + String username = param.getUsername(); + Integer tenantId = param.getTenantId(); + User user = userService.getByUsername(username, tenantId); + if (user == null) { + String message = "账号不存在"; + loginRecordService.saveAsync(username, LoginRecord.TYPE_ERROR, message, tenantId, request); + return fail(message, null); + } + if (!user.getStatus().equals(0)) { + String message = "账号被冻结"; + loginRecordService.saveAsync(username, LoginRecord.TYPE_ERROR, message, tenantId, request); + return fail(message, null); + } + if (!userService.comparePassword(user.getPassword(), param.getPassword())) { + String message = "密码错误"; + loginRecordService.saveAsync(username, LoginRecord.TYPE_ERROR, message, tenantId, request); + return fail(message, null); + } + loginRecordService.saveAsync(username, LoginRecord.TYPE_LOGIN, null, tenantId, request); + // 签发token + String access_token = JwtUtil.buildToken(new JwtSubject(username, tenantId), + configProperties.getTokenExpireTime(), configProperties.getTokenKey()); + return success("登录成功", new LoginResult(access_token, user)); + } + + @ApiOperation("获取登录用户信息") + @GetMapping("/auth/user") + public ApiResult userInfo() { + return success(userService.getByIdRel(getLoginUserId())); + } + + @ApiOperation("获取登录用户菜单") + @GetMapping("/auth/menu") + public ApiResult> userMenu() { + List menus = roleMenuService.listMenuByUserId(getLoginUserId(), Menu.TYPE_MENU); + return success(CommonUtil.toTreeData(menus, 0, Menu::getParentId, Menu::getMenuId, Menu::setChildren)); + } + + @PreAuthorize("hasAuthority('sys:auth:user')") + @OperationLog + @ApiOperation("修改个人信息") + @PutMapping("/auth/user") + public ApiResult updateInfo(@RequestBody User user) { + user.setUserId(getLoginUserId()); + // 不能修改的字段 + user.setUsername(null); + user.setPassword(null); + user.setEmailVerified(null); + user.setOrganizationId(null); + user.setStatus(null); + if (userService.updateById(user)) { + return success(userService.getByIdRel(user.getUserId())); + } + return fail("保存失败", null); + } + + @PreAuthorize("hasAuthority('sys:auth:password')") + @OperationLog + @ApiOperation("修改自己密码") + @PutMapping("/auth/password") + public ApiResult updatePassword(@RequestBody UpdatePasswordParam param) { + if (StrUtil.hasBlank(param.getOldPassword(), param.getPassword())) { + return fail("参数不能为空"); + } + Integer userId = getLoginUserId(); + if (userId == null) { + return fail("未登录"); + } + if (!userService.comparePassword(userService.getById(userId).getPassword(), param.getOldPassword())) { + return fail("原密码输入不正确"); + } + User user = new User(); + user.setUserId(userId); + user.setPassword(userService.encodePassword(param.getPassword())); + if (userService.updateById(user)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("图形验证码") + @GetMapping("/captcha") + public ApiResult captcha() { + SpecCaptcha specCaptcha = new SpecCaptcha(130, 48, 5); + return success(new CaptchaResult(specCaptcha.toBase64(), specCaptcha.text().toLowerCase())); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/MenuController.java b/src/main/java/com/gxwebsoft/common/system/controller/MenuController.java new file mode 100644 index 0000000..a3ddd9d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/MenuController.java @@ -0,0 +1,126 @@ +package com.eleadmin.common.system.controller; + +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.web.*; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.param.MenuParam; +import com.eleadmin.common.system.service.MenuService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 菜单控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:23 + */ +@Api(tags = "菜单管理") +@RestController +@RequestMapping("/api/system/menu") +public class MenuController extends BaseController { + @Resource + private MenuService menuService; + + @PreAuthorize("hasAuthority('sys:menu:list')") + @OperationLog + @ApiOperation("分页查询菜单") + @GetMapping("/page") + public ApiResult> page(MenuParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return success(menuService.page(page, page.getWrapper())); + } + + @PreAuthorize("hasAuthority('sys:menu:list')") + @OperationLog + @ApiOperation("查询全部菜单") + @GetMapping() + public ApiResult> list(MenuParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return success(menuService.list(page.getOrderWrapper())); + } + + @PreAuthorize("hasAuthority('sys:menu:list')") + @OperationLog + @ApiOperation("根据id查询菜单") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(menuService.getById(id)); + } + + @PreAuthorize("hasAuthority('sys:menu:save')") + @OperationLog + @ApiOperation("添加菜单") + @PostMapping() + public ApiResult add(@RequestBody Menu menu) { + if (menu.getParentId() == null) { + menu.setParentId(0); + } + if (menuService.save(menu)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:menu:update')") + @OperationLog + @ApiOperation("修改菜单") + @PutMapping() + public ApiResult update(@RequestBody Menu menu) { + if (menuService.updateById(menu)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:menu:remove')") + @OperationLog + @ApiOperation("删除菜单") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (menuService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:menu:save')") + @OperationLog + @ApiOperation("批量添加菜单") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List menus) { + if (menuService.saveBatch(menus)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:menu:update')") + @OperationLog + @ApiOperation("批量修改菜单") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(menuService, "menu_id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:menu:remove')") + @OperationLog + @ApiOperation("批量删除菜单") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (menuService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/OperationRecordController.java b/src/main/java/com/gxwebsoft/common/system/controller/OperationRecordController.java new file mode 100644 index 0000000..b399664 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/OperationRecordController.java @@ -0,0 +1,62 @@ +package com.eleadmin.common.system.controller; + +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.OperationRecord; +import com.eleadmin.common.system.param.OperationRecordParam; +import com.eleadmin.common.system.service.OperationRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 操作日志控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:12 + */ +@Api(tags = "操作日志") +@RestController +@RequestMapping("/api/system/operation-record") +public class OperationRecordController extends BaseController { + @Resource + private OperationRecordService operationRecordService; + + /** + * 分页查询操作日志 + */ + @PreAuthorize("hasAuthority('sys:operation-record:list')") + @ApiOperation("分页查询操作日志") + @GetMapping("/page") + public ApiResult> page(OperationRecordParam param) { + return success(operationRecordService.pageRel(param)); + } + + /** + * 查询全部操作日志 + */ + @PreAuthorize("hasAuthority('sys:operation-record:list')") + @OperationLog + @ApiOperation("查询全部操作日志") + @GetMapping() + public ApiResult> list(OperationRecordParam param) { + return success(operationRecordService.listRel(param)); + } + + /** + * 根据id查询操作日志 + */ + @PreAuthorize("hasAuthority('sys:operation-record:list')") + @ApiOperation("根据id查询操作日志") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(operationRecordService.getByIdRel(id)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/OrganizationController.java b/src/main/java/com/gxwebsoft/common/system/controller/OrganizationController.java new file mode 100644 index 0000000..21dec4b --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/OrganizationController.java @@ -0,0 +1,139 @@ +package com.eleadmin.common.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.web.*; +import com.eleadmin.common.system.entity.Organization; +import com.eleadmin.common.system.param.OrganizationParam; +import com.eleadmin.common.system.service.OrganizationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 组织机构控制器 + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +@Api(tags = "组织机构管理") +@RestController +@RequestMapping("/api/system/organization") +public class OrganizationController extends BaseController { + @Resource + private OrganizationService organizationService; + + @PreAuthorize("hasAuthority('sys:org:list')") + @OperationLog + @ApiOperation("分页查询组织机构") + @GetMapping("/page") + public ApiResult> page(OrganizationParam param) { + return success(organizationService.pageRel(param)); + } + + @PreAuthorize("hasAuthority('sys:org:list')") + @OperationLog + @ApiOperation("查询全部组织机构") + @GetMapping() + public ApiResult> list(OrganizationParam param) { + return success(organizationService.listRel(param)); + } + + @PreAuthorize("hasAuthority('sys:org:list')") + @OperationLog + @ApiOperation("根据id查询组织机构") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(organizationService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('sys:org:save')") + @OperationLog + @ApiOperation("添加组织机构") + @PostMapping() + public ApiResult add(@RequestBody Organization organization) { + if (organization.getParentId() == null) { + organization.setParentId(0); + } + if (organizationService.count(new LambdaQueryWrapper() + .eq(Organization::getOrganizationName, organization.getOrganizationName()) + .eq(Organization::getParentId, organization.getParentId())) > 0) { + return fail("机构名称已存在"); + } + if (organizationService.save(organization)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:org:update')") + @OperationLog + @ApiOperation("修改组织机构") + @PutMapping() + public ApiResult update(@RequestBody Organization organization) { + if (organization.getOrganizationName() != null) { + if (organization.getParentId() == null) { + organization.setParentId(0); + } + if (organizationService.count(new LambdaQueryWrapper() + .eq(Organization::getOrganizationName, organization.getOrganizationName()) + .eq(Organization::getParentId, organization.getParentId()) + .ne(Organization::getOrganizationId, organization.getOrganizationId())) > 0) { + return fail("机构名称已存在"); + } + } + if (organizationService.updateById(organization)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:org:remove')") + @OperationLog + @ApiOperation("删除组织机构") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (organizationService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:org:save')") + @OperationLog + @ApiOperation("批量添加组织机构") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List organizationList) { + if (organizationService.saveBatch(organizationList)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:org:update')") + @OperationLog + @ApiOperation("批量修改组织机构") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(organizationService, Organization::getOrganizationId)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:org:remove')") + @OperationLog + @ApiOperation("批量删除组织机构") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (organizationService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/RoleController.java b/src/main/java/com/gxwebsoft/common/system/controller/RoleController.java new file mode 100644 index 0000000..3575a08 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/RoleController.java @@ -0,0 +1,152 @@ +package com.eleadmin.common.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.Role; +import com.eleadmin.common.system.param.RoleParam; +import com.eleadmin.common.system.service.RoleService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 角色控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:02 + */ +@Api(tags = "角色管理") +@RestController +@RequestMapping("/api/system/role") +public class RoleController extends BaseController { + @Resource + private RoleService roleService; + + @PreAuthorize("hasAuthority('sys:role:list')") + @OperationLog + @ApiOperation("分页查询角色") + @GetMapping("/page") + public ApiResult> page(RoleParam param) { + PageParam page = new PageParam<>(param); + return success(roleService.page(page, page.getWrapper())); + } + + @PreAuthorize("hasAuthority('sys:role:list')") + @OperationLog + @ApiOperation("查询全部角色") + @GetMapping() + public ApiResult> list(RoleParam param) { + PageParam page = new PageParam<>(param); + return success(roleService.list(page.getOrderWrapper())); + } + + @PreAuthorize("hasAuthority('sys:role:list')") + @OperationLog + @ApiOperation("根据id查询角色") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(roleService.getById(id)); + } + + @PreAuthorize("hasAuthority('sys:role:save')") + @OperationLog + @ApiOperation("添加角色") + @PostMapping() + public ApiResult save(@RequestBody Role role) { + if (roleService.count(new LambdaQueryWrapper().eq(Role::getRoleCode, role.getRoleCode())) > 0) { + return fail("角色标识已存在"); + } + if (roleService.count(new LambdaQueryWrapper().eq(Role::getRoleName, role.getRoleName())) > 0) { + return fail("角色名称已存在"); + } + if (roleService.save(role)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:role:update')") + @OperationLog + @ApiOperation("修改角色") + @PutMapping() + public ApiResult update(@RequestBody Role role) { + if (role.getRoleCode() != null && roleService.count(new LambdaQueryWrapper() + .eq(Role::getRoleCode, role.getRoleCode()) + .ne(Role::getRoleId, role.getRoleId())) > 0) { + return fail("角色标识已存在"); + } + if (role.getRoleName() != null && roleService.count(new LambdaQueryWrapper() + .eq(Role::getRoleName, role.getRoleName()) + .ne(Role::getRoleId, role.getRoleId())) > 0) { + return fail("角色名称已存在"); + } + if (roleService.updateById(role)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:role:remove')") + @OperationLog + @ApiOperation("删除角色") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (roleService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:role:save')") + @OperationLog + @ApiOperation("批量添加角色") + @PostMapping("/batch") + public ApiResult> saveBatch(@RequestBody List list) { + // 校验是否重复 + if (CommonUtil.checkRepeat(list, Role::getRoleName)) { + return fail("角色名称存在重复", null); + } + if (CommonUtil.checkRepeat(list, Role::getRoleCode)) { + return fail("角色标识存在重复", null); + } + // 校验是否存在 + List codeExists = roleService.list(new LambdaQueryWrapper().in(Role::getRoleCode, + list.stream().map(Role::getRoleCode).collect(Collectors.toList()))); + if (codeExists.size() > 0) { + return fail("角色标识已存在", codeExists.stream().map(Role::getRoleCode) + .collect(Collectors.toList())).setCode(2); + } + List nameExists = roleService.list(new LambdaQueryWrapper().in(Role::getRoleName, + list.stream().map(Role::getRoleCode).collect(Collectors.toList()))); + if (nameExists.size() > 0) { + return fail("角色标识已存在", nameExists.stream().map(Role::getRoleCode) + .collect(Collectors.toList())).setCode(3); + } + if (roleService.saveBatch(list)) { + return success("添加成功", null); + } + return fail("添加失败", null); + } + + @PreAuthorize("hasAuthority('sys:role:remove')") + @OperationLog + @ApiOperation("批量删除角色") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (roleService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/RoleMenuController.java b/src/main/java/com/gxwebsoft/common/system/controller/RoleMenuController.java new file mode 100644 index 0000000..d2f39f3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/RoleMenuController.java @@ -0,0 +1,100 @@ +package com.eleadmin.common.system.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.core.exception.BusinessException; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.entity.RoleMenu; +import com.eleadmin.common.system.service.MenuService; +import com.eleadmin.common.system.service.RoleMenuService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +/** + * 角色菜单控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:01 + */ +@Api(tags = "角色菜单管理") +@RestController +@RequestMapping("/api/system/role-menu") +public class RoleMenuController extends BaseController { + @Resource + private RoleMenuService roleMenuService; + @Resource + private MenuService menuService; + + @PreAuthorize("hasAuthority('sys:role:list')") + @OperationLog + @ApiOperation("查询角色菜单") + @GetMapping("/{id}") + public ApiResult> list(@PathVariable("id") Integer roleId) { + List menus = menuService.list(new LambdaQueryWrapper().orderByAsc(Menu::getSortNumber)); + List roleMenus = roleMenuService.list(new LambdaQueryWrapper() + .eq(RoleMenu::getRoleId, roleId)); + for (Menu menu : menus) { + menu.setChecked(roleMenus.stream().anyMatch((d) -> d.getMenuId().equals(menu.getMenuId()))); + } + return success(menus); + } + + @Transactional(rollbackFor = {Exception.class}) + @PreAuthorize("hasAuthority('sys:role:update')") + @OperationLog + @ApiOperation("修改角色菜单") + @PutMapping("/{id}") + public ApiResult update(@PathVariable("id") Integer roleId, @RequestBody List menuIds) { + roleMenuService.remove(new LambdaUpdateWrapper().eq(RoleMenu::getRoleId, roleId)); + if (menuIds != null && menuIds.size() > 0) { + List roleMenuList = new ArrayList<>(); + for (Integer menuId : menuIds) { + RoleMenu roleMenu = new RoleMenu(); + roleMenu.setRoleId(roleId); + roleMenu.setMenuId(menuId); + roleMenuList.add(roleMenu); + } + if (!roleMenuService.saveBatch(roleMenuList)) { + throw new BusinessException("保存失败"); + } + } + return success("保存成功"); + } + + @PreAuthorize("hasAuthority('sys:role:update')") + @OperationLog + @ApiOperation("添加角色菜单") + @PostMapping("/{id}") + public ApiResult addRoleAuth(@PathVariable("id") Integer roleId, @RequestBody Integer menuId) { + RoleMenu roleMenu = new RoleMenu(); + roleMenu.setRoleId(roleId); + roleMenu.setMenuId(menuId); + if (roleMenuService.save(roleMenu)) { + return success(); + } + return fail(); + } + + @PreAuthorize("hasAuthority('sys:role:update')") + @OperationLog + @ApiOperation("移除角色菜单") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer roleId, @RequestBody Integer menuId) { + if (roleMenuService.remove(new LambdaUpdateWrapper() + .eq(RoleMenu::getRoleId, roleId).eq(RoleMenu::getMenuId, menuId))) { + return success(); + } + return fail(); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/UserController.java b/src/main/java/com/gxwebsoft/common/system/controller/UserController.java new file mode 100644 index 0000000..b783433 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/UserController.java @@ -0,0 +1,298 @@ +package com.eleadmin.common.system.controller; + +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.eleadmin.common.core.annotation.OperationLog; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.core.web.*; +import com.eleadmin.common.system.entity.DictionaryData; +import com.eleadmin.common.system.entity.Organization; +import com.eleadmin.common.system.entity.Role; +import com.eleadmin.common.system.entity.User; +import com.eleadmin.common.system.param.UserImportParam; +import com.eleadmin.common.system.param.UserParam; +import com.eleadmin.common.system.service.DictionaryDataService; +import com.eleadmin.common.system.service.OrganizationService; +import com.eleadmin.common.system.service.RoleService; +import com.eleadmin.common.system.service.UserService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 用户控制器 + * + * @author EleAdmin + * @since 2018-12-24 16:10:41 + */ +@Api(tags = "用户管理") +@RestController +@RequestMapping("/api/system/user") +public class UserController extends BaseController { + @Resource + private UserService userService; + @Resource + private RoleService roleService; + @Resource + private OrganizationService organizationService; + @Resource + private DictionaryDataService dictionaryDataService; + + @PreAuthorize("hasAuthority('sys:user:list')") + @OperationLog + @ApiOperation("分页查询用户") + @GetMapping("/page") + public ApiResult> page(UserParam param) { + return success(userService.pageRel(param)); + } + + @PreAuthorize("hasAuthority('sys:user:list')") + @OperationLog + @ApiOperation("查询全部用户") + @GetMapping() + public ApiResult> list(UserParam param) { + return success(userService.listRel(param)); + } + + @PreAuthorize("hasAuthority('sys:user:list')") + @OperationLog + @ApiOperation("根据id查询用户") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + return success(userService.getByIdRel(id)); + } + + @PreAuthorize("hasAuthority('sys:user:save')") + @OperationLog + @ApiOperation("添加用户") + @PostMapping() + public ApiResult add(@RequestBody User user) { + user.setStatus(0); + user.setPassword(userService.encodePassword(user.getPassword())); + if (userService.saveUser(user)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:user:update')") + @OperationLog + @ApiOperation("修改用户") + @PutMapping() + public ApiResult update(@RequestBody User user) { + user.setStatus(null); + user.setUsername(null); + user.setPassword(null); + if (userService.updateUser(user)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:user:remove')") + @OperationLog + @ApiOperation("删除用户") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (userService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:user:update')") + @OperationLog + @ApiOperation("批量修改用户") + @PutMapping("/batch") + public ApiResult removeBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(userService, User::getUserId)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:user:remove')") + @OperationLog + @ApiOperation("批量删除用户") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "id数组", required = true, dataType = "string") + }) + @DeleteMapping("/batch") + public ApiResult deleteBatch(@RequestBody List ids) { + if (userService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:user:update')") + @OperationLog + @ApiOperation("修改用户状态") + @PutMapping("/status") + public ApiResult updateStatus(@RequestBody User user) { + if (user.getUserId() == null || user.getStatus() == null || !Arrays.asList(0, 1).contains(user.getStatus())) { + return fail("参数不正确"); + } + User u = new User(); + u.setUserId(user.getUserId()); + u.setStatus(user.getStatus()); + if (userService.updateById(u)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:user:update')") + @OperationLog + @ApiOperation("批量修改用户状态") + @PutMapping("/status/batch") + public ApiResult updateStatusBatch(@RequestBody BatchParam batchParam) { + if (!Arrays.asList(0, 1).contains(batchParam.getData())) { + return fail("状态值不正确"); + } + if (userService.update(new LambdaUpdateWrapper() + .in(User::getUserId, batchParam.getIds()) + .set(User::getStatus, batchParam.getData()))) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:user:update')") + @OperationLog + @ApiOperation("重置密码") + @PutMapping("/password") + public ApiResult resetPassword(@RequestBody User user) { + if (user.getUserId() == null || StrUtil.isBlank(user.getPassword())) { + return fail("参数不正确"); + } + User u = new User(); + u.setUserId(user.getUserId()); + u.setPassword(userService.encodePassword(user.getPassword())); + if (userService.updateById(u)) { + return success("重置成功"); + } else { + return fail("重置失败"); + } + } + + @PreAuthorize("hasAuthority('sys:user:update')") + @OperationLog + @ApiOperation("批量重置密码") + @PutMapping("/password/batch") + public ApiResult resetPasswordBatch(@RequestBody BatchParam batchParam) { + if (batchParam.getIds() == null || batchParam.getIds().size() == 0) { + return fail("请选择用户"); + } + if (batchParam.getData() == null) { + return fail("请输入密码"); + } + if (userService.update(new LambdaUpdateWrapper() + .in(User::getUserId, batchParam.getIds()) + .set(User::getPassword, userService.encodePassword(batchParam.getData())))) { + return success("重置成功"); + } else { + return fail("重置失败"); + } + } + + @PreAuthorize("hasAuthority('sys:user:list')") + @OperationLog + @ApiOperation("检查用户是否存在") + @GetMapping("/existence") + public ApiResult existence(ExistenceParam param) { + if (param.isExistence(userService, User::getUserId)) { + return success(param.getValue() + "已存在"); + } + return fail(param.getValue() + "不存在"); + } + + /** + * excel导入用户 + */ + @PreAuthorize("hasAuthority('sys:user:save')") + @OperationLog + @ApiOperation("导入用户") + @Transactional(rollbackFor = {Exception.class}) + @PostMapping("/import") + public ApiResult> importBatch(MultipartFile file) { + ImportParams importParams = new ImportParams(); + try { + List list = ExcelImportUtil.importExcel(file.getInputStream(), + UserImportParam.class, importParams); + // 校验是否重复 + if (CommonUtil.checkRepeat(list, UserImportParam::getUsername)) { + return fail("账号存在重复", null); + } + if (CommonUtil.checkRepeat(list, UserImportParam::getPhone)) { + return fail("手机号存在重复", null); + } + // 校验是否存在 + List usernameExists = userService.list(new LambdaQueryWrapper().in(User::getUsername, + list.stream().map(UserImportParam::getUsername).collect(Collectors.toList()))); + if (usernameExists.size() > 0) { + return fail("账号已经存在", + usernameExists.stream().map(User::getUsername).collect(Collectors.toList())); + } + List phoneExists = userService.list(new LambdaQueryWrapper().in(User::getPhone, + list.stream().map(UserImportParam::getPhone).collect(Collectors.toList()))); + if (phoneExists.size() > 0) { + return fail("手机号已经存在", + phoneExists.stream().map(User::getPhone).collect(Collectors.toList())); + } + // 添加 + List users = new ArrayList<>(); + for (UserImportParam one : list) { + User u = new User(); + u.setStatus(0); + u.setUsername(one.getUsername()); + u.setPassword(userService.encodePassword(one.getPassword())); + u.setNickname(one.getNickname()); + u.setPhone(one.getPhone()); + Role role = roleService.getOne(new QueryWrapper() + .eq("role_name", one.getRoleName()), false); + if (role == null) { + return fail("角色不存在", Collections.singletonList(one.getRoleName())); + } else { + u.setRoles(Collections.singletonList(role)); + } + Organization organization = organizationService.getOne(new QueryWrapper() + .eq("organization_full_name", one.getOrganizationName()), false); + if (organization == null) { + return fail("机构不存在", Collections.singletonList(one.getOrganizationName())); + } else { + u.setOrganizationId(organization.getOrganizationId()); + } + DictionaryData sex = dictionaryDataService.getByDictCodeAndName("sex", one.getSexName()); + if (sex == null) { + return fail("性别不存在", Collections.singletonList(one.getSexName())); + } else { + u.setSex(sex.getDictDataCode()); + } + } + if (userService.saveBatch(users)) { + return success("导入成功", null); + } + } catch (Exception e) { + e.printStackTrace(); + } + return fail("导入失败", null); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/controller/UserFileController.java b/src/main/java/com/gxwebsoft/common/system/controller/UserFileController.java new file mode 100644 index 0000000..0184124 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/controller/UserFileController.java @@ -0,0 +1,164 @@ +package com.eleadmin.common.system.controller; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.eleadmin.common.core.utils.FileServerUtil; +import com.eleadmin.common.core.web.BaseController; +import com.eleadmin.common.system.service.UserFileService; +import com.eleadmin.common.system.entity.UserFile; +import com.eleadmin.common.system.param.UserFileParam; +import com.eleadmin.common.core.web.ApiResult; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.annotation.OperationLog; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * 用户文件控制器 + * + * @author EleAdmin + * @since 2022-07-21 14:34:40 + */ +@Api(tags = "用户文件管理") +@RestController +@RequestMapping("/api/system/user-file") +public class UserFileController extends BaseController { + @Resource + private UserFileService userFileService; + + @OperationLog + @ApiOperation("分页查询用户文件") + @GetMapping("/page") + public ApiResult> page(UserFileParam param, HttpServletRequest request) { + param.setUserId(getLoginUserId()); + PageParam page = new PageParam<>(param); + page.setDefaultOrder("is_directory desc"); + PageParam result = userFileService.page(page, page.getWrapper()); + List records = result.getRecords(); + String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/system/user-file") + "/file"; + for (UserFile record : records) { + if (StrUtil.isNotBlank(record.getPath())) { + record.setUrl(requestURL + "/" + record.getPath()); + if (FileServerUtil.isImage(record.getContentType())) { + record.setThumbnail(requestURL + "/thumbnail/" + record.getPath()); + } + record.setDownloadUrl(requestURL + "/download/" + record.getPath()); + } + } + return success(records, result.getTotal()); + } + + @OperationLog + @ApiOperation("查询全部用户文件") + @GetMapping() + public ApiResult> list(UserFileParam param, HttpServletRequest request) { + param.setUserId(getLoginUserId()); + PageParam page = new PageParam<>(param); + page.setDefaultOrder("is_directory desc"); + List records = userFileService.list(page.getOrderWrapper()); + String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/system/user-file") + "/file"; + for (UserFile record : records) { + if (StrUtil.isNotBlank(record.getPath())) { + record.setUrl(requestURL + "/" + record.getPath()); + if (FileServerUtil.isImage(record.getContentType())) { + record.setThumbnail(requestURL + "/thumbnail/" + record.getPath()); + } + record.setDownloadUrl(requestURL + "/download/" + record.getPath()); + } + } + return success(records); + } + + @PreAuthorize("hasAuthority('sys:auth:user')") + @OperationLog + @ApiOperation("添加用户文件") + @PostMapping() + public ApiResult save(@RequestBody UserFile userFile) { + userFile.setUserId(getLoginUserId()); + if (userFile.getParentId() == null) { + userFile.setParentId(0); + } + if (userFile.getIsDirectory() != null && userFile.getIsDirectory().equals(1)) { + if (userFileService.count(new LambdaQueryWrapper() + .eq(UserFile::getName, userFile.getName()) + .eq(UserFile::getParentId, userFile.getParentId()) + .eq(UserFile::getUserId, userFile.getUserId())) > 0) { + return fail("文件夹名称已存在"); + } + } + if (userFileService.save(userFile)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @PreAuthorize("hasAuthority('sys:auth:user')") + @OperationLog + @ApiOperation("修改用户文件") + @PutMapping() + public ApiResult update(@RequestBody UserFile userFile) { + Integer loginUserId = getLoginUserId(); + UserFile old = userFileService.getById(userFile.getId()); + UserFile entity = new UserFile(); + if (StrUtil.isNotBlank(userFile.getName())) { + entity.setName(userFile.getName()); + } + if (userFile.getParentId() != null) { + entity.setParentId(userFile.getParentId()); + } + if (!old.getUserId().equals(loginUserId) || + (entity.getName() == null && entity.getParentId() == null)) { + return fail("修改失败"); + } + if (old.getIsDirectory() != null && old.getIsDirectory().equals(1)) { + if (userFileService.count(new LambdaQueryWrapper() + .eq(UserFile::getName, entity.getName() == null ? old.getName() : entity.getName()) + .eq(UserFile::getParentId, entity.getParentId() == null ? old.getParentId() : entity.getParentId()) + .eq(UserFile::getUserId, loginUserId) + .ne(UserFile::getId, old.getId())) > 0) { + return fail("文件夹名称已存在"); + } + } + if (userFileService.update(entity, new LambdaUpdateWrapper() + .eq(UserFile::getId, userFile.getId()) + .eq(UserFile::getUserId, loginUserId))) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @PreAuthorize("hasAuthority('sys:auth:user')") + @OperationLog + @ApiOperation("删除用户文件") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (userFileService.remove(new LambdaUpdateWrapper() + .eq(UserFile::getId, id) + .eq(UserFile::getUserId, getLoginUserId()))) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @PreAuthorize("hasAuthority('sys:auth:user')") + @OperationLog + @ApiOperation("批量删除用户文件") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (userFileService.remove(new LambdaUpdateWrapper() + .in(UserFile::getId, ids) + .eq(UserFile::getUserId, getLoginUserId()))) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/Dictionary.java b/src/main/java/com/gxwebsoft/common/system/entity/Dictionary.java new file mode 100644 index 0000000..058db6e --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/Dictionary.java @@ -0,0 +1,53 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; + +import java.util.Date; +import java.io.Serializable; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 字典 + * + * @author EleAdmin + * @since 2020-03-14 11:29:03 + */ +@Data +@ApiModel(description = "字典") +@TableName("sys_dictionary") +public class Dictionary implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "字典id") + @TableId(type = IdType.AUTO) + private Integer dictId; + + @ApiModelProperty(value = "字典标识") + private String dictCode; + + @ApiModelProperty(value = "字典名称") + private String dictName; + + @ApiModelProperty(value = "排序号") + private Integer sortNumber; + + @ApiModelProperty(value = "备注") + private String comments; + + @ApiModelProperty(value = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "创建时间") + private Date createTime; + + @ApiModelProperty(value = "修改时间") + private Date updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/DictionaryData.java b/src/main/java/com/gxwebsoft/common/system/entity/DictionaryData.java new file mode 100644 index 0000000..0108863 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/DictionaryData.java @@ -0,0 +1,61 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.*; + +import java.util.Date; +import java.io.Serializable; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 字典数据 + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +@Data +@ApiModel(description = "字典数据") +@TableName("sys_dictionary_data") +public class DictionaryData implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "字典数据id") + @TableId(type = IdType.AUTO) + private Integer dictDataId; + + @ApiModelProperty(value = "字典id") + private Integer dictId; + + @ApiModelProperty(value = "字典数据标识") + private String dictDataCode; + + @ApiModelProperty(value = "字典数据名称") + private String dictDataName; + + @ApiModelProperty(value = "排序号") + private Integer sortNumber; + + @ApiModelProperty(value = "备注") + private String comments; + + @ApiModelProperty(value = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "创建时间") + private Date createTime; + + @ApiModelProperty(value = "修改时间") + private Date updateTime; + + @ApiModelProperty(value = "字典代码") + @TableField(exist = false) + private String dictCode; + + @ApiModelProperty(value = "字典名称") + @TableField(exist = false) + private String dictName; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/EmailRecord.java b/src/main/java/com/gxwebsoft/common/system/entity/EmailRecord.java new file mode 100644 index 0000000..e24bc2c --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/EmailRecord.java @@ -0,0 +1,56 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 邮件发送记录 + * + * @author EleAdmin + * @since 2021-08-29 12:36:35 + */ +@Data +@ApiModel(description = "邮件发送记录") +@TableName("sys_email_record") +public class EmailRecord implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键id") + @TableId(type = IdType.AUTO) + private Integer id; + + @ApiModelProperty("邮件标题") + private String title; + + @ApiModelProperty("邮件内容") + private String content; + + @ApiModelProperty("收件邮箱") + private String receiver; + + @ApiModelProperty("发件邮箱") + private String sender; + + @ApiModelProperty("创建人") + private Integer createUserId; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java b/src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java new file mode 100644 index 0000000..6a4d42d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/FileRecord.java @@ -0,0 +1,78 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 文件上传记录 + * + * @author EleAdmin + * @since 2021-08-29 12:36:32 + */ +@Data +@ApiModel(description = "文件上传记录") +@TableName("sys_file_record") +public class FileRecord implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键id") + @TableId(type = IdType.AUTO) + private Integer id; + + @ApiModelProperty("文件名称") + private String name; + + @ApiModelProperty("文件存储路径") + private String path; + + @ApiModelProperty("文件大小") + private Long length; + + @ApiModelProperty("文件类型") + private String contentType; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty("创建人") + private Integer createUserId; + + @ApiModelProperty("是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("文件访问地址") + @TableField(exist = false) + private String url; + + @ApiModelProperty("文件缩略图访问地址") + @TableField(exist = false) + private String thumbnail; + + @ApiModelProperty("文件下载地址") + @TableField(exist = false) + private String downloadUrl; + + @ApiModelProperty("创建人账号") + @TableField(exist = false) + private String createUsername; + + @ApiModelProperty("创建人名称") + @TableField(exist = false) + private String createNickname; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/LoginRecord.java b/src/main/java/com/gxwebsoft/common/system/entity/LoginRecord.java new file mode 100644 index 0000000..8e9d0aa --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/LoginRecord.java @@ -0,0 +1,72 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 登录日志 + * + * @author EleAdmin + * @since 2018-12-24 16:10:41 + */ +@Data +@ApiModel(description = "登录日志") +@TableName("sys_login_record") +public class LoginRecord implements Serializable { + private static final long serialVersionUID = 1L; + public static final int TYPE_LOGIN = 0; // 登录成功 + public static final int TYPE_ERROR = 1; // 登录失败 + public static final int TYPE_LOGOUT = 2; // 退出登录 + public static final int TYPE_REFRESH = 3; // 续签token + + @ApiModelProperty("主键id") + @TableId(type = IdType.AUTO) + private Integer id; + + @ApiModelProperty("用户账号") + private String username; + + @ApiModelProperty("操作系统") + private String os; + + @ApiModelProperty("设备名称") + private String device; + + @ApiModelProperty("浏览器类型") + private String browser; + + @ApiModelProperty("ip地址") + private String ip; + + @ApiModelProperty("操作类型, 0登录成功, 1登录失败, 2退出登录, 3续签token") + private Integer loginType; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("操作时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("用户id") + @TableField(exist = false) + private Integer userId; + + @ApiModelProperty("用户昵称") + @TableField(exist = false) + private String nickname; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/Menu.java b/src/main/java/com/gxwebsoft/common/system/entity/Menu.java new file mode 100644 index 0000000..29c9be9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/Menu.java @@ -0,0 +1,81 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.security.core.GrantedAuthority; + +import java.util.Date; +import java.util.List; + +/** + * 菜单 + * + * @author EleAdmin + * @since 2018-12-24 16:10:17 + */ +@Data +@ApiModel(description = "菜单") +@TableName("sys_menu") +public class Menu implements GrantedAuthority { + private static final long serialVersionUID = 1L; + public static final int TYPE_MENU = 0; // 菜单类型 + public static final int TYPE_BTN = 1; // 按钮类型 + + @ApiModelProperty("菜单id") + @TableId(type = IdType.AUTO) + private Integer menuId; + + @ApiModelProperty("上级id, 0是顶级") + private Integer parentId; + + @ApiModelProperty("菜单名称") + private String title; + + @ApiModelProperty("菜单路由地址") + private String path; + + @ApiModelProperty("菜单组件地址") + private String component; + + @ApiModelProperty("菜单类型, 0菜单, 1按钮") + private Integer menuType; + + @ApiModelProperty("排序号") + private Integer sortNumber; + + @ApiModelProperty("权限标识") + private String authority; + + @ApiModelProperty("菜单图标") + private String icon; + + @ApiModelProperty("是否隐藏, 0否, 1是(仅注册路由不显示左侧菜单)") + private Integer hide; + + @ApiModelProperty("路由元信息") + private String meta; + + @ApiModelProperty("是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("子菜单") + @TableField(exist = false) + private List children; + + @ApiModelProperty("角色权限树选中状态") + @TableField(exist = false) + private Boolean checked; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/OperationRecord.java b/src/main/java/com/gxwebsoft/common/system/entity/OperationRecord.java new file mode 100644 index 0000000..7b217a5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/OperationRecord.java @@ -0,0 +1,95 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 操作日志 + * + * @author EleAdmin + * @since 2018-12-24 16:10:33 + */ +@Data +@ApiModel(description = "操作日志") +@TableName("sys_operation_record") +public class OperationRecord implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键id") + @TableId(type = IdType.AUTO) + private Integer id; + + @ApiModelProperty("用户id") + private Integer userId; + + @ApiModelProperty("操作模块") + private String module; + + @ApiModelProperty("操作功能") + private String description; + + @ApiModelProperty("请求地址") + private String url; + + @ApiModelProperty("请求方式") + private String requestMethod; + + @ApiModelProperty("调用方法") + private String method; + + @ApiModelProperty("请求参数") + private String params; + + @ApiModelProperty("返回结果") + private String result; + + @ApiModelProperty("异常信息") + private String error; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty("消耗时间, 单位毫秒") + private Long spendTime; + + @ApiModelProperty("操作系统") + private String os; + + @ApiModelProperty("设备名称") + private String device; + + @ApiModelProperty("浏览器类型") + private String browser; + + @ApiModelProperty("ip地址") + private String ip; + + @ApiModelProperty("状态, 0成功, 1异常") + private Integer status; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("操作时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("用户昵称") + @TableField(exist = false) + private String nickname; + + @ApiModelProperty("用户账号") + @TableField(exist = false) + private String username; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/Organization.java b/src/main/java/com/gxwebsoft/common/system/entity/Organization.java new file mode 100644 index 0000000..1cceb1f --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/Organization.java @@ -0,0 +1,77 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.*; + +import java.util.Date; +import java.io.Serializable; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 组织机构 + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +@Data +@ApiModel(description = "组织机构") +@TableName("sys_organization") +public class Organization implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "机构id") + @TableId(type = IdType.AUTO) + private Integer organizationId; + + @ApiModelProperty(value = "上级id, 0是顶级") + private Integer parentId; + + @ApiModelProperty(value = "机构名称") + private String organizationName; + + @ApiModelProperty(value = "机构全称") + private String organizationFullName; + + @ApiModelProperty(value = "机构代码") + private String organizationCode; + + @ApiModelProperty(value = "机构类型, 字典标识") + private String organizationType; + + @ApiModelProperty(value = "负责人id") + private Integer leaderId; + + @ApiModelProperty(value = "排序号") + private Integer sortNumber; + + @ApiModelProperty(value = "备注") + private String comments; + + @ApiModelProperty(value = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty(value = "创建时间") + private Date createTime; + + @ApiModelProperty(value = "修改时间") + private Date updateTime; + + @ApiModelProperty(value = "机构类型名称") + @TableField(exist = false) + private String organizationTypeName; + + @ApiModelProperty(value = "负责人姓名") + @TableField(exist = false) + private String leaderNickname; + + @ApiModelProperty(value = "负责人账号") + @TableField(exist = false) + private String leaderUsername; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/Role.java b/src/main/java/com/gxwebsoft/common/system/entity/Role.java new file mode 100644 index 0000000..a06d447 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/Role.java @@ -0,0 +1,53 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 角色 + * + * @author EleAdmin + * @since 2018-12-24 16:10:01 + */ +@Data +@ApiModel(description = "角色") +@TableName("sys_role") +public class Role implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("角色id") + @TableId(type = IdType.AUTO) + private Integer roleId; + + @ApiModelProperty("角色标识") + private String roleCode; + + @ApiModelProperty("角色名称") + private String roleName; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty("是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty(hidden = true) + @TableField(exist = false) + private Integer userId; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/RoleMenu.java b/src/main/java/com/gxwebsoft/common/system/entity/RoleMenu.java new file mode 100644 index 0000000..bc057f6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/RoleMenu.java @@ -0,0 +1,44 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 角色菜单 + * + * @author EleAdmin + * @since 2018-12-24 16:10:54 + */ +@Data +@ApiModel(description = "角色权限") +@TableName("sys_role_menu") +public class RoleMenu implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键id") + @TableId(type = IdType.AUTO) + private Integer id; + + @ApiModelProperty("角色id") + private Integer roleId; + + @ApiModelProperty("菜单id") + private Integer menuId; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/Tenant.java b/src/main/java/com/gxwebsoft/common/system/entity/Tenant.java new file mode 100644 index 0000000..dc8208b --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/Tenant.java @@ -0,0 +1,46 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 租户 + * + * @author EleAdmin + * @since 2021-08-28 11:31:06 + */ +@Data +@ApiModel(description = "租户") +@TableName("sys_tenant") +public class Tenant implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("租户id") + @TableId(type = IdType.AUTO) + private Integer tenantId; + + @ApiModelProperty("租户名称") + private String tenantName; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty("是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/User.java b/src/main/java/com/gxwebsoft/common/system/entity/User.java new file mode 100644 index 0000000..a350228 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/User.java @@ -0,0 +1,121 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.security.core.userdetails.UserDetails; + +import java.util.Date; +import java.util.List; + +/** + * 用户 + * + * @author EleAdmin + * @since 2018-12-24 16:10:13 + */ +@Data +@ApiModel(description = "用户") +@TableName("sys_user") +public class User implements UserDetails { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("用户id") + @TableId(type = IdType.AUTO) + private Integer userId; + + @ApiModelProperty("账号") + private String username; + + @ApiModelProperty("密码") + private String password; + + @ApiModelProperty("昵称") + private String nickname; + + @ApiModelProperty("头像") + private String avatar; + + @ApiModelProperty("性别, 字典标识") + private String sex; + + @ApiModelProperty("手机号") + private String phone; + + @ApiModelProperty("邮箱") + private String email; + + @ApiModelProperty("邮箱是否验证, 0否, 1是") + private Integer emailVerified; + + @ApiModelProperty("真实姓名") + private String realName; + + @ApiModelProperty("身份证号") + private String idCard; + + @ApiModelProperty("出生日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date birthday; + + @ApiModelProperty("个人简介") + private String introduction; + + @ApiModelProperty("机构id") + private Integer organizationId; + + @ApiModelProperty("状态, 0正常, 1冻结") + private Integer status; + + @ApiModelProperty("是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty("注册时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("机构名称") + @TableField(exist = false) + private String organizationName; + + @ApiModelProperty("性别名称") + @TableField(exist = false) + private String sexName; + + @ApiModelProperty("角色列表") + @TableField(exist = false) + private List roles; + + @ApiModelProperty("权限列表") + @TableField(exist = false) + private List authorities; + + @Override + public boolean isAccountNonExpired() { + return true; + } + + @Override + public boolean isAccountNonLocked() { + return this.status != null && this.status == 0; + } + + @Override + public boolean isCredentialsNonExpired() { + return true; + } + + @Override + public boolean isEnabled() { + return true; + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/UserFile.java b/src/main/java/com/gxwebsoft/common/system/entity/UserFile.java new file mode 100644 index 0000000..3b3a12f --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/UserFile.java @@ -0,0 +1,76 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.*; + +import java.io.Serializable; +import java.util.Date; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 用户文件 + * + * @author EleAdmin + * @since 2022-07-21 14:34:40 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "UserFile对象", description = "用户文件") +@TableName("sys_user_file") +public class UserFile implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键id") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "用户id") + private Integer userId; + + @ApiModelProperty(value = "文件名称") + private String name; + + @ApiModelProperty(value = "是否是文件夹, 0否, 1是") + private Integer isDirectory; + + @ApiModelProperty(value = "上级id") + private Integer parentId; + + @ApiModelProperty(value = "文件路径") + private String path; + + @ApiModelProperty(value = "文件大小") + private Integer length; + + @ApiModelProperty("文件类型") + private String contentType; + + @ApiModelProperty(value = "是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + + @ApiModelProperty(value = "创建时间") + private Date createTime; + + @ApiModelProperty(value = "修改时间") + private Date updateTime; + + @ApiModelProperty("文件访问地址") + @TableField(exist = false) + private String url; + + @ApiModelProperty("文件缩略图访问地址") + @TableField(exist = false) + private String thumbnail; + + @ApiModelProperty("文件下载地址") + @TableField(exist = false) + private String downloadUrl; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/entity/UserRole.java b/src/main/java/com/gxwebsoft/common/system/entity/UserRole.java new file mode 100644 index 0000000..c7b5551 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/entity/UserRole.java @@ -0,0 +1,46 @@ +package com.eleadmin.common.system.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 用户角色 + * + * @author EleAdmin + * @since 2018-12-24 16:10:23 + */ +@Data +@ApiModel(description = "用户角色") +@TableName("sys_user_role") +public class UserRole implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键id") + @TableId(type = IdType.AUTO) + private Integer id; + + @ApiModelProperty("用户id") + private Integer userId; + + @ApiModelProperty("角色id") + private Integer roleId; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date updateTime; + + @ApiModelProperty("角色名称") + @TableField(exist = false) + private String roleName; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/DictionaryDataMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/DictionaryDataMapper.java new file mode 100644 index 0000000..999cedc --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/DictionaryDataMapper.java @@ -0,0 +1,47 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.eleadmin.common.system.entity.DictionaryData; +import com.eleadmin.common.system.param.DictionaryDataParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 字典数据Mapper + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +public interface DictionaryDataMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") DictionaryDataParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") DictionaryDataParam param); + + /** + * 根据dictCode和dictDataName查询 + * + * @param dictCode 字典标识 + * @param dictDataName 字典项名称 + * @return List + */ + List getByDictCodeAndName(@Param("dictCode") String dictCode, + @Param("dictDataName") String dictDataName); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/DictionaryMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/DictionaryMapper.java new file mode 100644 index 0000000..873c133 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/DictionaryMapper.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.eleadmin.common.system.entity.Dictionary; + +/** + * 字典Mapper + * + * @author EleAdmin + * @since 2020-03-14 11:29:03 + */ +public interface DictionaryMapper extends BaseMapper { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/EmailRecordMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/EmailRecordMapper.java new file mode 100644 index 0000000..1da32b7 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/EmailRecordMapper.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.eleadmin.common.system.entity.EmailRecord; + +/** + * 邮件记录Mapper + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +public interface EmailRecordMapper extends BaseMapper { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/FileRecordMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/FileRecordMapper.java new file mode 100644 index 0000000..5adf180 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/FileRecordMapper.java @@ -0,0 +1,47 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.eleadmin.common.system.entity.FileRecord; +import com.eleadmin.common.system.param.FileRecordParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 文件上传记录Mapper + * + * @author EleAdmin + * @since 2021-08-30 11:18:04 + */ +public interface FileRecordMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") FileRecordParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") FileRecordParam param); + + /** + * 根据path查询 + * + * @param path 文件路径 + * @return FileRecord + */ + @InterceptorIgnore(tenantLine = "true") + List getByIdPath(@Param("path") String path); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/LoginRecordMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/LoginRecordMapper.java new file mode 100644 index 0000000..b17e651 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/LoginRecordMapper.java @@ -0,0 +1,48 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.eleadmin.common.system.entity.LoginRecord; +import com.eleadmin.common.system.param.LoginRecordParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 登录日志Mapper + * + * @author EleAdmin + * @since 2018-12-24 16:10:11 + */ +public interface LoginRecordMapper extends BaseMapper { + + /** + * 添加, 排除租户拦截 + * + * @param entity LoginRecord + * @return int + */ + @Override + @InterceptorIgnore(tenantLine = "true") + int insert(LoginRecord entity); + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") LoginRecordParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") LoginRecordParam param); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/MenuMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/MenuMapper.java new file mode 100644 index 0000000..9758257 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/MenuMapper.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.eleadmin.common.system.entity.Menu; + +/** + * 菜单Mapper + * + * @author EleAdmin + * @since 2018-12-24 16:10:32 + */ +public interface MenuMapper extends BaseMapper { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/OperationRecordMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/OperationRecordMapper.java new file mode 100644 index 0000000..af6394a --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/OperationRecordMapper.java @@ -0,0 +1,48 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.eleadmin.common.system.entity.OperationRecord; +import com.eleadmin.common.system.param.OperationRecordParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 操作日志Mapper + * + * @author EleAdmin + * @since 2018-12-24 16:10:03 + */ +public interface OperationRecordMapper extends BaseMapper { + + /** + * 添加, 排除租户拦截 + * + * @param entity OperationRecord + * @return int + */ + @Override + @InterceptorIgnore(tenantLine = "true") + int insert(OperationRecord entity); + + /** + * 分页查询 + * + * @param page 分页参数 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") OperationRecordParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") OperationRecordParam param); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/OrganizationMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/OrganizationMapper.java new file mode 100644 index 0000000..965cc05 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/OrganizationMapper.java @@ -0,0 +1,37 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.eleadmin.common.system.entity.Organization; +import com.eleadmin.common.system.param.OrganizationParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 组织机构Mapper + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +public interface OrganizationMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") OrganizationParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") OrganizationParam param); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/RoleMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/RoleMapper.java new file mode 100644 index 0000000..d551e11 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/RoleMapper.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.eleadmin.common.system.entity.Role; + +/** + * 角色Mapper + * + * @author EleAdmin + * @since 2018-12-24 16:10:44 + */ +public interface RoleMapper extends BaseMapper { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/RoleMenuMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/RoleMenuMapper.java new file mode 100644 index 0000000..784482e --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/RoleMenuMapper.java @@ -0,0 +1,39 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.entity.RoleMenu; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 角色菜单Mapper + * + * @author EleAdmin + * @since 2018-12-24 16:10:21 + */ +public interface RoleMenuMapper extends BaseMapper { + + /** + * 查询用户的菜单 + * + * @param userId 用户id + * @param menuType 菜单类型 + * @return List + */ + @InterceptorIgnore(tenantLine = "true") + List listMenuByUserId(@Param("userId") Integer userId, @Param("menuType") Integer menuType); + + /** + * 根据角色id查询菜单 + * + * @param roleIds 角色id + * @param menuType 菜单类型 + * @return List + */ + @InterceptorIgnore(tenantLine = "true") + List listMenuByRoleIds(@Param("roleIds") List roleIds, @Param("menuType") Integer menuType); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/UserFileMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/UserFileMapper.java new file mode 100644 index 0000000..2d3a3fa --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/UserFileMapper.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.eleadmin.common.system.entity.UserFile; + +/** + * 用户文件Mapper + * + * @author EleAdmin + * @since 2022-07-21 14:34:40 + */ +public interface UserFileMapper extends BaseMapper { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/UserMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/UserMapper.java new file mode 100644 index 0000000..9d07ad2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/UserMapper.java @@ -0,0 +1,48 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.eleadmin.common.system.entity.User; +import com.eleadmin.common.system.param.UserParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户Mapper + * + * @author EleAdmin + * @since 2018-12-24 16:10:14 + */ +public interface UserMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") UserParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") UserParam param); + + /** + * 根据账号查询 + * + * @param username 账号 + * @param tenantId 租户id + * @return User + */ + @InterceptorIgnore(tenantLine = "true") + User selectByUsername(@Param("username") String username, @Param("tenantId") Integer tenantId); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/UserRoleMapper.java b/src/main/java/com/gxwebsoft/common/system/mapper/UserRoleMapper.java new file mode 100644 index 0000000..b9ad78c --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/UserRoleMapper.java @@ -0,0 +1,45 @@ +package com.eleadmin.common.system.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.eleadmin.common.system.entity.Role; +import com.eleadmin.common.system.entity.UserRole; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户角色Mapper + * + * @author EleAdmin + * @since 2018-12-24 16:10:02 + */ +public interface UserRoleMapper extends BaseMapper { + + /** + * 批量添加用户角色 + * + * @param userId 用户id + * @param roleIds 角色id集合 + * @return int + */ + int insertBatch(@Param("userId") Integer userId, @Param("roleIds") List roleIds); + + /** + * 根据用户id查询角色 + * + * @param userId 用户id + * @return List + */ + @InterceptorIgnore(tenantLine = "true") + List selectByUserId(@Param("userId") Integer userId); + + /** + * 批量根据用户id查询角色 + * + * @param userIds 用户id集合 + * @return List + */ + List selectByUserIds(@Param("userIds") List userIds); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryDataMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryDataMapper.xml new file mode 100644 index 0000000..dc0ff9e --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryDataMapper.xml @@ -0,0 +1,71 @@ + + + + + + + SELECT a.*, + b.dict_code, + b.dict_name + FROM sys_dictionary_data a + LEFT JOIN sys_dictionary b ON a.dict_id = b.dict_id + + AND a.deleted = 0 + + AND a.dict_data_id = #{param.dictDataId} + + + AND a.dict_id = #{param.dictId} + + + AND a.dict_data_code LIKE CONCAT('%', #{param.dictDataCode}, '%') + + + AND a.dict_data_name LIKE CONCAT('%', #{param.dictDataName}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND b.dict_code = #{param.dictCode} + + + AND b.dict_name = #{param.dictName} + + + AND ( + a.dict_data_code LIKE CONCAT('%', #{param.keywords}, '%') + OR a.dict_data_name LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryMapper.xml new file mode 100644 index 0000000..bd5f10f --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/DictionaryMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/EmailRecordMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/EmailRecordMapper.xml new file mode 100644 index 0000000..b1fe884 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/EmailRecordMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/FileRecordMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/FileRecordMapper.xml new file mode 100644 index 0000000..454d7ab --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/FileRecordMapper.xml @@ -0,0 +1,66 @@ + + + + + + + SELECT a.*, + b.username create_username, + b.nickname create_nickname + FROM sys_file_record a + LEFT JOIN sys_user b ON a.create_user_id = b.user_id + + + AND a.id = #{param.id} + + + AND a.`name` LIKE CONCAT('%', #{param.name}, '%') + + + AND a.path LIKE CONCAT('%', #{param.path}, '%') + + + AND a.create_user_id = #{param.createUserId} + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND b.username = #{param.createUsername} + + + AND b.nickname LIKE CONCAT('%', #{param.createNickname}, '%') + + + + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/LoginRecordMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/LoginRecordMapper.xml new file mode 100644 index 0000000..1cacef8 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/LoginRecordMapper.xml @@ -0,0 +1,62 @@ + + + + + + + SELECT a.*, + b.user_id, + b.nickname + FROM sys_login_record a + LEFT JOIN sys_user b ON a.username = b.username + + + AND a.id = #{param.id} + + + AND a.username LIKE CONCAT('%', #{param.username}, '%') + + + AND a.os LIKE CONCAT('%', #{param.os}, '%') + + + AND a.device LIKE CONCAT('%', #{param.device}, '%') + + + AND a.browser LIKE CONCAT('%', #{param.browser}, '%') + + + AND a.ip LIKE CONCAT('%', #{param.ip}, '%') + + + AND a.login_type LIKE CONCAT('%', #{param.loginType}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND b.user_id = #{param.userId} + + + AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%') + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/MenuMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/MenuMapper.xml new file mode 100644 index 0000000..227011c --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/MenuMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/OperationRecordMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/OperationRecordMapper.xml new file mode 100644 index 0000000..dfe84b9 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/OperationRecordMapper.xml @@ -0,0 +1,71 @@ + + + + + + + SELECT a.*, + b.nickname, + b.username + FROM sys_operation_record a + LEFT JOIN sys_user b ON a.user_id = b.user_id + + + AND a.id = #{param.id} + + + AND a.user_id = #{param.userId} + + + AND a.module LIKE CONCAT('%', #{param.module}, '%') + + + AND a.description LIKE CONCAT('%', #{param.description}, '%') + + + AND a.url LIKE CONCAT('%', #{param.url}, '%') + + + AND a.request_method = #{param.requestMethod} + + + AND a.method LIKE CONCAT('%', #{param.method}, '%') + + + AND a.description LIKE CONCAT('%', #{param.description}, '%') + + + AND a.ip LIKE CONCAT('%', #{param.ip}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.`status` = #{param.status} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND b.username LIKE CONCAT('%', #{param.username}, '%') + + + AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%') + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/OrganizationMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/OrganizationMapper.xml new file mode 100644 index 0000000..95f7ed5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/OrganizationMapper.xml @@ -0,0 +1,81 @@ + + + + + + + SELECT ta.* + FROM sys_dictionary_data ta + LEFT JOIN sys_dictionary tb + ON ta.dict_id = tb.dict_id + AND tb.deleted = 0 + WHERE ta.deleted = 0 + AND tb.dict_code = 'organization_type' + + + + + SELECT a.*, + b.dict_data_name organization_type_name, + c.nickname leader_nickname, + c.username leader_username + FROM sys_organization a + LEFT JOIN ( + + ) b ON a.organization_type = b.dict_data_code + LEFT JOIN sys_user c ON a.leader_id = c.user_id + + AND a.deleted = 0 + + AND a.organization_id = #{param.organizationId} + + + AND a.parent_id = #{param.parentId} + + + AND a.organization_name LIKE CONCAT('%', #{param.organizationName}, '%') + + + AND a.organization_full_name LIKE CONCAT('%', #{param.organizationFullName}, '%') + + + AND a.organization_code LIKE CONCAT('%', #{param.organizationCode}, '%') + + + AND a.organization_type = #{param.organizationType} + + + AND a.leader_id = #{param.leaderId} + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND b.dict_data_name LIKE CONCAT('%', #{param.organizationTypeName}, '%') + + + AND c.nickname LIKE CONCAT('%', #{param.leaderNickname}, '%') + + + AND c.username LIKE CONCAT('%', #{param.leaderUsername}, '%') + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMapper.xml new file mode 100644 index 0000000..aa5223d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMenuMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMenuMapper.xml new file mode 100644 index 0000000..1d2b6ac --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/RoleMenuMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserFileMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserFileMapper.xml new file mode 100644 index 0000000..6f9693c --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserFileMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml new file mode 100644 index 0000000..354bb87 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserMapper.xml @@ -0,0 +1,140 @@ + + + + + + + SELECT ta.* + FROM sys_dictionary_data ta + LEFT JOIN sys_dictionary tb + ON ta.dict_id = tb.dict_id + AND tb.deleted = 0 + WHERE ta.deleted = 0 + AND tb.dict_code = 'sex' + + + + + SELECT a.user_id, + GROUP_CONCAT(b.role_name) role_name + FROM sys_user_role a + LEFT JOIN sys_role b ON a.role_id = b.role_id + GROUP BY a.user_id + + + + + SELECT a.*, + b.organization_name, + c.dict_data_name sex_name + FROM sys_user a + LEFT JOIN sys_organization b ON a.organization_id = b.organization_id + LEFT JOIN ( + + ) c ON a.sex = c.dict_data_code + LEFT JOIN( + + ) d ON a.user_id = d.user_id + + + AND a.user_id = #{param.userId} + + + AND a.username LIKE CONCAT('%', #{param.username}, '%') + + + AND a.nickname LIKE CONCAT('%', #{param.nickname}, '%') + + + AND a.sex = #{param.sex} + + + AND a.phone LIKE CONCAT('%', #{param.phone}, '%') + + + AND a.email LIKE CONCAT('%', #{param.email}, '%') + + + AND a.email_verified = #{param.emailVerified} + + + AND a.real_name LIKE CONCAT('%', #{param.realName}, '%') + + + AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%') + + + AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%') + + + AND a.organization_id = #{param.organizationId} + + + AND a.`status` = #{param.status} + + + AND a.create_time >= #{param.createTimeStart} + + + AND a.create_time <= #{param.createTimeEnd} + + + AND a.deleted = #{param.deleted} + + + AND a.deleted = 0 + + + AND a.user_id IN (SELECT user_id FROM sys_user_role WHERE role_id=#{param.roleId}) + + + AND b.organization_name LIKE CONCAT('%', #{param.organizationName}, '%') + + + AND c.dict_data_name = #{param.sexName} + + + AND ( + a.username LIKE CONCAT('%', #{param.keywords}, '%') + OR a.nickname LIKE CONCAT('%', #{param.keywords}, '%') + OR b.organization_name LIKE CONCAT('%', #{param.keywords}, '%') + OR c.dict_data_name LIKE CONCAT('%', #{param.keywords}, '%') + OR d.role_name LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserRoleMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserRoleMapper.xml new file mode 100644 index 0000000..e93ff5d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserRoleMapper.xml @@ -0,0 +1,34 @@ + + + + + + INSERT INTO sys_user_role(user_id, role_id) VALUES + + (#{userId}, #{roleId}) + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/common/system/param/DictionaryDataParam.java b/src/main/java/com/gxwebsoft/common/system/param/DictionaryDataParam.java new file mode 100644 index 0000000..233c6cb --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/DictionaryDataParam.java @@ -0,0 +1,55 @@ +package com.eleadmin.common.system.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 字典数据查询参数 + * + * @author EleAdmin + * @since 2021-08-28 22:12:02 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "字典数据查询参数") +public class DictionaryDataParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "字典数据id") + @QueryField(type = QueryType.EQ) + private Integer dictDataId; + + @ApiModelProperty(value = "字典id") + @QueryField(type = QueryType.EQ) + private Integer dictId; + + @ApiModelProperty(value = "字典数据标识") + private String dictDataCode; + + @ApiModelProperty(value = "字典数据名称") + private String dictDataName; + + @ApiModelProperty(value = "备注") + private String comments; + + @ApiModelProperty(value = "字典代码") + @TableField(exist = false) + private String dictCode; + + @ApiModelProperty(value = "字典名称") + @TableField(exist = false) + private String dictName; + + @ApiModelProperty(value = "字典数据代码或字典数据名称") + @TableField(exist = false) + private String keywords; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/DictionaryParam.java b/src/main/java/com/gxwebsoft/common/system/param/DictionaryParam.java new file mode 100644 index 0000000..ab147ce --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/DictionaryParam.java @@ -0,0 +1,38 @@ +package com.eleadmin.common.system.param; + +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 字典查询参数 + * + * @author EleAdmin + * @since 2021-08-28 22:12:01 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "字典查询参数") +public class DictionaryParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @QueryField(type = QueryType.EQ) + @ApiModelProperty(value = "字典id") + private Integer dictId; + + @ApiModelProperty(value = "字典标识") + private String dictCode; + + @ApiModelProperty(value = "字典名称") + private String dictName; + + @ApiModelProperty(value = "备注") + private String comments; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/FileRecordParam.java b/src/main/java/com/gxwebsoft/common/system/param/FileRecordParam.java new file mode 100644 index 0000000..f46809b --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/FileRecordParam.java @@ -0,0 +1,56 @@ +package com.eleadmin.common.system.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 文件上传记录查询参数 + * + * @author EleAdmin + * @since 2021-08-30 11:29:31 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "文件上传记录查询参数") +public class FileRecordParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @QueryField(type = QueryType.EQ) + @ApiModelProperty("主键id") + private Integer id; + + @ApiModelProperty("文件名称") + private String name; + + @ApiModelProperty("文件存储路径") + private String path; + + @QueryField(type = QueryType.EQ) + @ApiModelProperty("创建人") + private Integer createUserId; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty("是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty("创建人账号") + @TableField(exist = false) + private String createUsername; + + @ApiModelProperty("创建人名称") + @TableField(exist = false) + private String createNickname; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/LoginParam.java b/src/main/java/com/gxwebsoft/common/system/param/LoginParam.java new file mode 100644 index 0000000..aaff43b --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/LoginParam.java @@ -0,0 +1,31 @@ +package com.eleadmin.common.system.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 登录参数 + * + * @author EleAdmin + * @since 2021-08-30 17:35:16 + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "登录参数") +public class LoginParam implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("账号") + private String username; + + @ApiModelProperty("密码") + private String password; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/LoginRecordParam.java b/src/main/java/com/gxwebsoft/common/system/param/LoginRecordParam.java new file mode 100644 index 0000000..2805e15 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/LoginRecordParam.java @@ -0,0 +1,60 @@ +package com.eleadmin.common.system.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 登录日志查询参数 + * + * @author EleAdmin + * @since 2021-08-29 19:09:23 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "登录日志查询参数") +public class LoginRecordParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @QueryField(type = QueryType.EQ) + @ApiModelProperty("主键id") + private Integer id; + + @ApiModelProperty("用户账号") + private String username; + + @ApiModelProperty("操作系统") + private String os; + + @ApiModelProperty("设备名") + private String device; + + @ApiModelProperty("浏览器类型") + private String browser; + + @ApiModelProperty("ip地址") + private String ip; + + @QueryField(type = QueryType.EQ) + @ApiModelProperty("操作类型, 0登录成功, 1登录失败, 2退出登录, 3续签token") + private Integer loginType; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty("用户id") + @TableField(exist = false) + private Integer userId; + + @ApiModelProperty("用户昵称") + @TableField(exist = false) + private String nickname; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/MenuParam.java b/src/main/java/com/gxwebsoft/common/system/param/MenuParam.java new file mode 100644 index 0000000..63ca8b6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/MenuParam.java @@ -0,0 +1,56 @@ +package com.eleadmin.common.system.param; + +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 菜单查询参数 + * + * @author EleAdmin + * @since 2021-08-29 19:36:10 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "菜单查询参数") +public class MenuParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("菜单id") + @QueryField(type = QueryType.EQ) + private Integer menuId; + + @ApiModelProperty("上级id, 0是顶级") + @QueryField(type = QueryType.EQ) + private Integer parentId; + + @ApiModelProperty("菜单名称") + private String title; + + @ApiModelProperty("菜单路由关键字") + private String path; + + @ApiModelProperty("菜单组件地址") + private String component; + + @ApiModelProperty("菜单类型, 0菜单, 1按钮") + @QueryField(type = QueryType.EQ) + private Integer menuType; + + @ApiModelProperty("权限标识") + private String authority; + + @ApiModelProperty("菜单图标") + private String icon; + + @ApiModelProperty("是否隐藏, 0否, 1是(仅注册路由不显示左侧菜单)") + @QueryField(type = QueryType.EQ) + private Integer hide; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/OperationRecordParam.java b/src/main/java/com/gxwebsoft/common/system/param/OperationRecordParam.java new file mode 100644 index 0000000..8cf7d31 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/OperationRecordParam.java @@ -0,0 +1,67 @@ +package com.eleadmin.common.system.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 操作日志参数 + * + * @author EleAdmin + * @since 2021-08-29 20:35:09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "操作日志参数") +public class OperationRecordParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键id") + @QueryField(type = QueryType.EQ) + private Integer id; + + @ApiModelProperty("用户id") + @QueryField(type = QueryType.EQ) + private Integer userId; + + @ApiModelProperty("操作模块") + private String module; + + @ApiModelProperty("操作功能") + private String description; + + @ApiModelProperty("请求地址") + private String url; + + @ApiModelProperty("请求方式") + private String requestMethod; + + @ApiModelProperty("调用方法") + private String method; + + @ApiModelProperty("ip地址") + private String ip; + + @ApiModelProperty("备注") + private String comments; + + @ApiModelProperty("状态, 0成功, 1异常") + @QueryField(type = QueryType.EQ) + private Integer status; + + @ApiModelProperty("用户账号") + @TableField(exist = false) + private String username; + + @ApiModelProperty("用户昵称") + @TableField(exist = false) + private String nickname; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/OrganizationParam.java b/src/main/java/com/gxwebsoft/common/system/param/OrganizationParam.java new file mode 100644 index 0000000..f3166c6 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/OrganizationParam.java @@ -0,0 +1,65 @@ +package com.eleadmin.common.system.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 组织机构查询参数 + * + * @author EleAdmin + * @since 2021-08-29 20:35:09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "组织机构查询参数") +public class OrganizationParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "机构id") + @QueryField(type = QueryType.EQ) + private Integer organizationId; + + @ApiModelProperty(value = "上级id, 0是顶级") + @QueryField(type = QueryType.EQ) + private Integer parentId; + + @ApiModelProperty(value = "机构名称") + private String organizationName; + + @ApiModelProperty(value = "机构全称") + private String organizationFullName; + + @ApiModelProperty(value = "机构代码") + private String organizationCode; + + @ApiModelProperty(value = "机构类型(字典代码)") + private String organizationType; + + @ApiModelProperty(value = "负责人id") + @QueryField(type = QueryType.EQ) + private Integer leaderId; + + @ApiModelProperty(value = "备注") + private String comments; + + @ApiModelProperty(value = "机构类型名称") + @TableField(exist = false) + private String organizationTypeName; + + @ApiModelProperty(value = "负责人姓名") + @TableField(exist = false) + private String leaderNickname; + + @ApiModelProperty(value = "负责人账号") + @TableField(exist = false) + private String leaderUsername; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/RoleParam.java b/src/main/java/com/gxwebsoft/common/system/param/RoleParam.java new file mode 100644 index 0000000..900fb76 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/RoleParam.java @@ -0,0 +1,38 @@ +package com.eleadmin.common.system.param; + +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 角色查询参数 + * + * @author EleAdmin + * @since 2021-08-29 20:35:09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "角色查询参数") +public class RoleParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("角色id") + @QueryField(type = QueryType.EQ) + private Integer roleId; + + @ApiModelProperty("角色标识") + private String roleCode; + + @ApiModelProperty("角色名称") + private String roleName; + + @ApiModelProperty("备注") + private String comments; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/UpdatePasswordParam.java b/src/main/java/com/gxwebsoft/common/system/param/UpdatePasswordParam.java new file mode 100644 index 0000000..d0e9b33 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/UpdatePasswordParam.java @@ -0,0 +1,28 @@ +package com.eleadmin.common.system.param; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 修改密码参数 + * + * @author EleAdmin + * @since 2021-08-30 17:35:16 + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "修改密码参数") +public class UpdatePasswordParam implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("原始密码") + private String oldPassword; + + @ApiModelProperty("新密码") + private String password; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/UserFileParam.java b/src/main/java/com/gxwebsoft/common/system/param/UserFileParam.java new file mode 100644 index 0000000..715a390 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/UserFileParam.java @@ -0,0 +1,40 @@ +package com.eleadmin.common.system.param; + +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 用户文件查询参数 + * + * @author EleAdmin + * @since 2022-07-21 14:34:40 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(value = "UserFileParam对象", description = "用户文件查询参数") +public class UserFileParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键id") + @QueryField(type = QueryType.EQ) + private Integer id; + + @ApiModelProperty(value = "用户id") + @QueryField(type = QueryType.EQ) + private Integer userId; + + @ApiModelProperty(value = "文件名称") + private String name; + + @ApiModelProperty(value = "上级id") + @QueryField(type = QueryType.EQ) + private Integer parentId; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/UserImportParam.java b/src/main/java/com/gxwebsoft/common/system/param/UserImportParam.java new file mode 100644 index 0000000..219fa27 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/UserImportParam.java @@ -0,0 +1,42 @@ +package com.eleadmin.common.system.param; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * 用户导入参数 + * + * @author EleAdmin + * @since 2011-10-15 17:33:34 + */ +@Data +public class UserImportParam implements Serializable { + private static final long serialVersionUID = 1L; + + @Excel(name = "账号") + private String username; + + @Excel(name = "密码") + private String password; + + @Excel(name = "昵称") + private String nickname; + + @Excel(name = "手机号") + private String phone; + + @Excel(name = "邮箱") + private String email; + + @Excel(name = "组织机构") + private String organizationName; + + @Excel(name = "性别") + private String sexName; + + @Excel(name = "角色") + private String roleName; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/param/UserParam.java b/src/main/java/com/gxwebsoft/common/system/param/UserParam.java new file mode 100644 index 0000000..e684eed --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/param/UserParam.java @@ -0,0 +1,88 @@ +package com.eleadmin.common.system.param; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.eleadmin.common.core.annotation.QueryField; +import com.eleadmin.common.core.annotation.QueryType; +import com.eleadmin.common.core.web.BaseParam; +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 用户查询参数 + * + * @author EleAdmin + * @since 2021-08-29 20:35:09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@ApiModel(description = "用户查询参数") +public class UserParam extends BaseParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("用户id") + @QueryField(type = QueryType.EQ) + private Integer userId; + + @ApiModelProperty("账号") + private String username; + + @ApiModelProperty("昵称") + private String nickname; + + @ApiModelProperty("性别(字典)") + @QueryField(type = QueryType.EQ) + private String sex; + + @ApiModelProperty("手机号") + private String phone; + + @ApiModelProperty("邮箱") + private String email; + + @ApiModelProperty("邮箱是否验证, 0否, 1是") + @QueryField(type = QueryType.EQ) + private Integer emailVerified; + + @ApiModelProperty("真实姓名") + private String realName; + + @ApiModelProperty("身份证号") + private String idCard; + + @ApiModelProperty("出生日期") + private String birthday; + + @ApiModelProperty("机构id") + @QueryField(type = QueryType.EQ) + private Integer organizationId; + + @ApiModelProperty("状态, 0正常, 1冻结") + @QueryField(type = QueryType.EQ) + private Integer status; + + @ApiModelProperty("是否删除, 0否, 1是") + @TableLogic + private Integer deleted; + + @ApiModelProperty("角色id") + @TableField(exist = false) + private Integer roleId; + + @ApiModelProperty("机构名称") + @TableField(exist = false) + private String organizationName; + + @ApiModelProperty("性别名称") + @TableField(exist = false) + private String sexName; + + @ApiModelProperty("搜索关键字") + @TableField(exist = false) + private String keywords; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/result/CaptchaResult.java b/src/main/java/com/gxwebsoft/common/system/result/CaptchaResult.java new file mode 100644 index 0000000..53c4d72 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/result/CaptchaResult.java @@ -0,0 +1,30 @@ +package com.eleadmin.common.system.result; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 验证码返回结果 + * + * @author EleAdmin + * @since 2021-08-30 17:35:16 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(description = "验证码返回结果") +public class CaptchaResult implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("图形验证码base64数据") + private String base64; + + @ApiModelProperty("验证码文本") + private String text; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/result/LoginResult.java b/src/main/java/com/gxwebsoft/common/system/result/LoginResult.java new file mode 100644 index 0000000..e910b24 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/result/LoginResult.java @@ -0,0 +1,31 @@ +package com.eleadmin.common.system.result; + +import com.eleadmin.common.system.entity.User; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * 登录返回结果 + * + * @author EleAdmin + * @since 2021-08-30 17:35:16 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(description = "登录返回结果") +public class LoginResult implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("access_token") + private String access_token; + + @ApiModelProperty("用户信息") + private User user; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/DictionaryDataService.java b/src/main/java/com/gxwebsoft/common/system/service/DictionaryDataService.java new file mode 100644 index 0000000..e9df6ea --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/DictionaryDataService.java @@ -0,0 +1,51 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.DictionaryData; +import com.eleadmin.common.system.param.DictionaryDataParam; + +import java.util.List; + +/** + * 字典数据Service + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +public interface DictionaryDataService extends IService { + + /** + * 关联分页查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(DictionaryDataParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(DictionaryDataParam param); + + /** + * 根据id查询 + * + * @param dictDataId 字典数据id + * @return DictionaryData + */ + DictionaryData getByIdRel(Integer dictDataId); + + /** + * 根据dictCode和dictDataName查询 + * + * @param dictCode 字典标识 + * @param dictDataName 字典项名称 + * @return DictionaryData + */ + DictionaryData getByDictCodeAndName(String dictCode, String dictDataName); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/DictionaryService.java b/src/main/java/com/gxwebsoft/common/system/service/DictionaryService.java new file mode 100644 index 0000000..5821649 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/DictionaryService.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.system.entity.Dictionary; + +/** + * 字典Service + * + * @author EleAdmin + * @since 2020-03-14 11:29:03 + */ +public interface DictionaryService extends IService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/EmailRecordService.java b/src/main/java/com/gxwebsoft/common/system/service/EmailRecordService.java new file mode 100644 index 0000000..5cd5d95 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/EmailRecordService.java @@ -0,0 +1,50 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.system.entity.EmailRecord; + +import javax.mail.MessagingException; +import java.io.IOException; +import java.util.Map; + +/** + * 邮件发送记录Service + * + * @author EleAdmin + * @since 2019-06-19 04:07:02 + */ +public interface EmailRecordService extends IService { + + /** + * 发送普通邮件 + * + * @param title 标题 + * @param content 内容 + * @param toEmails 收件人 + */ + void sendTextEmail(String title, String content, String[] toEmails); + + /** + * 发送富文本邮件 + * + * @param title 标题 + * @param html 富文本 + * @param toEmails 收件人 + * @throws MessagingException MessagingException + */ + void sendFullTextEmail(String title, String html, String[] toEmails) throws MessagingException; + + /** + * 发送模板邮件 + * + * @param title 标题 + * @param path 模板路径 + * @param map 填充数据 + * @param toEmails 收件人 + * @throws MessagingException MessagingException + * @throws IOException IOException + */ + void sendHtmlEmail(String title, String path, Map map, String[] toEmails) + throws MessagingException, IOException; + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/FileRecordService.java b/src/main/java/com/gxwebsoft/common/system/service/FileRecordService.java new file mode 100644 index 0000000..d3f8637 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/FileRecordService.java @@ -0,0 +1,58 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.FileRecord; +import com.eleadmin.common.system.param.FileRecordParam; + +import java.io.File; +import java.util.List; + +/** + * 文件上传记录Service + * + * @author EleAdmin + * @since 2021-08-30 11:20:15 + */ +public interface FileRecordService extends IService { + + /** + * 关联分页查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(FileRecordParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(FileRecordParam param); + + /** + * 根据id查询 + * + * @param id id + * @return FileRecord + */ + FileRecord getByIdRel(Integer id); + + /** + * 根据path查询 + * + * @param path 文件路径 + * @return FileRecord + */ + FileRecord getByIdPath(String path); + + /** + * 异步删除文件 + * + * @param files 文件数组 + */ + void deleteFileAsync(List files); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/LoginRecordService.java b/src/main/java/com/gxwebsoft/common/system/service/LoginRecordService.java new file mode 100644 index 0000000..1dfe4dc --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/LoginRecordService.java @@ -0,0 +1,54 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.LoginRecord; +import com.eleadmin.common.system.param.LoginRecordParam; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * 登录日志Service + * + * @author EleAdmin + * @since 2018-12-24 16:10:41 + */ +public interface LoginRecordService extends IService { + + /** + * 关联分页查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(LoginRecordParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(LoginRecordParam param); + + /** + * 根据id查询 + * + * @param id id + * @return LoginRecord + */ + LoginRecord getByIdRel(Integer id); + + /** + * 异步添加 + * + * @param username 用户账号 + * @param type 操作类型 + * @param comments 备注 + * @param tenantId 租户id + * @param request HttpServletRequest + */ + void saveAsync(String username, Integer type, String comments, Integer tenantId, HttpServletRequest request); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/MenuService.java b/src/main/java/com/gxwebsoft/common/system/service/MenuService.java new file mode 100644 index 0000000..4a4808c --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/MenuService.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.system.entity.Menu; + +/** + * 菜单Service + * + * @author EleAdmin + * @since 2018-12-24 16:10:31 + */ +public interface MenuService extends IService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/OperationRecordService.java b/src/main/java/com/gxwebsoft/common/system/service/OperationRecordService.java new file mode 100644 index 0000000..5e9068c --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/OperationRecordService.java @@ -0,0 +1,49 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.OperationRecord; +import com.eleadmin.common.system.param.OperationRecordParam; + +import java.util.List; + +/** + * 操作日志Service + * + * @author EleAdmin + * @since 2018-12-24 16:10:01 + */ +public interface OperationRecordService extends IService { + + /** + * 关联分页查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(OperationRecordParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(OperationRecordParam param); + + /** + * 根据id查询 + * + * @param id id + * @return OperationRecord + */ + OperationRecord getByIdRel(Integer id); + + /** + * 异步添加 + * + * @param operationRecord OperationRecord + */ + void saveAsync(OperationRecord operationRecord); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/OrganizationService.java b/src/main/java/com/gxwebsoft/common/system/service/OrganizationService.java new file mode 100644 index 0000000..16e8688 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/OrganizationService.java @@ -0,0 +1,42 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.Organization; +import com.eleadmin.common.system.param.OrganizationParam; + +import java.util.List; + +/** + * 组织机构Service + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +public interface OrganizationService extends IService { + + /** + * 关联分页查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(OrganizationParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(OrganizationParam param); + + /** + * 根据id查询 + * + * @param organizationId 机构id + * @return Organization + */ + Organization getByIdRel(Integer organizationId); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/RoleMenuService.java b/src/main/java/com/gxwebsoft/common/system/service/RoleMenuService.java new file mode 100644 index 0000000..912178c --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/RoleMenuService.java @@ -0,0 +1,35 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.entity.RoleMenu; + +import java.util.List; + +/** + * 角色菜单Service + * + * @author EleAdmin + * @since 2018-12-24 16:10:44 + */ +public interface RoleMenuService extends IService { + + /** + * 查询用户对应的菜单 + * + * @param userId 用户id + * @param menuType 菜单类型 + * @return List + */ + List listMenuByUserId(Integer userId, Integer menuType); + + /** + * 查询用户对应的菜单 + * + * @param roleIds 角色id + * @param menuType 菜单类型 + * @return List + */ + List listMenuByRoleIds(List roleIds, Integer menuType); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/RoleService.java b/src/main/java/com/gxwebsoft/common/system/service/RoleService.java new file mode 100644 index 0000000..1bc45d4 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/RoleService.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.system.entity.Role; + +/** + * 角色Service + * + * @author EleAdmin + * @since 2018-12-24 16:10:32 + */ +public interface RoleService extends IService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/UserFileService.java b/src/main/java/com/gxwebsoft/common/system/service/UserFileService.java new file mode 100644 index 0000000..a4a3039 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/UserFileService.java @@ -0,0 +1,14 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.system.entity.UserFile; + +/** + * 用户文件Service + * + * @author EleAdmin + * @since 2022-07-21 14:34:40 + */ +public interface UserFileService extends IService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/UserRoleService.java b/src/main/java/com/gxwebsoft/common/system/service/UserRoleService.java new file mode 100644 index 0000000..71f7598 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/UserRoleService.java @@ -0,0 +1,42 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.system.entity.Role; +import com.eleadmin.common.system.entity.UserRole; + +import java.util.List; + +/** + * 用户角色Service + * + * @author EleAdmin + * @since 2018-12-24 16:10:35 + */ +public interface UserRoleService extends IService { + + /** + * 批量添加用户角色 + * + * @param userId 用户id + * @param roleIds 角色id集合 + * @return int + */ + int saveBatch(Integer userId, List roleIds); + + /** + * 根据用户id查询角色 + * + * @param userId 用户id + * @return List + */ + List listByUserId(Integer userId); + + /** + * 批量根据用户id查询角色 + * + * @param userIds 用户id集合 + * @return List + */ + List listByUserIds(List userIds); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/UserService.java b/src/main/java/com/gxwebsoft/common/system/service/UserService.java new file mode 100644 index 0000000..81eb179 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/UserService.java @@ -0,0 +1,93 @@ +package com.eleadmin.common.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.User; +import com.eleadmin.common.system.param.UserParam; +import org.springframework.security.core.userdetails.UserDetailsService; + +import java.util.List; + +/** + * 用户Service + * + * @author EleAdmin + * @since 2018-12-24 16:10:52 + */ +public interface UserService extends IService, UserDetailsService { + + /** + * 关联分页查询用户 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(UserParam param); + + /** + * 关联查询全部用户 + * + * @param param 查询参数 + * @return List + */ + List listRel(UserParam param); + + /** + * 根据id查询用户 + * + * @param userId 用户id + * @return User + */ + User getByIdRel(Integer userId); + + /** + * 根据账号查询用户 + * + * @param username 账号 + * @return User + */ + User getByUsername(String username); + + /** + * 根据账号查询用户 + * + * @param username 账号 + * @param tenantId 租户id + * @return User + */ + User getByUsername(String username, Integer tenantId); + + /** + * 添加用户 + * + * @param user 用户信息 + * @return boolean + */ + boolean saveUser(User user); + + /** + * 修改用户 + * + * @param user 用户信息 + * @return boolean + */ + boolean updateUser(User user); + + /** + * 比较用户密码 + * + * @param dbPassword 数据库存储的密码 + * @param inputPassword 用户输入的密码 + * @return boolean + */ + boolean comparePassword(String dbPassword, String inputPassword); + + /** + * md5加密用户密码 + * + * @param password 密码明文 + * @return 密文 + */ + String encodePassword(String password); + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryDataServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryDataServiceImpl.java new file mode 100644 index 0000000..a9e114d --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryDataServiceImpl.java @@ -0,0 +1,52 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.DictionaryData; +import com.eleadmin.common.system.mapper.DictionaryDataMapper; +import com.eleadmin.common.system.param.DictionaryDataParam; +import com.eleadmin.common.system.service.DictionaryDataService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 字典数据Service实现 + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +@Service +public class DictionaryDataServiceImpl extends ServiceImpl + implements DictionaryDataService { + + @Override + public PageResult pageRel(DictionaryDataParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return new PageResult<>(baseMapper.selectPageRel(page, param), page.getTotal()); + } + + @Override + public List listRel(DictionaryDataParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return page.sortRecords(baseMapper.selectListRel(param)); + } + + @Override + public DictionaryData getByIdRel(Integer dictDataId) { + DictionaryDataParam param = new DictionaryDataParam(); + param.setDictDataId(dictDataId); + return param.getOne(baseMapper.selectListRel(param)); + } + + @Override + public DictionaryData getByDictCodeAndName(String dictCode, String dictDataName) { + List list = baseMapper.getByDictCodeAndName(dictCode, dictDataName); + return CommonUtil.listGetOne(list); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryServiceImpl.java new file mode 100644 index 0000000..75aacfc --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/DictionaryServiceImpl.java @@ -0,0 +1,18 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.system.entity.Dictionary; +import com.eleadmin.common.system.mapper.DictionaryMapper; +import com.eleadmin.common.system.service.DictionaryService; +import org.springframework.stereotype.Service; + +/** + * 字典Service实现 + * + * @author EleAdmin + * @since 2020-03-14 11:29:03 + */ +@Service +public class DictionaryServiceImpl extends ServiceImpl implements DictionaryService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/EmailRecordServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/EmailRecordServiceImpl.java new file mode 100644 index 0000000..d05342b --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/EmailRecordServiceImpl.java @@ -0,0 +1,72 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.system.entity.EmailRecord; +import com.eleadmin.common.system.mapper.EmailRecordMapper; +import com.eleadmin.common.system.service.EmailRecordService; +import org.beetl.core.Configuration; +import org.beetl.core.GroupTemplate; +import org.beetl.core.Template; +import org.beetl.core.resource.ClasspathResourceLoader; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.mail.SimpleMailMessage; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.mail.javamail.MimeMessageHelper; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; +import java.io.IOException; +import java.util.Map; + +/** + * 邮件发送记录Service实现 + * + * @author EleAdmin + * @since 2019-06-19 04:07:54 + */ +@Service +public class EmailRecordServiceImpl extends ServiceImpl + implements EmailRecordService { + // 发件邮箱 + @Value("${spring.mail.username}") + private String formEmail; + @Resource + private JavaMailSender mailSender; + + @Override + public void sendTextEmail(String title, String content, String[] toEmails) { + SimpleMailMessage message = new SimpleMailMessage(); + message.setFrom(formEmail); + message.setTo(toEmails); + message.setSubject(title); + message.setText(content); + mailSender.send(message); + } + + @Override + public void sendFullTextEmail(String title, String html, String[] toEmails) throws MessagingException { + MimeMessage mimeMessage = mailSender.createMimeMessage(); + MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true); + helper.setFrom(formEmail); + helper.setTo(toEmails); + helper.setSubject(title); + // 发送邮件 + helper.setText(html, true); + mailSender.send(mimeMessage); + } + + @Override + public void sendHtmlEmail(String title, String path, Map map, String[] toEmails) + throws MessagingException, IOException { + ClasspathResourceLoader resourceLoader = new ClasspathResourceLoader("templates/"); + Configuration cfg = Configuration.defaultConfiguration(); + GroupTemplate gt = new GroupTemplate(resourceLoader, cfg); + Template t = gt.getTemplate(path); // 加载html模板 + t.binding(map); // 填充数据 + String html = t.render(); // 获得渲染后的html + sendFullTextEmail(title, html, toEmails); // 发送邮件 + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/FileRecordServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/FileRecordServiceImpl.java new file mode 100644 index 0000000..ee73e2b --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/FileRecordServiceImpl.java @@ -0,0 +1,64 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.core.utils.CommonUtil; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.FileRecord; +import com.eleadmin.common.system.mapper.FileRecordMapper; +import com.eleadmin.common.system.param.FileRecordParam; +import com.eleadmin.common.system.service.FileRecordService; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import java.io.File; +import java.util.List; + +/** + * 文件上传记录Service实现 + * + * @author EleAdmin + * @since 2021-08-30 11:21:01 + */ +@Service +public class FileRecordServiceImpl extends ServiceImpl implements FileRecordService { + + @Override + public PageResult pageRel(FileRecordParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + return new PageResult<>(baseMapper.selectPageRel(page, param), page.getTotal()); + } + + @Override + public List listRel(FileRecordParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + return page.sortRecords(baseMapper.selectListRel(param)); + } + + @Override + public FileRecord getByIdRel(Integer id) { + FileRecordParam param = new FileRecordParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + + @Override + public FileRecord getByIdPath(String path) { + return CommonUtil.listGetOne(baseMapper.getByIdPath(path)); + } + + @Async + @Override + public void deleteFileAsync(List files) { + for (File file : files) { + try { + file.delete(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/LoginRecordServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/LoginRecordServiceImpl.java new file mode 100644 index 0000000..bf003dd --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/LoginRecordServiceImpl.java @@ -0,0 +1,78 @@ +package com.eleadmin.common.system.service.impl; + +import cn.hutool.extra.servlet.ServletUtil; +import cn.hutool.http.useragent.UserAgent; +import cn.hutool.http.useragent.UserAgentUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.LoginRecord; +import com.eleadmin.common.system.mapper.LoginRecordMapper; +import com.eleadmin.common.system.param.LoginRecordParam; +import com.eleadmin.common.system.service.LoginRecordService; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * 登录日志Service实现 + * + * @author EleAdmin + * @since 2018-12-24 16:10:14 + */ +@Service +public class LoginRecordServiceImpl extends ServiceImpl + implements LoginRecordService { + + @Override + public PageResult pageRel(LoginRecordParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + return new PageResult<>(baseMapper.selectPageRel(page, param), page.getTotal()); + } + + @Override + public List listRel(LoginRecordParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + return page.sortRecords(baseMapper.selectListRel(param)); + } + + @Override + public LoginRecord getByIdRel(Integer id) { + LoginRecordParam param = new LoginRecordParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + + @Async + @Override + public void saveAsync(String username, Integer type, String comments, Integer tenantId, + HttpServletRequest request) { + if (username == null) { + return; + } + LoginRecord loginRecord = new LoginRecord(); + loginRecord.setUsername(username); + loginRecord.setLoginType(type); + loginRecord.setComments(comments); + loginRecord.setTenantId(tenantId); + UserAgent ua = UserAgentUtil.parse(ServletUtil.getHeaderIgnoreCase(request, "User-Agent")); + if (ua != null) { + if (ua.getPlatform() != null) { + loginRecord.setOs(ua.getPlatform().toString()); + } + if (ua.getOs() != null) { + loginRecord.setDevice(ua.getOs().toString()); + } + if (ua.getBrowser() != null) { + loginRecord.setBrowser(ua.getBrowser().toString()); + } + } + loginRecord.setIp(ServletUtil.getClientIP(request)); + baseMapper.insert(loginRecord); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/MenuServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/MenuServiceImpl.java new file mode 100644 index 0000000..2e1dc8e --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/MenuServiceImpl.java @@ -0,0 +1,18 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.mapper.MenuMapper; +import com.eleadmin.common.system.service.MenuService; +import org.springframework.stereotype.Service; + +/** + * 菜单Service实现 + * + * @author EleAdmin + * @since 2018-12-24 16:10:10 + */ +@Service +public class MenuServiceImpl extends ServiceImpl implements MenuService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/OperationRecordServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/OperationRecordServiceImpl.java new file mode 100644 index 0000000..f2c89d3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/OperationRecordServiceImpl.java @@ -0,0 +1,52 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.OperationRecord; +import com.eleadmin.common.system.mapper.OperationRecordMapper; +import com.eleadmin.common.system.param.OperationRecordParam; +import com.eleadmin.common.system.service.OperationRecordService; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 操作日志Service实现 + * + * @author EleAdmin + * @since 2018-12-24 16:10:02 + */ +@Service +public class OperationRecordServiceImpl extends ServiceImpl + implements OperationRecordService { + + @Override + public PageResult pageRel(OperationRecordParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + return new PageResult<>(baseMapper.selectPageRel(page, param), page.getTotal()); + } + + @Override + public List listRel(OperationRecordParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + return page.sortRecords(baseMapper.selectListRel(param)); + } + + @Override + public OperationRecord getByIdRel(Integer id) { + OperationRecordParam param = new OperationRecordParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + + @Async + @Override + public void saveAsync(OperationRecord operationRecord) { + baseMapper.insert(operationRecord); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/OrganizationServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/OrganizationServiceImpl.java new file mode 100644 index 0000000..82c0e7f --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/OrganizationServiceImpl.java @@ -0,0 +1,45 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.entity.Organization; +import com.eleadmin.common.system.mapper.OrganizationMapper; +import com.eleadmin.common.system.param.OrganizationParam; +import com.eleadmin.common.system.service.OrganizationService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 组织机构Service实现 + * + * @author EleAdmin + * @since 2020-03-14 11:29:04 + */ +@Service +public class OrganizationServiceImpl extends ServiceImpl + implements OrganizationService { + + @Override + public PageResult pageRel(OrganizationParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return new PageResult<>(baseMapper.selectPageRel(page, param), page.getTotal()); + } + + @Override + public List listRel(OrganizationParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number"); + return page.sortRecords(baseMapper.selectListRel(param)); + } + + @Override + public Organization getByIdRel(Integer organizationId) { + OrganizationParam param = new OrganizationParam(); + param.setOrganizationId(organizationId); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/RoleMenuServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/RoleMenuServiceImpl.java new file mode 100644 index 0000000..c4bceac --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/RoleMenuServiceImpl.java @@ -0,0 +1,31 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.system.entity.Menu; +import com.eleadmin.common.system.entity.RoleMenu; +import com.eleadmin.common.system.mapper.RoleMenuMapper; +import com.eleadmin.common.system.service.RoleMenuService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 角色菜单Service实现 + * + * @author EleAdmin + * @since 2018-12-24 16:10:12 + */ +@Service +public class RoleMenuServiceImpl extends ServiceImpl implements RoleMenuService { + + @Override + public List listMenuByUserId(Integer userId, Integer menuType) { + return baseMapper.listMenuByUserId(userId, menuType); + } + + @Override + public List listMenuByRoleIds(List roleIds, Integer menuType) { + return baseMapper.listMenuByRoleIds(roleIds, menuType); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/RoleServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/RoleServiceImpl.java new file mode 100644 index 0000000..bea1c22 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/RoleServiceImpl.java @@ -0,0 +1,18 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.system.entity.Role; +import com.eleadmin.common.system.mapper.RoleMapper; +import com.eleadmin.common.system.service.RoleService; +import org.springframework.stereotype.Service; + +/** + * 角色服务实现类 + * + * @author EleAdmin + * @since 2018-12-24 16:10:11 + */ +@Service +public class RoleServiceImpl extends ServiceImpl implements RoleService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/UserFileServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/UserFileServiceImpl.java new file mode 100644 index 0000000..585e1e3 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/UserFileServiceImpl.java @@ -0,0 +1,18 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.system.mapper.UserFileMapper; +import com.eleadmin.common.system.service.UserFileService; +import com.eleadmin.common.system.entity.UserFile; +import org.springframework.stereotype.Service; + +/** + * 用户文件Service实现 + * + * @author EleAdmin + * @since 2022-07-21 14:34:40 + */ +@Service +public class UserFileServiceImpl extends ServiceImpl implements UserFileService { + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/UserRoleServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/UserRoleServiceImpl.java new file mode 100644 index 0000000..1a99e4a --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/UserRoleServiceImpl.java @@ -0,0 +1,37 @@ +package com.eleadmin.common.system.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.system.entity.Role; +import com.eleadmin.common.system.entity.UserRole; +import com.eleadmin.common.system.mapper.UserRoleMapper; +import com.eleadmin.common.system.service.UserRoleService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 用户角色Service实现 + * + * @author EleAdmin + * @since 2018-12-24 16:10:36 + */ +@Service +public class UserRoleServiceImpl extends ServiceImpl implements UserRoleService { + + + @Override + public int saveBatch(Integer userId, List roleIds) { + return baseMapper.insertBatch(userId, roleIds); + } + + @Override + public List listByUserId(Integer userId) { + return baseMapper.selectByUserId(userId); + } + + @Override + public List listByUserIds(List userIds) { + return baseMapper.selectByUserIds(userIds); + } + +} diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..5eaf7b5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java @@ -0,0 +1,181 @@ +package com.eleadmin.common.system.service.impl; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.eleadmin.common.core.web.PageParam; +import com.eleadmin.common.core.exception.BusinessException; +import com.eleadmin.common.core.web.PageResult; +import com.eleadmin.common.system.mapper.UserMapper; +import com.eleadmin.common.system.entity.Role; +import com.eleadmin.common.system.entity.User; +import com.eleadmin.common.system.entity.UserRole; +import com.eleadmin.common.system.param.UserParam; +import com.eleadmin.common.system.service.RoleMenuService; +import com.eleadmin.common.system.service.UserRoleService; +import com.eleadmin.common.system.service.UserService; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 用户Service实现 + * + * @author EleAdmin + * @since 2018-12-24 16:10:14 + */ +@Service +public class UserServiceImpl extends ServiceImpl implements UserService { + @Resource + private UserRoleService userRoleService; + @Resource + private RoleMenuService roleMenuService; + @Resource + private BCryptPasswordEncoder bCryptPasswordEncoder; + + @Override + public PageResult pageRel(UserParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + List list = baseMapper.selectPageRel(page, param); + // 查询用户的角色 + selectUserRoles(list); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(UserParam param) { + List list = baseMapper.selectListRel(param); + // 查询用户的角色 + selectUserRoles(list); + // 排序 + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + return page.sortRecords(list); + } + + @Override + public User getByIdRel(Integer userId) { + UserParam param = new UserParam(); + param.setUserId(userId); + User user = param.getOne(baseMapper.selectListRel(param)); + if (user != null) { + user.setRoles(userRoleService.listByUserId(user.getUserId())); + user.setAuthorities(roleMenuService.listMenuByUserId(user.getUserId(), null)); + } + return user; + } + + @Override + public User getByUsername(String username) { + return getByUsername(username, null); + } + + @Override + public User getByUsername(String username, Integer tenantId) { + if (StrUtil.isBlank(username)) { + return null; + } + User user = baseMapper.selectByUsername(username, tenantId); + if (user != null) { + user.setRoles(userRoleService.listByUserId(user.getUserId())); + user.setAuthorities(roleMenuService.listMenuByUserId(user.getUserId(), null)); + } + return user; + } + + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + return getByUsername(username); + } + + @Transactional(rollbackFor = {Exception.class}, isolation = Isolation.SERIALIZABLE) + @Override + public boolean saveUser(User user) { + if (StrUtil.isNotEmpty(user.getUsername()) && baseMapper.selectCount(new LambdaQueryWrapper() + .eq(User::getUsername, user.getUsername())) > 0) { + throw new BusinessException("账号已存在"); + } + if (StrUtil.isNotEmpty(user.getPhone()) && baseMapper.selectCount(new LambdaQueryWrapper() + .eq(User::getPhone, user.getPhone())) > 0) { + throw new BusinessException("手机号已存在"); + } + if (StrUtil.isNotEmpty(user.getEmail()) && baseMapper.selectCount(new LambdaQueryWrapper() + .eq(User::getEmail, user.getEmail())) > 0) { + throw new BusinessException("邮箱已存在"); + } + boolean result = baseMapper.insert(user) > 0; + if (result && user.getRoles() != null && user.getRoles().size() > 0) { + List roleIds = user.getRoles().stream().map(Role::getRoleId).collect(Collectors.toList()); + if (userRoleService.saveBatch(user.getUserId(), roleIds) < roleIds.size()) { + throw new BusinessException("用户角色添加失败"); + } + } + return result; + } + + @Transactional(rollbackFor = {Exception.class}) + @Override + public boolean updateUser(User user) { + if (StrUtil.isNotEmpty(user.getUsername()) && baseMapper.selectCount(new LambdaQueryWrapper() + .eq(User::getUsername, user.getUsername()) + .ne(User::getUserId, user.getUserId())) > 0) { + throw new BusinessException("账号已存在"); + } + if (StrUtil.isNotEmpty(user.getPhone()) && baseMapper.selectCount(new LambdaQueryWrapper() + .eq(User::getPhone, user.getPhone()) + .ne(User::getUserId, user.getUserId())) > 0) { + throw new BusinessException("手机号已存在"); + } + if (StrUtil.isNotEmpty(user.getEmail()) && baseMapper.selectCount(new LambdaQueryWrapper() + .eq(User::getEmail, user.getEmail()) + .ne(User::getUserId, user.getUserId())) > 0) { + throw new BusinessException("邮箱已存在"); + } + boolean result = baseMapper.updateById(user) > 0; + if (result && user.getRoles() != null && user.getRoles().size() > 0) { + userRoleService.remove(new LambdaUpdateWrapper().eq(UserRole::getUserId, user.getUserId())); + List roleIds = user.getRoles().stream().map(Role::getRoleId).collect(Collectors.toList()); + if (userRoleService.saveBatch(user.getUserId(), roleIds) < roleIds.size()) { + throw new BusinessException("用户角色添加失败"); + } + } + return result; + } + + @Override + public boolean comparePassword(String dbPassword, String inputPassword) { + return bCryptPasswordEncoder.matches(inputPassword, dbPassword); + } + + @Override + public String encodePassword(String password) { + return password == null ? null : bCryptPasswordEncoder.encode(password); + } + + /** + * 批量查询用户的角色 + * + * @param users 用户集合 + */ + private void selectUserRoles(List users) { + if (users != null && users.size() > 0) { + List userIds = users.stream().map(User::getUserId).collect(Collectors.toList()); + List userRoles = userRoleService.listByUserIds(userIds); + for (User user : users) { + List roles = userRoles.stream().filter(d -> user.getUserId().equals(d.getUserId())) + .collect(Collectors.toList()); + user.setRoles(roles); + } + } + } + +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..ea95916 --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,99 @@ +# 开发环境配置 + +# 服务器配置 +server: + port: 9201 + +# 数据源配置 +spring: + datasource: + url: jdbc:mysql://47.119.165.234:13308/db_paopao?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 + username: db_paopao + password: HQRkw7zM4JEiKbiY + driver-class-name: com.mysql.cj.jdbc.Driver + type: com.alibaba.druid.pool.DruidDataSource + + # redis + redis: + database: 0 + host: 47.119.165.234 + port: 16379 + password: redis_WSDb88 + + # RabbitMQ 配置 + rabbitmq: + host: 47.119.165.234 + port: 15672 + username: rabbitmq + password: rabbitmq + virtual-host: / + +# 日志配置 +logging: + level: + com.gxwebsoft: DEBUG + com.baomidou.mybatisplus: DEBUG + +socketio: + host: localhost #IP地址 + +# MQTT配置 +mqtt: + enabled: false # 添加开关来禁用MQTT服务 + host: tcp://132.232.214.96:1883 + username: swdev + password: Sw20250523 + client-id-prefix: hjm_car_ + topic: /SW_GPS/# + qos: 2 + connection-timeout: 10 + keep-alive-interval: 20 + auto-reconnect: true + +# 框架配置 +config: + # 开发环境接口 + server-url: https://server.websoft.top/api + upload-path: /Users/gxwebsoft/Documents/uploads/ # window(D:\Temp) + +# 开发环境证书配置 +certificate: + load-mode: CLASSPATH # 开发环境从classpath加载 + wechat-pay: + dev: + private-key-file: "apiclient_key.pem" + apiclient-cert-file: "apiclient_cert.pem" + wechatpay-cert-file: "wechatpay_cert.pem" + +# 应用模块微信支付配置(开发环境)- 商户号 1557418831 +app: + pay: + wx: + enabled: true + # 回调地址 + notify-url: "https://websopy-api.websoft.top/api/app/subscription/wx-notify" + # 商户号 - websopy 平台 + mch-id: "1557418831" + # 商户证书序列号 + merchant-serial-number: "372B29641147684184C840587F38053033F4A5A8" + # APIv3 密钥 + api-v3-key: "zGufUcqa7ovgxRL0kF5OlPr482EZwtn8" + # 微信支付公钥ID(使用公钥模式) + wechatpay-public-key-id: "PUB_KEY_ID_0115574188312026041800292312002000" + # 微信 AppId - 网站应用 + app-id: "wx532fccea54b27411" + # 证书根目录(项目 resources) + cert-root-path: "/Users/gxwebsoft/JAVA/websopy-java/src/main/resources" + # 商户私钥文件相对路径 + private-key-relative-path: "wechat/websopy/apiclient_key.pem" + # 微信平台证书相对路径 + wechatpay-cert-relative-path: "wechat/websopy/pub_key.pem" + # 测试模式 + test-mode: false + +# 阿里云翻译配置 +aliyun: + translate: + access-key-id: LTAI5tEsyhW4GCKbds1qsopg + access-key-secret: zltFlQrYVAoq2KMFDWgLa3GhkMNeyO + endpoint: mt.cn-hangzhou.aliyuncs.com diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..21ed046 --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,130 @@ +# 生产环境配置 +server: + port: 9500 +# 数据源配置 +spring: + datasource: + url: jdbc:mysql://1Panel-mysql-Bqdt:3306/db_paopao?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai + username: db_paopao + password: HQRkw7zM4JEiKbiY + driver-class-name: com.mysql.cj.jdbc.Driver + type: com.alibaba.druid.pool.DruidDataSource + druid: + remove-abandoned: true + + # redis + redis: + database: 0 + host: 1Panel-redis-Q1LE + port: 6379 + password: redis_WSDb88 + + # RabbitMQ 配置 + rabbitmq: + host: 1Panel-rabbitmq-kvHZ + port: 5672 + username: rabbitmq + password: rabbitmq + virtual-host: / + +# 日志配置 +logging: + file: + name: websoft-modules.log + level: + root: WARN + com.gxwebsoft: ERROR + com.baomidou.mybatisplus: ERROR + +socketio: + host: 0.0.0.0 #IP地址 + +# MQTT配置 +mqtt: + enabled: false # 启用MQTT服务 + host: tcp://132.232.214.96:1883 + username: swdev + password: Sw20250523 + client-id-prefix: hjm_car_ + topic: /SW_GPS/# + qos: 2 + connection-timeout: 10 + keep-alive-interval: 20 + auto-reconnect: true + +# 框架配置 +config: + # 文件服务器 + file-server: https://file-s209.shoplnk.cn + # 生产环境接口 + server-url: https://server.websoft.top/api + upload-path: /www/wwwroot/file.ws + + # 阿里云OSS云存储 + endpoint: https://oss-cn-shenzhen.aliyuncs.com + accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP + accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM + bucketName: oss-gxwebsoft + bucketDomain: https://oss.wsdns.cn + aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com + +# 应用模块微信支付配置(生产环境) +app: + pay: + wx: + enabled: true + # 回调地址 + notify-url: "https://websopy-api.websoft.top/api/app/subscription/wx-notify" + # 商户号 - websopy 平台 + mch-id: "1557418831" + # 商户证书序列号 + merchant-serial-number: "372B29641147684184C840587F38053033F4A5A8" + # APIv3 密钥 + api-v3-key: "zGufUcqa7ovgxRL0kF5OlPr482EZwtn8" + # 微信支付公钥ID(使用公钥模式) + wechatpay-public-key-id: "PUB_KEY_ID_0115574188312026041800292312002000" + # 微信 AppId - 网站应用 + app-id: "wx532fccea54b27411" + # 证书根目录(项目 resources) + cert-root-path: "/www/wwwroot/file.ws" + # 商户私钥文件相对路径 + private-key-relative-path: "wechat/websopy/apiclient_key.pem" + # 微信平台证书相对路径 + wechatpay-cert-relative-path: "wechat/websopy/pub_key.pem" + # 测试模式 + test-mode: false + +certificate: + load-mode: VOLUME # 生产环境从Docker挂载卷加载 + cert-root-path: /www/wwwroot/file.ws + +# 支付配置缓存 +payment: + cache: + # 支付配置缓存键前缀,生产环境使用 Payment:1* 格式 + key-prefix: "Payment:1" + # 缓存过期时间(小时) + expire-hours: 24 +# 阿里云翻译配置 +aliyun: + translate: + access-key-id: LTAI5tEsyhW4GCKbds1qsopg + access-key-secret: zltFlQrYVAoq2KMFDWgLa3GhkMNeyO + endpoint: mt.cn-hangzhou.aliyuncs.com +# MQ同步配置 +sync: + # 是否启用MQ消费者(设为false则不监听MQ消息) + mq: + enabled: true + # 本租户ID,用于验证同步消息是否属于本租户(0表示不禁用租户验证) + tenant-id: 5 + +# ==================== 阿里云实人认证配置(生产环境)==================== +cloudauth: + # 阿里云 AccessKey + accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP + accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM + # 地域ID + regionId: cn-shenzhen + # 接入点(使用通用接入点) + endpoint: cloudauth.aliyuncs.com diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml new file mode 100644 index 0000000..5c5a2b9 --- /dev/null +++ b/src/main/resources/application-test.yml @@ -0,0 +1,77 @@ +# 生产环境配置 + +# 服务器配置 +server: + port: 9300 + +# 数据源配置 +spring: + datasource: + url: jdbc:mysql://1Panel-mysql-Bqdt:3306/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai + username: modules + password: P7KsAyDXG8YdLnkA + driver-class-name: com.mysql.cj.jdbc.Driver + type: com.alibaba.druid.pool.DruidDataSource + druid: + remove-abandoned: true + + # redis + redis: + database: 0 + host: 1Panel-redis-Q1LE + port: 6379 + password: redis_WSDb88 + +# 日志配置 +logging: + file: + name: websoft-modules.log + level: + root: WARN + com.gxwebsoft: ERROR + com.baomidou.mybatisplus: ERROR + +socketio: + host: 0.0.0.0 #IP地址 + +# MQTT配置 +mqtt: + enabled: false # 启用MQTT服务 + host: tcp://132.232.214.96:1883 + username: swdev + password: Sw20250523 + client-id-prefix: hjm_car_ + topic: /SW_GPS/# + qos: 2 + connection-timeout: 10 + keep-alive-interval: 20 + auto-reconnect: true + +# 框架配置 +config: + # 文件服务器 + file-server: https://file-s209.shoplnk.cn + # 生产环境接口 + server-url: https://server.websoft.top/api + upload-path: /www/wwwroot/file.ws + + # 阿里云OSS云存储 + endpoint: https://oss-cn-shenzhen.aliyuncs.com + accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP + accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM + bucketName: oss-gxwebsoft + bucketDomain: https://oss.wsdns.cn + aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com + +# 生产环境证书配置 +certificate: + load-mode: VOLUME # 生产环境从Docker挂载卷加载 + cert-root-path: /www/wwwroot/file.ws + +# 支付配置缓存 +payment: + cache: + # 支付配置缓存键前缀,生产环境使用 Payment:1* 格式 + key-prefix: "Payment:1" + # 缓存过期时间(小时) + expire-hours: 24 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..e99c2a1 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,265 @@ +# 端口 +server: + port: 9500 +# 多环境配置 +spring: + profiles: + active: dev + + application: + name: server + + # 允许循环引用(临时解决方案) + main: + allow-circular-references: true + + # 修复 Springfox 与 Spring Boot 2.6+ 兼容性问题 + mvc: + pathmatch: + matching-strategy: ant_path_matcher + + # json时间格式设置 + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + serialization: + write-dates-as-timestamps: false + deserialization: + fail-on-unknown-properties: false + # 确保启用Java 8时间支持 + modules: + - com.fasterxml.jackson.datatype.jsr310.JavaTimeModule + + # 连接池配置 + datasource: + druid: + initial-size: 5 + min-idle: 5 + max-active: 20 + max-wait: 30000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + test-while-idle: true + test-on-borrow: true + test-on-return: false + remove-abandoned: true + remove-abandoned-timeout: 1800 + #pool-prepared-statements: false + #max-pool-prepared-statement-per-connection-size: 20 + filters: stat, wall + validation-query: SELECT 'x' + aop-patterns: com.gxwebsoft.*.*.service.* + stat-view-servlet: + url-pattern: /druid/* + reset-enable: true + login-username: admin + login-password: admin + + # 设置上传文件大小 + servlet: + multipart: + max-file-size: 100MB + max-request-size: 100MB + + # 邮件服务器配置 + mail: + host: smtp.qq.com + username: 170083662@qq.com + password: mnfokualhfaucaie + default-encoding: UTF-8 + properties: + mail: + smtp: + auth: true + socketFactory: + class: javax.net.ssl.SSLSocketFactory + port: 465 + +# Mybatis-plus配置 +mybatis-plus: + mapper-locations: classpath*:com/gxwebsoft/**/*Mapper.xml + configuration: + map-underscore-to-camel-case: true + cache-enabled: true + global-config: + :banner: false + db-config: + id-type: auto + logic-delete-value: 1 + logic-not-delete-value: 0 + +# 框架配置 +config: + open-office-home: C:/OpenOffice4/ + swagger-base-package: com.gxwebsoft + swagger-title: 网宿软件 API文档 + swagger-description: websoft - 基于java spring、vue3、antd构建的前后端分离快速开发框架 + swagger-version: 2.0 + token-key: WLgNsWJ8rPjRtnjzX/Gx2RGS80Kwnm/ZeLbvIL+NrBs= + # 主服务器 + server-url: https://server.websoft.top/api + # 文件服务器 + file-server: https://file.websoft.top + # 其他 + api-url: https://server.websoft.top/api + upload-path: /Users/gxwebsoft/Documents/uploads + local-upload-path: /Users/gxwebsoft/Documents/uploads + + # 阿里云OSS云存储 + endpoint: https://oss-cn-shenzhen.aliyuncs.com + accessKeyId: LTAI4GKGZ9Z2Z8JZ77c3GNZP + accessKeySecret: BiDkpS7UXj72HWwDWaFZxiXjNFBNCM + bucketName: oss-gxwebsoft + bucketDomain: https://oss.wsdns.cn + aliyunDomain: https://oss-gxwebsoft.oss-cn-shenzhen.aliyuncs.com + +# 商城订单配置 +shop: + order: + # 测试账号配置 + test-account: + enabled: true # 禁用测试账号功能 + phone-numbers: + - "19163679581" # 改为其他测试手机号 + test-pay-amount: 0.01 + + # 租户特殊规则配置 + # tenant-rules: + # - tenant-id: 10324 + # tenant-name: "百色中学" + # min-amount: 10 + # min-amount-message: "捐款金额最低不能少于10元,感谢您的爱心捐赠^_^" + # enabled: true + + # 默认配置 + default-config: + default-title: "订单名称" + default-comments: "暂无" + min-order-amount: 0 + order-timeout-minutes: 30 + + # 订单自动取消配置 + auto-cancel: + # 是否启用自动取消功能 + enabled: true + # 默认超时时间(分钟) + default-timeout-minutes: 30 + # 定时任务检查间隔(分钟) + check-interval-minutes: 1 + # 批量处理大小 + batch-size: 100 + # 定时任务执行时间(cron表达式) + # 生产环境:每5分钟执行一次 + cron: "0 */5 * * * ?" + + # 租户特殊配置 + # tenant-configs: + # - tenant-id: 10324 + # tenant-name: "百色中学" + # timeout-minutes: 120 # 捐款订单给更长的支付时间 + # enabled: true + # 可以添加更多租户配置 + # - tenant-id: 10550 + # tenant-name: "其他租户" + # timeout-minutes: 15 + # enabled: true + +# 证书配置 +certificate: + # 证书加载模式: CLASSPATH, FILESYSTEM, VOLUME + load-mode: CLASSPATH + # Docker挂载卷证书路径 + cert-root-path: /app/certs + # 开发环境证书路径前缀 + dev-cert-path: dev + + # 微信支付证书配置 + wechat-pay: + dev: + api-v3-key: "0kF5OlPr482EZwtn9zGufUcqa7ovgxRL" + private-key-file: "apiclient_key.pem" + apiclient-cert-file: "apiclient_cert.pem" + wechatpay-cert-file: "wechatpay_cert.pem" + prod-base-path: "/file" + cert-dir: "wechat" + + # 支付宝证书配置 + alipay: + cert-dir: "alipay" + app-private-key-file: "app_private_key.pem" + app-cert-public-key-file: "appCertPublicKey.crt" + alipay-cert-public-key-file: "alipayCertPublicKey.crt" + alipay-root-cert-file: "alipayRootCert.crt" + +# 启用 SpringDoc OpenAPI +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: true + +# LED - 排班接口(业务中台)对接配置 +led: + bme: + base-url: ${LED_BME_BASE_URL:http://16.1.4.201:7979} + appid: ${LED_BME_APPID:BQ73n58Lf} + secret-key: ${LED_BME_SECRET_KEY:jk720-DCPnGq@5t8} + mechanism-id: ${LED_BME_MECHANISM_ID:10001} + default-ext-user-id: ${LED_BME_DEFAULT_EXT_USER_ID:txzhyy} + default-hospital-id: ${LED_BME_DEFAULT_HOSPITAL_ID:} + timeout-ms: ${LED_BME_TIMEOUT_MS:10000} + +# 启用 Knife4j +knife4j: + enable: true + +# 优惠券配置 +coupon: + # 过期处理定时任务配置 + expire: + # 定时任务执行时间(cron表达式) + # 生产环境:每天凌晨2点执行 + # 开发环境:每10分钟执行一次 + cron: "0 0 2 * * ?" + # 开发环境可以设置为: "0 */10 * * * ?" + + # 状态管理配置 + status: + # 是否启用自动状态更新 + auto-update: true + # 批量处理大小 + batch-size: 1000 + +# 支付配置 +payment: + # 开发环境配置 + dev: + # 开发环境回调地址(本地调试用) + notify-url: "http://frps-10550.s209.websoft.top/api/shop/shop-order/notify" + # 开发环境是否启用环境感知 + environment-aware: true + + # 生产环境配置 + prod: + # 生产环境回调地址 + notify-url: "https://cms-api.websoft.top/api/shop/shop-order/notify" + # 生产环境是否启用环境感知 + environment-aware: false + +# MQ同步配置 +sync: + # 是否启用MQ消费者(设为false则不监听MQ消息) + mq: + enabled: false + # 本租户ID,用于验证同步消息是否属于本租户(0表示不禁用租户验证) + tenant-id: ${SYNC_TENANT_ID:0} + +# ==================== 阿里云实人认证配置 ==================== +cloudauth: + # 阿里云 AccessKey(建议使用子账号密钥) + accessKeyId: ${CLOUDAUTH_ACCESS_KEY_ID:} + accessKeySecret: ${CLOUDAUTH_ACCESS_KEY_SECRET:} + # 地域ID + regionId: cn-shenzhen + # 接入点(使用通用接入点) + endpoint: cloudauth.aliyuncs.com diff --git a/src/main/resources/wechat/10550/apiclient_cert.p12 b/src/main/resources/wechat/10550/apiclient_cert.p12 new file mode 100644 index 0000000000000000000000000000000000000000..bde6b5e92f736948bc59c9b3bead3b07377b691d GIT binary patch literal 2798 zcmY+EX*d*$8pmfCW9*cDA37MqG(?86XYZ7y8I`e?y+W2VG?uZ9Eh0<9jAd*ovQ)|z z1`)EQLYC}g-v(tl?(^Jx&%Gc1&-=W;|NFcje{cfpPX-_(oWS}T%pxCS60^qvWCrFD zSc^ae*8EdUffJY{{;9xu1SalN#LfT&oDQac8X#O0%=+&S>_9M_69hrG1m)7A3^5E0 z5I{HqG_1S#0p!Ew2RSJRPMkNV%l zAC#8k8~&`3*Ha_{*ANFt1Tx9pYy$J5@Vbuf&{X$XM+OEH#__xJFZqX2?f8vd?OYCf zs1gM0IFg;l^vW{JEOMOp{SM*|g^b*<4}?k=3;vwVxZ*i#bBw*VZfW6&D`{hD9kA{Ip6*;3L05enaL3MmjM6ZjDkbl~95g0lX#51BX*2kXW zDGZXnruEkHXEGE}VTv~%eEdu9si=dl>{&MCpwin!#*oyXI|+Yuw10nmaOqn&oUWcc z*LIWEfSEDv-Yu(mo=~B$kjm_RD{TNS@MDB*n{I3vIcoeC8b8zmIT2!%MJI%2-jNK< zTehc3EJTYG6N%9k5Sa(Kc2knPbVx?+c31LKpFZt3V;a@wAHWCa$eNiFoKx)MSIIJg z%D1o+bKd>sD!OY=xvQ@a9t-N?;osVre;Ii=Q4k^BZ8dz@pq@#?sNN>KW{@Je?U#{X z7sVX57h9n-=jA^&Tt6O1XR32E5%*(buHuo=N2*;)489h|Z~q`|g1+0(Y|1<*3Bh^r zJ;$QOL8}!=!V9PAk(e5m*hS}s%wAiUwOuT-R$r^;(-d3zMxtz@o@@}WrWfIL$6Z+~xJOspjjjrcn+tySr6O^qH6EBMV0wJCTHIR z_H&U<*4FOnZ`$jH`wjM^UD;Gdx!Q2&p5F+q^KlADfV5M^(85PKFWUHQ7rb4*I!q%!ccOziFIyiT>x^^8Y@#;uf5BT2vW3AM?DH)?) zPz)Mcrdqr%C8;cnZ*8rHAL)Gs;fS5rjbeA1q1aADPuQd%DlLMSBsbccAFFsVkH3@n zju=_CBf#%w#m2KkH&8_C=ZZ+np?j>3C?&i$`PhN=EkJR`;$v`j%|bb!XMu{rv+Pjh z;HQu^+qcfSVsF5^KiJVbI0+#Ax|4Bz;-yx7g=~r;;M(m7qIXmWUuvwj?5PL?|3`$U zigW`Jm|RY=!)b1T+5V$NRv<$j0kj4ufPVg;EgAo1ODSIdEjPczQ`la^dqrd3=hY*)gnBDI^0@ucdr106QDV|r>kB;RMEIs85!Rc2#?P2e0Wn-%xUu3_n zk7isB2D-$(*2`7Y{3?G^sp|M)<^JOmXMcyHx8-UOYQHS%hJWVU@p*Fkbaeni`OaPy zJ#~WUiWME7V@wu5afd}fRpaz~K;nk#4V8S+;T0^VN*N}Cri=Iyk6*-1*xQ<*+G?Go?^%D62H9OptxQj z_^L)?TCe5YarSbOhwyv2n zgTod)S~r^j^u>!?WS$L8lAVcbcwqK6NrlSk8*HHd4zX~NRYz%ccYE&$=*8nOJ7=TN z+4pn>fJ)wJiXVS(^HP#+*2;TR-#<90%q9Yq6;xlE9BCe<0uJwcgK!+_TiLKl%+zN7 z9yQkdb-uvpyJR+3mES8DgK621W+jiUHLA`scCz2Y7@uM9) zFG?1cI4qs0OH0!D&GYSSq+gXfKJKA_{1e#f?fY8jpn%)zmK`2$cU{<&R{~QW1>559 zrcZ+y7US}*yL*Y!Vl|VIP#RWOM+lea+q7JlVd{7#NB`jtU(H-n7hS`LfU>L8t+l*V z;HjCuPcaA1Y=^X|W?A(?xW{O2FD~4KOaIr7EPNOELA?BYMJwf7Hq_L>hEDp;VzauV zkJE6Ke~x%B$cUc<*Z}ST?g4xNP5>N05@2w;`2qX^9st+VxSUddz#X_E913RvGbwN~ oG6*vPK)eb+JYKNL3(Gm$Y@+esuA;o`hHxNAZnyejbZ;Z;-%@rb@&Et; literal 0 HcmV?d00001 diff --git a/src/main/resources/wechat/10550/apiclient_cert.pem b/src/main/resources/wechat/10550/apiclient_cert.pem new file mode 100644 index 0000000..e3b8be8 --- /dev/null +++ b/src/main/resources/wechat/10550/apiclient_cert.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEQDCCAyigAwIBAgIUK5M/fDUBShw2NkJiPkpiNks0xOswDQYJKoZIhvcNAQEL +BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT +FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg +Q0EwHhcNMjUwNzI2MTI1MjMyWhcNMzAwNzI1MTI1MjMyWjCBmTETMBEGA1UEAwwK +MTcyMzMyMTMzODEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMUUwQwYDVQQL +DDzmnZzlsJTkvK/nibnokpnlj6Tml4/oh6rmsrvljr/ml7bph4zlhpzkuJrnp5Hm +ioDmnInpmZDlhazlj7gxCzAJBgNVBAYTAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANO4sq8tWbg5Zg6ioIltG8ME +8D1V3w4SXcsqBm5ilyCBVflQTHLqTUIKtU9BeR7+SQpeArDDFEVaMfn4ZuHlHPkY +Eic7YvuHMxH82IBAt9Ryz1m9ULTvae9Z3JGWEhIPiG/FmXjrak4LUlPoHDi22pVy +XLallAacP/1O8UKFg3KaGNi5/ZrTgoDr/hHkdW1CR12PlqxAV3fSShqAhwEemHav +msRptybIJND7K97XA3UPBxP84f2FuHwlj0c1sCqwI/C4R4hDZI7ShG+BEnNcUuDD +plk3qjj3igHUX6KfZZ5V6/MWUw02inV+SH72dDKdhItLFdZlT8bpvxjjb9UYr4MC +AwEAAaOBuTCBtjAJBgNVHRMEAjAAMAsGA1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQ +MIGNoIGKoIGHhoGEaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1 +c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMwMUMzRThFQkQy +JnNnPUhBQ0M0NzFCNjU0MjJFMTJCMjdBOUQzM0E4N0FEMUNERjU5MjZFMTQwMzcx +MA0GCSqGSIb3DQEBCwUAA4IBAQAzIMqiMPT8gsJo3eEkppJPwOcA8SrPxrSJ0qV4 +/kZlu1ceClIy2aOPXDjf/LjB0I4YabU7/J8pLnXbKPKe2fSG1AycjrLEsZTOJ51M +Yahvj6sRJoC5aa+xQOj17VAVqySEg0JyK/5k6kvAulPO1dG6/YGoycAdDflJOjyd +mIHWQzlEJb5+LWQFCwskMTWy3CUF9Edw7jhgJwkl24CztocGrJ+AfJzoBTkfZmNO +TxD5gVSK00B1r7+ipS+iLXxWeHCpaRsG3PSsByWDA6pphlwr5IMghqne465gavWi +muwrpaGPdVi6+vz/QFyMelj4GT8g77VGVRCOa8DUvu0QxjTk +-----END CERTIFICATE----- diff --git a/src/main/resources/wechat/10550/apiclient_key.pem b/src/main/resources/wechat/10550/apiclient_key.pem new file mode 100644 index 0000000..d3c1495 --- /dev/null +++ b/src/main/resources/wechat/10550/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDTuLKvLVm4OWYO +oqCJbRvDBPA9Vd8OEl3LKgZuYpcggVX5UExy6k1CCrVPQXke/kkKXgKwwxRFWjH5 ++Gbh5Rz5GBInO2L7hzMR/NiAQLfUcs9ZvVC072nvWdyRlhISD4hvxZl462pOC1JT +6Bw4ttqVcly2pZQGnD/9TvFChYNymhjYuf2a04KA6/4R5HVtQkddj5asQFd30koa +gIcBHph2r5rEabcmyCTQ+yve1wN1DwcT/OH9hbh8JY9HNbAqsCPwuEeIQ2SO0oRv +gRJzXFLgw6ZZN6o494oB1F+in2WeVevzFlMNNop1fkh+9nQynYSLSxXWZU/G6b8Y +42/VGK+DAgMBAAECggEAIgBuid2RpBlrv3v0pj1kkPxRDLimut7OO1uDbuTcenbq +9MAllurz/2Ay4AiWyBh0aHrSmcqqjby/e/KdqzedYI+yEqTh75014XSm3GoIW9EY +ZcQWmwg8DhlzZ9ofCtF9yt2EGTxNdT0yOpFzPtR25DtakmajEDC1whuUeWdxxcyY +2fDnIDeyaYfWSD0MWBYCa3+8TcvM/gCYzamr/Tfj59VwsznPNr5ehkQdCCRWVMAr +gg+h6ZOta8fSPwY11T6B743f5uyUUatKH90Yvg8OgbNqoqWyuPSoXM+VF0YOQk2N +0Q0gKnQ4ReDPFPBDXLfzQ4Q7g+N+S2u12r1u6z/E6QKBgQDsAvEO4l22pV6pltX9 +DDu6qyjPrRE7wadahFDWE7Rm3ENp69Ha1DqaNMYzGzSjcVZX0eoXsBw/cfyhjlML +vxw72SRS4XdZSJ+pfrtLw8n1XcuW8xOupVD0s9oLLB2dBXcJeytCM5UITZZHbJei +Y90Rlg88Ud7evO9kaENIouYc/QKBgQDlpx1t2qmjQcaXS1Ohe09ovCzxIr3jv8LQ +TQkM3wS9RdfOqX3MynnCopBlEYgxJFORQx2pzT1TmGtg5UOGP6Reck64oI8C+Vjt +AkFlODk1JCjeSgoR1zw1+KEwOZ9x2jswC1E3oZsFU+FdbrdyBiCyHRAXfWX3QW8y +CQIu6gnmfwKBgEALLE7Vroh5p45tl/Pq9epZt+FjHWIR0tAFR8pP3oxrCQAdNf0j +yiM+XupPX6FaiAucsuFqsL+mtt9AN9jgK1EyQ2EaPcDErE7aTQjqQEuNAEod/CFQ +Sv+cLncJqZ+KdBrmiX6VcMOoCjeniB5Q6xRym//KV6gprOyaPmffjIIhAoGAc1qQ +7rgyE34bma1NkcRVq98xl+ICjd6ppWW8kQmI4OWvM/Bw7ygZJwnvC8VVqpF7pHCY ++szL7CyYazBdzZY0Ivi50AVeMHk9ELfcT1KBcc769EUub620YcvEc2vOSir7JfPZ +VN9I9dEfV4YggRbQ34a3qYTkbeEhUHmz7grC9FMCgYBOanMGgmxLyRkrJdFvSgr5 +cBFeUxyr2jqgNrNbE77d5yB1lbgtWKQuokszSaxdnxGnsANSYdeF1FVI9zhcaqJf +xB2xOMesrNksZ4C+fKkSgmeofXi+D5aWYIZVuj73KInzJsvpci7z8qLK6/RjZsyF +TomCc7Iv0ufa1OirExFaNA== +-----END PRIVATE KEY----- diff --git a/src/main/resources/wechat/10584/apiclient_cert.p12 b/src/main/resources/wechat/10584/apiclient_cert.p12 new file mode 100644 index 0000000000000000000000000000000000000000..12a8815a90057eb2986ae783ae9181afcfc17f4b GIT binary patch literal 2774 zcmY+^cQhN076Cg_j~V;d+xd4d(Zvz1IM!uFfuT~@$A_wZ1PctQNO_qAclNA zdpr=&9&-{$!tuMzoF&6fJf8bmC&_Y6oO8ljyAYE0B_3Olfjg?yXB@tLF7 zY)S>W1vnSz2bSELLoOgag>PL6xTl|;3mKH?ge2y+vg%l*h3j?*_S z;d=qI@I?pQQ3F>7)w}B&7ya|2ktBSV*7@aZ_$HBA-yX%~|1Gwhc-ijl4U;axJQdh*73u~8E?^}fK~n>{=lnJ1t<%b4bK+G)9tb&2XUQpu}2i^^V>#0iCG8@FVLo4|3^>v zL5zMj&ErrMV%huskU1aXJ70~w|KVB$N@SzR2Cea>=SaKfed;mv^-o;)>UKo2bt_kI zAJEcRuf4b!oCCNH;$-uBz@IB^jXP$q6AYP04kJ7R+w^(_sly>}*HT~GjM472b*!9v z747#Y)->Myg2w_(Ey)-%=|qMn<$c}#G2H+q!>D|Iy|T)mIVB2@?-(M*>#1SNwmW(5 zkMGcgu)JwvOo73U33YAxI6(2U^5rve+19nGuh3Y!x2SM&4XWQRu=C;Ay)v0GMG%c3 z4nVd-OohF54HXNkr0_c0))Vppeou&|Jb zB)WsA%hiza5l;FtBt|gB(G~G>?mWaae`PjKpA|D7q80Gq+_lE}evW{b)cPDbg@>Wm znW!F_3hN`Oi!b{{3_OJHtN8#|kWP*39hC30{eX05STLD0)<4gt(jMrNtE0P12g{4K z?b>}+I(VGstLdsQ#{zF{1Laj=e=v7;4@qzGJHt$J-Pq3+ivO6&b?W!oyS|nMM2^}& z+9nLO1wjlJ!9}w7##Nmf*)a3=Nq#wVL+J}xJIaXk?(^)yxu(f}x-TY_+o=V%t$@Hq zaA6{_r(---M)}x;G+E+5ZR+)!m2`3)T`HDQo>9@QoH1t%EkZ#SK2V%@vdVOtIW+yG zLPZi$!h$Xf^fter#x5T&d~OI5@Y@UU+}=8ioul29D@M8bp3bxCI=o5$+v>5feq%1>gI5)ND zzcKNXq&R#DnN%6|!1fcslTARgFG+AaNzd^LP*msI?a8n2`uOMY%E!&)byVn_Q- zt$Q&e#uFclaFgY|3kH4^R<-kQXY2EcGtaMHN)=Tui!=8s=5pV`?jKxsPI+;zvZmCm^ls}fpJf667o`t-1@ z_uijQ@8DOy3?49?Itzww-k2oQaZiTMSEo`vvb!SBqjkTKBlS={Kx7(IdNT{tn*#rV z;km5I2uLnz4eCuIghG~L(xWO9o=BSZ-Ig-fUK@8S@fpHS=+J*ZGrDu_FMuZ}A*__t z3DrXvn5fr;fWl4jy%`y{sxw46RT&Ac$2eU|*>c3EKix;{SCZek@U8Pz{nd!C>ou3B z*~b&C-ekEoiHmk#{dM1~kqV(E^uyVJJWlz2A3c{CKFt>5HQp`nbk?2fdInVjfWnXEBF}Zq-^7cWa z_;Z4DAU(5s?=ZhoL1Qc9R+1w+1Nbd2#A>w@&Dh38v3ToqntU;BppPMqXOy?F`#L#J z8$&YW2p6D32C6946IE3as}8Blc`6`m5XV}nWVc8#_?`FFMN9?xX80fpvLYVkxR9=8&yIwm)*6!$|@vufdlI0i;waezN?O1?vpehV=Esb@wVUElAH2zkqCx<_zi@C zZUaTiWFEiM+(@bZ{q_8o++^Af#T1i4kFO8`YTjb*))pb+K=l+IR0~D4%vWS3yCD}a zOC2*Hut1nGOUH<5_$W^YS|fRVnK;S8Bw)Z;7<*_5Pnph{sPnyucRZ|v6k!DmYo-@3 zA$hZ&y9{k7AHHf?kR=!|P4<^Pf`&w&EiW_usWr4@|G+6q5hwWO!~D9Jvdyr=)0`_w zvh9+;Q?F?D9DiyT6MLaX=C%YTjFh-my|K<)b~jP zZjn{TrVkU+S-#0^jH|PFX)yPn<(=Z3e`lZD;bK=CT`{`kATK`Ntf}K+wx#vwCM8S~ zMavS1du$$?5=Q%)=EN?^I;pc*>C8Ot|BaDft#(DN3jF9mAW3_BS*j(NQr6qxXBGj? z82tqXZsI>9PQ6v))U?4vaAE3tzWiHtIRVg;b_wr#A$GGAN%ey+=U)Z2$%Af)i|uPW zaM|}s);H4B=r4oBsS1}C5eL!Vym1!Z>-sseGI;?e=qUx$3uRXX8kEKh!hfilw>|q# z!oL>|o3w8!VrUo*{)F!&x_s>RVsdFCOW=HmJ zI>p6vFMi#y6|*1N$9{{go=!O8?6J-I((1W_n(*?=o*2o->TH&j4-8p8Km>1)%*x-A zBn9xFxVZOgpL0pO@7QU*!TIFJnNWMB^m&Z^OYYX!NLpDr3m28$T5R%PZhHGrw;c`}97& zy_P%4&Ggh;G3ET)+bu7KWebT6RHl#iVscmOlqk^MEthKc(n{6Q5RrNrm|1nxk(R0h zT;{(zvI(dP0{MNr5LC~a%k<*qRpZ7oQw*r!>IC?{!GOd RZ#|F|`_kEJ^F@jFzW^N#98~}S literal 0 HcmV?d00001 diff --git a/src/main/resources/wechat/10584/apiclient_cert.pem b/src/main/resources/wechat/10584/apiclient_cert.pem new file mode 100644 index 0000000..e2375aa --- /dev/null +++ b/src/main/resources/wechat/10584/apiclient_cert.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEKDCCAxCgAwIBAgIUUisXtVfIYqUelps2dgzNls4s1hMwDQYJKoZIhvcNAQEL +BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT +FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg +Q0EwHhcNMjYwMTE1MDYxNzIyWhcNMzEwMTE0MDYxNzIyWjCBgTETMBEGA1UEAwwK +MTczNzkxMDY5NTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMS0wKwYDVQQL +DCTlub/opb/ojonpppnllYbotLjmnInpmZDotKPku7vlhazlj7gxCzAJBgNVBAYT +AkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAODqyiexyXEDBUjD5g6ssIZf7I+b44IBw2M9tB9cJYuJJqAKk+Zt1hWm +C2kQsgztka0+Ptk3cbBKkmyo8DZQNdg49GXB56mwtCOgqiayXJzdHbu/DhCkhjfO +xTEa0fh+LH1ZMr40OLAUdtKBgjQcSOOqPAH7s12DP26eYR7dI8YCovvrSgdHVivd +AtFn0Ecuo0Z7EjzU4oISW15l8RGB1KC4keYTKDlh2CxsGjG1LzOkMMCjakhwBqHk +PVBIDmHeb5uukhAM3rrWD4K8/5qOfaIVt4PVagpOsDSKCEKGMo7udEBR8fusx3CK +RKzyQ2JDWCJr8gtK2cMi45m5fM92kYUCAwEAAaOBuTCBtjAJBgNVHRMEAjAAMAsG +A1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDovL2V2Y2Eu +aXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRC +MDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJFMTJCMjdB +OUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IBAQCPgKC3 +xjmbMLkFCvqJ0YTIxzP2MJlUTD6Rda1Otvqg89M/XQMbmIQl3aWmJAK508PnRVDB +lTwEJO0oXuRS3163uOw/fNl4F1jHO9ulkpIKqGzuARSmciV8zgHSnTjBEYHQpUXk +s2GIhRTpuysYgF+OeNbl0nZGzF7IChlo3Asw0Il5rH1yrleb7+SaaSyK3OCTgXe4 +n6duk1uYsw5aZupdOnKe4POvzGQrumGuA/Yuwq2H4bFGoNxYyHkcdZKR/t9Aa1G6 +1domZv4xJNDOppkvNuy+hcLUZ/R1xf05XgqckzYFnKRJn2TZaHluoUumcR6VtI22 +6YjKJAPEWS/8WFsJ +-----END CERTIFICATE----- diff --git a/src/main/resources/wechat/10584/apiclient_key.pem b/src/main/resources/wechat/10584/apiclient_key.pem new file mode 100644 index 0000000..da7395d --- /dev/null +++ b/src/main/resources/wechat/10584/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDg6sonsclxAwVI +w+YOrLCGX+yPm+OCAcNjPbQfXCWLiSagCpPmbdYVpgtpELIM7ZGtPj7ZN3GwSpJs +qPA2UDXYOPRlweepsLQjoKomslyc3R27vw4QpIY3zsUxGtH4fix9WTK+NDiwFHbS +gYI0HEjjqjwB+7Ndgz9unmEe3SPGAqL760oHR1Yr3QLRZ9BHLqNGexI81OKCElte +ZfERgdSguJHmEyg5YdgsbBoxtS8zpDDAo2pIcAah5D1QSA5h3m+brpIQDN661g+C +vP+ajn2iFbeD1WoKTrA0ighChjKO7nRAUfH7rMdwikSs8kNiQ1gia/ILStnDIuOZ +uXzPdpGFAgMBAAECggEAcQzysYMGWpyHEm0M/MFGNTSP5hsX/qe+Ouqv17dsU7eL +R5QphQAeRGFiiNvQcvkSaP7JfksFBPRmpuE/ZD1q4xS1m1Qcikl8MhA2lh6+uEXY +BR9iBXF82R5ANY9ijMF2wUaNX9dFyxNuKh7YgDLbXDubz+9g15b50jMfY/EJYyPM +j/dQgqBvOp9xaao9PcOsME7lo69lnT15pH4DAKpKaGfqwJB9t63hdNRkXugrZRz6 +76709ijG54hgZwa+IXtSKYMPthWtU6rL//UuS1veudOvlKhQp8hSDy6ef2pArtW2 +UHD5AUrcWvOSMcoDr6+m7+/HrBqZuIqJrZJPIWmoHQKBgQD9NvBxEPiQGKfF8znG +YGqvpm7Nj4M6WKVfQcYfUVmOalSqA7wfDKCxTMG567LFAAjVqOrTIX8y5bUq9vzi +mdijlC/jzNivmezQg7KpM1ZHfojxOTuWBgxf3Ir0MjBisars8gXFneohCCyxkVD6 +UrSkrtLJu1+jarneBeaKApgTPwKBgQDjZCnyWhv+/ipViKBdka0gkVf4dyjIzghU +Y2Dh0xQdUEZFnq/8Y7GzfDMdED/+XshAUJXyrv911Huq9Dt4r6Hb0H6R9ygwhFib +Jvn/+vI4kOAwvAy0ISlMeDoo2iuE1ICUfirmcbvsNGfyy5UOox6VvJUUmsl6SkuU +7dtKH2deOwKBgBuq+iDQouhT2Vk213RGqsGgpPDPIp6oewFqlXRsliWKls+w8shN +v+0/ntdq2rDN7SkzeN0zBswP73jPXhiAiPxuv8DbbD3bytWJ3mbAlkffmqUJBOrC +pG2BEqnWJhVSpoOXemv6ck/DreaFI10G1ng8Jgom8C9SBRcue99Oo0FPAoGAMg9v +HKex2iVidIoro+3aS30z/MNe+zZApzNptM2fdASkM9eHruzTxkvlhNR7AikjtOUI +3fCg1PP+ddhm717bJ2VzN/dNpcC9MQsXpr88bC+Y66G6uj1Ctk8RnsTJJ+kQlaBh +GXKYiJvQ9qbTHfHTXeuydmLNUFri4NqsmFjpjNkCgYEA5jMAgVfy/IiW75+O+gKk +vJePA0yD+C3Sdsx6bWfBFsUrhOIOdKZ/lVpTe2R8TOi69IVe/7Ro318zvek4sEXL +eP968JMwas9q0Jemeq8lXryj9W9hnC3LGTfDyniGcU0azRjddf/87nBf6denow7s +t1/5GxlhAkgJQIO/lKOLmBU= +-----END PRIVATE KEY----- diff --git a/src/test/java/com/gxwebsoft/WebSoftApplicationTests.java b/src/test/java/com/gxwebsoft/WebSoftApplicationTests.java new file mode 100644 index 0000000..5a024f5 --- /dev/null +++ b/src/test/java/com/gxwebsoft/WebSoftApplicationTests.java @@ -0,0 +1,13 @@ +package com.gxwebsoft; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +public class WebSoftApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/src/test/java/com/gxwebsoft/generator/AppGenerator.java b/src/test/java/com/gxwebsoft/generator/AppGenerator.java new file mode 100644 index 0000000..5e09126 --- /dev/null +++ b/src/test/java/com/gxwebsoft/generator/AppGenerator.java @@ -0,0 +1,474 @@ +package com.gxwebsoft.generator; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.InjectionConfig; +import com.baomidou.mybatisplus.generator.config.*; +import com.baomidou.mybatisplus.generator.config.po.TableInfo; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; +import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.regex.Pattern; +import java.util.regex.Matcher; + +/** + * CMS模块-代码生成工具 + * + * @author WebSoft + * @since 2021-09-05 00:31:14 + */ +public class AppGenerator { + // 输出位置 + private static final String OUTPUT_LOCATION = System.getProperty("user.dir"); + //private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径 + // JAVA输出目录 + private static final String OUTPUT_DIR = "/src/main/java"; + // Vue文件输出位置 + private static final String OUTPUT_LOCATION_VUE = "/Users/gxwebsoft/VUE/paopao-admin"; + // UniApp文件输出目录 + private static final String OUTPUT_LOCATION_UNIAPP = "/Users/gxwebsoft/VUE/paopao-uniapp"; + // Vue文件输出目录 + private static final String OUTPUT_DIR_VUE = "/src"; + // 作者名称 + private static final String AUTHOR = "科技小王子"; + // 是否在xml中添加二级缓存配置 + private static final boolean ENABLE_CACHE = false; + // 数据库连接配置 + private static final String DB_URL = "jdbc:mysql://47.119.165.234:13308/db_paopao?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; + private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; + private static final String DB_USERNAME = "db_paopao"; + private static final String DB_PASSWORD = "HQRkw7zM4JEiKbiY"; + // 包名 + private static final String PACKAGE_NAME = "com.gxwebsoft"; + // 模块名 + private static final String MODULE_NAME = "app"; + // 需要生成的表 + private static final String[] TABLE_NAMES = new String[]{ +// "shop_spec", +// "shop_spec_value", +// "shop_goods", +// "shop_category", +// "shop_goods_spec", +// "shop_goods_sku", +// "shop_goods_category", +// "shop_coupon", +// "shop_goods_description", +// "shop_goods_log", +// "shop_goods_relation", +// "shop_goods_comment", +// "shop_goods_rule", +// "shop_brand", +// "shop_merchant", +// "shop_merchant_type", +// "shop_merchant_apply", +// "shop_merchant_account", +// "shop_chat_message", +// "shop_chat_conversation", +// "shop_user_collection", +// "shop_goods_role_commission" +// "shop_commission_role" +// "shop_order", +// "shop_order_info", +// "shop_order_info_log", +// "shop_order_goods", +// "shop_wechat_deposit", +// "shop_users", +// "shop_user_address", +// "shop_user_balance_log", +// "shop_recharge_order", + // 经销商表 +// "shop_dealer_apply", +// "shop_dealer_capital", +// "shop_dealer_order", +// "shop_dealer_referee", +// "shop_dealer_setting", +// "shop_dealer_user", +// "shop_user_referee", +// "shop_dealer_withdraw", +// "shop_user_coupon", +// "shop_cart", +// "shop_count", +// "shop_order_delivery", +// "shop_order_delivery_goods", +// "shop_order_extract", +// "shop_splash", +// "shop_goods_income_config" +// "shop_express", +// "shop_express_template", +// "shop_express_template_detail", +// "shop_gift" +// "shop_article" +// ============ paopao 本项目数据表 ============ + "app_user", + "app_user_address", + "app_member_level", + "app_user_member_order", + "app_product_category", + "app_product_brand", + "app_product_spec", + "app_product_spec_value", + "app_product", + "app_product_sku", + "app_cart", + "app_order", + "app_order_item", + "app_order_payment", + "app_order_refund", + "app_points_record", + "app_signin_record", + "app_coupon", + "app_user_coupon", + "app_points_product", + "app_points_order", + "app_distribution_relation", + "app_commission_record", + "app_commission_withdraw", + "app_activity", + "app_activity_signup", + "app_store", + "app_stringing_appointment", + "app_banner", + "app_article", + "app_notification", + "app_admin_user", + "app_role", + "app_system_config", + "app_file_upload", + "app_recharge_record", + "app_fund_flow", + "app_points_config", + "app_signin_config" + }; + // 需要去除的表前缀 + private static final String[] TABLE_PREFIX = new String[]{ + "tb_" + }; + // 不需要作为查询参数的字段 + private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{ + "tenant_id", + "create_time", + "update_time" + }; + // 查询参数使用String的类型 + private static final String[] PARAM_TO_STRING_TYPE = new String[]{ + "Date", + "LocalDate", + "LocalTime", + "LocalDateTime" + }; + // 查询参数使用EQ的类型 + private static final String[] PARAM_EQ_TYPE = new String[]{ + "Integer", + "Boolean", + "BigDecimal" + }; + // 是否添加权限注解 + private static final boolean AUTH_ANNOTATION = true; + // 是否添加日志注解 + private static final boolean LOG_ANNOTATION = true; + // controller的mapping前缀 + private static final String CONTROLLER_MAPPING_PREFIX = "/api"; + // 模板所在位置 + private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates"; + + public static void main(String[] args) { + // 代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 全局配置 + GlobalConfig gc = new GlobalConfig(); + gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR); + gc.setAuthor(AUTHOR); + gc.setOpen(false); + gc.setFileOverride(true); + gc.setEnableCache(ENABLE_CACHE); + gc.setSwagger2(true); + gc.setIdType(IdType.AUTO); + gc.setServiceName("%sService"); + mpg.setGlobalConfig(gc); + + // 数据源配置 + DataSourceConfig dsc = new DataSourceConfig(); + dsc.setUrl(DB_URL); + // dsc.setSchemaName("public"); + dsc.setDriverName(DB_DRIVER); + dsc.setUsername(DB_USERNAME); + dsc.setPassword(DB_PASSWORD); + mpg.setDataSource(dsc); + + // 包配置 + PackageConfig pc = new PackageConfig(); + pc.setModuleName(MODULE_NAME); + pc.setParent(PACKAGE_NAME); + mpg.setPackageInfo(pc); + + // 策略配置 + StrategyConfig strategy = new StrategyConfig(); + strategy.setNaming(NamingStrategy.underline_to_camel); + strategy.setColumnNaming(NamingStrategy.underline_to_camel); + strategy.setInclude(TABLE_NAMES); + strategy.setTablePrefix(TABLE_PREFIX); + strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController"); + strategy.setEntityLombokModel(true); + strategy.setRestControllerStyle(true); + strategy.setControllerMappingHyphenStyle(true); + strategy.setLogicDeleteFieldName("deleted"); + mpg.setStrategy(strategy); + + // 模板配置 + TemplateConfig templateConfig = new TemplateConfig(); + templateConfig.setController(TEMPLATES_DIR + "/controller.java"); + templateConfig.setEntity(TEMPLATES_DIR + "/entity.java"); + templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java"); + templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml"); + templateConfig.setService(TEMPLATES_DIR + "/service.java"); + templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java"); + mpg.setTemplate(templateConfig); + mpg.setTemplateEngine(new BeetlTemplateEnginePlus()); + + // 自定义模板配置 + InjectionConfig cfg = new InjectionConfig() { + @Override + public void initMap() { + Map map = new HashMap<>(); + map.put("packageName", PACKAGE_NAME); + map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS); + map.put("paramToStringType", PARAM_TO_STRING_TYPE); + map.put("paramEqType", PARAM_EQ_TYPE); + map.put("authAnnotation", AUTH_ANNOTATION); + map.put("logAnnotation", LOG_ANNOTATION); + map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX); + // 添加项目类型标识,用于模板中的条件判断 + map.put("isUniApp", false); // Vue 项目 + map.put("isVueAdmin", true); // 后台管理项目 + this.setMap(map); + } + }; + String templatePath = TEMPLATES_DIR + "/param.java.btl"; + List focList = new ArrayList<>(); + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION + OUTPUT_DIR + "/" + + PACKAGE_NAME.replace(".", "/") + + "/" + pc.getModuleName() + "/param/" + + tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA; + } + }); + /** + * 以下是生成VUE项目代码 + * 生成文件的路径 /api/shop/goods/index.ts + */ + templatePath = TEMPLATES_DIR + "/index.ts.btl"; + + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.ts"; + } + }); + // UniApp 使用专门的模板 + String uniappTemplatePath = TEMPLATES_DIR + "/index.ts.uniapp.btl"; + focList.add(new FileOutConfig(uniappTemplatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.ts"; + } + }); + // 生成TS文件 (/api/shop/goods/model/index.ts) + templatePath = TEMPLATES_DIR + "/model.ts.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/model/" + "index.ts"; + } + }); + // UniApp 使用专门的 model 模板 + String uniappModelTemplatePath = TEMPLATES_DIR + "/model.ts.uniapp.btl"; + focList.add(new FileOutConfig(uniappModelTemplatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/model/" + "index.ts"; + } + }); + // 生成Vue文件(/views/shop/goods/index.vue) + templatePath = TEMPLATES_DIR + "/index.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.vue"; + } + }); + + // 生成components文件(/views/shop/goods/components/edit.vue) + templatePath = TEMPLATES_DIR + "/components.edit.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/components/" + tableInfo.getEntityPath() + "Edit.vue"; + } + }); + + // 生成components文件(/views/shop/goods/components/search.vue) + templatePath = TEMPLATES_DIR + "/components.search.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/components/" + "search.vue"; + } + }); + + // ========== 移动端页面文件生成 ========== + // 生成移动端列表页面配置文件 (/src/shop/goods/index.config.ts) + templatePath = TEMPLATES_DIR + "/index.config.ts.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE + + "/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.config.ts"; + } + }); + + // 生成移动端列表页面组件文件 (/src/shop/goods/index.tsx) + templatePath = TEMPLATES_DIR + "/index.tsx.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE + + "/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.tsx"; + } + }); + + // 生成移动端新增/编辑页面配置文件 (/src/shop/goods/add.config.ts) + templatePath = TEMPLATES_DIR + "/add.config.ts.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE + + "/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "add.config.ts"; + } + }); + + // 生成移动端新增/编辑页面组件文件 (/src/shop/goods/add.tsx) + templatePath = TEMPLATES_DIR + "/add.tsx.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE + + "/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "add.tsx"; + } + }); + + cfg.setFileOutConfigList(focList); + mpg.setCfg(cfg); + + mpg.execute(); + + // 自动更新 app.config.ts + updateAppConfig(TABLE_NAMES, MODULE_NAME); + } + + /** + * 自动更新 app.config.ts 文件,添加新生成的页面路径 + */ + private static void updateAppConfig(String[] tableNames, String moduleName) { + String appConfigPath = OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE + "/app.config.ts"; + + try { + // 读取原文件内容 + String content = new String(Files.readAllBytes(Paths.get(appConfigPath))); + + // 为每个表生成页面路径 + StringBuilder newPages = new StringBuilder(); + for (String tableName : tableNames) { + String entityPath = tableName.replaceAll("_", ""); + // 转换为驼峰命名 + String[] parts = tableName.split("_"); + StringBuilder camelCase = new StringBuilder(parts[0]); + for (int i = 1; i < parts.length; i++) { + camelCase.append(parts[i].substring(0, 1).toUpperCase()).append(parts[i].substring(1)); + } + entityPath = camelCase.toString(); + + newPages.append(" '").append(entityPath).append("/index',\n"); + newPages.append(" '").append(entityPath).append("/add',\n"); + } + + // 查找对应模块的子包配置 + String modulePattern = "\"root\":\\s*\"" + moduleName + "\",\\s*\"pages\":\\s*\\[([^\\]]*)]"; + Pattern pattern = Pattern.compile(modulePattern, Pattern.DOTALL); + Matcher matcher = pattern.matcher(content); + + if (matcher.find()) { + String existingPages = matcher.group(1); + + // 检查页面是否已存在,避免重复添加 + boolean needUpdate = false; + String[] newPageArray = newPages.toString().split("\n"); + for (String newPage : newPageArray) { + if (!newPage.trim().isEmpty() && !existingPages.contains(newPage.trim().replace(" ", "").replace(",", ""))) { + needUpdate = true; + break; + } + } + + if (needUpdate) { + // 备份原文件 + String backupPath = appConfigPath + ".backup." + System.currentTimeMillis(); + Files.copy(Paths.get(appConfigPath), Paths.get(backupPath)); + System.out.println("已备份原文件到: " + backupPath); + + // 在现有页面列表末尾添加新页面 + String updatedPages = existingPages.trim(); + if (!updatedPages.endsWith(",")) { + updatedPages += ","; + } + updatedPages += "\n" + newPages.toString().trim(); + + // 替换内容 + String updatedContent = content.replace(matcher.group(1), updatedPages); + + // 写入更新后的内容 + Files.write(Paths.get(appConfigPath), updatedContent.getBytes()); + + System.out.println("✅ 已自动更新 app.config.ts,添加了以下页面路径:"); + System.out.println(newPages.toString()); + } else { + System.out.println("ℹ️ app.config.ts 中已包含所有页面路径,无需更新"); + } + } else { + System.out.println("⚠️ 未找到 " + moduleName + " 模块的子包配置,请手动添加页面路径"); + } + + } catch (Exception e) { + System.err.println("❌ 更新 app.config.ts 失败: " + e.getMessage()); + e.printStackTrace(); + } + } + +} diff --git a/src/test/java/com/gxwebsoft/generator/engine/BeetlTemplateEnginePlus.java b/src/test/java/com/gxwebsoft/generator/engine/BeetlTemplateEnginePlus.java new file mode 100644 index 0000000..1a73826 --- /dev/null +++ b/src/test/java/com/gxwebsoft/generator/engine/BeetlTemplateEnginePlus.java @@ -0,0 +1,50 @@ +package com.gxwebsoft.generator.engine; + +import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder; +import com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine; +import org.beetl.core.Configuration; +import org.beetl.core.GroupTemplate; +import org.beetl.core.Template; +import org.beetl.core.resource.FileResourceLoader; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Map; + +/** + * Beetl模板引擎实现文件输出 + * + * @author WebSoft + * @since 2021-09-05 00:30:28 + */ +public class BeetlTemplateEnginePlus extends AbstractTemplateEngine { + private GroupTemplate groupTemplate; + + @Override + public AbstractTemplateEngine init(ConfigBuilder configBuilder) { + super.init(configBuilder); + try { + Configuration cfg = Configuration.defaultConfiguration(); + groupTemplate = new GroupTemplate(new FileResourceLoader(), cfg); + } catch (IOException e) { + logger.error(e.getMessage(), e); + } + return this; + } + + @Override + public void writer(Map objectMap, String templatePath, String outputFile) throws Exception { + Template template = groupTemplate.getTemplate(templatePath); + try (FileOutputStream fileOutputStream = new FileOutputStream(outputFile)) { + template.binding(objectMap); + template.renderTo(fileOutputStream); + } + logger.debug("模板:" + templatePath + "; 文件:" + outputFile); + } + + @Override + public String templateFilePath(String filePath) { + return filePath + ".btl"; + } + +} diff --git a/src/test/java/com/gxwebsoft/generator/templates/add.config.ts.btl b/src/test/java/com/gxwebsoft/generator/templates/add.config.ts.btl new file mode 100644 index 0000000..a93cafd --- /dev/null +++ b/src/test/java/com/gxwebsoft/generator/templates/add.config.ts.btl @@ -0,0 +1,4 @@ +export default definePageConfig({ + navigationBarTitleText: '新增${table.comment!'数据'}', + navigationBarTextStyle: 'black' +}) diff --git a/src/test/java/com/gxwebsoft/generator/templates/add.tsx.btl b/src/test/java/com/gxwebsoft/generator/templates/add.tsx.btl new file mode 100644 index 0000000..73055da --- /dev/null +++ b/src/test/java/com/gxwebsoft/generator/templates/add.tsx.btl @@ -0,0 +1,115 @@ +import {useEffect, useState, useRef} from "react"; +import {useRouter} from '@tarojs/taro' +import {Button, Loading, CellGroup, Input, TextArea, Form} from '@nutui/nutui-react-taro' +import Taro from '@tarojs/taro' +import {View} from '@tarojs/components' +import {${entity}} from "@/api/${package.ModuleName}/${table.entityPath}/model"; +import {get${entity}, list${entity}, update${entity}, add${entity}} from "@/api/${package.ModuleName}/${table.entityPath}"; + +const Add${entity} = () => { + const {params} = useRouter(); + const [loading, setLoading] = useState(true) + const [FormData, setFormData] = useState<${entity}>({}) + const formRef = useRef(null) + + const reload = async () => { + if (params.id) { + const data = await get${entity}(Number(params.id)) + setFormData(data) + } else { + setFormData({}) + } + } + + // 提交表单 + const submitSucceed = async (values: any) => { + try { + if (params.id) { + // 编辑模式 + await update${entity}({ + ...values, + id: Number(params.id) + }) + } else { + // 新增模式 + await add${entity}(values) + } + + Taro.showToast({ + title: `操作成功`, + icon: 'success' + }) + + setTimeout(() => { + return Taro.navigateBack() + }, 1000) + } catch (error) { + Taro.showToast({ + title: `操作失败`, + icon: 'error' + }); + } + } + + const submitFailed = (error: any) => { + console.log(error, 'err...') + } + + useEffect(() => { + reload().then(() => { + setLoading(false) + }) + }, []); + + if (loading) { + return 加载中 + } + + return ( + <> +
submitSucceed(values)} + onFinishFailed={(errors) => submitFailed(errors)} + footer={ +
+ +
+ } + > + +<% for(field in table.fields){ %> +<% if(field.propertyName != 'id' && field.propertyName != 'createTime' && field.propertyName != 'updateTime'){ %> + +<% if(field.propertyType == 'String' && field.comment?? && (field.comment?contains('描述') || field.comment?contains('备注') || field.comment?contains('内容'))){ %> +