From e6bf5ff995808269059719269cf788aaa94a4670 Mon Sep 17 00:00:00 2001 From: "12691282@qq.com" <12691282@qq.com> Date: Wed, 16 Oct 2024 11:15:07 +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 | 8 + Dockerfile | 10 + LICENSE | 191 ++ eladmin-common/pom.xml | 26 + .../zhengjie/annotation/AnonymousAccess.java | 30 + .../java/me/zhengjie/annotation/Limit.java | 49 + .../rest/AnonymousDeleteMapping.java | 91 + .../annotation/rest/AnonymousGetMapping.java | 90 + .../rest/AnonymousPatchMapping.java | 91 + .../annotation/rest/AnonymousPostMapping.java | 91 + .../annotation/rest/AnonymousPutMapping.java | 91 + .../java/me/zhengjie/aspect/LimitAspect.java | 99 + .../java/me/zhengjie/aspect/LimitType.java | 27 + .../java/me/zhengjie/base/BaseEntity.java | 79 + .../me/zhengjie/config/AuditorConfig.java | 45 + .../me/zhengjie/config/AuthorityConfig.java | 37 + .../me/zhengjie/config/FileProperties.java | 60 + .../me/zhengjie/config/MultipartConfig.java | 47 + .../java/me/zhengjie/config/RedisConfig.java | 222 +++ .../me/zhengjie/config/RsaProperties.java | 38 + .../me/zhengjie/config/SwaggerConfig.java | 105 + .../config/mybatis/MyMetaObjectHandler.java | 55 + .../config/mybatis/MybatisPlusConfig.java | 42 + .../exception/BadConfigurationException.java | 98 + .../exception/BadRequestException.java | 40 + .../exception/EntityExistException.java | 34 + .../exception/EntityNotFoundException.java | 34 + .../zhengjie/exception/handler/ApiError.java | 49 + .../handler/GlobalExceptionHandler.java | 113 ++ .../main/java/me/zhengjie/utils/CacheKey.java | 58 + .../main/java/me/zhengjie/utils/CallBack.java | 43 + .../java/me/zhengjie/utils/CloseUtil.java | 47 + .../main/java/me/zhengjie/utils/DateUtil.java | 169 ++ .../java/me/zhengjie/utils/ElConstant.java | 34 + .../java/me/zhengjie/utils/EncryptUtils.java | 100 + .../main/java/me/zhengjie/utils/FileUtil.java | 395 ++++ .../java/me/zhengjie/utils/HttpSendUtil.java | 130 ++ .../java/me/zhengjie/utils/PageResult.java | 16 + .../main/java/me/zhengjie/utils/PageUtil.java | 70 + .../java/me/zhengjie/utils/RedisUtils.java | 725 +++++++ .../java/me/zhengjie/utils/RequestHolder.java | 33 + .../main/java/me/zhengjie/utils/RsaUtils.java | 198 ++ .../java/me/zhengjie/utils/SecurityUtils.java | 99 + .../zhengjie/utils/SpringContextHolder.java | 156 ++ .../java/me/zhengjie/utils/StringUtils.java | 240 +++ .../java/me/zhengjie/utils/ThrowableUtil.java | 37 + .../me/zhengjie/utils/enums/CodeBiEnum.java | 50 + .../me/zhengjie/utils/enums/CodeEnum.java | 46 + .../zhengjie/utils/enums/DataScopeEnum.java | 53 + .../utils/enums/RequestMethodEnum.java | 74 + .../java/me/zhengjie/utils/DateUtilsTest.java | 26 + .../me/zhengjie/utils/EncryptUtilsTest.java | 33 + .../java/me/zhengjie/utils/FileUtilTest.java | 36 + .../me/zhengjie/utils/StringUtilsTest.java | 48 + eladmin-generator/pom.xml | 39 + .../java/me/zhengjie/domain/ColumnInfo.java | 77 + .../java/me/zhengjie/domain/GenConfig.java | 78 + .../java/me/zhengjie/domain/vo/TableInfo.java | 48 + .../me/zhengjie/mapper/ColumnInfoMapper.java | 39 + .../me/zhengjie/mapper/GenConfigMapper.java | 31 + .../me/zhengjie/rest/GenConfigController.java | 51 + .../me/zhengjie/rest/GeneratorController.java | 101 + .../me/zhengjie/service/GenConfigService.java | 41 + .../me/zhengjie/service/GeneratorService.java | 94 + .../service/impl/GenConfigServiceImpl.java | 69 + .../service/impl/GeneratorServiceImpl.java | 161 ++ .../main/java/me/zhengjie/utils/ColUtil.java | 54 + .../main/java/me/zhengjie/utils/GenUtil.java | 417 ++++ .../src/main/resources/generator.properties | 27 + .../resources/mapper/ColumnInfoMapper.xml | 49 + .../main/resources/mapper/GenConfigMapper.xml | 27 + .../resources/template/admin/Controller.ftl | 89 + .../main/resources/template/admin/Entity.ftl | 68 + .../resources/template/admin/Mapper-xml.ftl | 62 + .../main/resources/template/admin/Mapper.ftl | 37 + .../template/admin/QueryCriteria.ftl | 45 + .../main/resources/template/admin/Service.ftl | 75 + .../resources/template/admin/ServiceImpl.ftl | 105 + .../src/main/resources/template/front/api.ftl | 27 + .../main/resources/template/front/index.ftl | 169 ++ eladmin-logging/pom.xml | 22 + .../main/java/me/zhengjie/annotation/Log.java | 31 + .../java/me/zhengjie/aspect/LogAspect.java | 98 + .../main/java/me/zhengjie/domain/SysLog.java | 78 + .../domain/vo/SysLogQueryCriteria.java | 37 + .../java/me/zhengjie/mapper/SysLogMapper.java | 42 + .../me/zhengjie/rest/SysLogController.java | 111 ++ .../me/zhengjie/service/SysLogService.java | 95 + .../service/impl/SysLogServiceImpl.java | 169 ++ .../main/resources/mapper/SysLogMapper.xml | 69 + eladmin-system/pom.xml | 108 + .../src/main/java/me/zhengjie/AppRun.java | 65 + .../me/zhengjie/config/ConfigurerAdapter.java | 88 + .../RelaxedQueryCharsConnectorCustomizer.java | 31 + .../me/zhengjie/config/WebSocketConfig.java | 33 + .../config/thread/AsyncTaskProperties.java | 59 + .../config/thread/CustomExecutorConfig.java | 52 + .../me/zhengjie/modules/mnt/domain/App.java | 67 + .../zhengjie/modules/mnt/domain/Database.java | 57 + .../zhengjie/modules/mnt/domain/Deploy.java | 67 + .../modules/mnt/domain/DeployHistory.java | 60 + .../zhengjie/modules/mnt/domain/Server.java | 79 + .../mnt/domain/vo/AppQueryCriteria.java | 32 + .../mnt/domain/vo/DatabaseQueryCriteria.java | 34 + .../domain/vo/DeployHistoryQueryCriteria.java | 34 + .../mnt/domain/vo/DeployQueryCriteria.java | 36 + .../mnt/domain/vo/ServerQueryCriteria.java | 32 + .../modules/mnt/mapper/AppMapper.java | 39 + .../modules/mnt/mapper/DatabaseMapper.java | 39 + .../mnt/mapper/DeployHistoryMapper.java | 38 + .../modules/mnt/mapper/DeployMapper.java | 41 + .../mnt/mapper/DeployServerMapper.java | 38 + .../modules/mnt/mapper/ServerMapper.java | 39 + .../modules/mnt/rest/AppController.java | 88 + .../modules/mnt/rest/DatabaseController.java | 123 ++ .../modules/mnt/rest/DeployController.java | 157 ++ .../mnt/rest/DeployHistoryController.java | 69 + .../modules/mnt/rest/ServerController.java | 96 + .../modules/mnt/service/AppService.java | 77 + .../modules/mnt/service/DatabaseService.java | 83 + .../mnt/service/DeployHistoryService.java | 70 + .../modules/mnt/service/DeployService.java | 111 ++ .../modules/mnt/service/ServerService.java | 91 + .../mnt/service/impl/AppServiceImpl.java | 119 ++ .../mnt/service/impl/DatabaseServiceImpl.java | 102 + .../impl/DeployHistoryServiceImpl.java | 84 + .../mnt/service/impl/DeployServiceImpl.java | 425 ++++ .../mnt/service/impl/ServerServiceImpl.java | 113 ++ .../modules/mnt/util/DataTypeEnum.java | 140 ++ .../modules/mnt/util/ExecuteShellUtil.java | 101 + .../modules/mnt/util/ScpClientUtil.java | 105 + .../zhengjie/modules/mnt/util/SqlUtils.java | 201 ++ .../modules/mnt/websocket/MsgType.java | 31 + .../modules/mnt/websocket/SocketMsg.java | 33 + .../mnt/websocket/WebSocketServer.java | 134 ++ .../modules/quartz/config/JobRunner.java | 51 + .../modules/quartz/config/QuartzConfig.java | 66 + .../modules/quartz/domain/QuartzJob.java | 85 + .../modules/quartz/domain/QuartzLog.java | 63 + .../domain/vo/QuartzJobQueryCriteria.java | 34 + .../quartz/mapper/QuartzJobMapper.java | 41 + .../quartz/mapper/QuartzLogMapper.java | 38 + .../quartz/rest/QuartzJobController.java | 141 ++ .../quartz/service/QuartzJobService.java | 120 ++ .../service/impl/QuartzJobServiceImpl.java | 192 ++ .../modules/quartz/task/TestTask.java | 41 + .../modules/quartz/utils/ExecutionJob.java | 133 ++ .../modules/quartz/utils/QuartzManage.java | 177 ++ .../modules/quartz/utils/QuartzRunnable.java | 58 + .../config/ConfigBeanConfiguration.java | 43 + .../security/config/SpringSecurityConfig.java | 188 ++ .../security/config/bean/LoginCode.java | 61 + .../security/config/bean/LoginCodeEnum.java | 43 + .../security/config/bean/LoginProperties.java | 125 ++ .../config/bean/SecurityProperties.java | 72 + .../modules/security/dto/TokenDTO.java | 8 + .../rest/AuthorizationController.java | 158 ++ .../security/rest/OnlineController.java | 70 + .../security/JwtAccessDeniedHandler.java | 37 + .../security/JwtAuthenticationEntryPoint.java | 39 + .../security/security/TokenConfigurer.java | 43 + .../security/security/TokenFilter.java | 109 ++ .../security/security/TokenProvider.java | 136 ++ .../security/service/OnlineUserService.java | 149 ++ .../security/service/UserCacheManager.java | 82 + .../service/UserDetailsServiceImpl.java | 72 + .../security/service/dto/AuthUserDto.java | 39 + .../security/service/dto/AuthorityDto.java | 34 + .../security/service/dto/JwtUserDto.java | 80 + .../security/service/dto/OnlineUserDto.java | 73 + .../zhengjie/modules/system/domain/Dept.java | 102 + .../zhengjie/modules/system/domain/Dict.java | 54 + .../modules/system/domain/DictDetail.java | 58 + .../zhengjie/modules/system/domain/Job.java | 72 + .../zhengjie/modules/system/domain/Menu.java | 123 ++ .../zhengjie/modules/system/domain/Role.java | 89 + .../zhengjie/modules/system/domain/User.java | 119 ++ .../system/domain/bo/TransactionBO.java | 32 + .../system/domain/dto/AssetConfigDTO.java | 23 + .../system/domain/dto/AssetCountDTO.java | 40 + .../system/domain/dto/AssetUpdateDTO.java | 24 + .../domain/dto/AssetUpdateStatusDTO.java | 12 + .../modules/system/domain/dto/AstlistDTO.java | 23 + .../system/domain/dto/DepartmentDTO.java | 16 + .../system/domain/dto/LevelConfigDTO.java | 20 + .../modules/system/domain/dto/MemberDTO.java | 29 + .../modules/system/domain/dto/PageDTO.java | 11 + .../system/domain/dto/ProMemberDTO.java | 12 + .../modules/system/domain/dto/TeamDTO.java | 26 + .../system/domain/dto/UpDownTeamDTO.java | 12 + .../modules/system/domain/vo/AccountVO.java | 34 + .../modules/system/domain/vo/AssetVO.java | 33 + .../modules/system/domain/vo/CountVO.java | 31 + .../system/domain/vo/DeptQueryCriteria.java | 40 + .../domain/vo/DictDetailQueryCriteria.java | 30 + .../system/domain/vo/DictQueryCriteria.java | 32 + .../system/domain/vo/JobQueryCriteria.java | 36 + .../modules/system/domain/vo/MemberVO.java | 44 + .../modules/system/domain/vo/MenuMetaVo.java | 35 + .../system/domain/vo/MenuQueryCriteria.java | 36 + .../modules/system/domain/vo/MenuVo.java | 45 + .../system/domain/vo/RoleQueryCriteria.java | 36 + .../modules/system/domain/vo/UserPassVo.java | 31 + .../system/domain/vo/UserQueryCriteria.java | 47 + .../modules/system/mapper/AssetMapper.java | 62 + .../modules/system/mapper/CountMapper.java | 34 + .../modules/system/mapper/DeptMapper.java | 47 + .../system/mapper/DictDetailMapper.java | 40 + .../modules/system/mapper/DictMapper.java | 35 + .../modules/system/mapper/JobMapper.java | 41 + .../system/mapper/MemParameterMapper.java | 7 + .../modules/system/mapper/MemberMapper.java | 25 + .../modules/system/mapper/MenuMapper.java | 54 + .../modules/system/mapper/RoleDeptMapper.java | 34 + .../modules/system/mapper/RoleMapper.java | 50 + .../modules/system/mapper/RoleMenuMapper.java | 36 + .../modules/system/mapper/TeamMapper.java | 26 + .../modules/system/mapper/UserJobMapper.java | 34 + .../modules/system/mapper/UserMapper.java | 64 + .../modules/system/mapper/UserRoleMapper.java | 34 + .../modules/system/rest/AssetController.java | 122 ++ .../modules/system/rest/CountController.java | 34 + .../modules/system/rest/DeptController.java | 128 ++ .../modules/system/rest/DictController.java | 101 + .../system/rest/DictDetailController.java | 96 + .../modules/system/rest/JobController.java | 95 + .../modules/system/rest/LimitController.java | 47 + .../system/rest/MemParameterController.java | 15 + .../modules/system/rest/MemberController.java | 60 + .../modules/system/rest/MenuController.java | 154 ++ .../system/rest/MonitorController.java | 45 + .../modules/system/rest/RoleController.java | 153 ++ .../modules/system/rest/TeamController.java | 53 + .../modules/system/rest/UserController.java | 210 ++ .../modules/system/rest/VerifyController.java | 76 + .../modules/system/service/AssetService.java | 29 + .../modules/system/service/CountService.java | 8 + .../modules/system/service/DataService.java | 34 + .../modules/system/service/DeptService.java | 124 ++ .../system/service/DictDetailService.java | 65 + .../modules/system/service/DictService.java | 76 + .../modules/system/service/JobService.java | 89 + .../system/service/MemParameterService.java | 4 + .../modules/system/service/MemberService.java | 18 + .../modules/system/service/MenuService.java | 119 ++ .../system/service/MonitorService.java | 31 + .../modules/system/service/RoleService.java | 131 ++ .../modules/system/service/TeamService.java | 13 + .../modules/system/service/UserService.java | 136 ++ .../modules/system/service/VerifyService.java | 41 + .../system/service/impl/AssetServiceImpl.java | 266 +++ .../system/service/impl/CountServiceImpl.java | 97 + .../system/service/impl/DataServiceImpl.java | 90 + .../system/service/impl/DeptServiceImpl.java | 276 +++ .../service/impl/DictDetailServiceImpl.java | 91 + .../system/service/impl/DictServiceImpl.java | 123 ++ .../system/service/impl/JobServiceImpl.java | 117 ++ .../service/impl/MemParameterServiceImpl.java | 12 + .../service/impl/MemberServiceImpl.java | 66 + .../system/service/impl/MenuServiceImpl.java | 344 ++++ .../service/impl/MonitorServiceImpl.java | 192 ++ .../system/service/impl/RoleServiceImpl.java | 226 +++ .../system/service/impl/TeamServiceImpl.java | 68 + .../system/service/impl/UserServiceImpl.java | 290 +++ .../service/impl/VerifyServiceImpl.java | 81 + eladmin-system/src/main/resources/banner.txt | 8 + .../main/resources/config/application-dev.yml | 123 ++ .../resources/config/application-prod.yml | 125 ++ .../resources/config/application-quartz.yml | 29 + .../src/main/resources/config/application.yml | 61 + .../src/main/resources/generator.properties | 27 + .../main/resources/log4jdbc.log4j2.properties | 4 + eladmin-system/src/main/resources/logback.xml | 45 + .../main/resources/mapper/mnt/AppMapper.xml | 37 + .../resources/mapper/mnt/DatabaseMapper.xml | 36 + .../mapper/mnt/DeployHistoryMapper.xml | 39 + .../resources/mapper/mnt/DeployMapper.xml | 94 + .../mapper/mnt/DeployServerMapper.xml | 33 + .../resources/mapper/mnt/ServerMapper.xml | 47 + .../mapper/quartz/QuartzJobMapper.xml | 49 + .../mapper/quartz/QuartzLogMapper.xml | 40 + .../resources/mapper/system/AssetMapper.xml | 249 +++ .../resources/mapper/system/CountMapper.xml | 46 + .../resources/mapper/system/DeptMapper.xml | 70 + .../mapper/system/DictDetailMapper.xml | 53 + .../resources/mapper/system/DictMapper.xml | 59 + .../resources/mapper/system/JobMapper.xml | 36 + .../resources/mapper/system/MemberMapper.xml | 109 ++ .../resources/mapper/system/MenuMapper.xml | 79 + .../mapper/system/RoleDeptMapper.xml | 25 + .../resources/mapper/system/RoleMapper.xml | 125 ++ .../mapper/system/RoleMenuMapper.xml | 30 + .../resources/mapper/system/TeamMapper.xml | 77 + .../resources/mapper/system/UserJobMapper.xml | 25 + .../resources/mapper/system/UserMapper.xml | 178 ++ .../mapper/system/UserRoleMapper.xml | 25 + .../src/main/resources/template/email.ftl | 48 + .../src/main/resources/template/taskAlarm.ftl | 69 + .../EladminSystemApplicationTests.java | 16 + eladmin-tools/pom.xml | 50 + .../java/me/zhengjie/domain/AlipayConfig.java | 74 + .../java/me/zhengjie/domain/EmailConfig.java | 57 + .../java/me/zhengjie/domain/LocalStorage.java | 72 + .../java/me/zhengjie/domain/QiniuConfig.java | 68 + .../java/me/zhengjie/domain/QiniuContent.java | 59 + .../java/me/zhengjie/domain/vo/EmailVo.java | 44 + .../domain/vo/LocalStorageQueryCriteria.java | 32 + .../domain/vo/QiniuQueryCriteria.java | 32 + .../java/me/zhengjie/domain/vo/TradeVo.java | 63 + .../zhengjie/mapper/AliPayConfigMapper.java | 30 + .../me/zhengjie/mapper/EmailConfigMapper.java | 30 + .../zhengjie/mapper/LocalStorageMapper.java | 38 + .../me/zhengjie/mapper/QiniuConfigMapper.java | 31 + .../zhengjie/mapper/QiniuContentMapper.java | 41 + .../me/zhengjie/rest/AliPayController.java | 135 ++ .../me/zhengjie/rest/EmailController.java | 63 + .../zhengjie/rest/LocalStorageController.java | 99 + .../me/zhengjie/rest/QiniuController.java | 124 ++ .../me/zhengjie/service/AliPayService.java | 58 + .../me/zhengjie/service/EmailService.java | 49 + .../zhengjie/service/LocalStorageService.java | 77 + .../zhengjie/service/QiNiuConfigService.java | 44 + .../zhengjie/service/QiniuContentService.java | 94 + .../service/impl/AliPayServiceImpl.java | 118 ++ .../service/impl/EmailServiceImpl.java | 106 + .../service/impl/LocalStorageServiceImpl.java | 122 ++ .../service/impl/QiNiuConfigServiceImpl.java | 66 + .../service/impl/QiniuContentServiceImpl.java | 202 ++ .../me/zhengjie/utils/AliPayStatusEnum.java | 46 + .../java/me/zhengjie/utils/AlipayUtils.java | 85 + .../java/me/zhengjie/utils/QiNiuUtil.java | 71 + .../resources/mapper/LocalStorageMapper.xml | 41 + .../resources/mapper/QiniuContentMapper.xml | 41 + pom.xml | 229 +++ sql/code_column_config.sql | 63 + sql/code_gen_config.sql | 43 + sql/crm.sql | 1741 +++++++++++++++++ sql/mnt_app.sql | 44 + sql/mnt_database.sql | 41 + sql/mnt_deploy.sql | 39 + sql/mnt_deploy_history.sql | 38 + sql/mnt_deploy_server.sql | 35 + sql/mnt_server.sql | 43 + sql/sys_dept.sql | 51 + sql/sys_dict.sql | 42 + sql/sys_dict_detail.sql | 48 + sql/sys_job.sql | 46 + sql/sys_menu.sql | 116 ++ sql/sys_quartz_job.sql | 53 + sql/sys_quartz_log.sql | 42 + sql/sys_role.sql | 46 + sql/sys_roles_depts.sql | 39 + sql/sys_roles_menus.sql | 166 ++ sql/sys_user.sql | 60 + sql/sys_users_jobs.sql | 38 + sql/sys_users_roles.sql | 39 + sql/tool_alipay_config.sql | 44 + sql/tool_email_config.sql | 38 + sql/tool_local_storage.sql | 43 + sql/tool_picture.sql | 44 + sql/tool_qiniu_config.sql | 39 + sql/tool_qiniu_content.sql | 41 + 362 files changed, 28867 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 eladmin-common/pom.xml create mode 100644 eladmin-common/src/main/java/me/zhengjie/annotation/AnonymousAccess.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/annotation/Limit.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousDeleteMapping.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousGetMapping.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPostMapping.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/FileProperties.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/MultipartConfig.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/RedisConfig.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/RsaProperties.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/SwaggerConfig.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/exception/BadConfigurationException.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/CacheKey.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/CallBack.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/CloseUtil.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/ElConstant.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/HttpSendUtil.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/PageResult.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/RequestHolder.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/RsaUtils.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/SecurityUtils.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/SpringContextHolder.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/ThrowableUtil.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeBiEnum.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeEnum.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/enums/DataScopeEnum.java create mode 100644 eladmin-common/src/main/java/me/zhengjie/utils/enums/RequestMethodEnum.java create mode 100644 eladmin-common/src/test/java/me/zhengjie/utils/DateUtilsTest.java create mode 100644 eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java create mode 100644 eladmin-common/src/test/java/me/zhengjie/utils/FileUtilTest.java create mode 100644 eladmin-common/src/test/java/me/zhengjie/utils/StringUtilsTest.java create mode 100644 eladmin-generator/pom.xml create mode 100644 eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/domain/vo/TableInfo.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/mapper/ColumnInfoMapper.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/mapper/GenConfigMapper.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/service/impl/GenConfigServiceImpl.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/service/impl/GeneratorServiceImpl.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java create mode 100644 eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java create mode 100644 eladmin-generator/src/main/resources/generator.properties create mode 100644 eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml create mode 100644 eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml create mode 100644 eladmin-generator/src/main/resources/template/admin/Controller.ftl create mode 100644 eladmin-generator/src/main/resources/template/admin/Entity.ftl create mode 100644 eladmin-generator/src/main/resources/template/admin/Mapper-xml.ftl create mode 100644 eladmin-generator/src/main/resources/template/admin/Mapper.ftl create mode 100644 eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl create mode 100644 eladmin-generator/src/main/resources/template/admin/Service.ftl create mode 100644 eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl create mode 100644 eladmin-generator/src/main/resources/template/front/api.ftl create mode 100644 eladmin-generator/src/main/resources/template/front/index.ftl create mode 100644 eladmin-logging/pom.xml create mode 100644 eladmin-logging/src/main/java/me/zhengjie/annotation/Log.java create mode 100644 eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java create mode 100644 eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java create mode 100644 eladmin-logging/src/main/java/me/zhengjie/domain/vo/SysLogQueryCriteria.java create mode 100644 eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java create mode 100644 eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java create mode 100644 eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java create mode 100644 eladmin-logging/src/main/java/me/zhengjie/service/impl/SysLogServiceImpl.java create mode 100644 eladmin-logging/src/main/resources/mapper/SysLogMapper.xml create mode 100644 eladmin-system/pom.xml create mode 100644 eladmin-system/src/main/java/me/zhengjie/AppRun.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/config/ConfigurerAdapter.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/config/RelaxedQueryCharsConnectorCustomizer.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/config/WebSocketConfig.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/config/thread/AsyncTaskProperties.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/config/thread/CustomExecutorConfig.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/AppQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DatabaseQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployHistoryQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/ServerQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/JobRunner.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/QuartzConfig.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzJob.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzLog.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/vo/QuartzJobQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/rest/QuartzJobController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/QuartzJobService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/TestTask.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/ExecutionJob.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzManage.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzRunnable.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/config/ConfigBeanConfiguration.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/config/SpringSecurityConfig.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCode.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCodeEnum.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginProperties.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/SecurityProperties.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/dto/TokenDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/rest/AuthorizationController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/rest/OnlineController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAccessDeniedHandler.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAuthenticationEntryPoint.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenConfigurer.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenFilter.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/service/OnlineUserService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserCacheManager.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthUserDto.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthorityDto.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/JwtUserDto.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/OnlineUserDto.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/DictDetail.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Job.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Menu.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/bo/TransactionBO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetConfigDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetCountDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateStatusDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AstlistDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/DepartmentDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/LevelConfigDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/MemberDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/PageDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/ProMemberDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/TeamDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/UpDownTeamDTO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AccountVO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AssetVO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/CountVO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DeptQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictDetailQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/JobQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MemberVO.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuMetaVo.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/RoleQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserPassVo.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/AssetMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/CountMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DeptMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictDetailMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/JobMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemParameterMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemberMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MenuMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleDeptMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMenuMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/TeamMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserJobMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserRoleMapper.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/AssetController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/CountController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DeptController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictDetailController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/JobController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/LimitController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemParameterController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemberController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MenuController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MonitorController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/RoleController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/TeamController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/rest/VerifyController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/AssetService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/CountService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/DataService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/DeptService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictDetailService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/JobService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemParameterService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemberService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/MenuService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/MonitorService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/RoleService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/TeamService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/UserService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/VerifyService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/AssetServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CountServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DataServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemParameterServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemberServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MonitorServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/TeamServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java create mode 100644 eladmin-system/src/main/resources/banner.txt create mode 100644 eladmin-system/src/main/resources/config/application-dev.yml create mode 100644 eladmin-system/src/main/resources/config/application-prod.yml create mode 100644 eladmin-system/src/main/resources/config/application-quartz.yml create mode 100644 eladmin-system/src/main/resources/config/application.yml create mode 100644 eladmin-system/src/main/resources/generator.properties create mode 100644 eladmin-system/src/main/resources/log4jdbc.log4j2.properties create mode 100644 eladmin-system/src/main/resources/logback.xml create mode 100644 eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/quartz/QuartzJobMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/quartz/QuartzLogMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/AssetMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/CountMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/DeptMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/DictDetailMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/DictMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/JobMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/MemberMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/MenuMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/RoleDeptMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/RoleMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/RoleMenuMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/TeamMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/UserJobMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/UserMapper.xml create mode 100644 eladmin-system/src/main/resources/mapper/system/UserRoleMapper.xml create mode 100644 eladmin-system/src/main/resources/template/email.ftl create mode 100644 eladmin-system/src/main/resources/template/taskAlarm.ftl create mode 100644 eladmin-system/src/test/java/me/zhengjie/EladminSystemApplicationTests.java create mode 100644 eladmin-tools/pom.xml create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/EmailConfig.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/vo/EmailVo.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/vo/LocalStorageQueryCriteria.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/vo/QiniuQueryCriteria.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/domain/vo/TradeVo.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/EmailService.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/LocalStorageService.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/QiNiuConfigService.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/QiniuContentService.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuConfigServiceImpl.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/service/impl/QiniuContentServiceImpl.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/utils/AliPayStatusEnum.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java create mode 100644 eladmin-tools/src/main/java/me/zhengjie/utils/QiNiuUtil.java create mode 100644 eladmin-tools/src/main/resources/mapper/LocalStorageMapper.xml create mode 100644 eladmin-tools/src/main/resources/mapper/QiniuContentMapper.xml create mode 100644 pom.xml create mode 100644 sql/code_column_config.sql create mode 100644 sql/code_gen_config.sql create mode 100644 sql/crm.sql create mode 100644 sql/mnt_app.sql create mode 100644 sql/mnt_database.sql create mode 100644 sql/mnt_deploy.sql create mode 100644 sql/mnt_deploy_history.sql create mode 100644 sql/mnt_deploy_server.sql create mode 100644 sql/mnt_server.sql create mode 100644 sql/sys_dept.sql create mode 100644 sql/sys_dict.sql create mode 100644 sql/sys_dict_detail.sql create mode 100644 sql/sys_job.sql create mode 100644 sql/sys_menu.sql create mode 100644 sql/sys_quartz_job.sql create mode 100644 sql/sys_quartz_log.sql create mode 100644 sql/sys_role.sql create mode 100644 sql/sys_roles_depts.sql create mode 100644 sql/sys_roles_menus.sql create mode 100644 sql/sys_user.sql create mode 100644 sql/sys_users_jobs.sql create mode 100644 sql/sys_users_roles.sql create mode 100644 sql/tool_alipay_config.sql create mode 100644 sql/tool_email_config.sql create mode 100644 sql/tool_local_storage.sql create mode 100644 sql/tool_picture.sql create mode 100644 sql/tool_qiniu_config.sql create mode 100644 sql/tool_qiniu_content.sql diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d52737e --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +### IDEA ### +~/* +.idea/* +*.iml +*/target/* +*/*.iml +/.gradle/ +/application.pid \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..34f7e21 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM harbor.enterx.cc/base/jdk11 + +WORKDIR /bitcloud/ +COPY ./eladmin-system/target/eladmin-system-1.1.jar /bitcloud/app.jar + +ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el7_8.x86_64 +ENV JAVA_OPTS="" + +EXPOSE 8000 +ENTRYPOINT exec java ${JAVA_OPTS} -jar app.jar \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ca38718 --- /dev/null +++ b/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "{}" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright 2019-2020 Zheng Jie + + Licensed 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 + + http://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. \ No newline at end of file diff --git a/eladmin-common/pom.xml b/eladmin-common/pom.xml new file mode 100644 index 0000000..a8a3fe7 --- /dev/null +++ b/eladmin-common/pom.xml @@ -0,0 +1,26 @@ + + + + eladmin + me.zhengjie + 1.1 + + 4.0.0 + + 5.8.21 + + + eladmin-common + 公共模块 + + + + + cn.hutool + hutool-all + ${hutool.version} + + + \ No newline at end of file diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/AnonymousAccess.java b/eladmin-common/src/main/java/me/zhengjie/annotation/AnonymousAccess.java new file mode 100644 index 0000000..b2c168f --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/AnonymousAccess.java @@ -0,0 +1,30 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.annotation; + +import java.lang.annotation.*; + +/** + * @author jacky + * 用于标记匿名访问方法 + */ +@Inherited +@Documented +@Target({ElementType.METHOD,ElementType.ANNOTATION_TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface AnonymousAccess { + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/Limit.java b/eladmin-common/src/main/java/me/zhengjie/annotation/Limit.java new file mode 100644 index 0000000..58b41cf --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/Limit.java @@ -0,0 +1,49 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.annotation; + +import me.zhengjie.aspect.LimitType; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author jacky + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Limit { + + // 资源名称,用于描述接口功能 + String name() default ""; + + // 资源 key + String key() default ""; + + // key prefix + String prefix() default ""; + + // 时间的,单位秒 + int period(); + + // 限制访问次数 + int count(); + + // 限制类型 + LimitType limitType() default LimitType.CUSTOMER; + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousDeleteMapping.java b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousDeleteMapping.java new file mode 100644 index 0000000..6a81c2e --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousDeleteMapping.java @@ -0,0 +1,91 @@ +/* + * Copyright 2002-2016 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ + +package me.zhengjie.annotation.rest; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import me.zhengjie.annotation.AnonymousAccess; +import org.springframework.core.annotation.AliasFor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Annotation for mapping HTTP {@code DELETE} requests onto specific handler + * methods. + * 支持匿名访问 DeleteMapping + * + * @author liaojinlong + * @see AnonymousGetMapping + * @see AnonymousPostMapping + * @see AnonymousPutMapping + * @see AnonymousPatchMapping + * @see RequestMapping + */ +@AnonymousAccess +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@RequestMapping(method = RequestMethod.DELETE) +public @interface AnonymousDeleteMapping { + + /** + * Alias for {@link RequestMapping#name}. + */ + @AliasFor(annotation = RequestMapping.class) + String name() default ""; + + /** + * Alias for {@link RequestMapping#value}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] value() default {}; + + /** + * Alias for {@link RequestMapping#path}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] path() default {}; + + /** + * Alias for {@link RequestMapping#params}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] params() default {}; + + /** + * Alias for {@link RequestMapping#headers}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] headers() default {}; + + /** + * Alias for {@link RequestMapping#consumes}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] consumes() default {}; + + /** + * Alias for {@link RequestMapping#produces}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] produces() default {}; + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousGetMapping.java b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousGetMapping.java new file mode 100644 index 0000000..c260a71 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousGetMapping.java @@ -0,0 +1,90 @@ +/* + * Copyright 2002-2016 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ + +package me.zhengjie.annotation.rest; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import me.zhengjie.annotation.AnonymousAccess; +import org.springframework.core.annotation.AliasFor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Annotation for mapping HTTP {@code GET} requests onto specific handler + * methods. + *

+ * 支持匿名访问 GetMapping + * + * @author liaojinlong + * @see RequestMapping + */ +@AnonymousAccess +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@RequestMapping(method = RequestMethod.GET) +public @interface AnonymousGetMapping { + + /** + * Alias for {@link RequestMapping#name}. + */ + @AliasFor(annotation = RequestMapping.class) + String name() default ""; + + /** + * Alias for {@link RequestMapping#value}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] value() default {}; + + /** + * Alias for {@link RequestMapping#path}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] path() default {}; + + /** + * Alias for {@link RequestMapping#params}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] params() default {}; + + /** + * Alias for {@link RequestMapping#headers}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] headers() default {}; + + /** + * Alias for {@link RequestMapping#consumes}. + * + * @since 4.3.5 + */ + @AliasFor(annotation = RequestMapping.class) + String[] consumes() default {}; + + /** + * Alias for {@link RequestMapping#produces}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] produces() default {}; + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java new file mode 100644 index 0000000..6686617 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java @@ -0,0 +1,91 @@ +/* + * Copyright 2002-2016 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ + +package me.zhengjie.annotation.rest; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import me.zhengjie.annotation.AnonymousAccess; +import org.springframework.core.annotation.AliasFor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Annotation for mapping HTTP {@code PATCH} requests onto specific handler + * methods. + * * 支持匿名访问 PatchMapping + * + * @author liaojinlong + * @see AnonymousGetMapping + * @see AnonymousPostMapping + * @see AnonymousPutMapping + * @see AnonymousDeleteMapping + * @see RequestMapping + */ +@AnonymousAccess +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@RequestMapping(method = RequestMethod.PATCH) +public @interface AnonymousPatchMapping { + + /** + * Alias for {@link RequestMapping#name}. + */ + @AliasFor(annotation = RequestMapping.class) + String name() default ""; + + /** + * Alias for {@link RequestMapping#value}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] value() default {}; + + /** + * Alias for {@link RequestMapping#path}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] path() default {}; + + /** + * Alias for {@link RequestMapping#params}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] params() default {}; + + /** + * Alias for {@link RequestMapping#headers}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] headers() default {}; + + /** + * Alias for {@link RequestMapping#consumes}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] consumes() default {}; + + /** + * Alias for {@link RequestMapping#produces}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] produces() default {}; + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPostMapping.java b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPostMapping.java new file mode 100644 index 0000000..8f1cdcd --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPostMapping.java @@ -0,0 +1,91 @@ +/* + * Copyright 2002-2016 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ + +package me.zhengjie.annotation.rest; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import me.zhengjie.annotation.AnonymousAccess; +import org.springframework.core.annotation.AliasFor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Annotation for mapping HTTP {@code POST} requests onto specific handler + * methods. + * 支持匿名访问 PostMapping + * + * @author liaojinlong + * @see AnonymousGetMapping + * @see AnonymousPostMapping + * @see AnonymousPutMapping + * @see AnonymousDeleteMapping + * @see RequestMapping + */ +@AnonymousAccess +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@RequestMapping(method = RequestMethod.POST) +public @interface AnonymousPostMapping { + + /** + * Alias for {@link RequestMapping#name}. + */ + @AliasFor(annotation = RequestMapping.class) + String name() default ""; + + /** + * Alias for {@link RequestMapping#value}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] value() default {}; + + /** + * Alias for {@link RequestMapping#path}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] path() default {}; + + /** + * Alias for {@link RequestMapping#params}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] params() default {}; + + /** + * Alias for {@link RequestMapping#headers}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] headers() default {}; + + /** + * Alias for {@link RequestMapping#consumes}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] consumes() default {}; + + /** + * Alias for {@link RequestMapping#produces}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] produces() default {}; + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java new file mode 100644 index 0000000..7c417da --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java @@ -0,0 +1,91 @@ +/* + * Copyright 2002-2016 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ + +package me.zhengjie.annotation.rest; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import me.zhengjie.annotation.AnonymousAccess; +import org.springframework.core.annotation.AliasFor; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +/** + * Annotation for mapping HTTP {@code PUT} requests onto specific handler + * methods. + * * 支持匿名访问 PutMapping + * + * @author liaojinlong + * @see AnonymousGetMapping + * @see AnonymousPostMapping + * @see AnonymousPutMapping + * @see AnonymousDeleteMapping + * @see RequestMapping + */ +@AnonymousAccess +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@RequestMapping(method = RequestMethod.PUT) +public @interface AnonymousPutMapping { + + /** + * Alias for {@link RequestMapping#name}. + */ + @AliasFor(annotation = RequestMapping.class) + String name() default ""; + + /** + * Alias for {@link RequestMapping#value}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] value() default {}; + + /** + * Alias for {@link RequestMapping#path}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] path() default {}; + + /** + * Alias for {@link RequestMapping#params}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] params() default {}; + + /** + * Alias for {@link RequestMapping#headers}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] headers() default {}; + + /** + * Alias for {@link RequestMapping#consumes}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] consumes() default {}; + + /** + * Alias for {@link RequestMapping#produces}. + */ + @AliasFor(annotation = RequestMapping.class) + String[] produces() default {}; + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java new file mode 100644 index 0000000..31f4040 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java @@ -0,0 +1,99 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.aspect; + +import com.google.common.collect.ImmutableList; +import me.zhengjie.annotation.Limit; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.utils.RequestHolder; +import me.zhengjie.utils.StringUtils; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.script.DefaultRedisScript; +import org.springframework.data.redis.core.script.RedisScript; +import org.springframework.stereotype.Component; +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; + +/** + * @author / + */ +@Aspect +@Component +public class LimitAspect { + + private final RedisTemplate redisTemplate; + private static final Logger logger = LoggerFactory.getLogger(LimitAspect.class); + + public LimitAspect(RedisTemplate redisTemplate) { + this.redisTemplate = redisTemplate; + } + + @Pointcut("@annotation(me.zhengjie.annotation.Limit)") + public void pointcut() { + } + + @Around("pointcut()") + public Object around(ProceedingJoinPoint joinPoint) throws Throwable { + HttpServletRequest request = RequestHolder.getHttpServletRequest(); + MethodSignature signature = (MethodSignature) joinPoint.getSignature(); + Method signatureMethod = signature.getMethod(); + Limit limit = signatureMethod.getAnnotation(Limit.class); + LimitType limitType = limit.limitType(); + String key = limit.key(); + if (StringUtils.isEmpty(key)) { + if (limitType == LimitType.IP) { + key = StringUtils.getIp(request); + } else { + key = signatureMethod.getName(); + } + } + + ImmutableList keys = ImmutableList.of(StringUtils.join(limit.prefix(), "_", key, "_", request.getRequestURI().replace("/","_"))); + + String luaScript = buildLuaScript(); + RedisScript redisScript = new DefaultRedisScript<>(luaScript, Number.class); + Number count = redisTemplate.execute(redisScript, keys, limit.count(), limit.period()); + if (null != count && count.intValue() <= limit.count()) { + logger.info("第{}次访问key为 {},描述为 [{}] 的接口", count, keys, limit.name()); + return joinPoint.proceed(); + } else { + throw new BadRequestException("访问次数受限制"); + } + } + + /** + * 限流脚本 + */ + private String buildLuaScript() { + return "local c" + + "\nc = redis.call('get',KEYS[1])" + + "\nif c and tonumber(c) > tonumber(ARGV[1]) then" + + "\nreturn c;" + + "\nend" + + "\nc = redis.call('incr',KEYS[1])" + + "\nif tonumber(c) == 1 then" + + "\nredis.call('expire',KEYS[1],ARGV[2])" + + "\nend" + + "\nreturn c;"; + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java new file mode 100644 index 0000000..bf3f09e --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java @@ -0,0 +1,27 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.aspect; + +/** + * 限流枚举 + * @author / + */ +public enum LimitType { + // 默认 + CUSTOMER, + // by ip addr + IP +} diff --git a/eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java b/eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java new file mode 100644 index 0000000..cb12628 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java @@ -0,0 +1,79 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.base; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.springframework.data.annotation.CreatedBy; +import org.springframework.data.annotation.LastModifiedBy; +import java.io.Serializable; +import java.lang.reflect.Field; +import java.sql.Timestamp; + +/** + * 通用字段, is_del 根据需求自行添加 + * @author Zheng Jie + * @Date 2019年10月24日20:46:32 + */ +@Getter +@Setter +public class BaseEntity implements Serializable { + + @CreatedBy + @TableField(fill = FieldFill.INSERT) + @ApiModelProperty(value = "创建人", hidden = true) + private String createBy; + + @LastModifiedBy + @TableField(fill = FieldFill.INSERT_UPDATE) + @ApiModelProperty(value = "更新人", hidden = true) + private String updateBy; + + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty(value = "创建时间", hidden = true) + private Timestamp createTime; + + @TableField(fill = FieldFill.INSERT_UPDATE) + @ApiModelProperty(value = "更新时间", hidden = true) + private Timestamp updateTime; + + /* 分组校验 */ + public @interface Create {} + + /* 分组校验 */ + public @interface Update {} + + @Override + public String toString() { + ToStringBuilder builder = new ToStringBuilder(this); + Field[] fields = this.getClass().getDeclaredFields(); + try { + for (Field f : fields) { + f.setAccessible(true); + builder.append(f.getName(), f.get(this)).append("\n"); + } + } catch (Exception e) { + builder.append("toString builder encounter an error"); + } + return builder.toString(); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java new file mode 100644 index 0000000..006ef6b --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java @@ -0,0 +1,45 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import me.zhengjie.utils.SecurityUtils; +import org.springframework.data.domain.AuditorAware; +import org.springframework.stereotype.Component; +import java.util.Optional; + +/** + * @description : 设置审计 + * @author : Dong ZhaoYang + * @date : 2019/10/28 + */ +@Component("auditorAware") +public class AuditorConfig implements AuditorAware { + + /** + * 返回操作员标志信息 + * + * @return / + */ + @Override + public Optional getCurrentAuditor() { + try { + // 这里应根据实际业务情况获取具体信息 + return Optional.of(SecurityUtils.getCurrentUsername()); + }catch (Exception ignored){} + // 用户定时任务,或者无Token调用的情况 + return Optional.of("System"); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java new file mode 100644 index 0000000..658e621 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java @@ -0,0 +1,37 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import me.zhengjie.utils.SecurityUtils; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.stereotype.Service; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + */ +@Service(value = "el") +public class AuthorityConfig { + + public Boolean check(String ...permissions){ + // 获取当前用户的所有权限 + List elPermissions = SecurityUtils.getCurrentUser().getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList()); + // 判断当前用户的所有权限是否包含接口上定义的权限 + return elPermissions.contains("admin") || Arrays.stream(permissions).anyMatch(elPermissions::contains); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/config/FileProperties.java b/eladmin-common/src/main/java/me/zhengjie/config/FileProperties.java new file mode 100644 index 0000000..3d0a5c6 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/FileProperties.java @@ -0,0 +1,60 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import lombok.Data; +import me.zhengjie.utils.ElConstant; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * @author Zheng Jie + */ +@Data +@Configuration +@ConfigurationProperties(prefix = "file") +public class FileProperties { + + /** 文件大小限制 */ + private Long maxSize; + + /** 头像大小限制 */ + private Long avatarMaxSize; + + private ElPath mac; + + private ElPath linux; + + private ElPath windows; + + public ElPath getPath(){ + String os = System.getProperty("os.name"); + if(os.toLowerCase().startsWith(ElConstant.WIN)) { + return windows; + } else if(os.toLowerCase().startsWith(ElConstant.MAC)){ + return mac; + } + return linux; + } + + @Data + public static class ElPath{ + + private String path; + + private String avatar; + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/config/MultipartConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/MultipartConfig.java new file mode 100644 index 0000000..cf04de5 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/MultipartConfig.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import org.springframework.boot.web.servlet.MultipartConfigFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import javax.servlet.MultipartConfigElement; +import java.io.File; + +/** + * @date 2018-12-28 + * @author https://blog.csdn.net/llibin1024530411/article/details/79474953 + */ +@Configuration +public class MultipartConfig { + + /** + * 文件上传临时路径 + */ + @Bean + MultipartConfigElement multipartConfigElement() { + MultipartConfigFactory factory = new MultipartConfigFactory(); + String location = System.getProperty("user.home") + "/.eladmin/file/tmp"; + File tmpFile = new File(location); + if (!tmpFile.exists()) { + if (!tmpFile.mkdirs()) { + System.out.println("create was not successful."); + } + } + factory.setLocation(location); + return factory.createMultipartConfig(); + } +} \ No newline at end of file diff --git a/eladmin-common/src/main/java/me/zhengjie/config/RedisConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/RedisConfig.java new file mode 100644 index 0000000..c54ca81 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/RedisConfig.java @@ -0,0 +1,222 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import cn.hutool.core.lang.Assert; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.parser.ParserConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.digest.DigestUtils; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.data.redis.RedisProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cache.Cache; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cache.interceptor.CacheErrorHandler; +import org.springframework.cache.interceptor.KeyGenerator; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.RedisOperations; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.serializer.RedisSerializationContext; +import org.springframework.data.redis.serializer.RedisSerializer; +import reactor.util.annotation.Nullable; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; + + +/** + * @author Zheng Jie + * @date 2018-11-24 + */ +@Slf4j +@Configuration +@EnableCaching +@ConditionalOnClass(RedisOperations.class) +@EnableConfigurationProperties(RedisProperties.class) +public class RedisConfig extends CachingConfigurerSupport { + + /** + * 设置 redis 数据默认过期时间,默认2小时 + * 设置@cacheable 序列化方式 + */ + @Bean + public RedisCacheConfiguration redisCacheConfiguration(){ + FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer<>(Object.class); + RedisCacheConfiguration configuration = RedisCacheConfiguration.defaultCacheConfig(); + configuration = configuration.serializeValuesWith(RedisSerializationContext. + SerializationPair.fromSerializer(fastJsonRedisSerializer)).entryTtl(Duration.ofHours(2)); + return configuration; + } + + @SuppressWarnings("all") + @Bean(name = "redisTemplate") + @ConditionalOnMissingBean(name = "redisTemplate") + public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) { + RedisTemplate template = new RedisTemplate<>(); + //序列化 + FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer<>(Object.class); + // value值的序列化采用fastJsonRedisSerializer + template.setValueSerializer(fastJsonRedisSerializer); + template.setHashValueSerializer(fastJsonRedisSerializer); + // fastjson 升级到 1.2.83 后需要指定序列化白名单 + ParserConfig.getGlobalInstance().addAccept("me.zhengjie.domain"); + // 模块内的实体类 + ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.mnt.domain"); + ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.quartz.domain"); + ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.system.domain"); + // 模块内的 Dto + ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.security.service.dto"); + // key的序列化采用StringRedisSerializer + template.setKeySerializer(new StringRedisSerializer()); + template.setHashKeySerializer(new StringRedisSerializer()); + template.setConnectionFactory(redisConnectionFactory); + return template; + } + + /** + * 自定义缓存key生成策略,默认将使用该策略 + */ + @Bean + @Override + public KeyGenerator keyGenerator() { + return (target, method, params) -> { + Map container = new HashMap<>(8); + Class targetClassClass = target.getClass(); + // 类地址 + container.put("class",targetClassClass.toGenericString()); + // 方法名称 + container.put("methodName",method.getName()); + // 包名称 + container.put("package",targetClassClass.getPackage()); + // 参数列表 + for (int i = 0; i < params.length; i++) { + container.put(String.valueOf(i),params[i]); + } + // 转为JSON字符串 + String jsonString = JSON.toJSONString(container); + // 做SHA256 Hash计算,得到一个SHA256摘要作为Key + return DigestUtils.sha256Hex(jsonString); + }; + } + + @Bean + @Override + @SuppressWarnings("all") + public CacheErrorHandler errorHandler() { + // 异常处理,当Redis发生异常时,打印日志,但是程序正常走 + log.info("初始化 -> [{}]", "Redis CacheErrorHandler"); + return new CacheErrorHandler() { + @Override + public void handleCacheGetError(RuntimeException e, Cache cache, Object key) { + log.error("Redis occur handleCacheGetError:key -> [{}]", key, e); + } + + @Override + public void handleCachePutError(RuntimeException e, Cache cache, Object key, Object value) { + log.error("Redis occur handleCachePutError:key -> [{}];value -> [{}]", key, value, e); + } + + @Override + public void handleCacheEvictError(RuntimeException e, Cache cache, Object key) { + log.error("Redis occur handleCacheEvictError:key -> [{}]", key, e); + } + + @Override + public void handleCacheClearError(RuntimeException e, Cache cache) { + log.error("Redis occur handleCacheClearError:", e); + } + }; + } + +} + +/** + * Value 序列化 + * + * @author / + * @param + */ + class FastJsonRedisSerializer implements RedisSerializer { + + private final Class clazz; + + FastJsonRedisSerializer(Class clazz) { + super(); + this.clazz = clazz; + } + + @Override + public byte[] serialize(T t) { + if (t == null) { + return new byte[0]; + } + return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(StandardCharsets.UTF_8); + } + + @Override + public T deserialize(byte[] bytes) { + if (bytes == null || bytes.length == 0) { + return null; + } + String str = new String(bytes, StandardCharsets.UTF_8); + return JSON.parseObject(str, clazz); + } + +} + +/** + * 重写序列化器 + * + * @author / + */ +class StringRedisSerializer implements RedisSerializer { + + private final Charset charset; + + StringRedisSerializer() { + this(StandardCharsets.UTF_8); + } + + private StringRedisSerializer(Charset charset) { + Assert.notNull(charset, "Charset must not be null!"); + this.charset = charset; + } + + @Override + public String deserialize(byte[] bytes) { + return (bytes == null ? null : new String(bytes, charset)); + } + + @Override + public @Nullable byte[] serialize(Object object) { + String string = JSON.toJSONString(object); + + if (org.apache.commons.lang3.StringUtils.isBlank(string)) { + return null; + } + string = string.replace("\"", ""); + return string.getBytes(charset); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/config/RsaProperties.java b/eladmin-common/src/main/java/me/zhengjie/config/RsaProperties.java new file mode 100644 index 0000000..0a4a537 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/RsaProperties.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +/** + * @author Zheng Jie + * @website https://eladmin.vip + * @description + * @date 2020-05-18 + **/ +@Data +@Component +public class RsaProperties { + + public static String privateKey; + + @Value("${rsa.private_key}") + public void setPrivateKey(String privateKey) { + RsaProperties.privateKey = privateKey; + } +} \ No newline at end of file diff --git a/eladmin-common/src/main/java/me/zhengjie/config/SwaggerConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/SwaggerConfig.java new file mode 100644 index 0000000..861cd54 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/SwaggerConfig.java @@ -0,0 +1,105 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import org.springframework.beans.factory.annotation.Value; +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.service.ApiInfo; +import springfox.documentation.service.ApiKey; +import springfox.documentation.service.AuthorizationScope; +import springfox.documentation.service.SecurityReference; +import springfox.documentation.service.SecurityScheme; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; +import java.util.ArrayList; +import java.util.List; + +/** + * api页面 /doc.html + * @author Zheng Jie + * @date 2018-11-23 + */ +@Configuration +@EnableSwagger2 +public class SwaggerConfig { + + @Value("${jwt.header}") + private String tokenHeader; + + @Value("${swagger.enabled}") + private Boolean enabled; + + @Bean + @SuppressWarnings("all") + public Docket createRestApi() { + return new Docket(DocumentationType.SWAGGER_2) + .enable(enabled) + .pathMapping("/") + .apiInfo(apiInfo()) + .select() + .paths(PathSelectors.regex("^(?!/error).*")) + .paths(PathSelectors.any()) + .build() + //添加登陆认证 + .securitySchemes(securitySchemes()) + .securityContexts(securityContexts()); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .description("一个简单且易上手的 Spring boot 后台管理框架") + .title("ELADMIN 接口文档") + .version("1.1") + .build(); + } + + private List securitySchemes() { + //设置请求头信息 + List securitySchemes = new ArrayList<>(); + ApiKey apiKey = new ApiKey(tokenHeader, tokenHeader, "header"); + securitySchemes.add(apiKey); + return securitySchemes; + } + + private List securityContexts() { + //设置需要登录认证的路径 + List securityContexts = new ArrayList<>(); + securityContexts.add(getContextByPath()); + return securityContexts; + } + + private SecurityContext getContextByPath() { + return SecurityContext.builder() + .securityReferences(defaultAuth()) + // 表示 /auth/code、/auth/login 接口不需要使用securitySchemes即不需要带token + .operationSelector(o->o.requestMappingPattern().matches("^(?!/auth/code|/auth/login|ast/count|users/resetPwd).*$")) + .build(); + } + + private List defaultAuth() { + List securityReferences = new ArrayList<>(); + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + securityReferences.add(new SecurityReference(tokenHeader, authorizationScopes)); + return securityReferences; + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java b/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java new file mode 100644 index 0000000..5237eef --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java @@ -0,0 +1,55 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config.mybatis; + +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import me.zhengjie.utils.SecurityUtils; +import org.apache.ibatis.reflection.MetaObject; +import org.springframework.stereotype.Component; +import java.sql.Timestamp; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-13 + **/ +@Component +public class MyMetaObjectHandler implements MetaObjectHandler { + + @Override + public void insertFill(MetaObject metaObject) { + /* 创建时间 */ + this.strictInsertFill(metaObject, "createTime", Timestamp.class, DateTime.now().toTimestamp()); + this.strictInsertFill(metaObject, "updateTime", Timestamp.class, DateTime.now().toTimestamp()); + /* 操作人 */ + String username = "System"; + try {username = SecurityUtils.getCurrentUsername();}catch (Exception ignored){} + this.strictInsertFill(metaObject, "createBy", String.class, username); + this.strictInsertFill(metaObject, "updateBy", String.class, username); + } + + @Override + public void updateFill(MetaObject metaObject) { + /* 更新时间 */ + this.strictUpdateFill(metaObject, "updateTime", Timestamp.class, DateTime.now().toTimestamp()); + /* 操作人 */ + String username = "System"; + try {username = SecurityUtils.getCurrentUsername();}catch (Exception ignored){} + this.strictUpdateFill(metaObject, "updateBy", String.class, username); + } +} + diff --git a/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java b/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java new file mode 100644 index 0000000..3730f7d --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config.mybatis; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Configuration +public class MybatisPlusConfig { + + /** + * MyBatisPlus拦截器(用于分页) + */ + @Bean + public MybatisPlusInterceptor paginationInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + //添加MySQL的分页拦截器 + interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); + return interceptor; + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/exception/BadConfigurationException.java b/eladmin-common/src/main/java/me/zhengjie/exception/BadConfigurationException.java new file mode 100644 index 0000000..ede3691 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/exception/BadConfigurationException.java @@ -0,0 +1,98 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.exception; + +/** + * 统一关于错误配置信息 异常 + * + * @author: liaojinlong + * @date: 2020/6/10 18:06 + */ +public class BadConfigurationException extends RuntimeException { + /** + * Constructs a new runtime exception with {@code null} as its + * detail message. The cause is not initialized, and may subsequently be + * initialized by a call to {@link #initCause}. + */ + public BadConfigurationException() { + super(); + } + + /** + * Constructs a new runtime exception with the specified detail message. + * The cause is not initialized, and may subsequently be initialized by a + * call to {@link #initCause}. + * + * @param message the detail message. The detail message is saved for + * later retrieval by the {@link #getMessage()} method. + */ + public BadConfigurationException(String message) { + super(message); + } + + /** + * Constructs a new runtime exception with the specified detail message and + * cause.

Note that the detail message associated with + * {@code cause} is not automatically incorporated in + * this runtime exception's detail message. + * + * @param message the detail message (which is saved for later retrieval + * by the {@link #getMessage()} method). + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 1.4 + */ + public BadConfigurationException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructs a new runtime exception with the specified cause and a + * detail message of {@code (cause==null ? null : cause.toString())} + * (which typically contains the class and detail message of + * {@code cause}). This constructor is useful for runtime exceptions + * that are little more than wrappers for other throwables. + * + * @param cause the cause (which is saved for later retrieval by the + * {@link #getCause()} method). (A {@code null} value is + * permitted, and indicates that the cause is nonexistent or + * unknown.) + * @since 1.4 + */ + public BadConfigurationException(Throwable cause) { + super(cause); + } + + /** + * Constructs a new runtime exception with the specified detail + * message, cause, suppression enabled or disabled, and writable + * stack trace enabled or disabled. + * + * @param message the detail message. + * @param cause the cause. (A {@code null} value is permitted, + * and indicates that the cause is nonexistent or unknown.) + * @param enableSuppression whether or not suppression is enabled + * or disabled + * @param writableStackTrace whether or not the stack trace should + * be writable + * @since 1.7 + */ + protected BadConfigurationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java b/eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java new file mode 100644 index 0000000..900453b --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java @@ -0,0 +1,40 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.exception; + +import lombok.Getter; +import org.springframework.http.HttpStatus; +import static org.springframework.http.HttpStatus.BAD_REQUEST; + +/** + * @author Zheng Jie + * @date 2018-11-23 + * 统一异常处理 + */ +@Getter +public class BadRequestException extends RuntimeException{ + + private Integer status = BAD_REQUEST.value(); + + public BadRequestException(String msg){ + super(msg); + } + + public BadRequestException(HttpStatus status,String msg){ + super(msg); + this.status = status.value(); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java b/eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java new file mode 100644 index 0000000..03f9bf2 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.exception; + +import org.springframework.util.StringUtils; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +public class EntityExistException extends RuntimeException { + + public EntityExistException(Class clazz, String field, String val) { + super(EntityExistException.generateMessage(clazz.getSimpleName(), field, val)); + } + + private static String generateMessage(String entity, String field, String val) { + return StringUtils.capitalize(entity) + + " with " + field + " "+ val + " existed"; + } +} \ No newline at end of file diff --git a/eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java b/eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java new file mode 100644 index 0000000..bcdc956 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.exception; + +import org.springframework.util.StringUtils; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +public class EntityNotFoundException extends RuntimeException { + + public EntityNotFoundException(Class clazz, String field, String val) { + super(EntityNotFoundException.generateMessage(clazz.getSimpleName(), field, val)); + } + + private static String generateMessage(String entity, String field, String val) { + return StringUtils.capitalize(entity) + + " with " + field + " "+ val + " does not exist"; + } +} \ No newline at end of file diff --git a/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java b/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java new file mode 100644 index 0000000..977788c --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java @@ -0,0 +1,49 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.exception.handler; + +import lombok.Data; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +@Data +class ApiError { + + private Integer status = 400; + private Long timestamp; + private String message; + + private ApiError() { + timestamp = System.currentTimeMillis(); + } + + public static ApiError error(String message){ + ApiError apiError = new ApiError(); + apiError.setMessage(message); + return apiError; + } + + public static ApiError error(Integer status, String message){ + ApiError apiError = new ApiError(); + apiError.setStatus(status); + apiError.setMessage(message); + return apiError; + } +} + + diff --git a/eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java b/eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java new file mode 100644 index 0000000..23cbb38 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java @@ -0,0 +1,113 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.exception.handler; + +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.exception.EntityExistException; +import me.zhengjie.exception.EntityNotFoundException; +import me.zhengjie.utils.ThrowableUtil; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.validation.FieldError; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import static org.springframework.http.HttpStatus.*; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +@Slf4j +@RestControllerAdvice +public class GlobalExceptionHandler { + + /** + * 处理所有不可知的异常 + */ + @ExceptionHandler(Throwable.class) + public ResponseEntity handleException(Throwable e){ + // 打印堆栈信息 + log.error(ThrowableUtil.getStackTrace(e)); + return buildResponseEntity(ApiError.error(e.getMessage())); + } + + /** + * BadCredentialsException + */ + @ExceptionHandler(BadCredentialsException.class) + public ResponseEntity badCredentialsException(BadCredentialsException e){ + // 打印堆栈信息 + String message = "坏的凭证".equals(e.getMessage()) ? "用户名或密码不正确" : e.getMessage(); + log.error(message); + return buildResponseEntity(ApiError.error(message)); + } + + /** + * 处理自定义异常 + */ + @ExceptionHandler(value = BadRequestException.class) + public ResponseEntity badRequestException(BadRequestException e) { + // 打印堆栈信息 + log.error(ThrowableUtil.getStackTrace(e)); + return buildResponseEntity(ApiError.error(e.getStatus(),e.getMessage())); + } + + /** + * 处理 EntityExist + */ + @ExceptionHandler(value = EntityExistException.class) + public ResponseEntity entityExistException(EntityExistException e) { + // 打印堆栈信息 + log.error(ThrowableUtil.getStackTrace(e)); + return buildResponseEntity(ApiError.error(e.getMessage())); + } + + /** + * 处理 EntityNotFound + */ + @ExceptionHandler(value = EntityNotFoundException.class) + public ResponseEntity entityNotFoundException(EntityNotFoundException e) { + // 打印堆栈信息 + log.error(ThrowableUtil.getStackTrace(e)); + return buildResponseEntity(ApiError.error(NOT_FOUND.value(),e.getMessage())); + } + + /** + * 处理所有接口数据验证异常 + */ + @ExceptionHandler(MethodArgumentNotValidException.class) + public ResponseEntity handleMethodArgumentNotValidException(MethodArgumentNotValidException e){ + // 打印堆栈信息 + log.error(ThrowableUtil.getStackTrace(e)); + ObjectError objectError = e.getBindingResult().getAllErrors().get(0); + String message = objectError.getDefaultMessage(); + if (objectError instanceof FieldError) { + message = ((FieldError) objectError).getField() + ": " + message; + } + return buildResponseEntity(ApiError.error(message)); + } + + /** + * 统一返回 + */ + private ResponseEntity buildResponseEntity(ApiError apiError) { + return new ResponseEntity<>(apiError, HttpStatus.valueOf(apiError.getStatus())); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/CacheKey.java b/eladmin-common/src/main/java/me/zhengjie/utils/CacheKey.java new file mode 100644 index 0000000..7485713 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/CacheKey.java @@ -0,0 +1,58 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +/** + * @author: liaojinlong + * @date: 2020/6/11 15:49 + * @apiNote: 关于缓存的Key集合 + */ +public interface CacheKey { + + /** + * 用户 + */ + String USER_ID = "user::id:"; + /** + * 数据 + */ + String DATA_USER = "data::user:"; + /** + * 菜单 + */ + String MENU_ID = "menu::id:"; + String MENU_USER = "menu::user:"; + /** + * 角色授权 + */ + String ROLE_AUTH = "role::auth:"; + /** + * 角色信息 + */ + String ROLE_ID = "role::id:"; + /** + * 部门 + */ + String DEPT_ID = "dept::id:"; + /** + * 岗位 + */ + String JOB_ID = "job::id:"; + /** + * 数据字典 + */ + String DICT_NAME = "dict::name:"; +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/CallBack.java b/eladmin-common/src/main/java/me/zhengjie/utils/CallBack.java new file mode 100644 index 0000000..9b10812 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/CallBack.java @@ -0,0 +1,43 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ + +package me.zhengjie.utils; + +/** + * @author: liaojinlong + * @date: 2020/6/9 17:02 + * @since: 1.0 + * @see {@link SpringContextHolder} + * 针对某些初始化方法,在SpringContextHolder 初始化前时,
+ * 可提交一个 提交回调任务。
+ * 在SpringContextHolder 初始化后,进行回调使用 + */ + +public interface CallBack { + /** + * 回调执行方法 + */ + void executor(); + + /** + * 本回调任务名称 + * @return / + */ + default String getCallBackName() { + return Thread.currentThread().getId() + ":" + this.getClass().getName(); + } +} + diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/CloseUtil.java b/eladmin-common/src/main/java/me/zhengjie/utils/CloseUtil.java new file mode 100644 index 0000000..f39919f --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/CloseUtil.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import java.io.Closeable; + +/** + * @author Zheng Jie + * @website https://eladmin.vip + * @description 用于关闭各种连接,缺啥补啥 + * @date 2021-03-05 + **/ +public class CloseUtil { + + public static void close(Closeable closeable) { + if (null != closeable) { + try { + closeable.close(); + } catch (Exception e) { + // 静默关闭 + } + } + } + + public static void close(AutoCloseable closeable) { + if (null != closeable) { + try { + closeable.close(); + } catch (Exception e) { + // 静默关闭 + } + } + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java b/eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java new file mode 100644 index 0000000..258aadf --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java @@ -0,0 +1,169 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ + +package me.zhengjie.utils; + +import java.sql.Timestamp; +import java.time.*; +import java.time.format.DateTimeFormatter; +import java.util.Date; + +/** + * @author: liaojinlong + * @date: 2020/6/11 16:28 + * @apiNote: JDK 8 新日期类 格式化与字符串转换 工具类 + */ +public class DateUtil { + + public static final DateTimeFormatter DFY_MD_HMS = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + public static final DateTimeFormatter DFY_MD = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + /** + * LocalDateTime 转时间戳 + * + * @param localDateTime / + * @return / + */ + public static Long getTimeStamp(LocalDateTime localDateTime) { + return localDateTime.atZone(ZoneId.systemDefault()).toEpochSecond(); + } + + /** + * 时间戳转LocalDateTime + * + * @param timeStamp / + * @return / + */ + public static LocalDateTime fromTimeStamp(Long timeStamp) { + return LocalDateTime.ofEpochSecond(timeStamp, 0, OffsetDateTime.now().getOffset()); + } + + /** + * LocalDateTime 转 Date + * Jdk8 后 不推荐使用 {@link Date} Date + * + * @param localDateTime / + * @return / + */ + public static Date toDate(LocalDateTime localDateTime) { + return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); + } + + /** + * LocalDate 转 Date + * Jdk8 后 不推荐使用 {@link Date} Date + * + * @param localDate / + * @return / + */ + public static Date toDate(LocalDate localDate) { + return toDate(localDate.atTime(LocalTime.now(ZoneId.systemDefault()))); + } + + + /** + * Date转 LocalDateTime + * Jdk8 后 不推荐使用 {@link Date} Date + * + * @param date / + * @return / + */ + public static LocalDateTime toLocalDateTime(Date date) { + return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); + } + + /** + * 日期 格式化 + * + * @param localDateTime / + * @param patten / + * @return / + */ + public static String localDateTimeFormat(LocalDateTime localDateTime, String patten) { + DateTimeFormatter df = DateTimeFormatter.ofPattern(patten); + return df.format(localDateTime); + } + + /** + * 日期 格式化 + * + * @param localDateTime / + * @param df / + * @return / + */ + public static String localDateTimeFormat(LocalDateTime localDateTime, DateTimeFormatter df) { + return df.format(localDateTime); + } + + /** + * 日期格式化 yyyy-MM-dd HH:mm:ss + * + * @param localDateTime / + * @return / + */ + public static String localDateTimeFormatyMdHms(LocalDateTime localDateTime) { + return DFY_MD_HMS.format(localDateTime); + } + + /** + * 获取当前时间 + * @return 、 + */ + public static Timestamp getTimeStamp() { + return Timestamp.valueOf(LocalDateTime.now()); + } + + /** + * 日期格式化 yyyy-MM-dd + * + * @param localDateTime / + * @return / + */ + public String localDateTimeFormatyMd(LocalDateTime localDateTime) { + return DFY_MD.format(localDateTime); + } + + /** + * 字符串转 LocalDateTime ,字符串格式 yyyy-MM-dd + * + * @param localDateTime / + * @return / + */ + public static LocalDateTime parseLocalDateTimeFormat(String localDateTime, String pattern) { + DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(pattern); + return LocalDateTime.from(dateTimeFormatter.parse(localDateTime)); + } + + /** + * 字符串转 LocalDateTime ,字符串格式 yyyy-MM-dd + * + * @param localDateTime / + * @return / + */ + public static LocalDateTime parseLocalDateTimeFormat(String localDateTime, DateTimeFormatter dateTimeFormatter) { + return LocalDateTime.from(dateTimeFormatter.parse(localDateTime)); + } + + /** + * 字符串转 LocalDateTime ,字符串格式 yyyy-MM-dd HH:mm:ss + * + * @param localDateTime / + * @return / + */ + public static LocalDateTime parseLocalDateTimeFormatyMdHms(String localDateTime) { + return LocalDateTime.from(DFY_MD_HMS.parse(localDateTime)); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/ElConstant.java b/eladmin-common/src/main/java/me/zhengjie/utils/ElConstant.java new file mode 100644 index 0000000..479b1e6 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/ElConstant.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +/** + * 常用静态常量 + * + * @author Zheng Jie + * @date 2018-12-26 + */ +public class ElConstant { + /** + * win 系统 + */ + public static final String WIN = "win"; + + /** + * mac 系统 + */ + public static final String MAC = "mac"; +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java b/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java new file mode 100644 index 0000000..4f334aa --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java @@ -0,0 +1,100 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.DESKeySpec; +import javax.crypto.spec.IvParameterSpec; +import java.nio.charset.StandardCharsets; + +/** + * 加密 + * @author Zheng Jie + * @date 2018-11-23 + */ + +public class EncryptUtils { + + private static final String STR_PARAM = "Passw0rd"; + + private static Cipher cipher; + + private static final IvParameterSpec IV = new IvParameterSpec(STR_PARAM.getBytes(StandardCharsets.UTF_8)); + + private static DESKeySpec getDesKeySpec(String source) throws Exception { + if (source == null || source.length() == 0){ + return null; + } + cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); + String strKey = "Passw0rd"; + return new DESKeySpec(strKey.getBytes(StandardCharsets.UTF_8)); + } + + /** + * 对称加密 + */ + public static String desEncrypt(String source) throws Exception { + DESKeySpec desKeySpec = getDesKeySpec(source); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); + SecretKey secretKey = keyFactory.generateSecret(desKeySpec); + cipher.init(Cipher.ENCRYPT_MODE, secretKey, IV); + return byte2hex( + cipher.doFinal(source.getBytes(StandardCharsets.UTF_8))).toUpperCase(); + } + + /** + * 对称解密 + */ + public static String desDecrypt(String source) throws Exception { + byte[] src = hex2byte(source.getBytes(StandardCharsets.UTF_8)); + DESKeySpec desKeySpec = getDesKeySpec(source); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); + SecretKey secretKey = keyFactory.generateSecret(desKeySpec); + cipher.init(Cipher.DECRYPT_MODE, secretKey, IV); + byte[] retByte = cipher.doFinal(src); + return new String(retByte); + } + + private static String byte2hex(byte[] inStr) { + String stmp; + StringBuilder out = new StringBuilder(inStr.length * 2); + for (byte b : inStr) { + stmp = Integer.toHexString(b & 0xFF); + if (stmp.length() == 1) { + // 如果是0至F的单位字符串,则添加0 + out.append("0").append(stmp); + } else { + out.append(stmp); + } + } + return out.toString(); + } + + private static byte[] hex2byte(byte[] b) { + int size = 2; + if ((b.length % size) != 0){ + throw new IllegalArgumentException("长度不是偶数"); + } + byte[] b2 = new byte[b.length / 2]; + for (int n = 0; n < b.length; n += size) { + String item = new String(b, n, 2); + b2[n / 2] = (byte) Integer.parseInt(item, 16); + } + return b2; + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java b/eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java new file mode 100644 index 0000000..ca2b674 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java @@ -0,0 +1,395 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.poi.excel.BigExcelWriter; +import cn.hutool.poi.excel.ExcelUtil; +import me.zhengjie.exception.BadRequestException; +import org.apache.poi.util.IOUtils; +import org.apache.poi.xssf.streaming.SXSSFSheet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.security.MessageDigest; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * File工具类,扩展 hutool 工具包 + * + * @author Zheng Jie + * @date 2018-12-27 + */ +public class FileUtil extends cn.hutool.core.io.FileUtil { + + private static final Logger log = LoggerFactory.getLogger(FileUtil.class); + + /** + * 系统临时目录 + *
+ * windows 包含路径分割符,但Linux 不包含, + * 在windows \\==\ 前提下, + * 为安全起见 同意拼装 路径分割符, + *

+     *       java.io.tmpdir
+     *       windows : C:\Users/xxx\AppData\Local\Temp\
+     *       linux: /temp
+     * 
+ */ + public static final String SYS_TEM_DIR = System.getProperty("java.io.tmpdir") + File.separator; + /** + * 定义GB的计算常量 + */ + private static final int GB = 1024 * 1024 * 1024; + /** + * 定义MB的计算常量 + */ + private static final int MB = 1024 * 1024; + /** + * 定义KB的计算常量 + */ + private static final int KB = 1024; + + /** + * 格式化小数 + */ + private static final DecimalFormat DF = new DecimalFormat("0.00"); + + public static final String IMAGE = "图片"; + public static final String TXT = "文档"; + public static final String MUSIC = "音乐"; + public static final String VIDEO = "视频"; + public static final String OTHER = "其他"; + + + /** + * MultipartFile转File + */ + public static File toFile(MultipartFile multipartFile) { + // 获取文件名 + String fileName = multipartFile.getOriginalFilename(); + // 获取文件后缀 + String prefix = "." + getExtensionName(fileName); + File file = null; + try { + // 用uuid作为文件名,防止生成的临时文件重复 + file = new File(SYS_TEM_DIR + IdUtil.simpleUUID() + prefix); + // MultipartFile to File + multipartFile.transferTo(file); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + return file; + } + + /** + * 获取文件扩展名,不带 . + */ + public static String getExtensionName(String filename) { + if ((filename != null) && (filename.length() > 0)) { + int dot = filename.lastIndexOf('.'); + if ((dot > -1) && (dot < (filename.length() - 1))) { + return filename.substring(dot + 1); + } + } + return filename; + } + + /** + * Java文件操作 获取不带扩展名的文件名 + */ + public static String getFileNameNoEx(String filename) { + if ((filename != null) && (filename.length() > 0)) { + int dot = filename.lastIndexOf('.'); + if ((dot > -1) && (dot < (filename.length()))) { + return filename.substring(0, dot); + } + } + return filename; + } + + /** + * 文件大小转换 + */ + public static String getSize(long size) { + String resultSize; + if (size / GB >= 1) { + //如果当前Byte的值大于等于1GB + resultSize = DF.format(size / (float) GB) + "GB "; + } else if (size / MB >= 1) { + //如果当前Byte的值大于等于1MB + resultSize = DF.format(size / (float) MB) + "MB "; + } else if (size / KB >= 1) { + //如果当前Byte的值大于等于1KB + resultSize = DF.format(size / (float) KB) + "KB "; + } else { + resultSize = size + "B "; + } + return resultSize; + } + + /** + * inputStream 转 File + */ + static File inputStreamToFile(InputStream ins, String name){ + File file = new File(SYS_TEM_DIR + name); + if (file.exists()) { + return file; + } + OutputStream os = null; + try { + os = new FileOutputStream(file); + int bytesRead; + int len = 8192; + byte[] buffer = new byte[len]; + while ((bytesRead = ins.read(buffer, 0, len)) != -1) { + os.write(buffer, 0, bytesRead); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + CloseUtil.close(os); + CloseUtil.close(ins); + } + return file; + } + + /** + * 将文件名解析成文件的上传路径 + */ + public static File upload(MultipartFile file, String filePath) { + Date date = new Date(); + SimpleDateFormat format = new SimpleDateFormat("yyyyMMddhhmmssS"); + // 过滤非法文件名 + String name = getFileNameNoEx(verifyFilename(file.getOriginalFilename())); + String suffix = getExtensionName(file.getOriginalFilename()); + String nowStr = "-" + format.format(date); + try { + String fileName = name + nowStr + "." + suffix; + String path = filePath + fileName; + // getCanonicalFile 可解析正确各种路径 + File dest = new File(path).getCanonicalFile(); + // 检测是否存在目录 + if (!dest.getParentFile().exists()) { + if (!dest.getParentFile().mkdirs()) { + System.out.println("was not successful."); + } + } + // 文件写入 + file.transferTo(dest); + return dest; + } catch (Exception e) { + log.error(e.getMessage(), e); + } + return null; + } + + /** + * 导出excel + */ + public static void downloadExcel(List> list, HttpServletResponse response) throws IOException { + String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx"; + File file = new File(tempPath); + BigExcelWriter writer = ExcelUtil.getBigWriter(file); + // 一次性写出内容,使用默认样式,强制输出标题 + writer.write(list, true); + SXSSFSheet sheet = (SXSSFSheet)writer.getSheet(); + //上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法 + sheet.trackAllColumnsForAutoSizing(); + //列宽自适应 + writer.autoSizeColumnAll(); + //response为HttpServletResponse对象 + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"); + //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 + response.setHeader("Content-Disposition", "attachment;filename=file.xlsx"); + ServletOutputStream out = response.getOutputStream(); + // 终止后删除临时文件 + file.deleteOnExit(); + writer.flush(out, true); + //此处记得关闭输出Servlet流 + IoUtil.close(out); + } + + public static String getFileType(String type) { + String documents = "txt doc pdf ppt pps xlsx xls docx"; + String music = "mp3 wav wma mpa ram ra aac aif m4a"; + String video = "avi mpg mpe mpeg asf wmv mov qt rm mp4 flv m4v webm ogv ogg"; + String image = "bmp dib pcp dif wmf gif jpg tif eps psd cdr iff tga pcd mpt png jpeg"; + if (image.contains(type)) { + return IMAGE; + } else if (documents.contains(type)) { + return TXT; + } else if (music.contains(type)) { + return MUSIC; + } else if (video.contains(type)) { + return VIDEO; + } else { + return OTHER; + } + } + + public static void checkSize(long maxSize, long size) { + // 1M + int len = 1024 * 1024; + if (size > (maxSize * len)) { + throw new BadRequestException("文件超出规定大小:" + maxSize + "MB"); + } + } + + /** + * 判断两个文件是否相同 + */ + public static boolean check(File file1, File file2) { + String img1Md5 = getMd5(file1); + String img2Md5 = getMd5(file2); + if(img1Md5 != null){ + return img1Md5.equals(img2Md5); + } + return false; + } + + /** + * 判断两个文件是否相同 + */ + public static boolean check(String file1Md5, String file2Md5) { + return file1Md5.equals(file2Md5); + } + + private static byte[] getByte(File file) { + // 得到文件长度 + byte[] b = new byte[(int) file.length()]; + InputStream in = null; + try { + in = new FileInputStream(file); + try { + System.out.println(in.read(b)); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } catch (Exception e) { + log.error(e.getMessage(), e); + return null; + } finally { + CloseUtil.close(in); + } + return b; + } + + private static String getMd5(byte[] bytes) { + // 16进制字符 + char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; + try { + MessageDigest mdTemp = MessageDigest.getInstance("MD5"); + mdTemp.update(bytes); + byte[] md = mdTemp.digest(); + int j = md.length; + char[] str = new char[j * 2]; + int k = 0; + // 移位 输出字符串 + for (byte byte0 : md) { + str[k++] = hexDigits[byte0 >>> 4 & 0xf]; + str[k++] = hexDigits[byte0 & 0xf]; + } + return new String(str); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + return null; + } + + /** + * 下载文件 + * + * @param request / + * @param response / + * @param file / + */ + public static void downloadFile(HttpServletRequest request, HttpServletResponse response, File file, boolean deleteOnExit) { + response.setCharacterEncoding(request.getCharacterEncoding()); + response.setContentType("application/octet-stream"); + FileInputStream fis = null; + try { + fis = new FileInputStream(file); + response.setHeader("Content-Disposition", "attachment; filename=" + file.getName()); + IOUtils.copy(fis, response.getOutputStream()); + response.flushBuffer(); + } catch (Exception e) { + log.error(e.getMessage(), e); + } finally { + if (fis != null) { + try { + fis.close(); + if (deleteOnExit) { + file.deleteOnExit(); + } + } catch (IOException e) { + log.error(e.getMessage(), e); + } + } + } + } + + /** + * 验证并过滤非法的文件名 + * @param fileName 文件名 + * @return 文件名 + */ + public static String verifyFilename(String fileName) { + // 过滤掉特殊字符 + fileName = fileName.replaceAll("[\\\\/:*?\"<>|~\\s]", ""); + + // 去掉文件名开头和结尾的空格和点 + fileName = fileName.trim().replaceAll("^[. ]+|[. ]+$", ""); + + // 不允许文件名超过255(在Mac和Linux中)或260(在Windows中)个字符 + int maxFileNameLength = 255; + if (System.getProperty("os.name").startsWith("Windows")) { + maxFileNameLength = 260; + } + if (fileName.length() > maxFileNameLength) { + fileName = fileName.substring(0, maxFileNameLength); + } + + // 过滤掉控制字符 + fileName = fileName.replaceAll("[\\p{Cntrl}]", ""); + + // 过滤掉 ".." 路径 + fileName = fileName.replaceAll("\\.{2,}", ""); + + // 去掉文件名开头的 ".." + fileName = fileName.replaceAll("^\\.+/", ""); + + // 保留文件名中最后一个 "." 字符,过滤掉其他 "." + fileName = fileName.replaceAll("^(.*)(\\.[^.]*)$", "$1").replaceAll("\\.", "") + + fileName.replaceAll("^(.*)(\\.[^.]*)$", "$2"); + + return fileName; + } + + + public static String getMd5(File file) { + return getMd5(getByte(file)); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/HttpSendUtil.java b/eladmin-common/src/main/java/me/zhengjie/utils/HttpSendUtil.java new file mode 100644 index 0000000..97cc8e3 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/HttpSendUtil.java @@ -0,0 +1,130 @@ +package me.zhengjie.utils; + + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; + + +public class HttpSendUtil { + private HttpSendUtil() { + } + + private static class HttpSendUtilInstance { + private static final HttpSendUtil INSTANCE = new HttpSendUtil(); + } + + public static HttpSendUtil instance() { + return HttpSendUtilInstance.INSTANCE; + } + + + public String sendPost(String sendUrl, String params, String encodType) { + StringBuffer receive = new StringBuffer(); + + HttpURLConnection URLConn = null; + BufferedWriter bw = null; + BufferedReader br = null; + + try { + URL url = new URL(sendUrl); + URLConn = (HttpURLConnection) url.openConnection(); + URLConn.setRequestMethod("POST"); + URLConn.setDoOutput(true); + URLConn.setDoInput(true); + URLConn.setUseCaches(false); + URLConn.setAllowUserInteraction(true); + HttpURLConnection.setFollowRedirects(true); + URLConn.setInstanceFollowRedirects(true); + + URLConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); + URLConn.setRequestProperty("Content-Length", String.valueOf(params.getBytes().length)); + + DataOutputStream dos = new DataOutputStream(URLConn.getOutputStream()); + dos.writeBytes(params); + + br = new BufferedReader(new InputStreamReader(URLConn.getInputStream(), encodType)); + + String line; + while ((line = br.readLine()) != null) { + receive.append(line).append("\r\n"); + } + + br.close(); + + } catch (IOException e) { + receive.append("访问产生了异常-->").append(e.getMessage()); + e.printStackTrace(); + } finally { + if (bw != null) { + try { + bw.close(); + } catch (IOException ex) { + bw = null; + ex.printStackTrace(); + } finally { + if (URLConn != null) { + URLConn.disconnect(); + URLConn = null; + } + } + } + if (br != null) { + try { + br.close(); + } catch (IOException e) { + br = null; + throw new RuntimeException(e); + } finally { + if (URLConn != null) { + URLConn.disconnect(); + URLConn = null; + } + } + } + } + + return receive.toString(); + } + + public String sendGet(String sendUrl, String encodType) { + StringBuffer receive = new StringBuffer(); + BufferedReader br = null; + HttpURLConnection URLConn = null; + try { + URL url = new URL(sendUrl); + URLConn = (HttpURLConnection) url.openConnection(); + + URLConn.setDoInput(true); + URLConn.setDoOutput(true); + URLConn.connect(); + URLConn.getOutputStream().flush(); + br = new BufferedReader(new InputStreamReader(URLConn.getInputStream(), encodType)); + + String line; + while ((line = br.readLine()) != null) { + receive.append(line).append("\r\n"); + } + + } catch (IOException e) { + receive.append("访问产生了异常-->").append(e.getMessage()); + e.printStackTrace(); + } finally { + if (br != null) { + try { + br.close(); + } catch (IOException ex) { + br = null; + ex.printStackTrace(); + } finally { + if (URLConn != null) { + URLConn.disconnect(); + URLConn = null; + } + } + } + } + + return receive.toString(); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/PageResult.java b/eladmin-common/src/main/java/me/zhengjie/utils/PageResult.java new file mode 100644 index 0000000..0f1fdfe --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/PageResult.java @@ -0,0 +1,16 @@ +package me.zhengjie.utils; + +import lombok.AccessLevel; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +import java.util.List; + +@Getter +@RequiredArgsConstructor(access = AccessLevel.PACKAGE) +public class PageResult { + + private final List content; + + private final long totalElements; +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java b/eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java new file mode 100644 index 0000000..72c759d --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java @@ -0,0 +1,70 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.*; + +/** + * 分页工具 + * @author Zheng Jie + * @date 2018-12-10 + */ +public class PageUtil extends cn.hutool.core.util.PageUtil { + + /** + * List 分页 + */ + public static List paging(int page, int size , List list) { + int fromIndex = page * size; + int toIndex = page * size + size; + if(fromIndex > list.size()){ + return Collections.emptyList(); + } else if(toIndex >= list.size()) { + return list.subList(fromIndex,list.size()); + } else { + return list.subList(fromIndex,toIndex); + } + } + + /** + * Page 数据处理 + */ + public static PageResult toPage(IPage page) { + return new PageResult<>(page.getRecords(), page.getTotal()); + } + + /** + * 自定义分页 + */ + public static PageResult toPage(List list) { + return new PageResult<>(list, list.size()); + } + + /** + * 返回空数据 + */ + public static PageResult noData () { + return new PageResult<>(null, 0); + } + + /** + * 自定义分页 + */ + public static PageResult toPage(List list, long totalElements) { + return new PageResult<>(list, totalElements); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java b/eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java new file mode 100644 index 0000000..65d0278 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java @@ -0,0 +1,725 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.redis.connection.RedisConnection; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.*; +import org.springframework.data.redis.serializer.StringRedisSerializer; +import org.springframework.stereotype.Component; +import java.util.*; +import java.util.concurrent.TimeUnit; + +/** + * @author / + */ +@Component +@SuppressWarnings({"unchecked", "all"}) +public class RedisUtils { + private static final Logger log = LoggerFactory.getLogger(RedisUtils.class); + + private RedisTemplate redisTemplate; + + public RedisUtils(RedisTemplate redisTemplate) { + this.redisTemplate = redisTemplate; + this.redisTemplate.setHashKeySerializer(new StringRedisSerializer()); + this.redisTemplate.setKeySerializer(new StringRedisSerializer()); + this.redisTemplate.setStringSerializer(new StringRedisSerializer()); + } + + /** + * 指定缓存失效时间 + * + * @param key 键 + * @param time 时间(秒) 注意:这里将会替换原有的时间 + */ + public boolean expire(String key, long time) { + try { + if (time > 0) { + redisTemplate.expire(key, time, TimeUnit.SECONDS); + } + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + return true; + } + + /** + * 指定缓存失效时间 + * + * @param key 键 + * @param time 时间(秒) 注意:这里将会替换原有的时间 + * @param timeUnit 单位 + */ + public boolean expire(String key, long time, TimeUnit timeUnit) { + try { + if (time > 0) { + redisTemplate.expire(key, time, timeUnit); + } + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + return true; + } + + /** + * 根据 key 获取过期时间 + * + * @param key 键 不能为null + * @return 时间(秒) 返回0代表为永久有效 + */ + public long getExpire(Object key) { + return redisTemplate.getExpire(key, TimeUnit.SECONDS); + } + + /** + * 查找匹配key + * + * @param pattern key + * @return / + */ + public List scan(String pattern) { + ScanOptions options = ScanOptions.scanOptions().match(pattern).build(); + RedisConnectionFactory factory = redisTemplate.getConnectionFactory(); + RedisConnection rc = Objects.requireNonNull(factory).getConnection(); + Cursor cursor = rc.scan(options); + List result = new ArrayList<>(); + while (cursor.hasNext()) { + result.add(new String(cursor.next())); + } + try { + RedisConnectionUtils.releaseConnection(rc, factory); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + return result; + } + + /** + * 分页查询 key + * + * @param patternKey key + * @param page 页码 + * @param size 每页数目 + * @return / + */ + public List findKeysForPage(String patternKey, int page, int size) { + ScanOptions options = ScanOptions.scanOptions().match(patternKey).build(); + RedisConnectionFactory factory = redisTemplate.getConnectionFactory(); + RedisConnection rc = Objects.requireNonNull(factory).getConnection(); + Cursor cursor = rc.scan(options); + List result = new ArrayList<>(size); + int tmpIndex = 0; + int fromIndex = page * size; + int toIndex = page * size + size; + while (cursor.hasNext()) { + if (tmpIndex >= fromIndex && tmpIndex < toIndex) { + result.add(new String(cursor.next())); + tmpIndex++; + continue; + } + // 获取到满足条件的数据后,就可以退出了 + if (tmpIndex >= toIndex) { + break; + } + tmpIndex++; + cursor.next(); + } + try { + RedisConnectionUtils.releaseConnection(rc, factory); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + return result; + } + + /** + * 判断key是否存在 + * + * @param key 键 + * @return true 存在 false不存在 + */ + public boolean hasKey(String key) { + try { + return redisTemplate.hasKey(key); + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 删除缓存 + * + * @param key 可以传一个值 或多个 + */ + public void del(String... keys) { + if (keys != null && keys.length > 0) { + if (keys.length == 1) { + boolean result = redisTemplate.delete(keys[0]); + log.debug("--------------------------------------------"); + log.debug(new StringBuilder("删除缓存:").append(keys[0]).append(",结果:").append(result).toString()); + log.debug("--------------------------------------------"); + } else { + Set keySet = new HashSet<>(); + for (String key : keys) { + if (redisTemplate.hasKey(key)) + keySet.add(key); + } + long count = redisTemplate.delete(keySet); + log.debug("--------------------------------------------"); + log.debug("成功删除缓存:" + keySet.toString()); + log.debug("缓存删除数量:" + count + "个"); + log.debug("--------------------------------------------"); + } + } + } + + /** + * 批量模糊删除key + * @param pattern + */ + public void scanDel(String pattern){ + ScanOptions options = ScanOptions.scanOptions().match(pattern).build(); + try (Cursor cursor = redisTemplate.executeWithStickyConnection( + (RedisCallback>) connection -> (Cursor) new ConvertingCursor<>( + connection.scan(options), redisTemplate.getKeySerializer()::deserialize))) { + while (cursor.hasNext()) { + redisTemplate.delete(cursor.next()); + } + } + } + + // ============================String============================= + + /** + * 普通缓存获取 + * + * @param key 键 + * @return 值 + */ + public Object get(String key) { + return key == null ? null : redisTemplate.opsForValue().get(key); + } + + /** + * 批量获取 + * + * @param keys + * @return + */ + public List multiGet(List keys) { + List list = redisTemplate.opsForValue().multiGet(Sets.newHashSet(keys)); + List resultList = Lists.newArrayList(); + Optional.ofNullable(list).ifPresent(e-> list.forEach(ele-> Optional.ofNullable(ele).ifPresent(resultList::add))); + return resultList; + } + + /** + * 普通缓存放入 + * + * @param key 键 + * @param value 值 + * @return true成功 false失败 + */ + public boolean set(String key, Object value) { + try { + redisTemplate.opsForValue().set(key, value); + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 普通缓存放入并设置时间 + * + * @param key 键 + * @param value 值 + * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期,注意:这里将会替换原有的时间 + * @return true成功 false 失败 + */ + public boolean set(String key, Object value, long time) { + try { + if (time > 0) { + redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS); + } else { + set(key, value); + } + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 普通缓存放入并设置时间 + * + * @param key 键 + * @param value 值 + * @param time 时间,注意:这里将会替换原有的时间 + * @param timeUnit 类型 + * @return true成功 false 失败 + */ + public boolean set(String key, Object value, long time, TimeUnit timeUnit) { + try { + if (time > 0) { + redisTemplate.opsForValue().set(key, value, time, timeUnit); + } else { + set(key, value); + } + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + // ================================Map================================= + + /** + * HashGet + * + * @param key 键 不能为null + * @param item 项 不能为null + * @return 值 + */ + public Object hget(String key, String item) { + return redisTemplate.opsForHash().get(key, item); + } + + /** + * 获取hashKey对应的所有键值 + * + * @param key 键 + * @return 对应的多个键值 + */ + public Map hmget(String key) { + return redisTemplate.opsForHash().entries(key); + + } + + /** + * HashSet + * + * @param key 键 + * @param map 对应多个键值 + * @return true 成功 false 失败 + */ + public boolean hmset(String key, Map map) { + try { + redisTemplate.opsForHash().putAll(key, map); + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * HashSet + * + * @param key 键 + * @param map 对应多个键值 + * @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间 + * @return true成功 false失败 + */ + public boolean hmset(String key, Map map, long time) { + try { + redisTemplate.opsForHash().putAll(key, map); + if (time > 0) { + expire(key, time); + } + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 向一张hash表中放入数据,如果不存在将创建 + * + * @param key 键 + * @param item 项 + * @param value 值 + * @return true 成功 false失败 + */ + public boolean hset(String key, String item, Object value) { + try { + redisTemplate.opsForHash().put(key, item, value); + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 向一张hash表中放入数据,如果不存在将创建 + * + * @param key 键 + * @param item 项 + * @param value 值 + * @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间 + * @return true 成功 false失败 + */ + public boolean hset(String key, String item, Object value, long time) { + try { + redisTemplate.opsForHash().put(key, item, value); + if (time > 0) { + expire(key, time); + } + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 删除hash表中的值 + * + * @param key 键 不能为null + * @param item 项 可以使多个 不能为null + */ + public void hdel(String key, Object... item) { + redisTemplate.opsForHash().delete(key, item); + } + + /** + * 判断hash表中是否有该项的值 + * + * @param key 键 不能为null + * @param item 项 不能为null + * @return true 存在 false不存在 + */ + public boolean hHasKey(String key, String item) { + return redisTemplate.opsForHash().hasKey(key, item); + } + + /** + * hash递增 如果不存在,就会创建一个 并把新增后的值返回 + * + * @param key 键 + * @param item 项 + * @param by 要增加几(大于0) + * @return + */ + public double hincr(String key, String item, double by) { + return redisTemplate.opsForHash().increment(key, item, by); + } + + /** + * hash递减 + * + * @param key 键 + * @param item 项 + * @param by 要减少记(小于0) + * @return + */ + public double hdecr(String key, String item, double by) { + return redisTemplate.opsForHash().increment(key, item, -by); + } + + // ============================set============================= + + /** + * 根据key获取Set中的所有值 + * + * @param key 键 + * @return + */ + public Set sGet(String key) { + try { + return redisTemplate.opsForSet().members(key); + } catch (Exception e) { + log.error(e.getMessage(), e); + return null; + } + } + + /** + * 根据value从一个set中查询,是否存在 + * + * @param key 键 + * @param value 值 + * @return true 存在 false不存在 + */ + public boolean sHasKey(String key, Object value) { + try { + return redisTemplate.opsForSet().isMember(key, value); + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 将数据放入set缓存 + * + * @param key 键 + * @param values 值 可以是多个 + * @return 成功个数 + */ + public long sSet(String key, Object... values) { + try { + return redisTemplate.opsForSet().add(key, values); + } catch (Exception e) { + log.error(e.getMessage(), e); + return 0; + } + } + + /** + * 将set数据放入缓存 + * + * @param key 键 + * @param time 时间(秒) 注意:这里将会替换原有的时间 + * @param values 值 可以是多个 + * @return 成功个数 + */ + public long sSetAndTime(String key, long time, Object... values) { + try { + Long count = redisTemplate.opsForSet().add(key, values); + if (time > 0) { + expire(key, time); + } + return count; + } catch (Exception e) { + log.error(e.getMessage(), e); + return 0; + } + } + + /** + * 获取set缓存的长度 + * + * @param key 键 + * @return + */ + public long sGetSetSize(String key) { + try { + return redisTemplate.opsForSet().size(key); + } catch (Exception e) { + log.error(e.getMessage(), e); + return 0; + } + } + + /** + * 移除值为value的 + * + * @param key 键 + * @param values 值 可以是多个 + * @return 移除的个数 + */ + public long setRemove(String key, Object... values) { + try { + Long count = redisTemplate.opsForSet().remove(key, values); + return count; + } catch (Exception e) { + log.error(e.getMessage(), e); + return 0; + } + } + + // ===============================list================================= + + /** + * 获取list缓存的内容 + * + * @param key 键 + * @param start 开始 + * @param end 结束 0 到 -1代表所有值 + * @return + */ + public List lGet(String key, long start, long end) { + try { + return redisTemplate.opsForList().range(key, start, end); + } catch (Exception e) { + log.error(e.getMessage(), e); + return null; + } + } + + /** + * 获取list缓存的长度 + * + * @param key 键 + * @return + */ + public long lGetListSize(String key) { + try { + return redisTemplate.opsForList().size(key); + } catch (Exception e) { + log.error(e.getMessage(), e); + return 0; + } + } + + /** + * 通过索引 获取list中的值 + * + * @param key 键 + * @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推 + * @return + */ + public Object lGetIndex(String key, long index) { + try { + return redisTemplate.opsForList().index(key, index); + } catch (Exception e) { + log.error(e.getMessage(), e); + return null; + } + } + + /** + * 将list放入缓存 + * + * @param key 键 + * @param value 值 + * @return + */ + public boolean lSet(String key, Object value) { + try { + redisTemplate.opsForList().rightPush(key, value); + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 将list放入缓存 + * + * @param key 键 + * @param value 值 + * @param time 时间(秒) 注意:这里将会替换原有的时间 + * @return + */ + public boolean lSet(String key, Object value, long time) { + try { + redisTemplate.opsForList().rightPush(key, value); + if (time > 0) { + expire(key, time); + } + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 将list放入缓存 + * + * @param key 键 + * @param value 值 + * @return + */ + public boolean lSet(String key, List value) { + try { + redisTemplate.opsForList().rightPushAll(key, value); + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 将list放入缓存 + * + * @param key 键 + * @param value 值 + * @param time 时间(秒) 注意:这里将会替换原有的时间 + * @return + */ + public boolean lSet(String key, List value, long time) { + try { + redisTemplate.opsForList().rightPushAll(key, value); + if (time > 0) { + expire(key, time); + } + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 根据索引修改list中的某条数据 + * + * @param key 键 + * @param index 索引 + * @param value 值 + * @return / + */ + public boolean lUpdateIndex(String key, long index, Object value) { + try { + redisTemplate.opsForList().set(key, index, value); + return true; + } catch (Exception e) { + log.error(e.getMessage(), e); + return false; + } + } + + /** + * 移除N个值为value + * + * @param key 键 + * @param count 移除多少个 + * @param value 值 + * @return 移除的个数 + */ + public long lRemove(String key, long count, Object value) { + try { + return redisTemplate.opsForList().remove(key, count, value); + } catch (Exception e) { + log.error(e.getMessage(), e); + return 0; + } + } + + /** + * @param prefix 前缀 + * @param ids id + */ + public void delByKeys(String prefix, Set ids) { + Set keys = new HashSet<>(); + for (Long id : ids) { + keys.addAll(redisTemplate.keys(new StringBuffer(prefix).append(id).toString())); + } + long count = redisTemplate.delete(keys); + // 此处提示可自行删除 + log.debug("--------------------------------------------"); + log.debug("成功删除缓存:" + keys.toString()); + log.debug("缓存删除数量:" + count + "个"); + log.debug("--------------------------------------------"); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/RequestHolder.java b/eladmin-common/src/main/java/me/zhengjie/utils/RequestHolder.java new file mode 100644 index 0000000..71a4b9e --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/RequestHolder.java @@ -0,0 +1,33 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; +import javax.servlet.http.HttpServletRequest; +import java.util.Objects; + +/** + * 获取 HttpServletRequest + * @author Zheng Jie + * @date 2018-11-24 + */ +public class RequestHolder { + + public static HttpServletRequest getHttpServletRequest() { + return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/RsaUtils.java b/eladmin-common/src/main/java/me/zhengjie/utils/RsaUtils.java new file mode 100644 index 0000000..8123ff3 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/RsaUtils.java @@ -0,0 +1,198 @@ +package me.zhengjie.utils; + +import org.apache.commons.codec.binary.Base64; +import javax.crypto.Cipher; +import java.io.ByteArrayOutputStream; +import java.security.*; +import java.security.interfaces.RSAPrivateKey; +import java.security.interfaces.RSAPublicKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; + +/** + * @author https://www.cnblogs.com/nihaorz/p/10690643.html + * @description Rsa 工具类,公钥私钥生成,加解密 + * @date 2020-05-18 + **/ +public class RsaUtils { + + private static final String SRC = "123456"; + + public static void main(String[] args) throws Exception { + System.out.println("\n"); + RsaKeyPair keyPair = generateKeyPair(); + System.out.println("公钥:" + keyPair.getPublicKey()); + System.out.println("私钥:" + keyPair.getPrivateKey()); + System.out.println("\n"); + test1(keyPair); + System.out.println("\n"); + test2(keyPair); + System.out.println("\n"); + } + + /** + * 公钥加密私钥解密 + */ + private static void test1(RsaKeyPair keyPair) throws Exception { + System.out.println("***************** 公钥加密私钥解密开始 *****************"); + String text1 = encryptByPublicKey(keyPair.getPublicKey(), RsaUtils.SRC); + String text2 = decryptByPrivateKey(keyPair.getPrivateKey(), text1); + System.out.println("加密前:" + RsaUtils.SRC); + System.out.println("加密后:" + text1); + System.out.println("解密后:" + text2); + if (RsaUtils.SRC.equals(text2)) { + System.out.println("解密字符串和原始字符串一致,解密成功"); + } else { + System.out.println("解密字符串和原始字符串不一致,解密失败"); + } + System.out.println("***************** 公钥加密私钥解密结束 *****************"); + } + + /** + * 私钥加密公钥解密 + * @throws Exception / + */ + private static void test2(RsaKeyPair keyPair) throws Exception { + System.out.println("***************** 私钥加密公钥解密开始 *****************"); + String text1 = encryptByPrivateKey(keyPair.getPrivateKey(), RsaUtils.SRC); + String text2 = decryptByPublicKey(keyPair.getPublicKey(), text1); + System.out.println("加密前:" + RsaUtils.SRC); + System.out.println("加密后:" + text1); + System.out.println("解密后:" + text2); + if (RsaUtils.SRC.equals(text2)) { + System.out.println("解密字符串和原始字符串一致,解密成功"); + } else { + System.out.println("解密字符串和原始字符串不一致,解密失败"); + } + System.out.println("***************** 私钥加密公钥解密结束 *****************"); + } + + /** + * 公钥解密 + * + * @param publicKeyText 公钥 + * @param text 待解密的信息 + * @return / + * @throws Exception / + */ + public static String decryptByPublicKey(String publicKeyText, String text) throws Exception { + X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyText)); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec); + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.DECRYPT_MODE, publicKey); + byte[] result = doLongerCipherFinal(Cipher.DECRYPT_MODE, cipher, Base64.decodeBase64(text)); + return new String(result); + } + + /** + * 私钥加密 + * + * @param privateKeyText 私钥 + * @param text 待加密的信息 + * @return / + * @throws Exception / + */ + public static String encryptByPrivateKey(String privateKeyText, String text) throws Exception { + PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyText)); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec); + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.ENCRYPT_MODE, privateKey); + byte[] result = doLongerCipherFinal(Cipher.ENCRYPT_MODE, cipher, text.getBytes()); + return Base64.encodeBase64String(result); + } + + /** + * 私钥解密 + * + * @param privateKeyText 私钥 + * @param text 待解密的文本 + * @return / + * @throws Exception / + */ + public static String decryptByPrivateKey(String privateKeyText, String text) throws Exception { + PKCS8EncodedKeySpec pkcs8EncodedKeySpec5 = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyText)); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec5); + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.DECRYPT_MODE, privateKey); + byte[] result = doLongerCipherFinal(Cipher.DECRYPT_MODE, cipher, Base64.decodeBase64(text)); + return new String(result); + } + + /** + * 公钥加密 + * + * @param publicKeyText 公钥 + * @param text 待加密的文本 + * @return / + */ + public static String encryptByPublicKey(String publicKeyText, String text) throws Exception { + X509EncodedKeySpec x509EncodedKeySpec2 = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyText)); + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec2); + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.ENCRYPT_MODE, publicKey); + byte[] result = doLongerCipherFinal(Cipher.ENCRYPT_MODE, cipher, text.getBytes()); + return Base64.encodeBase64String(result); + } + + private static byte[] doLongerCipherFinal(int opMode,Cipher cipher, byte[] source) throws Exception { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + if (opMode == Cipher.DECRYPT_MODE) { + out.write(cipher.doFinal(source)); + } else { + int offset = 0; + int totalSize = source.length; + while (totalSize - offset > 0) { + int size = Math.min(cipher.getOutputSize(0) - 11, totalSize - offset); + out.write(cipher.doFinal(source, offset, size)); + offset += size; + } + } + out.close(); + return out.toByteArray(); + } + + /** + * 构建RSA密钥对 + * + * @return / + * @throws NoSuchAlgorithmException / + */ + public static RsaKeyPair generateKeyPair() throws NoSuchAlgorithmException { + KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); + keyPairGenerator.initialize(1024); + KeyPair keyPair = keyPairGenerator.generateKeyPair(); + RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic(); + RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate(); + String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded()); + String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded()); + return new RsaKeyPair(publicKeyString, privateKeyString); + } + + + /** + * RSA密钥对对象 + */ + public static class RsaKeyPair { + + private final String publicKey; + private final String privateKey; + + public RsaKeyPair(String publicKey, String privateKey) { + this.publicKey = publicKey; + this.privateKey = privateKey; + } + + public String getPublicKey() { + return publicKey; + } + + public String getPrivateKey() { + return privateKey; + } + + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/SecurityUtils.java b/eladmin-common/src/main/java/me/zhengjie/utils/SecurityUtils.java new file mode 100644 index 0000000..28e4672 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/SecurityUtils.java @@ -0,0 +1,99 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.utils.enums.DataScopeEnum; +import org.springframework.http.HttpStatus; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import java.util.List; + +/** + * 获取当前登录的用户 + * @author Zheng Jie + * @date 2019-01-17 + */ +@Slf4j +public class SecurityUtils { + + /** + * 获取当前登录的用户 + * @return UserDetails + */ + public static UserDetails getCurrentUser() { + UserDetailsService userDetailsService = SpringContextHolder.getBean(UserDetailsService.class); + return userDetailsService.loadUserByUsername(getCurrentUsername()); + } + + /** + * 获取系统用户名称 + * + * @return 系统用户名称 + */ + public static String getCurrentUsername() { + final Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + if (authentication == null) { + throw new BadRequestException(HttpStatus.UNAUTHORIZED, "当前登录状态过期"); + } + if (authentication.getPrincipal() instanceof UserDetails) { + UserDetails userDetails = (UserDetails) authentication.getPrincipal(); + return userDetails.getUsername(); + } + throw new BadRequestException(HttpStatus.UNAUTHORIZED, "找不到当前登录的信息"); + } + + /** + * 获取系统用户ID + * @return 系统用户ID + */ + public static Long getCurrentUserId() { + UserDetails userDetails = getCurrentUser(); + // 将 Java 对象转换为 JSONObject 对象 + JSONObject jsonObject = (JSONObject) JSON.toJSON(userDetails); + return jsonObject.getJSONObject("user").getLong("id"); + } + + /** + * 获取当前用户的数据权限 + * @return / + */ + public static List getCurrentUserDataScope(){ + UserDetails userDetails = getCurrentUser(); + // 将 Java 对象转换为 JSONObject 对象 + JSONObject jsonObject = (JSONObject) JSON.toJSON(userDetails); + JSONArray jsonArray = jsonObject.getJSONArray("dataScopes"); + return JSON.parseArray(jsonArray.toJSONString(), Long.class); + } + + /** + * 获取数据权限级别 + * @return 级别 + */ + public static String getDataScopeType() { + List dataScopes = getCurrentUserDataScope(); + if(dataScopes.size() != 0){ + return ""; + } + return DataScopeEnum.ALL.getValue(); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/SpringContextHolder.java b/eladmin-common/src/main/java/me/zhengjie/utils/SpringContextHolder.java new file mode 100644 index 0000000..41ead38 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/SpringContextHolder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * @author Jie + * @date 2019-01-07 + */ +@Slf4j +public class SpringContextHolder implements ApplicationContextAware, DisposableBean { + + private static ApplicationContext applicationContext = null; + private static final List CALL_BACKS = new ArrayList<>(); + private static boolean addCallback = true; + + /** + * 针对 某些初始化方法,在SpringContextHolder 未初始化时 提交回调方法。 + * 在SpringContextHolder 初始化后,进行回调使用 + * + * @param callBack 回调函数 + */ + public synchronized static void addCallBacks(CallBack callBack) { + if (addCallback) { + SpringContextHolder.CALL_BACKS.add(callBack); + } else { + log.warn("CallBack:{} 已无法添加!立即执行", callBack.getCallBackName()); + callBack.executor(); + } + } + + /** + * 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型. + */ + @SuppressWarnings("unchecked") + public static T getBean(String name) { + assertContextInjected(); + return (T) applicationContext.getBean(name); + } + + /** + * 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型. + */ + public static T getBean(Class requiredType) { + assertContextInjected(); + return applicationContext.getBean(requiredType); + } + + /** + * 获取SpringBoot 配置信息 + * + * @param property 属性key + * @param defaultValue 默认值 + * @param requiredType 返回类型 + * @return / + */ + public static T getProperties(String property, T defaultValue, Class requiredType) { + T result = defaultValue; + try { + result = getBean(Environment.class).getProperty(property, requiredType); + } catch (Exception ignored) {} + return result; + } + + /** + * 获取SpringBoot 配置信息 + * + * @param property 属性key + * @return / + */ + public static String getProperties(String property) { + return getProperties(property, null, String.class); + } + + /** + * 获取SpringBoot 配置信息 + * + * @param property 属性key + * @param requiredType 返回类型 + * @return / + */ + public static T getProperties(String property, Class requiredType) { + return getProperties(property, null, requiredType); + } + + /** + * 检查ApplicationContext不为空. + */ + private static void assertContextInjected() { + if (applicationContext == null) { + throw new IllegalStateException("applicaitonContext属性未注入, 请在applicationContext" + + ".xml中定义SpringContextHolder或在SpringBoot启动类中注册SpringContextHolder."); + } + } + + /** + * 清除SpringContextHolder中的ApplicationContext为Null. + */ + private static void clearHolder() { + log.debug("清除SpringContextHolder中的ApplicationContext:" + + applicationContext); + applicationContext = null; + } + + @Override + public void destroy() { + SpringContextHolder.clearHolder(); + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + if (SpringContextHolder.applicationContext != null) { + log.warn("SpringContextHolder中的ApplicationContext被覆盖, 原有ApplicationContext为:" + SpringContextHolder.applicationContext); + } + SpringContextHolder.applicationContext = applicationContext; + if (addCallback) { + for (CallBack callBack : SpringContextHolder.CALL_BACKS) { + callBack.executor(); + } + CALL_BACKS.clear(); + } + SpringContextHolder.addCallback = false; + } + + /** + * 获取 @Service 的所有 bean 名称 + * @return / + */ + public static List getAllServiceBeanName() { + return new ArrayList<>(Arrays.asList(applicationContext + .getBeanNamesForAnnotation(Service.class))); + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java b/eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java new file mode 100644 index 0000000..f6bd259 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java @@ -0,0 +1,240 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import cn.hutool.http.useragent.UserAgent; +import cn.hutool.http.useragent.UserAgentUtil; +import lombok.extern.slf4j.Slf4j; +import net.dreamlu.mica.ip2region.core.Ip2regionSearcher; +import net.dreamlu.mica.ip2region.core.IpInfo; +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Field; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.UnknownHostException; +import java.util.*; + +/** + * @author Zheng Jie + * 字符串工具类, 继承org.apache.commons.lang3.StringUtils类 + */ +@Slf4j +@SuppressWarnings({"unchecked","all"}) +public class StringUtils extends org.apache.commons.lang3.StringUtils { + + private static final char SEPARATOR = '_'; + private static final String UNKNOWN = "unknown"; + + /** + * 注入bean + */ + private final static Ip2regionSearcher IP_SEARCHER = SpringContextHolder.getBean(Ip2regionSearcher.class); + + /** + * 驼峰命名法工具 + * + * @return toCamelCase(" hello_world ") == "helloWorld" + * toCapitalizeCamelCase("hello_world") == "HelloWorld" + * toUnderScoreCase("helloWorld") = "hello_world" + */ + public static String toCamelCase(String s) { + if (s == null) { + return null; + } + + s = s.toLowerCase(); + + StringBuilder sb = new StringBuilder(s.length()); + boolean upperCase = false; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + + if (c == SEPARATOR) { + upperCase = true; + } else if (upperCase) { + sb.append(Character.toUpperCase(c)); + upperCase = false; + } else { + sb.append(c); + } + } + + return sb.toString(); + } + + /** + * 驼峰命名法工具 + * + * @return toCamelCase(" hello_world ") == "helloWorld" + * toCapitalizeCamelCase("hello_world") == "HelloWorld" + * toUnderScoreCase("helloWorld") = "hello_world" + */ + public static String toCapitalizeCamelCase(String s) { + if (s == null) { + return null; + } + s = toCamelCase(s); + return s.substring(0, 1).toUpperCase() + s.substring(1); + } + + /** + * 驼峰命名法工具 + * + * @return toCamelCase(" hello_world ") == "helloWorld" + * toCapitalizeCamelCase("hello_world") == "HelloWorld" + * toUnderScoreCase("helloWorld") = "hello_world" + */ + static String toUnderScoreCase(String s) { + if (s == null) { + return null; + } + + StringBuilder sb = new StringBuilder(); + boolean upperCase = false; + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + + boolean nextUpperCase = true; + + if (i < (s.length() - 1)) { + nextUpperCase = Character.isUpperCase(s.charAt(i + 1)); + } + + if ((i > 0) && Character.isUpperCase(c)) { + if (!upperCase || !nextUpperCase) { + sb.append(SEPARATOR); + } + upperCase = true; + } else { + upperCase = false; + } + + sb.append(Character.toLowerCase(c)); + } + + return sb.toString(); + } + + /** + * 获取ip地址 + */ + public static String getIp(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + String comma = ","; + String localhost = "127.0.0.1"; + if (ip.contains(comma)) { + ip = ip.split(",")[0]; + } + if (localhost.equals(ip)) { + // 获取本机真正的ip地址 + try { + ip = InetAddress.getLocalHost().getHostAddress(); + } catch (UnknownHostException e) { + log.error(e.getMessage(), e); + } + } + return ip; + } + + /** + * 根据ip获取详细地址 + */ + public static String getCityInfo(String ip) { + IpInfo ipInfo = IP_SEARCHER.memorySearch(ip); + if(ipInfo != null){ + return ipInfo.getAddress(); + } + return null; + } + + public static String getBrowser(HttpServletRequest request) { + UserAgent ua = UserAgentUtil.parse(request.getHeader("User-Agent")); + String browser = ua.getBrowser().toString() + " " + ua.getVersion(); + return browser.replace(".0.0.0",""); + } + + /** + * 获得当天是周几 + */ + public static String getWeekDay() { + String[] weekDays = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; + Calendar cal = Calendar.getInstance(); + cal.setTime(new Date()); + + int w = cal.get(Calendar.DAY_OF_WEEK) - 1; + if (w < 0) { + w = 0; + } + return weekDays[w]; + } + + /** + * 获取当前机器的IP + * + * @return / + */ + public static String getLocalIp() { + try { + InetAddress candidateAddress = null; + // 遍历所有的网络接口 + for (Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); interfaces.hasMoreElements();) { + NetworkInterface anInterface = interfaces.nextElement(); + // 在所有的接口下再遍历IP + for (Enumeration inetAddresses = anInterface.getInetAddresses(); inetAddresses.hasMoreElements();) { + InetAddress inetAddr = inetAddresses.nextElement(); + // 排除loopback类型地址 + if (!inetAddr.isLoopbackAddress()) { + if (inetAddr.isSiteLocalAddress()) { + // 如果是site-local地址,就是它了 + return inetAddr.getHostAddress(); + } else if (candidateAddress == null) { + // site-local类型的地址未被发现,先记录候选地址 + candidateAddress = inetAddr; + } + } + } + } + if (candidateAddress != null) { + return candidateAddress.getHostAddress(); + } + // 如果没有发现 non-loopback地址.只能用最次选的方案 + InetAddress jdkSuppliedAddress = InetAddress.getLocalHost(); + if (jdkSuppliedAddress == null) { + return ""; + } + return jdkSuppliedAddress.getHostAddress(); + } catch (Exception e) { + return ""; + } + } + + public static List getAllFields(Class clazz, List fields) { + if (clazz != null) { + fields.addAll(Arrays.asList(clazz.getDeclaredFields())); + getAllFields(clazz.getSuperclass(), fields); + } + return fields; + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/ThrowableUtil.java b/eladmin-common/src/main/java/me/zhengjie/utils/ThrowableUtil.java new file mode 100644 index 0000000..075a65c --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/ThrowableUtil.java @@ -0,0 +1,37 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import java.io.PrintWriter; +import java.io.StringWriter; + +/** + * 异常工具 2019-01-06 + * @author Zheng Jie + */ +public class ThrowableUtil { + + /** + * 获取堆栈信息 + */ + public static String getStackTrace(Throwable throwable){ + StringWriter sw = new StringWriter(); + try (PrintWriter pw = new PrintWriter(sw)) { + throwable.printStackTrace(pw); + return sw.toString(); + } + } +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeBiEnum.java b/eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeBiEnum.java new file mode 100644 index 0000000..944bc71 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeBiEnum.java @@ -0,0 +1,50 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + *

+ * 验证码业务场景 + *

+ * @author Zheng Jie + * @date 2020-05-02 + */ +@Getter +@AllArgsConstructor +public enum CodeBiEnum { + + /* 旧邮箱修改邮箱 */ + ONE(1, "旧邮箱修改邮箱"), + + /* 通过邮箱修改密码 */ + TWO(2, "通过邮箱修改密码"); + + private final Integer code; + private final String description; + + public static CodeBiEnum find(Integer code) { + for (CodeBiEnum value : CodeBiEnum.values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeEnum.java b/eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeEnum.java new file mode 100644 index 0000000..916862a --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeEnum.java @@ -0,0 +1,46 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + *

+ * 验证码业务场景对应的 Redis 中的 key + *

+ * @author Zheng Jie + * @date 2020-05-02 + */ +@Getter +@AllArgsConstructor +public enum CodeEnum { + + /* 通过手机号码重置邮箱 */ + PHONE_RESET_EMAIL_CODE("phone_reset_email_code_", "通过手机号码重置邮箱"), + + /* 通过旧邮箱重置邮箱 */ + EMAIL_RESET_EMAIL_CODE("email_reset_email_code_", "通过旧邮箱重置邮箱"), + + /* 通过手机号码重置密码 */ + PHONE_RESET_PWD_CODE("phone_reset_pwd_code_", "通过手机号码重置密码"), + + /* 通过邮箱重置密码 */ + EMAIL_RESET_PWD_CODE("email_reset_pwd_code_", "通过邮箱重置密码"); + + private final String key; + private final String description; +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/enums/DataScopeEnum.java b/eladmin-common/src/main/java/me/zhengjie/utils/enums/DataScopeEnum.java new file mode 100644 index 0000000..465eef6 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/enums/DataScopeEnum.java @@ -0,0 +1,53 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + *

+ * 数据权限枚举 + *

+ * @author Zheng Jie + * @date 2020-05-07 + */ +@Getter +@AllArgsConstructor +public enum DataScopeEnum { + + /* 全部的数据权限 */ + ALL("全部", "全部的数据权限"), + + /* 自己部门的数据权限 */ + THIS_LEVEL("本级", "自己部门的数据权限"), + + /* 自定义的数据权限 */ + CUSTOMIZE("自定义", "自定义的数据权限"); + + private final String value; + private final String description; + + public static DataScopeEnum find(String val) { + for (DataScopeEnum dataScopeEnum : DataScopeEnum.values()) { + if (dataScopeEnum.getValue().equals(val)) { + return dataScopeEnum; + } + } + return null; + } + +} diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/enums/RequestMethodEnum.java b/eladmin-common/src/main/java/me/zhengjie/utils/enums/RequestMethodEnum.java new file mode 100644 index 0000000..7de5146 --- /dev/null +++ b/eladmin-common/src/main/java/me/zhengjie/utils/enums/RequestMethodEnum.java @@ -0,0 +1,74 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author Zheng Jie + * @website https://eladmin.vip + * @description + * @date 2020-06-10 + **/ +@Getter +@AllArgsConstructor +public enum RequestMethodEnum { + + /** + * 搜寻 @AnonymousGetMapping + */ + GET("GET"), + + /** + * 搜寻 @AnonymousPostMapping + */ + POST("POST"), + + /** + * 搜寻 @AnonymousPutMapping + */ + PUT("PUT"), + + /** + * 搜寻 @AnonymousPatchMapping + */ + PATCH("PATCH"), + + /** + * 搜寻 @AnonymousDeleteMapping + */ + DELETE("DELETE"), + + /** + * 否则就是所有 Request 接口都放行 + */ + ALL("All"); + + /** + * Request 类型 + */ + private final String type; + + public static RequestMethodEnum find(String type) { + for (RequestMethodEnum value : RequestMethodEnum.values()) { + if (value.getType().equals(type)) { + return value; + } + } + return ALL; + } +} diff --git a/eladmin-common/src/test/java/me/zhengjie/utils/DateUtilsTest.java b/eladmin-common/src/test/java/me/zhengjie/utils/DateUtilsTest.java new file mode 100644 index 0000000..dfe01e0 --- /dev/null +++ b/eladmin-common/src/test/java/me/zhengjie/utils/DateUtilsTest.java @@ -0,0 +1,26 @@ +package me.zhengjie.utils; + +import org.junit.jupiter.api.Test; + +import java.time.LocalDateTime; +import java.util.Date; + +public class DateUtilsTest { + @Test + public void test1() { + long l = System.currentTimeMillis() / 1000; + LocalDateTime localDateTime = DateUtil.fromTimeStamp(l); + System.out.print(DateUtil.localDateTimeFormatyMdHms(localDateTime)); + } + + @Test + public void test2() { + LocalDateTime now = LocalDateTime.now(); + System.out.println(DateUtil.localDateTimeFormatyMdHms(now)); + Date date = DateUtil.toDate(now); + LocalDateTime localDateTime = DateUtil.toLocalDateTime(date); + System.out.println(DateUtil.localDateTimeFormatyMdHms(localDateTime)); + LocalDateTime localDateTime1 = DateUtil.fromTimeStamp(date.getTime() / 1000); + System.out.println(DateUtil.localDateTimeFormatyMdHms(localDateTime1)); + } +} diff --git a/eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java b/eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java new file mode 100644 index 0000000..3ec7375 --- /dev/null +++ b/eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java @@ -0,0 +1,33 @@ +package me.zhengjie.utils; + +import org.junit.jupiter.api.Test; + +import static me.zhengjie.utils.EncryptUtils.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class EncryptUtilsTest { + + /** + * 对称加密 + */ + @Test + public void testDesEncrypt() { + try { + assertEquals("7772841DC6099402", desEncrypt("123456")); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * 对称解密 + */ + @Test + public void testDesDecrypt() { + try { + assertEquals("123456", desDecrypt("7772841DC6099402")); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/eladmin-common/src/test/java/me/zhengjie/utils/FileUtilTest.java b/eladmin-common/src/test/java/me/zhengjie/utils/FileUtilTest.java new file mode 100644 index 0000000..48e06bd --- /dev/null +++ b/eladmin-common/src/test/java/me/zhengjie/utils/FileUtilTest.java @@ -0,0 +1,36 @@ +package me.zhengjie.utils; + +import org.junit.jupiter.api.Test; +import org.springframework.mock.web.MockMultipartFile; + +import static me.zhengjie.utils.FileUtil.*; +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class FileUtilTest { + + @Test + public void testToFile() { + long retval = toFile(new MockMultipartFile("foo", (byte[]) null)).getTotalSpace(); + assertEquals(500695072768L, retval); + } + + @Test + public void testGetExtensionName() { + assertEquals("foo", getExtensionName("foo")); + assertEquals("exe", getExtensionName("bar.exe")); + } + + @Test + public void testGetFileNameNoEx() { + assertEquals("foo", getFileNameNoEx("foo")); + assertEquals("bar", getFileNameNoEx("bar.txt")); + } + + @Test + public void testGetSize() { + assertEquals("1000B ", getSize(1000)); + assertEquals("1.00KB ", getSize(1024)); + assertEquals("1.00MB ", getSize(1048576)); + assertEquals("1.00GB ", getSize(1073741824)); + } +} diff --git a/eladmin-common/src/test/java/me/zhengjie/utils/StringUtilsTest.java b/eladmin-common/src/test/java/me/zhengjie/utils/StringUtilsTest.java new file mode 100644 index 0000000..ffb2cf8 --- /dev/null +++ b/eladmin-common/src/test/java/me/zhengjie/utils/StringUtilsTest.java @@ -0,0 +1,48 @@ +package me.zhengjie.utils; + +import org.junit.jupiter.api.Test; +import org.springframework.mock.web.MockHttpServletRequest; + +import java.text.SimpleDateFormat; +import java.util.Date; + +import static me.zhengjie.utils.StringUtils.getIp; +import static me.zhengjie.utils.StringUtils.getWeekDay; +import static me.zhengjie.utils.StringUtils.toCamelCase; +import static me.zhengjie.utils.StringUtils.toCapitalizeCamelCase; +import static me.zhengjie.utils.StringUtils.toUnderScoreCase; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +public class StringUtilsTest { + + @Test + public void testToCamelCase() { + assertNull(toCamelCase(null)); + } + + @Test + public void testToCapitalizeCamelCase() { + assertNull(StringUtils.toCapitalizeCamelCase(null)); + assertEquals("HelloWorld", toCapitalizeCamelCase("hello_world")); + } + + @Test + public void testToUnderScoreCase() { + assertNull(StringUtils.toUnderScoreCase(null)); + assertEquals("hello_world", toUnderScoreCase("helloWorld")); + assertEquals("\u0000\u0000", toUnderScoreCase("\u0000\u0000")); + assertEquals("\u0000_a", toUnderScoreCase("\u0000A")); + } + + @Test + public void testGetWeekDay() { + SimpleDateFormat simpleDateformat = new SimpleDateFormat("E"); + assertEquals(simpleDateformat.format(new Date()), getWeekDay()); + } + + @Test + public void testGetIP() { + assertEquals("127.0.0.1", getIp(new MockHttpServletRequest())); + } +} diff --git a/eladmin-generator/pom.xml b/eladmin-generator/pom.xml new file mode 100644 index 0000000..0ab5121 --- /dev/null +++ b/eladmin-generator/pom.xml @@ -0,0 +1,39 @@ + + + + eladmin + me.zhengjie + 1.1 + + 4.0.0 + + eladmin-generator + 代码生成模块 + + + 1.10 + + + + + me.zhengjie + eladmin-common + 1.1 + + + + + org.springframework.boot + spring-boot-starter-freemarker + + + + + commons-configuration + commons-configuration + ${configuration.version} + + + \ No newline at end of file diff --git a/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java b/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java new file mode 100644 index 0000000..78e355e --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import java.io.Serializable; + +/** + * 列的数据信息 + * @author Zheng Jie + * @date 2019-01-02 + */ +@Getter +@Setter +@NoArgsConstructor +@TableName("code_column_config") +public class ColumnInfo implements Serializable { + + @ApiModelProperty(value = "ID", hidden = true) + @TableId(value = "column_id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "表名") + private String tableName; + + @ApiModelProperty(value = "数据库字段名称") + private String columnName; + + @ApiModelProperty(value = "数据库字段类型") + private String columnType; + + @ApiModelProperty(value = "数据库字段键类型") + private String keyType; + + @ApiModelProperty(value = "字段额外的参数") + private String extra; + + @ApiModelProperty(value = "数据库字段描述") + private String remark; + + @ApiModelProperty(value = "是否必填") + private Boolean notNull; + + @ApiModelProperty(value = "是否在列表显示") + private Boolean listShow = true; + + @ApiModelProperty(value = "是否表单显示") + private Boolean formShow = true; + + @ApiModelProperty(value = "表单类型") + private String formType; + + @ApiModelProperty(value = "查询 1:模糊 2:精确") + private String queryType; + + @ApiModelProperty(value = "字典名称") + private String dictName; +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java b/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java new file mode 100644 index 0000000..056bdd0 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java @@ -0,0 +1,78 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 代码生成配置 + * @author Zheng Jie + * @date 2019-01-03 + */ +@Getter +@Setter +@NoArgsConstructor +@TableName("code_gen_config") +public class GenConfig implements Serializable { + + public GenConfig(String tableName) { + this.tableName = tableName; + } + + @ApiModelProperty(value = "ID", hidden = true) + @TableId(value = "config_id", type = IdType.AUTO) + private Long id; + + @NotBlank + @ApiModelProperty(value = "表名") + private String tableName; + + @ApiModelProperty(value = "接口名称") + private String apiAlias; + + @NotBlank + @ApiModelProperty(value = "包路径") + private String pack; + + @NotBlank + @ApiModelProperty(value = "模块名") + private String moduleName; + + @NotBlank + @ApiModelProperty(value = "前端文件路径") + private String path; + + @ApiModelProperty(value = "前端文件路径") + private String apiPath; + + @ApiModelProperty(value = "作者") + private String author; + + @ApiModelProperty(value = "表前缀") + private String prefix; + + @ApiModelProperty(value = "是否覆盖") + private Boolean cover = false; +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/domain/vo/TableInfo.java b/eladmin-generator/src/main/java/me/zhengjie/domain/vo/TableInfo.java new file mode 100644 index 0000000..1d3967b --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/domain/vo/TableInfo.java @@ -0,0 +1,48 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 表的数据信息 + * @author Zheng Jie + * @date 2019-01-02 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class TableInfo { + + /** 表名称 */ + private Object tableName; + + /** 创建日期 */ + private Object createTime; + + /** 数据库引擎 */ + private Object engine; + + /** 编码集 */ + private Object coding; + + /** 备注 */ + private Object remark; + + +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/mapper/ColumnInfoMapper.java b/eladmin-generator/src/main/java/me/zhengjie/mapper/ColumnInfoMapper.java new file mode 100644 index 0000000..14ca0b8 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/mapper/ColumnInfoMapper.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.domain.ColumnInfo; +import me.zhengjie.domain.vo.TableInfo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * @author Zheng Jie + * @date 2023-06-26 + */ +@Mapper +public interface ColumnInfoMapper extends BaseMapper { + + IPage getTables(@Param("tableName") String tableName, Page page); + + List findByTableNameOrderByIdAsc(@Param("tableName") String tableName); + + List getColumns(@Param("tableName") String tableName); +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/mapper/GenConfigMapper.java b/eladmin-generator/src/main/java/me/zhengjie/mapper/GenConfigMapper.java new file mode 100644 index 0000000..0f19a01 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/mapper/GenConfigMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.domain.GenConfig; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * @author Zheng Jie + * @date 2023-06-26 + */ +@Mapper +public interface GenConfigMapper extends BaseMapper { + + GenConfig findByTableName(@Param("tableName") String tableName); +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java b/eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java new file mode 100644 index 0000000..8fffd33 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java @@ -0,0 +1,51 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.GenConfig; +import me.zhengjie.service.GenConfigService; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * @author Zheng Jie + * @date 2019-01-14 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/genConfig") +@Api(tags = "系统:代码生成器配置管理") +public class GenConfigController { + + private final GenConfigService genConfigService; + + @ApiOperation("查询") + @GetMapping(value = "/{tableName}") + public ResponseEntity queryGenConfig(@PathVariable String tableName){ + return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK); + } + + @PutMapping + @ApiOperation("修改") + public ResponseEntity updateGenConfig(@Validated @RequestBody GenConfig genConfig){ + return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK); + } +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java b/eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java new file mode 100644 index 0000000..89e0c11 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java @@ -0,0 +1,101 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.ColumnInfo; +import me.zhengjie.domain.vo.TableInfo; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.service.GenConfigService; +import me.zhengjie.service.GeneratorService; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * @author Zheng Jie + * @date 2019-01-02 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/generator") +@Api(tags = "系统:代码生成管理") +public class GeneratorController { + + private final GeneratorService generatorService; + private final GenConfigService genConfigService; + + @Value("${generator.enabled}") + private Boolean generatorEnabled; + + @ApiOperation("查询数据库数据") + @GetMapping(value = "/tables") + public ResponseEntity> queryTables(@RequestParam(defaultValue = "") String name, Page page){ + return new ResponseEntity<>(generatorService.getTables(name, page), HttpStatus.OK); + } + + @ApiOperation("查询字段数据") + @GetMapping(value = "/columns") + public ResponseEntity> queryColumns(@RequestParam String tableName){ + List columnInfos = generatorService.getColumns(tableName); + return new ResponseEntity<>(PageUtil.toPage(columnInfos), HttpStatus.OK); + } + + @ApiOperation("保存字段数据") + @PutMapping + public ResponseEntity saveColumn(@RequestBody List columnInfos){ + generatorService.save(columnInfos); + return new ResponseEntity<>(HttpStatus.OK); + } + + @ApiOperation("同步字段数据") + @PostMapping(value = "sync") + public ResponseEntity syncColumn(@RequestBody List tables){ + for (String table : tables) { + generatorService.sync(generatorService.getColumns(table), generatorService.query(table)); + } + return new ResponseEntity<>(HttpStatus.OK); + } + + @ApiOperation("生成代码") + @PostMapping(value = "/{tableName}/{type}") + public ResponseEntity generatorCode(@PathVariable String tableName, @PathVariable Integer type, HttpServletRequest request, HttpServletResponse response){ + if(!generatorEnabled && type == 0){ + throw new BadRequestException("此环境不允许生成代码,请选择预览或者下载查看!"); + } + switch (type){ + // 生成代码 + case 0: generatorService.generator(genConfigService.find(tableName), generatorService.getColumns(tableName)); + break; + // 预览 + case 1: return generatorService.preview(genConfigService.find(tableName), generatorService.getColumns(tableName)); + // 打包 + case 2: generatorService.download(genConfigService.find(tableName), generatorService.getColumns(tableName), request, response); + break; + default: throw new BadRequestException("没有这个选项"); + } + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java b/eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java new file mode 100644 index 0000000..a748287 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.GenConfig; + +/** + * @author Zheng Jie + * @date 2019-01-14 + */ +public interface GenConfigService extends IService { + + /** + * 查询表配置 + * @param tableName 表名 + * @return 表配置 + */ + GenConfig find(String tableName); + + /** + * 更新表配置 + * @param tableName 表名 + * @param genConfig 表配置 + * @return 表配置 + */ + GenConfig update(String tableName, GenConfig genConfig); +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java b/eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java new file mode 100644 index 0000000..d53fa07 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java @@ -0,0 +1,94 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.GenConfig; +import me.zhengjie.domain.ColumnInfo; +import me.zhengjie.domain.vo.TableInfo; +import me.zhengjie.utils.PageResult; +import org.springframework.http.ResponseEntity; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * @author Zheng Jie + * @date 2019-01-02 + */ +public interface GeneratorService extends IService { + + /** + * 查询数据库元数据 + * + * @param name 表名 + * @param page 分页参数 + * @return / + */ + PageResult getTables(String name, Page page); + + /** + * 得到数据表的元数据 + * @param name 表名 + * @return / + */ + List getColumns(String name); + + /** + * 同步表数据 + * @param columnInfos / + * @param columnInfoList / + */ + void sync(List columnInfos, List columnInfoList); + + /** + * 保持数据 + * @param columnInfos / + */ + void save(List columnInfos); + + /** + * 代码生成 + * @param genConfig 配置信息 + * @param columns 字段信息 + */ + void generator(GenConfig genConfig, List columns); + + /** + * 预览 + * @param genConfig 配置信息 + * @param columns 字段信息 + * @return / + */ + ResponseEntity preview(GenConfig genConfig, List columns); + + /** + * 打包下载 + * @param genConfig 配置信息 + * @param columns 字段信息 + * @param request / + * @param response / + */ + void download(GenConfig genConfig, List columns, HttpServletRequest request, HttpServletResponse response); + + /** + * 查询数据库的表字段数据数据 + * @param table / + * @return / + */ + List query(String table); +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/service/impl/GenConfigServiceImpl.java b/eladmin-generator/src/main/java/me/zhengjie/service/impl/GenConfigServiceImpl.java new file mode 100644 index 0000000..d1ed006 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/service/impl/GenConfigServiceImpl.java @@ -0,0 +1,69 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.GenConfig; +import me.zhengjie.mapper.GenConfigMapper; +import me.zhengjie.service.GenConfigService; +import org.springframework.stereotype.Service; +import java.io.File; + +/** + * @author Zheng Jie + * @date 2019-01-14 + */ +@Service +@RequiredArgsConstructor +@SuppressWarnings({"unchecked","all"}) +public class GenConfigServiceImpl extends ServiceImpl implements GenConfigService { + + private final GenConfigMapper genConfigMapper; + + @Override + public GenConfig find(String tableName) { + GenConfig genConfig = genConfigMapper.findByTableName(tableName); + if(genConfig == null){ + return new GenConfig(tableName); + } + return genConfig; + } + + @Override + public GenConfig update(String tableName, GenConfig genConfig) { + String separator = File.separator; + String[] paths; + String symbol = "\\"; + if (symbol.equals(separator)) { + paths = genConfig.getPath().split("\\\\"); + } else { + paths = genConfig.getPath().split(File.separator); + } + StringBuilder api = new StringBuilder(); + for (String path : paths) { + api.append(path); + api.append(separator); + if ("src".equals(path)) { + api.append("api"); + break; + } + } + genConfig.setApiPath(api.toString()); + saveOrUpdate(genConfig); + return genConfig; + } +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/service/impl/GeneratorServiceImpl.java b/eladmin-generator/src/main/java/me/zhengjie/service/impl/GeneratorServiceImpl.java new file mode 100644 index 0000000..45bb8c0 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/service/impl/GeneratorServiceImpl.java @@ -0,0 +1,161 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ZipUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.domain.GenConfig; +import me.zhengjie.domain.ColumnInfo; +import me.zhengjie.domain.vo.TableInfo; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.mapper.ColumnInfoMapper; +import me.zhengjie.service.GeneratorService; +import me.zhengjie.utils.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + * @date 2019-01-02 + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class GeneratorServiceImpl extends ServiceImpl implements GeneratorService { + + private final ColumnInfoMapper columnInfoMapper; + private final String CONFIG_MESSAGE = "请先配置生成器"; + + @Override + public PageResult getTables(String name, Page page) { + return PageUtil.toPage(columnInfoMapper.getTables(name, page)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public List getColumns(String tableName) { + List columnInfos = columnInfoMapper.findByTableNameOrderByIdAsc(tableName); + if (CollectionUtil.isNotEmpty(columnInfos)) { + return columnInfos; + } else { + columnInfos = query(tableName); + saveBatch(columnInfos); + return columnInfos; + } + } + + @Override + public List query(String tableName) { + List columnInfos = columnInfoMapper.getColumns(tableName); + for (ColumnInfo columnInfo : columnInfos) { + columnInfo.setTableName(tableName); + if(GenUtil.PK.equalsIgnoreCase(columnInfo.getKeyType()) + && GenUtil.EXTRA.equalsIgnoreCase(columnInfo.getExtra())){ + columnInfo.setNotNull(false); + } + } + return columnInfos; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void sync(List columnInfos, List columnInfoList) { + // 第一种情况,数据库类字段改变或者新增字段 + for (ColumnInfo columnInfo : columnInfoList) { + // 根据字段名称查找 + List columns = columnInfos.stream().filter(c -> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList()); + // 如果能找到,就修改部分可能被字段 + if (CollectionUtil.isNotEmpty(columns)) { + ColumnInfo column = columns.get(0); + column.setColumnType(columnInfo.getColumnType()); + column.setExtra(columnInfo.getExtra()); + column.setKeyType(columnInfo.getKeyType()); + if (StringUtils.isBlank(column.getRemark())) { + column.setRemark(columnInfo.getRemark()); + } + saveOrUpdate(column); + } else { + // 如果找不到,则保存新字段信息 + save(columnInfo); + } + } + // 第二种情况,数据库字段删除了 + for (ColumnInfo columnInfo : columnInfos) { + // 根据字段名称查找 + List columns = columnInfoList.stream().filter(c -> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList()); + // 如果找不到,就代表字段被删除了,则需要删除该字段 + if (CollectionUtil.isEmpty(columns)) { + removeById(columnInfo); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(List columnInfos) { + saveOrUpdateBatch(columnInfos); + } + + @Override + public void generator(GenConfig genConfig, List columns) { + if (genConfig.getId() == null) { + throw new BadRequestException(CONFIG_MESSAGE); + } + try { + GenUtil.generatorCode(columns, genConfig); + } catch (IOException e) { + log.error(e.getMessage(), e); + throw new BadRequestException("生成失败,请手动处理已生成的文件"); + } + } + + @Override + public ResponseEntity preview(GenConfig genConfig, List columns) { + if (genConfig.getId() == null) { + throw new BadRequestException(CONFIG_MESSAGE); + } + List> genList = GenUtil.preview(columns, genConfig); + return new ResponseEntity<>(genList, HttpStatus.OK); + } + + @Override + public void download(GenConfig genConfig, List columns, HttpServletRequest request, HttpServletResponse response) { + if (genConfig.getId() == null) { + throw new BadRequestException(CONFIG_MESSAGE); + } + try { + File file = new File(GenUtil.download(columns, genConfig)); + String zipPath = file.getPath() + ".zip"; + ZipUtil.zip(file.getPath(), zipPath); + FileUtil.downloadFile(request, response, new File(zipPath), true); + } catch (IOException e) { + throw new BadRequestException("打包失败"); + } + } +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java b/eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java new file mode 100644 index 0000000..b5fcd6b --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java @@ -0,0 +1,54 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import org.apache.commons.configuration.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * sql字段转java + * + * @author Zheng Jie + * @date 2019-01-03 + */ +public class ColUtil { + private static final Logger log = LoggerFactory.getLogger(ColUtil.class); + + /** + * 转换mysql数据类型为java数据类型 + * + * @param type 数据库字段类型 + * @return String + */ + static String cloToJava(String type) { + Configuration config = getConfig(); + assert config != null; + return config.getString(type, "unknowType"); + } + + /** + * 获取配置信息 + */ + public static PropertiesConfiguration getConfig() { + try { + return new PropertiesConfiguration("generator.properties"); + } catch (ConfigurationException e) { + log.error(e.getMessage(), e); + } + return null; + } +} diff --git a/eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java b/eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java new file mode 100644 index 0000000..ab3b417 --- /dev/null +++ b/eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java @@ -0,0 +1,417 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.template.*; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.domain.GenConfig; +import me.zhengjie.domain.ColumnInfo; +import org.springframework.util.ObjectUtils; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; +import java.time.LocalDate; +import java.util.*; +import static me.zhengjie.utils.FileUtil.SYS_TEM_DIR; + +/** + * 代码生成 + * + * @author Zheng Jie + * @date 2019-01-02 + */ +@Slf4j +@SuppressWarnings({"unchecked", "all"}) +public class GenUtil { + + private static final String TIMESTAMP = "Timestamp"; + + private static final String BIGDECIMAL = "BigDecimal"; + + public static final String PK = "PRI"; + + public static final String EXTRA = "auto_increment"; + + /** + * 获取后端代码模板名称 + * + * @return List + */ + private static List getAdminTemplateNames() { + List templateNames = new ArrayList<>(); + templateNames.add("Entity"); + templateNames.add("Controller"); + templateNames.add("QueryCriteria"); + templateNames.add("Service"); + templateNames.add("ServiceImpl"); + templateNames.add("Mapper"); + templateNames.add("Mapper-xml"); + return templateNames; + } + + /** + * 获取前端代码模板名称 + * + * @return List + */ + private static List getFrontTemplateNames() { + List templateNames = new ArrayList<>(); + templateNames.add("index"); + templateNames.add("api"); + return templateNames; + } + + public static List> preview(List columns, GenConfig genConfig) { + Map genMap = getGenMap(columns, genConfig); + List> genList = new ArrayList<>(); + // 获取后端模版 + List templates = getAdminTemplateNames(); + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + for (String templateName : templates) { + Map map = new HashMap<>(1); + Template template = engine.getTemplate("admin/" + templateName + ".ftl"); + map.put("content", template.render(genMap)); + map.put("name", templateName.replace("-xml", ".xml")); + genList.add(map); + } + // 获取前端模版 + templates = getFrontTemplateNames(); + for (String templateName : templates) { + Map map = new HashMap<>(1); + Template template = engine.getTemplate("front/" + templateName + ".ftl"); + map.put(templateName, template.render(genMap)); + map.put("content", template.render(genMap)); + map.put("name", templateName); + genList.add(map); + } + return genList; + } + + public static String download(List columns, GenConfig genConfig) throws IOException { + // 拼接的路径:/tmpeladmin-gen-temp/,这个路径在Linux下需要root用户才有权限创建,非root用户会权限错误而失败,更改为: /tmp/eladmin-gen-temp/ + // String tempPath =SYS_TEM_DIR + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator; + String tempPath = SYS_TEM_DIR + "eladmin-gen-temp" + File.separator + genConfig.getTableName() + File.separator; + Map genMap = getGenMap(columns, genConfig); + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + // 生成后端代码 + List templates = getAdminTemplateNames(); + for (String templateName : templates) { + Template template = engine.getTemplate("admin/" + templateName + ".ftl"); + String filePath = getAdminFilePath(templateName, genConfig, genMap.get("className").toString(), tempPath + "eladmin" + File.separator); + assert filePath != null; + File file = new File(filePath); + // 如果非覆盖生成 + if (!genConfig.getCover() && FileUtil.exist(file)) { + continue; + } + // 生成代码 + genFile(file, template, genMap); + } + // 生成前端代码 + templates = getFrontTemplateNames(); + for (String templateName : templates) { + Template template = engine.getTemplate("front/" + templateName + ".ftl"); + String path = tempPath + "eladmin-web" + File.separator; + String apiPath = path + "src" + File.separator + "api" + File.separator; + String srcPath = path + "src" + File.separator + "views" + File.separator + genMap.get("changeClassName").toString() + File.separator; + String filePath = getFrontFilePath(templateName, apiPath, srcPath, genMap.get("changeClassName").toString()); + assert filePath != null; + File file = new File(filePath); + // 如果非覆盖生成 + if (!genConfig.getCover() && FileUtil.exist(file)) { + continue; + } + // 生成代码 + genFile(file, template, genMap); + } + return tempPath; + } + + public static void generatorCode(List columnInfos, GenConfig genConfig) throws IOException { + Map genMap = getGenMap(columnInfos, genConfig); + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + // 生成后端代码 + List templates = getAdminTemplateNames(); + for (String templateName : templates) { + Template template = engine.getTemplate("admin/" + templateName + ".ftl"); + String rootPath = System.getProperty("user.dir"); + String filePath = getAdminFilePath(templateName, genConfig, genMap.get("className").toString(), rootPath); + + assert filePath != null; + File file = new File(filePath); + + // 如果非覆盖生成 + if (!genConfig.getCover() && FileUtil.exist(file)) { + continue; + } + // 生成代码 + genFile(file, template, genMap); + } + + // 生成前端代码 + templates = getFrontTemplateNames(); + for (String templateName : templates) { + Template template = engine.getTemplate("front/" + templateName + ".ftl"); + String filePath = getFrontFilePath(templateName, genConfig.getApiPath(), genConfig.getPath(), genMap.get("changeClassName").toString()); + + assert filePath != null; + File file = new File(filePath); + + // 如果非覆盖生成 + if (!genConfig.getCover() && FileUtil.exist(file)) { + continue; + } + // 生成代码 + genFile(file, template, genMap); + } + } + + // 获取模版数据 + private static Map getGenMap(List columnInfos, GenConfig genConfig) { + // 存储模版字段数据 + Map genMap = new HashMap<>(16); + // 接口别名 + genMap.put("apiAlias", genConfig.getApiAlias()); + // 包名称 + genMap.put("package", genConfig.getPack()); + // 模块名称 + genMap.put("moduleName", genConfig.getModuleName()); + // 作者 + genMap.put("author", genConfig.getAuthor()); + // 创建日期 + genMap.put("date", LocalDate.now().toString()); + // 表名 + genMap.put("tableName", genConfig.getTableName()); + // 大写开头的类名 + String className = StringUtils.toCapitalizeCamelCase(genConfig.getTableName()); + // 小写开头的类名 + String changeClassName = StringUtils.toCamelCase(genConfig.getTableName()); + // 判断是否去除表前缀 + if (StringUtils.isNotEmpty(genConfig.getPrefix())) { + className = StringUtils.toCapitalizeCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix())); + changeClassName = StringUtils.toCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix())); + changeClassName = StringUtils.uncapitalize(changeClassName); + } + // 保存类名 + genMap.put("className", className); + // 保存小写开头的类名 + genMap.put("changeClassName", changeClassName); + // 存在 Timestamp 字段 + genMap.put("hasTimestamp", false); + // 查询类中存在 Timestamp 字段 + genMap.put("queryHasTimestamp", false); + // 存在 BigDecimal 字段 + genMap.put("hasBigDecimal", false); + // 查询类中存在 BigDecimal 字段 + genMap.put("queryHasBigDecimal", false); + // 是否需要创建查询 + genMap.put("hasQuery", false); + // 自增主键 + genMap.put("auto", false); + // 存在字典 + genMap.put("hasDict", false); + // 存在日期注解 + genMap.put("hasDateAnnotation", false); + // 存储主键字段名 + genMap.put("pkIdName", "none"); + // 存储符号 + genMap.put("symbol", "#"); + // 保存字段信息 + List> columns = new ArrayList<>(); + // 保存查询字段的信息 + List> queryColumns = new ArrayList<>(); + // 存储字典信息 + List dicts = new ArrayList<>(); + // 存储 between 信息 + List> betweens = new ArrayList<>(); + // 存储不为空的字段信息 + List> isNotNullColumns = new ArrayList<>(); + + for (ColumnInfo column : columnInfos) { + Map listMap = new HashMap<>(16); + // 字段描述 + listMap.put("remark", column.getRemark()); + // 字段类型 + listMap.put("columnKey", column.getKeyType()); + // 主键类型 + String colType = ColUtil.cloToJava(column.getColumnType()); + // 小写开头的字段名 + String changeColumnName = StringUtils.toCamelCase(column.getColumnName()); + // 大写开头的字段名 + String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName()); + if (PK.equals(column.getKeyType())) { + // 存储主键类型 + genMap.put("pkColumnType", colType); + // 存储小写开头的字段名 + genMap.put("pkChangeColName", changeColumnName); + // 存储大写开头的字段名 + genMap.put("pkCapitalColName", capitalColumnName); + // 存储主键字段名 + genMap.put("pkIdName", column.getColumnName()); + } + // 是否存在 Timestamp 类型的字段 + if (TIMESTAMP.equals(colType)) { + genMap.put("hasTimestamp", true); + } + // 是否存在 BigDecimal 类型的字段 + if (BIGDECIMAL.equals(colType)) { + genMap.put("hasBigDecimal", true); + } + // 主键是否自增 + if (EXTRA.equals(column.getExtra())) { + genMap.put("auto", true); + } + // 主键存在字典 + if (StringUtils.isNotBlank(column.getDictName())) { + genMap.put("hasDict", true); + if(!dicts.contains(column.getDictName())) + dicts.add(column.getDictName()); + } + + // 存储字段类型 + listMap.put("columnType", colType); + // 存储字原始段名称 + listMap.put("columnName", column.getColumnName()); + // 不为空 + listMap.put("istNotNull", column.getNotNull()); + // 字段列表显示 + listMap.put("columnShow", column.getListShow()); + // 表单显示 + listMap.put("formShow", column.getFormShow()); + // 表单组件类型 + listMap.put("formType", StringUtils.isNotBlank(column.getFormType()) ? column.getFormType() : "Input"); + // 小写开头的字段名称 + listMap.put("changeColumnName", changeColumnName); + //大写开头的字段名称 + listMap.put("capitalColumnName", capitalColumnName); + // 字典名称 + listMap.put("dictName", column.getDictName()); + // 添加非空字段信息 + if (column.getNotNull()) { + isNotNullColumns.add(listMap); + } + // 判断是否有查询,如有则把查询的字段set进columnQuery + if (!StringUtils.isBlank(column.getQueryType())) { + // 查询类型 + listMap.put("queryType", column.getQueryType()); + // 是否存在查询 + genMap.put("hasQuery", true); + if (TIMESTAMP.equals(colType)) { + // 查询中存储 Timestamp 类型 + genMap.put("queryHasTimestamp", true); + } + if (BIGDECIMAL.equals(colType)) { + // 查询中存储 BigDecimal 类型 + genMap.put("queryHasBigDecimal", true); + } + if ("between".equalsIgnoreCase(column.getQueryType())) { + betweens.add(listMap); + } else { + // 添加到查询列表中 + queryColumns.add(listMap); + } + } + // 添加到字段列表中 + columns.add(listMap); + } + // 保存字段列表 + genMap.put("columns", columns); + // 保存查询列表 + genMap.put("queryColumns", queryColumns); + // 保存字段列表 + genMap.put("dicts", dicts); + // 保存查询列表 + genMap.put("betweens", betweens); + // 保存非空字段信息 + genMap.put("isNotNullColumns", isNotNullColumns); + return genMap; + } + + /** + * 定义后端文件路径以及名称 + */ + private static String getAdminFilePath(String templateName, GenConfig genConfig, String className, String rootPath) { + String projectPath = rootPath + File.separator + genConfig.getModuleName(); + String packagePath = projectPath + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator; + String mpXmlPath = projectPath + File.separator + "src" + File.separator + "main" + File.separator + "resources" + File.separator; + if (!ObjectUtils.isEmpty(genConfig.getPack())) { + packagePath += genConfig.getPack().replace(".", File.separator) + File.separator; + } + + if ("Entity".equals(templateName)) { + return packagePath + "domain" + File.separator + className + ".java"; + } + + if ("Controller".equals(templateName)) { + return packagePath + "rest" + File.separator + className + "Controller.java"; + } + + if ("Service".equals(templateName)) { + return packagePath + "service" + File.separator + className + "Service.java"; + } + + if ("ServiceImpl".equals(templateName)) { + return packagePath + "service" + File.separator + "impl" + File.separator + className + "ServiceImpl.java"; + } + + if ("QueryCriteria".equals(templateName)) { + return packagePath + "domain" + File.separator + "vo" + File.separator + className + "QueryCriteria.java"; + } + + if ("Mapper".equals(templateName)) { + return packagePath + "mapper" + File.separator + className + "Mapper.java"; + } + + if ("Mapper-xml".equals(templateName)) { + return mpXmlPath + "mapper" + File.separator + className + "Mapper.xml"; + } + + return null; + } + + /** + * 定义前端文件路径以及名称 + */ + private static String getFrontFilePath(String templateName, String apiPath, String path, String apiName) { + + if ("api".equals(templateName)) { + return apiPath + File.separator + apiName + ".js"; + } + + if ("index".equals(templateName)) { + return path + File.separator + "index.vue"; + } + + return null; + } + + private static void genFile(File file, Template template, Map map) throws IOException { + // 生成目标文件 + Writer writer = null; + try { + FileUtil.touch(file); + writer = new FileWriter(file); + template.render(map, writer); + } catch (TemplateException | IOException e) { + throw new RuntimeException(e); + } finally { + assert writer != null; + writer.close(); + } + } +} diff --git a/eladmin-generator/src/main/resources/generator.properties b/eladmin-generator/src/main/resources/generator.properties new file mode 100644 index 0000000..e64d060 --- /dev/null +++ b/eladmin-generator/src/main/resources/generator.properties @@ -0,0 +1,27 @@ +# Database type to Java type +tinyint=Integer +smallint=Integer +mediumint=Integer +int=Integer +integer=Integer + +bigint=Long + +float=Float + +double=Double + +decimal=BigDecimal + +bit=Boolean + +char=String +varchar=String +tinytext=String +text=String +mediumtext=String +longtext=String + +date=Timestamp +datetime=Timestamp +timestamp=Timestamp \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml b/eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml new file mode 100644 index 0000000..82de341 --- /dev/null +++ b/eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + column_id, table_name, column_name, column_type, key_type, extra, remark, not_null, list_show, form_show, form_type, query_type, dict_name + + + + + + + + \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml b/eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml new file mode 100644 index 0000000..55926b1 --- /dev/null +++ b/eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + config_id, table_name, api_alias, pack, module_name, path, api_path, author, prefix, cover + + + + \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/template/admin/Controller.ftl b/eladmin-generator/src/main/resources/template/admin/Controller.ftl new file mode 100644 index 0000000..179ea9d --- /dev/null +++ b/eladmin-generator/src/main/resources/template/admin/Controller.ftl @@ -0,0 +1,89 @@ +/* +* Copyright 2019-2023 Zheng Jie +* +* Licensed 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 +* +* http://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. +*/ +package ${package}.rest; + +import me.zhengjie.annotation.Log; +import ${package}.domain.${className}; +import ${package}.service.${className}Service; +import ${package}.domain.vo.${className}QueryCriteria; +import lombok.RequiredArgsConstructor; +import java.util.List; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import io.swagger.annotations.*; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.utils.PageResult; + +/** +* @author ${author} +* @date ${date} +**/ +@RestController +@RequiredArgsConstructor +@Api(tags = "${apiAlias}管理") +@RequestMapping("/api/${changeClassName}") +public class ${className}Controller { + + private final ${className}Service ${changeClassName}Service; + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('${changeClassName}:list')") + public void export${className}(HttpServletResponse response, ${className}QueryCriteria criteria) throws IOException { + ${changeClassName}Service.download(${changeClassName}Service.queryAll(criteria), response); + } + + @GetMapping + @Log("查询${apiAlias}") + @ApiOperation("查询${apiAlias}") + @PreAuthorize("@el.check('${changeClassName}:list')") + public ResponseEntity> query${className}(${className}QueryCriteria criteria, Page page){ + return new ResponseEntity<>(${changeClassName}Service.queryAll(criteria,page),HttpStatus.OK); + } + + @PostMapping + @Log("新增${apiAlias}") + @ApiOperation("新增${apiAlias}") + @PreAuthorize("@el.check('${changeClassName}:add')") + public ResponseEntity create${className}(@Validated @RequestBody ${className} resources){ + ${changeClassName}Service.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @PutMapping + @Log("修改${apiAlias}") + @ApiOperation("修改${apiAlias}") + @PreAuthorize("@el.check('${changeClassName}:edit')") + public ResponseEntity update${className}(@Validated @RequestBody ${className} resources){ + ${changeClassName}Service.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @DeleteMapping + @Log("删除${apiAlias}") + @ApiOperation("删除${apiAlias}") + @PreAuthorize("@el.check('${changeClassName}:del')") + public ResponseEntity delete${className}(@RequestBody List<${pkColumnType}> ids) { + ${changeClassName}Service.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/template/admin/Entity.ftl b/eladmin-generator/src/main/resources/template/admin/Entity.ftl new file mode 100644 index 0000000..c01fe0a --- /dev/null +++ b/eladmin-generator/src/main/resources/template/admin/Entity.ftl @@ -0,0 +1,68 @@ +/* +* Copyright 2019-2023 Zheng Jie +* +* Licensed 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 +* +* http://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. +*/ +package ${package}.domain; + +import lombok.Data; +import cn.hutool.core.bean.BeanUtil; +import io.swagger.annotations.ApiModelProperty; +import cn.hutool.core.bean.copier.CopyOptions; +<#if hasTimestamp> +import java.sql.Timestamp; + +<#if hasBigDecimal> +import java.math.BigDecimal; + +import java.io.Serializable; +<#if auto> +import com.baomidou.mybatisplus.annotation.IdType; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +/** +* @description / +* @author ${author} +* @date ${date} +**/ +@Data +@TableName("${tableName}") +public class ${className} implements Serializable { +<#if columns??> + <#list columns as column> + + <#if column.columnKey = 'PRI'> + @TableId(value = "${column.columnName}"<#if auto>, type = IdType.AUTO) + + <#if column.istNotNull && column.columnKey != 'PRI'> + <#if column.columnType = 'String'> + @NotBlank + <#else> + @NotNull + + + <#if column.remark != ''> + @ApiModelProperty(value = "${column.remark}") + <#else> + @ApiModelProperty(value = "${column.changeColumnName}") + + private ${column.columnType} ${column.changeColumnName}; + + + + public void copy(${className} source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/eladmin-generator/src/main/resources/template/admin/Mapper-xml.ftl b/eladmin-generator/src/main/resources/template/admin/Mapper-xml.ftl new file mode 100644 index 0000000..82bad8d --- /dev/null +++ b/eladmin-generator/src/main/resources/template/admin/Mapper-xml.ftl @@ -0,0 +1,62 @@ + + + + <#if columns??> + + <#list columns as column> + <#if column.columnKey = 'PRI'> + + + <#if column.columnKey != 'PRI'> + + + + + + + <#list columns as column>${column.columnName}<#if column_has_next>, + + + + + \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/template/admin/Mapper.ftl b/eladmin-generator/src/main/resources/template/admin/Mapper.ftl new file mode 100644 index 0000000..e91da0a --- /dev/null +++ b/eladmin-generator/src/main/resources/template/admin/Mapper.ftl @@ -0,0 +1,37 @@ +/* +* Copyright 2019-2023 Zheng Jie +* +* Licensed 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 +* +* http://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. +*/ +package ${package}.mapper; + +import ${package}.domain.${className}; +import ${package}.domain.vo.${className}QueryCriteria; +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +/** +* @author ${author} +* @date ${date} +**/ +@Mapper +public interface ${className}Mapper extends BaseMapper<${className}> { + + IPage<${className}> findAll(@Param("criteria") ${className}QueryCriteria criteria, Page page); + + List<${className}> findAll(@Param("criteria") ${className}QueryCriteria criteria); +} \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl b/eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl new file mode 100644 index 0000000..3028323 --- /dev/null +++ b/eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl @@ -0,0 +1,45 @@ +/* +* Copyright 2019-2023 Zheng Jie +* +* Licensed 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 +* +* http://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. +*/ +package ${package}.domain.vo; + +import lombok.Data; +<#if queryHasTimestamp> +import java.sql.Timestamp; + +<#if queryHasBigDecimal> +import java.math.BigDecimal; + +<#if betweens?? && (betweens?size > 0)> +import java.util.List; + + +/** +* @author ${author} +* @date ${date} +**/ +@Data +public class ${className}QueryCriteria{ +<#if queryColumns??> + <#list queryColumns as column> + private ${column.columnType} ${column.changeColumnName}; + + +<#if betweens??> + <#list betweens as column> + private List<${column.columnType}> ${column.changeColumnName}; + + +} \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/template/admin/Service.ftl b/eladmin-generator/src/main/resources/template/admin/Service.ftl new file mode 100644 index 0000000..aeab0af --- /dev/null +++ b/eladmin-generator/src/main/resources/template/admin/Service.ftl @@ -0,0 +1,75 @@ +/* +* Copyright 2019-2023 Zheng Jie +* +* Licensed 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 +* +* http://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. +*/ +package ${package}.service; + +import ${package}.domain.${className}; +import ${package}.domain.vo.${className}QueryCriteria; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.utils.PageResult; + +/** +* @description 服务接口 +* @author ${author} +* @date ${date} +**/ +public interface ${className}Service extends IService<${className}> { + + /** + * 查询数据分页 + * @param criteria 条件 + * @param page 分页参数 + * @return PageResult + */ + PageResult<${className}> queryAll(${className}QueryCriteria criteria, Page page); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List<${className}Dto> + */ + List<${className}> queryAll(${className}QueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(${className} resources); + + /** + * 编辑 + * @param resources / + */ + void update(${className} resources); + + /** + * 多选删除 + * @param ids / + */ + void deleteAll(List<${pkColumnType}> ids); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List<${className}> all, HttpServletResponse response) throws IOException; +} \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl b/eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl new file mode 100644 index 0000000..3da87d4 --- /dev/null +++ b/eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl @@ -0,0 +1,105 @@ +/* +* Copyright 2019-2023 Zheng Jie +* +* Licensed 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 +* +* http://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. +*/ +package ${package}.service.impl; + +import ${package}.domain.${className}; +<#if columns??> + <#list columns as column> + <#if column.columnKey = 'UNI'> + <#if column_index = 1> +import me.zhengjie.exception.EntityExistException; + + + + +import me.zhengjie.utils.FileUtil; +import lombok.RequiredArgsConstructor; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import ${package}.service.${className}Service; +import ${package}.domain.vo.${className}QueryCriteria; +import ${package}.mapper.${className}Mapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import me.zhengjie.utils.PageUtil; +import java.util.List; +import java.util.Map; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import me.zhengjie.utils.PageResult; + +/** +* @description 服务实现 +* @author ${author} +* @date ${date} +**/ +@Service +@RequiredArgsConstructor +public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${className}> implements ${className}Service { + + private final ${className}Mapper ${changeClassName}Mapper; + + @Override + public PageResult<${className}> queryAll(${className}QueryCriteria criteria, Page page){ + return PageUtil.toPage(${changeClassName}Mapper.findAll(criteria, page)); + } + + @Override + public List<${className}> queryAll(${className}QueryCriteria criteria){ + return ${changeClassName}Mapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(${className} resources) { + save(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(${className} resources) { + ${className} ${changeClassName} = getById(resources.get${pkCapitalColName}()); + ${changeClassName}.copy(resources); + saveOrUpdate(${changeClassName}); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteAll(List<${pkColumnType}> ids) { + removeBatchByIds(ids); + } + + @Override + public void download(List<${className}> all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (${className} ${changeClassName} : all) { + Map map = new LinkedHashMap<>(); + <#list columns as column> + <#if column.columnKey != 'PRI'> + <#if column.remark != ''> + map.put("${column.remark}", ${changeClassName}.get${column.capitalColumnName}()); + <#else> + map.put(" ${column.changeColumnName}", ${changeClassName}.get${column.capitalColumnName}()); + + + + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} \ No newline at end of file diff --git a/eladmin-generator/src/main/resources/template/front/api.ftl b/eladmin-generator/src/main/resources/template/front/api.ftl new file mode 100644 index 0000000..9587d0d --- /dev/null +++ b/eladmin-generator/src/main/resources/template/front/api.ftl @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/${changeClassName}', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/${changeClassName}/', + method: 'delete', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/${changeClassName}', + method: 'put', + data + }) +} + +export default { add, edit, del } diff --git a/eladmin-generator/src/main/resources/template/front/index.ftl b/eladmin-generator/src/main/resources/template/front/index.ftl new file mode 100644 index 0000000..4b9111a --- /dev/null +++ b/eladmin-generator/src/main/resources/template/front/index.ftl @@ -0,0 +1,169 @@ +<#--noinspection ALL--> + + + + + diff --git a/eladmin-logging/pom.xml b/eladmin-logging/pom.xml new file mode 100644 index 0000000..4903c27 --- /dev/null +++ b/eladmin-logging/pom.xml @@ -0,0 +1,22 @@ + + + + eladmin + me.zhengjie + 1.1 + + 4.0.0 + + eladmin-logging + 日志模块 + + + + me.zhengjie + eladmin-common + 1.1 + + + \ No newline at end of file diff --git a/eladmin-logging/src/main/java/me/zhengjie/annotation/Log.java b/eladmin-logging/src/main/java/me/zhengjie/annotation/Log.java new file mode 100644 index 0000000..6c001cd --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/annotation/Log.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author Zheng Jie + * @date 2018-11-24 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Log { + String value() default ""; +} diff --git a/eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java b/eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java new file mode 100644 index 0000000..3d76cd2 --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java @@ -0,0 +1,98 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.aspect; + +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.domain.SysLog; +import me.zhengjie.service.SysLogService; +import me.zhengjie.utils.RequestHolder; +import me.zhengjie.utils.SecurityUtils; +import me.zhengjie.utils.StringUtils; +import me.zhengjie.utils.ThrowableUtil; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.springframework.stereotype.Component; +import javax.servlet.http.HttpServletRequest; + +/** + * @author Zheng Jie + * @date 2018-11-24 + */ +@Component +@Aspect +@Slf4j +public class LogAspect { + + private final SysLogService sysLogService; + + ThreadLocal currentTime = new ThreadLocal<>(); + + public LogAspect(SysLogService sysLogService) { + this.sysLogService = sysLogService; + } + + /** + * 配置切入点 + */ + @Pointcut("@annotation(me.zhengjie.annotation.Log)") + public void logPointcut() { + // 该方法无方法体,主要为了让同类中其他方法使用此切入点 + } + + /** + * 配置环绕通知,使用在方法logPointcut()上注册的切入点 + * + * @param joinPoint join point for advice + */ + @Around("logPointcut()") + public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { + Object result; + currentTime.set(System.currentTimeMillis()); + result = joinPoint.proceed(); + SysLog sysLog = new SysLog("INFO",System.currentTimeMillis() - currentTime.get()); + currentTime.remove(); + HttpServletRequest request = RequestHolder.getHttpServletRequest(); + sysLogService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request),joinPoint, sysLog); + return result; + } + + /** + * 配置异常通知 + * + * @param joinPoint join point for advice + * @param e exception + */ + @AfterThrowing(pointcut = "logPointcut()", throwing = "e") + public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { + SysLog sysLog = new SysLog("ERROR",System.currentTimeMillis() - currentTime.get()); + currentTime.remove(); + sysLog.setExceptionDetail(new String(ThrowableUtil.getStackTrace(e).getBytes())); + HttpServletRequest request = RequestHolder.getHttpServletRequest(); + sysLogService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request), (ProceedingJoinPoint)joinPoint, sysLog); + } + + public String getUsername() { + try { + return SecurityUtils.getCurrentUsername(); + }catch (Exception e){ + return ""; + } + } +} diff --git a/eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java b/eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java new file mode 100644 index 0000000..e23bfb5 --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java @@ -0,0 +1,78 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.alibaba.fastjson.annotation.JSONField; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * @author Zheng Jie + * @date 2018-11-24 + */ +@Getter +@Setter +@NoArgsConstructor +@TableName("sys_log") +public class SysLog implements Serializable { + + @TableId(value = "log_id", type = IdType.AUTO) + private Long id; + + /** 操作用户 */ + private String username; + + /** 描述 */ + private String description; + + /** 方法名 */ + private String method; + + /** 参数 */ + private String params; + + /** 日志类型 */ + private String logType; + + /** 请求ip */ + private String requestIp; + + /** 地址 */ + private String address; + + /** 浏览器 */ + private String browser; + + /** 请求耗时 */ + private Long time; + + /** 异常详细 */ + @JSONField(serialize = false) + private String exceptionDetail; + + /** 创建日期 */ + @TableField(fill = FieldFill.INSERT) + private Timestamp createTime; + + public SysLog(String logType, Long time) { + this.logType = logType; + this.time = time; + } +} diff --git a/eladmin-logging/src/main/java/me/zhengjie/domain/vo/SysLogQueryCriteria.java b/eladmin-logging/src/main/java/me/zhengjie/domain/vo/SysLogQueryCriteria.java new file mode 100644 index 0000000..87e7721 --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/domain/vo/SysLogQueryCriteria.java @@ -0,0 +1,37 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** + * 日志查询类 + * @author Zheng Jie + * @date 2019-6-4 09:23:07 + */ +@Data +public class SysLogQueryCriteria { + + private String blurry; + + private String username; + + private String logType; + + private List createTime; +} diff --git a/eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java b/eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java new file mode 100644 index 0000000..a71fb41 --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.domain.SysLog; +import me.zhengjie.domain.vo.SysLogQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface SysLogMapper extends BaseMapper { + + List queryAll(@Param("criteria") SysLogQueryCriteria criteria); + + IPage queryAll(@Param("criteria") SysLogQueryCriteria criteria, Page page); + IPage queryAllByUser(@Param("criteria") SysLogQueryCriteria criteria, Page page); + String getExceptionDetails(@Param("id") Long id); + void deleteByLevel(@Param("logType") String logType); +} diff --git a/eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java b/eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java new file mode 100644 index 0000000..e9d8651 --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java @@ -0,0 +1,111 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.domain.SysLog; +import me.zhengjie.service.SysLogService; +import me.zhengjie.domain.vo.SysLogQueryCriteria; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.SecurityUtils; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * @author Zheng Jie + * @date 2018-11-24 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/logs") +@Api(tags = "系统:日志管理") +public class SysLogController { + + private final SysLogService sysLogService; + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check()") + public void exportLog(HttpServletResponse response, SysLogQueryCriteria criteria) throws IOException { + criteria.setLogType("INFO"); + sysLogService.download(sysLogService.queryAll(criteria), response); + } + + @Log("导出错误数据") + @ApiOperation("导出错误数据") + @GetMapping(value = "/error/download") + @PreAuthorize("@el.check()") + public void exportErrorLog(HttpServletResponse response, SysLogQueryCriteria criteria) throws IOException { + criteria.setLogType("ERROR"); + sysLogService.download(sysLogService.queryAll(criteria), response); + } + @GetMapping + @ApiOperation("日志查询") + @PreAuthorize("@el.check()") + public ResponseEntity> queryLog(SysLogQueryCriteria criteria, Page page){ + criteria.setLogType("INFO"); + return new ResponseEntity<>(sysLogService.queryAll(criteria,page), HttpStatus.OK); + } + + @GetMapping(value = "/user") + @ApiOperation("用户日志查询") + public ResponseEntity> queryUserLog(SysLogQueryCriteria criteria, Page page){ + criteria.setLogType("INFO"); + criteria.setUsername(SecurityUtils.getCurrentUsername()); + return new ResponseEntity<>(sysLogService.queryAllByUser(criteria,page), HttpStatus.OK); + } + + @GetMapping(value = "/error") + @ApiOperation("错误日志查询") + @PreAuthorize("@el.check()") + public ResponseEntity> queryErrorLog(SysLogQueryCriteria criteria, Page page){ + criteria.setLogType("ERROR"); + return new ResponseEntity<>(sysLogService.queryAll(criteria,page), HttpStatus.OK); + } + + @GetMapping(value = "/error/{id}") + @ApiOperation("日志异常详情查询") + @PreAuthorize("@el.check()") + public ResponseEntity queryErrorLogDetail(@PathVariable Long id){ + return new ResponseEntity<>(sysLogService.findByErrDetail(id), HttpStatus.OK); + } + @DeleteMapping(value = "/del/error") + @Log("删除所有ERROR日志") + @ApiOperation("删除所有ERROR日志") + @PreAuthorize("@el.check()") + public ResponseEntity delAllErrorLog(){ + sysLogService.delAllByError(); + return new ResponseEntity<>(HttpStatus.OK); + } + + @DeleteMapping(value = "/del/info") + @Log("删除所有INFO日志") + @ApiOperation("删除所有INFO日志") + @PreAuthorize("@el.check()") + public ResponseEntity delAllInfoLog(){ + sysLogService.delAllByInfo(); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java b/eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java new file mode 100644 index 0000000..af39b29 --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java @@ -0,0 +1,95 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.SysLog; +import me.zhengjie.domain.vo.SysLogQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.aspectj.lang.ProceedingJoinPoint; +import org.springframework.scheduling.annotation.Async; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * @author Zheng Jie + * @date 2018-11-24 + */ +public interface SysLogService extends IService{ + + /** + * 分页查询 + * + * @param criteria 查询条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(SysLogQueryCriteria criteria, Page page); + + /** + * 查询全部数据 + * @param criteria 查询条件 + * @return / + */ + List queryAll(SysLogQueryCriteria criteria); + + /** + * 查询用户日志 + * @param criteria 查询条件 + * @param page 分页参数 + * @return - + */ + PageResult queryAllByUser(SysLogQueryCriteria criteria, Page page); + + /** + * 保存日志数据 + * @param username 用户 + * @param browser 浏览器 + * @param ip 请求IP + * @param joinPoint / + * @param sysLog 日志实体 + */ + @Async + void save(String username, String browser, String ip, ProceedingJoinPoint joinPoint, SysLog sysLog); + + /** + * 查询异常详情 + * @param id 日志ID + * @return Object + */ + Object findByErrDetail(Long id); + + /** + * 导出日志 + * @param sysLogs 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List sysLogs, HttpServletResponse response) throws IOException; + + /** + * 删除所有错误日志 + */ + void delAllByError(); + + /** + * 删除所有INFO日志 + */ + void delAllByInfo(); +} diff --git a/eladmin-logging/src/main/java/me/zhengjie/service/impl/SysLogServiceImpl.java b/eladmin-logging/src/main/java/me/zhengjie/service/impl/SysLogServiceImpl.java new file mode 100644 index 0000000..991715c --- /dev/null +++ b/eladmin-logging/src/main/java/me/zhengjie/service/impl/SysLogServiceImpl.java @@ -0,0 +1,169 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import cn.hutool.core.lang.Dict; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.SysLog; +import me.zhengjie.mapper.SysLogMapper; +import me.zhengjie.service.SysLogService; +import me.zhengjie.domain.vo.SysLogQueryCriteria; +import me.zhengjie.utils.*; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.lang.reflect.Method; +import java.lang.reflect.Parameter; +import java.util.*; + +/** + * @author Zheng Jie + * @date 2018-11-24 + */ +@Service +@RequiredArgsConstructor +public class SysLogServiceImpl extends ServiceImpl implements SysLogService { + private final SysLogMapper sysLogMapper; + + @Override + public PageResult queryAll(SysLogQueryCriteria criteria, Page page) { + return PageUtil.toPage(sysLogMapper.queryAll(criteria, page)); + } + + @Override + public List queryAll(SysLogQueryCriteria criteria) { + return sysLogMapper.queryAll(criteria); + } + + @Override + public PageResult queryAllByUser(SysLogQueryCriteria criteria, Page page) { + return PageUtil.toPage(sysLogMapper.queryAllByUser(criteria, page)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(String username, String browser, String ip, ProceedingJoinPoint joinPoint, SysLog sysLog) { + if (sysLog == null) { + throw new IllegalArgumentException("Log 不能为 null!"); + } + MethodSignature signature = (MethodSignature) joinPoint.getSignature(); + Method method = signature.getMethod(); + me.zhengjie.annotation.Log aopLog = method.getAnnotation(me.zhengjie.annotation.Log.class); + + // 方法路径 + String methodName = joinPoint.getTarget().getClass().getName() + "." + signature.getName() + "()"; + + // 描述 + sysLog.setDescription(aopLog.value()); + + sysLog.setRequestIp(ip); + sysLog.setAddress(StringUtils.getCityInfo(sysLog.getRequestIp())); + sysLog.setMethod(methodName); + sysLog.setUsername(username); + sysLog.setParams(getParameter(method, joinPoint.getArgs())); + // 记录登录用户,隐藏密码信息 + if(signature.getName().equals("login") && StringUtils.isNotEmpty(sysLog.getParams())){ + JSONObject obj = JSON.parseObject(sysLog.getParams()); + sysLog.setUsername(obj.getString("username")); + sysLog.setParams(JSON.toJSONString(Dict.create().set("username", sysLog.getUsername()))); + } + sysLog.setBrowser(browser); + // 保存 + save(sysLog); + } + + /** + * 根据方法和传入的参数获取请求参数 + */ + private String getParameter(Method method, Object[] args) { + List argList = new ArrayList<>(); + Parameter[] parameters = method.getParameters(); + for (int i = 0; i < parameters.length; i++) { + // 过滤掉不能序列化的类型: MultiPartFile + if (args[i] instanceof MultipartFile) { + continue; + } + //将RequestBody注解修饰的参数作为请求参数 + RequestBody requestBody = parameters[i].getAnnotation(RequestBody.class); + if (requestBody != null) { + argList.add(args[i]); + } + //将RequestParam注解修饰的参数作为请求参数 + RequestParam requestParam = parameters[i].getAnnotation(RequestParam.class); + if (requestParam != null) { + Map map = new HashMap<>(2); + String key = parameters[i].getName(); + if (!StringUtils.isEmpty(requestParam.value())) { + key = requestParam.value(); + } + map.put(key, args[i]); + argList.add(map); + } + } + if (argList.isEmpty()) { + return ""; + } + return argList.size() == 1 ? JSON.toJSONString(argList.get(0)) : JSON.toJSONString(argList); + } + + @Override + public Object findByErrDetail(Long id) { + String details = sysLogMapper.getExceptionDetails(id); + return Dict.create().set("exception", details); + } + + @Override + public void download(List sysLogs, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (SysLog sysLog : sysLogs) { + Map map = new LinkedHashMap<>(); + map.put("用户名", sysLog.getUsername()); + map.put("IP", sysLog.getRequestIp()); + map.put("IP来源", sysLog.getAddress()); + map.put("描述", sysLog.getDescription()); + map.put("浏览器", sysLog.getBrowser()); + map.put("请求耗时/毫秒", sysLog.getTime()); + map.put("异常详情", sysLog.getExceptionDetail()); + map.put("创建日期", sysLog.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delAllByError() { + // 删除 ERROR 级别的日志 + sysLogMapper.deleteByLevel("ERROR"); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delAllByInfo() { + // 删除 INFO 级别的日志 + sysLogMapper.deleteByLevel("INFO"); + } +} diff --git a/eladmin-logging/src/main/resources/mapper/SysLogMapper.xml b/eladmin-logging/src/main/resources/mapper/SysLogMapper.xml new file mode 100644 index 0000000..6daf9ce --- /dev/null +++ b/eladmin-logging/src/main/resources/mapper/SysLogMapper.xml @@ -0,0 +1,69 @@ + + + + + + log_id id,description,method,params,request_ip,time,username,address,browser,exception_detail,create_time + + + + log_id id,description,method,params,request_ip,username,address,browser,exception_detail,create_time + + + + log_id id,description,request_ip,time,address,browser,create_time + + + + from sys_log + + + and ( + username like concat('%',#{criteria.blurry},'%') + or description like concat('%',#{criteria.blurry},'%') + or address like concat('%',#{criteria.blurry},'%') + or request_ip like concat('%',#{criteria.blurry},'%') + or method like concat('%',#{criteria.blurry},'%') + or params like concat('%',#{criteria.blurry},'%') + ) + + + and username like concat('%',#{criteria.username},'%') + + + and log_type = #{criteria.logType} + + + and create_time between #{criteria.createTime[0]} and #{criteria.createTime[1]} + + + order by log_id desc + + + + + + + + delete from sys_log where log_type = #{logType} + + + + \ No newline at end of file diff --git a/eladmin-system/pom.xml b/eladmin-system/pom.xml new file mode 100644 index 0000000..b1afab5 --- /dev/null +++ b/eladmin-system/pom.xml @@ -0,0 +1,108 @@ + + + + eladmin + me.zhengjie + 1.1 + + 4.0.0 + + eladmin-system + 核心模块 + + + 0.11.5 + + 5.8.0 + + + + + + me.zhengjie + eladmin-generator + 1.1 + + + me.zhengjie + eladmin-common + + + + + + + me.zhengjie + eladmin-tools + 1.1 + + + + + org.springframework.boot + spring-boot-starter-websocket + + + + + org.springframework.boot + spring-boot-starter-quartz + + + + + io.jsonwebtoken + jjwt-api + ${jjwt.version} + + + io.jsonwebtoken + jjwt-impl + ${jjwt.version} + + + io.jsonwebtoken + jjwt-jackson + ${jjwt.version} + + + + + ch.ethz.ganymed + ganymed-ssh2 + build210 + + + com.jcraft + jsch + 0.1.55 + + + + + com.github.oshi + oshi-core + 6.1.4 + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + diff --git a/eladmin-system/src/main/java/me/zhengjie/AppRun.java b/eladmin-system/src/main/java/me/zhengjie/AppRun.java new file mode 100644 index 0000000..e3fcd21 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/AppRun.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie; + +import io.swagger.annotations.Api; +import me.zhengjie.annotation.rest.AnonymousGetMapping; +import me.zhengjie.utils.SpringContextHolder; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.ApplicationPidFileWriter; +import org.springframework.context.annotation.Bean; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.transaction.annotation.EnableTransactionManagement; +import org.springframework.web.bind.annotation.RestController; + +/** + * 开启审计功能 -> @EnableJpaAuditing + * + * @author Zheng Jie + * @date 2018/11/15 9:20:19 + */ +@EnableAsync +@RestController +@Api(hidden = true) +@SpringBootApplication +@EnableTransactionManagement +public class AppRun { + + public static void main(String[] args) { + SpringApplication springApplication = new SpringApplication(AppRun.class); + // 监控应用的PID,启动时可指定PID路径:--spring.pid.file=/home/eladmin/app.pid + // 或者在 application.yml 添加文件路径,方便 kill,kill `cat /home/eladmin/app.pid` + springApplication.addListeners(new ApplicationPidFileWriter()); + System.out.println("启动成功"); + springApplication.run(args); + } + + @Bean + public SpringContextHolder springContextHolder() { + return new SpringContextHolder(); + } + + /** + * 访问首页提示 + * + * @return / + */ + @AnonymousGetMapping("/") + public String index() { + return "Backend service started successfully"; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/config/ConfigurerAdapter.java b/eladmin-system/src/main/java/me/zhengjie/config/ConfigurerAdapter.java new file mode 100644 index 0000000..a0093d6 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/config/ConfigurerAdapter.java @@ -0,0 +1,88 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.alibaba.fastjson.support.config.FastJsonConfig; +import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; + +/** + * WebMvcConfigurer + * + * @author Zheng Jie + * @date 2018-11-30 + */ +@Configuration +@EnableWebMvc +public class ConfigurerAdapter implements WebMvcConfigurer { + + /** 文件配置 */ + private final FileProperties properties; + + public ConfigurerAdapter(FileProperties properties) { + this.properties = properties; + } + + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); + config.addAllowedOriginPattern("*"); + config.addAllowedHeader("*"); + config.addAllowedMethod("*"); + source.registerCorsConfiguration("/**", config); + return new CorsFilter(source); + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + FileProperties.ElPath path = properties.getPath(); + String avatarUtl = "file:" + path.getAvatar().replace("\\","/"); + String pathUtl = "file:" + path.getPath().replace("\\","/"); + registry.addResourceHandler("/avatar/**").addResourceLocations(avatarUtl).setCachePeriod(0); + registry.addResourceHandler("/file/**").addResourceLocations(pathUtl).setCachePeriod(0); + registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/").setCachePeriod(0); + } + + @Override + public void configureMessageConverters(List> converters) { + // 使用 fastjson 序列化,会导致 @JsonIgnore 失效,可以使用 @JSONField(serialize = false) 替换 + FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); + List supportMediaTypeList = new ArrayList<>(); + supportMediaTypeList.add(MediaType.APPLICATION_JSON); + FastJsonConfig config = new FastJsonConfig(); + config.setDateFormat("yyyy-MM-dd HH:mm:ss"); + config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect); + converter.setFastJsonConfig(config); + converter.setSupportedMediaTypes(supportMediaTypeList); + converter.setDefaultCharset(StandardCharsets.UTF_8); + converters.add(converter); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/config/RelaxedQueryCharsConnectorCustomizer.java b/eladmin-system/src/main/java/me/zhengjie/config/RelaxedQueryCharsConnectorCustomizer.java new file mode 100644 index 0000000..14a6b20 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/config/RelaxedQueryCharsConnectorCustomizer.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import org.apache.catalina.connector.Connector; +import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; +import org.springframework.context.annotation.Configuration; + +/** + * @author bearBoy80 + */ +@Configuration(proxyBeanMethods = false) +public class RelaxedQueryCharsConnectorCustomizer implements TomcatConnectorCustomizer { + @Override + public void customize(Connector connector) { + connector.setProperty("relaxedQueryChars", "[]{}"); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/config/WebSocketConfig.java b/eladmin-system/src/main/java/me/zhengjie/config/WebSocketConfig.java new file mode 100644 index 0000000..f55f5c6 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/config/WebSocketConfig.java @@ -0,0 +1,33 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.socket.server.standard.ServerEndpointExporter; + +/** + * @author ZhangHouYing + * @date 2019-08-24 15:44 + */ +@Configuration +public class WebSocketConfig { + + @Bean + public ServerEndpointExporter serverEndpointExporter() { + return new ServerEndpointExporter(); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/config/thread/AsyncTaskProperties.java b/eladmin-system/src/main/java/me/zhengjie/config/thread/AsyncTaskProperties.java new file mode 100644 index 0000000..6e075ea --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/config/thread/AsyncTaskProperties.java @@ -0,0 +1,59 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.config.thread; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * 线程池配置属性类 + * @author https://juejin.im/entry/5abb8f6951882555677e9da2 + * @date 2019年10月31日14:58:18 + */ +@Data +@Component +public class AsyncTaskProperties { + + public static int corePoolSize; + + public static int maxPoolSize; + + public static int keepAliveSeconds; + + public static int queueCapacity; + + @Value("${task.pool.core-pool-size}") + public void setCorePoolSize(int corePoolSize) { + AsyncTaskProperties.corePoolSize = corePoolSize; + } + + @Value("${task.pool.max-pool-size}") + public void setMaxPoolSize(int maxPoolSize) { + AsyncTaskProperties.maxPoolSize = maxPoolSize; + } + + @Value("${task.pool.keep-alive-seconds}") + public void setKeepAliveSeconds(int keepAliveSeconds) { + AsyncTaskProperties.keepAliveSeconds = keepAliveSeconds; + } + + @Value("${task.pool.queue-capacity}") + public void setQueueCapacity(int queueCapacity) { + AsyncTaskProperties.queueCapacity = queueCapacity; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/config/thread/CustomExecutorConfig.java b/eladmin-system/src/main/java/me/zhengjie/config/thread/CustomExecutorConfig.java new file mode 100644 index 0000000..ca8a8bc --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/config/thread/CustomExecutorConfig.java @@ -0,0 +1,52 @@ +package me.zhengjie.config.thread; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import java.util.concurrent.Executor; +import java.util.concurrent.ThreadPoolExecutor; + +/** + * 创建自定义的线程池 + * @author Zheng Jie + * @description + * @date 2023-06-08 + **/ +@Configuration +public class CustomExecutorConfig { + + /** + * 自定义线程池,用法 @Async + * @return Executor + */ + @Bean + @Primary + public Executor elAsync() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(AsyncTaskProperties.corePoolSize); + executor.setMaxPoolSize(AsyncTaskProperties.maxPoolSize); + executor.setQueueCapacity(AsyncTaskProperties.queueCapacity); + executor.setThreadNamePrefix("el-async-"); + executor.setKeepAliveSeconds(AsyncTaskProperties.keepAliveSeconds); + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + executor.initialize(); + return executor; + } + + /** + * 自定义线程池,用法 @Async("otherAsync") + * @return Executor + */ + @Bean + public Executor otherAsync() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(15); + executor.setQueueCapacity(50); + executor.setKeepAliveSeconds(AsyncTaskProperties.keepAliveSeconds); + executor.setThreadNamePrefix("el-task-"); + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + executor.initialize(); + return executor; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java new file mode 100644 index 0000000..4d83cbf --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java @@ -0,0 +1,67 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import java.io.Serializable; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Getter +@Setter +@TableName("mnt_app") +public class App extends BaseEntity implements Serializable { + + + @TableId(value = "app_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "端口") + private int port; + + @ApiModelProperty(value = "上传路径") + private String uploadPath; + + @ApiModelProperty(value = "部署路径") + private String deployPath; + + @ApiModelProperty(value = "备份路径") + private String backupPath; + + @ApiModelProperty(value = "启动脚本") + private String startScript; + + @ApiModelProperty(value = "部署脚本") + private String deployScript; + + public void copy(App source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java new file mode 100644 index 0000000..9d8d892 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import java.io.Serializable; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Getter +@Setter +@TableName("mnt_database") +public class Database extends BaseEntity implements Serializable { + + @TableId(value = "db_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private String id; + + @ApiModelProperty(value = "数据库名称") + private String name; + + @ApiModelProperty(value = "数据库连接地址") + private String jdbcUrl; + + @ApiModelProperty(value = "数据库密码") + private String pwd; + + @ApiModelProperty(value = "用户名") + private String userName; + + public void copy(Database source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java new file mode 100644 index 0000000..065329b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java @@ -0,0 +1,67 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain; + +import cn.hutool.core.collection.CollectionUtil; +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.ApiModelProperty; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import java.io.Serializable; +import java.util.Set; +import java.util.stream.Collectors; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ + +@Getter +@Setter +@TableName("mnt_deploy") +public class Deploy extends BaseEntity implements Serializable { + + @TableId(value = "deploy_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @ApiModelProperty(value = "应用编号") + private Long appId; + + @TableField(exist = false) + @ApiModelProperty(name = "服务器", hidden = true) + private Set deploys; + + @TableField(exist = false) + private App app; + + public void copy(Deploy source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } + + public String getServers() { + if(CollectionUtil.isNotEmpty(deploys)){ + return deploys.stream().map(Server::getName).collect(Collectors.joining(",")); + } + return ""; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java new file mode 100644 index 0000000..c892560 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java @@ -0,0 +1,60 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import lombok.Getter; +import lombok.Setter; +import java.io.Serializable; +import java.sql.Timestamp; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Getter +@Setter +@TableName("mnt_deploy_history") +public class DeployHistory implements Serializable { + + @TableId(value = "history_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private String id; + + @ApiModelProperty(value = "应用名称") + private String appName; + + @ApiModelProperty(value = "IP") + private String ip; + + @ApiModelProperty(value = "部署时间") + private Timestamp deployDate; + + @ApiModelProperty(value = "部署者") + private String deployUser; + + @ApiModelProperty(value = "部署ID") + private Long deployId; + + public void copy(DeployHistory source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java new file mode 100644 index 0000000..841b8c4 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java @@ -0,0 +1,79 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import java.io.Serializable; +import java.util.Objects; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Getter +@Setter +@TableName("mnt_server") +public class Server extends BaseEntity implements Serializable { + + @TableId(value = "server_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @ApiModelProperty(value = "服务器名称") + private String name; + + @ApiModelProperty(value = "IP") + private String ip; + + @ApiModelProperty(value = "端口") + private Integer port; + + @ApiModelProperty(value = "账号") + private String account; + + @ApiModelProperty(value = "密码") + private String password; + + public void copy(Server source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Server that = (Server) o; + return Objects.equals(id, that.id) && + Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/AppQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/AppQueryCriteria.java new file mode 100644 index 0000000..c3fa170 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/AppQueryCriteria.java @@ -0,0 +1,32 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Data +public class AppQueryCriteria{ + + private String name; + + private List createTime; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DatabaseQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DatabaseQueryCriteria.java new file mode 100644 index 0000000..a8282c5 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DatabaseQueryCriteria.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Data +public class DatabaseQueryCriteria{ + + private String name; + + private String jdbcUrl; + + private List createTime; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployHistoryQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployHistoryQueryCriteria.java new file mode 100644 index 0000000..97ee671 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployHistoryQueryCriteria.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Data +public class DeployHistoryQueryCriteria{ + + private String blurry; + + private Long deployId; + + private List deployDate; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployQueryCriteria.java new file mode 100644 index 0000000..947de8e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/DeployQueryCriteria.java @@ -0,0 +1,36 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Data +public class DeployQueryCriteria{ + + private String appName; + + private List createTime; + + private Long offset; + + private Long size; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/ServerQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/ServerQueryCriteria.java new file mode 100644 index 0000000..f1a0735 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/vo/ServerQueryCriteria.java @@ -0,0 +1,32 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Data +public class ServerQueryCriteria { + + private String blurry; + + private List createTime; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java new file mode 100644 index 0000000..aff9fcc --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.mnt.domain.App; +import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface AppMapper extends BaseMapper { + + IPage queryAll(@Param("criteria") AppQueryCriteria criteria, Page page); + + List queryAll(@Param("criteria") AppQueryCriteria criteria); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java new file mode 100644 index 0000000..3110b91 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.mnt.domain.Database; +import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface DatabaseMapper extends BaseMapper { + + IPage findAll(@Param("criteria") DatabaseQueryCriteria criteria, Page page); + + List findAll(@Param("criteria") DatabaseQueryCriteria criteria); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java new file mode 100644 index 0000000..20f4d0b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.mnt.domain.DeployHistory; +import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface DeployHistoryMapper extends BaseMapper { + + IPage findAll(@Param("criteria") DeployHistoryQueryCriteria criteria, Page page); + + List findAll(@Param("criteria") DeployHistoryQueryCriteria criteria); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java new file mode 100644 index 0000000..bf76d57 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.modules.mnt.domain.Deploy; +import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface DeployMapper extends BaseMapper { + + Long countAll(@Param("criteria") DeployQueryCriteria criteria); + + List findAll(@Param("criteria") DeployQueryCriteria criteria); + + Set getIdByAppIds(@Param("appIds") Set appIds); + + Deploy getDeployById(@Param("deployId") Long deployId); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java new file mode 100644 index 0000000..a65cd57 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.mapper; + +import me.zhengjie.modules.mnt.domain.Server; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.Set; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface DeployServerMapper { + + void insertData(@Param("deployId") Long deployId, @Param("servers") Set servers); + + void deleteByDeployId(@Param("deployId") Long deployId); + + void deleteByDeployIds(@Param("deployIds") Set deployIds); + + void deleteByServerIds(@Param("serverIds") Set serverIds); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java new file mode 100644 index 0000000..15fd454 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.mnt.domain.Server; +import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface ServerMapper extends BaseMapper { + Server findByIp(@Param("ip") String ip); + + IPage findAll(@Param("criteria") ServerQueryCriteria criteria, Page page); + + List findAll(@Param("criteria") ServerQueryCriteria criteria); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java new file mode 100644 index 0000000..921a078 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java @@ -0,0 +1,88 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.modules.mnt.domain.App; +import me.zhengjie.modules.mnt.service.AppService; +import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@RestController +@RequiredArgsConstructor +@Api(tags = "运维:应用管理") +@RequestMapping("/app") +public class AppController { + + private final AppService appService; + + @ApiOperation("导出应用数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('app:list')") + public void exportApp(HttpServletResponse response, AppQueryCriteria criteria) throws IOException { + appService.download(appService.queryAll(criteria), response); + } + + @ApiOperation(value = "查询应用") + @GetMapping + @PreAuthorize("@el.check('app:list')") + public ResponseEntity> queryApp(AppQueryCriteria criteria, Page page){ + return new ResponseEntity<>(appService.queryAll(criteria, page),HttpStatus.OK); + } + + @Log("新增应用") + @ApiOperation(value = "新增应用") + @PostMapping + @PreAuthorize("@el.check('app:add')") + public ResponseEntity createApp(@Validated @RequestBody App resources){ + appService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改应用") + @ApiOperation(value = "修改应用") + @PutMapping + @PreAuthorize("@el.check('app:edit')") + public ResponseEntity updateApp(@Validated @RequestBody App resources){ + appService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除应用") + @ApiOperation(value = "删除应用") + @DeleteMapping + @PreAuthorize("@el.check('app:del')") + public ResponseEntity deleteApp(@RequestBody Set ids){ + appService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java new file mode 100644 index 0000000..f70bcfc --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java @@ -0,0 +1,123 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.mnt.domain.Database; +import me.zhengjie.modules.mnt.service.DatabaseService; +import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; +import me.zhengjie.modules.mnt.util.SqlUtils; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Api(tags = "运维:数据库管理") +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/database") +public class DatabaseController { + + private final String fileSavePath = FileUtil.getTmpDirPath()+"/"; + private final DatabaseService databaseService; + + @ApiOperation("导出数据库数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('database:list')") + public void exportDatabase(HttpServletResponse response, DatabaseQueryCriteria criteria) throws IOException { + databaseService.download(databaseService.queryAll(criteria), response); + } + + @ApiOperation(value = "查询数据库") + @GetMapping + @PreAuthorize("@el.check('database:list')") + public ResponseEntity> queryDatabase(DatabaseQueryCriteria criteria, Page page){ + return new ResponseEntity<>(databaseService.queryAll(criteria, page),HttpStatus.OK); + } + + @Log("新增数据库") + @ApiOperation(value = "新增数据库") + @PostMapping + @PreAuthorize("@el.check('database:add')") + public ResponseEntity createDatabase(@Validated @RequestBody Database resources){ + databaseService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改数据库") + @ApiOperation(value = "修改数据库") + @PutMapping + @PreAuthorize("@el.check('database:edit')") + public ResponseEntity updateDatabase(@Validated @RequestBody Database resources){ + databaseService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除数据库") + @ApiOperation(value = "删除数据库") + @DeleteMapping + @PreAuthorize("@el.check('database:del')") + public ResponseEntity deleteDatabase(@RequestBody Set ids){ + databaseService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("测试数据库链接") + @ApiOperation(value = "测试数据库链接") + @PostMapping("/testConnect") + @PreAuthorize("@el.check('database:testConnect')") + public ResponseEntity testConnect(@Validated @RequestBody Database resources){ + return new ResponseEntity<>(databaseService.testConnection(resources),HttpStatus.CREATED); + } + + @Log("执行SQL脚本") + @ApiOperation(value = "执行SQL脚本") + @PostMapping(value = "/upload") + @PreAuthorize("@el.check('database:add')") + public ResponseEntity uploadDatabase(@RequestBody MultipartFile file, HttpServletRequest request)throws Exception{ + String id = request.getParameter("id"); + Database database = databaseService.getById(id); + String fileName; + if(database != null){ + fileName = file.getOriginalFilename(); + File executeFile = new File(fileSavePath+fileName); + FileUtil.del(executeFile); + file.transferTo(executeFile); + String result = SqlUtils.executeFile(database.getJdbcUrl(), database.getUserName(), database.getPwd(), executeFile); + return new ResponseEntity<>(result,HttpStatus.OK); + }else{ + throw new BadRequestException("Database not exist"); + } + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java new file mode 100644 index 0000000..3a1336f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java @@ -0,0 +1,157 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.modules.mnt.domain.Deploy; +import me.zhengjie.modules.mnt.domain.DeployHistory; +import me.zhengjie.modules.mnt.service.DeployService; +import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@RestController +@Api(tags = "运维:部署管理") +@RequiredArgsConstructor +@RequestMapping("/api/deploy") +public class DeployController { + + private final String fileSavePath = FileUtil.getTmpDirPath()+"/"; + private final DeployService deployService; + + @ApiOperation("导出部署数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('database:list')") + public void exportDeployData(HttpServletResponse response, DeployQueryCriteria criteria) throws IOException { + deployService.download(deployService.queryAll(criteria), response); + } + + @ApiOperation(value = "查询部署") + @GetMapping + @PreAuthorize("@el.check('deploy:list')") + public ResponseEntity> queryDeployData(DeployQueryCriteria criteria, Page page){ + return new ResponseEntity<>(deployService.queryAll(criteria, page),HttpStatus.OK); + } + + @Log("新增部署") + @ApiOperation(value = "新增部署") + @PostMapping + @PreAuthorize("@el.check('deploy:add')") + public ResponseEntity createDeploy(@Validated @RequestBody Deploy resources){ + deployService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改部署") + @ApiOperation(value = "修改部署") + @PutMapping + @PreAuthorize("@el.check('deploy:edit')") + public ResponseEntity updateDeploy(@Validated @RequestBody Deploy resources){ + deployService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除部署") + @ApiOperation(value = "删除部署") + @DeleteMapping + @PreAuthorize("@el.check('deploy:del')") + public ResponseEntity deleteDeploy(@RequestBody Set ids){ + deployService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("上传文件部署") + @ApiOperation(value = "上传文件部署") + @PostMapping(value = "/upload") + @PreAuthorize("@el.check('deploy:edit')") + public ResponseEntity uploadDeploy(@RequestBody MultipartFile file, HttpServletRequest request)throws Exception{ + Long id = Long.valueOf(request.getParameter("id")); + String fileName = ""; + if(file != null){ + fileName = file.getOriginalFilename(); + File deployFile = new File(fileSavePath+fileName); + FileUtil.del(deployFile); + file.transferTo(deployFile); + //文件下一步要根据文件名字来 + deployService.deploy(fileSavePath+fileName ,id); + }else{ + System.out.println("没有找到相对应的文件"); + } + System.out.println("文件上传的原名称为:"+ Objects.requireNonNull(file).getOriginalFilename()); + Map map = new HashMap<>(2); + map.put("errno",0); + map.put("id",fileName); + return new ResponseEntity<>(map,HttpStatus.OK); + } + + @Log("系统还原") + @ApiOperation(value = "系统还原") + @PostMapping(value = "/serverReduction") + @PreAuthorize("@el.check('deploy:edit')") + public ResponseEntity serverReduction(@Validated @RequestBody DeployHistory resources){ + String result = deployService.serverReduction(resources); + return new ResponseEntity<>(result,HttpStatus.OK); + } + + @Log("服务运行状态") + @ApiOperation(value = "服务运行状态") + @PostMapping(value = "/serverStatus") + @PreAuthorize("@el.check('deploy:edit')") + public ResponseEntity serverStatus(@Validated @RequestBody Deploy resources){ + String result = deployService.serverStatus(resources); + return new ResponseEntity<>(result,HttpStatus.OK); + } + + @Log("启动服务") + @ApiOperation(value = "启动服务") + @PostMapping(value = "/startServer") + @PreAuthorize("@el.check('deploy:edit')") + public ResponseEntity startServer(@Validated @RequestBody Deploy resources){ + String result = deployService.startServer(resources); + return new ResponseEntity<>(result,HttpStatus.OK); + } + + @Log("停止服务") + @ApiOperation(value = "停止服务") + @PostMapping(value = "/stopServer") + @PreAuthorize("@el.check('deploy:edit')") + public ResponseEntity stopServer(@Validated @RequestBody Deploy resources){ + String result = deployService.stopServer(resources); + return new ResponseEntity<>(result,HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java new file mode 100644 index 0000000..d8a36c7 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java @@ -0,0 +1,69 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.modules.mnt.domain.DeployHistory; +import me.zhengjie.modules.mnt.service.DeployHistoryService; +import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@RestController +@RequiredArgsConstructor +@Api(tags = "运维:部署历史管理") +@RequestMapping("/api/deployHistory") +public class DeployHistoryController { + + private final DeployHistoryService deployhistoryService; + + @ApiOperation("导出部署历史数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('deployHistory:list')") + public void exportDeployHistory(HttpServletResponse response, DeployHistoryQueryCriteria criteria) throws IOException { + deployhistoryService.download(deployhistoryService.queryAll(criteria), response); + } + + @ApiOperation(value = "查询部署历史") + @GetMapping + @PreAuthorize("@el.check('deployHistory:list')") + public ResponseEntity> queryDeployHistory(DeployHistoryQueryCriteria criteria, Page page){ + return new ResponseEntity<>(deployhistoryService.queryAll(criteria, page),HttpStatus.OK); + } + + @Log("删除DeployHistory") + @ApiOperation(value = "删除部署历史") + @DeleteMapping + @PreAuthorize("@el.check('deployHistory:del')") + public ResponseEntity deleteDeployHistory(@RequestBody Set ids){ + deployhistoryService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java new file mode 100644 index 0000000..17b68dc --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java @@ -0,0 +1,96 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.modules.mnt.domain.Server; +import me.zhengjie.modules.mnt.service.ServerService; +import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@RestController +@Api(tags = "运维:服务器管理") +@RequiredArgsConstructor +@RequestMapping("/api/serverDeploy") +public class ServerController { + + private final ServerService serverService; + + @ApiOperation("导出服务器数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('serverDeploy:list')") + public void exportServerDeploy(HttpServletResponse response, ServerQueryCriteria criteria) throws IOException { + serverService.download(serverService.queryAll(criteria), response); + } + + @ApiOperation(value = "查询服务器") + @GetMapping + @PreAuthorize("@el.check('serverDeploy:list')") + public ResponseEntity> queryServerDeploy(ServerQueryCriteria criteria, Page page){ + return new ResponseEntity<>(serverService.queryAll(criteria, page),HttpStatus.OK); + } + + @Log("新增服务器") + @ApiOperation(value = "新增服务器") + @PostMapping + @PreAuthorize("@el.check('serverDeploy:add')") + public ResponseEntity createServerDeploy(@Validated @RequestBody Server resources){ + serverService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改服务器") + @ApiOperation(value = "修改服务器") + @PutMapping + @PreAuthorize("@el.check('serverDeploy:edit')") + public ResponseEntity updateServerDeploy(@Validated @RequestBody Server resources){ + serverService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除服务器") + @ApiOperation(value = "删除Server") + @DeleteMapping + @PreAuthorize("@el.check('serverDeploy:del')") + public ResponseEntity deleteServerDeploy(@RequestBody Set ids){ + serverService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("测试连接服务器") + @ApiOperation(value = "测试连接服务器") + @PostMapping("/testConnect") + @PreAuthorize("@el.check('serverDeploy:add')") + public ResponseEntity testConnectServerDeploy(@Validated @RequestBody Server resources){ + return new ResponseEntity<>(serverService.testConnect(resources),HttpStatus.CREATED); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java new file mode 100644 index 0000000..a6b2090 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.mnt.domain.App; +import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +public interface AppService extends IService { + + /** + * 分页查询 + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(AppQueryCriteria criteria, Page page); + + /** + * 查询全部数据 + * + * @param criteria 条件 + * @return / + */ + List queryAll(AppQueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(App resources); + + /** + * 编辑 + * @param resources / + */ + void update(App resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 导出数据 + * @param apps / + * @param response / + * @throws IOException / + */ + void download(List apps, HttpServletResponse response) throws IOException; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java new file mode 100644 index 0000000..a042605 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java @@ -0,0 +1,83 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.mnt.domain.Database; +import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** + * @author ZhangHouYing + * @date 2019-08-24 + */ +public interface DatabaseService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(DatabaseQueryCriteria criteria, Page page); + + /** + * 查询全部 + * @param criteria 条件 + * @return / + */ + List queryAll(DatabaseQueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(Database resources); + + /** + * 编辑 + * @param resources / + */ + void update(Database resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 测试连接数据库 + * @param resources / + * @return / + */ + boolean testConnection(Database resources); + + /** + * 导出数据 + * @param queryAll / + * @param response / + * @throws IOException e + */ + void download(List queryAll, HttpServletResponse response) throws IOException; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java new file mode 100644 index 0000000..28a3653 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java @@ -0,0 +1,70 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.mnt.domain.DeployHistory; +import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** + * @author zhanghouying + */ +public interface DeployHistoryService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(DeployHistoryQueryCriteria criteria, Page page); + + /** + * 查询全部 + * + * @param criteria 条件 + * @return / + */ + List queryAll(DeployHistoryQueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(DeployHistory resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 导出数据 + * @param queryAll / + * @param response / + * @throws IOException / + */ + void download(List queryAll, HttpServletResponse response) throws IOException; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java new file mode 100644 index 0000000..8d30bd5 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java @@ -0,0 +1,111 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.mnt.domain.Deploy; +import me.zhengjie.modules.mnt.domain.DeployHistory; +import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +public interface DeployService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(DeployQueryCriteria criteria, Page page); + + /** + * 查询全部数据 + * @param criteria 条件 + * @return / + */ + List queryAll(DeployQueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(Deploy resources); + + + /** + * 编辑 + * @param resources / + */ + void update(Deploy resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 部署文件到服务器 + * @param fileSavePath 文件路径 + * @param appId 应用ID + */ + void deploy(String fileSavePath, Long appId); + + /** + * 查询部署状态 + * @param resources / + * @return / + */ + String serverStatus(Deploy resources); + /** + * 启动服务 + * @param resources / + * @return / + */ + String startServer(Deploy resources); + /** + * 停止服务 + * @param resources / + * @return / + */ + String stopServer(Deploy resources); + + /** + * 停止服务 + * @param resources / + * @return / + */ + String serverReduction(DeployHistory resources); + + /** + * 导出数据 + * @param queryAll / + * @param response / + * @throws IOException / + */ + void download(List queryAll, HttpServletResponse response) throws IOException; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java new file mode 100644 index 0000000..407a047 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java @@ -0,0 +1,91 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.mnt.domain.Server; +import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +public interface ServerService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(ServerQueryCriteria criteria, Page page); + + /** + * 查询全部数据 + * @param criteria 条件 + * @return / + */ + List queryAll(ServerQueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(Server resources); + + /** + * 编辑 + * @param resources / + */ + void update(Server resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 根据IP查询 + * + * @param ip / + * @return / + */ + Server findByIp(String ip); + + /** + * 测试登录服务器 + * @param resources / + * @return / + */ + Boolean testConnect(Server resources); + + /** + * 导出数据 + * @param queryAll / + * @param response / + * @throws IOException / + */ + void download(List queryAll, HttpServletResponse response) throws IOException; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java new file mode 100644 index 0000000..a86d628 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java @@ -0,0 +1,119 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.mnt.domain.App; +import me.zhengjie.modules.mnt.mapper.AppMapper; +import me.zhengjie.modules.mnt.mapper.DeployMapper; +import me.zhengjie.modules.mnt.mapper.DeployServerMapper; +import me.zhengjie.modules.mnt.service.AppService; +import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Service +@RequiredArgsConstructor +public class AppServiceImpl extends ServiceImpl implements AppService { + + private final AppMapper appMapper; + private final DeployMapper deployMapper; + private final DeployServerMapper deployServerMapper; + + @Override + public PageResult queryAll(AppQueryCriteria criteria, Page page){ + return PageUtil.toPage(appMapper.queryAll(criteria, page)); + } + + @Override + public List queryAll(AppQueryCriteria criteria){ + return appMapper.queryAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(App resources) { + verification(resources); + save(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(App resources) { + verification(resources); + App app = getById(resources.getId()); + app.copy(resources); + saveOrUpdate(app); + } + + private void verification(App resources){ + String opt = "/opt"; + String home = "/home"; + if (!(resources.getUploadPath().startsWith(opt) || resources.getUploadPath().startsWith(home))) { + throw new BadRequestException("文件只能上传在opt目录或者home目录 "); + } + if (!(resources.getDeployPath().startsWith(opt) || resources.getDeployPath().startsWith(home))) { + throw new BadRequestException("文件只能部署在opt目录或者home目录 "); + } + if (!(resources.getBackupPath().startsWith(opt) || resources.getBackupPath().startsWith(home))) { + throw new BadRequestException("文件只能备份在opt目录或者home目录 "); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + // 删除应用 + removeBatchByIds(ids); + // 删除部署 + Set deployIds = deployMapper.getIdByAppIds(ids); + if(deployIds != null && deployIds.size() > 0){ + deployServerMapper.deleteByDeployIds(deployIds); + deployMapper.deleteBatchIds(deployIds); + } + } + + @Override + public void download(List apps, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (App app : apps) { + Map map = new LinkedHashMap<>(); + map.put("应用名称", app.getName()); + map.put("端口", app.getPort()); + map.put("上传目录", app.getUploadPath()); + map.put("部署目录", app.getDeployPath()); + map.put("备份目录", app.getBackupPath()); + map.put("启动脚本", app.getStartScript()); + map.put("部署脚本", app.getDeployScript()); + map.put("创建日期", app.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java new file mode 100644 index 0000000..ace15a7 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java @@ -0,0 +1,102 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service.impl; + +import cn.hutool.core.util.IdUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.modules.mnt.domain.Database; +import me.zhengjie.modules.mnt.mapper.DatabaseMapper; +import me.zhengjie.modules.mnt.service.DatabaseService; +import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; +import me.zhengjie.modules.mnt.util.SqlUtils; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Slf4j +@Service +@RequiredArgsConstructor +public class DatabaseServiceImpl extends ServiceImpl implements DatabaseService { + + private final DatabaseMapper databaseMapper; + + @Override + public PageResult queryAll(DatabaseQueryCriteria criteria, Page page){ + return PageUtil.toPage(databaseMapper.findAll(criteria, page)); + } + + @Override + public List queryAll(DatabaseQueryCriteria criteria){ + return databaseMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Database resources) { + resources.setId(IdUtil.simpleUUID()); + save(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Database resources) { + Database database = getById(resources.getId()); + database.copy(resources); + saveOrUpdate(database); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + removeBatchByIds(ids); + } + + @Override + public boolean testConnection(Database resources) { + try { + return SqlUtils.testConnection(resources.getJdbcUrl(), resources.getUserName(), resources.getPwd()); + } catch (Exception e) { + log.error(e.getMessage()); + return false; + } + } + + @Override + public void download(List databases, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Database database : databases) { + Map map = new LinkedHashMap<>(); + map.put("数据库名称", database.getName()); + map.put("数据库连接地址", database.getJdbcUrl()); + map.put("用户名", database.getUserName()); + map.put("创建日期", database.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java new file mode 100644 index 0000000..583d973 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java @@ -0,0 +1,84 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service.impl; + +import cn.hutool.core.util.IdUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.mnt.domain.DeployHistory; +import me.zhengjie.modules.mnt.mapper.DeployHistoryMapper; +import me.zhengjie.modules.mnt.service.DeployHistoryService; +import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; +import me.zhengjie.utils.DateUtil; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Service +@RequiredArgsConstructor +public class DeployHistoryServiceImpl extends ServiceImpl implements DeployHistoryService { + + private final DeployHistoryMapper deployhistoryMapper; + + @Override + public PageResult queryAll(DeployHistoryQueryCriteria criteria, Page page){ + return PageUtil.toPage(deployhistoryMapper.findAll(criteria, page)); + } + + @Override + public List queryAll(DeployHistoryQueryCriteria criteria){ + return deployhistoryMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(DeployHistory resources) { + resources.setId(IdUtil.simpleUUID()); + resources.setDeployDate(DateUtil.getTimeStamp()); + save(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + removeBatchByIds(ids); + } + + @Override + public void download(List deployHistories, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (DeployHistory deployHistory : deployHistories) { + Map map = new LinkedHashMap<>(); + map.put("部署编号", deployHistory.getDeployId()); + map.put("应用名称", deployHistory.getAppName()); + map.put("部署IP", deployHistory.getIp()); + map.put("部署时间", deployHistory.getDeployDate()); + map.put("部署人员", deployHistory.getDeployUser()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java new file mode 100644 index 0000000..205a0e8 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java @@ -0,0 +1,425 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service.impl; + +import cn.hutool.core.date.DatePattern; +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.mnt.domain.App; +import me.zhengjie.modules.mnt.domain.Deploy; +import me.zhengjie.modules.mnt.domain.DeployHistory; +import me.zhengjie.modules.mnt.domain.Server; +import me.zhengjie.modules.mnt.mapper.DeployMapper; +import me.zhengjie.modules.mnt.mapper.DeployServerMapper; +import me.zhengjie.modules.mnt.service.DeployHistoryService; +import me.zhengjie.modules.mnt.service.DeployService; +import me.zhengjie.modules.mnt.service.ServerService; +import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; +import me.zhengjie.modules.mnt.util.ExecuteShellUtil; +import me.zhengjie.modules.mnt.util.ScpClientUtil; +import me.zhengjie.modules.mnt.websocket.MsgType; +import me.zhengjie.modules.mnt.websocket.SocketMsg; +import me.zhengjie.modules.mnt.websocket.WebSocketServer; +import me.zhengjie.utils.*; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** + * @author zhanghouying + * @date 2019-08-24 + */ +@Slf4j +@Service +@RequiredArgsConstructor +public class DeployServiceImpl extends ServiceImpl implements DeployService { + + private final String FILE_SEPARATOR = "/"; + private final DeployMapper deployMapper; + private final DeployServerMapper deployServerMapper; + private final ServerService serverService; + private final DeployHistoryService deployHistoryService; + /** + * 循环次数 + */ + private final Integer count = 30; + + @Override + public PageResult queryAll(DeployQueryCriteria criteria, Page page) { + criteria.setOffset(page.offset()); + List deploys = deployMapper.findAll(criteria); + Long total = deployMapper.countAll(criteria); + return PageUtil.toPage(deploys, total); + } + + @Override + public List queryAll(DeployQueryCriteria criteria) { + return deployMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Deploy resources) { + resources.setAppId(resources.getApp().getId()); + save(resources); + // 保存关联关系 + deployServerMapper.insertData(resources.getId(), resources.getDeploys()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Deploy resources) { + Deploy deploy = getById(resources.getId()); + deploy.copy(resources); + saveOrUpdate(deploy); + // 更新关联关系 + deployServerMapper.deleteByDeployId(resources.getId()); + deployServerMapper.insertData(resources.getId(), resources.getDeploys()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + removeBatchByIds(ids); + // 删除关联 + deployServerMapper.deleteByDeployIds(ids); + } + + @Override + public void deploy(String fileSavePath, Long id) { + deployApp(fileSavePath, id); + } + + /** + * @param fileSavePath 本机路径 + * @param id ID + */ + private void deployApp(String fileSavePath, Long id) { + Deploy deploy = deployMapper.getDeployById(id); + if (deploy == null) { + sendMsg("部署信息不存在", MsgType.ERROR); + throw new BadRequestException("部署信息不存在"); + } + App app = deploy.getApp(); + if (app == null) { + sendMsg("包对应应用信息不存在", MsgType.ERROR); + throw new BadRequestException("包对应应用信息不存在"); + } + int port = app.getPort(); + //这个是服务器部署路径 + String uploadPath = app.getUploadPath(); + StringBuilder sb = new StringBuilder(); + String msg; + Set deploys = deploy.getDeploys(); + for (Server server : deploys) { + String ip = server.getIp(); + ExecuteShellUtil executeShellUtil = getExecuteShellUtil(ip); + //判断是否第一次部署 + boolean flag = checkFile(executeShellUtil, app); + //第一步要确认服务器上有这个目录 + executeShellUtil.execute("mkdir -p " + app.getUploadPath()); + executeShellUtil.execute("mkdir -p " + app.getBackupPath()); + executeShellUtil.execute("mkdir -p " + app.getDeployPath()); + //上传文件 + msg = String.format("登陆到服务器:%s", ip); + ScpClientUtil scpClientUtil = getScpClientUtil(ip); + log.info(msg); + sendMsg(msg, MsgType.INFO); + msg = String.format("上传文件到服务器:%s
目录:%s下,请稍等...", ip, uploadPath); + sendMsg(msg, MsgType.INFO); + scpClientUtil.putFile(fileSavePath, uploadPath); + if (flag) { + sendMsg("停止原来应用", MsgType.INFO); + //停止应用 + stopApp(port, executeShellUtil); + sendMsg("备份原来应用", MsgType.INFO); + //备份应用 + backupApp(executeShellUtil, ip, app.getDeployPath()+FILE_SEPARATOR, app.getName(), app.getBackupPath()+FILE_SEPARATOR, id); + } + sendMsg("部署应用", MsgType.INFO); + //部署文件,并启动应用 + String deployScript = app.getDeployScript(); + executeShellUtil.execute(deployScript); + sleep(3); + sendMsg("应用部署中,请耐心等待部署结果,或者稍后手动查看部署状态", MsgType.INFO); + int i = 0; + boolean result = false; + // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 + while (i++ < count){ + result = checkIsRunningStatus(port, executeShellUtil); + if(result){ + break; + } + // 休眠6秒 + sleep(6); + } + sb.append("服务器:").append(server.getName()).append("
应用:").append(app.getName()); + sendResultMsg(result, sb); + executeShellUtil.close(); + } + } + + private void sleep(int second) { + try { + Thread.sleep(second * 1000L); + } catch (InterruptedException e) { + log.error(e.getMessage(),e); + } + } + + private void backupApp(ExecuteShellUtil executeShellUtil, String ip, String fileSavePath, String appName, String backupPath, Long id) { + String deployDate = DateUtil.format(new Date(), DatePattern.PURE_DATETIME_PATTERN); + StringBuilder sb = new StringBuilder(); + backupPath += appName + FILE_SEPARATOR + deployDate + "\n"; + sb.append("mkdir -p ").append(backupPath); + sb.append("mv -f ").append(fileSavePath); + sb.append(appName).append(" ").append(backupPath); + log.info("备份应用脚本:" + sb.toString()); + executeShellUtil.execute(sb.toString()); + //还原信息入库 + DeployHistory deployHistory = new DeployHistory(); + deployHistory.setAppName(appName); + deployHistory.setDeployUser(SecurityUtils.getCurrentUsername()); + deployHistory.setIp(ip); + deployHistory.setDeployId(id); + deployHistoryService.create(deployHistory); + } + + /** + * 停App + * + * @param port 端口 + * @param executeShellUtil / + */ + private void stopApp(int port, ExecuteShellUtil executeShellUtil) { + //发送停止命令 + executeShellUtil.execute(String.format("lsof -i :%d|grep -v \"PID\"|awk '{print \"kill -9\",$2}'|sh", port)); + + } + + /** + * 指定端口程序是否在运行 + * + * @param port 端口 + * @param executeShellUtil / + * @return true 正在运行 false 已经停止 + */ + private boolean checkIsRunningStatus(int port, ExecuteShellUtil executeShellUtil) { + String result = executeShellUtil.executeForResult(String.format("fuser -n tcp %d", port)); + return result.indexOf("/tcp:")>0; + } + + private void sendMsg(String msg, MsgType msgType) { + try { + WebSocketServer.sendInfo(new SocketMsg(msg, msgType), "deploy"); + } catch (IOException e) { + log.error(e.getMessage(),e); + } + } + + @Override + public String serverStatus(Deploy resources) { + Set servers = resources.getDeploys(); + App app = resources.getApp(); + for (Server server : servers) { + StringBuilder sb = new StringBuilder(); + ExecuteShellUtil executeShellUtil = getExecuteShellUtil(server.getIp()); + sb.append("服务器:").append(server.getName()).append("
应用:").append(app.getName()); + boolean result = checkIsRunningStatus(app.getPort(), executeShellUtil); + if (result) { + sb.append("
正在运行"); + sendMsg(sb.toString(), MsgType.INFO); + } else { + sb.append("
已停止!"); + sendMsg(sb.toString(), MsgType.ERROR); + } + log.info(sb.toString()); + executeShellUtil.close(); + } + return "执行完毕"; + } + + private boolean checkFile(ExecuteShellUtil executeShellUtil, App app) { + String result = executeShellUtil.executeForResult("find " + app.getDeployPath() + " -name " + app.getName()); + return result.indexOf(app.getName())>0; + } + + /** + * 启动服务 + * @param resources / + * @return / + */ + @Override + public String startServer(Deploy resources) { + Set deploys = resources.getDeploys(); + App app = resources.getApp(); + for (Server deploy : deploys) { + StringBuilder sb = new StringBuilder(); + ExecuteShellUtil executeShellUtil = getExecuteShellUtil(deploy.getIp()); + //为了防止重复启动,这里先停止应用 + stopApp(app.getPort(), executeShellUtil); + sb.append("服务器:").append(deploy.getName()).append("
应用:").append(app.getName()); + sendMsg("下发启动命令", MsgType.INFO); + executeShellUtil.execute(app.getStartScript()); + sleep(3); + sendMsg("应用启动中,请耐心等待启动结果,或者稍后手动查看运行状态", MsgType.INFO); + int i = 0; + boolean result = false; + // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 + while (i++ < count){ + result = checkIsRunningStatus(app.getPort(), executeShellUtil); + if(result){ + break; + } + // 休眠6秒 + sleep(6); + } + sendResultMsg(result, sb); + log.info(sb.toString()); + executeShellUtil.close(); + } + return "执行完毕"; + } + + /** + * 停止服务 + * @param resources / + * @return / + */ + @Override + public String stopServer(Deploy resources) { + Set deploys = resources.getDeploys(); + App app = resources.getApp(); + for (Server deploy : deploys) { + StringBuilder sb = new StringBuilder(); + ExecuteShellUtil executeShellUtil = getExecuteShellUtil(deploy.getIp()); + sb.append("服务器:").append(deploy.getName()).append("
应用:").append(app.getName()); + sendMsg("下发停止命令", MsgType.INFO); + //停止应用 + stopApp(app.getPort(), executeShellUtil); + sleep(1); + boolean result = checkIsRunningStatus(app.getPort(), executeShellUtil); + if (result) { + sb.append("
关闭失败!"); + sendMsg(sb.toString(), MsgType.ERROR); + } else { + sb.append("
关闭成功!"); + sendMsg(sb.toString(), MsgType.INFO); + } + log.info(sb.toString()); + executeShellUtil.close(); + } + return "执行完毕"; + } + + @Override + public String serverReduction(DeployHistory resources) { + Long deployId = resources.getDeployId(); + Deploy deployInfo = getById(deployId); + String deployDate = DateUtil.format(resources.getDeployDate(), DatePattern.PURE_DATETIME_PATTERN); + App app = deployInfo.getApp(); + if (app == null) { + sendMsg("应用信息不存在:" + resources.getAppName(), MsgType.ERROR); + throw new BadRequestException("应用信息不存在:" + resources.getAppName()); + } + String backupPath = app.getBackupPath()+FILE_SEPARATOR; + backupPath += resources.getAppName() + FILE_SEPARATOR + deployDate; + //这个是服务器部署路径 + String deployPath = app.getDeployPath(); + String ip = resources.getIp(); + ExecuteShellUtil executeShellUtil = getExecuteShellUtil(ip); + String msg; + + msg = String.format("登陆到服务器:%s", ip); + log.info(msg); + sendMsg(msg, MsgType.INFO); + sendMsg("停止原来应用", MsgType.INFO); + //停止应用 + stopApp(app.getPort(), executeShellUtil); + //删除原来应用 + sendMsg("删除应用", MsgType.INFO); + executeShellUtil.execute("rm -rf " + deployPath + FILE_SEPARATOR + resources.getAppName()); + //还原应用 + sendMsg("还原应用", MsgType.INFO); + executeShellUtil.execute("cp -r " + backupPath + "/. " + deployPath); + sendMsg("启动应用", MsgType.INFO); + executeShellUtil.execute(app.getStartScript()); + sendMsg("应用启动中,请耐心等待启动结果,或者稍后手动查看启动状态", MsgType.INFO); + int i = 0; + boolean result = false; + // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 + while (i++ < count){ + result = checkIsRunningStatus(app.getPort(), executeShellUtil); + if(result){ + break; + } + // 休眠6秒 + sleep(6); + } + StringBuilder sb = new StringBuilder(); + sb.append("服务器:").append(ip).append("
应用:").append(resources.getAppName()); + sendResultMsg(result, sb); + executeShellUtil.close(); + return ""; + } + + private ExecuteShellUtil getExecuteShellUtil(String ip) { + Server server = serverService.findByIp(ip); + if (server == null) { + sendMsg("IP对应服务器信息不存在:" + ip, MsgType.ERROR); + throw new BadRequestException("IP对应服务器信息不存在:" + ip); + } + return new ExecuteShellUtil(ip, server.getAccount(), server.getPassword(), server.getPort()); + } + + private ScpClientUtil getScpClientUtil(String ip) { + Server server = serverService.findByIp(ip); + if (server == null) { + sendMsg("IP对应服务器信息不存在:" + ip, MsgType.ERROR); + throw new BadRequestException("IP对应服务器信息不存在:" + ip); + } + return ScpClientUtil.getInstance(ip, server.getPort(), server.getAccount(), server.getPassword()); + } + + private void sendResultMsg(boolean result, StringBuilder sb) { + if (result) { + sb.append("
启动成功!"); + sendMsg(sb.toString(), MsgType.INFO); + } else { + sb.append("
启动失败!"); + sendMsg(sb.toString(), MsgType.ERROR); + } + } + + @Override + public void download(List deploys, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Deploy deploy : deploys) { + Map map = new LinkedHashMap<>(); + map.put("应用名称", deploy.getApp().getName()); + map.put("服务器", deploy.getServers()); + map.put("部署日期", deploy.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java new file mode 100644 index 0000000..73aa983 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java @@ -0,0 +1,113 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.mnt.domain.Server; +import me.zhengjie.modules.mnt.mapper.DeployServerMapper; +import me.zhengjie.modules.mnt.mapper.ServerMapper; +import me.zhengjie.modules.mnt.service.ServerService; +import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; +import me.zhengjie.modules.mnt.util.ExecuteShellUtil; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** +* @author zhanghouying +* @date 2019-08-24 +*/ +@Service +@RequiredArgsConstructor +public class ServerServiceImpl extends ServiceImpl implements ServerService { + + private final ServerMapper serverMapper; + private final DeployServerMapper deployServerMapper; + + @Override + public PageResult queryAll(ServerQueryCriteria criteria, Page page){ + return PageUtil.toPage(serverMapper.findAll(criteria, page)); + } + + @Override + public List queryAll(ServerQueryCriteria criteria){ + return serverMapper.findAll(criteria); + } + + @Override + public Server findByIp(String ip) { + return serverMapper.findByIp(ip); + } + + @Override + public Boolean testConnect(Server resources) { + ExecuteShellUtil executeShellUtil = null; + try { + executeShellUtil = new ExecuteShellUtil(resources.getIp(), resources.getAccount(), resources.getPassword(),resources.getPort()); + return executeShellUtil.execute("ls")==0; + } catch (Exception e) { + return false; + }finally { + if (executeShellUtil != null) { + executeShellUtil.close(); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Server resources) { + save(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Server resources) { + Server server = getById(resources.getId()); + server.copy(resources); + saveOrUpdate(server); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + removeBatchByIds(ids); + // 删除与之关联的服务 + deployServerMapper.deleteByServerIds(ids); + } + + @Override + public void download(List servers, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Server deploy : servers) { + Map map = new LinkedHashMap<>(); + map.put("服务器名称", deploy.getName()); + map.put("服务器IP", deploy.getIp()); + map.put("端口", deploy.getPort()); + map.put("账号", deploy.getAccount()); + map.put("创建日期", deploy.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java new file mode 100644 index 0000000..e104b9e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java @@ -0,0 +1,140 @@ +/* + * << + * Davinci + * == + * Copyright (C) 2016 - 2019 EDP + * == + * Licensed 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 + * http://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. + * >> + * + */ + +package me.zhengjie.modules.mnt.util; +import lombok.extern.slf4j.Slf4j; + +/** + * @author / + */ +@Slf4j +@SuppressWarnings({"unchecked","all"}) +public enum DataTypeEnum { + + /** mysql */ + MYSQL("mysql", "mysql", "com.mysql.jdbc.Driver", "`", "`", "'", "'"), + + /** oracle */ + ORACLE("oracle", "oracle", "oracle.jdbc.driver.OracleDriver", "\"", "\"", "\"", "\""), + + /** sql server */ + SQLSERVER("sqlserver", "sqlserver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "\"", "\"", "\"", "\""), + + /** h2 */ + H2("h2", "h2", "org.h2.Driver", "`", "`", "\"", "\""), + + /** phoenix */ + PHOENIX("phoenix", "hbase phoenix", "org.apache.phoenix.jdbc.PhoenixDriver", "", "", "\"", "\""), + + /** mongo */ + MONGODB("mongo", "mongodb", "mongodb.jdbc.MongoDriver", "`", "`", "\"", "\""), + + /** sql4es */ + ELASTICSEARCH("sql4es", "elasticsearch", "nl.anchormen.sql4es.jdbc.ESDriver", "", "", "'", "'"), + + /** presto */ + PRESTO("presto", "presto", "com.facebook.presto.jdbc.PrestoDriver", "", "", "\"", "\""), + + /** moonbox */ + MOONBOX("moonbox", "moonbox", "moonbox.jdbc.MbDriver", "`", "`", "`", "`"), + + /** cassandra */ + CASSANDRA("cassandra", "cassandra", "com.github.adejanovski.cassandra.jdbc.CassandraDriver", "", "", "'", "'"), + + /** click house */ + CLICKHOUSE("clickhouse", "clickhouse", "ru.yandex.clickhouse.ClickHouseDriver", "", "", "\"", "\""), + + /** kylin */ + KYLIN("kylin", "kylin", "org.apache.kylin.jdbc.Driver", "\"", "\"", "\"", "\""), + + /** vertica */ + VERTICA("vertica", "vertica", "com.vertica.jdbc.Driver", "", "", "'", "'"), + + /** sap */ + HANA("sap", "sap hana", "com.sap.db.jdbc.Driver", "", "", "'", "'"), + + /** impala */ + IMPALA("impala", "impala", "com.cloudera.impala.jdbc41.Driver", "", "", "'", "'"); + + private String feature; + private String desc; + private String driver; + private String keywordPrefix; + private String keywordSuffix; + private String aliasPrefix; + private String aliasSuffix; + + private static final String JDBC_URL_PREFIX = "jdbc:"; + + DataTypeEnum(String feature, String desc, String driver, String keywordPrefix, String keywordSuffix, String aliasPrefix, String aliasSuffix) { + this.feature = feature; + this.desc = desc; + this.driver = driver; + this.keywordPrefix = keywordPrefix; + this.keywordSuffix = keywordSuffix; + this.aliasPrefix = aliasPrefix; + this.aliasSuffix = aliasSuffix; + } + + public static DataTypeEnum urlOf(String jdbcUrl) { + String url = jdbcUrl.toLowerCase().trim(); + for (DataTypeEnum dataTypeEnum : values()) { + if (url.startsWith(JDBC_URL_PREFIX + dataTypeEnum.feature)) { + try { + Class aClass = Class.forName(dataTypeEnum.getDriver()); + if (null == aClass) { + throw new RuntimeException("Unable to get driver instance for jdbcUrl: " + jdbcUrl); + } + } catch (ClassNotFoundException e) { + throw new RuntimeException("Unable to get driver instance: " + jdbcUrl); + } + return dataTypeEnum; + } + } + return null; + } + + public String getFeature() { + return feature; + } + + public String getDesc() { + return desc; + } + + public String getDriver() { + return driver; + } + + public String getKeywordPrefix() { + return keywordPrefix; + } + + public String getKeywordSuffix() { + return keywordSuffix; + } + + public String getAliasPrefix() { + return aliasPrefix; + } + + public String getAliasSuffix() { + return aliasSuffix; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java new file mode 100644 index 0000000..a5d5b59 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java @@ -0,0 +1,101 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.util; + +import cn.hutool.core.io.IoUtil; +import com.jcraft.jsch.ChannelShell; +import com.jcraft.jsch.JSch; +import com.jcraft.jsch.Session; +import lombok.extern.slf4j.Slf4j; + +import java.io.*; +import java.util.Vector; + +/** + * 执行shell命令 + * + * @author: ZhangHouYing + * @date: 2019/8/10 + */ +@Slf4j +public class ExecuteShellUtil { + + private Vector stdout; + + Session session; + + public ExecuteShellUtil(final String ipAddress, final String username, final String password,int port) { + try { + JSch jsch = new JSch(); + session = jsch.getSession(username, ipAddress, port); + session.setPassword(password); + session.setConfig("StrictHostKeyChecking", "no"); + session.connect(3000); + } catch (Exception e) { + log.error(e.getMessage(),e); + } + + } + + public int execute(final String command) { + int returnCode = 0; + ChannelShell channel = null; + PrintWriter printWriter = null; + BufferedReader input = null; + stdout = new Vector(); + try { + channel = (ChannelShell) session.openChannel("shell"); + channel.connect(); + input = new BufferedReader(new InputStreamReader(channel.getInputStream())); + printWriter = new PrintWriter(channel.getOutputStream()); + printWriter.println(command); + printWriter.println("exit"); + printWriter.flush(); + log.info("The remote command is: "); + String line; + while ((line = input.readLine()) != null) { + stdout.add(line); + System.out.println(line); + } + } catch (Exception e) { + log.error(e.getMessage(),e); + return -1; + }finally { + IoUtil.close(printWriter); + IoUtil.close(input); + if (channel != null) { + channel.disconnect(); + } + } + return returnCode; + } + + public void close(){ + if (session != null) { + session.disconnect(); + } + } + + public String executeForResult(String command) { + execute(command); + StringBuilder sb = new StringBuilder(); + for (String str : stdout) { + sb.append(str); + } + return sb.toString(); + } + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java new file mode 100644 index 0000000..7cb83aa --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java @@ -0,0 +1,105 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.util; + +import ch.ethz.ssh2.Connection; +import ch.ethz.ssh2.SCPClient; +import com.google.common.collect.Maps; + +import java.io.IOException; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * 远程执行linux命令 + * @author: ZhangHouYing + * @date: 2019-08-10 10:06 + */ +public class ScpClientUtil { + + static private Map instance = Maps.newHashMap(); + + static synchronized public ScpClientUtil getInstance(String ip, int port, String username, String password) { + if (instance.get(ip) == null) { + instance.put(ip, new ScpClientUtil(ip, port, username, password)); + } + return instance.get(ip); + } + + public ScpClientUtil(String ip, int port, String username, String password) { + this.ip = ip; + this.port = port; + this.username = username; + this.password = password; + } + + public void getFile(String remoteFile, String localTargetDirectory) { + Connection conn = new Connection(ip, port); + try { + conn.connect(); + boolean isAuthenticated = conn.authenticateWithPassword(username, password); + if (!isAuthenticated) { + System.err.println("authentication failed"); + } + SCPClient client = new SCPClient(conn); + client.get(remoteFile, localTargetDirectory); + } catch (IOException ex) { + Logger.getLogger(SCPClient.class.getName()).log(Level.SEVERE, null, ex); + }finally{ + conn.close(); + } + } + + public void putFile(String localFile, String remoteTargetDirectory) { + putFile(localFile, null, remoteTargetDirectory); + } + + public void putFile(String localFile, String remoteFileName, String remoteTargetDirectory) { + putFile(localFile, remoteFileName, remoteTargetDirectory,null); + } + + public void putFile(String localFile, String remoteFileName, String remoteTargetDirectory, String mode) { + Connection conn = new Connection(ip, port); + try { + conn.connect(); + boolean isAuthenticated = conn.authenticateWithPassword(username, password); + if (!isAuthenticated) { + System.err.println("authentication failed"); + } + SCPClient client = new SCPClient(conn); + if ((mode == null) || (mode.length() == 0)) { + mode = "0600"; + } + if (remoteFileName == null) { + client.put(localFile, remoteTargetDirectory); + } else { + client.put(localFile, remoteFileName, remoteTargetDirectory, mode); + } + } catch (IOException ex) { + Logger.getLogger(ScpClientUtil.class.getName()).log(Level.SEVERE, null, ex); + }finally{ + conn.close(); + } + } + + private String ip; + private int port; + private String username; + private String password; + + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java new file mode 100644 index 0000000..d7e06b1 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java @@ -0,0 +1,201 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.util; + +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.util.StringUtils; +import com.google.common.collect.Lists; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.utils.CloseUtil; +import javax.sql.DataSource; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.sql.*; +import java.util.List; + +/** + * @author / + */ +@Slf4j +public class SqlUtils { + + /** + * 获取数据源 + * + * @param jdbcUrl / + * @param userName / + * @param password / + * @return DataSource + */ + private static DataSource getDataSource(String jdbcUrl, String userName, String password) { + DruidDataSource druidDataSource = new DruidDataSource(); + String className; + try { + className = DriverManager.getDriver(jdbcUrl.trim()).getClass().getName(); + } catch (SQLException e) { + throw new RuntimeException("Get class name error: =" + jdbcUrl); + } + if (StringUtils.isEmpty(className)) { + DataTypeEnum dataTypeEnum = DataTypeEnum.urlOf(jdbcUrl); + if (null == dataTypeEnum) { + throw new RuntimeException("Not supported data type: jdbcUrl=" + jdbcUrl); + } + druidDataSource.setDriverClassName(dataTypeEnum.getDriver()); + } else { + druidDataSource.setDriverClassName(className); + } + + + druidDataSource.setUrl(jdbcUrl); + druidDataSource.setUsername(userName); + druidDataSource.setPassword(password); + // 配置获取连接等待超时的时间 + druidDataSource.setMaxWait(3000); + // 配置初始化大小、最小、最大 + druidDataSource.setInitialSize(1); + druidDataSource.setMinIdle(1); + druidDataSource.setMaxActive(1); + + // 如果链接出现异常则直接判定为失败而不是一直重试 + druidDataSource.setBreakAfterAcquireFailure(true); + try { + druidDataSource.init(); + } catch (SQLException e) { + log.error("Exception during pool initialization", e); + throw new RuntimeException(e.getMessage()); + } + + return druidDataSource; + } + + private static Connection getConnection(String jdbcUrl, String userName, String password) { + DataSource dataSource = getDataSource(jdbcUrl, userName, password); + Connection connection = null; + try { + connection = dataSource.getConnection(); + } catch (Exception ignored) {} + try { + int timeOut = 5; + if (null == connection || connection.isClosed() || !connection.isValid(timeOut)) { + log.info("connection is closed or invalid, retry get connection!"); + connection = dataSource.getConnection(); + } + } catch (Exception e) { + log.error("create connection error, jdbcUrl: {}", jdbcUrl); + throw new RuntimeException("create connection error, jdbcUrl: " + jdbcUrl); + } finally { + CloseUtil.close(connection); + } + return connection; + } + + private static void releaseConnection(Connection connection) { + if (null != connection) { + try { + connection.close(); + } catch (Exception e) { + log.error(e.getMessage(),e); + log.error("connection close error:" + e.getMessage()); + } + } + } + + public static boolean testConnection(String jdbcUrl, String userName, String password) { + Connection connection = null; + try { + connection = getConnection(jdbcUrl, userName, password); + if (null != connection) { + return true; + } + } catch (Exception e) { + log.info("Get connection failed:" + e.getMessage()); + } finally { + releaseConnection(connection); + } + return false; + } + + public static String executeFile(String jdbcUrl, String userName, String password, File sqlFile) { + Connection connection = getConnection(jdbcUrl, userName, password); + try { + batchExecute(connection, readSqlList(sqlFile)); + } catch (Exception e) { + log.error("sql脚本执行发生异常:{}",e.getMessage()); + return e.getMessage(); + }finally { + releaseConnection(connection); + } + return "success"; + } + + + /** + * 批量执行sql + * @param connection / + * @param sqlList / + */ + public static void batchExecute(Connection connection, List sqlList) { + Statement st = null; + try { + st = connection.createStatement(); + for (String sql : sqlList) { + if (sql.endsWith(";")) { + sql = sql.substring(0, sql.length() - 1); + } + st.addBatch(sql); + } + st.executeBatch(); + } catch (SQLException throwables) { + throwables.printStackTrace(); + } finally { + CloseUtil.close(st); + } + } + + /** + * 将文件中的sql语句以;为单位读取到列表中 + * @param sqlFile / + * @return / + * @throws Exception e + */ + private static List readSqlList(File sqlFile) throws Exception { + List sqlList = Lists.newArrayList(); + StringBuilder sb = new StringBuilder(); + try (BufferedReader reader = new BufferedReader(new InputStreamReader( + new FileInputStream(sqlFile), StandardCharsets.UTF_8))) { + String tmp; + while ((tmp = reader.readLine()) != null) { + log.info("line:{}", tmp); + if (tmp.endsWith(";")) { + sb.append(tmp); + sqlList.add(sb.toString()); + sb.delete(0, sb.length()); + } else { + sb.append(tmp); + } + } + if (!"".endsWith(sb.toString().trim())) { + sqlList.add(sb.toString()); + } + } + + return sqlList; + } + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java new file mode 100644 index 0000000..2fc473d --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.websocket; + +/** + * @author ZhangHouYing + * @date 2019-08-10 9:56 + */ +public enum MsgType { + /** 连接 */ + CONNECT, + /** 关闭 */ + CLOSE, + /** 信息 */ + INFO, + /** 错误 */ + ERROR +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java new file mode 100644 index 0000000..ade33a2 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java @@ -0,0 +1,33 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.websocket; + +import lombok.Data; + +/** + * @author ZhangHouYing + * @date 2019-08-10 9:55 + */ +@Data +public class SocketMsg { + private String msg; + private MsgType msgType; + + public SocketMsg(String msg, MsgType msgType) { + this.msg = msg; + this.msgType = msgType; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java new file mode 100644 index 0000000..000a515 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java @@ -0,0 +1,134 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.mnt.websocket; + +import com.alibaba.fastjson.JSON; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; +import javax.websocket.*; +import javax.websocket.server.PathParam; +import javax.websocket.server.ServerEndpoint; +import java.io.IOException; +import java.util.Objects; +import java.util.concurrent.CopyOnWriteArraySet; +/** + * @author ZhangHouYing + * @date 2019-08-10 15:46 + */ +@ServerEndpoint("/webSocket/{sid}") +@Slf4j +@Component +public class WebSocketServer { + + /** + * concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。 + */ + private static final CopyOnWriteArraySet webSocketSet = new CopyOnWriteArraySet(); + + /** + * 与某个客户端的连接会话,需要通过它来给客户端发送数据 + */ + private Session session; + + /** + * 接收sid + */ + private String sid=""; + /** + * 连接建立成功调用的方法 + * */ + @OnOpen + public void onOpen(Session session,@PathParam("sid") String sid) { + this.session = session; + //如果存在就先删除一个,防止重复推送消息 + webSocketSet.removeIf(webSocket -> webSocket.sid.equals(sid)); + webSocketSet.add(this); + this.sid=sid; + } + + /** + * 连接关闭调用的方法 + */ + @OnClose + public void onClose() { + webSocketSet.remove(this); + } + + /** + * 收到客户端消息后调用的方法 + * @param message 客户端发送过来的消息*/ + @OnMessage + public void onMessage(String message, Session session) { + log.info("收到来"+sid+"的信息:"+message); + //群发消息 + for (WebSocketServer item : webSocketSet) { + try { + item.sendMessage(message); + } catch (IOException e) { + log.error(e.getMessage(),e); + } + } + } + + @OnError + public void onError(Session session, Throwable error) { + log.error("发生错误"); + error.printStackTrace(); + } + /** + * 实现服务器主动推送 + */ + private void sendMessage(String message) throws IOException { + this.session.getBasicRemote().sendText(message); + } + + + /** + * 群发自定义消息 + * */ + public static void sendInfo(SocketMsg socketMsg,@PathParam("sid") String sid) throws IOException { + String message = JSON.toJSONString(socketMsg); + log.info("推送消息到"+sid+",推送内容:"+message); + for (WebSocketServer item : webSocketSet) { + try { + //这里可以设定只推送给这个sid的,为null则全部推送 + if(sid==null) { + item.sendMessage(message); + }else if(item.sid.equals(sid)){ + item.sendMessage(message); + } + } catch (IOException ignored) { } + } + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WebSocketServer that = (WebSocketServer) o; + return Objects.equals(session, that.session) && + Objects.equals(sid, that.sid); + } + + @Override + public int hashCode() { + return Objects.hash(session, sid); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/JobRunner.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/JobRunner.java new file mode 100644 index 0000000..e899ff7 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/JobRunner.java @@ -0,0 +1,51 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.config; + +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.quartz.domain.QuartzJob; +import me.zhengjie.modules.quartz.mapper.QuartzJobMapper; +import me.zhengjie.modules.quartz.utils.QuartzManage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.stereotype.Component; +import java.util.List; + +/** + * @author Zheng Jie + * @date 2019-01-07 + */ +@Component +@RequiredArgsConstructor +public class JobRunner implements ApplicationRunner { + private static final Logger log = LoggerFactory.getLogger(JobRunner.class); + private final QuartzJobMapper quartzJobMapper; + private final QuartzManage quartzManage; + + /** + * 项目启动时重新激活启用的定时任务 + * + * @param applicationArguments / + */ + @Override + public void run(ApplicationArguments applicationArguments) { + List quartzJobs = quartzJobMapper.findByIsPauseIsFalse(); + quartzJobs.forEach(quartzManage::addJob); + log.info("Timing task injection complete"); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/QuartzConfig.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/QuartzConfig.java new file mode 100644 index 0000000..d542a36 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/QuartzConfig.java @@ -0,0 +1,66 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.config; + +import lombok.extern.slf4j.Slf4j; +import org.quartz.spi.TriggerFiredBundle; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.AutowireCapableBeanFactory; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Scope; +import org.springframework.lang.NonNull; +import org.springframework.scheduling.quartz.AdaptableJobFactory; +import org.springframework.stereotype.Component; + +/** + * 定时任务配置 + * @author / + * @date 2019-01-07 + */ +@Slf4j +@Configuration +@Scope("singleton") +public class QuartzConfig { + + /** + * 解决Job中注入Spring Bean为null的问题 + */ + @Component("quartzJobFactory") + public static class QuartzJobFactory extends AdaptableJobFactory { + + private final AutowireCapableBeanFactory capableBeanFactory; + + @Autowired + public QuartzJobFactory(AutowireCapableBeanFactory capableBeanFactory) { + this.capableBeanFactory = capableBeanFactory; + } + + @NonNull + @Override + protected Object createJobInstance(@NonNull TriggerFiredBundle bundle) throws Exception { + try { + // 调用父类的方法,把Job注入到spring中 + Object jobInstance = super.createJobInstance(bundle); + capableBeanFactory.autowireBean(jobInstance); + log.debug("Job instance created and autowired: {}", jobInstance.getClass().getName()); + return jobInstance; + } catch (Exception e) { + log.error("Error creating job instance for bundle: {}", bundle, e); + throw e; + } + } + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzJob.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzJob.java new file mode 100644 index 0000000..4bf8f68 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzJob.java @@ -0,0 +1,85 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.domain; + +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.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @author Zheng Jie + * @date 2019-01-07 + */ +@Getter +@Setter +@TableName("sys_quartz_job") +public class QuartzJob extends BaseEntity implements Serializable { + + public static final String JOB_KEY = "JOB_KEY"; + + @TableId(value = "job_id", type = IdType.AUTO) + @NotNull(groups = {Update.class}) + private Long id; + + @TableField(exist = false) + @ApiModelProperty(value = "用于子任务唯一标识", hidden = true) + private String uuid; + + @ApiModelProperty(value = "定时器名称") + private String jobName; + + @NotBlank + @ApiModelProperty(value = "Bean名称") + private String beanName; + + @NotBlank + @ApiModelProperty(value = "方法名称") + private String methodName; + + @ApiModelProperty(value = "参数") + private String params; + + @NotBlank + @ApiModelProperty(value = "cron表达式") + private String cronExpression; + + @ApiModelProperty(value = "状态,暂时或启动") + private Boolean isPause = false; + + @ApiModelProperty(value = "负责人") + private String personInCharge; + + @ApiModelProperty(value = "报警邮箱") + private String email; + + @ApiModelProperty(value = "子任务") + private String subTask; + + @ApiModelProperty(value = "失败后暂停") + private Boolean pauseAfterFailure; + + @NotBlank + @ApiModelProperty(value = "备注") + private String description; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzLog.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzLog.java new file mode 100644 index 0000000..ddae3ce --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzLog.java @@ -0,0 +1,63 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.domain; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * @author Zheng Jie + * @date 2019-01-07 + */ +@Data +@TableName("sys_quartz_log") +public class QuartzLog implements Serializable { + + @TableId(value = "log_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @ApiModelProperty(value = "任务名称", hidden = true) + private String jobName; + + @ApiModelProperty(value = "bean名称", hidden = true) + private String beanName; + + @ApiModelProperty(value = "方法名称", hidden = true) + private String methodName; + + @ApiModelProperty(value = "参数", hidden = true) + private String params; + + @ApiModelProperty(value = "cron表达式", hidden = true) + private String cronExpression; + + @ApiModelProperty(value = "状态", hidden = true) + private Boolean isSuccess; + + @ApiModelProperty(value = "异常详情", hidden = true) + private String exceptionDetail; + + @ApiModelProperty(value = "执行耗时", hidden = true) + private Long time; + + @TableField(fill = FieldFill.INSERT) + @ApiModelProperty(value = "创建时间", hidden = true) + private Timestamp createTime; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/vo/QuartzJobQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/vo/QuartzJobQueryCriteria.java new file mode 100644 index 0000000..140a06b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/vo/QuartzJobQueryCriteria.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** + * @author Zheng Jie + * @date 2019-6-4 10:33:02 + */ +@Data +public class QuartzJobQueryCriteria { + + private String jobName; + + private Boolean isSuccess; + + private List createTime; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java new file mode 100644 index 0000000..a83ffcc --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.quartz.domain.QuartzJob; +import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface QuartzJobMapper extends BaseMapper { + + IPage findAll(@Param("criteria") QuartzJobQueryCriteria criteria, Page page); + + List findAll(@Param("criteria") QuartzJobQueryCriteria criteria); + + List findByIsPauseIsFalse(); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java new file mode 100644 index 0000000..7665822 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.quartz.domain.QuartzLog; +import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-12 + **/ +@Mapper +public interface QuartzLogMapper extends BaseMapper { + + IPage findAll(@Param("criteria") QuartzJobQueryCriteria criteria, Page page); + + List findAll(@Param("criteria") QuartzJobQueryCriteria criteria); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/rest/QuartzJobController.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/rest/QuartzJobController.java new file mode 100644 index 0000000..50a209a --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/rest/QuartzJobController.java @@ -0,0 +1,141 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.annotation.Log; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.quartz.domain.QuartzJob; +import me.zhengjie.modules.quartz.domain.QuartzLog; +import me.zhengjie.modules.quartz.service.QuartzJobService; +import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.SpringContextHolder; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2019-01-07 + */ +@Slf4j +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/jobs") +@Api(tags = "系统:定时任务管理") +public class QuartzJobController { + + private static final String ENTITY_NAME = "quartzJob"; + private final QuartzJobService quartzJobService; + + @ApiOperation("查询定时任务") + @GetMapping + @PreAuthorize("@el.check('timing:list')") + public ResponseEntity> queryQuartzJob(QuartzJobQueryCriteria criteria, Page page){ + return new ResponseEntity<>(quartzJobService.queryAll(criteria,page), HttpStatus.OK); + } + + @ApiOperation("导出任务数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('timing:list')") + public void exportQuartzJob(HttpServletResponse response, QuartzJobQueryCriteria criteria) throws IOException { + quartzJobService.download(quartzJobService.queryAll(criteria), response); + } + + @ApiOperation("导出日志数据") + @GetMapping(value = "/logs/download") + @PreAuthorize("@el.check('timing:list')") + public void exportQuartzJobLog(HttpServletResponse response, QuartzJobQueryCriteria criteria) throws IOException { + quartzJobService.downloadLog(quartzJobService.queryAllLog(criteria), response); + } + + @ApiOperation("查询任务执行日志") + @GetMapping(value = "/logs") + @PreAuthorize("@el.check('timing:list')") + public ResponseEntity> queryQuartzJobLog(QuartzJobQueryCriteria criteria, Page page){ + return new ResponseEntity<>(quartzJobService.queryAllLog(criteria,page), HttpStatus.OK); + } + + @Log("新增定时任务") + @ApiOperation("新增定时任务") + @PostMapping + @PreAuthorize("@el.check('timing:add')") + public ResponseEntity createQuartzJob(@Validated @RequestBody QuartzJob resources){ + if (resources.getId() != null) { + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); + } + // 验证Bean是不是合法的,合法的定时任务 Bean 需要用 @Service 定义 + checkBean(resources.getBeanName()); + quartzJobService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改定时任务") + @ApiOperation("修改定时任务") + @PutMapping + @PreAuthorize("@el.check('timing:edit')") + public ResponseEntity updateQuartzJob(@Validated(QuartzJob.Update.class) @RequestBody QuartzJob resources){ + // 验证Bean是不是合法的,合法的定时任务 Bean 需要用 @Service 定义 + checkBean(resources.getBeanName()); + quartzJobService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("更改定时任务状态") + @ApiOperation("更改定时任务状态") + @PutMapping(value = "/{id}") + @PreAuthorize("@el.check('timing:edit')") + public ResponseEntity updateQuartzJobStatus(@PathVariable Long id){ + quartzJobService.updateIsPause(quartzJobService.getById(id)); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("执行定时任务") + @ApiOperation("执行定时任务") + @PutMapping(value = "/exec/{id}") + @PreAuthorize("@el.check('timing:edit')") + public ResponseEntity executionQuartzJob(@PathVariable Long id){ + quartzJobService.execution(quartzJobService.getById(id)); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除定时任务") + @ApiOperation("删除定时任务") + @DeleteMapping + @PreAuthorize("@el.check('timing:del')") + public ResponseEntity deleteQuartzJob(@RequestBody Set ids){ + quartzJobService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + private void checkBean(String beanName){ + // 避免调用攻击者可以从SpringContextHolder获得控制jdbcTemplate类 + // 并使用getDeclaredMethod调用jdbcTemplate的queryForMap函数,执行任意sql命令。 + if(!SpringContextHolder.getAllServiceBeanName().contains(beanName)){ + throw new BadRequestException("非法的 Bean,请重新输入!"); + } + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/QuartzJobService.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/QuartzJobService.java new file mode 100644 index 0000000..f3516d2 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/QuartzJobService.java @@ -0,0 +1,120 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.quartz.domain.QuartzJob; +import me.zhengjie.modules.quartz.domain.QuartzLog; +import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2019-01-07 + */ +public interface QuartzJobService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(QuartzJobQueryCriteria criteria, Page page); + + /** + * 查询全部 + * @param criteria 条件 + * @return / + */ + List queryAll(QuartzJobQueryCriteria criteria); + + /** + * 分页查询日志 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAllLog(QuartzJobQueryCriteria criteria, Page page); + + /** + * 查询全部 + * @param criteria 条件 + * @return / + */ + List queryAllLog(QuartzJobQueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(QuartzJob resources); + + /** + * 编辑 + * @param resources / + */ + void update(QuartzJob resources); + + /** + * 删除任务 + * @param ids / + */ + void delete(Set ids); + + /** + * 更改定时任务状态 + * @param quartzJob / + */ + void updateIsPause(QuartzJob quartzJob); + + /** + * 立即执行定时任务 + * @param quartzJob / + */ + void execution(QuartzJob quartzJob); + + /** + * 导出定时任务 + * @param queryAll 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List queryAll, HttpServletResponse response) throws IOException; + + /** + * 导出定时任务日志 + * @param queryAllLog 待导出的数据 + * @param response / + * @throws IOException / + */ + void downloadLog(List queryAllLog, HttpServletResponse response) throws IOException; + + /** + * 执行子任务 + * @param tasks / + * @throws InterruptedException / + */ + void executionSubJob(String[] tasks) throws InterruptedException; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java new file mode 100644 index 0000000..8d011a4 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java @@ -0,0 +1,192 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.service.impl; + +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.quartz.domain.QuartzJob; +import me.zhengjie.modules.quartz.domain.QuartzLog; +import me.zhengjie.modules.quartz.mapper.QuartzJobMapper; +import me.zhengjie.modules.quartz.mapper.QuartzLogMapper; +import me.zhengjie.modules.quartz.service.QuartzJobService; +import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; +import me.zhengjie.modules.quartz.utils.QuartzManage; +import me.zhengjie.utils.*; +import org.quartz.CronExpression; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** + * @author Zheng Jie + * @date 2019-01-07 + */ +@RequiredArgsConstructor +@Service(value = "quartzJobService") +public class QuartzJobServiceImpl extends ServiceImpl implements QuartzJobService { + + private final QuartzJobMapper quartzJobMapper; + private final QuartzLogMapper quartzLogMapper; + private final QuartzManage quartzManage; + private final RedisUtils redisUtils; + + @Override + public PageResult queryAll(QuartzJobQueryCriteria criteria, Page page){ + return PageUtil.toPage(quartzJobMapper.findAll(criteria, page)); + } + + @Override + public PageResult queryAllLog(QuartzJobQueryCriteria criteria, Page page){ + return PageUtil.toPage(quartzLogMapper.findAll(criteria, page)); + } + + @Override + public List queryAll(QuartzJobQueryCriteria criteria) { + return quartzJobMapper.findAll(criteria); + } + + @Override + public List queryAllLog(QuartzJobQueryCriteria criteria) { + return quartzLogMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(QuartzJob resources) { + if (!CronExpression.isValidExpression(resources.getCronExpression())){ + throw new BadRequestException("cron表达式格式错误"); + } + save(resources); + quartzManage.addJob(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(QuartzJob resources) { + if (!CronExpression.isValidExpression(resources.getCronExpression())){ + throw new BadRequestException("cron表达式格式错误"); + } + if(StringUtils.isNotBlank(resources.getSubTask())){ + List tasks = Arrays.asList(resources.getSubTask().split("[,,]")); + if (tasks.contains(resources.getId().toString())) { + throw new BadRequestException("子任务中不能添加当前任务ID"); + } + } + saveOrUpdate(resources); + quartzManage.updateJobCron(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateIsPause(QuartzJob quartzJob) { + if (quartzJob.getIsPause()) { + quartzManage.resumeJob(quartzJob); + quartzJob.setIsPause(false); + } else { + quartzManage.pauseJob(quartzJob); + quartzJob.setIsPause(true); + } + saveOrUpdate(quartzJob); + } + + @Override + public void execution(QuartzJob quartzJob) { + quartzManage.runJobNow(quartzJob); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + for (Long id : ids) { + QuartzJob quartzJob = getById(id); + quartzManage.deleteJob(quartzJob); + removeById(quartzJob); + } + } + + @Async + @Override + @Transactional(rollbackFor = Exception.class) + public void executionSubJob(String[] tasks) throws InterruptedException { + for (String id : tasks) { + if (StrUtil.isBlank(id)) { + // 如果是手动清除子任务id,会出现id为空字符串的问题 + continue; + } + QuartzJob quartzJob = getById(Long.parseLong(id)); + // 执行任务 + String uuid = IdUtil.simpleUUID(); + quartzJob.setUuid(uuid); + // 执行任务 + execution(quartzJob); + // 获取执行状态,如果执行失败则停止后面的子任务执行 + Boolean result = (Boolean) redisUtils.get(uuid); + while (result == null) { + // 休眠5秒,再次获取子任务执行情况 + Thread.sleep(5000); + result = (Boolean) redisUtils.get(uuid); + } + if(!result){ + redisUtils.del(uuid); + break; + } + } + } + + @Override + public void download(List quartzJobs, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (QuartzJob quartzJob : quartzJobs) { + Map map = new LinkedHashMap<>(); + map.put("任务名称", quartzJob.getJobName()); + map.put("Bean名称", quartzJob.getBeanName()); + map.put("执行方法", quartzJob.getMethodName()); + map.put("参数", quartzJob.getParams()); + map.put("表达式", quartzJob.getCronExpression()); + map.put("状态", quartzJob.getIsPause() ? "暂停中" : "运行中"); + map.put("描述", quartzJob.getDescription()); + map.put("创建日期", quartzJob.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public void downloadLog(List queryAllLog, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (QuartzLog quartzLog : queryAllLog) { + Map map = new LinkedHashMap<>(); + map.put("任务名称", quartzLog.getJobName()); + map.put("Bean名称", quartzLog.getBeanName()); + map.put("执行方法", quartzLog.getMethodName()); + map.put("参数", quartzLog.getParams()); + map.put("表达式", quartzLog.getCronExpression()); + map.put("异常详情", quartzLog.getExceptionDetail()); + map.put("耗时/毫秒", quartzLog.getTime()); + map.put("状态", quartzLog.getIsSuccess() ? "成功" : "失败"); + map.put("创建日期", quartzLog.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/TestTask.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/TestTask.java new file mode 100644 index 0000000..63177ad --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/TestTask.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.task; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * 测试用 + * @author Zheng Jie + * @date 2019-01-08 + */ +@Slf4j +@Service +public class TestTask { + + public void run(){ + log.info("run 执行成功"); + } + + public void run1(String str){ + log.info("run1 执行成功,参数为: {}", str); + } + + public void run2(){ + log.info("run2 执行成功"); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/ExecutionJob.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/ExecutionJob.java new file mode 100644 index 0000000..95bc0bd --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/ExecutionJob.java @@ -0,0 +1,133 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.utils; + +import cn.hutool.extra.template.Template; +import cn.hutool.extra.template.TemplateConfig; +import cn.hutool.extra.template.TemplateEngine; +import cn.hutool.extra.template.TemplateUtil; +import me.zhengjie.domain.vo.EmailVo; +import me.zhengjie.modules.quartz.domain.QuartzJob; +import me.zhengjie.modules.quartz.domain.QuartzLog; +import me.zhengjie.modules.quartz.mapper.QuartzLogMapper; +import me.zhengjie.modules.quartz.service.QuartzJobService; +import me.zhengjie.service.EmailService; +import me.zhengjie.utils.RedisUtils; +import me.zhengjie.utils.SpringContextHolder; +import me.zhengjie.utils.StringUtils; +import me.zhengjie.utils.ThrowableUtil; +import org.quartz.JobExecutionContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.Async; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import org.springframework.scheduling.quartz.QuartzJobBean; +import java.util.*; +import java.util.concurrent.*; + +/** + * 参考人人开源,... + * @author / + * @date 2019-01-07 + */ +@Async +public class ExecutionJob extends QuartzJobBean { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + // 此处仅供参考,可根据任务执行情况自定义线程池参数 + private final ThreadPoolTaskExecutor executor = SpringContextHolder.getBean("elAsync"); + + @Override + public void executeInternal(JobExecutionContext context) { + // 获取任务 + QuartzJob quartzJob = (QuartzJob) context.getMergedJobDataMap().get(QuartzJob.JOB_KEY); + // 获取spring bean + QuartzLogMapper quartzLogMapper = SpringContextHolder.getBean(QuartzLogMapper.class); + QuartzJobService quartzJobService = SpringContextHolder.getBean(QuartzJobService.class); + RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class); + + String uuid = quartzJob.getUuid(); + + QuartzLog log = new QuartzLog(); + log.setJobName(quartzJob.getJobName()); + log.setBeanName(quartzJob.getBeanName()); + log.setMethodName(quartzJob.getMethodName()); + log.setParams(quartzJob.getParams()); + long startTime = System.currentTimeMillis(); + log.setCronExpression(quartzJob.getCronExpression()); + try { + // 执行任务 + QuartzRunnable task = new QuartzRunnable(quartzJob.getBeanName(), quartzJob.getMethodName(), quartzJob.getParams()); + Future future = executor.submit(task); + future.get(); + long times = System.currentTimeMillis() - startTime; + log.setTime(times); + if(StringUtils.isNotBlank(uuid)) { + redisUtils.set(uuid, true); + } + // 任务状态 + log.setIsSuccess(true); + logger.info("任务执行成功,任务名称:" + quartzJob.getJobName() + ", 执行时间:" + times + "毫秒"); + // 判断是否存在子任务 + if(StringUtils.isNotBlank(quartzJob.getSubTask())){ + String[] tasks = quartzJob.getSubTask().split("[,,]"); + // 执行子任务 + quartzJobService.executionSubJob(tasks); + } + } catch (Exception e) { + if(StringUtils.isNotBlank(uuid)) { + redisUtils.set(uuid, false); + } + logger.error("任务执行失败,任务名称:" + quartzJob.getJobName()); + long times = System.currentTimeMillis() - startTime; + log.setTime(times); + // 任务状态 0:成功 1:失败 + log.setIsSuccess(false); + log.setExceptionDetail(ThrowableUtil.getStackTrace(e)); + // 任务如果失败了则暂停 + if(quartzJob.getPauseAfterFailure() != null && quartzJob.getPauseAfterFailure()){ + quartzJob.setIsPause(false); + //更新状态 + quartzJobService.updateIsPause(quartzJob); + } + if(quartzJob.getEmail() != null){ + EmailService emailService = SpringContextHolder.getBean(EmailService.class); + // 邮箱报警 + if(StringUtils.isNoneBlank(quartzJob.getEmail())){ + EmailVo emailVo = taskAlarm(quartzJob, ThrowableUtil.getStackTrace(e)); + emailService.send(emailVo, emailService.find()); + } + } + } finally { + quartzLogMapper.insert(log); + } + } + + private EmailVo taskAlarm(QuartzJob quartzJob, String msg) { + EmailVo emailVo = new EmailVo(); + emailVo.setSubject("定时任务【"+ quartzJob.getJobName() +"】执行失败,请尽快处理!"); + Map data = new HashMap<>(16); + data.put("task", quartzJob); + data.put("msg", msg); + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + Template template = engine.getTemplate("taskAlarm.ftl"); + emailVo.setContent(template.render(data)); + List emails = Arrays.asList(quartzJob.getEmail().split("[,,]")); + emailVo.setTos(emails); + return emailVo; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzManage.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzManage.java new file mode 100644 index 0000000..4dbac76 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzManage.java @@ -0,0 +1,177 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.utils; + +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.quartz.domain.QuartzJob; +import org.quartz.*; +import org.quartz.impl.triggers.CronTriggerImpl; +import org.springframework.stereotype.Component; +import javax.annotation.Resource; +import java.util.Date; +import static org.quartz.TriggerBuilder.newTrigger; + +/** + * @author Zheng Jie + * @date 2019-01-07 + */ +@Slf4j +@Component +public class QuartzManage { + + private static final String JOB_NAME = "TASK_"; + + @Resource + private Scheduler scheduler; + + public void addJob(QuartzJob quartzJob){ + try { + // 构建job信息 + JobDetail jobDetail = JobBuilder.newJob(ExecutionJob.class). + withIdentity(JOB_NAME + quartzJob.getId()).build(); + + //通过触发器名和cron 表达式创建 Trigger + Trigger cronTrigger = newTrigger() + .withIdentity(JOB_NAME + quartzJob.getId()) + .startNow() + .withSchedule(CronScheduleBuilder.cronSchedule(quartzJob.getCronExpression())) + .build(); + + cronTrigger.getJobDataMap().put(QuartzJob.JOB_KEY, quartzJob); + + //重置启动时间 + ((CronTriggerImpl)cronTrigger).setStartTime(new Date()); + + //执行定时任务,如果是持久化的,这里会报错,捕获输出 + try { + scheduler.scheduleJob(jobDetail,cronTrigger); + } catch (ObjectAlreadyExistsException e) { + log.warn("定时任务已存在,跳过加载"); + } + + // 暂停任务 + if (quartzJob.getIsPause()) { + pauseJob(quartzJob); + } + } catch (Exception e){ + log.error("创建定时任务失败", e); + throw new BadRequestException("创建定时任务失败"); + } + } + + /** + * 更新job cron表达式 + * @param quartzJob / + */ + public void updateJobCron(QuartzJob quartzJob){ + try { + TriggerKey triggerKey = TriggerKey.triggerKey(JOB_NAME + quartzJob.getId()); + CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); + // 如果不存在则创建一个定时任务 + if(trigger == null){ + addJob(quartzJob); + trigger = (CronTrigger) scheduler.getTrigger(triggerKey); + } + CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(quartzJob.getCronExpression()); + trigger = trigger.getTriggerBuilder().withIdentity(triggerKey).withSchedule(scheduleBuilder).build(); + //重置启动时间 + ((CronTriggerImpl)trigger).setStartTime(new Date()); + trigger.getJobDataMap().put(QuartzJob.JOB_KEY,quartzJob); + + scheduler.rescheduleJob(triggerKey, trigger); + // 暂停任务 + if (quartzJob.getIsPause()) { + pauseJob(quartzJob); + } + } catch (Exception e){ + log.error("更新定时任务失败", e); + throw new BadRequestException("更新定时任务失败"); + } + + } + + /** + * 删除一个job + * @param quartzJob / + */ + public void deleteJob(QuartzJob quartzJob){ + try { + JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); + scheduler.pauseJob(jobKey); + scheduler.deleteJob(jobKey); + } catch (Exception e){ + log.error("删除定时任务失败", e); + throw new BadRequestException("删除定时任务失败"); + } + } + + /** + * 恢复一个job + * @param quartzJob / + */ + public void resumeJob(QuartzJob quartzJob){ + try { + TriggerKey triggerKey = TriggerKey.triggerKey(JOB_NAME + quartzJob.getId()); + CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); + // 如果不存在则创建一个定时任务 + if(trigger == null) { + addJob(quartzJob); + } + JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); + scheduler.resumeJob(jobKey); + } catch (Exception e){ + log.error("恢复定时任务失败", e); + throw new BadRequestException("恢复定时任务失败"); + } + } + + /** + * 立即执行job + * @param quartzJob / + */ + public void runJobNow(QuartzJob quartzJob){ + try { + TriggerKey triggerKey = TriggerKey.triggerKey(JOB_NAME + quartzJob.getId()); + CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); + // 如果不存在则创建一个定时任务 + if(trigger == null) { + addJob(quartzJob); + } + JobDataMap dataMap = new JobDataMap(); + dataMap.put(QuartzJob.JOB_KEY, quartzJob); + JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); + scheduler.triggerJob(jobKey,dataMap); + } catch (Exception e){ + log.error("定时任务执行失败", e); + throw new BadRequestException("定时任务执行失败"); + } + } + + /** + * 暂停一个job + * @param quartzJob / + */ + public void pauseJob(QuartzJob quartzJob){ + try { + JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); + scheduler.pauseJob(jobKey); + } catch (Exception e){ + log.error("定时任务暂停失败", e); + throw new BadRequestException("定时任务暂停失败"); + } + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzRunnable.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzRunnable.java new file mode 100644 index 0000000..31c3a0f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzRunnable.java @@ -0,0 +1,58 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.quartz.utils; + +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.utils.SpringContextHolder; +import org.apache.commons.lang3.StringUtils; +import org.springframework.util.ReflectionUtils; +import java.lang.reflect.Method; +import java.util.concurrent.Callable; + +/** + * 执行定时任务 + * @author / + */ +@Slf4j +public class QuartzRunnable implements Callable { + + private final Object target; + private final Method method; + private final String params; + + QuartzRunnable(String beanName, String methodName, String params) + throws NoSuchMethodException, SecurityException { + this.target = SpringContextHolder.getBean(beanName); + this.params = params; + if (StringUtils.isNotBlank(params)) { + this.method = target.getClass().getDeclaredMethod(methodName, String.class); + } else { + this.method = target.getClass().getDeclaredMethod(methodName); + } + } + + @Override + @SuppressWarnings("all") + public Object call() throws Exception { + ReflectionUtils.makeAccessible(method); + if (StringUtils.isNotBlank(params)) { + method.invoke(target, params); + } else { + method.invoke(target); + } + return null; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/config/ConfigBeanConfiguration.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/ConfigBeanConfiguration.java new file mode 100644 index 0000000..8cbc88d --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/ConfigBeanConfiguration.java @@ -0,0 +1,43 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.config; + +import me.zhengjie.modules.security.config.bean.LoginProperties; +import me.zhengjie.modules.security.config.bean.SecurityProperties; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @apiNote 配置文件转换Pojo类的 统一配置 类 + * @author: liaojinlong + * @date: 2020/6/10 19:04 + */ +@Configuration +public class ConfigBeanConfiguration { + + @Bean + @ConfigurationProperties(prefix = "login") + public LoginProperties loginProperties() { + return new LoginProperties(); + } + + @Bean + @ConfigurationProperties(prefix = "jwt") + public SecurityProperties securityProperties() { + return new SecurityProperties(); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/config/SpringSecurityConfig.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/SpringSecurityConfig.java new file mode 100644 index 0000000..ad886f3 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/SpringSecurityConfig.java @@ -0,0 +1,188 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.config; + +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.AnonymousAccess; +import me.zhengjie.modules.security.config.bean.SecurityProperties; +import me.zhengjie.modules.security.security.*; +import me.zhengjie.modules.security.service.OnlineUserService; +import me.zhengjie.modules.security.service.UserCacheManager; +import me.zhengjie.utils.enums.RequestMethodEnum; +import org.springframework.context.ApplicationContext; +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.core.GrantedAuthorityDefaults; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.filter.CorsFilter; +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.mvc.method.RequestMappingInfo; +import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; +import java.util.*; + +/** + * @author Zheng Jie + */ +@Configuration +@EnableWebSecurity +@RequiredArgsConstructor +@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) +public class SpringSecurityConfig extends WebSecurityConfigurerAdapter { + + private final TokenProvider tokenProvider; + private final CorsFilter corsFilter; + private final JwtAuthenticationEntryPoint authenticationErrorHandler; + private final JwtAccessDeniedHandler jwtAccessDeniedHandler; + private final ApplicationContext applicationContext; + private final SecurityProperties properties; + private final OnlineUserService onlineUserService; + private final UserCacheManager userCacheManager; + + @Bean + GrantedAuthorityDefaults grantedAuthorityDefaults() { + // 去除 ROLE_ 前缀 + return new GrantedAuthorityDefaults(""); + } + + @Bean + public PasswordEncoder passwordEncoder() { + // 密码加密方式 + return new BCryptPasswordEncoder(); + } + + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception { + // 搜寻匿名标记 url: @AnonymousAccess + RequestMappingHandlerMapping requestMappingHandlerMapping = (RequestMappingHandlerMapping) applicationContext.getBean("requestMappingHandlerMapping"); + Map handlerMethodMap = requestMappingHandlerMapping.getHandlerMethods(); + // 获取匿名标记 + Map> anonymousUrls = getAnonymousUrl(handlerMethodMap); + httpSecurity + // 禁用 CSRF + .csrf().disable() + .addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class) + // 授权异常 + .exceptionHandling() + .authenticationEntryPoint(authenticationErrorHandler) + .accessDeniedHandler(jwtAccessDeniedHandler) + // 防止iframe 造成跨域 + .and() + .headers() + .frameOptions() + .disable() + // 不创建会话 + .and() + .sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.STATELESS) + .and() + .authorizeRequests() + // 静态资源等等 + .antMatchers( + HttpMethod.GET, + "/*.html", + "/**/*.html", + "/**/*.css", + "/**/*.js", + "/webSocket/**" + ).permitAll() + // swagger 文档 + .antMatchers("/swagger-ui.html").permitAll() + .antMatchers("/swagger-resources/**").permitAll() + .antMatchers("/webjars/**").permitAll() + .antMatchers("/*/api-docs").permitAll() + // 文件 + .antMatchers("/avatar/**").permitAll() + .antMatchers("/file/**").permitAll() + // 阿里巴巴 druid + .antMatchers("/druid/**").permitAll() + // 放行OPTIONS请求 + .antMatchers(HttpMethod.OPTIONS, "/**").permitAll() + // 自定义匿名访问所有url放行:允许匿名和带Token访问,细腻化到每个 Request 类型 + // GET + .antMatchers(HttpMethod.GET, anonymousUrls.get(RequestMethodEnum.GET.getType()).toArray(new String[0])).permitAll() + // POST + .antMatchers(HttpMethod.POST, anonymousUrls.get(RequestMethodEnum.POST.getType()).toArray(new String[0])).permitAll() + // PUT + .antMatchers(HttpMethod.PUT, anonymousUrls.get(RequestMethodEnum.PUT.getType()).toArray(new String[0])).permitAll() + // PATCH + .antMatchers(HttpMethod.PATCH, anonymousUrls.get(RequestMethodEnum.PATCH.getType()).toArray(new String[0])).permitAll() + // DELETE + .antMatchers(HttpMethod.DELETE, anonymousUrls.get(RequestMethodEnum.DELETE.getType()).toArray(new String[0])).permitAll() + // 所有类型的接口都放行 + .antMatchers(anonymousUrls.get(RequestMethodEnum.ALL.getType()).toArray(new String[0])).permitAll() + // 所有请求都需要认证 + .anyRequest().authenticated() + .and().apply(securityConfigurerAdapter()); + } + + private TokenConfigurer securityConfigurerAdapter() { + return new TokenConfigurer(tokenProvider, properties, onlineUserService, userCacheManager); + } + + private Map> getAnonymousUrl(Map handlerMethodMap) { + Map> anonymousUrls = new HashMap<>(8); + Set get = new HashSet<>(); + Set post = new HashSet<>(); + Set put = new HashSet<>(); + Set patch = new HashSet<>(); + Set delete = new HashSet<>(); + Set all = new HashSet<>(); + for (Map.Entry infoEntry : handlerMethodMap.entrySet()) { + HandlerMethod handlerMethod = infoEntry.getValue(); + AnonymousAccess anonymousAccess = handlerMethod.getMethodAnnotation(AnonymousAccess.class); + if (null != anonymousAccess) { + List requestMethods = new ArrayList<>(infoEntry.getKey().getMethodsCondition().getMethods()); + RequestMethodEnum request = RequestMethodEnum.find(requestMethods.size() == 0 ? RequestMethodEnum.ALL.getType() : requestMethods.get(0).name()); + switch (Objects.requireNonNull(request)) { + case GET: + get.addAll(infoEntry.getKey().getPatternsCondition().getPatterns()); + break; + case POST: + post.addAll(infoEntry.getKey().getPatternsCondition().getPatterns()); + break; + case PUT: + put.addAll(infoEntry.getKey().getPatternsCondition().getPatterns()); + break; + case PATCH: + patch.addAll(infoEntry.getKey().getPatternsCondition().getPatterns()); + break; + case DELETE: + delete.addAll(infoEntry.getKey().getPatternsCondition().getPatterns()); + break; + default: + all.addAll(infoEntry.getKey().getPatternsCondition().getPatterns()); + break; + } + } + } + anonymousUrls.put(RequestMethodEnum.GET.getType(), get); + anonymousUrls.put(RequestMethodEnum.POST.getType(), post); + anonymousUrls.put(RequestMethodEnum.PUT.getType(), put); + anonymousUrls.put(RequestMethodEnum.PATCH.getType(), patch); + anonymousUrls.put(RequestMethodEnum.DELETE.getType(), delete); + anonymousUrls.put(RequestMethodEnum.ALL.getType(), all); + return anonymousUrls; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCode.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCode.java new file mode 100644 index 0000000..fefd252 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCode.java @@ -0,0 +1,61 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.config.bean; + +import lombok.Data; + +/** + * 登录验证码配置信息 + * + * @author liaojinlong + * @date 2020/6/10 18:53 + */ +@Data +public class LoginCode { + + /** + * 验证码配置 + */ + private LoginCodeEnum codeType; + /** + * 验证码有效期 分钟 + */ + private Long expiration = 2L; + /** + * 验证码内容长度 + */ + private int length = 2; + /** + * 验证码宽度 + */ + private int width = 111; + /** + * 验证码高度 + */ + private int height = 36; + /** + * 验证码字体 + */ + private String fontName; + /** + * 字体大小 + */ + private int fontSize = 25; + + public LoginCodeEnum getCodeType() { + return codeType; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCodeEnum.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCodeEnum.java new file mode 100644 index 0000000..685ccbb --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginCodeEnum.java @@ -0,0 +1,43 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.config.bean; + +/** + * 验证码配置枚举 + * + * @author: liaojinlong + * @date: 2020/6/10 17:40 + */ + +public enum LoginCodeEnum { + /** + * 算数 + */ + ARITHMETIC, + /** + * 中文 + */ + CHINESE, + /** + * 中文闪图 + */ + CHINESE_GIF, + /** + * 闪图 + */ + GIF, + SPEC +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginProperties.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginProperties.java new file mode 100644 index 0000000..0201a13 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/LoginProperties.java @@ -0,0 +1,125 @@ +/* + * Copyright 2019-2020 the original author or authors. + * + * Licensed under the Apache License, Version loginCode.length.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-loginCode.length.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. + */ +package me.zhengjie.modules.security.config.bean; + +import com.wf.captcha.*; +import com.wf.captcha.base.Captcha; +import lombok.Data; +import me.zhengjie.exception.BadConfigurationException; +import me.zhengjie.utils.StringUtils; +import java.awt.*; +import java.util.Objects; + +/** + * 配置文件读取 + * + * @author liaojinlong + * @date loginCode.length0loginCode.length0/6/10 17:loginCode.length6 + */ +@Data +public class LoginProperties { + + /** + * 账号单用户 登录 + */ + private boolean singleLogin = false; + + private LoginCode loginCode; + + public static final String cacheKey = "user-login-cache:"; + + public boolean isSingleLogin() { + return singleLogin; + } + + /** + * 获取验证码生产类 + * + * @return / + */ + public Captcha getCaptcha() { + if (Objects.isNull(loginCode)) { + loginCode = new LoginCode(); + if (Objects.isNull(loginCode.getCodeType())) { + loginCode.setCodeType(LoginCodeEnum.ARITHMETIC); + } + } + return switchCaptcha(loginCode); + } + + /** + * 依据配置信息生产验证码 + * + * @param loginCode 验证码配置信息 + * @return / + */ + private Captcha switchCaptcha(LoginCode loginCode) { + Captcha captcha; + switch (loginCode.getCodeType()) { + case ARITHMETIC: + // 算术类型 https://gitee.com/whvse/EasyCaptcha + captcha = new FixedArithmeticCaptcha(loginCode.getWidth(), loginCode.getHeight()); + // 几位数运算,默认是两位 + captcha.setLen(loginCode.getLength()); + break; + case CHINESE: + captcha = new ChineseCaptcha(loginCode.getWidth(), loginCode.getHeight()); + captcha.setLen(loginCode.getLength()); + break; + case CHINESE_GIF: + captcha = new ChineseGifCaptcha(loginCode.getWidth(), loginCode.getHeight()); + captcha.setLen(loginCode.getLength()); + break; + case GIF: + captcha = new GifCaptcha(loginCode.getWidth(), loginCode.getHeight()); + captcha.setLen(loginCode.getLength()); + break; + case SPEC: + captcha = new SpecCaptcha(loginCode.getWidth(), loginCode.getHeight()); + captcha.setLen(loginCode.getLength()); + break; + default: + throw new BadConfigurationException("验证码配置信息错误!正确配置查看 LoginCodeEnum "); + } + if(StringUtils.isNotBlank(loginCode.getFontName())){ + captcha.setFont(new Font(loginCode.getFontName(), Font.PLAIN, loginCode.getFontSize())); + } + return captcha; + } + + static class FixedArithmeticCaptcha extends ArithmeticCaptcha { + public FixedArithmeticCaptcha(int width, int height) { + super(width, height); + } + + @Override + protected char[] alphas() { + // 生成随机数字和运算符 + int n1 = num(1, 10), n2 = num(1, 10); + int opt = num(3); + + // 计算结果 + int res = new int[]{n1 + n2, n1 - n2, n1 * n2}[opt]; + // 转换为字符运算符 + char optChar = "+-x".charAt(opt); + + this.setArithmeticString(String.format("%s%c%s=?", n1, optChar, n2)); + this.chars = String.valueOf(res); + + return chars.toCharArray(); + } + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/SecurityProperties.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/SecurityProperties.java new file mode 100644 index 0000000..16ec3cf --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/config/bean/SecurityProperties.java @@ -0,0 +1,72 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.config.bean; + +import lombok.Data; + +/** + * Jwt参数配置 + * + * @author Zheng Jie + * @date 2019年11月28日 + */ +@Data +public class SecurityProperties { + + /** + * Request Headers : Authorization + */ + private String header; + + /** + * 令牌前缀,最后留个空格 Bearer + */ + private String tokenStartWith; + + /** + * 必须使用最少88位的Base64对该令牌进行编码 + */ + private String base64Secret; + + /** + * 令牌过期时间 此处单位/毫秒 + */ + private Long tokenValidityInSeconds; + + /** + * 在线用户 key,根据 key 查询 redis 中在线用户的数据 + */ + private String onlineKey; + + /** + * 验证码 key + */ + private String codeKey; + + /** + * token 续期检查 + */ + private Long detect; + + /** + * 续期时间 + */ + private Long renew; + + public String getTokenStartWith() { + return tokenStartWith + " "; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/dto/TokenDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/dto/TokenDTO.java new file mode 100644 index 0000000..c696250 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/dto/TokenDTO.java @@ -0,0 +1,8 @@ +package me.zhengjie.modules.security.dto; + +import lombok.Data; + +@Data +public class TokenDTO { + private String token; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/rest/AuthorizationController.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/rest/AuthorizationController.java new file mode 100644 index 0000000..48c44ac --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/rest/AuthorizationController.java @@ -0,0 +1,158 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.rest; + +import cn.hutool.core.util.IdUtil; +import com.wf.captcha.base.Captcha; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.annotation.Log; +import me.zhengjie.annotation.rest.AnonymousDeleteMapping; +import me.zhengjie.annotation.rest.AnonymousGetMapping; +import me.zhengjie.annotation.rest.AnonymousPostMapping; +import me.zhengjie.config.RsaProperties; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.security.config.bean.LoginCodeEnum; +import me.zhengjie.modules.security.config.bean.LoginProperties; +import me.zhengjie.modules.security.config.bean.SecurityProperties; +import me.zhengjie.modules.security.dto.TokenDTO; +import me.zhengjie.modules.security.security.TokenProvider; +import me.zhengjie.modules.security.service.dto.AuthUserDto; +import me.zhengjie.modules.security.service.dto.JwtUserDto; +import me.zhengjie.modules.security.service.OnlineUserService; +import me.zhengjie.utils.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * @author Zheng Jie + * @date 2018-11-23 + * 授权、根据token获取用户详细信息 + */ +@Slf4j +@RestController +@RequestMapping("/auth") +@RequiredArgsConstructor +@Api(tags = "系统:系统授权接口") +public class AuthorizationController { + private final SecurityProperties properties; + private final RedisUtils redisUtils; + private final OnlineUserService onlineUserService; + private final TokenProvider tokenProvider; + private final AuthenticationManagerBuilder authenticationManagerBuilder; + @Resource + private LoginProperties loginProperties; + + @Log("用户登录") + @ApiOperation("登录授权") + @AnonymousPostMapping(value = "/login") + public ResponseEntity login(@Validated @RequestBody AuthUserDto authUser, HttpServletRequest request) throws Exception { + // 密码解密 + String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, authUser.getPassword()); + // 查询验证码 + String code = (String) redisUtils.get(authUser.getUuid()); + // 清除验证码 + redisUtils.del(authUser.getUuid()); + if (StringUtils.isBlank(code)) { + throw new BadRequestException("验证码不存在或已过期"); + } + if (StringUtils.isBlank(authUser.getCode()) || !authUser.getCode().equalsIgnoreCase(code)) { + throw new BadRequestException("验证码错误"); + } + UsernamePasswordAuthenticationToken authenticationToken = + new UsernamePasswordAuthenticationToken(authUser.getUsername(), password); + Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); + SecurityContextHolder.getContext().setAuthentication(authentication); + // 生成令牌与第三方系统获取令牌方式 + // UserDetails userDetails = userDetailsService.loadUserByUsername(userInfo.getUsername()); + // Authentication authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); + // SecurityContextHolder.getContext().setAuthentication(authentication); + String token = tokenProvider.createToken(authentication); + final JwtUserDto jwtUserDto = (JwtUserDto) authentication.getPrincipal(); + // 返回 token 与 用户信息 + Map authInfo = new HashMap(2) {{ + put("token", properties.getTokenStartWith() + token); + put("user", jwtUserDto); + }}; + if (loginProperties.isSingleLogin()) { + // 踢掉之前已经登录的token + onlineUserService.kickOutForUsername(authUser.getUsername()); + } + // 保存在线信息 + onlineUserService.save(jwtUserDto, token, request); + // 返回登录信息 + return ResponseEntity.ok(authInfo); + } + + @ApiOperation("获取用户信息") + @GetMapping(value = "/info") + public ResponseEntity getUserInfo() { + return ResponseEntity.ok(SecurityUtils.getCurrentUser()); + } + +// @ApiOperation("谷歌验证") +// @AnonymousPostMapping(value = "/validate") +// public ResponseEntity check( @RequestBody TokenDTO token){ +// String secret = "6LeXMkwqAAAAALaZ1kzAUmfR1-CHUAYn3gE2abfA"; +// String param = "secret="+secret+"&response=" +// + token.getToken(); +// String json = HttpSendUtil.instance().sendPost("https://www.recaptcha.net/recaptcha/api/siteverify", param, "UTF-8"); +// return new ResponseEntity<>(json,HttpStatus.OK); +// } + + @ApiOperation("获取验证码") + @AnonymousGetMapping(value = "/code") + public ResponseEntity getCode() { + // 获取运算的结果 + Captcha captcha = loginProperties.getCaptcha(); + String uuid = properties.getCodeKey() + IdUtil.simpleUUID(); + //当验证码类型为 arithmetic时且长度 >= 2 时,captcha.text()的结果有几率为浮点型 + String captchaValue = captcha.text(); + if (captcha.getCharType() - 1 == LoginCodeEnum.ARITHMETIC.ordinal() && captchaValue.contains(".")) { + captchaValue = captchaValue.split("\\.")[0]; + } + // 保存 + redisUtils.set(uuid, captchaValue, loginProperties.getLoginCode().getExpiration(), TimeUnit.MINUTES); + // 验证码信息 + Map imgResult = new HashMap(2) {{ + put("img", captcha.toBase64()); + put("uuid", uuid); + }}; + return ResponseEntity.ok(imgResult); + } + + @ApiOperation("退出登录") + @AnonymousDeleteMapping(value = "/logout") + public ResponseEntity logout(HttpServletRequest request) { + String token = tokenProvider.getToken(request); + onlineUserService.logout(token); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/rest/OnlineController.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/rest/OnlineController.java new file mode 100644 index 0000000..2e46859 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/rest/OnlineController.java @@ -0,0 +1,70 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.security.service.OnlineUserService; +import me.zhengjie.modules.security.service.dto.OnlineUserDto; +import me.zhengjie.utils.EncryptUtils; +import me.zhengjie.utils.PageResult; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Set; + +/** + * @author Zheng Jie + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/auth/online") +@Api(tags = "系统:在线用户管理") +public class OnlineController { + + private final OnlineUserService onlineUserService; + + @ApiOperation("查询在线用户") + @GetMapping + @PreAuthorize("@el.check()") + public ResponseEntity> queryOnlineUser(String username, Pageable pageable){ + return new ResponseEntity<>(onlineUserService.getAll(username, pageable),HttpStatus.OK); + } + + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check()") + public void exportOnlineUser(HttpServletResponse response, String username) throws IOException { + onlineUserService.download(onlineUserService.getAll(username), response); + } + + @ApiOperation("踢出用户") + @DeleteMapping + @PreAuthorize("@el.check()") + public ResponseEntity deleteOnlineUser(@RequestBody Set keys) throws Exception { + for (String token : keys) { + // 解密Key + token = EncryptUtils.desDecrypt(token); + onlineUserService.logout(token); + } + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAccessDeniedHandler.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAccessDeniedHandler.java new file mode 100644 index 0000000..8b3f8c1 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAccessDeniedHandler.java @@ -0,0 +1,37 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.security; + +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.web.access.AccessDeniedHandler; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * @author Zheng Jie + */ +@Component +public class JwtAccessDeniedHandler implements AccessDeniedHandler { + + @Override + public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException { + //当用户在没有授权的情况下访问受保护的REST资源时,将调用此方法发送403 Forbidden响应 + response.sendError(HttpServletResponse.SC_FORBIDDEN, accessDeniedException.getMessage()); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAuthenticationEntryPoint.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAuthenticationEntryPoint.java new file mode 100644 index 0000000..f881586 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAuthenticationEntryPoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.security; + +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * @author Zheng Jie + */ +@Component +public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { + + @Override + public void commence(HttpServletRequest request, + HttpServletResponse response, + AuthenticationException authException) throws IOException { + // 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应 + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException==null?"Unauthorized":authException.getMessage()); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenConfigurer.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenConfigurer.java new file mode 100644 index 0000000..cff5e1e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenConfigurer.java @@ -0,0 +1,43 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.security; + +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.security.config.bean.SecurityProperties; +import me.zhengjie.modules.security.service.OnlineUserService; +import me.zhengjie.modules.security.service.UserCacheManager; +import org.springframework.security.config.annotation.SecurityConfigurerAdapter; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.web.DefaultSecurityFilterChain; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; + +/** + * @author / + */ +@RequiredArgsConstructor +public class TokenConfigurer extends SecurityConfigurerAdapter { + + private final TokenProvider tokenProvider; + private final SecurityProperties properties; + private final OnlineUserService onlineUserService; + private final UserCacheManager userCacheManager; + + @Override + public void configure(HttpSecurity http) { + TokenFilter customFilter = new TokenFilter(tokenProvider, properties, onlineUserService, userCacheManager); + http.addFilterBefore(customFilter, UsernamePasswordAuthenticationFilter.class); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenFilter.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenFilter.java new file mode 100644 index 0000000..7cb8a03 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenFilter.java @@ -0,0 +1,109 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.security; + +import cn.hutool.core.util.StrUtil; +import io.jsonwebtoken.ExpiredJwtException; +import me.zhengjie.modules.security.config.bean.SecurityProperties; +import me.zhengjie.modules.security.service.UserCacheManager; +import me.zhengjie.modules.security.service.dto.OnlineUserDto; +import me.zhengjie.modules.security.service.OnlineUserService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.util.StringUtils; +import org.springframework.web.filter.GenericFilterBean; +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.util.Objects; + +/** + * @author / + */ +public class TokenFilter extends GenericFilterBean { + private static final Logger log = LoggerFactory.getLogger(TokenFilter.class); + + + private final TokenProvider tokenProvider; + private final SecurityProperties properties; + private final OnlineUserService onlineUserService; + private final UserCacheManager userCacheManager; + + /** + * @param tokenProvider Token + * @param properties JWT + * @param onlineUserService 用户在线 + * @param userCacheManager 用户缓存工具 + */ + public TokenFilter(TokenProvider tokenProvider, SecurityProperties properties, OnlineUserService onlineUserService, UserCacheManager userCacheManager) { + this.properties = properties; + this.onlineUserService = onlineUserService; + this.tokenProvider = tokenProvider; + this.userCacheManager = userCacheManager; + } + + @Override + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) + throws IOException, ServletException { + HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest; + String token = resolveToken(httpServletRequest); + // 对于 Token 为空的不需要去查 Redis + if (StrUtil.isNotBlank(token)) { + OnlineUserDto onlineUserDto = null; + boolean cleanUserCache = false; + try { + String loginKey = tokenProvider.loginKey(token); + onlineUserDto = onlineUserService.getOne(loginKey); + } catch (ExpiredJwtException e) { + log.error(e.getMessage()); + cleanUserCache = true; + } finally { + if (cleanUserCache || Objects.isNull(onlineUserDto)) { + userCacheManager.cleanUserCache(String.valueOf(tokenProvider.getClaims(token).get(TokenProvider.AUTHORITIES_KEY))); + } + } + if (onlineUserDto != null && StringUtils.hasText(token)) { + Authentication authentication = tokenProvider.getAuthentication(token); + SecurityContextHolder.getContext().setAuthentication(authentication); + // Token 续期 + tokenProvider.checkRenewal(token); + } + } + filterChain.doFilter(servletRequest, servletResponse); + } + + /** + * 初步检测Token + * + * @param request / + * @return / + */ + private String resolveToken(HttpServletRequest request) { + String bearerToken = request.getHeader(properties.getHeader()); + if (StringUtils.hasText(bearerToken) && bearerToken.startsWith(properties.getTokenStartWith())) { + // 去掉令牌前缀 + return bearerToken.replace(properties.getTokenStartWith(), ""); + } else { + log.debug("非法Token:{}", bearerToken); + } + return null; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java new file mode 100644 index 0000000..08121ed --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java @@ -0,0 +1,136 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.security; + +import cn.hutool.core.date.DateField; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.crypto.digest.DigestUtil; +import io.jsonwebtoken.*; +import io.jsonwebtoken.io.Decoders; +import io.jsonwebtoken.security.Keys; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.modules.security.config.bean.SecurityProperties; +import me.zhengjie.utils.RedisUtils; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.userdetails.User; +import org.springframework.stereotype.Component; +import javax.servlet.http.HttpServletRequest; +import java.security.Key; +import java.util.*; +import java.util.concurrent.TimeUnit; + +/** + * @author / + */ +@Slf4j +@Component +public class TokenProvider implements InitializingBean { + + private final SecurityProperties properties; + private final RedisUtils redisUtils; + public static final String AUTHORITIES_KEY = "user"; + private JwtParser jwtParser; + private JwtBuilder jwtBuilder; + + public TokenProvider(SecurityProperties properties, RedisUtils redisUtils) { + this.properties = properties; + this.redisUtils = redisUtils; + } + + @Override + public void afterPropertiesSet() { + byte[] keyBytes = Decoders.BASE64.decode(properties.getBase64Secret()); + Key key = Keys.hmacShaKeyFor(keyBytes); + jwtParser = Jwts.parserBuilder() + .setSigningKey(key) + .build(); + jwtBuilder = Jwts.builder() + .signWith(key, SignatureAlgorithm.HS512); + } + + /** + * 创建Token 设置永不过期, + * Token 的时间有效性转到Redis 维护 + * + * @param authentication / + * @return / + */ + public String createToken(Authentication authentication) { + return jwtBuilder + // 加入ID确保生成的 Token 都不一致 + .setId(IdUtil.simpleUUID()) + .claim(AUTHORITIES_KEY, authentication.getName()) + .setSubject(authentication.getName()) + .compact(); + } + + /** + * 依据Token 获取鉴权信息 + * + * @param token / + * @return / + */ + Authentication getAuthentication(String token) { + Claims claims = getClaims(token); + User principal = new User(claims.getSubject(), "******", new ArrayList<>()); + return new UsernamePasswordAuthenticationToken(principal, token, new ArrayList<>()); + } + + public Claims getClaims(String token) { + return jwtParser + .parseClaimsJws(token) + .getBody(); + } + + /** + * @param token 需要检查的token + */ + public void checkRenewal(String token) { + // 判断是否续期token,计算token的过期时间 + String loginKey = loginKey(token); + long time = redisUtils.getExpire(loginKey) * 1000; + Date expireDate = DateUtil.offset(new Date(), DateField.MILLISECOND, (int) time); + // 判断当前时间与过期时间的时间差 + long differ = expireDate.getTime() - System.currentTimeMillis(); + // 如果在续期检查的范围内,则续期 + if (differ <= properties.getDetect()) { + long renew = time + properties.getRenew(); + redisUtils.expire(loginKey, renew, TimeUnit.MILLISECONDS); + } + } + + public String getToken(HttpServletRequest request) { + final String requestHeader = request.getHeader(properties.getHeader()); + if (requestHeader != null && requestHeader.startsWith(properties.getTokenStartWith())) { + return requestHeader.substring(7); + } + return null; + } + + /** + * 获取登录用户RedisKey + * @param token / + * @return key + */ + public String loginKey(String token) { + Claims claims = getClaims(token); + String md5Token = DigestUtil.md5Hex(token); + return properties.getOnlineKey() + claims.getSubject() + "-" + md5Token; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/OnlineUserService.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/OnlineUserService.java new file mode 100644 index 0000000..ede7868 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/OnlineUserService.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.service; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.modules.security.security.TokenProvider; +import me.zhengjie.utils.PageResult; +import me.zhengjie.modules.security.config.bean.SecurityProperties; +import me.zhengjie.modules.security.service.dto.JwtUserDto; +import me.zhengjie.modules.security.service.dto.OnlineUserDto; +import me.zhengjie.utils.*; +import org.springframework.data.domain.Pageable; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; +import java.util.concurrent.TimeUnit; + +/** + * @author Zheng Jie + * @date 2019年10月26日21:56:27 + */ +@Service +@Slf4j +@AllArgsConstructor +public class OnlineUserService { + + private final SecurityProperties properties; + private final TokenProvider tokenProvider; + private final RedisUtils redisUtils; + + /** + * 保存在线用户信息 + * @param jwtUserDto / + * @param token / + * @param request / + */ + public void save(JwtUserDto jwtUserDto, String token, HttpServletRequest request){ + String dept = jwtUserDto.getUser().getDept().getName(); + String ip = StringUtils.getIp(request); + String browser = StringUtils.getBrowser(request); + String address = StringUtils.getCityInfo(ip); + OnlineUserDto onlineUserDto = null; + try { + onlineUserDto = new OnlineUserDto(jwtUserDto.getUsername(), jwtUserDto.getUser().getNickName(), dept, browser , ip, address, EncryptUtils.desEncrypt(token), new Date()); + } catch (Exception e) { + log.error(e.getMessage(),e); + } + String loginKey = tokenProvider.loginKey(token); + redisUtils.set(loginKey, onlineUserDto, properties.getTokenValidityInSeconds(), TimeUnit.MILLISECONDS); + } + + /** + * 查询全部数据 + * @param username / + * @param pageable / + * @return / + */ + public PageResult getAll(String username, Pageable pageable){ + List onlineUserDtos = getAll(username); + return PageUtil.toPage( + PageUtil.paging(pageable.getPageNumber(),pageable.getPageSize(), onlineUserDtos), + onlineUserDtos.size() + ); + } + + /** + * 查询全部数据,不分页 + * @param username / + * @return / + */ + public List getAll(String username){ + String loginKey = properties.getOnlineKey() + + (StringUtils.isBlank(username) ? "" : "*" + username); + List keys = redisUtils.scan(loginKey + "*"); + Collections.reverse(keys); + List onlineUserDtos = new ArrayList<>(); + for (String key : keys) { + onlineUserDtos.add((OnlineUserDto) redisUtils.get(key)); + } + onlineUserDtos.sort((o1, o2) -> o2.getLoginTime().compareTo(o1.getLoginTime())); + return onlineUserDtos; + } + + /** + * 退出登录 + * @param token / + */ + public void logout(String token) { + String loginKey = tokenProvider.loginKey(token); + redisUtils.del(loginKey); + } + + /** + * 导出 + * @param all / + * @param response / + * @throws IOException / + */ + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (OnlineUserDto user : all) { + Map map = new LinkedHashMap<>(); + map.put("用户名", user.getUserName()); + map.put("部门", user.getDept()); + map.put("登录IP", user.getIp()); + map.put("登录地点", user.getAddress()); + map.put("浏览器", user.getBrowser()); + map.put("登录日期", user.getLoginTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 查询用户 + * @param key / + * @return / + */ + public OnlineUserDto getOne(String key) { + return (OnlineUserDto)redisUtils.get(key); + } + + /** + * 根据用户名强退用户 + * @param username / + */ + @Async + public void kickOutForUsername(String username) { + String loginKey = properties.getOnlineKey() + username + "*"; + redisUtils.scanDel(loginKey); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserCacheManager.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserCacheManager.java new file mode 100644 index 0000000..0808e65 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserCacheManager.java @@ -0,0 +1,82 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.service; + +import cn.hutool.core.util.RandomUtil; +import me.zhengjie.modules.security.config.bean.LoginProperties; +import me.zhengjie.modules.security.service.dto.JwtUserDto; +import me.zhengjie.utils.RedisUtils; +import me.zhengjie.utils.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; +import javax.annotation.Resource; + +/** + * @author Zheng Jie + * @description 用户缓存管理 + * @date 2022-05-26 + **/ +@Component +public class UserCacheManager { + + @Resource + private RedisUtils redisUtils; + @Value("${login.user-cache.idle-time}") + private long idleTime; + + /** + * 返回用户缓存 + * @param userName 用户名 + * @return JwtUserDto + */ + public JwtUserDto getUserCache(String userName) { + if (StringUtils.isNotEmpty(userName)) { + // 获取数据 + Object obj = redisUtils.get(LoginProperties.cacheKey + userName); + if(obj != null){ + return (JwtUserDto)obj; + } + } + return null; + } + + /** + * 添加缓存到Redis + * @param userName 用户名 + */ + @Async + public void addUserCache(String userName, JwtUserDto user) { + if (StringUtils.isNotEmpty(userName)) { + // 添加数据, 避免数据同时过期 + long time = idleTime + RandomUtil.randomInt(900, 1800); + redisUtils.set(LoginProperties.cacheKey + userName, user, time); + } + } + + /** + * 清理用户缓存信息 + * 用户信息变更时 + * @param userName 用户名 + */ + @Async + public void cleanUserCache(String userName) { + if (StringUtils.isNotEmpty(userName)) { + // 清除数据 + redisUtils.del(LoginProperties.cacheKey + userName); + } + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java new file mode 100644 index 0000000..93516b0 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java @@ -0,0 +1,72 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.exception.EntityNotFoundException; +import me.zhengjie.modules.security.service.dto.JwtUserDto; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.service.DataService; +import me.zhengjie.modules.system.service.RoleService; +import me.zhengjie.modules.system.service.UserService; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Service; + +/** + * @author Zheng Jie + * @date 2018-11-22 + */ +@Slf4j +@RequiredArgsConstructor +@Service("userDetailsService") +public class UserDetailsServiceImpl implements UserDetailsService { + private final UserService userService; + private final RoleService roleService; + private final DataService dataService; + private final UserCacheManager userCacheManager; + + @Override + public JwtUserDto loadUserByUsername(String username) { + JwtUserDto jwtUserDto = userCacheManager.getUserCache(username); + if(jwtUserDto == null){ + User user; + try { + user = userService.getLoginData(username); + } catch (EntityNotFoundException e) { + // SpringSecurity会自动转换UsernameNotFoundException为BadCredentialsException + throw new UsernameNotFoundException(username, e); + } + if (user == null) { + throw new UsernameNotFoundException(""); + } else { + if (!user.getEnabled()) { + throw new BadRequestException("账号未激活!"); + } + jwtUserDto = new JwtUserDto( + user, + dataService.getDeptIds(user), + roleService.mapToGrantedAuthorities(user) + ); + // 添加缓存数据 + userCacheManager.addUserCache(username, jwtUserDto); + } + } + return jwtUserDto; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthUserDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthUserDto.java new file mode 100644 index 0000000..5219fc5 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthUserDto.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.service.dto; + +import lombok.Getter; +import lombok.Setter; +import javax.validation.constraints.NotBlank; + +/** + * @author Zheng Jie + * @date 2018-11-30 + */ +@Getter +@Setter +public class AuthUserDto { + + @NotBlank + private String username; + + @NotBlank + private String password; + + private String code; + + private String uuid = ""; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthorityDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthorityDto.java new file mode 100644 index 0000000..888cceb --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthorityDto.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.service.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.security.core.GrantedAuthority; + +/** + * 避免序列化问题 + * @author Zheng Jie + * @date 2018-11-30 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class AuthorityDto implements GrantedAuthority { + + private String authority; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/JwtUserDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/JwtUserDto.java new file mode 100644 index 0000000..8a9ef5f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/JwtUserDto.java @@ -0,0 +1,80 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.service.dto; + +import com.alibaba.fastjson.annotation.JSONField; +import lombok.AllArgsConstructor; +import lombok.Getter; +import me.zhengjie.modules.system.domain.User; +import org.springframework.security.core.userdetails.UserDetails; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +@Getter +@AllArgsConstructor +public class JwtUserDto implements UserDetails { + + private final User user; + + private final List dataScopes; + + private final List authorities; + + public Set getRoles() { + return authorities.stream().map(AuthorityDto::getAuthority).collect(Collectors.toSet()); + } + + @Override + @JSONField(serialize = false) + public String getPassword() { + return user.getPassword(); + } + + @Override + @JSONField(serialize = false) + public String getUsername() { + return user.getUsername(); + } + + @JSONField(serialize = false) + @Override + public boolean isAccountNonExpired() { + return true; + } + + @JSONField(serialize = false) + @Override + public boolean isAccountNonLocked() { + return true; + } + + @JSONField(serialize = false) + @Override + public boolean isCredentialsNonExpired() { + return true; + } + + @Override + @JSONField(serialize = false) + public boolean isEnabled() { + return user.getEnabled(); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/OnlineUserDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/OnlineUserDto.java new file mode 100644 index 0000000..290ab6d --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/OnlineUserDto.java @@ -0,0 +1,73 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.security.service.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import java.util.Date; + +/** + * 在线用户 + * @author Zheng Jie + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class OnlineUserDto { + + /** + * 用户名 + */ + private String userName; + + /** + * 昵称 + */ + private String nickName; + + /** + * 岗位 + */ + private String dept; + + /** + * 浏览器 + */ + private String browser; + + /** + * IP + */ + private String ip; + + /** + * 地址 + */ + private String address; + + /** + * token + */ + private String key; + + /** + * 登录时间 + */ + private Date loginTime; + + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java new file mode 100644 index 0000000..26af317 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java @@ -0,0 +1,102 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain; + +import com.alibaba.fastjson.annotation.JSONField; +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.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2019-03-25 +*/ +@Getter +@Setter +@TableName("sys_dept") +public class Dept extends BaseEntity implements Serializable { + + @NotNull(groups = Update.class) + @TableId(value="dept_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @TableField(exist = false) + @JSONField(serialize = false) + @ApiModelProperty(value = "角色") + private Set roles; + + @TableField(exist = false) + private List children; + + @ApiModelProperty(value = "排序") + private Integer deptSort; + + @NotBlank + @ApiModelProperty(value = "部门名称") + private String name; + + @NotNull + @ApiModelProperty(value = "是否启用") + private Boolean enabled; + + @ApiModelProperty(value = "上级部门") + private Long pid; + + @ApiModelProperty(value = "子节点数目", hidden = true) + private Integer subCount = 0; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dept dept = (Dept) o; + return Objects.equals(id, dept.id) && + Objects.equals(name, dept.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + public Boolean getHasChildren() { + return subCount > 0; + } + + public Boolean getLeaf() { + return subCount <= 0; + } + + public String getLabel() { + return name; + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java new file mode 100644 index 0000000..d354fde --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java @@ -0,0 +1,54 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain; + +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.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +@Getter +@Setter +@TableName("sys_dict") +public class Dict extends BaseEntity implements Serializable { + + @NotNull(groups = Update.class) + @ApiModelProperty(value = "ID", hidden = true) + @TableId(value = "dict_id", type = IdType.AUTO) + private Long id; + + @TableField(exist = false) + private List dictDetails; + + @NotBlank + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "描述") + private String description; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/DictDetail.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/DictDetail.java new file mode 100644 index 0000000..6f38c59 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/DictDetail.java @@ -0,0 +1,58 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain; + +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.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +@Getter +@Setter +@TableName("sys_dict_detail") +public class DictDetail extends BaseEntity implements Serializable { + + @NotNull(groups = Update.class) + @ApiModelProperty(value = "ID", hidden = true) + @TableId(value = "detail_id", type = IdType.AUTO) + private Long id; + + @TableField(value = "dict_id") + @ApiModelProperty(hidden = true) + private Long dictId; + + @TableField(exist = false) + private Dict dict; + + @ApiModelProperty(value = "字典标签") + private String label; + + @ApiModelProperty(value = "字典值") + private String value; + + @ApiModelProperty(value = "排序") + private Integer dictSort = 999; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Job.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Job.java new file mode 100644 index 0000000..9c9ee64 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Job.java @@ -0,0 +1,72 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Objects; + +/** +* @author Zheng Jie +* @date 2019-03-29 +*/ +@Getter +@Setter +@TableName("sys_job") +public class Job extends BaseEntity implements Serializable { + + @NotNull(groups = Update.class) + @TableId(value="job_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @NotBlank + @ApiModelProperty(value = "岗位名称") + private String name; + + @NotNull + @ApiModelProperty(value = "岗位排序") + private Long jobSort; + + @NotNull + @ApiModelProperty(value = "是否启用") + private Boolean enabled; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Job job = (Job) o; + return Objects.equals(id, job.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Menu.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Menu.java new file mode 100644 index 0000000..cfe8132 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Menu.java @@ -0,0 +1,123 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain; + +import com.alibaba.fastjson.annotation.JSONField; +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.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2018-12-17 + */ +@Getter +@Setter +@TableName("sys_menu") +public class Menu extends BaseEntity implements Serializable { + + @NotNull(groups = {Update.class}) + @TableId(value="menu_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @TableField(exist = false) + @JSONField(serialize = false) + @ApiModelProperty(value = "菜单角色") + private Set roles; + + @TableField(exist = false) + private List children; + + @ApiModelProperty(value = "菜单标题") + private String title; + + @TableField(value = "name") + @ApiModelProperty(value = "菜单组件名称") + private String componentName; + + @ApiModelProperty(value = "排序") + private Integer menuSort = 999; + + @ApiModelProperty(value = "组件路径") + private String component; + + @ApiModelProperty(value = "路由地址") + private String path; + + @ApiModelProperty(value = "菜单类型,目录、菜单、按钮") + private Integer type; + + @ApiModelProperty(value = "权限标识") + private String permission; + + @ApiModelProperty(value = "菜单图标") + private String icon; + + @ApiModelProperty(value = "缓存") + private Boolean cache; + + @ApiModelProperty(value = "是否隐藏") + private Boolean hidden; + + @ApiModelProperty(value = "上级菜单") + private Long pid; + + @ApiModelProperty(value = "子节点数目", hidden = true) + private Integer subCount = 0; + + @ApiModelProperty(value = "外链菜单") + private Boolean iFrame; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Menu menu = (Menu) o; + return Objects.equals(id, menu.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + public Boolean getHasChildren() { + return subCount > 0; + } + + public Boolean getLeaf() { + return subCount <= 0; + } + + public String getLabel() { + return title; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java new file mode 100644 index 0000000..9ec54f3 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java @@ -0,0 +1,89 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain; + +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.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import me.zhengjie.utils.enums.DataScopeEnum; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Objects; +import java.util.Set; + +/** + * 角色 + * @author Zheng Jie + * @date 2018-11-22 + */ +@Getter +@Setter +@TableName("sys_role") +public class Role extends BaseEntity implements Serializable { + + @NotNull(groups = {Update.class}) + @TableId(value="role_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @TableField(exist = false) + @ApiModelProperty(value = "用户", hidden = true) + private Set users; + + @TableField(exist = false) + @ApiModelProperty(value = "菜单", hidden = true) + private Set menus; + + @TableField(exist = false) + @ApiModelProperty(value = "部门", hidden = true) + private Set depts; + + @NotBlank + @ApiModelProperty(value = "名称", hidden = true) + private String name; + + @ApiModelProperty(value = "数据权限,全部 、 本级 、 自定义") + private String dataScope = DataScopeEnum.THIS_LEVEL.getValue(); + + @ApiModelProperty(value = "级别,数值越小,级别越大") + private Integer level = 3; + + @ApiModelProperty(value = "描述") + private String description; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Role role = (Role) o; + return Objects.equals(id, role.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java new file mode 100644 index 0000000..b3089fd --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java @@ -0,0 +1,119 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain; + +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.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import me.zhengjie.base.BaseEntity; +import javax.validation.constraints.Email; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2018-11-22 + */ +@Getter +@Setter +@TableName("sys_user") +public class User extends BaseEntity implements Serializable { + + @NotNull(groups = Update.class) + @TableId(value="user_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @TableField(exist = false) + @ApiModelProperty(value = "用户角色") + private Set roles; + + @TableField(exist = false) + @ApiModelProperty(value = "用户岗位") + private Set jobs; + + @TableField(value = "dept_id") + @ApiModelProperty(hidden = true) + private Long deptId; + +// private Boolean status; + + @ApiModelProperty(value = "用户部门") + @TableField(exist = false) + private Dept dept; + + @NotBlank + @ApiModelProperty(value = "用户名称") + private String username; + + @NotBlank + @ApiModelProperty(value = "用户昵称") + private String nickName; + + @ApiModelProperty(value = "邮箱") + private String email; + + @ApiModelProperty(value = "电话号码") + private String phone; + + @ApiModelProperty(value = "用户性别") + private String gender; + + @ApiModelProperty(value = "头像真实名称",hidden = true) + private String avatarName; + + @ApiModelProperty(value = "头像存储的路径", hidden = true) + private String avatarPath; + + @ApiModelProperty(value = "密码") + private String password; + + @NotNull + @ApiModelProperty(value = "是否启用") + private Boolean enabled; + + @ApiModelProperty(value = "是否为admin账号", hidden = true) + private Boolean isAdmin = false; + + @ApiModelProperty(value = "最后修改密码的时间", hidden = true) + private Date pwdResetTime; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(id, user.id) && + Objects.equals(username, user.username); + } + + @Override + public int hashCode() { + return Objects.hash(id, username); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/bo/TransactionBO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/bo/TransactionBO.java new file mode 100644 index 0000000..25d05d9 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/bo/TransactionBO.java @@ -0,0 +1,32 @@ +package me.zhengjie.modules.system.domain.bo; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import me.zhengjie.modules.system.domain.dto.AssetUpdateDTO; + +import java.math.BigDecimal; +import java.sql.Timestamp; + +@Data +public class TransactionBO extends AssetUpdateDTO { + @ApiModelProperty(value = "主键id") + private Long id; + @ApiModelProperty(value = "交易前金额") + private BigDecimal before_value; + @ApiModelProperty(value = "交易后金额") + private BigDecimal after_value; + @ApiModelProperty(value = "交易类型value:支出1,收入0") + private Integer tradevalue; + @ApiModelProperty(value = "system_transfer_in:0,system_transfer_out:1") + private Integer tradeitem; + @TableField(fill = FieldFill.INSERT) + @ApiModelProperty(value = "创建时间") + private Timestamp create_time; + @ApiModelProperty(value = "金额") + private BigDecimal price; + @ApiModelProperty(value = "系统用户名") + private String currentUsername; + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetConfigDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetConfigDTO.java new file mode 100644 index 0000000..ccaae92 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetConfigDTO.java @@ -0,0 +1,23 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.List; + +@Data +public class AssetConfigDTO implements Serializable { + @ApiModelProperty(value = "账号") + private String username; + @ApiModelProperty(value = "uid") + private long uid; + @ApiModelProperty(value = "账户状态: 0->禁用; 1->启用") + private Integer status; + private Long page; + private Long size; + @ApiModelProperty(value = "时间") + private List createTime; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetCountDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetCountDTO.java new file mode 100644 index 0000000..38c061f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetCountDTO.java @@ -0,0 +1,40 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class AssetCountDTO { + @ApiModelProperty(value = "ast空投总量") + private BigDecimal astAirNum; + @ApiModelProperty(value = "今日ast空投总量") + private BigDecimal astAirNumDay; + @ApiModelProperty(value = "今日空投释放总量") + private BigDecimal releaseAirNum; + @ApiModelProperty(value = "ast质押总量") + private BigDecimal astPledgeNum; + @ApiModelProperty(value = "今日ast质押总量") + private BigDecimal astPledgeNumDay; + @ApiModelProperty(value = "空投总人数") + private Long airNum; + @ApiModelProperty(value = "今日空投人数") + private Long airNumDay; + @ApiModelProperty(value = "持币解锁数量") + private BigDecimal airdrop_position_release; + @ApiModelProperty(value = "邀请解锁数量") + private BigDecimal airdrop_invite_release; + @ApiModelProperty(value = "交易解锁数量") + private BigDecimal airdrop_trade_release; + @ApiModelProperty(value = "质押解锁数量") + private BigDecimal airdrop_pledge_release; + @ApiModelProperty(value = "AST锁仓总量") + private BigDecimal lockPosition; + @ApiModelProperty(value = "今日AST锁仓总量") + private BigDecimal lockPositionDay; + @ApiModelProperty(value = "今日质押解锁数量") + private BigDecimal airdroppledgereleaseDay; + @ApiModelProperty(value = "今日锁仓解锁数量") + private BigDecimal airdroppositionreleaseDay; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateDTO.java new file mode 100644 index 0000000..3d2103e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateDTO.java @@ -0,0 +1,24 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class AssetUpdateDTO { + @ApiModelProperty(value = "账号") + private String username; + @ApiModelProperty(value = "会员id:必传",required = true) + private Long member_id; + @ApiModelProperty(value = "账户类型(usdt,balance,coinone,cointwo,cointhree,coinfour,coinfive) :必传",required = true) + private String type; + @ApiModelProperty(value = "交易数",required = true) + private BigDecimal value; + @ApiModelProperty(value = "操作类型: 收入,0,支出1",required = true) + private Integer trade_type; + @ApiModelProperty(value = "备注") + private String note; + @ApiModelProperty(value = "交易标题") + private String title; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateStatusDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateStatusDTO.java new file mode 100644 index 0000000..4e7d104 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AssetUpdateStatusDTO.java @@ -0,0 +1,12 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class AssetUpdateStatusDTO { + @ApiModelProperty(value = "会员id",required = true) + private Long member_id; + @ApiModelProperty(value = "状态",required = true) + private Integer status; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AstlistDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AstlistDTO.java new file mode 100644 index 0000000..f345ee2 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/AstlistDTO.java @@ -0,0 +1,23 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.sql.Date; +import java.sql.Timestamp; +import java.util.List; + +@Data +public class AstlistDTO { + @ApiModelProperty(value = "会员账号") + private String username; + @ApiModelProperty(value = "会员id") + private Long memberid; + @ApiModelProperty(value = "交易类型: 0->收入; 1->支出") + private Integer tradetype; + @ApiModelProperty(value = "uid") + private long uid; + private Long page; + private Long size; + @ApiModelProperty(value = "时间") + private List createTime; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/DepartmentDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/DepartmentDTO.java new file mode 100644 index 0000000..d2568f1 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/DepartmentDTO.java @@ -0,0 +1,16 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class DepartmentDTO implements Serializable { + @ApiModelProperty(value = "参数名") + private String name; + @ApiModelProperty(value = "参数名") + private String comment; + @ApiModelProperty(value = "值") + private String value; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/LevelConfigDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/LevelConfigDTO.java new file mode 100644 index 0000000..0d15d2f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/LevelConfigDTO.java @@ -0,0 +1,20 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class LevelConfigDTO { + @ApiModelProperty(value = "等级") + private Integer level; + @ApiModelProperty(value = "质押数量") + private BigDecimal pledge_amount; + @ApiModelProperty(value = "空投奖励比例") + private BigDecimal airdrop_ratio; + @ApiModelProperty(value = "质押奖励比例") + private BigDecimal pledge_ratio; + @ApiModelProperty(value = "平级比例") + private BigDecimal flat_ratio; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/MemberDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/MemberDTO.java new file mode 100644 index 0000000..a7724c4 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/MemberDTO.java @@ -0,0 +1,29 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.sql.Timestamp; +import java.util.List; + +@Data +public class MemberDTO implements Serializable { + @ApiModelProperty(value = "uid:修改时必传") + private long uid; + @ApiModelProperty(value = "帐号启用状态: 0->禁用;1->启用 修改时必传") + private Integer status; + @ApiModelProperty(value = "用户昵称") + private String nickname; + @ApiModelProperty(value = "用户账号") + private String username; + @ApiModelProperty(value = "是否有效:0->无效;1->有效;") + private Integer is_effective; + @ApiModelProperty(value = "等级") + private Integer level; + @ApiModelProperty(value = "时间筛选") + private List createTime; + private Long page; + private Long size; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/PageDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/PageDTO.java new file mode 100644 index 0000000..b11c381 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/PageDTO.java @@ -0,0 +1,11 @@ +package me.zhengjie.modules.system.domain.dto; + +import lombok.Data; +import me.zhengjie.base.BaseEntity; + +@Data +public class PageDTO extends BaseEntity { + private Long page; + private Long size; + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/ProMemberDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/ProMemberDTO.java new file mode 100644 index 0000000..fcf484a --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/ProMemberDTO.java @@ -0,0 +1,12 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class ProMemberDTO { + @ApiModelProperty("uid") + private Long uid; + @ApiModelProperty("等级") + private Integer level; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/TeamDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/TeamDTO.java new file mode 100644 index 0000000..ca41b6e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/TeamDTO.java @@ -0,0 +1,26 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class TeamDTO extends PageDTO implements Serializable { + @ApiModelProperty("会员号") + private Long memberid; + @ApiModelProperty("邀请人数") + private Integer invitecount; + @ApiModelProperty("团队人数") + private Integer teamcount; + @ApiModelProperty("直推人数") + private Integer directeffective; + @ApiModelProperty("团队有效人数") + private Integer teameffective; + @ApiModelProperty("会员账号") + private String username; + @ApiModelProperty("等级") + private int level; + @ApiModelProperty("uid") + private long uid; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/UpDownTeamDTO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/UpDownTeamDTO.java new file mode 100644 index 0000000..7360925 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/dto/UpDownTeamDTO.java @@ -0,0 +1,12 @@ +package me.zhengjie.modules.system.domain.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UpDownTeamDTO extends PageDTO implements Serializable { + @ApiModelProperty("会员号:必传") + private Long memberid; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AccountVO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AccountVO.java new file mode 100644 index 0000000..92a5989 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AccountVO.java @@ -0,0 +1,34 @@ +package me.zhengjie.modules.system.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import me.zhengjie.base.BaseEntity; + +import java.io.Serializable; +import java.math.BigDecimal; + +@Data +public class AccountVO extends BaseEntity implements Serializable { + @ApiModelProperty(value = "id") + private Long id; + @ApiModelProperty(value = "账号") + private String username; + @ApiModelProperty(value = "备注") + private String title; + @ApiModelProperty(value = "会员id") + private Long memberid; + @ApiModelProperty(value = "交易类型: 0->收入; 1->支出") + private Integer tradetype; + @ApiModelProperty(value = "交易金额") + private BigDecimal value; + @ApiModelProperty(value = "交易前金额") + private BigDecimal beforevalue; + @ApiModelProperty(value = "交易后金额") + private BigDecimal aftervalue; + @ApiModelProperty(value = "备注") + private String note; + @ApiModelProperty(value = "操作者") + private String operator; + @ApiModelProperty(value = "系统用户") + private String currentUsername; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AssetVO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AssetVO.java new file mode 100644 index 0000000..a7c2747 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/AssetVO.java @@ -0,0 +1,33 @@ +package me.zhengjie.modules.system.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +public class AssetVO { + @ApiModelProperty(value = "会员账号") + private String username; + @ApiModelProperty(value = "昵称") + private String nickname; + @ApiModelProperty(value = "会员id") + private Long memberid; + @ApiModelProperty(value = "usdt") + private BigDecimal usdt; + @ApiModelProperty(value = "ast") + private BigDecimal balance; + @ApiModelProperty(value = "注册空投") + private BigDecimal coinone; + @ApiModelProperty(value = "邀请奖励空投") + private BigDecimal cointwo; + @ApiModelProperty(value = "质押余额") + private BigDecimal cointhree; + @ApiModelProperty(value = "质押空投余额") + private BigDecimal coinfour; + @ApiModelProperty(value = "质押奖励") + private BigDecimal coinfive; + @ApiModelProperty(value = "账户状态: 0->禁用; 1->启用") + private Integer status; + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/CountVO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/CountVO.java new file mode 100644 index 0000000..f24d5ea --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/CountVO.java @@ -0,0 +1,31 @@ +package me.zhengjie.modules.system.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +@Data +public class CountVO { + @ApiModelProperty(value = "空投总人数") + private Integer airPeoNum; + @ApiModelProperty(value = "今日空投人数") + private Integer airPeoNumTaday; + @ApiModelProperty(value = "AST质押总量") + private BigDecimal pledgeNumber; + @ApiModelProperty(value = "AST质押已释放总量") + private BigDecimal pladgerelease; + @ApiModelProperty(value = "AST质押今日释放数量") + private BigDecimal pladgereleaseTaday; + @ApiModelProperty(value = "AST锁仓总量") + private BigDecimal coinFourNum; + @ApiModelProperty(value = "AST锁仓已释放总量") + private BigDecimal lockedReleaseNum; + @ApiModelProperty(value = "AST锁仓今日释放数量") + private BigDecimal lockedReleaseNumTady; + @ApiModelProperty(value = "AST已释放总量(空投+质押+锁仓)") + private BigDecimal astReleaseNum; + @ApiModelProperty(value = "今日AST释放数量(空投+质押+锁仓)") + private BigDecimal astReleaseNumTady; + @ApiModelProperty(value = "有效用户数量 ") + private Integer balance; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DeptQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DeptQueryCriteria.java new file mode 100644 index 0000000..d8b99a2 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DeptQueryCriteria.java @@ -0,0 +1,40 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2019-03-25 +*/ +@Data +public class DeptQueryCriteria{ + + private List ids; + + private String name; + + private Boolean enabled; + + private Long pid; + + private Boolean pidIsNull; + + private List createTime; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictDetailQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictDetailQueryCriteria.java new file mode 100644 index 0000000..c548ec9 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictDetailQueryCriteria.java @@ -0,0 +1,30 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +@Data +public class DictDetailQueryCriteria { + + private String label; + + private String dictName; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictQueryCriteria.java new file mode 100644 index 0000000..4f0e5a6 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/DictQueryCriteria.java @@ -0,0 +1,32 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; + +/** + * @author Zheng Jie + * 公共查询类 + */ +@Data +public class DictQueryCriteria { + + private String blurry; + + private Long offset; + + private Long size; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/JobQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/JobQueryCriteria.java new file mode 100644 index 0000000..52383c8 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/JobQueryCriteria.java @@ -0,0 +1,36 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; +import lombok.NoArgsConstructor; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2019-6-4 14:49:34 +*/ +@Data +@NoArgsConstructor +public class JobQueryCriteria { + + private String name; + + private Boolean enabled; + + private List createTime; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MemberVO.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MemberVO.java new file mode 100644 index 0000000..d377c3e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MemberVO.java @@ -0,0 +1,44 @@ +package me.zhengjie.modules.system.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import me.zhengjie.base.BaseEntity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.sql.Timestamp; + +@Data +@ApiModel("会员列表") +public class MemberVO extends BaseEntity implements Serializable { + @ApiModelProperty(value = "id") + private Long id; + @ApiModelProperty(value = "uid") + private Long uid; + @ApiModelProperty(value = "帐号启用状态: 0->禁用;1->启用") + private Integer status; + @ApiModelProperty(value = "用户昵称") + private String nickname; + @ApiModelProperty(value = "用户账号") + private String username; + @ApiModelProperty(value = "邀请人账号") + private String inviteUsername; + @ApiModelProperty(value = "是否有效:0->无效;1->有效;") + private Integer iseffective; + @ApiModelProperty(value = "邀请码") + private String invitercode; + @ApiModelProperty(value = "等级") + private Integer level; + @ApiModelProperty(value = "邀请人id;") + private long inviterid; +// @ApiModelProperty(value = "规则等级;") +// private Integer reallevel; +// @ApiModelProperty(value = "ast总量;") +// private BigDecimal astraltotalasset; +// @ApiModelProperty(value = "是否空投: 0->否;1->是;") +// private Integer isairdrop; + @ApiModelProperty(value = "最后登录时间") + private Timestamp lastlogintime; + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuMetaVo.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuMetaVo.java new file mode 100644 index 0000000..647baa8 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuMetaVo.java @@ -0,0 +1,35 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Data; +import java.io.Serializable; + +/** + * @author Zheng Jie + * @date 2018-12-20 + */ +@Data +@AllArgsConstructor +public class MenuMetaVo implements Serializable { + + private String title; + + private String icon; + + private Boolean noCache; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuQueryCriteria.java new file mode 100644 index 0000000..cbb2f04 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuQueryCriteria.java @@ -0,0 +1,36 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** + * @author Zheng Jie + * 公共查询类 + */ +@Data +public class MenuQueryCriteria { + + private String blurry; + + private List createTime; + + private Boolean pidIsNull; + + private Long pid; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java new file mode 100644 index 0000000..e1efa5a --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java @@ -0,0 +1,45 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; +import java.io.Serializable; +import java.util.List; + +/** + * 构建前端路由时用到 + * @author Zheng Jie + * @date 2018-12-20 + */ +@Data +public class MenuVo implements Serializable { + + private String name; + + private String path; + + private Boolean hidden; + + private String redirect; + + private String component; + + private Boolean alwaysShow; + + private MenuMetaVo meta; + + private List children; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/RoleQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/RoleQueryCriteria.java new file mode 100644 index 0000000..2c18400 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/RoleQueryCriteria.java @@ -0,0 +1,36 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** + * @author Zheng Jie + * 公共查询类 + */ +@Data +public class RoleQueryCriteria { + + private String blurry; + + private List createTime; + + private Long offset; + + private Long size; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserPassVo.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserPassVo.java new file mode 100644 index 0000000..fccb100 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserPassVo.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; + +/** + * 修改密码的 Vo 类 + * @author Zheng Jie + * @date 2019年7月11日13:59:49 + */ +@Data +public class UserPassVo { + + private String oldPass; + + private String newPass; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserQueryCriteria.java new file mode 100644 index 0000000..93065bd --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserQueryCriteria.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.domain.vo; + +import lombok.Data; +import java.io.Serializable; +import java.sql.Timestamp; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +@Data +public class UserQueryCriteria implements Serializable { + + private Long id; + + private Set deptIds = new HashSet<>(); + + private String blurry; + + private Boolean enabled; + + private Long deptId; + + private List createTime; + + private Long offset; + + private Long size; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/AssetMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/AssetMapper.java new file mode 100644 index 0000000..4bb9eb3 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/AssetMapper.java @@ -0,0 +1,62 @@ +package me.zhengjie.modules.system.mapper; + +import me.zhengjie.modules.system.domain.bo.TransactionBO; +import me.zhengjie.modules.system.domain.dto.AssetConfigDTO; +import me.zhengjie.modules.system.domain.dto.AssetUpdateDTO; +import me.zhengjie.modules.system.domain.dto.AssetUpdateStatusDTO; +import me.zhengjie.modules.system.domain.dto.AstlistDTO; +import me.zhengjie.modules.system.domain.vo.AccountVO; +import me.zhengjie.modules.system.domain.vo.AssetVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.math.BigDecimal; +import java.util.List; + +@Mapper +public interface AssetMapper { + + List list(AssetConfigDTO assetConfigDTO); + + Long selectCount(AssetConfigDTO assetConfigDTO); + + Integer InsertAsset(@Param("transactionBO") TransactionBO transactionBO, @Param("name") String name); + + BigDecimal selectLastAmount(@Param("member_id") Long member_id,@Param("name") String name); + + void updateAsset(@Param("transactionBO")TransactionBO transactionBO,@Param("price") BigDecimal price); + + Integer updateAssetStatus(AssetUpdateStatusDTO status); + + List astlist(AstlistDTO astlistDTO); + + Long selectAst(AstlistDTO astlistDTO); + + List usdtlist(AstlistDTO astlistDTO); + + Long selectUsdtlist(AstlistDTO astlistDTO); + + List astregisterlist(AstlistDTO astlistDTO); + + Long selectAstregisterlist(AstlistDTO astlistDTO); + + List astinvitationlist(AstlistDTO astlistDTO); + + Long selectAstinvitationlist(AstlistDTO astlistDTO); + + List astpledgelist(AstlistDTO astlistDTO); + + Long selectAstpledgelist(AstlistDTO astlistDTO); + + List astpledgerewardlist(AstlistDTO astlistDTO); + + Long selectAstpledgerewardlist(AstlistDTO astlistDTO); + + BigDecimal selectprice(@Param("type") String type,@Param("memberid") Long memberid); + + void InsertManagement(TransactionBO transactionBO); + + String selectManagement(@Param("id") Long id,@Param("memberid") Long memberid); +// +// List astinfolist(AstlistDTO astlistDTO); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/CountMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/CountMapper.java new file mode 100644 index 0000000..2767da6 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/CountMapper.java @@ -0,0 +1,34 @@ +package me.zhengjie.modules.system.mapper; + +import org.apache.ibatis.annotations.Mapper; + +import java.math.BigDecimal; + +@Mapper +public interface CountMapper { + Integer selectCoinOne(); + + Integer selectairPeoNumTaday(); + + BigDecimal selectpledgeNumber(); + + BigDecimal selectpladgerelease(); + + BigDecimal selectpladgereleaseTaday(); + + BigDecimal selectcoinFourNum(); + + BigDecimal selectlockedReleaseNum(); + + BigDecimal selectlockedReleaseNumTady(); + + Integer selectbalance(); + + BigDecimal selectastReleaseNum(); + + BigDecimal selectastReleaseNumTady(); + + BigDecimal selectNumTadycoinone(); + + BigDecimal selectNumTadycointhree(); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DeptMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DeptMapper.java new file mode 100644 index 0000000..7e456a0 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DeptMapper.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.modules.system.domain.Dept; +import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.util.List; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2023-06-20 +*/ +@Mapper +public interface DeptMapper extends BaseMapper { + + List findAll(@Param("criteria") DeptQueryCriteria criteria); + + List findByPid(@Param("pid") Long pid); + + List findByPidIsNull(); + + Set findByRoleId(@Param("roleId") Long roleId); + + @Select("select count(*) from sys_dept where pid = #{pid}") + int countByPid(@Param("pid") Long pid); + + @Select("update sys_dept set sub_count = #{count} where dept_id = #{id}") + void updateSubCntById(@Param("count") Integer count, @Param("id") Long id); +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictDetailMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictDetailMapper.java new file mode 100644 index 0000000..5999528 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictDetailMapper.java @@ -0,0 +1,40 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.system.domain.DictDetail; +import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2023-06-19 +*/ +@Mapper +public interface DictDetailMapper extends BaseMapper { + + List findByDictName(@Param("name") String name); + + IPage findAll(@Param("criteria") DictDetailQueryCriteria criteria, Page page); + + void deleteByDictBatchIds(@Param("dictIds") Set dictIds); +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictMapper.java new file mode 100644 index 0000000..4ad83ce --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/DictMapper.java @@ -0,0 +1,35 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.modules.system.domain.Dict; +import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2023-06-19 +*/ +@Mapper +public interface DictMapper extends BaseMapper { + + List findAll(@Param("criteria") DictQueryCriteria criteria); + + Long countAll(@Param("criteria") DictQueryCriteria criteria); +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/JobMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/JobMapper.java new file mode 100644 index 0000000..40084d4 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/JobMapper.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.modules.system.domain.Job; +import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2023-06-20 +*/ +@Mapper +public interface JobMapper extends BaseMapper { + + @Select("select job_id as id from sys_job where name = #{name}") + Job findByName(@Param("name") String name); + + List findAll(@Param("criteria") JobQueryCriteria criteria); + + IPage findAll(@Param("criteria") JobQueryCriteria criteria, Page page); +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemParameterMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemParameterMapper.java new file mode 100644 index 0000000..976c396 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemParameterMapper.java @@ -0,0 +1,7 @@ +package me.zhengjie.modules.system.mapper; + +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface MemParameterMapper { +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemberMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemberMapper.java new file mode 100644 index 0000000..593204c --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MemberMapper.java @@ -0,0 +1,25 @@ +package me.zhengjie.modules.system.mapper; + +import me.zhengjie.modules.system.domain.dto.MemberDTO; +import me.zhengjie.modules.system.domain.vo.MemberVO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface MemberMapper { + + List list(MemberDTO memberDTO); + + Long countAll(MemberDTO memberDTO); + + Integer updateInfo(MemberDTO memberDTO); + + void getInviteUsername(List list); + + String getInviteUsername1(Long id); + + Integer updatelevel(MemberDTO memberDTO); + + MemberVO selectMemberInfo(String uid); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MenuMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MenuMapper.java new file mode 100644 index 0000000..f34969a --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/MenuMapper.java @@ -0,0 +1,54 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.modules.system.domain.Menu; +import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2023-06-20 + */ +@Mapper +public interface MenuMapper extends BaseMapper { + + List findAll(@Param("criteria") MenuQueryCriteria criteria); + + LinkedHashSet findByRoleIdsAndTypeNot(@Param("roleIds") Set roleIds, @Param("type") Integer type); + + List findByPidIsNullOrderByMenuSort(); + + List findByPidOrderByMenuSort(@Param("pid") Long pid); + + @Select("SELECT menu_id id FROM sys_menu WHERE title = #{title}") + Menu findByTitle(@Param("title") String title); + + @Select("SELECT menu_id id FROM sys_menu WHERE name = #{name}") + Menu findByComponentName(@Param("name") String name); + + @Select("SELECT count(*) FROM sys_menu WHERE pid = #{pid}") + int countByPid(@Param("pid") Long pid); + + @Select("update sys_menu set sub_count = #{count} where menu_id = #{menuId} ") + void updateSubCntById(@Param("count") int count, @Param("menuId") Long menuId); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleDeptMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleDeptMapper.java new file mode 100644 index 0000000..7853490 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleDeptMapper.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import me.zhengjie.modules.system.domain.Dept; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2023-06-20 + */ +@Mapper +public interface RoleDeptMapper { + void insertData(@Param("roleId") Long roleId, @Param("depts") Set depts); + + void deleteByRoleId(@Param("roleId") Long roleId); + + void deleteByRoleIds(@Param("roleIds") Set roleIds); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMapper.java new file mode 100644 index 0000000..5536b95 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMapper.java @@ -0,0 +1,50 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2023-06-20 + */ +@Mapper +public interface RoleMapper extends BaseMapper { + + List queryAll(); + + Role findById(@Param("roleId") Long roleId); + Role findByName(@Param("name") String name); + + List findByUserId(@Param("userId") Long userId); + + Long countAll(@Param("criteria") RoleQueryCriteria criteria); + + List findAll(@Param("criteria") RoleQueryCriteria criteria); + + int countByDepts(@Param("deptIds") Set deptIds); + + @Select("SELECT role.role_id as id FROM sys_role role, sys_roles_menus rm " + + "WHERE role.role_id = rm.role_id AND rm.menu_id = #{menuId}") + List findByMenuId(@Param("menuId") Long menuId); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMenuMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMenuMapper.java new file mode 100644 index 0000000..aa5f00b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/RoleMenuMapper.java @@ -0,0 +1,36 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import me.zhengjie.modules.system.domain.Menu; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2023-06-20 + */ +@Mapper +public interface RoleMenuMapper { + void insertData(@Param("roleId") Long roleId, @Param("menus") Set menus); + + void deleteByRoleId(@Param("roleId") Long roleId); + + void deleteByRoleIds(@Param("roleIds") Set roleIds); + + void deleteByMenuId(@Param("menuId") Long menuId); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/TeamMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/TeamMapper.java new file mode 100644 index 0000000..bf0d99d --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/TeamMapper.java @@ -0,0 +1,26 @@ +package me.zhengjie.modules.system.mapper; + +import me.zhengjie.modules.system.domain.dto.TeamDTO; +import me.zhengjie.modules.system.domain.dto.UpDownTeamDTO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface TeamMapper { + Long countAll(TeamDTO teamDTO); + + List list(TeamDTO teamDTO); + + List upTeamList(UpDownTeamDTO teamDTO); + + Long countupTeamAll(UpDownTeamDTO teamDTO); + + List downTeamList(UpDownTeamDTO teamDTO); + + Long countDownTeamAll(UpDownTeamDTO teamDTO); + + Long selectinfo(UpDownTeamDTO teamDTO); + + List selectdowninfo(UpDownTeamDTO teamDTO); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserJobMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserJobMapper.java new file mode 100644 index 0000000..a26875c --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserJobMapper.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import me.zhengjie.modules.system.domain.Job; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2023-06-20 + */ +@Mapper +public interface UserJobMapper { + void insertData(@Param("userId") Long userId, @Param("jobs") Set jobs); + + void deleteByUserId(@Param("userId") Long userId); + + void deleteByUserIds(@Param("userIds") Set userIds); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserMapper.java new file mode 100644 index 0000000..6e583e2 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserMapper.java @@ -0,0 +1,64 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.util.Date; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2023-06-20 + */ +@Mapper +public interface UserMapper extends BaseMapper { + + List findAll(@Param("criteria") UserQueryCriteria criteria); + + Long countAll(@Param("criteria") UserQueryCriteria criteria); + + User findByUsername(@Param("username") String username); + + User findByEmail(@Param("email") String email); + + User findByPhone(@Param("phone") String phone); + + @Select("update sys_user set password = #{password} , pwd_reset_time = #{lastPasswordResetTime} where username = #{username}") + void updatePass(@Param("username") String username, @Param("password") String password, @Param("lastPasswordResetTime") Date lastPasswordResetTime); + + @Select("update sys_user set email = #{email} where username = #{username}") + void updateEmail(@Param("username") String username, @Param("email") String email); + + List findByRoleId(@Param("roleId") Long roleId); + + List findByRoleDeptId(@Param("deptId") Long deptId); + + List findByMenuId(@Param("menuId") Long menuId); + + int countByJobs(@Param("jobIds") Set jobIds); + + int countByDepts(@Param("deptIds") Set deptIds); + + int countByRoles(@Param("roleIds") Set roleIds); + + Integer resetPwd(@Param("userIds") Set userIds, @Param("pwd") String pwd); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserRoleMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserRoleMapper.java new file mode 100644 index 0000000..a9166bc --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/mapper/UserRoleMapper.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.mapper; + +import me.zhengjie.modules.system.domain.Role; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2023-06-20 + */ +@Mapper +public interface UserRoleMapper { + void insertData(@Param("userId") Long userId, @Param("roles") Set roles); + + void deleteByUserId(@Param("userId") Long userId); + + void deleteByUserIds(@Param("userIds") Set userIds); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/AssetController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/AssetController.java new file mode 100644 index 0000000..f170d6c --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/AssetController.java @@ -0,0 +1,122 @@ +package me.zhengjie.modules.system.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.domain.dto.*; +import me.zhengjie.modules.system.domain.vo.AccountVO; +import me.zhengjie.modules.system.domain.vo.AssetVO; +import me.zhengjie.modules.system.service.AssetService; +import me.zhengjie.utils.PageResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +@Api(tags = "会员资产") +@RestController +@RequestMapping("/asset") +public class AssetController { + @Autowired + private AssetService assetService; + + /** + * 资产列表 + * @return + */ + @ApiOperation("资产列表") + @GetMapping("/list") + public ResponseEntity> list(AssetConfigDTO assetConfigDTO){ + PageResult res=assetService.list(assetConfigDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + /** + * 修改资产 + * @return + */ + @ApiOperation("修改资产") + @PutMapping("/updateAsset") + public ResponseEntity updateAsset(@RequestBody AssetUpdateDTO assetUpdateDTO){ + Integer res=assetService.updateAsset(assetUpdateDTO); + if (res>0){ + return new ResponseEntity<>(res, HttpStatus.OK); + } + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } + /** + * 修改状态 + * @return + */ + @ApiOperation("修改状态") + @PutMapping("/updateAssetStatus") + public ResponseEntity updateAssetStatus(@RequestBody AssetUpdateStatusDTO status){ + Integer res=assetService.updateAssetStatus(status); + if (res>0){ + return new ResponseEntity<>(res, HttpStatus.OK); + } + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } + + /** + * ast列表 + * @return + */ + @ApiOperation("ast列表") + @GetMapping("/astlist") + public ResponseEntity> astlist(AstlistDTO astlistDTO){ + PageResult res=assetService.astlist(astlistDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + + /** + * usdt列表 + * @return + */ + @ApiOperation("usdt列表") + @GetMapping("/usdtlist") + public ResponseEntity> usdtlist(AstlistDTO astlistDTO){ + PageResult res=assetService.usdtlist(astlistDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + /** + * 注册空投明细 + * @return + */ + @ApiOperation("注册空投明细") + @GetMapping("/astregisterlist") + public ResponseEntity> astregisterlist(AstlistDTO astlistDTO){ + PageResult res=assetService.astregisterlist(astlistDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + /** + * 邀请注册空投明细 + * @return + */ + @ApiOperation("邀请注册空投明细") + @GetMapping("/astinvitationlist") + public ResponseEntity> astinvitationlist(AstlistDTO astlistDTO){ + PageResult res=assetService.astinvitationlist(astlistDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + /** + * AST质押明细 + * @return + */ + @ApiOperation("AST质押明细") + @GetMapping("/astpledgelist") + public ResponseEntity> astpledgelist(AstlistDTO astlistDTO){ + PageResult res=assetService.astpledgelist(astlistDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + /** + * AST质押奖励明细 + * @return + */ + @ApiOperation("AST质押奖励明细") + @GetMapping("/astpledgerewardlist") + public ResponseEntity> astpledgerewardlist(AstlistDTO astlistDTO){ + PageResult res=assetService.astpledgerewardlist(astlistDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/CountController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/CountController.java new file mode 100644 index 0000000..dab62ea --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/CountController.java @@ -0,0 +1,34 @@ +package me.zhengjie.modules.system.rest; + +import io.swagger.annotations.Api; +import me.zhengjie.annotation.rest.AnonymousGetMapping; +import me.zhengjie.annotation.rest.AnonymousPostMapping; +import me.zhengjie.modules.system.domain.vo.AssetVO; +import me.zhengjie.modules.system.domain.vo.CountVO; +import me.zhengjie.modules.system.service.CountService; +import me.zhengjie.utils.PageResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Api(tags = "统计") +@RestController +@RequestMapping("/ast") +public class CountController { + @Autowired + private CountService countService; + + /** + * 统计 + * @return + */ + @AnonymousGetMapping("/count") + private ResponseEntity count(){ + CountVO res= countService.count(); + return new ResponseEntity<>(res, HttpStatus.OK); + } + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DeptController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DeptController.java new file mode 100644 index 0000000..473b5c3 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DeptController.java @@ -0,0 +1,128 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import cn.hutool.core.collection.CollectionUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.domain.Dept; +import me.zhengjie.modules.system.service.DeptService; +import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.util.*; +import java.util.stream.Collectors; + +/** +* @author Zheng Jie +* @date 2019-03-25 +*/ +@RestController +@RequiredArgsConstructor +@Api(tags = "系统:部门管理") +@RequestMapping("/dept") +public class DeptController { + + private final DeptService deptService; + private static final String ENTITY_NAME = "dept"; + + @ApiOperation("导出部门数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('dept:list')") + public void exportDept(HttpServletResponse response, DeptQueryCriteria criteria) throws Exception { + deptService.download(deptService.queryAll(criteria, false), response); + } + + @ApiOperation("查询部门") + @GetMapping + @PreAuthorize("@el.check('user:list','dept:list')") + public ResponseEntity> queryDept(DeptQueryCriteria criteria) throws Exception { + List depts = deptService.queryAll(criteria, true); + return new ResponseEntity<>(PageUtil.toPage(depts),HttpStatus.OK); + } + + @ApiOperation("查询部门:根据ID获取同级与上级数据") + @PostMapping("/superior") + @PreAuthorize("@el.check('user:list','dept:list')") + public ResponseEntity getDeptSuperior(@RequestBody List ids, + @RequestParam(defaultValue = "false") Boolean exclude) { + Set deptSet = new LinkedHashSet<>(); + for (Long id : ids) { + Dept dept = deptService.findById(id); + List depts = deptService.getSuperior(dept, new ArrayList<>()); + if(exclude){ + for (Dept data : depts) { + if(data.getId().equals(dept.getPid())) { + data.setSubCount(data.getSubCount() - 1); + } + } + // 编辑部门时不显示自己以及自己下级的数据,避免出现PID数据环形问题 + depts = depts.stream().filter(i -> !ids.contains(i.getId())).collect(Collectors.toList()); + } + deptSet.addAll(depts); + } + return new ResponseEntity<>(deptService.buildTree(new ArrayList<>(deptSet)),HttpStatus.OK); + } + + @Log("新增部门") + @ApiOperation("新增部门") + @PostMapping + @PreAuthorize("@el.check('dept:add')") + public ResponseEntity createDept(@Validated @RequestBody Dept resources){ + if (resources.getId() != null) { + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); + } + deptService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改部门") + @ApiOperation("修改部门") + @PutMapping + @PreAuthorize("@el.check('dept:edit')") + public ResponseEntity updateDept(@Validated(Dept.Update.class) @RequestBody Dept resources){ + deptService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除部门") + @ApiOperation("删除部门") + @DeleteMapping + @PreAuthorize("@el.check('dept:del')") + public ResponseEntity deleteDept(@RequestBody Set ids){ + Set depts = new HashSet<>(); + for (Long id : ids) { + List deptList = deptService.findByPid(id); + depts.add(deptService.findById(id)); + if(CollectionUtil.isNotEmpty(deptList)){ + depts = deptService.getDeleteDepts(deptList, depts); + } + } + // 验证是否被角色或用户关联 + deptService.verification(depts); + deptService.delete(depts); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictController.java new file mode 100644 index 0000000..2c50d0d --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictController.java @@ -0,0 +1,101 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.domain.Dict; +import me.zhengjie.modules.system.service.DictService; +import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +@RestController +@RequiredArgsConstructor +@Api(tags = "系统:字典管理") +@RequestMapping("/api/dict") +public class DictController { + + private final DictService dictService; + private static final String ENTITY_NAME = "dict"; + + @ApiOperation("导出字典数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('dict:list')") + public void exportDict(HttpServletResponse response, DictQueryCriteria criteria) throws IOException { + dictService.download(dictService.queryAll(criteria), response); + } + + @ApiOperation("查询字典") + @GetMapping(value = "/all") + @PreAuthorize("@el.check('dict:list')") + public ResponseEntity> queryAllDict(){ + return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK); + } + + @ApiOperation("查询字典") + @GetMapping + @PreAuthorize("@el.check('dict:list')") + public ResponseEntity> queryDict(DictQueryCriteria resources, Page page){ + return new ResponseEntity<>(dictService.queryAll(resources, page),HttpStatus.OK); + } + + @Log("新增字典") + @ApiOperation("新增字典") + @PostMapping + @PreAuthorize("@el.check('dict:add')") + public ResponseEntity createDict(@Validated @RequestBody Dict resources){ + if (resources.getId() != null) { + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); + } + dictService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改字典") + @ApiOperation("修改字典") + @PutMapping + @PreAuthorize("@el.check('dict:edit')") + public ResponseEntity updateDict(@Validated(Dict.Update.class) @RequestBody Dict resources){ + dictService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除字典") + @ApiOperation("删除字典") + @DeleteMapping + @PreAuthorize("@el.check('dict:del')") + public ResponseEntity deleteDict(@RequestBody Set ids){ + dictService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictDetailController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictDetailController.java new file mode 100644 index 0000000..bcd3223 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictDetailController.java @@ -0,0 +1,96 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.domain.DictDetail; +import me.zhengjie.modules.system.service.DictDetailService; +import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +@RestController +@RequiredArgsConstructor +@Api(tags = "系统:字典详情管理") +@RequestMapping("/dictDetail") +public class DictDetailController { + + private final DictDetailService dictDetailService; + private static final String ENTITY_NAME = "dictDetail"; + + @ApiOperation("查询字典详情") + @GetMapping + public ResponseEntity> queryDictDetail(DictDetailQueryCriteria criteria, Page page){ + return new ResponseEntity<>(dictDetailService.queryAll(criteria, page),HttpStatus.OK); + } + + @ApiOperation("查询多个字典详情") + @GetMapping(value = "/map") + public ResponseEntity getDictDetailMaps(@RequestParam String dictName){ + String[] names = dictName.split("[,,]"); + Map> dictMap = new HashMap<>(16); + for (String name : names) { + dictMap.put(name, dictDetailService.getDictByName(name)); + } + return new ResponseEntity<>(dictMap, HttpStatus.OK); + } + + @Log("新增字典详情") + @ApiOperation("新增字典详情") + @PostMapping + @PreAuthorize("@el.check('dict:add')") + public ResponseEntity createDictDetail(@Validated @RequestBody DictDetail resources){ + if (resources.getId() != null) { + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); + } + dictDetailService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改字典详情") + @ApiOperation("修改字典详情") + @PutMapping + @PreAuthorize("@el.check('dict:edit')") + public ResponseEntity updateDictDetail(@Validated(DictDetail.Update.class) @RequestBody DictDetail resources){ + dictDetailService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除字典详情") + @ApiOperation("删除字典详情") + @DeleteMapping(value = "/{id}") + @PreAuthorize("@el.check('dict:del')") + public ResponseEntity deleteDictDetail(@PathVariable Long id){ + dictDetailService.delete(id); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/JobController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/JobController.java new file mode 100644 index 0000000..3692e2f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/JobController.java @@ -0,0 +1,95 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.domain.Job; +import me.zhengjie.modules.system.service.JobService; +import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2019-03-29 +*/ +@RestController +@RequiredArgsConstructor +@Api(tags = "系统:岗位管理") +@RequestMapping("/job") +public class JobController { + + private final JobService jobService; + private static final String ENTITY_NAME = "job"; + + @ApiOperation("导出岗位数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('job:list')") + public void exportJob(HttpServletResponse response, JobQueryCriteria criteria) throws IOException { + jobService.download(jobService.queryAll(criteria), response); + } + + @ApiOperation("查询岗位") + @GetMapping + @PreAuthorize("@el.check('job:list','user:list')") + public ResponseEntity> queryJob(JobQueryCriteria criteria, Page page){ + return new ResponseEntity<>(jobService.queryAll(criteria, page),HttpStatus.OK); + } + + @Log("新增岗位") + @ApiOperation("新增岗位") + @PostMapping + @PreAuthorize("@el.check('job:add')") + public ResponseEntity createJob(@Validated @RequestBody Job resources){ + if (resources.getId() != null) { + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); + } + jobService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改岗位") + @ApiOperation("修改岗位") + @PutMapping + @PreAuthorize("@el.check('job:edit')") + public ResponseEntity updateJob(@Validated(Job.Update.class) @RequestBody Job resources){ + jobService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除岗位") + @ApiOperation("删除岗位") + @DeleteMapping + @PreAuthorize("@el.check('job:del')") + public ResponseEntity deleteJob(@RequestBody Set ids){ + // 验证是否被用户关联 + jobService.verification(ids); + jobService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/LimitController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/LimitController.java new file mode 100644 index 0000000..02db642 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/LimitController.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import me.zhengjie.annotation.Limit; +import me.zhengjie.annotation.rest.AnonymousGetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @author / + * 接口限流测试类 + */ +@RestController +@RequestMapping("/api/limit") +@Api(tags = "系统:限流测试管理") +public class LimitController { + + private static final AtomicInteger ATOMIC_INTEGER = new AtomicInteger(); + + /** + * 测试限流注解,下面配置说明该接口 60秒内最多只能访问 10次,保存到redis的键名为 limit_test, + */ + @AnonymousGetMapping + @ApiOperation("测试") + @Limit(key = "test", period = 60, count = 10, name = "testLimit", prefix = "limit") + public int testLimit() { + return ATOMIC_INTEGER.incrementAndGet(); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemParameterController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemParameterController.java new file mode 100644 index 0000000..5f30bc8 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemParameterController.java @@ -0,0 +1,15 @@ +package me.zhengjie.modules.system.rest; + +import io.swagger.annotations.Api; +import me.zhengjie.modules.system.service.MemParameterService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Api(tags = "会员参数") +@RestController +@RequestMapping("/api/memParameter") +public class MemParameterController { + @Autowired + private MemParameterService memParameterService; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemberController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemberController.java new file mode 100644 index 0000000..4aaf854 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MemberController.java @@ -0,0 +1,60 @@ +package me.zhengjie.modules.system.rest; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.system.domain.Dept; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.domain.dto.MemberDTO; +import me.zhengjie.modules.system.domain.dto.PageDTO; +import me.zhengjie.modules.system.domain.vo.MemberVO; +import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; +import me.zhengjie.modules.system.service.MemberService; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import me.zhengjie.utils.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags = "会员列表") +@RestController +@RequestMapping("/memeber") +@RequiredArgsConstructor +public class MemberController { + @Autowired + private MemberService memberService; + @ApiOperation("查询用户") + @GetMapping +// @PreAuthorize("@el.check('user:list')") + public ResponseEntity> list(MemberDTO memberDTO){ + PageResult res=memberService.list(memberDTO); + return new ResponseEntity<>(res,HttpStatus.OK); + } + @ApiOperation("修改会员信息,禁用") + @PutMapping("/updateInfo") +// @PreAuthorize("@el.check('user:list')") + public ResponseEntity updateInfo(@RequestBody MemberDTO memberDTO){ + Integer res=memberService.updateInfo(memberDTO); + if (res>0){ + return new ResponseEntity<>(HttpStatus.OK); + } + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } + + @ApiOperation("查询用户详细信息") + @GetMapping("/selectMemberInfo") +// @PreAuthorize("@el.check('user:list')") + public ResponseEntity selectMemberInfo(String uid){ + MemberVO res=memberService.selectMemberInfo(uid); + return new ResponseEntity<>(res,HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MenuController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MenuController.java new file mode 100644 index 0000000..8e71a50 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MenuController.java @@ -0,0 +1,154 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import cn.hutool.core.collection.CollectionUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.modules.system.domain.Menu; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.domain.vo.MenuVo; +import me.zhengjie.modules.system.service.MenuService; +import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import me.zhengjie.utils.SecurityUtils; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + * @date 2018-12-03 + */ +@RestController +@RequiredArgsConstructor +@Api(tags = "系统:菜单管理") +@RequestMapping("/menus") +public class MenuController { + + private final MenuService menuService; + private static final String ENTITY_NAME = "menu"; + + @ApiOperation("导出菜单数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('menu:list')") + public void exportMenu(HttpServletResponse response, MenuQueryCriteria criteria) throws Exception { + menuService.download(menuService.queryAll(criteria, false), response); + } + + @GetMapping(value = "/build") + @ApiOperation("获取前端所需菜单") + public ResponseEntity> buildMenus(){ + + List menuList = menuService.findByUser(SecurityUtils.getCurrentUserId()); + List menus = menuService.buildTree(menuList); + return new ResponseEntity<>(menuService.buildMenus(menus),HttpStatus.OK); + } + + @ApiOperation("返回全部的菜单") + @GetMapping(value = "/lazy") + @PreAuthorize("@el.check('menu:list','roles:list')") + public ResponseEntity> queryAllMenu(@RequestParam Long pid){ + return new ResponseEntity<>(menuService.getMenus(pid),HttpStatus.OK); + } + + @ApiOperation("根据菜单ID返回所有子节点ID,包含自身ID") + @GetMapping(value = "/child") + @PreAuthorize("@el.check('menu:list','roles:list')") + public ResponseEntity childMenu(@RequestParam Long id){ + Set menuSet = new HashSet<>(); + List menuList = menuService.getMenus(id); + menuSet.add(menuService.getById(id)); + menuSet = menuService.getChildMenus(menuList, menuSet); + Set ids = menuSet.stream().map(Menu::getId).collect(Collectors.toSet()); + return new ResponseEntity<>(ids,HttpStatus.OK); + } + + @GetMapping + @ApiOperation("查询菜单") + @PreAuthorize("@el.check('menu:list')") + public ResponseEntity> queryMenu(MenuQueryCriteria criteria) throws Exception { + List menuList = menuService.queryAll(criteria, true); + return new ResponseEntity<>(PageUtil.toPage(menuList),HttpStatus.OK); + } + + @ApiOperation("查询菜单:根据ID获取同级与上级数据") + @PostMapping("/superior") + @PreAuthorize("@el.check('menu:list')") + public ResponseEntity> getMenuSuperior(@RequestBody List ids) { + Set menus = new LinkedHashSet<>(); + if(CollectionUtil.isNotEmpty(ids)){ + for (Long id : ids) { + Menu menu = menuService.findById(id); + List menuList = menuService.getSuperior(menu, new ArrayList<>()); + for (Menu data : menuList) { + if(data.getId().equals(menu.getPid())) { + data.setSubCount(data.getSubCount() - 1); + } + } + menus.addAll(menuList); + } + // 编辑菜单时不显示自己以及自己下级的数据,避免出现PID数据环形问题 + menus = menus.stream().filter(i -> !ids.contains(i.getId())).collect(Collectors.toSet()); + return new ResponseEntity<>(menuService.buildTree(new ArrayList<>(menus)),HttpStatus.OK); + } + return new ResponseEntity<>(menuService.getMenus(null),HttpStatus.OK); + } + + @Log("新增菜单") + @ApiOperation("新增菜单") + @PostMapping + @PreAuthorize("@el.check('menu:add')") + public ResponseEntity createMenu(@Validated @RequestBody Menu resources){ + if (resources.getId() != null) { + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); + } + menuService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改菜单") + @ApiOperation("修改菜单") + @PutMapping + @PreAuthorize("@el.check('menu:edit')") + public ResponseEntity updateMenu(@Validated(Menu.Update.class) @RequestBody Menu resources){ + menuService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除菜单") + @ApiOperation("删除菜单") + @DeleteMapping + @PreAuthorize("@el.check('menu:del')") + public ResponseEntity deleteMenu(@RequestBody Set ids){ + Set menuSet = new HashSet<>(); + for (Long id : ids) { + List menuList = menuService.getMenus(id); + menuSet.add(menuService.getById(id)); + menuSet = menuService.getChildMenus(menuList, menuSet); + } + menuService.delete(menuSet); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MonitorController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MonitorController.java new file mode 100644 index 0000000..e992dba --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MonitorController.java @@ -0,0 +1,45 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.system.service.MonitorService; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +/** + * @author Zheng Jie + * @date 2020-05-02 + */ +@RestController +@RequiredArgsConstructor +@Api(tags = "系统-服务监控管理") +@RequestMapping("/monitor") +public class MonitorController { + + private final MonitorService serverService; + + @GetMapping + @ApiOperation("查询服务监控") + @PreAuthorize("@el.check('monitor:list')") + public ResponseEntity queryMonitor(){ + return new ResponseEntity<>(serverService.getServers(),HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/RoleController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/RoleController.java new file mode 100644 index 0000000..3be6f54 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/RoleController.java @@ -0,0 +1,153 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import cn.hutool.core.lang.Dict; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.service.RoleService; +import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.SecurityUtils; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + * @date 2018-12-03 + */ +@RestController +@RequiredArgsConstructor +@Api(tags = "系统:角色管理") +@RequestMapping("/roles") +public class RoleController { + + private final RoleService roleService; + + private static final String ENTITY_NAME = "role"; + + @ApiOperation("获取单个role") + @GetMapping(value = "/{id}") + @PreAuthorize("@el.check('roles:list')") + public ResponseEntity findRoleById(@PathVariable Long id){ + return new ResponseEntity<>(roleService.findById(id), HttpStatus.OK); + } + + @ApiOperation("导出角色数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('role:list')") + public void exportRole(HttpServletResponse response, RoleQueryCriteria criteria) throws IOException { + roleService.download(roleService.queryAll(criteria), response); + } + + @ApiOperation("返回全部的角色") + @GetMapping(value = "/all") + @PreAuthorize("@el.check('roles:list','user:add','user:edit')") + public ResponseEntity> queryAllRole(){ + return new ResponseEntity<>(roleService.queryAll(),HttpStatus.OK); + } + + @ApiOperation("查询角色") + @GetMapping + @PreAuthorize("@el.check('roles:list')") + public ResponseEntity> queryRole(RoleQueryCriteria criteria, Page page){ + return new ResponseEntity<>(roleService.queryAll(criteria, page),HttpStatus.OK); + } + + @ApiOperation("获取用户级别") + @GetMapping(value = "/level") + public ResponseEntity getRoleLevel(){ + return new ResponseEntity<>(Dict.create().set("level", getLevels(null)),HttpStatus.OK); + } + + @Log("新增角色") + @ApiOperation("新增角色") + @PostMapping + @PreAuthorize("@el.check('roles:add')") + public ResponseEntity createRole(@Validated @RequestBody Role resources){ + if (resources.getId() != null) { + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); + } + getLevels(resources.getLevel()); + roleService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改角色") + @ApiOperation("修改角色") + @PutMapping + @PreAuthorize("@el.check('roles:edit')") + public ResponseEntity updateRole(@Validated(Role.Update.class) @RequestBody Role resources){ + getLevels(resources.getLevel()); + roleService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("修改角色菜单") + @ApiOperation("修改角色菜单") + @PutMapping(value = "/menu") + @PreAuthorize("@el.check('roles:edit')") + public ResponseEntity updateRoleMenu(@RequestBody Role resources){ + Role role = roleService.getById(resources.getId()); + getLevels(role.getLevel()); + roleService.updateMenu(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除角色") + @ApiOperation("删除角色") + @DeleteMapping + @PreAuthorize("@el.check('roles:del')") + public ResponseEntity deleteRole(@RequestBody Set ids){ + for (Long id : ids) { + Role role = roleService.getById(id); + getLevels(role.getLevel()); + } + // 验证是否被用户关联 + roleService.verification(ids); + roleService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + /** + * 获取用户的角色级别 + * @return / + */ + private int getLevels(Integer level){ + List levels = roleService.findByUsersId(SecurityUtils.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList()); + int min = Collections.min(levels); + if(level != null){ + if(level < min){ + throw new BadRequestException("权限不足,你的角色级别:" + min + ",低于操作的角色级别:" + level); + } + } + return min; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/TeamController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/TeamController.java new file mode 100644 index 0000000..358d57b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/TeamController.java @@ -0,0 +1,53 @@ +package me.zhengjie.modules.system.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import me.zhengjie.modules.system.domain.dto.TeamDTO; +import me.zhengjie.modules.system.domain.dto.UpDownTeamDTO; +import me.zhengjie.modules.system.service.TeamService; +import me.zhengjie.utils.PageResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Api(tags = "团队列表") +@RestController +@RequestMapping("/team") +public class TeamController { + @Autowired + private TeamService teamService; + + /** + * 团队查询 + * @return + */ + @ApiOperation("团队列表") + @GetMapping("/list") + public ResponseEntity> list(TeamDTO teamDTO){ + PageResult res=teamService.list(teamDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + /** + * 查看上级团队列表 + * @return + */ + @ApiOperation("查看上级团队") + @GetMapping("/upTeamList") + public ResponseEntity> upTeamList(UpDownTeamDTO teamDTO){ + PageResult res=teamService.upTeamList(teamDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } + /** + * 查看下级团队列表 + * @return + */ + @ApiOperation("查看下级团队") + @GetMapping("/downTeamList") + public ResponseEntity> downTeamList(UpDownTeamDTO teamDTO){ + PageResult res=teamService.downTeamList(teamDTO); + return new ResponseEntity<>(res, HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java new file mode 100644 index 0000000..6ced4f0 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java @@ -0,0 +1,210 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.annotation.rest.AnonymousPostMapping; +import me.zhengjie.config.RsaProperties; +import me.zhengjie.modules.system.domain.Dept; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.modules.system.service.DataService; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.domain.vo.UserPassVo; +import me.zhengjie.modules.system.service.DeptService; +import me.zhengjie.modules.system.service.RoleService; +import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; +import me.zhengjie.modules.system.service.VerifyService; +import me.zhengjie.utils.*; +import me.zhengjie.modules.system.service.UserService; +import me.zhengjie.utils.enums.CodeEnum; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +@Api(tags = "系统:用户管理") +@RestController +@RequestMapping("/users") +@RequiredArgsConstructor +public class UserController { + + private final PasswordEncoder passwordEncoder; + private final UserService userService; + private final DataService dataService; + private final DeptService deptService; + private final RoleService roleService; + private final VerifyService verificationCodeService; + + @ApiOperation("导出用户数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('user:list')") + public void exportUser(HttpServletResponse response, UserQueryCriteria criteria) throws IOException { + userService.download(userService.queryAll(criteria), response); + } + + @ApiOperation("查询用户") + @GetMapping + @PreAuthorize("@el.check('user:list')") + public ResponseEntity> queryUser(UserQueryCriteria criteria, Page page){ + if (!ObjectUtils.isEmpty(criteria.getDeptId())) { + criteria.getDeptIds().add(criteria.getDeptId()); + // 先查找是否存在子节点 + List data = deptService.findByPid(criteria.getDeptId()); + // 然后把子节点的ID都加入到集合中 + criteria.getDeptIds().addAll(deptService.getDeptChildren(data)); + } + // 数据权限 + List dataScopes = dataService.getDeptIds(userService.findByName(SecurityUtils.getCurrentUsername())); + // criteria.getDeptIds() 不为空并且数据权限不为空则取交集 + if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)){ + // 取交集 + criteria.getDeptIds().retainAll(dataScopes); + if(!CollectionUtil.isEmpty(criteria.getDeptIds())){ + return new ResponseEntity<>(userService.queryAll(criteria,page),HttpStatus.OK); + } + } else { + // 否则取并集 + criteria.getDeptIds().addAll(dataScopes); + return new ResponseEntity<>(userService.queryAll(criteria,page),HttpStatus.OK); + } + return new ResponseEntity<>(PageUtil.noData(),HttpStatus.OK); + } + + @Log("新增用户") + @ApiOperation("新增用户") + @PostMapping + @PreAuthorize("@el.check('user:add')") + public ResponseEntity createUser(@Validated @RequestBody User resources){ + checkLevel(resources); + // 默认密码 123456 + resources.setPassword(passwordEncoder.encode("123456")); + userService.create(resources); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @Log("修改用户") + @ApiOperation("修改用户") + @PutMapping + @PreAuthorize("@el.check('user:edit')") + public ResponseEntity updateUser(@Validated(User.Update.class) @RequestBody User resources) throws Exception { + checkLevel(resources); + userService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("修改用户:个人中心") + @ApiOperation("修改用户:个人中心") + @PutMapping(value = "center") + public ResponseEntity centerUser(@Validated(User.Update.class) @RequestBody User resources){ + if(!resources.getId().equals(SecurityUtils.getCurrentUserId())){ + throw new BadRequestException("不能修改他人资料"); + } + userService.updateCenter(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除用户") + @ApiOperation("删除用户") + @DeleteMapping + @PreAuthorize("@el.check('user:del')") + public ResponseEntity deleteUser(@RequestBody Set ids){ + for (Long id : ids) { + Integer currentLevel = Collections.min(roleService.findByUsersId(SecurityUtils.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList())); + Integer optLevel = Collections.min(roleService.findByUsersId(id).stream().map(Role::getLevel).collect(Collectors.toList())); + if (currentLevel > optLevel) { + throw new BadRequestException("角色权限不足,不能删除:" + userService.findById(id).getUsername()); + } + } + userService.delete(ids); + return new ResponseEntity<>(HttpStatus.OK); + } + + @ApiOperation("修改密码") + @PostMapping(value = "/updatePass") + public ResponseEntity updateUserPass(@RequestBody UserPassVo passVo) throws Exception { + String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getOldPass()); + String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getNewPass()); + User user = userService.findByName(SecurityUtils.getCurrentUsername()); + if(!passwordEncoder.matches(oldPass, user.getPassword())){ + throw new BadRequestException("修改失败,旧密码错误"); + } + if(passwordEncoder.matches(newPass, user.getPassword())){ + throw new BadRequestException("新密码不能与旧密码相同"); + } + userService.updatePass(user.getUsername(),passwordEncoder.encode(newPass)); + return new ResponseEntity<>(HttpStatus.OK); + } + + @ApiOperation("重置密码") + @AnonymousPostMapping(value = "/resetPwd") + public ResponseEntity resetPwd(@RequestBody Set ids) { + String pwd = passwordEncoder.encode("123456"); + userService.resetPwd(ids, pwd); + return new ResponseEntity<>(HttpStatus.OK); + } + + + @ApiOperation("修改头像") + @PostMapping(value = "/updateAvatar") + public ResponseEntity updateUserAvatar(@RequestParam MultipartFile avatar){ + return new ResponseEntity<>(userService.updateAvatar(avatar), HttpStatus.OK); + } + + @Log("修改邮箱") + @ApiOperation("修改邮箱") + @PostMapping(value = "/updateEmail/{code}") + public ResponseEntity updateUserEmail(@PathVariable String code, @RequestBody User resources) throws Exception { + String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,resources.getPassword()); + User user = userService.findByName(SecurityUtils.getCurrentUsername()); + if(!passwordEncoder.matches(password, user.getPassword())){ + throw new BadRequestException("密码错误"); + } + verificationCodeService.validated(CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey() + resources.getEmail(), code); + userService.updateEmail(user.getUsername(),resources.getEmail()); + return new ResponseEntity<>(HttpStatus.OK); + } + + /** + * 如果当前用户的角色级别低于创建用户的角色级别,则抛出权限不足的错误 + * @param resources / + */ + private void checkLevel(User resources) { + Integer currentLevel = Collections.min(roleService.findByUsersId(SecurityUtils.getCurrentUserId()).stream().map(Role::getLevel).collect(Collectors.toList())); + Integer optLevel = roleService.findByRoles(resources.getRoles()); + if (currentLevel > optLevel) { + throw new BadRequestException("角色权限不足"); + } + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/VerifyController.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/VerifyController.java new file mode 100644 index 0000000..09ba44b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/VerifyController.java @@ -0,0 +1,76 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.vo.EmailVo; +import me.zhengjie.service.EmailService; +import me.zhengjie.modules.system.service.VerifyService; +import me.zhengjie.utils.enums.CodeBiEnum; +import me.zhengjie.utils.enums.CodeEnum; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import java.util.Objects; + +/** + * @author Zheng Jie + * @date 2018-12-26 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/code") +@Api(tags = "系统:验证码管理") +public class VerifyController { + + private final VerifyService verificationCodeService; + private final EmailService emailService; + + @PostMapping(value = "/resetEmail") + @ApiOperation("重置邮箱,发送验证码") + public ResponseEntity resetEmail(@RequestParam String email){ + EmailVo emailVo = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey()); + emailService.send(emailVo,emailService.find()); + return new ResponseEntity<>(HttpStatus.OK); + } + + @PostMapping(value = "/email/resetPass") + @ApiOperation("重置密码,发送验证码") + public ResponseEntity resetPass(@RequestParam String email){ + EmailVo emailVo = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_PWD_CODE.getKey()); + emailService.send(emailVo,emailService.find()); + return new ResponseEntity<>(HttpStatus.OK); + } + + @GetMapping(value = "/validated") + @ApiOperation("验证码验证") + public ResponseEntity validated(@RequestParam String email, @RequestParam String code, @RequestParam Integer codeBi){ + CodeBiEnum biEnum = CodeBiEnum.find(codeBi); + switch (Objects.requireNonNull(biEnum)){ + case ONE: + verificationCodeService.validated(CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey() + email ,code); + break; + case TWO: + verificationCodeService.validated(CodeEnum.EMAIL_RESET_PWD_CODE.getKey() + email ,code); + break; + default: + break; + } + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/AssetService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/AssetService.java new file mode 100644 index 0000000..b18df37 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/AssetService.java @@ -0,0 +1,29 @@ +package me.zhengjie.modules.system.service; + +import me.zhengjie.modules.system.domain.dto.AssetConfigDTO; +import me.zhengjie.modules.system.domain.dto.AssetUpdateDTO; +import me.zhengjie.modules.system.domain.dto.AssetUpdateStatusDTO; +import me.zhengjie.modules.system.domain.dto.AstlistDTO; +import me.zhengjie.modules.system.domain.vo.AccountVO; +import me.zhengjie.modules.system.domain.vo.AssetVO; +import me.zhengjie.utils.PageResult; + +public interface AssetService { + PageResult list(AssetConfigDTO assetConfigDTO); + + Integer updateAsset(AssetUpdateDTO assetUpdateDTO); + + Integer updateAssetStatus(AssetUpdateStatusDTO status); + + PageResult astlist(AstlistDTO astlistDTO); + + PageResult usdtlist(AstlistDTO astlistDTO); + + PageResult astregisterlist(AstlistDTO astlistDTO); + + PageResult astinvitationlist(AstlistDTO astlistDTO); + + PageResult astpledgelist(AstlistDTO astlistDTO); + + PageResult astpledgerewardlist(AstlistDTO astlistDTO); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/CountService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/CountService.java new file mode 100644 index 0000000..8443b1b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/CountService.java @@ -0,0 +1,8 @@ +package me.zhengjie.modules.system.service; + +import me.zhengjie.modules.system.domain.vo.CountVO; + +public interface CountService { + CountVO count(); + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DataService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DataService.java new file mode 100644 index 0000000..42bd46d --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DataService.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import me.zhengjie.modules.system.domain.User; +import java.util.List; + +/** + * 数据权限服务类 + * @author Zheng Jie + * @date 2020-05-07 + */ +public interface DataService { + + /** + * 获取数据权限 + * @param user / + * @return / + */ + List getDeptIds(User user); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DeptService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DeptService.java new file mode 100644 index 0000000..670270e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DeptService.java @@ -0,0 +1,124 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.system.domain.Dept; +import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2019-03-25 +*/ +public interface DeptService extends IService { + + /** + * 查询所有数据 + * @param criteria 条件 + * @param isQuery / + * @throws Exception / + * @return / + */ + List queryAll(DeptQueryCriteria criteria, Boolean isQuery) throws Exception; + + /** + * 根据ID查询 + * @param id / + * @return / + */ + Dept findById(Long id); + + /** + * 创建 + * @param resources / + */ + void create(Dept resources); + + /** + * 编辑 + * @param resources / + */ + void update(Dept resources); + + /** + * 删除 + * @param depts / + * + */ + void delete(Set depts); + + /** + * 根据PID查询 + * @param pid / + * @return / + */ + List findByPid(long pid); + + /** + * 根据角色ID查询 + * @param id / + * @return / + */ + Set findByRoleId(Long id); + + /** + * 导出数据 + * @param depts 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List depts, HttpServletResponse response) throws IOException; + + /** + * 获取待删除的部门 + * @param deptList / + * @param depts / + * @return / + */ + Set getDeleteDepts(List deptList, Set depts); + + /** + * 根据ID获取同级与上级数据 + * @param dept / + * @param depts / + * @return / + */ + List getSuperior(Dept dept, List depts); + + /** + * 构建树形数据 + * @param depts / + * @return / + */ + Object buildTree(List depts); + + /** + * 获取 + * @param deptList 、 + * @return 、 + */ + List getDeptChildren(List deptList); + + /** + * 验证是否被角色或用户关联 + * @param depts / + */ + void verification(Set depts); +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictDetailService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictDetailService.java new file mode 100644 index 0000000..0432dca --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictDetailService.java @@ -0,0 +1,65 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.system.domain.DictDetail; +import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; +import me.zhengjie.utils.PageResult; + +import java.util.List; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +public interface DictDetailService extends IService { + + /** + * 创建 + * @param resources / + */ + void create(DictDetail resources); + + /** + * 编辑 + * @param resources / + */ + void update(DictDetail resources); + + /** + * 删除 + * @param id / + */ + void delete(Long id); + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(DictDetailQueryCriteria criteria, Page page); + + /** + * 根据字典名称获取字典详情 + * @param name 字典名称 + * @return / + */ + List getDictByName(String name); +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictService.java new file mode 100644 index 0000000..ae737c1 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictService.java @@ -0,0 +1,76 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.system.domain.Dict; +import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +public interface DictService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(DictQueryCriteria criteria, Page page); + + /** + * 查询全部数据 + * @param criteria / + * @return / + */ + List queryAll(DictQueryCriteria criteria); + + /** + * 创建 + * @param resources / + */ + void create(Dict resources); + + /** + * 编辑 + * @param resources / + */ + void update(Dict resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 导出数据 + * @param queryAll 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List queryAll, HttpServletResponse response) throws IOException; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/JobService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/JobService.java new file mode 100644 index 0000000..c65c609 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/JobService.java @@ -0,0 +1,89 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.system.domain.Job; +import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** +* @author Zheng Jie +* @date 2019-03-29 +*/ +public interface JobService extends IService { + + /** + * 根据ID查询 + * @param id / + * @return / + */ + Job findById(Long id); + + /** + * 创建 + * @param resources / + */ + void create(Job resources); + + /** + * 编辑 + * @param resources / + */ + void update(Job resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(JobQueryCriteria criteria, Page page); + + /** + * 查询全部数据 + * @param criteria / + * @return / + */ + List queryAll(JobQueryCriteria criteria); + + /** + * 导出数据 + * @param jobs 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List jobs, HttpServletResponse response) throws IOException; + + /** + * 验证是否被用户关联 + * @param ids / + */ + void verification(Set ids); +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemParameterService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemParameterService.java new file mode 100644 index 0000000..ac70b6f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemParameterService.java @@ -0,0 +1,4 @@ +package me.zhengjie.modules.system.service; + +public interface MemParameterService { +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemberService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemberService.java new file mode 100644 index 0000000..4e6ece7 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MemberService.java @@ -0,0 +1,18 @@ +package me.zhengjie.modules.system.service; + +import me.zhengjie.modules.system.domain.dto.MemberDTO; +import me.zhengjie.modules.system.domain.vo.MemberVO; +import me.zhengjie.utils.PageResult; + +public interface MemberService { + /** + * 会员列表 + * @param memberDTO + * @return + */ + PageResult list(MemberDTO memberDTO); + + Integer updateInfo(MemberDTO memberDTO); + + MemberVO selectMemberInfo(String uid); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MenuService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MenuService.java new file mode 100644 index 0000000..4c25192 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MenuService.java @@ -0,0 +1,119 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.system.domain.Menu; +import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; +import me.zhengjie.modules.system.domain.vo.MenuVo; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2018-12-17 + */ +public interface MenuService extends IService { + + /** + * 查询全部数据 + * @param criteria 条件 + * @param isQuery / + * @throws Exception / + * @return / + */ + List queryAll(MenuQueryCriteria criteria, Boolean isQuery) throws Exception; + + /** + * 根据ID查询 + * @param id / + * @return / + */ + Menu findById(long id); + + /** + * 创建 + * @param resources / + */ + void create(Menu resources); + + /** + * 编辑 + * @param resources / + */ + void update(Menu resources); + + /** + * 获取所有子节点,包含自身ID + * @param menuList / + * @param menuSet / + * @return / + */ + Set getChildMenus(List menuList, Set menuSet); + + /** + * 构建菜单树 + * @param menus 原始数据 + * @return / + */ + List buildTree(List menus); + + /** + * 构建菜单树 + * @param menus / + * @return / + */ + List buildMenus(List menus); + + /** + * 删除 + * @param menuSet / + */ + void delete(Set menuSet); + + /** + * 导出 + * @param menus 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List menus, HttpServletResponse response) throws IOException; + + /** + * 懒加载菜单数据 + * @param pid / + * @return / + */ + List getMenus(Long pid); + + /** + * 根据ID获取同级与上级数据 + * @param menu / + * @param objects / + * @return / + */ + List getSuperior(Menu menu, List objects); + + /** + * 根据当前用户获取菜单 + * @param currentUserId / + * @return / + */ + List findByUser(Long currentUserId); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MonitorService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MonitorService.java new file mode 100644 index 0000000..478225a --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/MonitorService.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import java.util.Map; + +/** + * @author Zheng Jie + * @date 2020-05-02 + */ +public interface MonitorService { + + /** + * 查询数据分页 + * @return Map + */ + Map getServers(); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/RoleService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/RoleService.java new file mode 100644 index 0000000..7d500fe --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/RoleService.java @@ -0,0 +1,131 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.security.service.dto.AuthorityDto; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; +import me.zhengjie.utils.PageResult; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2018-12-03 + */ +public interface RoleService extends IService { + + /** + * 查询全部数据 + * @return / + */ + List queryAll(); + + /** + * 根据ID查询 + * @param id / + * @return / + */ + Role findById(long id); + + /** + * 创建 + * @param resources / + */ + void create(Role resources); + + /** + * 编辑 + * @param resources / + */ + void update(Role resources); + + /** + * 删除 + * @param ids / + */ + void delete(Set ids); + + /** + * 根据用户ID查询 + * @param userId 用户ID + * @return / + */ + List findByUsersId(Long userId); + + /** + * 根据角色查询角色级别 + * @param roles / + * @return / + */ + Integer findByRoles(Set roles); + + /** + * 修改绑定的菜单 + * @param resources / + */ + void updateMenu(Role resources); + + /** + * 待条件分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(RoleQueryCriteria criteria, Page page); + + /** + * 查询全部 + * @param criteria 条件 + * @return / + */ + List queryAll(RoleQueryCriteria criteria); + + /** + * 导出数据 + * @param roles 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List roles, HttpServletResponse response) throws IOException; + + /** + * 获取用户权限信息 + * @param user 用户信息 + * @return 权限信息 + */ + List mapToGrantedAuthorities(User user); + + /** + * 验证是否被用户关联 + * @param ids / + */ + void verification(Set ids); + + /** + * 根据菜单Id查询 + * @param menuId / + * @return / + */ + List findByMenuId(Long menuId); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/TeamService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/TeamService.java new file mode 100644 index 0000000..42ad374 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/TeamService.java @@ -0,0 +1,13 @@ +package me.zhengjie.modules.system.service; + +import me.zhengjie.modules.system.domain.dto.TeamDTO; +import me.zhengjie.modules.system.domain.dto.UpDownTeamDTO; +import me.zhengjie.utils.PageResult; + +public interface TeamService { + PageResult list(TeamDTO teamDTO); + + PageResult upTeamList(UpDownTeamDTO teamDTO); + + PageResult downTeamList(UpDownTeamDTO teamDTO); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/UserService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/UserService.java new file mode 100644 index 0000000..4758dfa --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/UserService.java @@ -0,0 +1,136 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +public interface UserService extends IService { + + /** + * 根据ID查询 + * + * @param id ID + * @return / + */ + User findById(long id); + + /** + * 新增用户 + * @param resources / + */ + void create(User resources); + + /** + * 编辑用户 + * @param resources / + * @throws Exception / + */ + void update(User resources) throws Exception; + + /** + * 删除用户 + * @param ids / + */ + void delete(Set ids); + + /** + * 根据用户名查询 + * + * @param userName / + * @return / + */ + User findByName(String userName); + + /** + * 根据用户名查询 + * @param userName / + * @return / + */ + User getLoginData(String userName); + + /** + * 修改密码 + * @param username 用户名 + * @param encryptPassword 密码 + */ + void updatePass(String username, String encryptPassword); + + /** + * 修改头像 + * @param file 文件 + * @return / + */ + Map updateAvatar(MultipartFile file); + + /** + * 修改邮箱 + * @param username 用户名 + * @param email 邮箱 + */ + void updateEmail(String username, String email); + + /** + * 查询全部 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(UserQueryCriteria criteria, Page page); + + /** + * 查询全部不分页 + * + * @param criteria 条件 + * @return / + */ + List queryAll(UserQueryCriteria criteria); + + /** + * 导出数据 + * @param queryAll 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List queryAll, HttpServletResponse response) throws IOException; + + /** + * 用户自助修改资料 + * @param resources / + */ + void updateCenter(User resources); + + /** + * 重置密码 + * @param ids 用户id + * @param pwd 密码 + */ + void resetPwd(Set ids, String pwd); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/VerifyService.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/VerifyService.java new file mode 100644 index 0000000..4ca39b9 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/VerifyService.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service; + +import me.zhengjie.domain.vo.EmailVo; + +/** + * @author Zheng Jie + * @date 2018-12-26 + */ +public interface VerifyService { + + /** + * 发送验证码 + * @param email / + * @param key / + * @return / + */ + EmailVo sendEmail(String email, String key); + + + /** + * 验证 + * @param code / + * @param key / + */ + void validated(String key, String code); +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/AssetServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/AssetServiceImpl.java new file mode 100644 index 0000000..7a5593b --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/AssetServiceImpl.java @@ -0,0 +1,266 @@ +package me.zhengjie.modules.system.service.impl; + +import io.swagger.annotations.ApiModelProperty; +import me.zhengjie.modules.system.domain.bo.TransactionBO; +import me.zhengjie.modules.system.domain.dto.AssetConfigDTO; +import me.zhengjie.modules.system.domain.dto.AssetUpdateDTO; +import me.zhengjie.modules.system.domain.dto.AssetUpdateStatusDTO; +import me.zhengjie.modules.system.domain.dto.AstlistDTO; +import me.zhengjie.modules.system.domain.vo.AccountVO; +import me.zhengjie.modules.system.domain.vo.AssetVO; +import me.zhengjie.modules.system.mapper.AssetMapper; +import me.zhengjie.modules.system.service.AssetService; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import me.zhengjie.utils.SecurityUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; +import java.util.List; +import java.util.TimeZone; + +@Service +public class AssetServiceImpl implements AssetService { + @Autowired + private AssetMapper assetMapper; + /** + * 资产列表 + * @param assetConfigDTO + * @return + */ + @Override + public PageResult list(AssetConfigDTO assetConfigDTO) { + List res=assetMapper.list(assetConfigDTO); + Long totle=assetMapper.selectCount(assetConfigDTO); + return PageUtil.toPage(res, totle); + } + + /** + * 修改资产 + * @param assetUpdateDTO + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Integer updateAsset(AssetUpdateDTO assetUpdateDTO) { + String name=""; + switch ((assetUpdateDTO.getType())){ + case "balance": + assetUpdateDTO.setType("balance"); + name="pro_member_balance_trade"; + break; + case "coinone": + assetUpdateDTO.setType("coin_one"); + name="pro_member_coin_one_trade"; + break; + case "cointwo": + assetUpdateDTO.setType("coin_two"); + name="pro_member_coin_two_trade"; + break; + case "cointhree": + assetUpdateDTO.setType("coin_three"); + name="pro_member_coin_three_trade"; + break; + case "coinfour": + assetUpdateDTO.setType("coin_four"); + name="pro_member_coin_four_trade"; + break; + case "coinfive": + assetUpdateDTO.setType("coin_five"); + name="pro_member_coin_five_trade"; + break; + case "usdt": + assetUpdateDTO.setType("usdt"); + name="pro_member_usdt_trade"; + break; + } + TransactionBO transactionBO = new TransactionBO(); + //查询交易前资产 + BigDecimal res1=assetMapper.selectprice(assetUpdateDTO.getType(),assetUpdateDTO.getMember_id()); + if (res1 ==null){ + res1=BigDecimal.ZERO; + } + //查询最新的金额 +// BigDecimal aftervalue=assetMapper.selectLastAmount(assetUpdateDTO.getMember_id(),name); +// if (aftervalue ==null){ +// aftervalue=BigDecimal.ZERO; +// } + + //判断支出还是收入 + BigDecimal subtract; + if (assetUpdateDTO.getTrade_type()==1){ + assetUpdateDTO.setTitle("system_transfer_out"); + transactionBO.setTradevalue(1); + transactionBO.setTradeitem(2); + subtract= res1.subtract(assetUpdateDTO.getValue()); + if (subtract.compareTo(BigDecimal.ZERO)<0){ + throw new RuntimeException("余额不足"); + } + }else{ + assetUpdateDTO.setTitle("system_transfer_in"); + transactionBO.setTradeitem(1); + transactionBO.setTradevalue(0); + //收入金额 + subtract = res1.add(assetUpdateDTO.getValue()); + } + + BeanUtils.copyProperties(assetUpdateDTO,transactionBO); + transactionBO.setAfter_value(subtract); + transactionBO.setBefore_value(res1); + transactionBO.setCurrentUsername(SecurityUtils.getCurrentUsername()); + + //新增资产明细表 + Integer res=assetMapper.InsertAsset(transactionBO,name); + //新增后台记录表 + assetMapper.InsertManagement(transactionBO); + //修改会员总资产 + assetMapper.updateAsset(transactionBO,res1); + + return res; + } + + /** + * 修改状态 + * @param status + * @return + */ + @Override + public Integer updateAssetStatus(AssetUpdateStatusDTO status) { + Integer res=assetMapper.updateAssetStatus(status); + return res; + } + + /** + * ast列表 + * @param astlistDTO + * @return + */ + @Override + public PageResult astlist(AstlistDTO astlistDTO) { + List list=assetMapper.astlist(astlistDTO); + list.forEach(item->{ + String managementname=assetMapper.selectManagement(item.getId(), item.getMemberid()); + item.setCurrentUsername(managementname); + ZonedDateTime zonedDateTime = item.getCreateTime().toInstant().atZone(ZoneId.systemDefault()); + ZonedDateTime newTime = zonedDateTime.plus(8, ChronoUnit.HOURS); + Timestamp resultTimestamp = Timestamp.from(newTime.toInstant()); + item.setCreateTime(resultTimestamp); + + }); + Long totle=assetMapper.selectAst(astlistDTO); + return PageUtil.toPage(list,totle); + } + + /** + * usdt列表 + * @param astlistDTO + * @return + */ + @Override + public PageResult usdtlist(AstlistDTO astlistDTO) { + List list=assetMapper.usdtlist(astlistDTO); + list.forEach(item->{ + String managementname=assetMapper.selectManagement(item.getId(), item.getMemberid()); + item.setCurrentUsername(managementname); + ZonedDateTime zonedDateTime = item.getCreateTime().toInstant().atZone(ZoneId.systemDefault()); + ZonedDateTime newTime = zonedDateTime.plus(8, ChronoUnit.HOURS); + Timestamp resultTimestamp = Timestamp.from(newTime.toInstant()); + item.setCreateTime(resultTimestamp); + + }); + Long totle=assetMapper.selectUsdtlist(astlistDTO); + return PageUtil.toPage(list,totle); + } + + /** + * 注册空投明细 + * @param astlistDTO + * @return + */ + @Override + public PageResult astregisterlist(AstlistDTO astlistDTO) { + List list=assetMapper.astregisterlist(astlistDTO); + list.forEach(item->{ + String managementname=assetMapper.selectManagement(item.getId(), item.getMemberid()); + item.setCurrentUsername(managementname); + ZonedDateTime zonedDateTime = item.getCreateTime().toInstant().atZone(ZoneId.systemDefault()); + ZonedDateTime newTime = zonedDateTime.plus(8, ChronoUnit.HOURS); + Timestamp resultTimestamp = Timestamp.from(newTime.toInstant()); + item.setCreateTime(resultTimestamp); + + }); + Long totle=assetMapper.selectAstregisterlist(astlistDTO); + return PageUtil.toPage(list,totle); + } + + /** + * 邀请注册空投明细 + * @param astlistDTO + * @return + */ + @Override + public PageResult astinvitationlist(AstlistDTO astlistDTO) { + List list=assetMapper.astinvitationlist(astlistDTO); + list.forEach(item->{ + String managementname=assetMapper.selectManagement(item.getId(), item.getMemberid()); + item.setCurrentUsername(managementname); + ZonedDateTime zonedDateTime = item.getCreateTime().toInstant().atZone(ZoneId.systemDefault()); + ZonedDateTime newTime = zonedDateTime.plus(8, ChronoUnit.HOURS); + Timestamp resultTimestamp = Timestamp.from(newTime.toInstant()); + item.setCreateTime(resultTimestamp); + + }); + Long totle=assetMapper.selectAstinvitationlist(astlistDTO); + return PageUtil.toPage(list,totle); + } + + /** + * AST质押明细 + * @param astlistDTO + * @return + */ + @Override + public PageResult astpledgelist(AstlistDTO astlistDTO) { + List list=assetMapper.astpledgelist(astlistDTO); + list.forEach(item->{ + String managementname=assetMapper.selectManagement(item.getId(), item.getMemberid()); + item.setCurrentUsername(managementname); + ZonedDateTime zonedDateTime = item.getCreateTime().toInstant().atZone(ZoneId.systemDefault()); + ZonedDateTime newTime = zonedDateTime.plus(8, ChronoUnit.HOURS); + Timestamp resultTimestamp = Timestamp.from(newTime.toInstant()); + item.setCreateTime(resultTimestamp); + + }); + Long totle=assetMapper.selectAstpledgelist(astlistDTO); + return PageUtil.toPage(list,totle); + } + + /** + * AST质押奖励明细 + * @param astlistDTO + * @return + */ + @Override + public PageResult astpledgerewardlist(AstlistDTO astlistDTO) { + List list=assetMapper.astpledgerewardlist(astlistDTO); + list.forEach(item->{ + String managementname=assetMapper.selectManagement(item.getId(), item.getMemberid()); + item.setCurrentUsername(managementname); + ZonedDateTime zonedDateTime = item.getCreateTime().toInstant().atZone(ZoneId.systemDefault()); + ZonedDateTime newTime = zonedDateTime.plus(8, ChronoUnit.HOURS); + Timestamp resultTimestamp = Timestamp.from(newTime.toInstant()); + item.setCreateTime(resultTimestamp); + + }); + Long totle=assetMapper.selectAstpledgerewardlist(astlistDTO); + return PageUtil.toPage(list,totle); + } + +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CountServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CountServiceImpl.java new file mode 100644 index 0000000..3b4e9cf --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/CountServiceImpl.java @@ -0,0 +1,97 @@ +package me.zhengjie.modules.system.service.impl; + +import me.zhengjie.config.thread.CustomExecutorConfig; +import me.zhengjie.modules.system.domain.vo.CountVO; +import me.zhengjie.modules.system.mapper.CountMapper; +import me.zhengjie.modules.system.service.CountService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +@Service +public class CountServiceImpl implements CountService { + @Autowired + private CountMapper countMapper; + @Autowired + private CustomExecutorConfig customExecutorConfig; + /** + * 统计数据 + * @return + */ + @Override + @Transactional + public CountVO count() { + CountVO countVO = new CountVO(); + //统计空投总人数 + CompletableFuture airPeoNum= CompletableFuture.runAsync(() -> { + Integer res=countMapper.selectCoinOne(); + countVO.setAirPeoNum(res); + },customExecutorConfig.elAsync()); + //今日空投人数 + CompletableFuture airPeoNumTaday= CompletableFuture.runAsync(() -> { + Integer res=countMapper.selectairPeoNumTaday(); + countVO.setAirPeoNumTaday(res); + },customExecutorConfig.elAsync()); + //AST质押总量 + CompletableFuture pledgeNumber= CompletableFuture.runAsync(() -> { + BigDecimal res=countMapper.selectpledgeNumber(); + countVO.setPledgeNumber(res); + },customExecutorConfig.elAsync()); + //AST质押已释放总量 + CompletableFuture pladgerelease= CompletableFuture.runAsync(() -> { + BigDecimal res=countMapper.selectpladgerelease(); + countVO.setPladgerelease(res); + },customExecutorConfig.elAsync()); + //AST质押今日释放数量 + CompletableFuture pladgereleaseTaday= CompletableFuture.runAsync(() -> { + BigDecimal res=countMapper.selectpladgereleaseTaday(); + countVO.setPladgereleaseTaday(res); + },customExecutorConfig.elAsync()); + //AST锁仓总量 + CompletableFuture coinFourNum= CompletableFuture.runAsync(() -> { + BigDecimal res=countMapper.selectcoinFourNum(); + countVO.setCoinFourNum(res); + },customExecutorConfig.elAsync()); + //AST锁仓已释放总量 + CompletableFuture lockedReleaseNum= CompletableFuture.runAsync(() -> { + BigDecimal res=countMapper.selectlockedReleaseNum(); + countVO.setLockedReleaseNum(res); + },customExecutorConfig.elAsync()); + //AST锁仓今日释放数量 + CompletableFuture lockedReleaseNumTady= CompletableFuture.runAsync(() -> { + BigDecimal res=countMapper.selectlockedReleaseNumTady(); + countVO.setLockedReleaseNumTady(res); + },customExecutorConfig.elAsync()); + //AST已释放总量(空投+质押+锁仓) + CompletableFuture astReleaseNum= CompletableFuture.runAsync(() -> { + BigDecimal res=countMapper.selectastReleaseNum(); + countVO.setAstReleaseNum(res); + },customExecutorConfig.elAsync()); + //今日AST释放数量(空投+质押+锁仓) + CompletableFuture astReleaseNumTady= CompletableFuture.runAsync(() -> { + BigDecimal coinfour=countMapper.selectastReleaseNumTady(); + BigDecimal coinone=countMapper.selectNumTadycoinone(); + BigDecimal cointhree=countMapper.selectNumTadycointhree(); + BigDecimal numTady = coinfour.add(coinone).add(cointhree); + countVO.setAstReleaseNumTady(numTady); + },customExecutorConfig.elAsync()); + //有效用户数量 + CompletableFuture balance= CompletableFuture.runAsync(() -> { + Integer res=countMapper.selectbalance(); + countVO.setBalance(res); + },customExecutorConfig.elAsync()); + try { + CompletableFuture.allOf(balance,astReleaseNumTady,astReleaseNum, + lockedReleaseNumTady,lockedReleaseNum,coinFourNum,pladgereleaseTaday, + pladgerelease,pledgeNumber,airPeoNumTaday,airPeoNum).get(); + } catch (Exception e) { + throw new RuntimeException(e); + } + return countVO; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DataServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DataServiceImpl.java new file mode 100644 index 0000000..5780e28 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DataServiceImpl.java @@ -0,0 +1,90 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.system.domain.Dept; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.service.DataService; +import me.zhengjie.modules.system.service.DeptService; +import me.zhengjie.modules.system.service.RoleService; +import me.zhengjie.utils.enums.DataScopeEnum; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import java.util.*; + +/** + * @author Zheng Jie + * @description 数据权限服务实现 + * @date 2020-05-07 + **/ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "data") +public class DataServiceImpl implements DataService { + + private final RoleService roleService; + private final DeptService deptService; + + /** + * 用户角色和用户部门改变时需清理缓存 + * @param user / + * @return / + */ + @Override + @Cacheable(key = "'user:' + #p0.id") + public List getDeptIds(User user) { + // 用于存储部门id + Set deptIds = new HashSet<>(); + // 查询用户角色 + List roleList = roleService.findByUsersId(user.getId()); + // 获取对应的部门ID + for (Role role : roleList) { + DataScopeEnum dataScopeEnum = DataScopeEnum.find(role.getDataScope()); + switch (Objects.requireNonNull(dataScopeEnum)) { + case THIS_LEVEL: + deptIds.add(user.getDept().getId()); + break; + case CUSTOMIZE: + deptIds.addAll(getCustomize(deptIds, role)); + break; + default: + return new ArrayList<>(); + } + } + return new ArrayList<>(deptIds); + } + + /** + * 获取自定义的数据权限 + * @param deptIds 部门ID + * @param role 角色 + * @return 数据权限ID + */ + public Set getCustomize(Set deptIds, Role role){ + Set depts = deptService.findByRoleId(role.getId()); + for (Dept dept : depts) { + deptIds.add(dept.getId()); + List deptChildren = deptService.findByPid(dept.getId()); + if (deptChildren != null && deptChildren.size() != 0) { + deptIds.addAll(deptService.getDeptChildren(deptChildren)); + } + } + return deptIds; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java new file mode 100644 index 0000000..b0dc014 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java @@ -0,0 +1,276 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.domain.Dept; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.mapper.RoleMapper; +import me.zhengjie.modules.system.mapper.UserMapper; +import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; +import me.zhengjie.utils.*; +import me.zhengjie.modules.system.mapper.DeptMapper; +import me.zhengjie.modules.system.service.DeptService; +import me.zhengjie.utils.enums.DataScopeEnum; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.*; +import java.util.stream.Collectors; + +/** +* @author Zheng Jie +* @date 2019-03-25 +*/ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "dept") +public class DeptServiceImpl extends ServiceImpl implements DeptService { + + private final DeptMapper deptMapper; + private final UserMapper userMapper; + private final RedisUtils redisUtils; + private final RoleMapper roleMapper; + + @Override + public List queryAll(DeptQueryCriteria criteria, Boolean isQuery) throws Exception { + String dataScopeType = SecurityUtils.getDataScopeType(); + if (isQuery) { + if(dataScopeType.equals(DataScopeEnum.ALL.getValue())){ + criteria.setPidIsNull(true); + } + List fields = StringUtils.getAllFields(criteria.getClass(), new ArrayList<>()); + List fieldNames = new ArrayList(){{ add("pidIsNull");add("enabled");}}; + for (Field field : fields) { + //设置对象的访问权限,保证对private的属性的访问 + field.setAccessible(true); + Object val = field.get(criteria); + if(fieldNames.contains(field.getName())){ + continue; + } + if (ObjectUtil.isNotNull(val)) { + criteria.setPidIsNull(null); + break; + } + } + } + // 数据权限 + criteria.setIds(SecurityUtils.getCurrentUserDataScope()); + List list = deptMapper.findAll(criteria); + // 如果为空,就代表为自定义权限或者本级权限,就需要去重,不理解可以注释掉,看查询结果 + if(StringUtils.isBlank(dataScopeType)){ + return deduplication(list); + } + return list; + } + + @Override + @Cacheable(key = "'id:' + #p0") + public Dept findById(Long id) { + return getById(id); + } + + @Override + public List findByPid(long pid) { + return deptMapper.findByPid(pid); + } + + @Override + public Set findByRoleId(Long id) { + return deptMapper.findByRoleId(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Dept resources) { + save(resources); + // 清理缓存 + updateSubCnt(resources.getPid()); + // 清理自定义角色权限的datascope缓存 + delCaches(resources.getPid()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Dept resources) { + // 旧的部门 + Long oldPid = findById(resources.getId()).getPid(); + Long newPid = resources.getPid(); + if(resources.getPid() != null && resources.getId().equals(resources.getPid())) { + throw new BadRequestException("上级不能为自己"); + } + Dept dept = getById(resources.getId()); + resources.setId(dept.getId()); + saveOrUpdate(resources); + // 更新父节点中子节点数目 + updateSubCnt(oldPid); + updateSubCnt(newPid); + // 清理缓存 + delCaches(resources.getId()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set depts) { + for (Dept dept : depts) { + // 清理缓存 + delCaches(dept.getId()); + deptMapper.deleteById(dept.getId()); + updateSubCnt(dept.getPid()); + } + } + + @Override + public void download(List depts, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Dept dept : depts) { + Map map = new LinkedHashMap<>(); + map.put("部门名称", dept.getName()); + map.put("部门状态", dept.getEnabled() ? "启用" : "停用"); + map.put("创建日期", dept.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public Set getDeleteDepts(List menuList, Set deptSet) { + for (Dept dept : menuList) { + deptSet.add(dept); + List depts = deptMapper.findByPid(dept.getId()); + if(depts!=null && depts.size()!=0){ + getDeleteDepts(depts, deptSet); + } + } + return deptSet; + } + + @Override + public List getDeptChildren(List deptList) { + List list = new ArrayList<>(); + deptList.forEach(dept -> { + if (dept!=null && dept.getEnabled()) { + List depts = deptMapper.findByPid(dept.getId()); + if (depts.size() != 0) { + list.addAll(getDeptChildren(depts)); + } + list.add(dept.getId()); + } + } + ); + return list; + } + + @Override + public List getSuperior(Dept dept, List depts) { + if(dept.getPid() == null){ + depts.addAll(deptMapper.findByPidIsNull()); + return depts; + } + depts.addAll(deptMapper.findByPid(dept.getPid())); + return getSuperior(findById(dept.getPid()), depts); + } + + @Override + public Object buildTree(List deptList) { + Set trees = new LinkedHashSet<>(); + Set depts= new LinkedHashSet<>(); + List deptNames = deptList.stream().map(Dept::getName).collect(Collectors.toList()); + boolean isChild; + for (Dept dept : deptList) { + isChild = false; + if (dept.getPid() == null) { + trees.add(dept); + } + for (Dept it : deptList) { + if (it.getPid() != null && dept.getId().equals(it.getPid())) { + isChild = true; + if (dept.getChildren() == null) { + dept.setChildren(new ArrayList<>()); + } + dept.getChildren().add(it); + } + } + if(isChild) { + depts.add(dept); + } else if(dept.getPid() != null && !deptNames.contains(findById(dept.getPid()).getName())) { + depts.add(dept); + } + } + + if (CollectionUtil.isEmpty(trees)) { + trees = depts; + } + Map map = new HashMap<>(2); + map.put("totalElements",depts.size()); + map.put("content",CollectionUtil.isEmpty(trees)? depts :trees); + return map; + } + + @Override + public void verification(Set depts) { + Set deptIds = depts.stream().map(Dept::getId).collect(Collectors.toSet()); + if(userMapper.countByDepts(deptIds) > 0){ + throw new BadRequestException("所选部门存在用户关联,请解除后再试!"); + } + if(roleMapper.countByDepts(deptIds) > 0){ + throw new BadRequestException("所选部门存在角色关联,请解除后再试!"); + } + } + + private void updateSubCnt(Long deptId){ + if(deptId != null){ + int count = deptMapper.countByPid(deptId); + deptMapper.updateSubCntById(count, deptId); + } + } + + private List deduplication(List list) { + List depts = new ArrayList<>(); + for (Dept dept : list) { + boolean flag = true; + for (Dept dept1 : list) { + if (dept1.getId().equals(dept.getPid())) { + flag = false; + break; + } + } + if (flag){ + depts.add(dept); + } + } + return depts; + } + + /** + * 清理缓存 + * @param id / + */ + public void delCaches(Long id){ + List users = userMapper.findByRoleDeptId(id); + // 删除数据权限 + redisUtils.delByKeys(CacheKey.DATA_USER, users.stream().map(User::getId).collect(Collectors.toSet())); + redisUtils.del(CacheKey.DEPT_ID + id); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java new file mode 100644 index 0000000..4c282ae --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java @@ -0,0 +1,91 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.system.domain.Dict; +import me.zhengjie.modules.system.domain.DictDetail; +import me.zhengjie.modules.system.mapper.DictMapper; +import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; +import me.zhengjie.utils.*; +import me.zhengjie.modules.system.mapper.DictDetailMapper; +import me.zhengjie.modules.system.service.DictDetailService; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "dict") +public class DictDetailServiceImpl extends ServiceImpl implements DictDetailService { + + private final DictMapper dictMapper; + private final DictDetailMapper dictDetailMapper; + private final RedisUtils redisUtils; + + @Override + public PageResult queryAll(DictDetailQueryCriteria criteria, Page page) { + return PageUtil.toPage(dictDetailMapper.findAll(criteria, page)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(DictDetail resources) { + resources.setDictId(resources.getDict().getId()); + save(resources); + // 清理缓存 + delCaches(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(DictDetail resources) { + DictDetail dictDetail = getById(resources.getId()); + resources.setId(dictDetail.getId()); + // 更新数据 + saveOrUpdate(resources); + // 清理缓存 + delCaches(dictDetail); + } + + @Override + @Cacheable(key = "'name:' + #p0") + public List getDictByName(String name) { + return dictDetailMapper.findByDictName(name); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long id) { + DictDetail dictDetail = getById(id); + removeById(id); + // 清理缓存 + delCaches(dictDetail); + } + + public void delCaches(DictDetail dictDetail){ + Dict dict = dictMapper.selectById(dictDetail.getDictId()); + redisUtils.del(CacheKey.DICT_NAME + dict.getName()); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java new file mode 100644 index 0000000..05d4695 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java @@ -0,0 +1,123 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.system.domain.Dict; +import me.zhengjie.modules.system.domain.DictDetail; +import me.zhengjie.modules.system.mapper.DictDetailMapper; +import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; +import me.zhengjie.utils.*; +import me.zhengjie.modules.system.mapper.DictMapper; +import me.zhengjie.modules.system.service.DictService; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** +* @author Zheng Jie +* @date 2019-04-10 +*/ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "dict") +public class DictServiceImpl extends ServiceImpl implements DictService { + + private final DictMapper dictMapper; + private final RedisUtils redisUtils; + private final DictDetailMapper deleteDetail; + + @Override + public PageResult queryAll(DictQueryCriteria criteria, Page page){ + criteria.setOffset(page.offset()); + List dicts = dictMapper.findAll(criteria); + Long total = dictMapper.countAll(criteria); + return PageUtil.toPage(dicts,total); + } + + @Override + public List queryAll(DictQueryCriteria criteria) { + return dictMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Dict resources) { + save(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Dict resources) { + // 清理缓存 + delCaches(resources); + Dict dict = getById(resources.getId()); + dict.setName(resources.getName()); + dict.setDescription(resources.getDescription()); + saveOrUpdate(dict); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + // 清理缓存 + List dicts = dictMapper.selectBatchIds(ids); + for (Dict dict : dicts) { + delCaches(dict); + } + // 删除字典 + dictMapper.deleteBatchIds(ids); + // 删除字典详情 + deleteDetail.deleteByDictBatchIds(ids); + } + + @Override + public void download(List dicts, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Dict dict : dicts) { + if(CollectionUtil.isNotEmpty(dict.getDictDetails())){ + for (DictDetail dictDetail : dict.getDictDetails()) { + Map map = new LinkedHashMap<>(); + map.put("字典名称", dict.getName()); + map.put("字典描述", dict.getDescription()); + map.put("字典标签", dictDetail.getLabel()); + map.put("字典值", dictDetail.getValue()); + map.put("创建日期", dictDetail.getCreateTime()); + list.add(map); + } + } else { + Map map = new LinkedHashMap<>(); + map.put("字典名称", dict.getName()); + map.put("字典描述", dict.getDescription()); + map.put("字典标签", null); + map.put("字典值", null); + map.put("创建日期", dict.getCreateTime()); + list.add(map); + } + } + FileUtil.downloadExcel(list, response); + } + + public void delCaches(Dict dict){ + redisUtils.del(CacheKey.DICT_NAME + dict.getName()); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java new file mode 100644 index 0000000..93ada92 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java @@ -0,0 +1,117 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.exception.EntityExistException; +import me.zhengjie.modules.system.domain.Job; +import me.zhengjie.modules.system.mapper.UserMapper; +import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; +import me.zhengjie.utils.*; +import me.zhengjie.modules.system.mapper.JobMapper; +import me.zhengjie.modules.system.service.JobService; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** +* @author Zheng Jie +* @date 2019-03-29 +*/ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "job") +public class JobServiceImpl extends ServiceImpl implements JobService { + + private final JobMapper jobMapper; + private final RedisUtils redisUtils; + private final UserMapper userMapper; + + @Override + public PageResult queryAll(JobQueryCriteria criteria, Page page) { + return PageUtil.toPage(jobMapper.findAll(criteria, page)); + } + + @Override + public List queryAll(JobQueryCriteria criteria) { + return jobMapper.findAll(criteria); + } + + @Override + @Cacheable(key = "'id:' + #p0") + public Job findById(Long id) { + return getById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Job resources) { + Job job = jobMapper.findByName(resources.getName()); + if(job != null){ + throw new EntityExistException(Job.class,"name",resources.getName()); + } + save(resources); + } + + @Override + @CacheEvict(key = "'id:' + #p0.id") + @Transactional(rollbackFor = Exception.class) + public void update(Job resources) { + Job job = getById(resources.getId()); + Job old = jobMapper.findByName(resources.getName()); + if(old != null && !old.getId().equals(resources.getId())){ + throw new EntityExistException(Job.class,"name",resources.getName()); + } + resources.setId(job.getId()); + saveOrUpdate(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + removeBatchByIds(ids); + // 删除缓存 + redisUtils.delByKeys(CacheKey.JOB_ID, ids); + } + + @Override + public void download(List jobs, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Job job : jobs) { + Map map = new LinkedHashMap<>(); + map.put("岗位名称", job.getName()); + map.put("岗位状态", job.getEnabled() ? "启用" : "停用"); + map.put("创建日期", job.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public void verification(Set ids) { + if(userMapper.countByJobs(ids) > 0){ + throw new BadRequestException("所选的岗位中存在用户关联,请解除关联再试!"); + } + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemParameterServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemParameterServiceImpl.java new file mode 100644 index 0000000..cb3230e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemParameterServiceImpl.java @@ -0,0 +1,12 @@ +package me.zhengjie.modules.system.service.impl; + +import me.zhengjie.modules.system.mapper.MemParameterMapper; +import me.zhengjie.modules.system.service.MemParameterService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class MemParameterServiceImpl implements MemParameterService { + @Autowired + private MemParameterMapper memParameterMapper; +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemberServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemberServiceImpl.java new file mode 100644 index 0000000..3018072 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MemberServiceImpl.java @@ -0,0 +1,66 @@ +package me.zhengjie.modules.system.service.impl; + +import me.zhengjie.modules.system.domain.dto.MemberDTO; +import me.zhengjie.modules.system.domain.vo.MemberVO; +import me.zhengjie.modules.system.mapper.MemberMapper; +import me.zhengjie.modules.system.service.MemberService; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class MemberServiceImpl implements MemberService { + + @Autowired + private MemberMapper memberMapper; + + /** + * 会员列表 + * @param memberDTO + * @return + */ + @Override + public PageResult list(MemberDTO memberDTO) { + List res=memberMapper.list(memberDTO); +// memberMapper.getInviteUsername(res); + res.forEach(item->{ + if (item.getInviterid()!=0){ + String inviteUsername= memberMapper.getInviteUsername1(item.getInviterid()); + item.setInviteUsername(inviteUsername); + }else { + item.setInviteUsername(""); + } + }); + Long total = memberMapper.countAll(memberDTO); + return PageUtil.toPage(res, total); + } + + /** + * 修改会员信息 + * @param memberDTO + * @return + */ + @Override + public Integer updateInfo(MemberDTO memberDTO) { + if (memberDTO.getLevel()!=null) { + if (memberDTO.getLevel()==0){ + return memberMapper.updatelevel(memberDTO); + } + } + return memberMapper.updateInfo(memberDTO); + } + + /** + * 查看会员详细信息 + * @param uid + * @return + */ + @Override + public MemberVO selectMemberInfo(String uid) { + + return memberMapper.selectMemberInfo(uid); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java new file mode 100644 index 0000000..3300cb8 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java @@ -0,0 +1,344 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.system.domain.Menu; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.domain.vo.MenuMetaVo; +import me.zhengjie.modules.system.domain.vo.MenuVo; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.exception.EntityExistException; +import me.zhengjie.modules.system.mapper.MenuMapper; +import me.zhengjie.modules.system.mapper.RoleMenuMapper; +import me.zhengjie.modules.system.mapper.UserMapper; +import me.zhengjie.modules.system.service.MenuService; +import me.zhengjie.modules.system.service.RoleService; +import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; +import me.zhengjie.utils.*; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + */ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "menu") +public class MenuServiceImpl extends ServiceImpl implements MenuService { + + private final MenuMapper menuMapper; + private final RoleMenuMapper roleMenuMapper; + private final UserMapper userMapper; + private final RoleService roleService; + private final RedisUtils redisUtils; + + private static final String HTTP_PRE = "http://"; + private static final String HTTPS_PRE = "https://"; + private static final String YES_STR = "是"; + private static final String NO_STR = "否"; + private static final String BAD_REQUEST = "外链必须以http://或者https://开头"; + + @Override + public List queryAll(MenuQueryCriteria criteria, Boolean isQuery) throws Exception { + if(Boolean.TRUE.equals(isQuery)){ + criteria.setPidIsNull(true); + List fields = StringUtils.getAllFields(criteria.getClass(), new ArrayList<>()); + for (Field field : fields) { + //设置对象的访问权限,保证对private的属性的访问 + field.setAccessible(true); + Object val = field.get(criteria); + if("pidIsNull".equals(field.getName())){ + continue; + } + // 如果有查询条件,则不指定pidIsNull + if (ObjectUtil.isNotNull(val)) { + criteria.setPidIsNull(null); + break; + } + } + } + return menuMapper.findAll(criteria); + } + + @Override + @Cacheable(key = "'id:' + #p0") + public Menu findById(long id) { + return getById(id); + } + + /** + * 用户角色改变时需清理缓存 + * @param currentUserId / + * @return / + */ + @Override + @Cacheable(value = "user", key = "#currentUserId") + public List findByUser(Long currentUserId) { + List roles = roleService.findByUsersId(currentUserId); + Set roleIds = roles.stream().map(Role::getId).collect(Collectors.toSet()); + LinkedHashSet menus = menuMapper.findByRoleIdsAndTypeNot(roleIds, 2); + return new ArrayList<>(menus); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Menu resources) { + if(menuMapper.findByTitle(resources.getTitle()) != null){ + throw new EntityExistException(Menu.class,"title",resources.getTitle()); + } + if(StringUtils.isNotBlank(resources.getComponentName())){ + if(menuMapper.findByComponentName(resources.getComponentName()) != null){ + throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); + } + } + if (Long.valueOf(0L).equals(resources.getPid())) { + resources.setPid(null); + } + if(resources.getIFrame()){ + if (!(resources.getPath().toLowerCase().startsWith(HTTP_PRE)||resources.getPath().toLowerCase().startsWith(HTTPS_PRE))) { + throw new BadRequestException(BAD_REQUEST); + } + } + save(resources); + // 计算子节点数目 + resources.setSubCount(0); + // 更新父节点菜单数目 + updateSubCnt(resources.getPid()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Menu resources) { + if(resources.getId().equals(resources.getPid())) { + throw new BadRequestException("上级不能为自己"); + } + Menu menu = getById(resources.getId()); + if(resources.getIFrame()){ + if (!(resources.getPath().toLowerCase().startsWith(HTTP_PRE)||resources.getPath().toLowerCase().startsWith(HTTPS_PRE))) { + throw new BadRequestException(BAD_REQUEST); + } + } + Menu menu1 = menuMapper.findByTitle(resources.getTitle()); + + if(menu1 != null && !menu1.getId().equals(menu.getId())){ + throw new EntityExistException(Menu.class,"title",resources.getTitle()); + } + + if(resources.getPid().equals(0L)){ + resources.setPid(null); + } + + // 记录的父节点ID + Long oldPid = menu.getPid(); + Long newPid = resources.getPid(); + + if(StringUtils.isNotBlank(resources.getComponentName())){ + menu1 = menuMapper.findByComponentName(resources.getComponentName()); + if(menu1 != null && !menu1.getId().equals(menu.getId())){ + throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); + } + } + menu.setTitle(resources.getTitle()); + menu.setComponent(resources.getComponent()); + menu.setPath(resources.getPath()); + menu.setIcon(resources.getIcon()); + menu.setIFrame(resources.getIFrame()); + menu.setPid(resources.getPid()); + menu.setMenuSort(resources.getMenuSort()); + menu.setCache(resources.getCache()); + menu.setHidden(resources.getHidden()); + menu.setComponentName(resources.getComponentName()); + menu.setPermission(resources.getPermission()); + menu.setType(resources.getType()); + saveOrUpdate(menu); + // 计算父级菜单节点数目 + updateSubCnt(oldPid); + updateSubCnt(newPid); + // 清理缓存 + delCaches(resources.getId()); + } + + @Override + public Set getChildMenus(List menuList, Set menuSet) { + for (Menu menu : menuList) { + menuSet.add(menu); + List menus = menuMapper.findByPidOrderByMenuSort(menu.getId()); + if(menus!=null && menus.size()!=0){ + getChildMenus(menus, menuSet); + } + } + return menuSet; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set menuSet) { + for (Menu menu : menuSet) { + // 清理缓存 + delCaches(menu.getId()); + roleMenuMapper.deleteByMenuId(menu.getId()); + menuMapper.deleteById(menu.getId()); + updateSubCnt(menu.getPid()); + } + } + + @Override + public List getMenus(Long pid) { + List menus; + if(pid != null && !pid.equals(0L)){ + menus = menuMapper.findByPidOrderByMenuSort(pid); + } else { + menus = menuMapper.findByPidIsNullOrderByMenuSort(); + } + return menus; + } + + @Override + public List getSuperior(Menu menu, List menus) { + if(menu.getPid() == null){ + menus.addAll(menuMapper.findByPidIsNullOrderByMenuSort()); + return menus; + } + menus.addAll(menuMapper.findByPidOrderByMenuSort(menu.getPid())); + return getSuperior(findById(menu.getPid()), menus); + } + + @Override + public List buildTree(List menus) { + List trees = new ArrayList<>(); + Set ids = new HashSet<>(); + for (Menu menu : menus) { + if (menu.getPid() == null) { + trees.add(menu); + } + for (Menu it : menus) { + if (menu.getId().equals(it.getPid())) { + if (menu.getChildren() == null) { + menu.setChildren(new ArrayList<>()); + } + menu.getChildren().add(it); + ids.add(it.getId()); + } + } + } + if(trees.size() == 0){ + trees = menus.stream().filter(s -> !ids.contains(s.getId())).collect(Collectors.toList()); + } + return trees; + } + + @Override + public List buildMenus(List menus) { + List list = new LinkedList<>(); + menus.forEach(menu -> { + if (menu!=null){ + List menuList = menu.getChildren(); + MenuVo menuVo = new MenuVo(); + menuVo.setName(ObjectUtil.isNotEmpty(menu.getComponentName()) ? menu.getComponentName() : menu.getTitle()); + // 一级目录需要加斜杠,不然会报警告 + menuVo.setPath(menu.getPid() == null ? "/" + menu.getPath() :menu.getPath()); + menuVo.setHidden(menu.getHidden()); + // 如果不是外链 + if(!menu.getIFrame()){ + if(menu.getPid() == null){ + menuVo.setComponent(StringUtils.isEmpty(menu.getComponent())?"Layout":menu.getComponent()); + // 如果不是一级菜单,并且菜单类型为目录,则代表是多级菜单 + }else if(menu.getType() == 0){ + menuVo.setComponent(StringUtils.isEmpty(menu.getComponent())?"ParentView":menu.getComponent()); + }else if(StringUtils.isNoneBlank(menu.getComponent())){ + menuVo.setComponent(menu.getComponent()); + } + } + menuVo.setMeta(new MenuMetaVo(menu.getTitle(),menu.getIcon(),!menu.getCache())); + if(CollectionUtil.isNotEmpty(menuList)){ + menuVo.setAlwaysShow(true); + menuVo.setRedirect("noredirect"); + menuVo.setChildren(buildMenus(menuList)); + // 处理是一级菜单并且没有子菜单的情况 + } else if(menu.getPid() == null){ + MenuVo menuVo1 = new MenuVo(); + menuVo1.setMeta(menuVo.getMeta()); + // 非外链 + if(!menu.getIFrame()){ + menuVo1.setPath("index"); + menuVo1.setName(menuVo.getName()); + menuVo1.setComponent(menuVo.getComponent()); + } else { + menuVo1.setPath(menu.getPath()); + } + menuVo.setName(null); + menuVo.setMeta(null); + menuVo.setComponent("Layout"); + List list1 = new ArrayList<>(); + list1.add(menuVo1); + menuVo.setChildren(list1); + } + list.add(menuVo); + } + } + ); + return list; + } + + @Override + public void download(List menus, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Menu menu : menus) { + Map map = new LinkedHashMap<>(); + map.put("菜单标题", menu.getTitle()); + map.put("菜单类型", menu.getType() == null ? "目录" : menu.getType() == 1 ? "菜单" : "按钮"); + map.put("权限标识", menu.getPermission()); + map.put("外链菜单", menu.getIFrame() ? YES_STR : NO_STR); + map.put("菜单可见", menu.getHidden() ? NO_STR : YES_STR); + map.put("是否缓存", menu.getCache() ? YES_STR : NO_STR); + map.put("创建日期", menu.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + private void updateSubCnt(Long menuId){ + if(menuId != null){ + int count = menuMapper.countByPid(menuId); + menuMapper.updateSubCntById(count, menuId); + } + } + + /** + * 清理缓存 + * @param id 菜单ID + */ + public void delCaches(Long id){ + List users = userMapper.findByMenuId(id); + redisUtils.del(CacheKey.MENU_ID + id); + redisUtils.delByKeys(CacheKey.MENU_USER, users.stream().map(User::getId).collect(Collectors.toSet())); + // 清除 Role 缓存 + List roles = roleService.findByMenuId(id); + redisUtils.delByKeys(CacheKey.ROLE_ID, roles.stream().map(Role::getId).collect(Collectors.toSet())); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MonitorServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MonitorServiceImpl.java new file mode 100644 index 0000000..4868bab --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MonitorServiceImpl.java @@ -0,0 +1,192 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import cn.hutool.core.date.BetweenFormatter.Level; +import cn.hutool.core.date.DateUtil; +import me.zhengjie.modules.system.service.MonitorService; +import me.zhengjie.utils.ElConstant; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.StringUtils; +import org.springframework.stereotype.Service; +import oshi.SystemInfo; +import oshi.hardware.*; +import oshi.software.os.FileSystem; +import oshi.software.os.OSFileStore; +import oshi.software.os.OperatingSystem; +import oshi.util.FormatUtil; +import oshi.util.Util; +import java.lang.management.ManagementFactory; +import java.text.DecimalFormat; +import java.util.*; + +/** +* @author Zheng Jie +* @date 2020-05-02 +*/ +@Service +public class MonitorServiceImpl implements MonitorService { + + private final DecimalFormat df = new DecimalFormat("0.00"); + + @Override + public Map getServers(){ + Map resultMap = new LinkedHashMap<>(8); + try { + SystemInfo si = new SystemInfo(); + OperatingSystem os = si.getOperatingSystem(); + HardwareAbstractionLayer hal = si.getHardware(); + // 系统信息 + resultMap.put("sys", getSystemInfo(os)); + // cpu 信息 + resultMap.put("cpu", getCpuInfo(hal.getProcessor())); + // 内存信息 + resultMap.put("memory", getMemoryInfo(hal.getMemory())); + // 交换区信息 + resultMap.put("swap", getSwapInfo(hal.getMemory())); + // 磁盘 + resultMap.put("disk", getDiskInfo(os)); + resultMap.put("time", DateUtil.format(new Date(), "HH:mm:ss")); + } catch (Exception e) { + e.printStackTrace(); + } + return resultMap; + } + + /** + * 获取磁盘信息 + * @return / + */ + private Map getDiskInfo(OperatingSystem os) { + Map diskInfo = new LinkedHashMap<>(); + FileSystem fileSystem = os.getFileSystem(); + List fsArray = fileSystem.getFileStores(); + String osName = System.getProperty("os.name"); + long available = 0, total = 0; + for (OSFileStore fs : fsArray){ + // windows 需要将所有磁盘分区累加,linux 和 mac 直接累加会出现磁盘重复的问题,待修复 + if(osName.toLowerCase().startsWith(ElConstant.WIN)) { + available += fs.getUsableSpace(); + total += fs.getTotalSpace(); + } else { + available = fs.getUsableSpace(); + total = fs.getTotalSpace(); + break; + } + } + long used = total - available; + diskInfo.put("total", total > 0 ? FileUtil.getSize(total) : "?"); + diskInfo.put("available", FileUtil.getSize(available)); + diskInfo.put("used", FileUtil.getSize(used)); + if(total != 0){ + diskInfo.put("usageRate", df.format(used/(double)total * 100)); + } else { + diskInfo.put("usageRate", 0); + } + return diskInfo; + } + + /** + * 获取交换区信息 + * @param memory / + * @return / + */ + private Map getSwapInfo(GlobalMemory memory) { + Map swapInfo = new LinkedHashMap<>(); + VirtualMemory virtualMemory = memory.getVirtualMemory(); + long total = virtualMemory.getSwapTotal(); + long used = virtualMemory.getSwapUsed(); + swapInfo.put("total", FormatUtil.formatBytes(total)); + swapInfo.put("used", FormatUtil.formatBytes(used)); + swapInfo.put("available", FormatUtil.formatBytes(total - used)); + if(used == 0){ + swapInfo.put("usageRate", 0); + } else { + swapInfo.put("usageRate", df.format(used/(double)total * 100)); + } + return swapInfo; + } + + /** + * 获取内存信息 + * @param memory / + * @return / + */ + private Map getMemoryInfo(GlobalMemory memory) { + Map memoryInfo = new LinkedHashMap<>(); + memoryInfo.put("total", FormatUtil.formatBytes(memory.getTotal())); + memoryInfo.put("available", FormatUtil.formatBytes(memory.getAvailable())); + memoryInfo.put("used", FormatUtil.formatBytes(memory.getTotal() - memory.getAvailable())); + memoryInfo.put("usageRate", df.format((memory.getTotal() - memory.getAvailable())/(double)memory.getTotal() * 100)); + return memoryInfo; + } + + /** + * 获取Cpu相关信息 + * @param processor / + * @return / + */ + private Map getCpuInfo(CentralProcessor processor) { + Map cpuInfo = new LinkedHashMap<>(); + cpuInfo.put("name", processor.getProcessorIdentifier().getName()); + cpuInfo.put("package", processor.getPhysicalPackageCount() + "个物理CPU"); + cpuInfo.put("core", processor.getPhysicalProcessorCount() + "个物理核心"); + cpuInfo.put("coreNumber", processor.getPhysicalProcessorCount()); + cpuInfo.put("logic", processor.getLogicalProcessorCount() + "个逻辑CPU"); + // CPU信息 + long[] prevTicks = processor.getSystemCpuLoadTicks(); + // 默认等待300毫秒... + long time = 300; + Util.sleep(time); + long[] ticks = processor.getSystemCpuLoadTicks(); + while (Arrays.toString(prevTicks).equals(Arrays.toString(ticks)) && time < 1000){ + time += 25; + Util.sleep(25); + ticks = processor.getSystemCpuLoadTicks(); + } + long user = ticks[CentralProcessor.TickType.USER.getIndex()] - prevTicks[CentralProcessor.TickType.USER.getIndex()]; + long nice = ticks[CentralProcessor.TickType.NICE.getIndex()] - prevTicks[CentralProcessor.TickType.NICE.getIndex()]; + long sys = ticks[CentralProcessor.TickType.SYSTEM.getIndex()] - prevTicks[CentralProcessor.TickType.SYSTEM.getIndex()]; + long idle = ticks[CentralProcessor.TickType.IDLE.getIndex()] - prevTicks[CentralProcessor.TickType.IDLE.getIndex()]; + long iowait = ticks[CentralProcessor.TickType.IOWAIT.getIndex()] - prevTicks[CentralProcessor.TickType.IOWAIT.getIndex()]; + long irq = ticks[CentralProcessor.TickType.IRQ.getIndex()] - prevTicks[CentralProcessor.TickType.IRQ.getIndex()]; + long softirq = ticks[CentralProcessor.TickType.SOFTIRQ.getIndex()] - prevTicks[CentralProcessor.TickType.SOFTIRQ.getIndex()]; + long steal = ticks[CentralProcessor.TickType.STEAL.getIndex()] - prevTicks[CentralProcessor.TickType.STEAL.getIndex()]; + long totalCpu = user + nice + sys + idle + iowait + irq + softirq + steal; + cpuInfo.put("used", df.format(100d * user / totalCpu + 100d * sys / totalCpu)); + cpuInfo.put("idle", df.format(100d * idle / totalCpu)); + return cpuInfo; + } + + /** + * 获取系统相关信息,系统、运行天数、系统IP + * @param os / + * @return / + */ + private Map getSystemInfo(OperatingSystem os){ + Map systemInfo = new LinkedHashMap<>(); + // jvm 运行时间 + long time = ManagementFactory.getRuntimeMXBean().getStartTime(); + Date date = new Date(time); + // 计算项目运行时间 + String formatBetween = DateUtil.formatBetween(date, new Date(), Level.HOUR); + // 系统信息 + systemInfo.put("os", os.toString()); + systemInfo.put("day", formatBetween); + systemInfo.put("ip", StringUtils.getLocalIp()); + return systemInfo; + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java new file mode 100644 index 0000000..78212aa --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java @@ -0,0 +1,226 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.security.service.UserCacheManager; +import me.zhengjie.modules.security.service.dto.AuthorityDto; +import me.zhengjie.modules.system.domain.Menu; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.exception.EntityExistException; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.modules.system.mapper.RoleDeptMapper; +import me.zhengjie.modules.system.mapper.RoleMapper; +import me.zhengjie.modules.system.mapper.RoleMenuMapper; +import me.zhengjie.modules.system.mapper.UserMapper; +import me.zhengjie.modules.system.service.RoleService; +import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; +import me.zhengjie.utils.*; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + * @date 2018-12-03 + */ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "role") +public class RoleServiceImpl extends ServiceImpl implements RoleService { + + private final RoleMapper roleMapper; + private final RoleDeptMapper roleDeptMapper; + private final RoleMenuMapper roleMenuMapper; + private final RedisUtils redisUtils; + private final UserMapper userMapper; + private final UserCacheManager userCacheManager; + + @Override + public List queryAll() { + return roleMapper.queryAll(); + } + + @Override + public List queryAll(RoleQueryCriteria criteria) { + return roleMapper.findAll(criteria); + } + + @Override + public PageResult queryAll(RoleQueryCriteria criteria, Page page) { + criteria.setOffset(page.offset()); + List roles = roleMapper.findAll(criteria); + Long total = roleMapper.countAll(criteria); + return PageUtil.toPage(roles, total); + } + + @Override + @Cacheable(key = "'id:' + #p0") + public Role findById(long id) { + return roleMapper.findById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(Role resources) { + if (roleMapper.findByName(resources.getName()) != null) { + throw new EntityExistException(Role.class, "username", resources.getName()); + } + save(resources); + // 判断是否有部门数据,若有,则需创建关联 + if (CollectionUtil.isNotEmpty(resources.getDepts())) { + roleDeptMapper.insertData(resources.getId(), resources.getDepts()); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(Role resources) { + Role role = getById(resources.getId()); + Role role1 = roleMapper.findByName(resources.getName()); + if (role1 != null && !role1.getId().equals(role.getId())) { + throw new EntityExistException(Role.class, "username", resources.getName()); + } + role.setName(resources.getName()); + role.setDescription(resources.getDescription()); + role.setDataScope(resources.getDataScope()); + role.setDepts(resources.getDepts()); + role.setLevel(resources.getLevel()); + // 更新 + saveOrUpdate(role); + // 删除关联部门数据 + roleDeptMapper.deleteByRoleId(resources.getId()); + // 判断是否有部门数据,若有,则需更新关联 + if (CollectionUtil.isNotEmpty(resources.getDepts())) { + roleDeptMapper.insertData(resources.getId(), resources.getDepts()); + } + // 更新相关缓存 + delCaches(role.getId(), null); + } + + @Override + public void updateMenu(Role role) { + List users = userMapper.findByRoleId(role.getId()); + // 更新菜单 + roleMenuMapper.deleteByRoleId(role.getId()); + // 判断是否为空 + if(CollUtil.isNotEmpty(role.getMenus())){ + roleMenuMapper.insertData(role.getId(), role.getMenus()); + } + // 更新缓存 + delCaches(role.getId(), users); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + for (Long id : ids) { + // 更新相关缓存 + delCaches(id, null); + } + removeBatchByIds(ids); + // 删除角色部门关联数据、角色菜单关联数据 + roleDeptMapper.deleteByRoleIds(ids); + roleMenuMapper.deleteByRoleIds(ids); + } + + @Override + public List findByUsersId(Long userId) { + return roleMapper.findByUserId(userId); + } + + @Override + public Integer findByRoles(Set roles) { + if (roles.size() == 0) { + return Integer.MAX_VALUE; + } + Set roleSet = new HashSet<>(); + for (Role role : roles) { + roleSet.add(findById(role.getId())); + } + return Collections.min(roleSet.stream().map(Role::getLevel).collect(Collectors.toList())); + } + + @Override + @Cacheable(key = "'auth:' + #p0.id") + public List mapToGrantedAuthorities(User user) { + Set permissions = new HashSet<>(); + // 如果是管理员直接返回 + if (user.getIsAdmin()) { + permissions.add("admin"); + return permissions.stream().map(AuthorityDto::new) + .collect(Collectors.toList()); + } + List roles = roleMapper.findByUserId(user.getId()); + permissions = roles.stream().flatMap(role -> role.getMenus().stream()) + .map(Menu::getPermission) + .filter(StringUtils::isNotBlank).collect(Collectors.toSet()); + return permissions.stream().map(AuthorityDto::new) + .collect(Collectors.toList()); + } + + @Override + public void download(List roles, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (Role role : roles) { + Map map = new LinkedHashMap<>(); + map.put("角色名称", role.getName()); + map.put("角色级别", role.getLevel()); + map.put("描述", role.getDescription()); + map.put("创建日期", role.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public void verification(Set ids) { + if (userMapper.countByRoles(ids) > 0) { + throw new BadRequestException("所选角色存在用户关联,请解除关联再试!"); + } + } + + @Override + public List findByMenuId(Long menuId) { + return roleMapper.findByMenuId(menuId); + } + + /** + * 清理缓存 + * @param id / + */ + public void delCaches(Long id, List users) { + users = CollectionUtil.isEmpty(users) ? userMapper.findByRoleId(id) : users; + if (CollectionUtil.isNotEmpty(users)) { + users.forEach(item -> userCacheManager.cleanUserCache(item.getUsername())); + Set userIds = users.stream().map(User::getId).collect(Collectors.toSet()); + redisUtils.delByKeys(CacheKey.DATA_USER, userIds); + redisUtils.delByKeys(CacheKey.MENU_USER, userIds); + redisUtils.delByKeys(CacheKey.ROLE_AUTH, userIds); + } + redisUtils.del(CacheKey.ROLE_ID + id); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/TeamServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/TeamServiceImpl.java new file mode 100644 index 0000000..545d39f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/TeamServiceImpl.java @@ -0,0 +1,68 @@ +package me.zhengjie.modules.system.service.impl; + +import me.zhengjie.modules.system.domain.dto.TeamDTO; +import me.zhengjie.modules.system.domain.dto.UpDownTeamDTO; +import me.zhengjie.modules.system.mapper.TeamMapper; +import me.zhengjie.modules.system.service.TeamService; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.PageUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class TeamServiceImpl implements TeamService { + @Autowired + private TeamMapper teamMapper; + + /** + * 团队列表 + * @param teamDTO + * @return + */ + @Override + public PageResult list(TeamDTO teamDTO) { + List res=teamMapper.list(teamDTO); + Long total = teamMapper.countAll(teamDTO); + return PageUtil.toPage(res, total); + } + + /** + * 查看上级团队 + * @param teamDTO + * @return + */ + @Override + public PageResult upTeamList(UpDownTeamDTO teamDTO) { + Long res=teamMapper.selectinfo(teamDTO); + if (res != 0){ + List res1=teamMapper.upTeamList(teamDTO); + Long total = teamMapper.countupTeamAll(teamDTO); + return PageUtil.toPage(res1, total); + } + List objects = new ArrayList<>(); + return PageUtil.toPage(objects, 0); + } + + /** + * 查看下级团队 + * @param teamDTO + * @return + */ + @Override + public PageResult downTeamList(UpDownTeamDTO teamDTO) { + List res=teamMapper.selectdowninfo(teamDTO); + if (res.size()>0){ +// res.forEach(item->{ +// item +// }); + List res1=teamMapper.downTeamList(teamDTO); + Long total = teamMapper.countDownTeamAll(teamDTO); + return PageUtil.toPage(res1, total); + } + List objects = new ArrayList<>(); + return PageUtil.toPage(objects, 0); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..ee20b6f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java @@ -0,0 +1,290 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.config.FileProperties; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.security.service.OnlineUserService; +import me.zhengjie.modules.security.service.UserCacheManager; +import me.zhengjie.modules.system.domain.Job; +import me.zhengjie.modules.system.domain.Role; +import me.zhengjie.modules.system.domain.User; +import me.zhengjie.exception.EntityExistException; +import me.zhengjie.exception.EntityNotFoundException; +import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; +import me.zhengjie.modules.system.mapper.UserJobMapper; +import me.zhengjie.modules.system.mapper.UserMapper; +import me.zhengjie.modules.system.mapper.UserRoleMapper; +import me.zhengjie.modules.system.service.UserService; +import me.zhengjie.utils.*; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import javax.validation.constraints.NotBlank; +import java.io.File; +import java.io.IOException; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author Zheng Jie + * @date 2018-11-23 + */ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "user") +public class UserServiceImpl extends ServiceImpl implements UserService { + + private final UserMapper userMapper; + private final UserJobMapper userJobMapper; + private final UserRoleMapper userRoleMapper; + private final FileProperties properties; + private final RedisUtils redisUtils; + private final UserCacheManager userCacheManager; + private final OnlineUserService onlineUserService; + + @Override + public PageResult queryAll(UserQueryCriteria criteria, Page page) { + criteria.setOffset(page.offset()); + List users = userMapper.findAll(criteria); + Long total = userMapper.countAll(criteria); + return PageUtil.toPage(users, total); + } + + @Override + public List queryAll(UserQueryCriteria criteria) { + return userMapper.findAll(criteria); + } + + @Override + @Cacheable(key = "'id:' + #p0") + @Transactional(rollbackFor = Exception.class) + public User findById(long id) { + return getById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(User resources) { + resources.setDeptId(resources.getDept().getId()); + resources.setEnabled(true); + if (userMapper.findByUsername(resources.getUsername()) != null) { + throw new EntityExistException(User.class, "username", resources.getUsername()); + } +// if (userMapper.findByEmail(resources.getEmail()) != null) { +// throw new EntityExistException(User.class, "email", resources.getEmail()); +// } +// if (userMapper.findByPhone(resources.getPhone()) != null) { +// throw new EntityExistException(User.class, "phone", resources.getPhone()); +// } + save(resources); + // 保存用户岗位 + userJobMapper.insertData(resources.getId(), resources.getJobs()); + // 保存用户角色 + userRoleMapper.insertData(resources.getId(), resources.getRoles()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(User resources) throws Exception { + User user = getById(resources.getId()); + User user1 = userMapper.findByUsername(resources.getUsername()); + User user2 = userMapper.findByEmail(resources.getEmail()); + User user3 = userMapper.findByPhone(resources.getPhone()); + if (user1 != null && !user.getId().equals(user1.getId())) { + throw new EntityExistException(User.class, "username", resources.getUsername()); + } + if (user2 != null && !user.getId().equals(user2.getId())) { + throw new EntityExistException(User.class, "email", resources.getEmail()); + } + if (user3 != null && !user.getId().equals(user3.getId())) { + throw new EntityExistException(User.class, "phone", resources.getPhone()); + } + // 如果用户的角色改变 + if (!resources.getRoles().equals(user.getRoles())) { + redisUtils.del(CacheKey.DATA_USER + resources.getId()); + redisUtils.del(CacheKey.MENU_USER + resources.getId()); + redisUtils.del(CacheKey.ROLE_AUTH + resources.getId()); + } + // 修改部门会影响 数据权限 + if (!Objects.equals(resources.getDept(),user.getDept())) { + redisUtils.del(CacheKey.DATA_USER + resources.getId()); + } + // 如果用户被禁用,则清除用户登录信息 + if(!resources.getEnabled()){ + onlineUserService.kickOutForUsername(resources.getUsername()); + } + user.setDeptId(resources.getDept().getId()); + user.setUsername(resources.getUsername()); + user.setEmail(resources.getEmail()); + user.setEnabled(resources.getEnabled()); + user.setRoles(resources.getRoles()); + user.setDept(resources.getDept()); + user.setJobs(resources.getJobs()); + user.setPhone(resources.getPhone()); + user.setNickName(resources.getNickName()); + user.setGender(resources.getGender()); + saveOrUpdate(user); + // 清除缓存 + delCaches(user.getId(), user.getUsername()); + // 更新用户岗位 + userJobMapper.deleteByUserId(resources.getId()); + userJobMapper.insertData(resources.getId(), resources.getJobs()); + // 更新用户角色 + userRoleMapper.deleteByUserId(resources.getId()); + userRoleMapper.insertData(resources.getId(), resources.getRoles()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateCenter(User resources) { + User user = getById(resources.getId()); +// User user1 = userMapper.findByPhone(resources.getPhone()); +// if (user1 != null && !user.getId().equals(user1.getId())) { +// throw new EntityExistException(User.class, "phone", resources.getPhone()); +// } + user.setNickName(resources.getNickName()); + user.setPhone(resources.getPhone()); + user.setGender(resources.getGender()); +// user.setEnabled(resources.getStatus()); + saveOrUpdate(user); + // 清理缓存 + delCaches(user.getId(), user.getUsername()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Set ids) { + for (Long id : ids) { + // 清理缓存 + User user = getById(id); + delCaches(user.getId(), user.getUsername()); + } + userMapper.deleteBatchIds(ids); + // 删除用户岗位 + userJobMapper.deleteByUserIds(ids); + // 删除用户角色 + userRoleMapper.deleteByUserIds(ids); + } + + @Override + public User findByName(String userName) { + return userMapper.findByUsername(userName); + } + + @Override + public User getLoginData(String userName) { + User user = userMapper.findByUsername(userName); + if (user == null) { + throw new EntityNotFoundException(User.class, "name", userName); + } else { + return user; + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updatePass(String username, String pass) { + userMapper.updatePass(username, pass, new Date()); + flushCache(username); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void resetPwd(Set ids, String pwd) { + Integer res=userMapper.resetPwd(ids, pwd); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Map updateAvatar(MultipartFile multipartFile) { + // 文件大小验证 + FileUtil.checkSize(properties.getAvatarMaxSize(), multipartFile.getSize()); + // 验证文件上传的格式 + String image = "gif jpg png jpeg"; + String fileType = FileUtil.getExtensionName(multipartFile.getOriginalFilename()); + if(fileType != null && !image.contains(fileType)){ + throw new BadRequestException("文件格式错误!, 仅支持 " + image +" 格式"); + } + User user = userMapper.findByUsername(SecurityUtils.getCurrentUsername()); + String oldPath = user.getAvatarPath(); + File file = FileUtil.upload(multipartFile, properties.getPath().getAvatar()); + user.setAvatarPath(Objects.requireNonNull(file).getPath()); + user.setAvatarName(file.getName()); + saveOrUpdate(user); + if (StringUtils.isNotBlank(oldPath)) { + FileUtil.del(oldPath); + } + @NotBlank String username = user.getUsername(); + flushCache(username); + return new HashMap(1) {{ + put("avatar", file.getName()); + }}; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateEmail(String username, String email) { + userMapper.updateEmail(username, email); + flushCache(username); + } + + @Override + public void download(List users, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (User user : users) { + List roles = user.getRoles().stream().map(Role::getName).collect(Collectors.toList()); + Map map = new LinkedHashMap<>(); + map.put("用户名", user.getUsername()); + map.put("角色", roles); + map.put("部门", user.getDept().getName()); + map.put("岗位", user.getJobs().stream().map(Job::getName).collect(Collectors.toList())); + map.put("邮箱", user.getEmail()); + map.put("状态", user.getEnabled() ? "启用" : "禁用"); + map.put("手机号码", user.getPhone()); + map.put("修改密码的时间", user.getPwdResetTime()); + map.put("创建日期", user.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 清理缓存 + * + * @param id / + */ + public void delCaches(Long id, String username) { + redisUtils.del(CacheKey.USER_ID + id); + flushCache(username); + } + + /** + * 清理 登陆时 用户缓存信息 + * + * @param username / + */ + private void flushCache(String username) { + userCacheManager.cleanUserCache(username); + } +} diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java new file mode 100644 index 0000000..9f8c8ac --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.modules.system.service.impl; + +import cn.hutool.core.lang.Dict; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.extra.template.Template; +import cn.hutool.extra.template.TemplateConfig; +import cn.hutool.extra.template.TemplateEngine; +import cn.hutool.extra.template.TemplateUtil; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.vo.EmailVo; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.modules.system.service.VerifyService; +import me.zhengjie.utils.RedisUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.util.Collections; + +/** + * @author Zheng Jie + * @date 2018-12-26 + */ +@Service +@RequiredArgsConstructor +public class VerifyServiceImpl implements VerifyService { + + @Value("${code.expiration}") + private Long expiration; + private final RedisUtils redisUtils; + + @Override + @Transactional(rollbackFor = Exception.class) + public EmailVo sendEmail(String email, String key) { + EmailVo emailVo; + String content; + String redisKey = key + email; + // 如果不存在有效的验证码,就创建一个新的 + TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); + Template template = engine.getTemplate("email.ftl"); + Object oldCode = redisUtils.get(redisKey); + if(oldCode == null){ + String code = RandomUtil.randomNumbers (6); + // 存入缓存 + if(!redisUtils.set(redisKey, code, expiration)){ + throw new BadRequestException("服务异常,请联系网站负责人"); + } + content = template.render(Dict.create().set("code",code)); + emailVo = new EmailVo(Collections.singletonList(email),"ELADMIN后台管理系统",content); + // 存在就再次发送原来的验证码 + } else { + content = template.render(Dict.create().set("code",oldCode)); + emailVo = new EmailVo(Collections.singletonList(email),"ELADMIN后台管理系统",content); + } + return emailVo; + } + + @Override + public void validated(String key, String code) { + Object value = redisUtils.get(key); + if(value == null || !value.toString().equals(code)){ + throw new BadRequestException("无效验证码"); + } else { + redisUtils.del(key); + } + } +} diff --git a/eladmin-system/src/main/resources/banner.txt b/eladmin-system/src/main/resources/banner.txt new file mode 100644 index 0000000..cc460ce --- /dev/null +++ b/eladmin-system/src/main/resources/banner.txt @@ -0,0 +1,8 @@ + _ _ _ + | | | | (_) + ___| |______ __ _ __| |_ __ ___ _ _ __ + / _ | |______/ _` |/ _` | '_ ` _ \| | '_ \ + | __| | | (_| | (_| | | | | | | | | | | + \___|_| \__,_|\__,_|_| |_| |_|_|_| |_| + + :: Spring Boot :: (v2.6.4) \ No newline at end of file diff --git a/eladmin-system/src/main/resources/config/application-dev.yml b/eladmin-system/src/main/resources/config/application-dev.yml new file mode 100644 index 0000000..1d6d0b2 --- /dev/null +++ b/eladmin-system/src/main/resources/config/application-dev.yml @@ -0,0 +1,123 @@ +# Sql日志 +mybatis-plus: + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + +#配置数据源 +spring: + datasource: + druid: + db-type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://192.168.31.162:3306/new_crm?serverTimezone=GMT%2B8&characterEncoding=utf8&useSSL=false + username: lion + password: leeqiang +# username: crmdev +# password: CMDV1qaz!QAZ1 + # 初始连接数 + initial-size: 5 + # 最小连接数 + min-idle: 15 + # 最大连接数 + max-active: 30 + # 超时时间(以秒数为单位) + remove-abandoned-timeout: 180 + # 获取连接超时时间 + max-wait: 3000 + # 连接有效性检测时间 + time-between-eviction-runs-millis: 60000 + # 连接在池中最小生存的时间 + min-evictable-idle-time-millis: 300000 + # 连接在池中最大生存的时间 + max-evictable-idle-time-millis: 900000 + # 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除 + test-while-idle: true + # 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个 + test-on-borrow: true + # 是否在归还到池中前进行检验 + test-on-return: false + # 检测连接是否有效 + validation-query: select 1 + # 配置监控统计 + webStatFilter: + enabled: true + stat-view-servlet: + enabled: true + url-pattern: /druid/* + reset-enable: false + filter: + stat: + enabled: true + # 记录慢SQL + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + +# 登录相关配置 +login: + # 是否限制单用户登录 + single-login: false + # Redis用户登录缓存配置 + user-cache: + # 存活时间/秒 + idle-time: 21600 + # 验证码 + login-code: + # 验证码类型配置 查看 LoginProperties 类 + code-type: arithmetic + # 登录图形验证码有效时间/分钟 + expiration: 2 + # 验证码高度 + width: 111 + # 验证码宽度 + height: 36 + # 内容长度 + length: 2 + # 字体名称,为空则使用默认字体 + font-name: + # 字体大小 + font-size: 25 + +#jwt +jwt: + header: Authorization + # 令牌前缀 + token-start-with: Bearer + # 必须使用最少88位的Base64对该令牌进行编码 + base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI= + # 令牌过期时间 此处单位/毫秒 ,默认4小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html + token-validity-in-seconds: 14400000 + # 在线用户key + online-key: "online-token:" + # 验证码 + code-key: "captcha-code:" + # token 续期检查时间范围(默认30分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 + detect: 1800000 + # 续期时间范围,默认1小时,单位毫秒 + renew: 3600000 + +#是否允许生成代码,生产环境设置为false +generator: + enabled: true + +#是否开启 swagger-ui +swagger: + enabled: true + +# 文件存储路径 +file: + mac: + path: ~/file/ + avatar: ~/avatar/ + linux: + path: /home/eladmin/file/ + avatar: /home/eladmin/avatar/ + windows: + path: C:\eladmin\file\ + avatar: C:\eladmin\avatar\ + # 文件大小 /M + maxSize: 100 + avatarMaxSize: 5 diff --git a/eladmin-system/src/main/resources/config/application-prod.yml b/eladmin-system/src/main/resources/config/application-prod.yml new file mode 100644 index 0000000..f047ba6 --- /dev/null +++ b/eladmin-system/src/main/resources/config/application-prod.yml @@ -0,0 +1,125 @@ +#配置数据源 +spring: + datasource: + druid: + db-type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://10.10.10.13:3306/crm?serverTimezone=GMT%2B8&characterEncoding=utf8&useSSL=false + username: crmdev + password: CMDV1qaz!QAZ1 + # 初始连接数 + initial-size: 5 + # 最小连接数 + min-idle: 15 + # 最大连接数 + max-active: 30 + # 获取连接超时时间 + max-wait: 5000 + # 连接有效性检测时间 + time-between-eviction-runs-millis: 60000 + # 连接在池中最小生存的时间 + min-evictable-idle-time-millis: 300000 + # 连接在池中最大生存的时间 + max-evictable-idle-time-millis: 900000 + # 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除 + test-while-idle: true + # 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个 + test-on-borrow: true + # 是否在归还到池中前进行检验 + test-on-return: false + # 检测连接是否有效 + validation-query: select 1 + # 配置监控统计 + webStatFilter: + enabled: true + stat-view-servlet: + allow: + enabled: true + # 控制台管理用户名和密码 + url-pattern: /druid/* + reset-enable: false + login-username: admin + login-password: 123456 + filter: + stat: + enabled: true + # 记录慢SQL + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + +# 登录相关配置 +login: + # 是否限制单用户登录 + single-login: false + # Redis用户登录缓存配置 + user-cache: + # 存活时间/秒 + idle-time: 21600 + # 验证码 + login-code: + # 验证码类型配置 查看 LoginProperties 类 + code-type: arithmetic + # 登录图形验证码有效时间/分钟 + expiration: 2 + # 验证码高度 + width: 111 + # 验证码宽度 + height: 36 + # 内容长度 + length: 2 + # 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可 + font-name: + # 字体大小 + font-size: 25 + +#jwt +jwt: + header: Authorization + # 令牌前缀 + token-start-with: Bearer + # 必须使用最少88位的Base64对该令牌进行编码 + base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI= + # 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html + token-validity-in-seconds: 7200000 + # 在线用户key + online-key: "online-token:" + # 验证码 + code-key: "captcha-code:" + # token 续期检查时间范围(默认30分钟,单位默认毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 + detect: 1800000 + # 续期时间范围,默认 1小时,这里单位毫秒 + renew: 3600000 + +#是否允许生成代码,生产环境设置为false +generator: + enabled: false + +#如果生产环境要开启swagger,需要配置请求地址 +#springfox: +# documentation: +# swagger: +# v2: +# host: # 接口域名或外网ip + +#是否开启 swagger-ui +swagger: + enabled: false + +# 文件存储路径 +file: + mac: + path: ~/file/ + avatar: ~/avatar/ + linux: + path: /home/eladmin/file/ + avatar: /home/eladmin/avatar/ + windows: + path: C:\eladmin\file\ + avatar: C:\eladmin\avatar\ + # 文件大小 /M + maxSize: 100 + avatarMaxSize: 5 diff --git a/eladmin-system/src/main/resources/config/application-quartz.yml b/eladmin-system/src/main/resources/config/application-quartz.yml new file mode 100644 index 0000000..561482c --- /dev/null +++ b/eladmin-system/src/main/resources/config/application-quartz.yml @@ -0,0 +1,29 @@ +# 配置 quartz 分布式支持, sql 文件在 sql 目录下,需要导入到数据库,并且需要修改 application.yml 文件的 active: dev 配置 +spring: + quartz: + # 必需,指定使用 JDBC 存储 + job-store-type: jdbc + properties: + org: + quartz: + scheduler: + # 必需,指定调度器实例的名称 + instanceName: eladmin + # 必需,指定调度器实例的 ID + instanceId: auto + threadPool: + # 可选,线程池的线程数量,可以根据需要调整 + threadCount: 5 + jobStore: + # 可选,如果你不需要集群,可以去掉 + isClustered: true + # 可选,集群检查间隔时间,可以根据需要调整 + clusterCheckinInterval: 10000 + # 必需,指定 JDBC 驱动代理类 + driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate + # 可选,是否使用属性存储,可以根据需要调整 + useProperties: false + # 必需,指定表的前缀 + tablePrefix: qrtz_ + # 可选,指定误触发阈值,可以根据需要调整 + misfireThreshold: 60000 \ No newline at end of file diff --git a/eladmin-system/src/main/resources/config/application.yml b/eladmin-system/src/main/resources/config/application.yml new file mode 100644 index 0000000..1ce07bf --- /dev/null +++ b/eladmin-system/src/main/resources/config/application.yml @@ -0,0 +1,61 @@ +server: + port: 8000 + compression: + enabled: true + mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json + +mybatis-plus: + configuration: + # 关闭二级缓存 + cache-enabled: false + # 设置本地缓存作用域 + local-cache-scope: SESSION + map-underscore-to-camel-case: true +spring: + freemarker: + check-template-location: false + profiles: + # 激活的环境,如果需要 quartz 分布式支持,需要修改 active: dev,quartz + active: dev + data: + redis: + repositories: + enabled: false +# pid: +# file: /自行指定位置/eladmin.pid + + redis: + #数据库索引 + database: 9 + host: 192.168.31.162 + port: 6379 + password: leeqiang +# host: localhost +# port: 6379 +# password: i6LcrsWrKFLVmPlntDmk9xqr8K5QCaDb +# username: default + #连接超时时间 +# timeout: 6000 +task: + pool: + # 核心线程池大小 + core-pool-size: 10 + # 最大线程数 + max-pool-size: 30 + # 活跃时间 + keep-alive-seconds: 60 + # 队列容量 + queue-capacity: 50 + +#七牛云 +qiniu: + # 文件大小 /M + max-size: 15 + +#邮箱验证码有效时间/秒 +code: + expiration: 300 + +#密码加密传输,前端公钥加密,后端私钥解密 +rsa: + private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A== diff --git a/eladmin-system/src/main/resources/generator.properties b/eladmin-system/src/main/resources/generator.properties new file mode 100644 index 0000000..2ed9370 --- /dev/null +++ b/eladmin-system/src/main/resources/generator.properties @@ -0,0 +1,27 @@ +#数据库类型转Java类型 +tinyint=Integer +smallint=Integer +mediumint=Integer +int=Integer +integer=Integer + +bigint=Long + +float=Float + +double=Double + +decimal=BigDecimal + +bit=Boolean + +char=String +varchar=String +tinytext=String +text=String +mediumtext=String +longtext=String + +date=Timestamp +datetime=Timestamp +timestamp=Timestamp \ No newline at end of file diff --git a/eladmin-system/src/main/resources/log4jdbc.log4j2.properties b/eladmin-system/src/main/resources/log4jdbc.log4j2.properties new file mode 100644 index 0000000..302525f --- /dev/null +++ b/eladmin-system/src/main/resources/log4jdbc.log4j2.properties @@ -0,0 +1,4 @@ +# If you use SLF4J. First, you need to tell log4jdbc-log4j2 that you want to use the SLF4J logger +log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator +log4jdbc.auto.load.popular.drivers=false +log4jdbc.drivers=com.mysql.cj.jdbc.Driver \ No newline at end of file diff --git a/eladmin-system/src/main/resources/logback.xml b/eladmin-system/src/main/resources/logback.xml new file mode 100644 index 0000000..3f8f9d8 --- /dev/null +++ b/eladmin-system/src/main/resources/logback.xml @@ -0,0 +1,45 @@ + + + elAdmin + + + + + + + ${log.pattern} + ${log.charset} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml b/eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml new file mode 100644 index 0000000..f5addc8 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + app_id,name,port,upload_path,deploy_path,backup_path,start_script,deploy_script,create_by,update_by,create_time,update_time + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml b/eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml new file mode 100644 index 0000000..b43d909 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + db_id, name, jdbc_url, pwd, user_name, create_by, update_by, create_time, update_time + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml b/eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml new file mode 100644 index 0000000..e05af3e --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + history_id, app_name, ip, deploy_date, deploy_user, deploy_id + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml b/eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml new file mode 100644 index 0000000..001b369 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + deploy.deploy_id as d_deploy_id, deploy.app_id as d_app_id,deploy.create_by as d_create_by,deploy.update_by as d_update_by,deploy.create_time as d_create_time,deploy.update_time as d_update_time, + app.app_id as a_app_id,app.name as a_name,app.port as a_port,app.upload_path as a_upload_path,app.deploy_path as a_deploy_path,app.backup_path as a_backup_path,app.start_script as a_start_script,app.deploy_script as a_deploy_script + + + + server.server_id as s_server_id,server.name as s_name,server.ip as s_ip,server.port as s_port,server.account as s_account,server.password as s_password + + + + + + and app.name like concat('%',#{criteria.appName},'%') + + + and deploy.create_time between #{criteria.createTime[0]} and #{criteria.createTime[1]} + + + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml b/eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml new file mode 100644 index 0000000..f3247a9 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml @@ -0,0 +1,33 @@ + + + + + + insert into mnt_deploy_server (deploy_id, server_id) + values + + #{deployId}, #{item.id} + + + + + delete from mnt_deploy_server + where deploy_id = #{deployId} + + + + delete from mnt_deploy_server + where deploy_id in + + #{id} + + + + + delete from mnt_deploy_server + where server_id in + + #{id} + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml b/eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml new file mode 100644 index 0000000..1db6b8a --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + server_id, name, ip, port, account, password, create_by, update_by, create_time, update_time + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/quartz/QuartzJobMapper.xml b/eladmin-system/src/main/resources/mapper/quartz/QuartzJobMapper.xml new file mode 100644 index 0000000..99c23e9 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/quartz/QuartzJobMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + job_id, job_name, bean_name, method_name, params, cron_expression, is_pause, person_in_charge, email, sub_task, pause_after_failure, description, create_time, update_time, create_by, update_by + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/quartz/QuartzLogMapper.xml b/eladmin-system/src/main/resources/mapper/quartz/QuartzLogMapper.xml new file mode 100644 index 0000000..1c3a71c --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/quartz/QuartzLogMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + log_id, job_name, bean_name, method_name, params, cron_expression, is_success, exception_detail, time, create_time + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/AssetMapper.xml b/eladmin-system/src/main/resources/mapper/system/AssetMapper.xml new file mode 100644 index 0000000..d97541b --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/AssetMapper.xml @@ -0,0 +1,249 @@ + + + + + + + and pma.username like concat('%', #{username}, '%') + + + and pma.status = #{status} + + + + + + + and pma.uid like concat('%', #{uid}, '%') + + + and pma.username like concat('%', #{username}, '%') + + + and pm.trade_type = #{tradetype} + + + and pm.create_time between #{createTime[0]} and #{createTime[1]} + + + + + + insert into ${name}(member_id,trade_type,trade_item,value,before_value,after_value,create_time,note,title) + values (#{transactionBO.member_id}, + #{transactionBO.trade_type},#{transactionBO.tradeitem},#{transactionBO.value}, + #{transactionBO.before_value}, + #{transactionBO.after_value},DATE_ADD(NOW(), INTERVAL 8 HOUR), + #{transactionBO.note},#{transactionBO.title}) + + + + insert into pro_management (username,member_id,idlist,account_type,operate_type,create_time) + values (#{currentUsername},#{member_id},#{id},#{type},#{title},DATE_ADD(NOW(), INTERVAL 8 HOUR)) + + + + update pro_member + + + username = #{username}, + + + status = #{status}, + + + + + update pro_member_account + + + ${transactionBO.type} = #{transactionBO.value}+ #{price} + + + + + ${transactionBO.type} =#{price}-#{transactionBO.value} + + + where member_id = #{transactionBO.member_id} + + + + update pro_member_account + set status=#{status} + where member_id = #{member_id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/CountMapper.xml b/eladmin-system/src/main/resources/mapper/system/CountMapper.xml new file mode 100644 index 0000000..3ac9bbb --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/CountMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/DeptMapper.xml b/eladmin-system/src/main/resources/mapper/system/DeptMapper.xml new file mode 100644 index 0000000..420aa67 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/DeptMapper.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + dept_id, name, pid, sub_count, create_time, update_time, create_by, update_by, enabled, dept_sort + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/DictDetailMapper.xml b/eladmin-system/src/main/resources/mapper/system/DictDetailMapper.xml new file mode 100644 index 0000000..4db4594 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/DictDetailMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + dd.detail_id, dd.label, dd.`value`, dd.`dict_sort`, dd.create_by, dd.update_by, dd.create_time, dd.update_time, d.dict_id, d.name + + + + + + + + delete from sys_dict_detail + where dict_id in + + #{item} + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/DictMapper.xml b/eladmin-system/src/main/resources/mapper/system/DictMapper.xml new file mode 100644 index 0000000..dbc0c09 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/DictMapper.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + d.dict_id, d.name, d.description, d.create_by, d.update_by, d.create_time, d.update_time + + + + dd.detail_id as dd_id, dd.label, dd.`value`, dd.create_time as dd_create_time + + + + + + and ( + d.name like concat('%', #{criteria.blurry}, '%') + or d.description like concat('%', #{criteria.blurry}, '%') + ) + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/JobMapper.xml b/eladmin-system/src/main/resources/mapper/system/JobMapper.xml new file mode 100644 index 0000000..cfed9c6 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/JobMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + job_id, name, job_sort, enabled, create_by, update_by, create_time, update_time + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/MemberMapper.xml b/eladmin-system/src/main/resources/mapper/system/MemberMapper.xml new file mode 100644 index 0000000..eea6b2c --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/MemberMapper.xml @@ -0,0 +1,109 @@ + + + + + + + and uid like concat('%', #{uid}, '%') + + + and username like concat('%', #{username}, '%') + + + and status = #{status} + + + + + update pro_member + + + username = #{username}, + + + nickname = #{nickname}, + + + status = #{status}, + + + level = #{level}, + + + where uid=#{uid} + + + + update pro_member + + + username = #{username}, + + + nickname = #{nickname}, + + + status = #{status}, + + level = 0 + + where uid=#{uid} + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/MenuMapper.xml b/eladmin-system/src/main/resources/mapper/system/MenuMapper.xml new file mode 100644 index 0000000..f5d5b9b --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/MenuMapper.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + menu_id, title, name, menu_sort, component, path, type, permission, icon, cache, hidden, pid, sub_count, i_frame, create_by, update_by, create_time, update_time + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/RoleDeptMapper.xml b/eladmin-system/src/main/resources/mapper/system/RoleDeptMapper.xml new file mode 100644 index 0000000..da448f5 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/RoleDeptMapper.xml @@ -0,0 +1,25 @@ + + + + + + insert into sys_roles_depts (role_id, dept_id) + values + + #{roleId}, #{item.id} + + + + + delete from sys_roles_depts + where role_id = #{roleId} + + + + delete from sys_roles_depts + where role_id in + + #{id} + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/RoleMapper.xml b/eladmin-system/src/main/resources/mapper/system/RoleMapper.xml new file mode 100644 index 0000000..c4962e5 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/RoleMapper.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + role.role_id as role_role_id, role.name as role_name, role.data_scope as role_data_scope, + role.level as role_level, role.description as role_description, role.create_by as role_create_by, + role.update_by as role_update_by, role.create_time as role_create_time, role.update_time as role_update_time + + + + menu.menu_id as menu_id, menu.title as menu_title, menu.permission as menu_permission + + + + dept.dept_id as dept_id, dept.name as dept_name + + + + + + and ( + role.name like concat('%', #{criteria.blurry}, '%') + or role.description like concat('%', #{criteria.blurry}, '%') + ) + + + and role.create_time between #{criteria.createTime[0]} and #{criteria.createTime[1]} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/RoleMenuMapper.xml b/eladmin-system/src/main/resources/mapper/system/RoleMenuMapper.xml new file mode 100644 index 0000000..2af196c --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/RoleMenuMapper.xml @@ -0,0 +1,30 @@ + + + + + + insert into sys_roles_menus (role_id, menu_id) + values + + #{roleId}, #{item.id} + + + + + delete from sys_roles_menus + where role_id = #{roleId} + + + + delete from sys_roles_menus + where role_id in + + #{id} + + + + + delete from sys_roles_menus + where menu_id = #{menuId} + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/TeamMapper.xml b/eladmin-system/src/main/resources/mapper/system/TeamMapper.xml new file mode 100644 index 0000000..aeb745c --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/TeamMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/UserJobMapper.xml b/eladmin-system/src/main/resources/mapper/system/UserJobMapper.xml new file mode 100644 index 0000000..ae2f255 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/UserJobMapper.xml @@ -0,0 +1,25 @@ + + + + + + insert into sys_users_jobs (user_id, job_id) + values + + #{userId}, #{item.id} + + + + + delete from sys_users_jobs + where user_id = #{userId} + + + + delete from sys_users_jobs + where user_id in + + #{id} + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/mapper/system/UserMapper.xml b/eladmin-system/src/main/resources/mapper/system/UserMapper.xml new file mode 100644 index 0000000..ef24a80 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/UserMapper.xml @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + u.user_id as user_user_id, u.dept_id as user_dept_id, u.username as user_username, + u.nick_name as user_nick_name, u.email as user_email, u.phone as user_phone, + u.gender as user_gender, u.avatar_name as user_avatar_name, u.avatar_path as user_avatar_path, + u.enabled as user_enabled, u.pwd_reset_time as user_pwd_reset_time, u.create_by as user_create_by, + u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, + d.dept_id as dept_id, d.name as dept_name + + + + j.job_id as job_id, j.name as job_name + + + + r.role_id as role_id, r.name as role_name, r.level as role_level, r.data_scope as role_data_scope + + + + + + and u.user_id = #{criteria.id} + + + and u.enabled = #{criteria.enabled} + + + and u.dept_id in + + #{deptId} + + + + and ( + u.username like concat('%', #{criteria.blurry}, '%') + or u.nick_name like concat('%', #{criteria.blurry}, '%') + or u.email like concat('%', #{criteria.blurry}, '%') + ) + + + and u.create_time between #{criteria.createTime[0]} and #{criteria.createTime[1]} + + + + + + + + + + + + + + + + + + + + + + + + + + + + update sys_user set password = #{pwd} + where user_id in + + #{id} + + + diff --git a/eladmin-system/src/main/resources/mapper/system/UserRoleMapper.xml b/eladmin-system/src/main/resources/mapper/system/UserRoleMapper.xml new file mode 100644 index 0000000..3cafb64 --- /dev/null +++ b/eladmin-system/src/main/resources/mapper/system/UserRoleMapper.xml @@ -0,0 +1,25 @@ + + + + + + insert into sys_users_roles (user_id, role_id) + values + + #{userId}, #{item.id} + + + + + delete from sys_users_roles + where user_id = #{userId} + + + + delete from sys_users_roles + where user_id in + + #{id} + + + \ No newline at end of file diff --git a/eladmin-system/src/main/resources/template/email.ftl b/eladmin-system/src/main/resources/template/email.ftl new file mode 100644 index 0000000..606d490 --- /dev/null +++ b/eladmin-system/src/main/resources/template/email.ftl @@ -0,0 +1,48 @@ + + + + + + + +
+
+

尊敬的用户,您好:

+

您正在申请邮箱验证,您的验证码为:

+

${code}

+
+
+
+ Copyright ©${.now?string("yyyy")} ELADMIN 后台管理系统 All Rights Reserved. +
+ +
+
+ + diff --git a/eladmin-system/src/main/resources/template/taskAlarm.ftl b/eladmin-system/src/main/resources/template/taskAlarm.ftl new file mode 100644 index 0000000..a29b078 --- /dev/null +++ b/eladmin-system/src/main/resources/template/taskAlarm.ftl @@ -0,0 +1,69 @@ + + + + + + + +
+
+

任务信息:

+ + + + + + + + + + + + + + + + + +
任务名称Bean名称执行方法参数内容Cron表达式描述内容
${task.jobName}${task.beanName}${task.methodName}${(task.params)!""}${task.cronExpression}${(task.description)!""}
+
+
+

异常信息:

+
+                ${msg}
+            
+
+
+
+
+ Copyright ©${.now?string("yyyy")} ELADMIN 后台管理系统 All Rights Reserved. +
+ +
+ + + diff --git a/eladmin-system/src/test/java/me/zhengjie/EladminSystemApplicationTests.java b/eladmin-system/src/test/java/me/zhengjie/EladminSystemApplicationTests.java new file mode 100644 index 0000000..d3986f0 --- /dev/null +++ b/eladmin-system/src/test/java/me/zhengjie/EladminSystemApplicationTests.java @@ -0,0 +1,16 @@ +package me.zhengjie; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +public class EladminSystemApplicationTests { + + @Test + public void contextLoads() { + } + + public static void main(String[] args) { + } +} + diff --git a/eladmin-tools/pom.xml b/eladmin-tools/pom.xml new file mode 100644 index 0000000..789f134 --- /dev/null +++ b/eladmin-tools/pom.xml @@ -0,0 +1,50 @@ + + + + eladmin + me.zhengjie + 1.1 + + 4.0.0 + + eladmin-tools + 工具模块 + + + 1.4.7 + 7.9.3 + 4.38.4.ALL + + + + + + me.zhengjie + eladmin-logging + 1.1 + + + + + javax.mail + mail + ${mail.version} + + + + + com.qiniu + qiniu-java-sdk + ${qiniu.version} + + + + + com.alipay.sdk + alipay-sdk-java + ${alipay.version} + + + diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java b/eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java new file mode 100644 index 0000000..03dab38 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java @@ -0,0 +1,74 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 支付宝配置类 + * @author Zheng Jie + * @date 2018-12-31 + */ +@Data +@TableName("tool_alipay_config") +public class AlipayConfig implements Serializable { + + @TableId("config_id") + private Long id; + + @NotBlank + @ApiModelProperty(value = "应用ID") + private String appId; + + @NotBlank + @ApiModelProperty(value = "商户私钥") + private String privateKey; + + @NotBlank + @ApiModelProperty(value = "支付宝公钥") + private String publicKey; + + @ApiModelProperty(value = "签名方式") + private String signType="RSA2"; + + @ApiModelProperty(value = "支付宝开放安全地址", hidden = true) + private String gatewayUrl = "https://openapi.alipaydev.com/gateway.do"; + + @ApiModelProperty(value = "编码", hidden = true) + private String charset= "utf-8"; + + @NotBlank + @ApiModelProperty(value = "异步通知地址") + private String notifyUrl; + + @NotBlank + @ApiModelProperty(value = "订单完成后返回的页面") + private String returnUrl; + + @ApiModelProperty(value = "类型") + private String format="JSON"; + + @NotBlank + @ApiModelProperty(value = "商户号") + private String sysServiceProviderId; + +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/EmailConfig.java b/eladmin-tools/src/main/java/me/zhengjie/domain/EmailConfig.java new file mode 100644 index 0000000..a84c1a7 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/EmailConfig.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 邮件配置类,数据存覆盖式存入数据存 + * @author Zheng Jie + * @date 2018-12-26 + */ +@Data +@TableName("tool_email_config") +public class EmailConfig implements Serializable { + + @TableId("config_id") + private Long id; + + @NotBlank + @ApiModelProperty(value = "邮件服务器SMTP地址") + private String host; + + @NotBlank + @ApiModelProperty(value = "邮件服务器 SMTP 端口") + private String port; + + @NotBlank + @ApiModelProperty(value = "发件者用户名") + private String user; + + @NotBlank + @ApiModelProperty(value = "密码") + private String pass; + + @NotBlank + @ApiModelProperty(value = "收件人") + private String fromUser; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java b/eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java new file mode 100644 index 0000000..2594952 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java @@ -0,0 +1,72 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import me.zhengjie.base.BaseEntity; +import java.io.Serializable; + +/** +* @author Zheng Jie +* @date 2019-09-05 +*/ +@Getter +@Setter +@NoArgsConstructor +@TableName("tool_local_storage") +public class LocalStorage extends BaseEntity implements Serializable { + + @TableId(value = "storage_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @ApiModelProperty(value = "真实文件名") + private String realName; + + @ApiModelProperty(value = "文件名") + private String name; + + @ApiModelProperty(value = "后缀") + private String suffix; + + @ApiModelProperty(value = "路径") + private String path; + + @ApiModelProperty(value = "类型") + private String type; + + @ApiModelProperty(value = "大小") + private String size; + + public LocalStorage(String realName,String name, String suffix, String path, String type, String size) { + this.realName = realName; + this.name = name; + this.suffix = suffix; + this.path = path; + this.type = type; + this.size = size; + } + + public void copy(LocalStorage source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} \ No newline at end of file diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java new file mode 100644 index 0000000..274647c --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuConfig.java @@ -0,0 +1,68 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 七牛云对象存储配置类 + * @author Zheng Jie + * @date 2018-12-31 + */ +@Data +@TableName("tool_qiniu_config") +public class QiniuConfig implements Serializable { + + @TableId("config_id") + private Long id; + + @NotBlank + @ApiModelProperty(value = "accessKey") + private String accessKey; + + @NotBlank + @ApiModelProperty(value = "secretKey") + private String secretKey; + + @NotBlank + @ApiModelProperty(value = "存储空间名称作为唯一的 Bucket 识别符") + private String bucket; + + /** + * Zone表示与机房的对应关系 + * 华东 Zone.zone0() + * 华北 Zone.zone1() + * 华南 Zone.zone2() + * 北美 Zone.zoneNa0() + * 东南亚 Zone.zoneAs0() + */ + @NotBlank + @ApiModelProperty(value = "Zone表示与机房的对应关系") + private String zone; + + @NotBlank + @ApiModelProperty(value = "外链域名,可自定义,需在七牛云绑定") + private String host; + + @ApiModelProperty(value = "空间类型:公开/私有") + private String type = "公开"; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java new file mode 100644 index 0000000..93acde5 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/QiniuContent.java @@ -0,0 +1,59 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * 上传成功后,存储结果 + * @author Zheng Jie + * @date 2018-12-31 + */ +@Data +@TableName("tool_qiniu_content") +public class QiniuContent implements Serializable { + + @TableId(value = "content_id", type = IdType.AUTO) + @ApiModelProperty(value = "ID", hidden = true) + private Long id; + + @TableField("name") + @ApiModelProperty(value = "文件名") + private String key; + + @ApiModelProperty(value = "空间名") + private String bucket; + + @ApiModelProperty(value = "大小") + private String size; + + @ApiModelProperty(value = "文件地址") + private String url; + + @ApiModelProperty(value = "文件类型") + private String suffix; + + @ApiModelProperty(value = "空间类型:公开/私有") + private String type = "公开"; + + @TableField(fill = FieldFill.INSERT_UPDATE) + @ApiModelProperty(value = "创建或更新时间") + private Timestamp updateTime; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/vo/EmailVo.java b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/EmailVo.java new file mode 100644 index 0000000..1fb759f --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/EmailVo.java @@ -0,0 +1,44 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; +import java.util.List; + +/** + * 发送邮件时,接收参数的类 + * @author 郑杰 + * @date 2018/09/28 12:02:14 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class EmailVo { + + /** 收件人,支持多个收件人 */ + @NotEmpty + private List tos; + + @NotBlank + private String subject; + + @NotBlank + private String content; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/vo/LocalStorageQueryCriteria.java b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/LocalStorageQueryCriteria.java new file mode 100644 index 0000000..103e754 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/LocalStorageQueryCriteria.java @@ -0,0 +1,32 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2019-09-05 +*/ +@Data +public class LocalStorageQueryCriteria{ + + private String blurry; + + private List createTime; +} \ No newline at end of file diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/vo/QiniuQueryCriteria.java b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/QiniuQueryCriteria.java new file mode 100644 index 0000000..446585f --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/QiniuQueryCriteria.java @@ -0,0 +1,32 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain.vo; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; + +/** + * @author Zheng Jie + * @date 2019-6-4 09:54:37 + */ +@Data +public class QiniuQueryCriteria{ + + private String key; + + private List createTime; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/domain/vo/TradeVo.java b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/TradeVo.java new file mode 100644 index 0000000..01c1c2f --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/domain/vo/TradeVo.java @@ -0,0 +1,63 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import javax.validation.constraints.NotBlank; +import java.sql.Date; +import java.sql.Timestamp; + +/** + * 交易详情,按需应该存入数据库,这里存入数据库,仅供临时测试 + * @author Zheng Jie + * @date 2018-12-31 + */ +@Data +public class TradeVo { + + /** (必填)商品描述 */ + @NotBlank + private String body; + + /** (必填)商品名称 */ + @NotBlank + private String subject; + + /** (必填)商户订单号,应该由后台生成 */ + @ApiModelProperty(hidden = true) + private String outTradeNo; + + /** (必填)第三方订单号 */ + @ApiModelProperty(hidden = true) + private String tradeNo; + + /** (必填)价格 */ + @NotBlank + private String totalAmount; + + /** 订单状态,已支付,未支付,作废 */ + @ApiModelProperty(hidden = true) + private String state; + + /** 创建时间,存入数据库时需要 */ + @ApiModelProperty(hidden = true) + private Timestamp createTime; + + /** 作废时间,存入数据库时需要 */ + @ApiModelProperty(hidden = true) + private Date cancelTime; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java b/eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java new file mode 100644 index 0000000..5955409 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java @@ -0,0 +1,30 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.domain.AlipayConfig; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-14 + **/ +@Mapper +public interface AliPayConfigMapper extends BaseMapper { + +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java b/eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java new file mode 100644 index 0000000..3f5cab3 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java @@ -0,0 +1,30 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.domain.EmailConfig; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-14 + **/ +@Mapper +public interface EmailConfigMapper extends BaseMapper { + +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java b/eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java new file mode 100644 index 0000000..2b2aac8 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.domain.LocalStorage; +import me.zhengjie.domain.vo.LocalStorageQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-14 + **/ +@Mapper +public interface LocalStorageMapper extends BaseMapper { + + IPage findAll(@Param("criteria") LocalStorageQueryCriteria criteria, Page page); + + List findAll(@Param("criteria") LocalStorageQueryCriteria criteria); +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java b/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java new file mode 100644 index 0000000..7ce2b02 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import me.zhengjie.domain.EmailConfig; +import me.zhengjie.domain.QiniuConfig; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-14 + **/ +@Mapper +public interface QiniuConfigMapper extends BaseMapper { + +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java b/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java new file mode 100644 index 0000000..3252447 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019-2023 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import me.zhengjie.domain.QiniuContent; +import me.zhengjie.domain.vo.QiniuQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author Zheng Jie + * @description + * @date 2023-06-14 + **/ +@Mapper +public interface QiniuContentMapper extends BaseMapper { + + QiniuContent findByKey(@Param("name") String name); + + IPage findAll(@Param("criteria") QiniuQueryCriteria criteria, Page page); + + List findAll(QiniuQueryCriteria criteria); +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java new file mode 100644 index 0000000..0c03d0a --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java @@ -0,0 +1,135 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.annotation.AnonymousAccess; +import me.zhengjie.annotation.Log; +import me.zhengjie.annotation.rest.AnonymousGetMapping; +import me.zhengjie.domain.vo.TradeVo; +import me.zhengjie.domain.AlipayConfig; +import me.zhengjie.utils.AliPayStatusEnum; +import me.zhengjie.utils.AlipayUtils; +import me.zhengjie.service.AliPayService; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.nio.charset.StandardCharsets; +import java.util.Map; + +/** + * @author Zheng Jie + * @date 2018-12-31 + */ +@Slf4j +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/aliPay") +@Api(tags = "工具:支付宝管理") +public class AliPayController { + + private final AlipayUtils alipayUtils; + private final AliPayService alipayService; + + @GetMapping + public ResponseEntity queryAliConfig() { + return new ResponseEntity<>(alipayService.find(), HttpStatus.OK); + } + + @Log("配置支付宝") + @ApiOperation("配置支付宝") + @PutMapping + public ResponseEntity updateAliPayConfig(@Validated @RequestBody AlipayConfig alipayConfig) { + alipayService.config(alipayConfig); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("支付宝PC网页支付") + @ApiOperation("PC网页支付") + @PostMapping(value = "/toPayAsPC") + public ResponseEntity toPayAsPc(@Validated @RequestBody TradeVo trade) throws Exception { + AlipayConfig aliPay = alipayService.find(); + trade.setOutTradeNo(alipayUtils.getOrderCode()); + String payUrl = alipayService.toPayAsPc(aliPay, trade); + return ResponseEntity.ok(payUrl); + } + + @Log("支付宝手机网页支付") + @ApiOperation("手机网页支付") + @PostMapping(value = "/toPayAsWeb") + public ResponseEntity toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception { + AlipayConfig alipay = alipayService.find(); + trade.setOutTradeNo(alipayUtils.getOrderCode()); + String payUrl = alipayService.toPayAsWeb(alipay, trade); + return ResponseEntity.ok(payUrl); + } + + @ApiIgnore + @AnonymousGetMapping("/return") + @ApiOperation("支付之后跳转的链接") + public ResponseEntity returnPage(HttpServletRequest request, HttpServletResponse response) { + AlipayConfig alipay = alipayService.find(); + response.setContentType("text/html;charset=" + alipay.getCharset()); + //内容验签,防止黑客篡改参数 + if (alipayUtils.rsaCheck(request, alipay)) { + //商户订单号 + String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); + //支付宝交易号 + String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); + System.out.println("商户订单号" + outTradeNo + " " + "第三方交易号" + tradeNo); + + // 根据业务需要返回数据,这里统一返回OK + return new ResponseEntity<>("payment successful", HttpStatus.OK); + } else { + // 根据业务需要返回数据 + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } + } + + @ApiIgnore + @RequestMapping("/notify") + @AnonymousAccess + @ApiOperation("支付异步通知(要公网访问),接收异步通知,检查通知内容app_id、out_trade_no、total_amount是否与请求中的一致,根据trade_status进行后续业务处理") + public ResponseEntity notify(HttpServletRequest request) { + AlipayConfig alipay = alipayService.find(); + Map parameterMap = request.getParameterMap(); + //内容验签,防止黑客篡改参数 + if (alipayUtils.rsaCheck(request, alipay)) { + //交易状态 + String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); + // 商户订单号 + String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); + //支付宝交易号 + String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); + //付款金额 + String totalAmount = new String(request.getParameter("total_amount").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); + //验证 + if (tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue()) || tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())) { + // 验证通过后应该根据业务需要处理订单 + } + return new ResponseEntity<>(HttpStatus.OK); + } + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java new file mode 100644 index 0000000..b4ae6dd --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java @@ -0,0 +1,63 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.rest; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.domain.vo.EmailVo; +import me.zhengjie.domain.EmailConfig; +import me.zhengjie.service.EmailService; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * 发送邮件 + * @author 郑杰 + * @date 2018/09/28 6:55:53 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("api/email") +@Api(tags = "工具:邮件管理") +public class EmailController { + + private final EmailService emailService; + + @GetMapping + public ResponseEntity queryEmailConfig(){ + return new ResponseEntity<>(emailService.find(),HttpStatus.OK); + } + + @Log("配置邮件") + @PutMapping + @ApiOperation("配置邮件") + public ResponseEntity updateEmailConfig(@Validated @RequestBody EmailConfig emailConfig) throws Exception { + emailService.config(emailConfig, emailService.find()); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("发送邮件") + @PostMapping + @ApiOperation("发送邮件") + public ResponseEntity sendEmail(@Validated @RequestBody EmailVo emailVo){ + emailService.send(emailVo,emailService.find()); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java new file mode 100644 index 0000000..3a443b2 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java @@ -0,0 +1,99 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.RequiredArgsConstructor; +import me.zhengjie.annotation.Log; +import me.zhengjie.domain.LocalStorage; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.service.LocalStorageService; +import me.zhengjie.domain.vo.LocalStorageQueryCriteria; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import io.swagger.annotations.*; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** +* @author Zheng Jie +* @date 2019-09-05 +*/ +@RestController +@RequiredArgsConstructor +@Api(tags = "工具:本地存储管理") +@RequestMapping("/localStorage") +public class LocalStorageController { + + private final LocalStorageService localStorageService; + + @GetMapping + @ApiOperation("查询文件") + @PreAuthorize("@el.check('storage:list')") + public ResponseEntity> queryFile(LocalStorageQueryCriteria criteria, Page page){ + return new ResponseEntity<>(localStorageService.queryAll(criteria,page),HttpStatus.OK); + } + + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('storage:list')") + public void exportFile(HttpServletResponse response, LocalStorageQueryCriteria criteria) throws IOException { + localStorageService.download(localStorageService.queryAll(criteria), response); + } + + @PostMapping + @ApiOperation("上传文件") + @PreAuthorize("@el.check('storage:add')") + public ResponseEntity createFile(@RequestParam String name, @RequestParam("file") MultipartFile file){ + localStorageService.create(name, file); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + @ApiOperation("上传图片") + @PostMapping("/pictures") + public ResponseEntity uploadPicture(@RequestParam MultipartFile file){ + // 判断文件是否为图片 + String suffix = FileUtil.getExtensionName(file.getOriginalFilename()); + if(!FileUtil.IMAGE.equals(FileUtil.getFileType(suffix))){ + throw new BadRequestException("只能上传图片"); + } + LocalStorage localStorage = localStorageService.create(null, file); + return new ResponseEntity<>(localStorage, HttpStatus.OK); + } + + @PutMapping + @Log("修改文件") + @ApiOperation("修改文件") + @PreAuthorize("@el.check('storage:edit')") + public ResponseEntity updateFile(@Validated @RequestBody LocalStorage resources){ + localStorageService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除文件") + @DeleteMapping + @ApiOperation("多选删除") + public ResponseEntity deleteFile(@RequestBody Long[] ids) { + localStorageService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java b/eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java new file mode 100644 index 0000000..2601aab --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/rest/QiniuController.java @@ -0,0 +1,124 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.rest; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.zhengjie.annotation.Log; +import me.zhengjie.domain.QiniuConfig; +import me.zhengjie.domain.QiniuContent; +import me.zhengjie.service.QiNiuConfigService; +import me.zhengjie.domain.vo.QiniuQueryCriteria; +import me.zhengjie.service.QiniuContentService; +import me.zhengjie.utils.PageResult; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * 发送邮件 + * @author 郑杰 + * @date 2018/09/28 6:55:53 + */ +@Slf4j +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/qiNiuContent") +@Api(tags = "工具:七牛云存储管理") +public class QiniuController { + + private final QiniuContentService qiniuContentService; + private final QiNiuConfigService qiNiuConfigService; + + @GetMapping(value = "/config") + public ResponseEntity queryQiNiuConfig(){ + return new ResponseEntity<>(qiNiuConfigService.getConfig(), HttpStatus.OK); + } + + @Log("配置七牛云存储") + @ApiOperation("配置七牛云存储") + @PutMapping(value = "/config") + public ResponseEntity updateQiNiuConfig(@Validated @RequestBody QiniuConfig qiniuConfig){ + qiNiuConfigService.saveConfig(qiniuConfig); + qiNiuConfigService.updateType(qiniuConfig.getType()); + return new ResponseEntity<>(HttpStatus.OK); + } + + @ApiOperation("导出数据") + @GetMapping(value = "/download") + public void exportQiNiu(HttpServletResponse response, QiniuQueryCriteria criteria) throws IOException { + qiniuContentService.downloadList(qiniuContentService.queryAll(criteria), response); + } + + @ApiOperation("查询文件") + @GetMapping + public ResponseEntity> queryQiNiu(QiniuQueryCriteria criteria, Page page){ + return new ResponseEntity<>(qiniuContentService.queryAll(criteria, page),HttpStatus.OK); + } + + @ApiOperation("上传文件") + @PostMapping + public ResponseEntity uploadQiNiu(@RequestParam MultipartFile file){ + QiniuContent qiniuContent = qiniuContentService.upload(file, qiNiuConfigService.getConfig()); + Map map = new HashMap<>(3); + map.put("id",qiniuContent.getId()); + map.put("errno",0); + map.put("data",new String[]{qiniuContent.getUrl()}); + return new ResponseEntity<>(map,HttpStatus.OK); + } + + @Log("同步七牛云数据") + @ApiOperation("同步七牛云数据") + @PostMapping(value = "/synchronize") + public ResponseEntity synchronizeQiNiu(){ + qiniuContentService.synchronize(qiNiuConfigService.getConfig()); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("下载文件") + @ApiOperation("下载文件") + @GetMapping(value = "/download/{id}") + public ResponseEntity downloadQiNiu(@PathVariable Long id){ + Map map = new HashMap<>(1); + map.put("url", qiniuContentService.download(qiniuContentService.getById(id), qiNiuConfigService.getConfig())); + return new ResponseEntity<>(map,HttpStatus.OK); + } + + @Log("删除文件") + @ApiOperation("删除文件") + @DeleteMapping(value = "/{id}") + public ResponseEntity deleteQiNiu(@PathVariable Long id){ + qiniuContentService.delete(qiniuContentService.getById(id), qiNiuConfigService.getConfig()); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("删除多张图片") + @ApiOperation("删除多张图片") + @DeleteMapping + public ResponseEntity deleteAllQiNiu(@RequestBody Long[] ids) { + qiniuContentService.deleteAll(ids, qiNiuConfigService.getConfig()); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java b/eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java new file mode 100644 index 0000000..6ffe782 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java @@ -0,0 +1,58 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.vo.TradeVo; +import me.zhengjie.domain.AlipayConfig; + +/** + * @author Zheng Jie + * @date 2018-12-31 + */ +public interface AliPayService extends IService { + + /** + * 查询配置 + * @return AlipayConfig + */ + AlipayConfig find(); + + /** + * 更新配置 + * @param alipayConfig 支付宝配置 + * @return AlipayConfig + */ + AlipayConfig config(AlipayConfig alipayConfig); + + /** + * 处理来自PC的交易请求 + * @param alipay 支付宝配置 + * @param trade 交易详情 + * @return String + * @throws Exception 异常 + */ + String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception; + + /** + * 处理来自手机网页的交易请求 + * @param alipay 支付宝配置 + * @param trade 交易详情 + * @return String + * @throws Exception 异常 + */ + String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/EmailService.java b/eladmin-tools/src/main/java/me/zhengjie/service/EmailService.java new file mode 100644 index 0000000..5fa8ab3 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/EmailService.java @@ -0,0 +1,49 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.vo.EmailVo; +import me.zhengjie.domain.EmailConfig; + +/** + * @author Zheng Jie + * @date 2018-12-26 + */ +public interface EmailService extends IService { + + /** + * 更新邮件配置 + * @param emailConfig 邮箱配置 + * @param old / + * @return / + * @throws Exception / + */ + EmailConfig config(EmailConfig emailConfig, EmailConfig old) throws Exception; + + /** + * 查询配置 + * @return EmailConfig 邮件配置 + */ + EmailConfig find(); + + /** + * 发送邮件 + * @param emailVo 邮件发送的内容 + * @param emailConfig 邮件配置 + */ + void send(EmailVo emailVo, EmailConfig emailConfig); +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/LocalStorageService.java b/eladmin-tools/src/main/java/me/zhengjie/service/LocalStorageService.java new file mode 100644 index 0000000..a9fe552 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/LocalStorageService.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.LocalStorage; +import me.zhengjie.domain.vo.LocalStorageQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; + +/** +* @author Zheng Jie +* @date 2019-09-05 +*/ +public interface LocalStorageService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(LocalStorageQueryCriteria criteria, Page page); + + /** + * 查询全部数据 + * @param criteria 条件 + * @return / + */ + List queryAll(LocalStorageQueryCriteria criteria); + + /** + * 上传 + * @param name 文件名称 + * @param file 文件 + * @return / + */ + LocalStorage create(String name, MultipartFile file); + + /** + * 编辑 + * @param resources 文件信息 + */ + void update(LocalStorage resources); + + /** + * 多选删除 + * @param ids / + */ + void deleteAll(Long[] ids); + + /** + * 导出数据 + * @param localStorages 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List localStorages, HttpServletResponse response) throws IOException; +} \ No newline at end of file diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/QiNiuConfigService.java b/eladmin-tools/src/main/java/me/zhengjie/service/QiNiuConfigService.java new file mode 100644 index 0000000..af0abe4 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/QiNiuConfigService.java @@ -0,0 +1,44 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.QiniuConfig; + +/** + * @author Zheng Jie + * @date 2018-12-31 + */ +public interface QiNiuConfigService extends IService { + + /** + * 查询配置 + * @return QiniuConfig + */ + QiniuConfig getConfig(); + + /** + * 保存 + * @param type 类型 + */ + void saveConfig(QiniuConfig type); + + /** + * 更新 + * @param type 类型 + */ + void updateType(String type); +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/QiniuContentService.java b/eladmin-tools/src/main/java/me/zhengjie/service/QiniuContentService.java new file mode 100644 index 0000000..c9ea547 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/QiniuContentService.java @@ -0,0 +1,94 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import me.zhengjie.domain.QiniuConfig; +import me.zhengjie.domain.QiniuContent; +import me.zhengjie.domain.vo.QiniuQueryCriteria; +import me.zhengjie.utils.PageResult; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; + +/** + * @author Zheng Jie + * @date 2018-12-31 + */ +public interface QiniuContentService extends IService { + + /** + * 分页查询 + * + * @param criteria 条件 + * @param page 分页参数 + * @return / + */ + PageResult queryAll(QiniuQueryCriteria criteria, Page page); + + /** + * 查询全部 + * @param criteria 条件 + * @return / + */ + List queryAll(QiniuQueryCriteria criteria); + + /** + * 上传文件 + * @param file 文件 + * @param qiniuConfig 配置 + * @return QiniuContent + */ + QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig); + + /** + * 下载文件 + * @param content 文件信息 + * @param config 配置 + * @return String + */ + String download(QiniuContent content, QiniuConfig config); + + /** + * 删除文件 + * @param content 文件 + * @param config 配置 + */ + void delete(QiniuContent content, QiniuConfig config); + + /** + * 同步数据 + * @param config 配置 + */ + void synchronize(QiniuConfig config); + + /** + * 删除文件 + * @param ids 文件ID数组 + * @param config 配置 + */ + void deleteAll(Long[] ids, QiniuConfig config); + + /** + * 导出数据 + * @param queryAll / + * @param response / + * @throws IOException / + */ + void downloadList(List queryAll, HttpServletResponse response) throws IOException; +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java new file mode 100644 index 0000000..e70aa34 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java @@ -0,0 +1,118 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import com.alipay.api.AlipayClient; +import com.alipay.api.DefaultAlipayClient; +import com.alipay.api.request.AlipayTradePagePayRequest; +import com.alipay.api.request.AlipayTradeWapPayRequest; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.vo.TradeVo; +import me.zhengjie.domain.AlipayConfig; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.mapper.AliPayConfigMapper; +import me.zhengjie.service.AliPayService; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * @author Zheng Jie + * @date 2018-12-31 + */ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "aliPay") +public class AliPayServiceImpl extends ServiceImpl implements AliPayService { + + @Override + @Cacheable(key = "'config'") + public AlipayConfig find() { + AlipayConfig alipayConfig = getById(1L); + return alipayConfig == null ? new AlipayConfig() : alipayConfig; + } + + @Override + @CachePut(key = "'config'") + @Transactional(rollbackFor = Exception.class) + public AlipayConfig config(AlipayConfig alipayConfig) { + alipayConfig.setId(1L); + saveOrUpdate(alipayConfig); + return alipayConfig; + } + + @Override + public String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception { + + if(alipay.getId() == null){ + throw new BadRequestException("请先添加相应配置,再操作"); + } + AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType()); + + // 创建API对应的request(电脑网页版) + AlipayTradePagePayRequest request = new AlipayTradePagePayRequest(); + + // 订单完成后返回的页面和异步通知地址 + request.setReturnUrl(alipay.getReturnUrl()); + request.setNotifyUrl(alipay.getNotifyUrl()); + // 填充订单参数 + request.setBizContent("{" + + " \"out_trade_no\":\""+trade.getOutTradeNo()+"\"," + + " \"product_code\":\"FAST_INSTANT_TRADE_PAY\"," + + " \"total_amount\":"+trade.getTotalAmount()+"," + + " \"subject\":\""+trade.getSubject()+"\"," + + " \"body\":\""+trade.getBody()+"\"," + + " \"extend_params\":{" + + " \"sys_service_provider_id\":\""+alipay.getSysServiceProviderId()+"\"" + + " }"+ + " }");//填充业务参数 + // 调用SDK生成表单, 通过GET方式,口可以获取url + return alipayClient.pageExecute(request, "GET").getBody(); + + } + + @Override + public String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception { + if(alipay.getId() == null){ + throw new BadRequestException("请先添加相应配置,再操作"); + } + AlipayClient alipayClient = new DefaultAlipayClient(alipay.getGatewayUrl(), alipay.getAppId(), alipay.getPrivateKey(), alipay.getFormat(), alipay.getCharset(), alipay.getPublicKey(), alipay.getSignType()); + + double money = Double.parseDouble(trade.getTotalAmount()); + double maxMoney = 5000; + if(money <= 0 || money >= maxMoney){ + throw new BadRequestException("测试金额过大"); + } + // 创建API对应的request(手机网页版) + AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest(); + request.setReturnUrl(alipay.getReturnUrl()); + request.setNotifyUrl(alipay.getNotifyUrl()); + request.setBizContent("{" + + " \"out_trade_no\":\""+trade.getOutTradeNo()+"\"," + + " \"product_code\":\"FAST_INSTANT_TRADE_PAY\"," + + " \"total_amount\":"+trade.getTotalAmount()+"," + + " \"subject\":\""+trade.getSubject()+"\"," + + " \"body\":\""+trade.getBody()+"\"," + + " \"extend_params\":{" + + " \"sys_service_provider_id\":\""+alipay.getSysServiceProviderId()+"\"" + + " }"+ + " }"); + return alipayClient.pageExecute(request, "GET").getBody(); + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java new file mode 100644 index 0000000..ec34f81 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java @@ -0,0 +1,106 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import cn.hutool.extra.mail.Mail; +import cn.hutool.extra.mail.MailAccount; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.EmailConfig; +import me.zhengjie.domain.vo.EmailVo; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.mapper.EmailConfigMapper; +import me.zhengjie.service.EmailService; +import me.zhengjie.utils.EncryptUtils; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * @author Zheng Jie + * @date 2018-12-26 + */ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "email") +public class EmailServiceImpl extends ServiceImpl implements EmailService { + + @Override + @CachePut(key = "'config'") + @Transactional(rollbackFor = Exception.class) + public EmailConfig config(EmailConfig emailConfig, EmailConfig old) throws Exception { + emailConfig.setId(1L); + if(!emailConfig.getPass().equals(old.getPass())){ + // 对称加密 + emailConfig.setPass(EncryptUtils.desEncrypt(emailConfig.getPass())); + } + saveOrUpdate(emailConfig); + return emailConfig; + } + + @Override + @Cacheable(key = "'config'") + public EmailConfig find() { + EmailConfig emailConfig = getById(1L); + return emailConfig == null ? new EmailConfig() : emailConfig; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void send(EmailVo emailVo, EmailConfig emailConfig){ + if(emailConfig.getId() == null){ + throw new BadRequestException("请先配置,再操作"); + } + // 封装 + MailAccount account = new MailAccount(); + // 设置用户 + String user = emailConfig.getFromUser().split("@")[0]; + account.setUser(user); + account.setHost(emailConfig.getHost()); + account.setPort(Integer.parseInt(emailConfig.getPort())); + account.setAuth(true); + try { + // 对称解密 + account.setPass(EncryptUtils.desDecrypt(emailConfig.getPass())); + } catch (Exception e) { + throw new BadRequestException(e.getMessage()); + } + account.setFrom(emailConfig.getUser()+"<"+emailConfig.getFromUser()+">"); + // ssl方式发送 + account.setSslEnable(true); + // 使用STARTTLS安全连接 + account.setStarttlsEnable(true); + // 解决jdk8之后默认禁用部分tls协议,导致邮件发送失败的问题 + account.setSslProtocols("TLSv1 TLSv1.1 TLSv1.2"); + String content = emailVo.getContent(); + // 发送 + try { + int size = emailVo.getTos().size(); + Mail.create(account) + .setTos(emailVo.getTos().toArray(new String[size])) + .setTitle(emailVo.getSubject()) + .setContent(content) + .setHtml(true) + //关闭session + .setUseGlobalSession(false) + .send(); + }catch (Exception e){ + throw new BadRequestException(e.getMessage()); + } + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java new file mode 100644 index 0000000..b851582 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java @@ -0,0 +1,122 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.config.FileProperties; +import me.zhengjie.domain.LocalStorage; +import me.zhengjie.domain.vo.LocalStorageQueryCriteria; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.mapper.LocalStorageMapper; +import me.zhengjie.utils.*; +import me.zhengjie.service.LocalStorageService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; + +/** +* @author Zheng Jie +* @date 2019-09-05 +*/ +@Service +@RequiredArgsConstructor +public class LocalStorageServiceImpl extends ServiceImpl implements LocalStorageService { + + private final LocalStorageMapper localStorageMapper; + private final FileProperties properties; + + @Override + public PageResult queryAll(LocalStorageQueryCriteria criteria, Page page){ + return PageUtil.toPage(localStorageMapper.findAll(criteria, page)); + } + + @Override + public List queryAll(LocalStorageQueryCriteria criteria){ + return localStorageMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public LocalStorage create(String name, MultipartFile multipartFile) { + FileUtil.checkSize(properties.getMaxSize(), multipartFile.getSize()); + String suffix = FileUtil.getExtensionName(multipartFile.getOriginalFilename()); + String type = FileUtil.getFileType(suffix); + File file = FileUtil.upload(multipartFile, properties.getPath().getPath() + type + File.separator); + if(ObjectUtil.isNull(file)){ + throw new BadRequestException("上传失败"); + } + try { + name = StringUtils.isBlank(name) ? FileUtil.getFileNameNoEx(multipartFile.getOriginalFilename()) : name; + LocalStorage localStorage = new LocalStorage( + file.getName(), + name, + suffix, + file.getPath(), + type, + FileUtil.getSize(multipartFile.getSize()) + ); + save(localStorage); + return localStorage; + }catch (Exception e){ + FileUtil.del(file); + throw e; + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(LocalStorage resources) { + LocalStorage localStorage = getById(resources.getId()); + localStorage.copy(resources); + saveOrUpdate(localStorage); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteAll(Long[] ids) { + for (Long id : ids) { + LocalStorage storage = getById(id); + FileUtil.del(storage.getPath()); + removeById(storage); + } + } + + @Override + public void download(List queryAll, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (LocalStorage localStorage : queryAll) { + Map map = new LinkedHashMap<>(); + map.put("文件名", localStorage.getRealName()); + map.put("备注名", localStorage.getName()); + map.put("文件类型", localStorage.getType()); + map.put("文件大小", localStorage.getSize()); + map.put("创建者", localStorage.getCreateBy()); + map.put("创建日期", localStorage.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuConfigServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuConfigServiceImpl.java new file mode 100644 index 0000000..01c52b2 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuConfigServiceImpl.java @@ -0,0 +1,66 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.QiniuConfig; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.mapper.QiniuConfigMapper; +import me.zhengjie.service.QiNiuConfigService; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * @author Zheng Jie + * @date 2018-12-31 + */ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "qiNiu") +public class QiNiuConfigServiceImpl extends ServiceImpl implements QiNiuConfigService { + + @Override + @Cacheable(key = "'config'") + public QiniuConfig getConfig() { + QiniuConfig qiniuConfig = getById(1L); + return qiniuConfig == null ? new QiniuConfig() : qiniuConfig; + } + + @Override + @CacheEvict(key = "'config'") + @Transactional(rollbackFor = Exception.class) + public void saveConfig(QiniuConfig qiniuConfig) { + qiniuConfig.setId(1L); + String http = "http://", https = "https://"; + if (!(qiniuConfig.getHost().toLowerCase().startsWith(http)||qiniuConfig.getHost().toLowerCase().startsWith(https))) { + throw new BadRequestException("外链域名必须以http://或者https://开头"); + } + saveOrUpdate(qiniuConfig); + } + + @Override + @CacheEvict(key = "'config'") + @Transactional(rollbackFor = Exception.class) + public void updateType(String type) { + QiniuConfig qiniuConfig = getById(1L); + qiniuConfig.setType(type); + saveOrUpdate(qiniuConfig); + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiniuContentServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiniuContentServiceImpl.java new file mode 100644 index 0000000..6ce9cd5 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiniuContentServiceImpl.java @@ -0,0 +1,202 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.service.impl; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.qiniu.common.QiniuException; +import com.qiniu.http.Response; +import com.qiniu.storage.BucketManager; +import com.qiniu.storage.Configuration; +import com.qiniu.storage.UploadManager; +import com.qiniu.storage.model.DefaultPutRet; +import com.qiniu.storage.model.FileInfo; +import com.qiniu.util.Auth; +import lombok.RequiredArgsConstructor; +import me.zhengjie.domain.QiniuConfig; +import me.zhengjie.domain.QiniuContent; +import me.zhengjie.mapper.QiniuContentMapper; +import me.zhengjie.domain.vo.QiniuQueryCriteria; +import me.zhengjie.utils.PageResult; +import me.zhengjie.utils.QiNiuUtil; +import me.zhengjie.exception.BadRequestException; +import me.zhengjie.service.QiniuContentService; +import me.zhengjie.utils.FileUtil; +import me.zhengjie.utils.PageUtil; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.*; + +/** + * @author Zheng Jie + * @date 2018-12-31 + */ +@Service +@RequiredArgsConstructor +@CacheConfig(cacheNames = "qiNiu") +public class QiniuContentServiceImpl extends ServiceImpl implements QiniuContentService { + + private final QiniuContentMapper qiniuContentMapper; + + @Value("${qiniu.max-size}") + private Long maxSize; + + @Override + public PageResult queryAll(QiniuQueryCriteria criteria, Page page){ + return PageUtil.toPage(qiniuContentMapper.findAll(criteria, page)); + } + + @Override + public List queryAll(QiniuQueryCriteria criteria) { + return qiniuContentMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig) { + FileUtil.checkSize(maxSize, file.getSize()); + if(qiniuConfig.getId() == null){ + throw new BadRequestException("请先添加相应配置,再操作"); + } + // 构造一个带指定Zone对象的配置类 + Configuration cfg = new Configuration(QiNiuUtil.getRegion(qiniuConfig.getZone())); + UploadManager uploadManager = new UploadManager(cfg); + Auth auth = Auth.create(qiniuConfig.getAccessKey(), qiniuConfig.getSecretKey()); + String upToken = auth.uploadToken(qiniuConfig.getBucket()); + try { + String key = file.getOriginalFilename(); + if(qiniuContentMapper.findByKey(key) != null) { + key = QiNiuUtil.getKey(key); + } + Response response = uploadManager.put(file.getBytes(), key, upToken); + //解析上传成功的结果 + DefaultPutRet putRet = JSON.parseObject(response.bodyString(), DefaultPutRet.class); + QiniuContent content = qiniuContentMapper.findByKey(FileUtil.getFileNameNoEx(putRet.key)); + if(content == null){ + //存入数据库 + QiniuContent qiniuContent = new QiniuContent(); + qiniuContent.setSuffix(FileUtil.getExtensionName(putRet.key)); + qiniuContent.setBucket(qiniuConfig.getBucket()); + qiniuContent.setType(qiniuConfig.getType()); + qiniuContent.setKey(FileUtil.getFileNameNoEx(putRet.key)); + qiniuContent.setUrl(qiniuConfig.getHost() + "/" + putRet.key); + qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(file.getSize())))); + save(qiniuContent); + } + return content; + } catch (Exception e) { + throw new BadRequestException(e.getMessage()); + } + } + + @Override + public String download(QiniuContent content,QiniuConfig config){ + String finalUrl; + String type = "公开"; + if(type.equals(content.getType())){ + finalUrl = content.getUrl(); + } else { + Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey()); + // 1小时,可以自定义链接过期时间 + long expireInSeconds = 3600; + finalUrl = auth.privateDownloadUrl(content.getUrl(), expireInSeconds); + } + return finalUrl; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(QiniuContent content, QiniuConfig config) { + //构造一个带指定Zone对象的配置类 + Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone())); + Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey()); + BucketManager bucketManager = new BucketManager(auth, cfg); + try { + bucketManager.delete(content.getBucket(), content.getKey() + "." + content.getSuffix()); + } catch (QiniuException ex) { + ex.printStackTrace(); + } finally { + removeById(content); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void synchronize(QiniuConfig config) { + if(config.getId() == null){ + throw new BadRequestException("请先添加相应配置,再操作"); + } + //构造一个带指定Zone对象的配置类 + Configuration cfg = new Configuration(QiNiuUtil.getRegion(config.getZone())); + Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey()); + BucketManager bucketManager = new BucketManager(auth, cfg); + //文件名前缀 + String prefix = ""; + //每次迭代的长度限制,最大1000,推荐值 1000 + int limit = 1000; + //指定目录分隔符,列出所有公共前缀(模拟列出目录效果)。缺省值为空字符串 + String delimiter = ""; + //列举空间文件列表 + BucketManager.FileListIterator fileListIterator = bucketManager.createFileListIterator(config.getBucket(), prefix, limit, delimiter); + while (fileListIterator.hasNext()) { + //处理获取的file list结果 + QiniuContent qiniuContent; + FileInfo[] items = fileListIterator.next(); + for (FileInfo item : items) { + if(qiniuContentMapper.findByKey(FileUtil.getFileNameNoEx(item.key)) == null){ + qiniuContent = new QiniuContent(); + qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(item.fsize)))); + qiniuContent.setSuffix(FileUtil.getExtensionName(item.key)); + qiniuContent.setKey(FileUtil.getFileNameNoEx(item.key)); + qiniuContent.setType(config.getType()); + qiniuContent.setBucket(config.getBucket()); + qiniuContent.setUrl(config.getHost()+"/"+item.key); + save(qiniuContent); + } + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteAll(Long[] ids, QiniuConfig config) { + for (Long id : ids) { + delete(getById(id), config); + } + } + + @Override + public void downloadList(List queryAll, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (QiniuContent content : queryAll) { + Map map = new LinkedHashMap<>(); + map.put("文件名", content.getKey()); + map.put("文件类型", content.getSuffix()); + map.put("空间名称", content.getBucket()); + map.put("文件大小", content.getSize()); + map.put("空间类型", content.getType()); + map.put("创建日期", content.getUpdateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/utils/AliPayStatusEnum.java b/eladmin-tools/src/main/java/me/zhengjie/utils/AliPayStatusEnum.java new file mode 100644 index 0000000..c114fd1 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/utils/AliPayStatusEnum.java @@ -0,0 +1,46 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +/** + * 支付状态 + * @author zhengjie + * @date 2018/08/01 16:45:43 + */ +public enum AliPayStatusEnum { + + /** 交易成功 */ + FINISHED("TRADE_FINISHED"), + + /** 支付成功 */ + SUCCESS("TRADE_SUCCESS"), + + /** 交易创建 */ + BUYER_PAY("WAIT_BUYER_PAY"), + + /** 交易关闭 */ + CLOSED("TRADE_CLOSED"); + + private final String value; + + AliPayStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java b/eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java new file mode 100644 index 0000000..203f7db --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java @@ -0,0 +1,85 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import com.alipay.api.AlipayApiException; +import com.alipay.api.internal.util.AlipaySignature; +import me.zhengjie.domain.AlipayConfig; +import org.springframework.stereotype.Component; +import javax.servlet.http.HttpServletRequest; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * 支付宝工具类 + * @author zhengjie + * @date 2018/09/30 14:04:35 + */ +@Component +public class AlipayUtils { + + /** + * 生成订单号 + * @return String + */ + public String getOrderCode() { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + int a = (int)(Math.random() * 9000.0D) + 1000; + System.out.println(a); + Date date = new Date(); + String str = sdf.format(date); + String[] split = str.split("-"); + String s = split[0] + split[1] + split[2]; + String[] split1 = s.split(" "); + String s1 = split1[0] + split1[1]; + String[] split2 = s1.split(":"); + return split2[0] + split2[1] + split2[2] + a; + } + + /** + * 校验签名 + * @param request HttpServletRequest + * @param alipay 阿里云配置 + * @return boolean + */ + public boolean rsaCheck(HttpServletRequest request, AlipayConfig alipay){ + + // 获取支付宝POST过来反馈信息 + Map params = new HashMap<>(1); + Map requestParams = request.getParameterMap(); + for (Object o : requestParams.keySet()) { + String name = (String) o; + String[] values = requestParams.get(name); + String valueStr = ""; + for (int i = 0; i < values.length; i++) { + valueStr = (i == values.length - 1) ? valueStr + values[i] + : valueStr + values[i] + ","; + } + params.put(name, valueStr); + } + + try { + return AlipaySignature.rsaCheckV1(params, + alipay.getPublicKey(), + alipay.getCharset(), + alipay.getSignType()); + } catch (AlipayApiException e) { + return false; + } + } +} diff --git a/eladmin-tools/src/main/java/me/zhengjie/utils/QiNiuUtil.java b/eladmin-tools/src/main/java/me/zhengjie/utils/QiNiuUtil.java new file mode 100644 index 0000000..8091a95 --- /dev/null +++ b/eladmin-tools/src/main/java/me/zhengjie/utils/QiNiuUtil.java @@ -0,0 +1,71 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed 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 + * + * http://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. + */ +package me.zhengjie.utils; + +import com.qiniu.storage.Region; +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * 七牛云存储工具类 + * @author Zheng Jie + * @date 2018-12-31 + */ +public class QiNiuUtil { + + private static final String HUAD = "华东"; + + private static final String HUAB = "华北"; + + private static final String HUAN = "华南"; + + private static final String BEIM = "北美"; + + /** + * 得到机房的对应关系 + * @param zone 机房名称 + * @return Region + */ + public static Region getRegion(String zone){ + + if(HUAD.equals(zone)){ + return Region.huadong(); + } else if(HUAB.equals(zone)){ + return Region.huabei(); + } else if(HUAN.equals(zone)){ + return Region.huanan(); + } else if (BEIM.equals(zone)){ + return Region.beimei(); + // 否则就是东南亚 + } else { + return Region.qvmHuadong(); + } + } + + /** + * 默认不指定key的情况下,以文件内容的hash值作为文件名 + * @param file 文件名 + * @return String + */ + public static String getKey(String file){ + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); + Date date = new Date(); + return FileUtil.getFileNameNoEx(file) + "-" + + sdf.format(date) + + "." + + FileUtil.getExtensionName(file); + } +} diff --git a/eladmin-tools/src/main/resources/mapper/LocalStorageMapper.xml b/eladmin-tools/src/main/resources/mapper/LocalStorageMapper.xml new file mode 100644 index 0000000..f0ffbb5 --- /dev/null +++ b/eladmin-tools/src/main/resources/mapper/LocalStorageMapper.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + storage_id, real_name, name, suffix, size, type, create_time, update_time, create_by, update_by + + + + \ No newline at end of file diff --git a/eladmin-tools/src/main/resources/mapper/QiniuContentMapper.xml b/eladmin-tools/src/main/resources/mapper/QiniuContentMapper.xml new file mode 100644 index 0000000..67769d0 --- /dev/null +++ b/eladmin-tools/src/main/resources/mapper/QiniuContentMapper.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + content_id, name, size, type, suffix, bucket, url, update_time + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..403acdf --- /dev/null +++ b/pom.xml @@ -0,0 +1,229 @@ + + + 4.0.0 + + me.zhengjie + eladmin + pom + 1.1 + + + eladmin-common + eladmin-logging + eladmin-system + eladmin-tools + eladmin-generator + + + ELADMIN 后台管理 + https://eladmin.vip + + + org.springframework.boot + spring-boot-starter-parent + 2.6.4 + + + + 2.17.0 + 1.2.9 + UTF-8 + UTF-8 + 1.8 + 1.16 + 2.9.2 + 1.2.83 + 1.2.8 + 2.11.1 + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + org.springframework.boot + spring-boot-starter-security + + + + + org.springframework.boot + spring-boot-starter-cache + + + + + org.springframework.boot + spring-boot-starter-validation + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + com.baomidou + mybatis-plus-boot-starter + 3.5.3.1 + + + + + + org.apache.commons + commons-pool2 + ${commons-pool2.version} + + + org.apache.commons + commons-lang3 + + + + + org.bgee.log4jdbc-log4j2 + log4jdbc-log4j2-jdbc4.1 + ${log4jdbc.version} + + + + + + com.github.xiaoymin + knife4j-spring-boot-starter + 3.0.3 + + + + + mysql + mysql-connector-java + runtime + + + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + + + net.dreamlu + mica-ip2region + 2.7.12 + + + + org.aspectj + aspectjrt + 1.9.7 + + + org.aspectj + aspectjweaver + 1.9.7 + + + + + + org.projectlombok + lombok + true + + + + + org.apache.poi + poi + 5.2.0 + + + org.apache.poi + poi-ooxml + 5.2.0 + + + xerces + xercesImpl + 2.12.2 + + + + + com.alibaba + fastjson + ${fastjson.version} + + + + + com.github.whvcse + easy-captcha + 1.6.2 + + + + org.apache.commons + commons-text + 1.10.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + false + + + + diff --git a/sql/code_column_config.sql b/sql/code_column_config.sql new file mode 100644 index 0000000..355d488 --- /dev/null +++ b/sql/code_column_config.sql @@ -0,0 +1,63 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:02:39 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for code_column_config +-- ---------------------------- +DROP TABLE IF EXISTS `code_column_config`; +CREATE TABLE `code_column_config` ( + `column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `table_name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `column_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `column_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `dict_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `extra` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `form_show` bit(1) NULL DEFAULT NULL, + `form_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `key_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `list_show` bit(1) NULL DEFAULT NULL, + `not_null` bit(1) NULL DEFAULT NULL, + `query_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `date_annotation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + PRIMARY KEY (`column_id`) USING BTREE, + INDEX `idx_table_name`(`table_name`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 207 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成字段信息存储' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of code_column_config +-- ---------------------------- +INSERT INTO `code_column_config` VALUES (191, 'pro_member', 'id', 'bigint', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '主键id', NULL); +INSERT INTO `code_column_config` VALUES (192, 'pro_member', 'uid', 'bigint', NULL, '', b'1', NULL, 'UNI', b'1', b'0', NULL, 'userid(astral)', NULL); +INSERT INTO `code_column_config` VALUES (193, 'pro_member', 'username', 'varchar', NULL, '', b'1', NULL, 'UNI', b'1', b'1', NULL, '账号', NULL); +INSERT INTO `code_column_config` VALUES (194, 'pro_member', 'nickname', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '昵称', NULL); +INSERT INTO `code_column_config` VALUES (195, 'pro_member', 'inviter_code', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '邀请码', NULL); +INSERT INTO `code_column_config` VALUES (196, 'pro_member', 'inviter_id', 'bigint', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '邀请人id', NULL); +INSERT INTO `code_column_config` VALUES (197, 'pro_member', 'level', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '会员等级', NULL); +INSERT INTO `code_column_config` VALUES (198, 'pro_member', 'real_level', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '规则等级', NULL); +INSERT INTO `code_column_config` VALUES (199, 'pro_member', 'astral_total_asset', 'decimal', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '交易所现货资产总量(ast)', NULL); +INSERT INTO `code_column_config` VALUES (200, 'pro_member', 'is_effective', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否有效:0->无效;1->有效;', NULL); +INSERT INTO `code_column_config` VALUES (201, 'pro_member', 'is_airdrop', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '是否空投: 0->否;1->是', NULL); +INSERT INTO `code_column_config` VALUES (202, 'pro_member', 'status', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '帐号启用状态: 0->禁用;1->启用', NULL); +INSERT INTO `code_column_config` VALUES (203, 'pro_member', 'update_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '修改时间', NULL); +INSERT INTO `code_column_config` VALUES (204, 'pro_member', 'last_login_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '最后登录时间', NULL); +INSERT INTO `code_column_config` VALUES (205, 'pro_member', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '注册时间(交易所注册时间)', NULL); +INSERT INTO `code_column_config` VALUES (206, 'pro_member', 'version', 'bigint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '乐观锁版本号', NULL); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/code_gen_config.sql b/sql/code_gen_config.sql new file mode 100644 index 0000000..91e43ff --- /dev/null +++ b/sql/code_gen_config.sql @@ -0,0 +1,43 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:02:49 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for code_gen_config +-- ---------------------------- +DROP TABLE IF EXISTS `code_gen_config`; +CREATE TABLE `code_gen_config` ( + `config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `table_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '表名', + `author` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '作者', + `cover` bit(1) NULL DEFAULT NULL COMMENT '是否覆盖', + `module_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '模块名称', + `pack` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '至于哪个包下', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '前端代码生成的路径', + `api_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '前端Api文件路径', + `prefix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '表前缀', + `api_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '接口名称', + PRIMARY KEY (`config_id`) USING BTREE, + INDEX `idx_table_name`(`table_name`(100)) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成器配置' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of code_gen_config +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/crm.sql b/sql/crm.sql new file mode 100644 index 0000000..820a3b7 --- /dev/null +++ b/sql/crm.sql @@ -0,0 +1,1741 @@ +/* + Navicat Premium Data Transfer + + Source Server : 10.10.10.13_3306 + Source Server Type : MySQL + Source Server Version : 80031 (8.0.31) + Source Host : 10.10.10.13:3306 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 80031 (8.0.31) + File Encoding : 65001 + + Date: 20/09/2024 19:52:39 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for code_column_config +-- ---------------------------- +DROP TABLE IF EXISTS `code_column_config`; +CREATE TABLE `code_column_config` ( + `column_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `table_name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `column_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `column_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `dict_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `extra` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `form_show` bit(1) NULL DEFAULT NULL, + `form_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `key_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `list_show` bit(1) NULL DEFAULT NULL, + `not_null` bit(1) NULL DEFAULT NULL, + `query_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `date_annotation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + PRIMARY KEY (`column_id`) USING BTREE, + INDEX `idx_table_name`(`table_name` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 207 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成字段信息存储' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of code_column_config +-- ---------------------------- +INSERT INTO `code_column_config` VALUES (191, 'pro_member', 'id', 'bigint', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '主键id', NULL); +INSERT INTO `code_column_config` VALUES (192, 'pro_member', 'uid', 'bigint', NULL, '', b'1', NULL, 'UNI', b'1', b'0', NULL, 'userid(astral)', NULL); +INSERT INTO `code_column_config` VALUES (193, 'pro_member', 'username', 'varchar', NULL, '', b'1', NULL, 'UNI', b'1', b'1', NULL, '账号', NULL); +INSERT INTO `code_column_config` VALUES (194, 'pro_member', 'nickname', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '昵称', NULL); +INSERT INTO `code_column_config` VALUES (195, 'pro_member', 'inviter_code', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '邀请码', NULL); +INSERT INTO `code_column_config` VALUES (196, 'pro_member', 'inviter_id', 'bigint', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '邀请人id', NULL); +INSERT INTO `code_column_config` VALUES (197, 'pro_member', 'level', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '会员等级', NULL); +INSERT INTO `code_column_config` VALUES (198, 'pro_member', 'real_level', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '规则等级', NULL); +INSERT INTO `code_column_config` VALUES (199, 'pro_member', 'astral_total_asset', 'decimal', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '交易所现货资产总量(ast)', NULL); +INSERT INTO `code_column_config` VALUES (200, 'pro_member', 'is_effective', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否有效:0->无效;1->有效;', NULL); +INSERT INTO `code_column_config` VALUES (201, 'pro_member', 'is_airdrop', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '是否空投: 0->否;1->是', NULL); +INSERT INTO `code_column_config` VALUES (202, 'pro_member', 'status', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '帐号启用状态: 0->禁用;1->启用', NULL); +INSERT INTO `code_column_config` VALUES (203, 'pro_member', 'update_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '修改时间', NULL); +INSERT INTO `code_column_config` VALUES (204, 'pro_member', 'last_login_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '最后登录时间', NULL); +INSERT INTO `code_column_config` VALUES (205, 'pro_member', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '注册时间(交易所注册时间)', NULL); +INSERT INTO `code_column_config` VALUES (206, 'pro_member', 'version', 'bigint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '乐观锁版本号', NULL); + +-- ---------------------------- +-- Table structure for code_gen_config +-- ---------------------------- +DROP TABLE IF EXISTS `code_gen_config`; +CREATE TABLE `code_gen_config` ( + `config_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `table_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '表名', + `author` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '作者', + `cover` bit(1) NULL DEFAULT NULL COMMENT '是否覆盖', + `module_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '模块名称', + `pack` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '至于哪个包下', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '前端代码生成的路径', + `api_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '前端Api文件路径', + `prefix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '表前缀', + `api_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '接口名称', + PRIMARY KEY (`config_id`) USING BTREE, + INDEX `idx_table_name`(`table_name`(100) ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成器配置' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of code_gen_config +-- ---------------------------- + +-- ---------------------------- +-- Table structure for mnt_app +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_app`; +CREATE TABLE `mnt_app` ( + `app_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '应用名称', + `upload_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '上传目录', + `deploy_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部署路径', + `backup_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备份路径', + `port` int NULL DEFAULT NULL COMMENT '应用端口', + `start_script` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启动脚本', + `deploy_script` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部署脚本', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`app_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '应用管理' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of mnt_app +-- ---------------------------- + +-- ---------------------------- +-- Table structure for mnt_database +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_database`; +CREATE TABLE `mnt_database` ( + `db_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '名称', + `jdbc_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'jdbc连接', + `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '账号', + `pwd` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '密码', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`db_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据库管理' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of mnt_database +-- ---------------------------- + +-- ---------------------------- +-- Table structure for mnt_deploy +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_deploy`; +CREATE TABLE `mnt_deploy` ( + `deploy_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `app_id` bigint NULL DEFAULT NULL COMMENT '应用编号', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL, + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`deploy_id`) USING BTREE, + INDEX `FK6sy157pseoxx4fmcqr1vnvvhy`(`app_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '部署管理' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of mnt_deploy +-- ---------------------------- + +-- ---------------------------- +-- Table structure for mnt_deploy_history +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_deploy_history`; +CREATE TABLE `mnt_deploy_history` ( + `history_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'ID', + `app_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用名称', + `deploy_date` datetime NOT NULL COMMENT '部署日期', + `deploy_user` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '部署用户', + `ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '服务器IP', + `deploy_id` bigint NULL DEFAULT NULL COMMENT '部署编号', + PRIMARY KEY (`history_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '部署历史管理' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of mnt_deploy_history +-- ---------------------------- + +-- ---------------------------- +-- Table structure for mnt_deploy_server +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_deploy_server`; +CREATE TABLE `mnt_deploy_server` ( + `deploy_id` bigint NOT NULL COMMENT '部署ID', + `server_id` bigint NOT NULL COMMENT '服务ID', + PRIMARY KEY (`deploy_id`, `server_id`) USING BTREE, + INDEX `FKeaaha7jew9a02b3bk9ghols53`(`server_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '应用与服务器关联' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of mnt_deploy_server +-- ---------------------------- + +-- ---------------------------- +-- Table structure for mnt_server +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_server`; +CREATE TABLE `mnt_server` ( + `server_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '账号', + `ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'IP地址', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '名称', + `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码', + `port` int NULL DEFAULT NULL COMMENT '端口', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`server_id`) USING BTREE, + INDEX `idx_ip`(`ip` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '服务器管理' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of mnt_server +-- ---------------------------- + +-- ---------------------------- +-- Table structure for pro_airdrop +-- ---------------------------- +DROP TABLE IF EXISTS `pro_airdrop`; +CREATE TABLE `pro_airdrop` ( + `id` bigint NOT NULL COMMENT 'id', + `start` int NULL DEFAULT NULL COMMENT '开始人数', + `end` int NULL DEFAULT NULL COMMENT '结束人数', + `amount` decimal(32, 8) NULL DEFAULT NULL COMMENT '空投金额', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_airdrop +-- ---------------------------- +INSERT INTO `pro_airdrop` VALUES (1, 1, 80000, 1000.00000000); +INSERT INTO `pro_airdrop` VALUES (2, 80001, 280000, 400.00000000); +INSERT INTO `pro_airdrop` VALUES (3, 280001, 680000, 200.00000000); +INSERT INTO `pro_airdrop` VALUES (4, 680001, 1480000, 100.00000000); + +-- ---------------------------- +-- Table structure for pro_airdrop_asset_quick +-- ---------------------------- +DROP TABLE IF EXISTS `pro_airdrop_asset_quick`; +CREATE TABLE `pro_airdrop_asset_quick` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `asset` decimal(32, 8) NULL DEFAULT NULL COMMENT '资产', + `quick_ratio` decimal(32, 8) NULL DEFAULT NULL COMMENT '加速比例', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_airdrop_asset_quick +-- ---------------------------- +INSERT INTO `pro_airdrop_asset_quick` VALUES (1, 100.00000000, 0.00010000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (3, 1000.00000000, 0.00030000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (4, 2500.00000000, 0.00040000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (5, 5000.00000000, 0.00050000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (6, 10000.00000000, 0.00060000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (7, 17500.00000000, 0.00070000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (8, 30000.00000000, 0.00080000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (9, 45000.00000000, 0.00090000); +INSERT INTO `pro_airdrop_asset_quick` VALUES (10, 55000.00000000, 0.00100000); + +-- ---------------------------- +-- Table structure for pro_code_table +-- ---------------------------- +DROP TABLE IF EXISTS `pro_code_table`; +CREATE TABLE `pro_code_table` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id', + `category` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '码表类别', + `category_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '类别名称', + `field` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '键', + `name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '名称', + `value` int NULL DEFAULT NULL COMMENT '值', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_category_and_field`(`category` ASC, `field` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '码表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_code_table +-- ---------------------------- +INSERT INTO `pro_code_table` VALUES (1, 'trade_item', '交易项目', 'system_transfer_in', '系统操作', 0); +INSERT INTO `pro_code_table` VALUES (2, 'trade_item', '交易项目', 'system_transfer_out', '系统操作', 1); +INSERT INTO `pro_code_table` VALUES (3, 'trade_item', '交易项目', 'receive', '领取', 3); +INSERT INTO `pro_code_table` VALUES (4, 'trade_item', '交易项目', 'register_airdrop_receive', '注册空投释放领取', 4); +INSERT INTO `pro_code_table` VALUES (5, 'trade_item', '交易项目', 'invite_airdrop_receive', '邀请空投释放领取', 5); +INSERT INTO `pro_code_table` VALUES (6, 'trade_item', '交易项目', 'pledge_receive', '质押释放领取', 6); +INSERT INTO `pro_code_table` VALUES (7, 'trade_item', '交易项目', 'locked_position_receive', '锁仓释放领取', 7); +INSERT INTO `pro_code_table` VALUES (8, 'trade_item', '交易项目', 'invite_locked_position_receive', '邀请锁仓释放领取', 8); +INSERT INTO `pro_code_table` VALUES (10, 'trade_item', '交易项目', 'transfer', '划转', 9); +INSERT INTO `pro_code_table` VALUES (11, 'trade_item', '交易项目', 'pledge', '质押', 10); +INSERT INTO `pro_code_table` VALUES (13, 'trade_item', '交易项目', 'airdrop', '注册空投', 11); +INSERT INTO `pro_code_table` VALUES (14, 'trade_item', '交易项目', 'airdrop_invite_reward', '邀请空投奖励', 13); +INSERT INTO `pro_code_table` VALUES (15, 'trade_item', '交易项目', 'pledge_invite_reward', '邀请质押奖励', 14); +INSERT INTO `pro_code_table` VALUES (16, 'trade_item', '交易项目', 'airdrop_release', '每日释放', 15); +INSERT INTO `pro_code_table` VALUES (17, 'trade_item', '交易项目', 'unless_receive', '无效领取', 16); +INSERT INTO `pro_code_table` VALUES (18, 'trade_item', '交易项目', 'pledge_invite_flat_reward', '邀请质押平级奖励', 17); +INSERT INTO `pro_code_table` VALUES (23, 'trade_item', '交易项目', 'release', '释放', 22); +INSERT INTO `pro_code_table` VALUES (24, 'trade_item', '交易项目', 'quick_release', '加速释放', 23); +INSERT INTO `pro_code_table` VALUES (25, 'trade_item', '交易项目', 'invite_release', '社区空投奖励同比释放', 24); +INSERT INTO `pro_code_table` VALUES (26, 'trade_item', '交易项目', 'pledge_quick_release', '质押加速释放', 25); +INSERT INTO `pro_code_table` VALUES (27, 'trade_item', '交易项目', 'effective_quick_release', '邀请有效会员加速释放', 26); +INSERT INTO `pro_code_table` VALUES (28, 'trade_item', '交易项目', 'asset_quick_release', '持有资产加速释放', 27); + +-- ---------------------------- +-- Table structure for pro_config +-- ---------------------------- +DROP TABLE IF EXISTS `pro_config`; +CREATE TABLE `pro_config` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键Id', + `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '名称', + `value` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '参数值', + `comment` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `show_status` int NULL DEFAULT 1 COMMENT '显示状态: 0->不显示; 1->显示', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '业务字典表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_config +-- ---------------------------- +INSERT INTO `pro_config` VALUES (1, 'system_maintenance_switch', 'false', '系统维护开关', 1, '2023-02-16 17:47:41'); +INSERT INTO `pro_config` VALUES (2, 'transfer_switch', 'true', '划转开关', 1, '2023-05-13 18:43:54'); +INSERT INTO `pro_config` VALUES (3, 'last_register_time', '1726812000000', '最后查询的注册时间', 1, '2024-09-20 14:44:40'); +INSERT INTO `pro_config` VALUES (4, 'query_register_max_time_period', '6000000', '查询注册会员最大时间段(ms)', 1, '2024-08-29 16:15:17'); +INSERT INTO `pro_config` VALUES (5, 'airdrop_number', '1', '空投数', 1, '2024-09-20 14:33:05'); +INSERT INTO `pro_config` VALUES (6, 'ast_price', '0.41', 'ast价值(usdt/ast)', 1, '2024-08-30 01:33:12'); +INSERT INTO `pro_config` VALUES (7, 'release_switch', 'true', '释放开关', 1, '2024-08-30 03:33:38'); +INSERT INTO `pro_config` VALUES (8, 'effective_condition_ast_amount', '100', '有效会员条件(ast)', 1, '2024-08-30 03:56:19'); +INSERT INTO `pro_config` VALUES (10, 'airdrop_expired', '31536000000', '注册空投过期时间(ms)', 1, '2024-08-30 07:38:57'); +INSERT INTO `pro_config` VALUES (11, 'effective_release_1', '2', '邀请有效会员释放参数1', 1, '2024-08-31 22:24:19'); +INSERT INTO `pro_config` VALUES (12, 'effective_release_2', '0.0001', '邀请有效会员释放参数2', 1, '2024-08-31 22:24:26'); +INSERT INTO `pro_config` VALUES (13, 'pledge_release_ratio', '0.001', '质押锁仓释放比例', 1, '2024-09-02 16:03:21'); +INSERT INTO `pro_config` VALUES (14, 'start_release_date', '1726761600000', '开始释放日期(ms)', 1, '2024-09-02 20:18:32'); +INSERT INTO `pro_config` VALUES (15, 'release_delay', '1296000000', '释放延迟日期(ms)', 1, '2024-09-02 20:18:35'); +INSERT INTO `pro_config` VALUES (16, 'pledge_quick_release_multiple', '2', '质押加速释放倍数', 1, '2024-09-02 20:18:35'); +INSERT INTO `pro_config` VALUES (17, 'airdrop_release_ratio', '0.0001', '空投释放系数', 1, '2024-09-02 20:18:35'); +INSERT INTO `pro_config` VALUES (18, 'refresh_member_max_limit', '100', '用户信息刷新最大长度', 1, '2024-09-12 17:19:15'); + +-- ---------------------------- +-- Table structure for pro_handle_queue +-- ---------------------------- +DROP TABLE IF EXISTS `pro_handle_queue`; +CREATE TABLE `pro_handle_queue` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id', + `value` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '值', + `type` int NULL DEFAULT NULL COMMENT '处理类型', + `handle_status` int NULL DEFAULT NULL COMMENT '处理状态: 0->未处理; 1->已处理', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `source_id`(`source_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1129 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '分销处理队列表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_handle_queue +-- ---------------------------- +INSERT INTO `pro_handle_queue` VALUES (1125, 10743, '1', 3, 1, '2024-09-20 14:32:05', '2024-09-20 14:32:00'); +INSERT INTO `pro_handle_queue` VALUES (1126, 10735, NULL, 2, 1, '2024-09-20 14:33:05', '2024-09-20 14:32:59'); +INSERT INTO `pro_handle_queue` VALUES (1127, 10735, NULL, 2, 1, '2024-09-20 14:33:05', '2024-09-20 14:33:04'); +INSERT INTO `pro_handle_queue` VALUES (1128, 10734, '1', 3, 1, '2024-09-20 17:27:05', '2024-09-20 17:27:00'); + +-- ---------------------------- +-- Table structure for pro_level_param +-- ---------------------------- +DROP TABLE IF EXISTS `pro_level_param`; +CREATE TABLE `pro_level_param` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id', + `level` int NULL DEFAULT 1 COMMENT '等级', + `min_area_effective` int NULL DEFAULT NULL COMMENT '小区有效人数', + `lower_level_number` int NULL DEFAULT NULL COMMENT '下级社区人数', + `pledge_amount` decimal(20, 6) NULL DEFAULT NULL COMMENT '质押金额', + `airdrop_ratio` decimal(8, 4) NULL DEFAULT NULL COMMENT '空投奖励比例', + `pledge_ratio` decimal(8, 4) NULL DEFAULT NULL COMMENT '质押奖励比例', + `team_ratio` decimal(8, 4) NULL DEFAULT NULL COMMENT '团队奖励比例', + `flat_ratio` decimal(8, 4) NULL DEFAULT NULL COMMENT '平级比例', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_level`(`level` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员等级参数表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_level_param +-- ---------------------------- +INSERT INTO `pro_level_param` VALUES (1, 1, 15, 0, 300.000000, 0.2000, 0.2000, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (2, 2, 0, 3, 1000.000000, 0.2500, 0.2500, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (3, 3, 0, 3, 2500.000000, 0.3000, 0.3000, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (4, 4, 0, 3, 5000.000000, 0.3500, 0.3500, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (5, 5, 0, 3, 10000.000000, 0.4000, 0.4000, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (6, 6, 0, 2, 17500.000000, 0.4000, 0.4500, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (7, 7, 0, 2, 30000.000000, 0.4000, 0.5000, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (8, 8, 0, 2, 45000.000000, 0.4000, 0.6000, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (9, 9, 0, 2, 55000.000000, 0.4000, 0.7000, 0.0000, 0.2000); +INSERT INTO `pro_level_param` VALUES (11, 0, 0, 0, 0.000000, 0.1000, 0.1000, 0.0000, 0.0000); + +-- ---------------------------- +-- Table structure for pro_management +-- ---------------------------- +DROP TABLE IF EXISTS `pro_management`; +CREATE TABLE `pro_management` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `username` varchar(211) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '用户名字', + `idlist` bigint NULL DEFAULT NULL COMMENT '明细id', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `account_type` varchar(211) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '账户类型: usdt,balance,coinone,cointwo,cointhree,coinfour,coinfive', + `operate_type` varchar(211) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '操作类型: 收入,system_transfer_in,支出system_transfer_out', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '管理员操作会员账户日志表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_management +-- ---------------------------- +INSERT INTO `pro_management` VALUES (8, 'admin', 256, 10734, 'usdt', 'system_transfer_in', '2024-09-20 17:55:20'); +INSERT INTO `pro_management` VALUES (9, 'admin', 2, 10734, 'balance', 'system_transfer_in', '2024-09-20 17:56:25'); +INSERT INTO `pro_management` VALUES (10, 'admin', 3, 10734, 'balance', 'system_transfer_in', '2024-09-20 17:57:41'); +INSERT INTO `pro_management` VALUES (11, 'admin', 150, 10734, 'coin_three', 'system_transfer_in', '2024-09-20 18:01:24'); +INSERT INTO `pro_management` VALUES (12, 'admin', 257, 10734, 'usdt', 'system_transfer_in', '2024-09-20 18:04:43'); + +-- ---------------------------- +-- Table structure for pro_member +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member`; +CREATE TABLE `pro_member` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id', + `uid` bigint NULL DEFAULT NULL COMMENT 'userid(astral)', + `username` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '账号', + `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '昵称', + `inviter_code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '邀请码', + `inviter_id` bigint NULL DEFAULT NULL COMMENT '邀请人id', + `level` int NOT NULL COMMENT '会员等级', + `real_level` int NULL DEFAULT 0 COMMENT '规则等级', + `astral_total_asset` decimal(32, 8) NULL DEFAULT NULL COMMENT '交易所现货资产总量(ast)', + `is_effective` int NOT NULL COMMENT '是否有效:0->无效;1->有效;', + `is_airdrop` int NULL DEFAULT NULL COMMENT '是否空投: 0->否;1->是', + `status` int NOT NULL COMMENT '帐号启用状态: 0->禁用;1->启用', + `update_time` datetime NOT NULL COMMENT '修改时间', + `last_login_time` datetime NULL DEFAULT NULL COMMENT '最后登录时间', + `create_time` datetime NOT NULL COMMENT '注册时间(交易所注册时间)', + `version` bigint NOT NULL DEFAULT 1 COMMENT '乐观锁版本号', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_username`(`username` ASC) USING BTREE, + UNIQUE INDEX `idx_uid`(`uid` ASC) USING BTREE, + INDEX `idx_invite_id`(`inviter_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 10747 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member +-- ---------------------------- +INSERT INTO `pro_member` VALUES (10734, 97832827, '2569868@qq.com', '', '97832827', NULL, 0, 0, 0.00000000, 1, 0, 1, '2024-09-20 19:53:00', NULL, '2024-09-12 16:17:27', 1); +INSERT INTO `pro_member` VALUES (10735, 97832822, 'zss01@qq.com', '', '97832822', NULL, 0, 0, 0.00000000, 0, 1, 1, '2024-09-20 19:53:00', '2024-09-20 17:33:06', '2024-09-14 11:19:51', 21); +INSERT INTO `pro_member` VALUES (10736, 97832828, '1001@qq.com', '', '97832828', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:00', NULL, '2024-09-14 11:47:07', 1); +INSERT INTO `pro_member` VALUES (10737, 97832821, 'zss02@qq.com', '', '97832821', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:00', NULL, '2024-09-14 13:23:32', 1); +INSERT INTO `pro_member` VALUES (10738, 97832823, 'zss03@qq.com', '', '97832823', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-14 13:25:09', 1); +INSERT INTO `pro_member` VALUES (10739, 97832824, 'zss04@qq.com', '', '97832824', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-14 13:34:00', 1); +INSERT INTO `pro_member` VALUES (10740, 97832826, '1002@qq.com', '', '97832826', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-14 13:36:36', 1); +INSERT INTO `pro_member` VALUES (10741, 97832880, 'zss05@qq.com', '', '97832880', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-14 16:31:25', 1); +INSERT INTO `pro_member` VALUES (10742, 97832889, 'zss06@qq.com', '', '97832889', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-14 16:38:57', 1); +INSERT INTO `pro_member` VALUES (10743, 97832885, '001@test.com', '', '97832885', NULL, 0, 0, 229.26829300, 1, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-18 13:17:43', 1); +INSERT INTO `pro_member` VALUES (10744, 97832887, '15669063778', '', '97832887', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-18 13:26:16', 1); +INSERT INTO `pro_member` VALUES (10745, 97832882, '1111@163.com', '', '97832882', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-18 17:40:14', 1); +INSERT INTO `pro_member` VALUES (10746, 97832888, '2132@test.com', '', '97832888', NULL, 0, 0, 0.00000000, 0, 0, 1, '2024-09-20 19:53:01', NULL, '2024-09-18 18:03:42', 1); + +-- ---------------------------- +-- Table structure for pro_member_account +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_account`; +CREATE TABLE `pro_member_account` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id', + `member_id` bigint NOT NULL COMMENT '会员id', + `usdt` decimal(32, 8) NULL DEFAULT NULL COMMENT 'USDT', + `balance` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '余额', + `freeze_balance` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '冻结余额', + `useless_balance` decimal(32, 8) NULL DEFAULT NULL COMMENT '作废余额', + `coin_one` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '空投金额', + `freeze_one` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '冻结空投金额', + `useless_one` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '作废空投金额', + `coin_two` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '奖励空投金额', + `freeze_two` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '冻结奖励空投金额', + `useless_two` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '作废奖励空投金额', + `coin_three` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '质押金额', + `freeze_three` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '冻结质押金额', + `useless_three` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '作废质押金额', + `coin_four` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '锁仓金额', + `freeze_four` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '冻结锁仓余额', + `useless_four` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '作废锁仓金额', + `coin_five` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '奖励锁仓金额', + `freeze_five` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '冻结奖励锁仓金额', + `useless_five` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '作废奖励锁仓金额', + `status` int NOT NULL DEFAULT 1 COMMENT '账户状态: 0->禁用; 1->启用', + `version` bigint NOT NULL DEFAULT 1 COMMENT '乐观锁版本号', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 10747 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员账户表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_account +-- ---------------------------- +INSERT INTO `pro_member_account` VALUES (10734, 10734, 87.00000000, 21.00000000, 0.00000000, 0.00000000, 10.00000000, 0.00000000, 0.00000000, 10.00000000, 0.00000000, 0.00000000, 10.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10735, 10735, 10.00000000, 0.00000000, 0.00000000, 0.00000000, 999.90000000, 0.00000000, 0.10000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 3); +INSERT INTO `pro_member_account` VALUES (10736, 10736, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10737, 10737, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10738, 10738, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10739, 10739, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10740, 10740, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10741, 10741, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10742, 10742, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10743, 10743, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10744, 10744, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10745, 10745, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); +INSERT INTO `pro_member_account` VALUES (10746, 10746, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1, 1); + +-- ---------------------------- +-- Table structure for pro_member_account_concurrent_error +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_account_concurrent_error`; +CREATE TABLE `pro_member_account_concurrent_error` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `account_type` int NULL DEFAULT NULL COMMENT '账户类型: 0->USDT; 1->ABS; 2->算力', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(64, 18) NULL DEFAULT 0.000000000000000000 COMMENT '交易金额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `handle_status` int NULL DEFAULT NULL COMMENT '处理状态: 0->未处理; 1->已处理', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员账户并发错误表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_account_concurrent_error +-- ---------------------------- + +-- ---------------------------- +-- Table structure for pro_member_balance_trade +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_balance_trade`; +CREATE TABLE `pro_member_balance_trade` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易金额', + `before_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易前余额', + `after_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易后余额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员USDT交易表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_balance_trade +-- ---------------------------- +INSERT INTO `pro_member_balance_trade` VALUES (2, 10734, 0, 0, 10.00000000, 1.00000000, 11.00000000, 'system_transfer_in', NULL, NULL, '2024-09-20 17:56:24'); +INSERT INTO `pro_member_balance_trade` VALUES (3, 10734, 0, 0, 10.00000000, 11.00000000, 21.00000000, 'system_transfer_in', NULL, NULL, '2024-09-20 17:57:40'); + +-- ---------------------------- +-- Table structure for pro_member_coin_five_trade +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_coin_five_trade`; +CREATE TABLE `pro_member_coin_five_trade` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易金额', + `before_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易前余额', + `after_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易后余额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 390 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员coin_five交易表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_coin_five_trade +-- ---------------------------- + +-- ---------------------------- +-- Table structure for pro_member_coin_four_trade +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_coin_four_trade`; +CREATE TABLE `pro_member_coin_four_trade` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易金额', + `before_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易前余额', + `after_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易后余额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 150 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员coinfour交易表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_coin_four_trade +-- ---------------------------- + +-- ---------------------------- +-- Table structure for pro_member_coin_one_trade +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_coin_one_trade`; +CREATE TABLE `pro_member_coin_one_trade` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易金额', + `before_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易前余额', + `after_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易后余额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 334 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员coin_one交易表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_coin_one_trade +-- ---------------------------- +INSERT INTO `pro_member_coin_one_trade` VALUES (331, 10735, 0, 11, 1000.00000000, 0.00000000, 1000.00000000, 'airdrop', NULL, 11298, '2024-09-20 14:33:05'); +INSERT INTO `pro_member_coin_one_trade` VALUES (332, 10735, 3, 22, 0.10000000, 1000.00000000, 999.90000000, 'release', NULL, 11298, '2024-09-20 14:34:01'); +INSERT INTO `pro_member_coin_one_trade` VALUES (333, 10734, 0, NULL, 10.00000000, 0.00000000, 10.00000000, 'vip充值:admin', '', NULL, '2024-09-20 07:11:15'); + +-- ---------------------------- +-- Table structure for pro_member_coin_three_trade +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_coin_three_trade`; +CREATE TABLE `pro_member_coin_three_trade` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易金额', + `before_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易前余额', + `after_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易后余额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员three交易表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_coin_three_trade +-- ---------------------------- +INSERT INTO `pro_member_coin_three_trade` VALUES (150, 10734, 0, 0, 10.00000000, 0.00000000, 10.00000000, 'system_transfer_in', NULL, NULL, '2024-09-20 18:01:24'); + +-- ---------------------------- +-- Table structure for pro_member_coin_two_trade +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_coin_two_trade`; +CREATE TABLE `pro_member_coin_two_trade` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易金额', + `before_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易前余额', + `after_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易后余额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 283 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员usdt交易表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_coin_two_trade +-- ---------------------------- +INSERT INTO `pro_member_coin_two_trade` VALUES (282, 10734, 0, NULL, 10.00000000, 0.00000000, 10.00000000, 'vip充值:admin', '', NULL, '2024-09-20 07:12:06'); + +-- ---------------------------- +-- Table structure for pro_member_parameter +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_parameter`; +CREATE TABLE `pro_member_parameter` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + `member_id` bigint NOT NULL COMMENT '会员id', + `withdraw_switch` int NOT NULL COMMENT '提现开关(-1:默认;0->关闭;1->开启;)', + `create_time` datetime NOT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_parameter +-- ---------------------------- + +-- ---------------------------- +-- Table structure for pro_member_release +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_release`; +CREATE TABLE `pro_member_release` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `type` int NULL DEFAULT NULL COMMENT '释放类型', + `total_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '总待释放金额', + `surplus_value` decimal(32, 8) NULL DEFAULT NULL COMMENT '剩余待释放金额', + `status` int NULL DEFAULT NULL COMMENT '状态:;1->释放中;0->已停止', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源id', + `start_date` date NULL DEFAULT NULL COMMENT '开始日期', + `last_release_time` datetime NULL DEFAULT NULL COMMENT '最后释放时间', + `expired_time` datetime NULL DEFAULT NULL COMMENT '过期时间', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 11299 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员充值记录表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_release +-- ---------------------------- +INSERT INTO `pro_member_release` VALUES (11298, 10735, 0, 1000.00000000, 999.90000000, 1, NULL, NULL, '2024-09-20 14:34:00', '2025-09-20 14:33:05', '2024-09-20 14:33:05', '2024-09-20 14:33:05'); + +-- ---------------------------- +-- Table structure for pro_member_statistics +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_statistics`; +CREATE TABLE `pro_member_statistics` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `invite_count` int NULL DEFAULT 0 COMMENT '邀请人数', + `team_count` int NULL DEFAULT NULL COMMENT '团队人数', + `direct_effective` int NULL DEFAULT NULL COMMENT '直推有效人数', + `team_effective` int NULL DEFAULT NULL COMMENT '团队有效人数', + `reward_airdrop_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '奖励空投释放', + `airdrop_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '空投释放', + `airdrop_position_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '空投持仓释放', + `airdrop_invite_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '空投邀请释放', + `airdrop_pledge_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '空投质押释放', + `airdrop_trade_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '空投交易释放', + `pledge_number` decimal(32, 8) NULL DEFAULT NULL COMMENT '质押数量', + `pladge_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '质押释放', + `locked_position_release` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '锁仓释放', + `locked_position_invite_release` decimal(32, 8) NULL DEFAULT NULL COMMENT '锁仓邀请释放', + `airdrop_reward` decimal(32, 8) NULL DEFAULT NULL COMMENT '空投奖励', + `locked_position_reward` decimal(32, 8) NULL DEFAULT NULL COMMENT '锁仓奖励', + `airdrop_register` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '注册空投', + `receive_airdrop_register` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '领取注册空投', + `receive_airdrop_invite` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '领取邀请空投', + `receive_pledge` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '领取质押', + `receive_locked_position` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '领取锁仓', + `receive_locked_position_invite` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '领取邀请锁仓', + `team_max_level` int NULL DEFAULT 0 COMMENT '团队最高等级', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 10747 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员统计信息表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_statistics +-- ---------------------------- +INSERT INTO `pro_member_statistics` VALUES (10734, 10734, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:04'); +INSERT INTO `pro_member_statistics` VALUES (10735, 10735, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1000.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:34:00'); +INSERT INTO `pro_member_statistics` VALUES (10736, 10736, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:06'); +INSERT INTO `pro_member_statistics` VALUES (10737, 10737, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:06'); +INSERT INTO `pro_member_statistics` VALUES (10738, 10738, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:06'); +INSERT INTO `pro_member_statistics` VALUES (10739, 10739, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:06'); +INSERT INTO `pro_member_statistics` VALUES (10740, 10740, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:06'); +INSERT INTO `pro_member_statistics` VALUES (10741, 10741, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:06'); +INSERT INTO `pro_member_statistics` VALUES (10742, 10742, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:06'); +INSERT INTO `pro_member_statistics` VALUES (10743, 10743, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:18'); +INSERT INTO `pro_member_statistics` VALUES (10744, 10744, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:18'); +INSERT INTO `pro_member_statistics` VALUES (10745, 10745, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:18'); +INSERT INTO `pro_member_statistics` VALUES (10746, 10746, 0, 0, 0, 0, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.00000000, 0, '2024-09-20 14:31:18'); + +-- ---------------------------- +-- Table structure for pro_member_team_level +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_team_level`; +CREATE TABLE `pro_member_team_level` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键Id', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `parent_id` bigint NULL DEFAULT NULL COMMENT '推荐人id', + `all_parent_id` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '所有上级(格式: /1001/1002/1003/)', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_member_id`(`member_id` ASC) USING BTREE, + INDEX `parent_id`(`parent_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1480 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '团队(直推)层级关系表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_team_level +-- ---------------------------- + +-- ---------------------------- +-- Table structure for pro_member_team_level_statistics +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_team_level_statistics`; +CREATE TABLE `pro_member_team_level_statistics` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `level` int NULL DEFAULT NULL COMMENT '等级', + `number` int NULL DEFAULT NULL COMMENT '数量', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_team_level_statistics +-- ---------------------------- + +-- ---------------------------- +-- Table structure for pro_member_usdt_trade +-- ---------------------------- +DROP TABLE IF EXISTS `pro_member_usdt_trade`; +CREATE TABLE `pro_member_usdt_trade` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `member_id` bigint NULL DEFAULT NULL COMMENT '会员id', + `trade_type` int NULL DEFAULT NULL COMMENT '交易类型: 0->收入; 1->支出', + `trade_item` int NULL DEFAULT NULL COMMENT '交易项目', + `value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易金额', + `before_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易前余额', + `after_value` decimal(32, 8) NULL DEFAULT 0.00000000 COMMENT '交易后余额', + `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易标题', + `note` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注', + `source_id` bigint NULL DEFAULT NULL COMMENT '来源表id(可为空)', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `member_id`(`member_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 258 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '会员usdt交易表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of pro_member_usdt_trade +-- ---------------------------- +INSERT INTO `pro_member_usdt_trade` VALUES (256, 10734, 0, 0, 10.00000000, 67.00000000, 77.00000000, 'system_transfer_in', NULL, NULL, '2024-09-20 17:55:20'); +INSERT INTO `pro_member_usdt_trade` VALUES (257, 10734, 0, 0, 10.00000000, 77.00000000, 87.00000000, 'system_transfer_in', '', NULL, '2024-09-20 18:04:43'); + +-- ---------------------------- +-- Table structure for sys_dept +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dept`; +CREATE TABLE `sys_dept` ( + `dept_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `pid` bigint NULL DEFAULT NULL COMMENT '上级部门', + `sub_count` int NULL DEFAULT 0 COMMENT '子部门数目', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '名称', + `dept_sort` int NULL DEFAULT 999 COMMENT '排序', + `enabled` bit(1) NOT NULL COMMENT '状态', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`dept_id`) USING BTREE, + INDEX `inx_pid`(`pid` ASC) USING BTREE, + INDEX `inx_enabled`(`enabled` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '部门' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_dept +-- ---------------------------- +INSERT INTO `sys_dept` VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47'); +INSERT INTO `sys_dept` VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27'); +INSERT INTO `sys_dept` VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21'); +INSERT INTO `sys_dept` VALUES (7, NULL, 2, '华南分部', 0, b'0', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56'); +INSERT INTO `sys_dept` VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00'); +INSERT INTO `sys_dept` VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13'); +INSERT INTO `sys_dept` VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07'); + +-- ---------------------------- +-- Table structure for sys_dict +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict`; +CREATE TABLE `sys_dict` ( + `dict_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典名称', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '描述', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`dict_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据字典' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_dict +-- ---------------------------- +INSERT INTO `sys_dict` VALUES (1, 'user_status', '用户状态', NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict` VALUES (4, 'dept_status', '部门状态', NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict` VALUES (5, 'job_status', '岗位状态', NULL, NULL, '2019-10-27 20:31:36', NULL); + +-- ---------------------------- +-- Table structure for sys_dict_detail +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict_detail`; +CREATE TABLE `sys_dict_detail` ( + `detail_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `dict_id` bigint NULL DEFAULT NULL COMMENT '字典id', + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典标签', + `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典值', + `dict_sort` int NULL DEFAULT NULL COMMENT '排序', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`detail_id`) USING BTREE, + INDEX `FK5tpkputc6d9nboxojdbgnpmyb`(`dict_id` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据字典详情' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_dict_detail +-- ---------------------------- +INSERT INTO `sys_dict_detail` VALUES (1, 1, '激活', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict_detail` VALUES (2, 1, '禁用', 'false', 2, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` VALUES (3, 4, '启用', 'true', 1, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` VALUES (4, 4, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict_detail` VALUES (5, 5, '启用', 'true', 1, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` VALUES (6, 5, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); + +-- ---------------------------- +-- Table structure for sys_job +-- ---------------------------- +DROP TABLE IF EXISTS `sys_job`; +CREATE TABLE `sys_job` ( + `job_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '岗位名称', + `enabled` bit(1) NOT NULL COMMENT '岗位状态', + `job_sort` int NULL DEFAULT NULL COMMENT '排序', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`job_id`) USING BTREE, + UNIQUE INDEX `uniq_name`(`name` ASC) USING BTREE, + INDEX `inx_enabled`(`enabled` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '岗位' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_job +-- ---------------------------- +INSERT INTO `sys_job` VALUES (8, '人事专员', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL); +INSERT INTO `sys_job` VALUES (10, '产品经理', b'0', 4, NULL, 'admin', '2019-03-29 14:55:51', '2024-09-12 11:27:30'); +INSERT INTO `sys_job` VALUES (11, '全栈开发', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2024-09-08 20:29:22'); +INSERT INTO `sys_job` VALUES (12, '软件测试', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26'); + +-- ---------------------------- +-- Table structure for sys_log +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log`; +CREATE TABLE `sys_log` ( + `log_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `log_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `request_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `time` bigint NULL DEFAULT NULL, + `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `browser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `exception_detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `create_time` datetime NULL DEFAULT NULL, + PRIMARY KEY (`log_id`) USING BTREE, + INDEX `log_create_time_index`(`create_time` ASC) USING BTREE, + INDEX `inx_log_type`(`log_type` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3768 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统日志' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_log +-- ---------------------------- +INSERT INTO `sys_log` VALUES (3537, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 2806, 'admin', '内网IP', 'Chrome 127', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$edd4b955.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6379\r\nCaused by: java.net.ConnectException: Connection refused: no further information\r\n at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)\r\n at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)\r\n at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-06 17:21:50'); +INSERT INTO `sys_log` VALUES (3538, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 783, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-06 17:22:42'); +INSERT INTO `sys_log` VALUES (3539, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"test\"}', '169.254.217.39', 98, 'test', '内网IP', 'MSEdge 128', NULL, '2024-09-06 17:37:30'); +INSERT INTO `sys_log` VALUES (3540, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 86, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-06 17:38:10'); +INSERT INTO `sys_log` VALUES (3541, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1588648549000,\"dept\":{\"id\":5,\"name\":\"研发部\",\"subCount\":0},\"email\":\"231@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":2,\"isAdmin\":false,\"jobs\":[{\"createTime\":1554010783000,\"enabled\":true,\"id\":12,\"jobSort\":5,\"name\":\"软件测试\",\"updateBy\":\"admin\",\"updateTime\":1589111786000}],\"nickName\":\"测试\",\"phone\":\"19999999999\",\"roles\":[{\"createTime\":1542942277000,\"dataScope\":\"全部\",\"depts\":[],\"description\":\"-\",\"id\":1,\"level\":1,\"menus\":[{\"cache\":false,\"component\":\"mnt/deployHistory/index\",\"componentName\":\"DeployHistory\",\"createTime\":1573375784000,\"hidden\":false,\"iFrame\":false,\"icon\":\"backup\",\"id\":97,\"menuSort\":25,\"path\":\"mnt/deployHistory\",\"permission\":\"deployHistory:list\",\"pid\":90,\"subCount\":1,\"title\":\"部署备份\",\"type\":1},{\"cache\":false,\"component\":\"mnt/database/index\",\"componentName\":\"Database\",\"createTime\":1573389604000,\"hidden\":false,\"iFrame\":false,\"icon\":\"database\",\"id\":98,\"menuSort\":26,\"path\":\"mnt/database\",\"permission\":\"database:list\",\"pid\":90,\"subCount\":3,\"title\":\"数据库管理\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1573954368000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":102,\"menuSort\":999,\"path\":\"\",\"permission\":\"deployHistory:del\",\"pid\":97,\"subCount\":0,\"title\":\"删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960113000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":103,\"menuSort\":999,\"path\":\"\",\"permission\":\"serverDeploy:add\",\"pid\":92,\"subCount\":0,\"title\":\"服务器新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960137000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":104,\"menuSort\":999,\"path\":\"\",\"permission\":\"serverDeploy:edit\",\"pid\":92,\"subCount\":0,\"title\":\"服务器编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960155000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":105,\"menuSort\":999,\"path\":\"\",\"permission\":\"serverDeploy:del\",\"pid\":92,\"subCount\":0,\"title\":\"服务器删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960203000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":106,\"menuSort\":999,\"path\":\"\",\"permission\":\"app:add\",\"pid\":93,\"subCount\":0,\"title\":\"应用新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960228000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":107,\"menuSort\":999,\"path\":\"\",\"permission\":\"app:edit\",\"pid\":93,\"subCount\":0,\"title\":\"应用编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960255000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":108,\"menuSort\":999,\"path\":\"\",\"permission\":\"app:del\",\"pid\":93,\"subCount\":0,\"title\":\"应用删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960282000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":109,\"menuSort\":999,\"path\":\"\",\"permission\":\"deploy:add\",\"pid\":94,\"subCount\":0,\"title\":\"部署新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960301000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":110,\"menuSort\":999,\"path\":\"\",\"permission\":\"deploy:edit\",\"pid\":94,\"subCount\":0,\"title\":\"部署编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960321000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":111,\"menuSort\":999,\"path\":\"\",\"permission\":\"deploy:del\",\"pid\":94,\"subCount\":0,\"title\":\"部署删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960363000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":112,\"menuSort\":999,\"path\":\"\",\"permission\":\"database:add\",\"pid\":98,\"subCount\":0,\"title\":\"数据库新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960378000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":113,\"menuSort\":999,\"path\":\"\",\"permission\":\"database:edit\",\"pid\":98,\"subCount\":0,\"title\":\"数据库编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1573960394000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":114,\"menuSort\":999,\"path\":\"\",\"permission\":\"database:del\",\"pid\":98,\"subCount\":0,\"title\":\"数据库删除\",\"type\":2},{\"cache\":true,\"component\":\"generator/preview\",\"componentName\":\"Preview\",\"createTime\":1574751276000,\"hidden\":true,\"iFrame\":false,\"icon\":\"java\",\"id\":116,\"menuSort\":999,\"path\":\"generator/preview/:tableName\",\"pid\":36,\"subCount\":0,\"title\":\"生成预览\",\"type\":1},{\"cache\":false,\"createTime\":1545117089000,\"hidden\":false,\"iFrame\":false,\"icon\":\"system\",\"id\":1,\"menuSort\":1,\"path\":\"system\",\"subCount\":7,\"title\":\"系统管理\",\"type\":0},{\"cache\":false,\"component\":\"system/user/index\",\"componentName\":\"User\",\"createTime\":1545117284000,\"hidden\":false,\"iFrame\":false,\"icon\":\"peoples\",\"id\":2,\"menuSort\":2,\"path\":\"user\",\"permission\":\"user:list\",\"pid\":1,\"subCount\":3,\"title\":\"用户管理\",\"type\":1},{\"cache\":false,\"component\":\"system/role/index\",\"componentName\":\"Role\",\"createTime\":1545117367000,\"hidden\":false,\"iFrame\":false,\"icon\":\"role\",\"id\":3,\"menuSort\":3,\"path\":\"role\",\"permission\":\"roles:list\",\"pid\":1,\"subCount\":3,\"title\":\"角色管理\",\"type\":1},{\"cache\":false,\"component\":\"system/menu/index\",\"componentName\":\"Menu\",\"createTime\":1545117448000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":5,\"menuSort\":5,\"path\":\"menu\",\"permission\":\"menu:list\",\"pid\":1,\"subCount\":3,\"title\":\"菜单管理\",\"type\":1},{\"cache\":false,\"createTime\":1545117468000,\"hidden\":false,\"iFrame\":false,\"icon\":\"monitor\",\"id\":6,\"menuSort\":10,\"path\":\"monitor\",\"subCount\":5,\"title\":\"系统监控\",\"type\":0},{\"cache\":true,\"component\":\"monitor/log/index\",\"componentName\":\"Log\",\"createTime\":1545117506000,\"hidden\":false,\"iFrame\":false,\"icon\":\"log\",\"id\":7,\"menuSort\":11,\"path\":\"logs\",\"pid\":6,\"subCount\":0,\"title\":\"操作日志\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1591420317000},{\"cache\":false,\"component\":\"monitor/sql/index\",\"componentName\":\"Sql\",\"createTime\":1545117574000,\"hidden\":false,\"iFrame\":false,\"icon\":\"sqlMonitor\",\"id\":9,\"menuSort\":18,\"path\":\"druid\",\"pid\":6,\"subCount\":0,\"title\":\"SQL监控\",\"type\":1},{\"cache\":false,\"createTime\":1545197896000,\"hidden\":false,\"iFrame\":false,\"icon\":\"zujian\",\"id\":10,\"menuSort\":50,\"path\":\"components\",\"subCount\":5,\"title\":\"组件管理\",\"type\":0},{\"cache\":false,\"component\":\"components/icons/index\",\"componentName\":\"Icons\",\"createTime\":1545197929000,\"hidden\":false,\"iFrame\":false,\"icon\":\"icon\",\"id\":11,\"menuSort\":51,\"path\":\"icon\",\"pid\":10,\"subCount\":0,\"title\":\"图标库\",\"type\":1},{\"cache\":false,\"component\":\"tools/email/index\",\"componentName\":\"Email\",\"createTime\":1545876789000,\"hidden\":false,\"iFrame\":false,\"icon\":\"email\",\"id\":14,\"menuSort\":35,\"path\":\"email\",\"pid\":36,\"subCount\":0,\"title\":\"邮件工具\",\"type\":1},{\"cache\":false,\"component\":\"components/Editor\",\"componentName\":\"Editor\",\"createTime\":1545883105000,\"hidden\":false,\"iFrame\":false,\"icon\":\"fwb\",\"id\":15,\"menuSort\":52,\"path\":\"tinymce\",\"pid\":10,\"subCount\":0,\"title\":\"富文本\",\"type\":1},{\"cache\":false,\"component\":\"tools/storage/index\",\"componentName\":\"Storage\",\"createTime\":1546225935000,\"hidden\":false,\"iFrame\":false,\"icon\":\"qiniu\",\"id\":18,\"menuSort\":34,\"path\":\"storage\",\"permission\":\"storage:list\",\"pid\":36,\"subCount\":3,\"title\":\"存储管理\",\"type\":1},{\"cache\":false,\"component\":\"tools/aliPay/index\",\"componentName\":\"AliPay\",\"createTime\":1546239158000,\"hidden\":false,\"iFrame\":false,\"icon\":\"alipay\",\"id\":19,\"menuSort\":37,\"path\":\"aliPay\",\"pid\":36,\"subCount\":0,\"title\":\"支付宝工具\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1546590123000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":21,\"menuSort\":900,\"path\":\"nested\",\"subCount\":2,\"title\":\"多级菜单\",\"type\":0,\"updateBy\":\"admin\",\"updateTime\":1592731655000},{\"cache\":false,\"component\":\"\",\"createTime\":1546590209000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":22,\"menuSort\":999,\"path\":\"menu1\",\"pid\":21,\"subCount\":2,\"title\":\"二级菜单1\",\"type\":0,\"updateBy\":\"admin\",\"updateTime\":1592731640000},{\"cache\":false,\"component\":\"nested/menu2/index\",\"createTime\":1546590237000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":23,\"menuSort\":999,\"path\":\"menu2\",\"pid\":21,\"subCount\":0,\"title\":\"二级菜单2\",\"type\":1},{\"cache\":false,\"component\":\"nested/menu1/menu1-1\",\"componentName\":\"Test\",\"createTime\":1546590288000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":24,\"menuSort\":999,\"path\":\"menu1-1\",\"pid\":22,\"subCount\":0,\"title\":\"三级菜单1\",\"type\":1},{\"cache\":false,\"component\":\"nested/menu1/menu1-2\",\"createTime\":1546853252000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":27,\"menuSort\":999,\"path\":\"menu1-2\",\"pid\":22,\"subCount\":0,\"title\":\"三级菜单2\",\"type\":1},{\"cache\":false,\"component\":\"system/timing/index\",\"componentName\":\"Timing\",\"createTime\":1546864480000,\"hidden\":false,\"iFrame\":false,\"icon\":\"timing\",\"id\":28,\"menuSort\":999,\"path\":\"timing\",\"permission\":\"timing:list\",\"pid\":1,\"subCount\":3,\"title\":\"任务调度\",\"type\":1},{\"cache\":true,\"component\":\"generator/index\",\"componentName\":\"GeneratorIndex\",\"createTime\":1547192755000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dev\",\"id\":30,\"menuSort\":32,\"path\":\"generator\",\"pid\":36,\"subCount\":0,\"title\":\"代码生成\",\"type\":1},{\"cache\":false,\"component\":\"monitor/log/errorLog\",\"componentName\":\"ErrorLog\",\"createTime\":1547358543000,\"hidden\":false,\"iFrame\":false,\"icon\":\"error\",\"id\":32,\"menuSort\":12,\"path\":\"errorLog\",\"pid\":6,\"subCount\":0,\"title\":\"异常日志\",\"type\":1},{\"cache\":false,\"component\":\"components/MarkDown\",\"componentName\":\"Markdown\",\"createTime\":1552024004000,\"hidden\":false,\"iFrame\":false,\"icon\":\"markdown\",\"id\":33,\"menuSort\":53,\"path\":\"markdown\",\"pid\":10,\"subCount\":0,\"title\":\"Markdown\",\"type\":1},{\"cache\":false,\"component\":\"components/YamlEdit\",\"componentName\":\"YamlEdit\",\"createTime\":1552031380000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dev\",\"id\":34,\"menuSort\":54,\"path\":\"yaml\",\"pid\":10,\"subCount\":0,\"title\":\"Yaml编辑器\",\"type\":1},{\"cache\":false,\"component\":\"system/dept/index\",\"componentName\":\"Dept\",\"createTime\":1553478360000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dept\",\"id\":35,\"menuSort\":6,\"path\":\"dept\",\"permission\":\"dept:list\",\"pid\":1,\"subCount\":3,\"title\":\"部门管理\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1553828255000,\"hidden\":false,\"iFrame\":false,\"icon\":\"sys-tools\",\"id\":36,\"menuSort\":30,\"path\":\"sys-tools\",\"subCount\":7,\"title\":\"系统工具\",\"type\":0},{\"cache\":false,\"component\":\"system/job/index\",\"componentName\":\"Job\",\"createTime\":1553838678000,\"hidden\":false,\"iFrame\":false,\"icon\":\"Steve-Jobs\",\"id\":37,\"menuSort\":7,\"path\":\"job\",\"permission\":\"job:list\",\"pid\":1,\"subCount\":3,\"title\":\"岗位管理\",\"type\":1},{\"cache\":false,\"component\":\"tools/swagger/index\",\"componentName\":\"Swagger\",\"createTime\":1553860673000,\"hidden\":false,\"iFrame\":false,\"icon\":\"swagger\",\"id\":38,\"menuSort\":36,\"path\":\"swagger2\",\"pid\":36,\"subCount\":0,\"title\":\"接口文档\",\"type\":1},{\"cache\":false,\"component\":\"system/dict/index\",\"componentName\":\"Dict\",\"createTime\":1554868144000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dictionary\",\"id\":39,\"menuSort\":8,\"path\":\"dict\",\"permission\":\"dict:list\",\"pid\":1,\"subCount\":3,\"title\":\"字典管理\",\"type\":1},{\"cache\":false,\"component\":\"monitor/online/index\",\"componentName\":\"OnlineUser\",\"createTime\":1572098923000,\"hidden\":false,\"iFrame\":false,\"icon\":\"Steve-Jobs\",\"id\":41,\"menuSort\":10,\"path\":\"online\",\"pid\":6,\"subCount\":0,\"title\":\"在线用户\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1572317986000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":44,\"menuSort\":2,\"path\":\"\",\"permission\":\"user:add\",\"pid\":2,\"subCount\":0,\"title\":\"用户新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572318008000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":45,\"menuSort\":3,\"path\":\"\",\"permission\":\"user:edit\",\"pid\":2,\"subCount\":0,\"title\":\"用户编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572318023000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":46,\"menuSort\":4,\"path\":\"\",\"permission\":\"user:del\",\"pid\":2,\"subCount\":0,\"title\":\"用户删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572324334000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":48,\"menuSort\":2,\"path\":\"\",\"permission\":\"roles:add\",\"pid\":3,\"subCount\":0,\"title\":\"角色创建\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572324376000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":49,\"menuSort\":3,\"path\":\"\",\"permission\":\"roles:edit\",\"pid\":3,\"subCount\":0,\"title\":\"角色修改\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572324411000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":50,\"menuSort\":4,\"path\":\"\",\"permission\":\"roles:del\",\"pid\":3,\"subCount\":0,\"title\":\"角色删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572324907000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":52,\"menuSort\":2,\"path\":\"\",\"permission\":\"menu:add\",\"pid\":5,\"subCount\":0,\"title\":\"菜单新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572324940000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":53,\"menuSort\":3,\"path\":\"\",\"permission\":\"menu:edit\",\"pid\":5,\"subCount\":0,\"title\":\"菜单编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572324960000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":54,\"menuSort\":4,\"path\":\"\",\"permission\":\"menu:del\",\"pid\":5,\"subCount\":0,\"title\":\"菜单删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325029000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":56,\"menuSort\":2,\"path\":\"\",\"permission\":\"dept:add\",\"pid\":35,\"subCount\":0,\"title\":\"部门新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325047000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":57,\"menuSort\":3,\"path\":\"\",\"permission\":\"dept:edit\",\"pid\":35,\"subCount\":0,\"title\":\"部门编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325061000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":58,\"menuSort\":4,\"path\":\"\",\"permission\":\"dept:del\",\"pid\":35,\"subCount\":0,\"title\":\"部门删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325107000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":60,\"menuSort\":2,\"path\":\"\",\"permission\":\"job:add\",\"pid\":37,\"subCount\":0,\"title\":\"岗位新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325125000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":61,\"menuSort\":3,\"path\":\"\",\"permission\":\"job:edit\",\"pid\":37,\"subCount\":0,\"title\":\"岗位编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325144000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":62,\"menuSort\":4,\"path\":\"\",\"permission\":\"job:del\",\"pid\":37,\"subCount\":0,\"title\":\"岗位删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325217000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":64,\"menuSort\":2,\"path\":\"\",\"permission\":\"dict:add\",\"pid\":39,\"subCount\":0,\"title\":\"字典新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325242000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":65,\"menuSort\":3,\"path\":\"\",\"permission\":\"dict:edit\",\"pid\":39,\"subCount\":0,\"title\":\"字典编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325259000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":66,\"menuSort\":4,\"path\":\"\",\"permission\":\"dict:del\",\"pid\":39,\"subCount\":0,\"title\":\"字典删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325648000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":73,\"menuSort\":2,\"path\":\"\",\"permission\":\"timing:add\",\"pid\":28,\"subCount\":0,\"title\":\"任务新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325661000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":74,\"menuSort\":3,\"path\":\"\",\"permission\":\"timing:edit\",\"pid\":28,\"subCount\":0,\"title\":\"任务编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325674000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":75,\"menuSort\":4,\"path\":\"\",\"permission\":\"timing:del\",\"pid\":28,\"subCount\":0,\"title\":\"任务删除\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325749000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":77,\"menuSort\":2,\"path\":\"\",\"permission\":\"storage:add\",\"pid\":18,\"subCount\":0,\"title\":\"上传文件\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325762000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":78,\"menuSort\":3,\"path\":\"\",\"permission\":\"storage:edit\",\"pid\":18,\"subCount\":0,\"title\":\"文件编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325774000,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":79,\"menuSort\":4,\"path\":\"\",\"permission\":\"storage:del\",\"pid\":18,\"subCount\":0,\"title\":\"文件删除\",\"type\":2},{\"cache\":false,\"component\":\"monitor/server/index\",\"componentName\":\"ServerMonitor\",\"createTime\":1573103199000,\"hidden\":false,\"iFrame\":false,\"icon\":\"codeConsole\",\"id\":80,\"menuSort\":14,\"path\":\"server\",\"permission\":\"monitor:list\",\"pid\":6,\"subCount\":0,\"title\":\"服务监控\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1588587650000},{\"cache\":true,\"component\":\"generator/config\",\"componentName\":\"GeneratorConfig\",\"createTime\":1573992536000,\"hidden\":true,\"iFrame\":false,\"icon\":\"dev\",\"id\":82,\"menuSort\":33,\"path\":\"generator/config/:tableName\",\"permission\":\"\",\"pid\":36,\"subCount\":0,\"title\":\"生成配置\",\"type\":1},{\"cache\":true,\"component\":\"components/Echarts\",\"componentName\":\"Echarts\",\"createTime\":1574298272000,\"hidden\":false,\"iFrame\":false,\"icon\":\"chart\",\"id\":83,\"menuSort\":50,\"path\":\"echarts\",\"permission\":\"\",\"pid\":10,\"subCount\":0,\"title\":\"图表库\",\"type\":1},{\"cache\":false,\"component\":\"\",\"componentName\":\"Mnt\",\"createTime\":1573266668000,\"hidden\":false,\"iFrame\":false,\"icon\":\"mnt\",\"id\":90,\"menuSort\":20,\"path\":\"mnt\",\"subCount\":5,\"title\":\"运维管理\",\"type\":1},{\"cache\":false,\"component\":\"mnt/server/index\",\"componentName\":\"ServerDeploy\",\"createTime\":1573352965000,\"hidden\":false,\"iFrame\":false,\"icon\":\"server\",\"id\":92,\"menuSort\":22,\"path\":\"mnt/serverDeploy\",\"permission\":\"serverDeploy:list\",\"pid\":90,\"subCount\":3,\"title\":\"服务器\",\"type\":1},{\"cache\":false,\"component\":\"mnt/app/index\",\"componentName\":\"App\",\"createTime\":1573355116000,\"hidden\":false,\"iFrame\":false,\"icon\":\"app\",\"id\":93,\"menuSort\":23,\"path\":\"mnt/app\",\"permission\":\"app:list\",\"pid\":90,\"subCount\":3,\"title\":\"应用管理\",\"type\":1},{\"cache\":false,\"component\":\"mnt/deploy/index\",\"componentName\":\"Deploy\",\"createTime\":1573372615000,\"hidden\":false,\"iFrame\":false,\"icon\":\"deploy\",\"id\":94,\"menuSort\":24,\"path\":\"mnt/deploy\",\"permission\":\"deploy:list\",\"pid\":90,\"subCount\":3,\"title\":\"部署管理\",\"type\":1}],\"name\":\"超级管理员\",\"updateBy\":\"admin\",\"updateTime\":1596701424000}],\"updateBy\":\"admin\",\"updateTime\":1599273818000,\"username\":\"test\"}', '169.254.217.39', 198, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-06 17:42:18'); +INSERT INTO `sys_log` VALUES (3542, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1588648549000,\"dept\":{\"id\":5,\"name\":\"运维部\",\"subCount\":0},\"email\":\"231@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":2,\"isAdmin\":false,\"jobs\":[{\"createTime\":1554010783000,\"enabled\":true,\"id\":12,\"jobSort\":5,\"name\":\"软件测试\",\"updateBy\":\"admin\",\"updateTime\":1589111786000}],\"nickName\":\"测试\",\"phone\":\"19999999999\",\"roles\":[{\"createTime\":1542949746000,\"dataScope\":\"本级\",\"depts\":[],\"description\":\"-\",\"id\":2,\"level\":2,\"menus\":[{\"cache\":false,\"createTime\":1545117089000,\"hidden\":false,\"iFrame\":false,\"icon\":\"system\",\"id\":1,\"menuSort\":1,\"path\":\"system\",\"subCount\":7,\"title\":\"系统管理\",\"type\":0},{\"cache\":false,\"component\":\"components/MarkDown\",\"componentName\":\"Markdown\",\"createTime\":1552024004000,\"hidden\":false,\"iFrame\":false,\"icon\":\"markdown\",\"id\":33,\"menuSort\":53,\"path\":\"markdown\",\"pid\":10,\"subCount\":0,\"title\":\"Markdown\",\"type\":1},{\"cache\":false,\"component\":\"system/user/index\",\"componentName\":\"User\",\"createTime\":1545117284000,\"hidden\":false,\"iFrame\":false,\"icon\":\"peoples\",\"id\":2,\"menuSort\":2,\"path\":\"user\",\"permission\":\"user:list\",\"pid\":1,\"subCount\":3,\"title\":\"用户管理\",\"type\":1},{\"cache\":false,\"component\":\"components/YamlEdit\",\"componentName\":\"YamlEdit\",\"createTime\":1552031380000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dev\",\"id\":34,\"menuSort\":54,\"path\":\"yaml\",\"pid\":10,\"subCount\":0,\"title\":\"Yaml编辑器\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1553828255000,\"hidden\":false,\"iFrame\":false,\"icon\":\"sys-tools\",\"id\":36,\"menuSort\":30,\"path\":\"sys-tools\",\"subCount\":7,\"title\":\"系统工具\",\"type\":0},{\"cache\":false,\"createTime\":1545117468000,\"hidden\":false,\"iFrame\":false,\"icon\":\"monitor\",\"id\":6,\"menuSort\":10,\"path\":\"monitor\",\"subCount\":5,\"title\":\"系统监控\",\"type\":0},{\"cache\":true,\"component\":\"monitor/log/index\",\"componentName\":\"Log\",\"createTime\":1545117506000,\"hidden\":false,\"iFrame\":false,\"icon\":\"log\",\"id\":7,\"menuSort\":11,\"path\":\"logs\",\"pid\":6,\"subCount\":0,\"title\":\"操作日志\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1591420317000},{\"cache\":false,\"component\":\"monitor/sql/index\",\"componentName\":\"Sql\",\"createTime\":1545117574000,\"hidden\":false,\"iFrame\":false,\"icon\":\"sqlMonitor\",\"id\":9,\"menuSort\":18,\"path\":\"druid\",\"pid\":6,\"subCount\":0,\"title\":\"SQL监控\",\"type\":1},{\"cache\":false,\"createTime\":1545197896000,\"hidden\":false,\"iFrame\":false,\"icon\":\"zujian\",\"id\":10,\"menuSort\":50,\"path\":\"components\",\"subCount\":5,\"title\":\"组件管理\",\"type\":0},{\"cache\":false,\"component\":\"components/icons/index\",\"componentName\":\"Icons\",\"createTime\":1545197929000,\"hidden\":false,\"iFrame\":false,\"icon\":\"icon\",\"id\":11,\"menuSort\":51,\"path\":\"icon\",\"pid\":10,\"subCount\":0,\"title\":\"图标库\",\"type\":1},{\"cache\":false,\"component\":\"tools/email/index\",\"componentName\":\"Email\",\"createTime\":1545876789000,\"hidden\":false,\"iFrame\":false,\"icon\":\"email\",\"id\":14,\"menuSort\":35,\"path\":\"email\",\"pid\":36,\"subCount\":0,\"title\":\"邮件工具\",\"type\":1},{\"cache\":false,\"component\":\"components/Editor\",\"componentName\":\"Editor\",\"createTime\":1545883105000,\"hidden\":false,\"iFrame\":false,\"icon\":\"fwb\",\"id\":15,\"menuSort\":52,\"path\":\"tinymce\",\"pid\":10,\"subCount\":0,\"title\":\"富文本\",\"type\":1},{\"cache\":false,\"component\":\"monitor/server/index\",\"componentName\":\"ServerMonitor\",\"createTime\":1573103199000,\"hidden\":false,\"iFrame\":false,\"icon\":\"codeConsole\",\"id\":80,\"menuSort\":14,\"path\":\"server\",\"permission\":\"monitor:list\",\"pid\":6,\"subCount\":0,\"title\":\"服务监控\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1588587650000},{\"cache\":true,\"component\":\"generator/config\",\"componentName\":\"GeneratorConfig\",\"createTime\":1573992536000,\"hidden\":true,\"iFrame\":false,\"icon\":\"dev\",\"id\":82,\"menuSort\":33,\"path\":\"generator/config/:tableName\",\"permission\":\"\",\"pid\":36,\"subCount\":0,\"title\":\"生成配置\",\"type\":1},{\"cache\":false,\"component\":\"tools/aliPay/index\",\"componentName\":\"AliPay\",\"createTime\":1546239158000,\"hidden\":false,\"iFrame\":false,\"icon\":\"alipay\",\"id\":19,\"menuSort\":37,\"path\":\"aliPay\",\"pid\":36,\"subCount\":0,\"title\":\"支付宝工具\",\"type\":1},{\"cache\":true,\"component\":\"components/Echarts\",\"componentName\":\"Echarts\",\"createTime\":1574298272000,\"hidden\":false,\"iFrame\":false,\"icon\":\"chart\",\"id\":83,\"menuSort\":50,\"path\":\"echarts\",\"permission\":\"\",\"pid\":10,\"subCount\":0,\"title\":\"图表库\",\"type\":1},{\"cache\":true,\"component\":\"generator/preview\",\"componentName\":\"Preview\",\"createTime\":1574751276000,\"hidden\":true,\"iFrame\":false,\"icon\":\"java\",\"id\":116,\"menuSort\":999,\"path\":\"generator/preview/:tableName\",\"pid\":36,\"subCount\":0,\"title\":\"生成预览\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1546590123000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":21,\"menuSort\":900,\"path\":\"nested\",\"subCount\":2,\"title\":\"多级菜单\",\"type\":0,\"updateBy\":\"admin\",\"updateTime\":1592731655000},{\"cache\":false,\"component\":\"\",\"createTime\":1546590209000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":22,\"menuSort\":999,\"path\":\"menu1\",\"pid\":21,\"subCount\":2,\"title\":\"二级菜单1\",\"type\":0,\"updateBy\":\"admin\",\"updateTime\":1592731640000},{\"cache\":false,\"component\":\"nested/menu2/index\",\"createTime\":1546590237000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":23,\"menuSort\":999,\"path\":\"menu2\",\"pid\":21,\"subCount\":0,\"title\":\"二级菜单2\",\"type\":1},{\"cache\":false,\"component\":\"nested/menu1/menu1-1\",\"componentName\":\"Test\",\"createTime\":1546590288000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":24,\"menuSort\":999,\"path\":\"menu1-1\",\"pid\":22,\"subCount\":0,\"title\":\"三级菜单1\",\"type\":1},{\"cache\":false,\"component\":\"nested/menu1/menu1-2\",\"createTime\":1546853252000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":27,\"menuSort\":999,\"path\":\"menu1-2\",\"pid\":22,\"subCount\":0,\"title\":\"三级菜单2\",\"type\":1},{\"cache\":true,\"component\":\"generator/index\",\"componentName\":\"GeneratorIndex\",\"createTime\":1547192755000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dev\",\"id\":30,\"menuSort\":32,\"path\":\"generator\",\"pid\":36,\"subCount\":0,\"title\":\"代码生成\",\"type\":1},{\"cache\":false,\"component\":\"monitor/log/errorLog\",\"componentName\":\"ErrorLog\",\"createTime\":1547358543000,\"hidden\":false,\"iFrame\":false,\"icon\":\"error\",\"id\":32,\"menuSort\":12,\"path\":\"errorLog\",\"pid\":6,\"subCount\":0,\"title\":\"异常日志\",\"type\":1}],\"name\":\"普通用户\",\"updateBy\":\"admin\",\"updateTime\":1599273912000}],\"updateBy\":\"admin\",\"updateTime\":1725615738000,\"username\":\"test\"}', '169.254.217.39', 38, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-06 17:42:30'); +INSERT INTO `sys_log` VALUES (3543, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1588648549000,\"dept\":{\"id\":2,\"name\":\"运维部\",\"subCount\":0},\"email\":\"231@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":2,\"isAdmin\":false,\"jobs\":[{\"createTime\":1554010783000,\"enabled\":true,\"id\":12,\"jobSort\":5,\"name\":\"软件测试\",\"updateBy\":\"admin\",\"updateTime\":1589111786000}],\"nickName\":\"测试\",\"phone\":\"19999999999\",\"roles\":[{\"createTime\":1542949746000,\"dataScope\":\"本级\",\"depts\":[],\"description\":\"-\",\"id\":2,\"level\":2,\"menus\":[{\"cache\":false,\"createTime\":1545117089000,\"hidden\":false,\"iFrame\":false,\"icon\":\"system\",\"id\":1,\"menuSort\":1,\"path\":\"system\",\"subCount\":7,\"title\":\"系统管理\",\"type\":0},{\"cache\":false,\"component\":\"components/MarkDown\",\"componentName\":\"Markdown\",\"createTime\":1552024004000,\"hidden\":false,\"iFrame\":false,\"icon\":\"markdown\",\"id\":33,\"menuSort\":53,\"path\":\"markdown\",\"pid\":10,\"subCount\":0,\"title\":\"Markdown\",\"type\":1},{\"cache\":false,\"component\":\"system/user/index\",\"componentName\":\"User\",\"createTime\":1545117284000,\"hidden\":false,\"iFrame\":false,\"icon\":\"peoples\",\"id\":2,\"menuSort\":2,\"path\":\"user\",\"permission\":\"user:list\",\"pid\":1,\"subCount\":3,\"title\":\"用户管理\",\"type\":1},{\"cache\":false,\"component\":\"components/YamlEdit\",\"componentName\":\"YamlEdit\",\"createTime\":1552031380000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dev\",\"id\":34,\"menuSort\":54,\"path\":\"yaml\",\"pid\":10,\"subCount\":0,\"title\":\"Yaml编辑器\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1553828255000,\"hidden\":false,\"iFrame\":false,\"icon\":\"sys-tools\",\"id\":36,\"menuSort\":30,\"path\":\"sys-tools\",\"subCount\":7,\"title\":\"系统工具\",\"type\":0},{\"cache\":false,\"createTime\":1545117468000,\"hidden\":false,\"iFrame\":false,\"icon\":\"monitor\",\"id\":6,\"menuSort\":10,\"path\":\"monitor\",\"subCount\":5,\"title\":\"系统监控\",\"type\":0},{\"cache\":true,\"component\":\"monitor/log/index\",\"componentName\":\"Log\",\"createTime\":1545117506000,\"hidden\":false,\"iFrame\":false,\"icon\":\"log\",\"id\":7,\"menuSort\":11,\"path\":\"logs\",\"pid\":6,\"subCount\":0,\"title\":\"操作日志\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1591420317000},{\"cache\":false,\"component\":\"monitor/sql/index\",\"componentName\":\"Sql\",\"createTime\":1545117574000,\"hidden\":false,\"iFrame\":false,\"icon\":\"sqlMonitor\",\"id\":9,\"menuSort\":18,\"path\":\"druid\",\"pid\":6,\"subCount\":0,\"title\":\"SQL监控\",\"type\":1},{\"cache\":false,\"createTime\":1545197896000,\"hidden\":false,\"iFrame\":false,\"icon\":\"zujian\",\"id\":10,\"menuSort\":50,\"path\":\"components\",\"subCount\":5,\"title\":\"组件管理\",\"type\":0},{\"cache\":false,\"component\":\"components/icons/index\",\"componentName\":\"Icons\",\"createTime\":1545197929000,\"hidden\":false,\"iFrame\":false,\"icon\":\"icon\",\"id\":11,\"menuSort\":51,\"path\":\"icon\",\"pid\":10,\"subCount\":0,\"title\":\"图标库\",\"type\":1},{\"cache\":false,\"component\":\"tools/email/index\",\"componentName\":\"Email\",\"createTime\":1545876789000,\"hidden\":false,\"iFrame\":false,\"icon\":\"email\",\"id\":14,\"menuSort\":35,\"path\":\"email\",\"pid\":36,\"subCount\":0,\"title\":\"邮件工具\",\"type\":1},{\"cache\":false,\"component\":\"components/Editor\",\"componentName\":\"Editor\",\"createTime\":1545883105000,\"hidden\":false,\"iFrame\":false,\"icon\":\"fwb\",\"id\":15,\"menuSort\":52,\"path\":\"tinymce\",\"pid\":10,\"subCount\":0,\"title\":\"富文本\",\"type\":1},{\"cache\":false,\"component\":\"monitor/server/index\",\"componentName\":\"ServerMonitor\",\"createTime\":1573103199000,\"hidden\":false,\"iFrame\":false,\"icon\":\"codeConsole\",\"id\":80,\"menuSort\":14,\"path\":\"server\",\"permission\":\"monitor:list\",\"pid\":6,\"subCount\":0,\"title\":\"服务监控\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1588587650000},{\"cache\":true,\"component\":\"generator/config\",\"componentName\":\"GeneratorConfig\",\"createTime\":1573992536000,\"hidden\":true,\"iFrame\":false,\"icon\":\"dev\",\"id\":82,\"menuSort\":33,\"path\":\"generator/config/:tableName\",\"permission\":\"\",\"pid\":36,\"subCount\":0,\"title\":\"生成配置\",\"type\":1},{\"cache\":false,\"component\":\"tools/aliPay/index\",\"componentName\":\"AliPay\",\"createTime\":1546239158000,\"hidden\":false,\"iFrame\":false,\"icon\":\"alipay\",\"id\":19,\"menuSort\":37,\"path\":\"aliPay\",\"pid\":36,\"subCount\":0,\"title\":\"支付宝工具\",\"type\":1},{\"cache\":true,\"component\":\"components/Echarts\",\"componentName\":\"Echarts\",\"createTime\":1574298272000,\"hidden\":false,\"iFrame\":false,\"icon\":\"chart\",\"id\":83,\"menuSort\":50,\"path\":\"echarts\",\"permission\":\"\",\"pid\":10,\"subCount\":0,\"title\":\"图表库\",\"type\":1},{\"cache\":true,\"component\":\"generator/preview\",\"componentName\":\"Preview\",\"createTime\":1574751276000,\"hidden\":true,\"iFrame\":false,\"icon\":\"java\",\"id\":116,\"menuSort\":999,\"path\":\"generator/preview/:tableName\",\"pid\":36,\"subCount\":0,\"title\":\"生成预览\",\"type\":1},{\"cache\":false,\"component\":\"\",\"createTime\":1546590123000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":21,\"menuSort\":900,\"path\":\"nested\",\"subCount\":2,\"title\":\"多级菜单\",\"type\":0,\"updateBy\":\"admin\",\"updateTime\":1592731655000},{\"cache\":false,\"component\":\"\",\"createTime\":1546590209000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":22,\"menuSort\":999,\"path\":\"menu1\",\"pid\":21,\"subCount\":2,\"title\":\"二级菜单1\",\"type\":0,\"updateBy\":\"admin\",\"updateTime\":1592731640000},{\"cache\":false,\"component\":\"nested/menu2/index\",\"createTime\":1546590237000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":23,\"menuSort\":999,\"path\":\"menu2\",\"pid\":21,\"subCount\":0,\"title\":\"二级菜单2\",\"type\":1},{\"cache\":false,\"component\":\"nested/menu1/menu1-1\",\"componentName\":\"Test\",\"createTime\":1546590288000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":24,\"menuSort\":999,\"path\":\"menu1-1\",\"pid\":22,\"subCount\":0,\"title\":\"三级菜单1\",\"type\":1},{\"cache\":false,\"component\":\"nested/menu1/menu1-2\",\"createTime\":1546853252000,\"hidden\":false,\"iFrame\":false,\"icon\":\"menu\",\"id\":27,\"menuSort\":999,\"path\":\"menu1-2\",\"pid\":22,\"subCount\":0,\"title\":\"三级菜单2\",\"type\":1},{\"cache\":true,\"component\":\"generator/index\",\"componentName\":\"GeneratorIndex\",\"createTime\":1547192755000,\"hidden\":false,\"iFrame\":false,\"icon\":\"dev\",\"id\":30,\"menuSort\":32,\"path\":\"generator\",\"pid\":36,\"subCount\":0,\"title\":\"代码生成\",\"type\":1},{\"cache\":false,\"component\":\"monitor/log/errorLog\",\"componentName\":\"ErrorLog\",\"createTime\":1547358543000,\"hidden\":false,\"iFrame\":false,\"icon\":\"error\",\"id\":32,\"menuSort\":12,\"path\":\"errorLog\",\"pid\":6,\"subCount\":0,\"title\":\"异常日志\",\"type\":1}],\"name\":\"普通用户\",\"updateBy\":\"admin\",\"updateTime\":1599273912000}],\"updateBy\":\"admin\",\"updateTime\":1725615750000,\"username\":\"test\"}', '169.254.217.39', 38, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-06 17:42:50'); +INSERT INTO `sys_log` VALUES (3544, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 2834, 'admin', '内网IP', 'Chrome 127', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$cc90c055.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6379\r\nCaused by: java.net.ConnectException: Connection refused: no further information\r\n at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)\r\n at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)\r\n at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-07 21:19:08'); +INSERT INTO `sys_log` VALUES (3545, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 122, 'admin', '内网IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$cc90c055.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-07 22:01:06'); +INSERT INTO `sys_log` VALUES (3546, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 537, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-07 22:01:17'); +INSERT INTO `sys_log` VALUES (3547, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 588, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 15:29:13'); +INSERT INTO `sys_log` VALUES (3548, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 88, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 15:34:21'); +INSERT INTO `sys_log` VALUES (3549, '新增字典', 'INFO', 'me.zhengjie.modules.system.rest.DictController.createDict()', '{\"createBy\":\"admin\",\"createTime\":1725781262552,\"description\":\"测试\",\"dictDetails\":[],\"id\":6,\"name\":\"test\",\"updateBy\":\"admin\",\"updateTime\":1725781262552}', '169.254.217.39', 82, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 15:41:02'); +INSERT INTO `sys_log` VALUES (3550, '删除字典', 'INFO', 'me.zhengjie.modules.system.rest.DictController.deleteDict()', '[6]', '169.254.217.39', 68, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 15:46:28'); +INSERT INTO `sys_log` VALUES (3551, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 112, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:03:32'); +INSERT INTO `sys_log` VALUES (3552, '新增角色', 'INFO', 'me.zhengjie.modules.system.rest.RoleController.createRole()', '{\"createBy\":\"admin\",\"createTime\":1725797141551,\"dataScope\":\"自定义\",\"depts\":[{\"id\":7,\"subCount\":0},{\"id\":6,\"subCount\":0},{\"id\":5,\"subCount\":0},{\"id\":2,\"subCount\":0}],\"id\":3,\"level\":1,\"name\":\"管理员\",\"updateBy\":\"admin\",\"updateTime\":1725797141551}', '169.254.217.39', 32, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:05:41'); +INSERT INTO `sys_log` VALUES (3553, '新增用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.createUser()', '{\"createBy\":\"admin\",\"createTime\":1725797288671,\"dept\":{\"id\":17,\"subCount\":0},\"email\":\"792607890@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":3,\"isAdmin\":false,\"jobs\":[{\"id\":11}],\"nickName\":\"msh\",\"password\":\"$2a$10$rbDSh6KNCVpayv9e6k9F0OVHQqjAKd5G9dkyJHqB1JxHRsobJwbAG\",\"phone\":\"18269745893\",\"roles\":[{\"dataScope\":\"本级\",\"id\":3,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1725797288671,\"username\":\"mei\"}', '169.254.217.39', 151, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:08:08'); +INSERT INTO `sys_log` VALUES (3554, '修改角色菜单', 'INFO', 'me.zhengjie.modules.system.rest.RoleController.updateRoleMenu()', '{\"dataScope\":\"本级\",\"id\":3,\"level\":3,\"menus\":[{\"id\":97,\"menuSort\":999,\"subCount\":0},{\"id\":33,\"menuSort\":999,\"subCount\":0},{\"id\":98,\"menuSort\":999,\"subCount\":0},{\"id\":34,\"menuSort\":999,\"subCount\":0},{\"id\":37,\"menuSort\":999,\"subCount\":0},{\"id\":102,\"menuSort\":999,\"subCount\":0},{\"id\":103,\"menuSort\":999,\"subCount\":0},{\"id\":104,\"menuSort\":999,\"subCount\":0},{\"id\":41,\"menuSort\":999,\"subCount\":0},{\"id\":105,\"menuSort\":999,\"subCount\":0},{\"id\":106,\"menuSort\":999,\"subCount\":0},{\"id\":107,\"menuSort\":999,\"subCount\":0},{\"id\":44,\"menuSort\":999,\"subCount\":0},{\"id\":108,\"menuSort\":999,\"subCount\":0},{\"id\":109,\"menuSort\":999,\"subCount\":0},{\"id\":46,\"menuSort\":999,\"subCount\":0},{\"id\":110,\"menuSort\":999,\"subCount\":0},{\"id\":111,\"menuSort\":999,\"subCount\":0},{\"id\":112,\"menuSort\":999,\"subCount\":0},{\"id\":113,\"menuSort\":999,\"subCount\":0},{\"id\":114,\"menuSort\":999,\"subCount\":0},{\"id\":60,\"menuSort\":999,\"subCount\":0},{\"id\":61,\"menuSort\":999,\"subCount\":0},{\"id\":62,\"menuSort\":999,\"subCount\":0},{\"id\":1,\"menuSort\":999,\"subCount\":0},{\"id\":2,\"menuSort\":999,\"subCount\":0},{\"id\":6,\"menuSort\":999,\"subCount\":0},{\"id\":7,\"menuSort\":999,\"subCount\":0},{\"id\":9,\"menuSort\":999,\"subCount\":0},{\"id\":10,\"menuSort\":999,\"subCount\":0},{\"id\":11,\"menuSort\":999,\"subCount\":0},{\"id\":15,\"menuSort\":999,\"subCount\":0},{\"id\":80,\"menuSort\":999,\"subCount\":0},{\"id\":83,\"menuSort\":999,\"subCount\":0},{\"id\":21,\"menuSort\":999,\"subCount\":0},{\"id\":22,\"menuSort\":999,\"subCount\":0},{\"id\":23,\"menuSort\":999,\"subCount\":0},{\"id\":24,\"menuSort\":999,\"subCount\":0},{\"id\":90,\"menuSort\":999,\"subCount\":0},{\"id\":27,\"menuSort\":999,\"subCount\":0},{\"id\":92,\"menuSort\":999,\"subCount\":0},{\"id\":93,\"menuSort\":999,\"subCount\":0},{\"id\":94,\"menuSort\":999,\"subCount\":0},{\"id\":32,\"menuSort\":999,\"subCount\":0}]}', '169.254.217.39', 426, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:11:12'); +INSERT INTO `sys_log` VALUES (3555, '修改岗位', 'INFO', 'me.zhengjie.modules.system.rest.JobController.updateJob()', '{\"createTime\":1554010770000,\"enabled\":false,\"id\":11,\"jobSort\":2,\"name\":\"全栈开发\",\"updateBy\":\"admin\",\"updateTime\":1588649623000}', '169.254.217.39', 22, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:18:51'); +INSERT INTO `sys_log` VALUES (3556, '修改岗位', 'INFO', 'me.zhengjie.modules.system.rest.JobController.updateJob()', '{\"createTime\":1554010770000,\"enabled\":true,\"id\":11,\"jobSort\":2,\"name\":\"全栈开发\",\"updateBy\":\"admin\",\"updateTime\":1588649623000}', '169.254.217.39', 11, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:29:22'); +INSERT INTO `sys_log` VALUES (3557, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 103, 'mei', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:30:14'); +INSERT INTO `sys_log` VALUES (3558, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 84, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-08 20:30:51'); +INSERT INTO `sys_log` VALUES (3559, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1401, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-09 09:55:16'); +INSERT INTO `sys_log` VALUES (3560, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 72005, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-09 11:50:41'); +INSERT INTO `sys_log` VALUES (3561, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 90, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-09 11:50:59'); +INSERT INTO `sys_log` VALUES (3562, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 186645, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-09 11:55:56'); +INSERT INTO `sys_log` VALUES (3563, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 2908, 'admin', '内网IP', 'Chrome 127', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$932335ea.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6379\r\nCaused by: java.net.ConnectException: Connection refused: no further information\r\n at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)\r\n at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)\r\n at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-09 14:55:58'); +INSERT INTO `sys_log` VALUES (3564, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 2093, 'admin', '内网IP', 'Chrome 127', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$932335ea.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6379\r\nCaused by: java.net.ConnectException: Connection refused: no further information\r\n at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)\r\n at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)\r\n at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-09 14:57:31'); +INSERT INTO `sys_log` VALUES (3565, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 120, 'admin', '内网IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$932335ea.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-09 15:01:16'); +INSERT INTO `sys_log` VALUES (3566, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 450, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-09 15:01:22'); +INSERT INTO `sys_log` VALUES (3567, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 38534, 'mei', '内网IP', 'MSEdge 128', NULL, '2024-09-09 15:32:30'); +INSERT INTO `sys_log` VALUES (3568, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 235, 'mei', '内网IP', 'MSEdge 128', NULL, '2024-09-09 15:33:33'); +INSERT INTO `sys_log` VALUES (3569, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 117333, 'mei', '内网IP', 'MSEdge 128', NULL, '2024-09-09 15:36:53'); +INSERT INTO `sys_log` VALUES (3570, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 1015, 'mei', '内网IP', 'MSEdge 128', NULL, '2024-09-09 15:43:30'); +INSERT INTO `sys_log` VALUES (3571, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 7, 'mei', '内网IP', 'MSEdge 128', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$c732b52c.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-09 15:44:42'); +INSERT INTO `sys_log` VALUES (3572, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 243, 'mei', '内网IP', 'MSEdge 128', NULL, '2024-09-09 16:10:19'); +INSERT INTO `sys_log` VALUES (3573, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1187, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-09 17:01:47'); +INSERT INTO `sys_log` VALUES (3574, '新增用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.createUser()', '{\"createBy\":\"admin\",\"createTime\":1725872559157,\"dept\":{\"id\":5,\"subCount\":0},\"email\":\"796607890@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":4,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"zhen\",\"password\":\"$2a$10$Pq4ZOqIFp0LZrNOVTC7ez.KV6I46uPkO.Pd5wUpAf/qLtrx5QY3Su\",\"phone\":\"18669357895\",\"roles\":[{\"dataScope\":\"本级\",\"id\":2,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1725872559157,\"username\":\"lizhen\"}', '169.254.217.39', 180, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-09 17:02:39'); +INSERT INTO `sys_log` VALUES (3575, '修改角色菜单', 'INFO', 'me.zhengjie.modules.system.rest.RoleController.updateRoleMenu()', '{\"dataScope\":\"本级\",\"id\":2,\"level\":3,\"menus\":[{\"id\":33,\"menuSort\":999,\"subCount\":0},{\"id\":34,\"menuSort\":999,\"subCount\":0},{\"id\":36,\"menuSort\":999,\"subCount\":0},{\"id\":48,\"menuSort\":999,\"subCount\":0},{\"id\":49,\"menuSort\":999,\"subCount\":0},{\"id\":50,\"menuSort\":999,\"subCount\":0},{\"id\":116,\"menuSort\":999,\"subCount\":0},{\"id\":1,\"menuSort\":999,\"subCount\":0},{\"id\":2,\"menuSort\":999,\"subCount\":0},{\"id\":3,\"menuSort\":999,\"subCount\":0},{\"id\":6,\"menuSort\":999,\"subCount\":0},{\"id\":7,\"menuSort\":999,\"subCount\":0},{\"id\":9,\"menuSort\":999,\"subCount\":0},{\"id\":10,\"menuSort\":999,\"subCount\":0},{\"id\":11,\"menuSort\":999,\"subCount\":0},{\"id\":14,\"menuSort\":999,\"subCount\":0},{\"id\":15,\"menuSort\":999,\"subCount\":0},{\"id\":80,\"menuSort\":999,\"subCount\":0},{\"id\":82,\"menuSort\":999,\"subCount\":0},{\"id\":19,\"menuSort\":999,\"subCount\":0},{\"id\":83,\"menuSort\":999,\"subCount\":0},{\"id\":21,\"menuSort\":999,\"subCount\":0},{\"id\":22,\"menuSort\":999,\"subCount\":0},{\"id\":23,\"menuSort\":999,\"subCount\":0},{\"id\":24,\"menuSort\":999,\"subCount\":0},{\"id\":27,\"menuSort\":999,\"subCount\":0},{\"id\":30,\"menuSort\":999,\"subCount\":0},{\"id\":32,\"menuSort\":999,\"subCount\":0}]}', '169.254.217.39', 86, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-09 17:03:36'); +INSERT INTO `sys_log` VALUES (3576, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"lizhen\"}', '169.254.217.39', 102, 'lizhen', '内网IP', 'MSEdge 128', NULL, '2024-09-09 17:03:51'); +INSERT INTO `sys_log` VALUES (3577, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"mei\"}', '169.254.217.39', 2804, 'mei', '内网IP', 'MSEdge 128', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1572f0fc.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:6379\r\nCaused by: java.net.ConnectException: Connection refused: no further information\r\n at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)\r\n at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)\r\n at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-09 20:53:50'); +INSERT INTO `sys_log` VALUES (3578, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1003, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.security.authentication.InternalAuthenticationServiceException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin user_is_admin, u.id,u.uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code,u.inviter_id,u.level,u.astral_total_asset, u.is_effective,u.is_airdrop,u.status , u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:108)\r\n at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:133)\r\n at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:93)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$cc79fe0b.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin user_is_admin, u.id,u.uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code,u.inviter_id,u.level,u.astral_total_asset, u.is_effective,u.is_airdrop,u.status , u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\r\n at com.sun.proxy.$Proxy118.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\r\n at com.sun.proxy.$Proxy150.findByUsername(Unknown Source)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.getLoginData(UserServiceImpl.java:188)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$e1092ac3.getLoginData()\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:50)\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:35)\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:93)\r\n ... 115 more\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\r\n at com.sun.proxy.$Proxy228.execute(Unknown Source)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\r\n at com.sun.proxy.$Proxy226.query(Unknown Source)\r\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\r\n at com.sun.proxy.$Proxy225.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\r\n ... 129 more\r\n', '2024-09-10 10:52:41'); +INSERT INTO `sys_log` VALUES (3579, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 2436, 'admin', '内网IP', 'MSEdge 128', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$bfff2fef.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-10 10:56:46'); +INSERT INTO `sys_log` VALUES (3580, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 168, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.security.authentication.InternalAuthenticationServiceException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id,u.uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code,u.inviter_id,u.level,u.astral_total_asset, u.is_effective,u.is_airdrop,u.status , u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:108)\r\n at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:133)\r\n at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:93)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$bfff2fef.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id,u.uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code,u.inviter_id,u.level,u.astral_total_asset, u.is_effective,u.is_airdrop,u.status , u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\r\n at com.sun.proxy.$Proxy118.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\r\n at com.sun.proxy.$Proxy150.findByUsername(Unknown Source)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.getLoginData(UserServiceImpl.java:188)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$32308eb0.getLoginData()\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:50)\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:35)\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:93)\r\n ... 115 more\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\r\n at com.sun.proxy.$Proxy228.execute(Unknown Source)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\r\n at com.sun.proxy.$Proxy226.query(Unknown Source)\r\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\r\n at com.sun.proxy.$Proxy225.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\r\n ... 129 more\r\n', '2024-09-10 10:56:51'); +INSERT INTO `sys_log` VALUES (3581, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1017, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.security.authentication.InternalAuthenticationServiceException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id as id,u.uid as uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code as inviter_code,u.inviter_id as inviter_id,u.level as level, u.astral_total_asset as astral_total_asset,u.is_effective as is_effective ,u.is_airdrop as is_airdrop,u.status as status, u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:108)\r\n at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:133)\r\n at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:93)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$df18576f.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id as id,u.uid as uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code as inviter_code,u.inviter_id as inviter_id,u.level as level, u.astral_total_asset as astral_total_asset,u.is_effective as is_effective ,u.is_airdrop as is_airdrop,u.status as status, u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\r\n at com.sun.proxy.$Proxy118.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\r\n at com.sun.proxy.$Proxy150.findByUsername(Unknown Source)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.getLoginData(UserServiceImpl.java:188)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$15685b05.getLoginData()\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:50)\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:35)\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:93)\r\n ... 115 more\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\r\n at com.sun.proxy.$Proxy228.execute(Unknown Source)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\r\n at com.sun.proxy.$Proxy226.query(Unknown Source)\r\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\r\n at com.sun.proxy.$Proxy225.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\r\n ... 129 more\r\n', '2024-09-10 10:59:40'); +INSERT INTO `sys_log` VALUES (3582, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 9, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.security.authentication.InternalAuthenticationServiceException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id as id,u.uid as uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code as inviter_code,u.inviter_id as inviter_id,u.level as level, u.astral_total_asset as astral_total_asset,u.is_effective as is_effective ,u.is_airdrop as is_airdrop,u.status as status, u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:108)\r\n at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:133)\r\n at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:93)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$df18576f.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id as id,u.uid as uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code as inviter_code,u.inviter_id as inviter_id,u.level as level, u.astral_total_asset as astral_total_asset,u.is_effective as is_effective ,u.is_airdrop as is_airdrop,u.status as status, u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\r\n at com.sun.proxy.$Proxy118.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\r\n at com.sun.proxy.$Proxy150.findByUsername(Unknown Source)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.getLoginData(UserServiceImpl.java:188)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$15685b05.getLoginData()\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:50)\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:35)\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:93)\r\n ... 115 more\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'u.id\' in \'field list\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\r\n at com.sun.proxy.$Proxy228.execute(Unknown Source)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\r\n at com.sun.proxy.$Proxy226.query(Unknown Source)\r\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\r\n at com.sun.proxy.$Proxy225.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\r\n ... 129 more\r\n', '2024-09-10 11:01:33'); +INSERT INTO `sys_log` VALUES (3583, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 64500, 'admin', '内网IP', 'MSEdge 128', 'me.zhengjie.exception.BadRequestException: 验证码错误\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$df18576f.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-10 11:02:50'); +INSERT INTO `sys_log` VALUES (3584, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 6473, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.security.authentication.InternalAuthenticationServiceException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table \'eladmin.pro_member\' doesn\'t exist\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id as id,u.uid as uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code as inviter_code,u.inviter_id as inviter_id,u.level as level, u.astral_total_asset as astral_total_asset,u.is_effective as is_effective ,u.is_airdrop as is_airdrop,u.status as status, u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from pro_member u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Table \'eladmin.pro_member\' doesn\'t exist\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table \'eladmin.pro_member\' doesn\'t exist\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:108)\r\n at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:133)\r\n at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:93)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1946392c.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table \'eladmin.pro_member\' doesn\'t exist\r\n### The error may exist in file [F:\\workspace\\you1\\houdaun2\\eladmin-mp-master\\eladmin\\eladmin-system\\target\\classes\\mapper\\system\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: select u.is_admin, u.id as id,u.uid as uid, u.dept_id as deptId, u.username as username, u.nickname as nickName, u.inviter_code as inviter_code,u.inviter_id as inviter_id,u.level as level, u.astral_total_asset as astral_total_asset,u.is_effective as is_effective ,u.is_airdrop as is_airdrop,u.status as status, u.create_by as user_create_by,u.is_admin, u.update_by as user_update_by, u.create_time as user_create_time, u.update_time as user_update_time, d.dept_id as dept_id, d.name as dept_name from pro_member u left join sys_dept d on u.dept_id = d.dept_id where u.username = ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Table \'eladmin.pro_member\' doesn\'t exist\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table \'eladmin.pro_member\' doesn\'t exist\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\r\n at com.sun.proxy.$Proxy118.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\r\n at com.sun.proxy.$Proxy150.findByUsername(Unknown Source)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.getLoginData(UserServiceImpl.java:188)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\r\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$fee6caa5.getLoginData()\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:50)\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:35)\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:93)\r\n ... 115 more\r\nCaused by: java.sql.SQLSyntaxErrorException: Table \'eladmin.pro_member\' doesn\'t exist\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\r\n at com.sun.proxy.$Proxy228.execute(Unknown Source)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\r\n at com.sun.proxy.$Proxy226.query(Unknown Source)\r\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\r\n at com.sun.proxy.$Proxy225.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\r\n ... 129 more\r\n', '2024-09-10 11:06:26'); +INSERT INTO `sys_log` VALUES (3585, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1725872559000,\"dept\":{\"hasChildren\":false,\"id\":5,\"label\":\"运维部\",\"leaf\":true,\"name\":\"运维部\",\"subCount\":0},\"deptId\":5,\"email\":\"796607890@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":4,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"zhen\",\"phone\":\"18669357895\",\"roles\":[{\"dataScope\":\"本级\",\"id\":2,\"level\":2,\"name\":\"普通用户\"}],\"updateBy\":\"admin\",\"updateTime\":1725872559000,\"username\":\"lizhen\"}', '169.254.217.39', 164, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-11 17:51:17'); +INSERT INTO `sys_log` VALUES (3586, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1231, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 09:49:05'); +INSERT INTO `sys_log` VALUES (3587, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 131, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 09:51:38'); +INSERT INTO `sys_log` VALUES (3588, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 82, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 09:56:16'); +INSERT INTO `sys_log` VALUES (3589, '修改岗位', 'INFO', 'me.zhengjie.modules.system.rest.JobController.updateJob()', '{\"createTime\":1553842551000,\"enabled\":false,\"id\":10,\"jobSort\":4,\"name\":\"产品经理\",\"updateBy\":\"admin\",\"updateTime\":1726111650880}', '169.254.217.39', 139, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 11:27:31'); +INSERT INTO `sys_log` VALUES (3590, '修改部门', 'INFO', 'me.zhengjie.modules.system.rest.DeptController.updateDept()', '{\"createBy\":\"admin\",\"createTime\":1553483090000,\"deptSort\":0,\"enabled\":true,\"hasChildren\":true,\"id\":7,\"label\":\"华南分部\",\"leaf\":false,\"name\":\"华南分部\",\"subCount\":2,\"updateBy\":\"admin\",\"updateTime\":1591589336000}', '169.254.217.39', 199, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 13:56:14'); +INSERT INTO `sys_log` VALUES (3591, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 261, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 14:26:38'); +INSERT INTO `sys_log` VALUES (3592, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 89, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 14:38:29'); +INSERT INTO `sys_log` VALUES (3593, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 110, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 14:39:59'); +INSERT INTO `sys_log` VALUES (3594, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 91, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 14:47:36'); +INSERT INTO `sys_log` VALUES (3595, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 104, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 16:02:11'); +INSERT INTO `sys_log` VALUES (3596, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 95, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 16:02:11'); +INSERT INTO `sys_log` VALUES (3597, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 100, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 16:08:37'); +INSERT INTO `sys_log` VALUES (3598, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 97, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 16:10:09'); +INSERT INTO `sys_log` VALUES (3599, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 97, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 16:18:22'); +INSERT INTO `sys_log` VALUES (3600, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 89, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 16:18:42'); +INSERT INTO `sys_log` VALUES (3601, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 93, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 16:21:56'); +INSERT INTO `sys_log` VALUES (3602, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 85, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 16:22:07'); +INSERT INTO `sys_log` VALUES (3603, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 101, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 16:32:21'); +INSERT INTO `sys_log` VALUES (3604, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 91, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 16:32:28'); +INSERT INTO `sys_log` VALUES (3605, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 97, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 16:45:42'); +INSERT INTO `sys_log` VALUES (3606, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 92, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 16:47:16'); +INSERT INTO `sys_log` VALUES (3607, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 3, 'admin', '内网IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.GeneratedMethodAccessor455.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$2ee05d1c.login()\r\n at sun.reflect.GeneratedMethodAccessor463.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-12 17:03:03'); +INSERT INTO `sys_log` VALUES (3608, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 92, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 17:03:08'); +INSERT INTO `sys_log` VALUES (3609, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 93, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 17:15:10'); +INSERT INTO `sys_log` VALUES (3610, '修改部门', 'INFO', 'me.zhengjie.modules.system.rest.DeptController.updateDept()', '{\"createBy\":\"admin\",\"createTime\":1553483090000,\"deptSort\":0,\"enabled\":true,\"hasChildren\":true,\"id\":7,\"label\":\"华南分部\",\"leaf\":false,\"name\":\"华南分部\",\"subCount\":2,\"updateBy\":\"admin\",\"updateTime\":1591589336000}', '169.254.217.39', 10, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-12 17:39:03'); +INSERT INTO `sys_log` VALUES (3611, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1783, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-12 21:11:22'); +INSERT INTO `sys_log` VALUES (3612, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 3, 'admin', 'IANA保留地址', 'Unknown null', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$fcb6ea65.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-12 21:43:30'); +INSERT INTO `sys_log` VALUES (3613, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 1, 'admin', 'IANA保留地址', 'Chrome 127', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$fcb6ea65.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-12 21:46:19'); +INSERT INTO `sys_log` VALUES (3614, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 779, 'admin', 'IANA保留地址', 'Chrome 127', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$59eebfdb.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-12 21:50:28'); +INSERT INTO `sys_log` VALUES (3615, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 2, 'admin', 'IANA保留地址', 'Chrome 127', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$59eebfdb.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-12 21:51:39'); +INSERT INTO `sys_log` VALUES (3616, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 1, 'admin', 'IANA保留地址', 'Chrome 127', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$59eebfdb.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-12 21:52:10'); +INSERT INTO `sys_log` VALUES (3617, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 13179, 'admin', 'IANA保留地址', 'Unknown null', NULL, '2024-09-12 21:57:04'); +INSERT INTO `sys_log` VALUES (3618, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1252, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-13 09:36:17'); +INSERT INTO `sys_log` VALUES (3619, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 374, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-13 11:47:20'); +INSERT INTO `sys_log` VALUES (3620, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 88, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-13 11:47:51'); +INSERT INTO `sys_log` VALUES (3621, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1725872559000,\"dept\":{\"hasChildren\":false,\"id\":5,\"label\":\"运维部\",\"leaf\":true,\"name\":\"运维部\",\"subCount\":0},\"deptId\":5,\"email\":\"796607890@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":4,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"zhen\",\"phone\":\"18669357895\",\"roles\":[{\"dataScope\":\"本级\",\"id\":2,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1725872559000,\"username\":\"lizhen\"}', '169.254.217.39', 148, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-13 14:18:47'); +INSERT INTO `sys_log` VALUES (3622, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 279, 'admin', '内网IP', 'Chrome 120', NULL, '2024-09-13 14:45:37'); +INSERT INTO `sys_log` VALUES (3623, '删除部门', 'ERROR', 'me.zhengjie.modules.system.rest.DeptController.deleteDept()', '[5899]', '169.254.217.39', 9, 'admin', '内网IP', 'Chrome 120', 'java.lang.NullPointerException\r\n at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)\r\n at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1556)\r\n at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)\r\n at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)\r\n at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)\r\n at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\r\n at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)\r\n at me.zhengjie.modules.system.service.impl.DeptServiceImpl.verification(DeptServiceImpl.java:233)\r\n at me.zhengjie.modules.system.service.impl.DeptServiceImpl$$FastClassBySpringCGLIB$$4d6d67d1.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\r\n at me.zhengjie.modules.system.service.impl.DeptServiceImpl$$EnhancerBySpringCGLIB$$7a1f8fa9.verification()\r\n at me.zhengjie.modules.system.rest.DeptController.deleteDept(DeptController.java:124)\r\n at me.zhengjie.modules.system.rest.DeptController$$FastClassBySpringCGLIB$$9f3dcd45.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.system.rest.DeptController$$EnhancerBySpringCGLIB$$8aef809d.deleteDept()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:931)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-13 15:19:17'); +INSERT INTO `sys_log` VALUES (3624, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1725872559000,\"dept\":{\"hasChildren\":false,\"id\":5,\"label\":\"运维部\",\"leaf\":true,\"name\":\"运维部\",\"subCount\":0},\"deptId\":5,\"email\":\"796607890@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":4,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"zhen\",\"phone\":\"18669357895\",\"roles\":[{\"dataScope\":\"本级\",\"id\":2,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1725872559000,\"username\":\"lizhen\"}', '169.254.217.39', 117, 'admin', '内网IP', 'Chrome 120', NULL, '2024-09-13 15:48:22'); +INSERT INTO `sys_log` VALUES (3625, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 277, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-13 16:20:34'); +INSERT INTO `sys_log` VALUES (3626, '修改部门', 'INFO', 'me.zhengjie.modules.system.rest.DeptController.updateDept()', '{\"createBy\":\"admin\",\"createTime\":1553483090000,\"deptSort\":0,\"enabled\":false,\"hasChildren\":true,\"id\":7,\"label\":\"华南分部\",\"leaf\":false,\"name\":\"华南分部\",\"subCount\":2,\"updateBy\":\"admin\",\"updateTime\":1591589336000}', '169.254.217.39', 40, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-13 16:44:57'); +INSERT INTO `sys_log` VALUES (3627, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 222, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-13 18:19:14'); +INSERT INTO `sys_log` VALUES (3628, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 178, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$a272c7f6.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.lettuce.core.RedisCommandExecutionException: WRONGPASS invalid username-password pair or user is disabled.\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)\r\n at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)\r\n at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)\r\n at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:746)\r\n at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:681)\r\n at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\r\n at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\r\n at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n ... 1 more\r\n', '2024-09-14 09:57:13'); +INSERT INTO `sys_log` VALUES (3629, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 163, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$a272c7f6.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.lettuce.core.RedisCommandExecutionException: WRONGPASS invalid username-password pair or user is disabled.\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)\r\n at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)\r\n at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)\r\n at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:746)\r\n at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:681)\r\n at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\r\n at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\r\n at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n ... 1 more\r\n', '2024-09-14 09:57:19'); +INSERT INTO `sys_log` VALUES (3630, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 1237, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 09:58:15'); +INSERT INTO `sys_log` VALUES (3631, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.217.39', 88, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 10:00:54'); +INSERT INTO `sys_log` VALUES (3632, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 479, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 10:21:30'); +INSERT INTO `sys_log` VALUES (3633, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 204, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 10:42:22'); +INSERT INTO `sys_log` VALUES (3634, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 871, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 14:05:11'); +INSERT INTO `sys_log` VALUES (3635, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 848, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$c83f8ee9.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.lettuce.core.RedisCommandExecutionException: NOPERM User meishihao has no permissions to run the \'select\' command\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)\r\n at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)\r\n at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)\r\n at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:746)\r\n at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:681)\r\n at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\r\n at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\r\n at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n ... 1 more\r\n', '2024-09-14 15:15:55'); +INSERT INTO `sys_log` VALUES (3636, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 245, 'admin', '内网IP', 'MSEdge 128', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$c83f8ee9.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to redis.excn.vip:6380\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.lettuce.core.RedisCommandExecutionException: NOPERM User meishihao has no permissions to run the \'select\' command\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)\r\n at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)\r\n at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)\r\n at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:746)\r\n at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:681)\r\n at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\r\n at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\r\n at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n ... 1 more\r\n', '2024-09-14 15:16:05'); +INSERT INTO `sys_log` VALUES (3637, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 589, 'admin', '内网IP', 'MSEdge 128', 'me.zhengjie.exception.BadRequestException: 验证码错误\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$6b20923b.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-14 15:17:25'); +INSERT INTO `sys_log` VALUES (3638, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 261, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 15:17:29'); +INSERT INTO `sys_log` VALUES (3639, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 2, 'admin', '内网IP', 'Chrome 120', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$6b20923b.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-14 15:22:51'); +INSERT INTO `sys_log` VALUES (3640, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 83, 'admin', '内网IP', 'Chrome 120', NULL, '2024-09-14 15:22:56'); +INSERT INTO `sys_log` VALUES (3641, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 884, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 16:14:10'); +INSERT INTO `sys_log` VALUES (3642, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 1014, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 17:11:57'); +INSERT INTO `sys_log` VALUES (3643, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 90, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 17:12:27'); +INSERT INTO `sys_log` VALUES (3644, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 995, 'admin', '内网IP', 'Chrome 127', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$f7743ebf.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.lettuce.core.RedisCommandExecutionException: ERR DB index is out of range\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)\r\n at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)\r\n at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)\r\n at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:746)\r\n at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:681)\r\n at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\r\n at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\r\n at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n ... 1 more\r\n', '2024-09-14 18:39:15'); +INSERT INTO `sys_log` VALUES (3645, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 316, 'admin', '内网IP', 'Chrome 127', 'org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:82)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$f7743ebf.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 125 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 126 more\r\nCaused by: io.lettuce.core.RedisCommandExecutionException: ERR DB index is out of range\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)\r\n at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)\r\n at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)\r\n at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:746)\r\n at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:681)\r\n at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\r\n at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\r\n at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n ... 1 more\r\n', '2024-09-14 18:39:23'); +INSERT INTO `sys_log` VALUES (3646, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 992, 'admin', '内网IP', 'Chrome 127', 'org.springframework.security.authentication.InternalAuthenticationServiceException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:108)\r\n at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:133)\r\n at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:93)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$53a59d02.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java:1689)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1597)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1383)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1366)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getSharedConnection(LettuceConnectionFactory.java:1093)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:421)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)\r\n at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:210)\r\n at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190)\r\n at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)\r\n at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:54)\r\n at me.zhengjie.utils.RedisUtils.get(RedisUtils.java:221)\r\n at me.zhengjie.modules.security.service.UserCacheManager.getUserCache(UserCacheManager.java:49)\r\n at me.zhengjie.modules.security.service.UserCacheManager$$FastClassBySpringCGLIB$$756e6bf4.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\r\n at me.zhengjie.modules.security.service.UserCacheManager$$EnhancerBySpringCGLIB$$b17bb0ba.getUserCache()\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:46)\r\n at me.zhengjie.modules.security.service.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImpl.java:35)\r\n at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:93)\r\n ... 115 more\r\nCaused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)\r\n at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1595)\r\n ... 135 more\r\nCaused by: io.lettuce.core.RedisConnectionException: Unable to connect to redis-11586.c340.ap-northeast-2-1.ec2.redns.redis-cloud.com:11586\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)\r\n at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)\r\n at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:330)\r\n at io.lettuce.core.RedisClient.connect(RedisClient.java:216)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.lambda$getConnection$1(StandaloneConnectionProvider.java:115)\r\n at java.util.Optional.orElseGet(Optional.java:267)\r\n at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:115)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)\r\n at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)\r\n at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:70)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)\r\n at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)\r\n at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)\r\n at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)\r\n ... 136 more\r\nCaused by: io.lettuce.core.RedisCommandExecutionException: ERR DB index is out of range\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)\r\n at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)\r\n at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)\r\n at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)\r\n at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:746)\r\n at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:681)\r\n at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)\r\n at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)\r\n at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)\r\n at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)\r\n at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)\r\n at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)\r\n at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)\r\n at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)\r\n at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n ... 1 more\r\n', '2024-09-14 18:40:38'); +INSERT INTO `sys_log` VALUES (3647, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 862, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 18:42:49'); +INSERT INTO `sys_log` VALUES (3648, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 5, 'admin', '内网IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$76994d7d.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-14 18:43:47'); +INSERT INTO `sys_log` VALUES (3649, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 236, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 18:43:51'); +INSERT INTO `sys_log` VALUES (3650, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 508, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 18:50:23'); +INSERT INTO `sys_log` VALUES (3651, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 1856, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 19:04:53'); +INSERT INTO `sys_log` VALUES (3652, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 2010, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 20:13:13'); +INSERT INTO `sys_log` VALUES (3653, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 1513, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 20:18:56'); +INSERT INTO `sys_log` VALUES (3654, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 1719, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 20:24:59'); +INSERT INTO `sys_log` VALUES (3655, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '169.254.255.141', 533, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 20:26:55'); +INSERT INTO `sys_log` VALUES (3656, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 696, 'admin', '内网IP', 'MSEdge 128', 'me.zhengjie.exception.BadRequestException: 验证码错误\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$5b21efbe.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-14 20:32:37'); +INSERT INTO `sys_log` VALUES (3657, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 1501, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 20:32:43'); +INSERT INTO `sys_log` VALUES (3658, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 1608, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 20:35:18'); +INSERT INTO `sys_log` VALUES (3659, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 1514, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 20:37:16'); +INSERT INTO `sys_log` VALUES (3660, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 692, 'admin', '内网IP', 'MSEdge 128', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$5b21efbe.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-14 20:37:26'); +INSERT INTO `sys_log` VALUES (3661, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 1483, 'admin', '内网IP', 'MSEdge 128', NULL, '2024-09-14 20:37:39'); +INSERT INTO `sys_log` VALUES (3662, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 1491, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 20:39:53'); +INSERT INTO `sys_log` VALUES (3663, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 690, 'admin', '内网IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$5b21efbe.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-14 20:39:59'); +INSERT INTO `sys_log` VALUES (3664, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '172.17.0.10', 1492, 'admin', '内网IP', 'Chrome 127', NULL, '2024-09-14 20:40:11'); +INSERT INTO `sys_log` VALUES (3665, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 2193, 'admin', '中国四川省成都市', 'MSEdge 128', NULL, '2024-09-14 21:28:07'); +INSERT INTO `sys_log` VALUES (3666, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 1590, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 21:36:07'); +INSERT INTO `sys_log` VALUES (3667, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 2196, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 21:46:37'); +INSERT INTO `sys_log` VALUES (3668, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 1664, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 21:58:43'); +INSERT INTO `sys_log` VALUES (3669, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 1512, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 22:00:52'); +INSERT INTO `sys_log` VALUES (3670, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 2196, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 22:11:34'); +INSERT INTO `sys_log` VALUES (3671, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '106.85.39.150', 1545, 'admin', '中国重庆重庆市', 'MicroMessenger 8.0.50.2701', NULL, '2024-09-14 22:17:18'); +INSERT INTO `sys_log` VALUES (3672, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '106.84.161.55', 1554, 'admin', '中国重庆重庆市', 'MicroMessenger 8.0.50.2701', NULL, '2024-09-14 22:24:36'); +INSERT INTO `sys_log` VALUES (3673, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '106.85.39.150', 740, 'admin', '中国重庆重庆市', 'MSEdge 109.0.1518.140', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$9649d392.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-14 22:37:46'); +INSERT INTO `sys_log` VALUES (3674, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '106.85.39.150', 732, 'admin', '中国重庆重庆市', 'MSEdge 109.0.1518.140', 'me.zhengjie.exception.BadRequestException: 验证码错误\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$9649d392.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-14 22:37:50'); +INSERT INTO `sys_log` VALUES (3675, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '106.85.39.150', 1559, 'admin', '中国重庆重庆市', 'MSEdge 109.0.1518.140', NULL, '2024-09-14 22:37:57'); +INSERT INTO `sys_log` VALUES (3676, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 1694, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 23:38:56'); +INSERT INTO `sys_log` VALUES (3677, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.139.206.229', 1971, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-14 23:47:28'); +INSERT INTO `sys_log` VALUES (3678, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.176.242.220', 3644, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-15 12:06:08'); +INSERT INTO `sys_log` VALUES (3679, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '171.218.220.13', 1567, 'admin', '中国四川省成都市', 'MicroMessenger 8.0.50', NULL, '2024-09-15 12:06:33'); +INSERT INTO `sys_log` VALUES (3680, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '171.218.220.13', 711, 'admin', '中国四川省成都市', 'MicroMessenger 8.0.50', 'me.zhengjie.exception.BadRequestException: 验证码不存在或已过期\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$86d09e6f.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-15 12:06:36'); +INSERT INTO `sys_log` VALUES (3681, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '117.176.242.220', 1851, 'admin', '中国四川省成都市', 'Chrome 127', NULL, '2024-09-15 12:53:18'); +INSERT INTO `sys_log` VALUES (3682, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '171.218.192.255', 3250, 'admin', '中国四川省成都市', 'MicroMessenger 6.8.0', NULL, '2024-09-15 20:33:35'); +INSERT INTO `sys_log` VALUES (3683, '修改菜单', 'INFO', 'me.zhengjie.modules.system.rest.MenuController.updateMenu()', '{\"cache\":false,\"children\":[{\"cache\":false,\"component\":\"\",\"createTime\":1572325029000,\"hasChildren\":false,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":56,\"label\":\"部门新增\",\"leaf\":true,\"menuSort\":2,\"path\":\"\",\"permission\":\"dept:add\",\"pid\":35,\"subCount\":0,\"title\":\"部门新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325047000,\"hasChildren\":false,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":57,\"label\":\"部门编辑\",\"leaf\":true,\"menuSort\":3,\"path\":\"\",\"permission\":\"dept:edit\",\"pid\":35,\"subCount\":0,\"title\":\"部门编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325061000,\"hasChildren\":false,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":58,\"label\":\"部门删除\",\"leaf\":true,\"menuSort\":4,\"path\":\"\",\"permission\":\"dept:del\",\"pid\":35,\"subCount\":0,\"title\":\"部门删除\",\"type\":2}],\"component\":\"system/dept/index\",\"componentName\":\"Dept\",\"createTime\":1553478360000,\"hasChildren\":true,\"hidden\":true,\"iFrame\":false,\"icon\":\"dept\",\"id\":35,\"label\":\"部门管理\",\"leaf\":false,\"menuSort\":6,\"path\":\"dept\",\"permission\":\"dept:list\",\"pid\":1,\"subCount\":3,\"title\":\"部门管理\",\"type\":1}', '171.218.192.255', 1813, 'admin', '中国四川省成都市', 'MicroMessenger 6.8.0', NULL, '2024-09-15 20:35:00'); +INSERT INTO `sys_log` VALUES (3684, '修改菜单', 'INFO', 'me.zhengjie.modules.system.rest.MenuController.updateMenu()', '{\"cache\":false,\"children\":[{\"cache\":false,\"component\":\"\",\"createTime\":1572325029000,\"hasChildren\":false,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":56,\"label\":\"部门新增\",\"leaf\":true,\"menuSort\":2,\"path\":\"\",\"permission\":\"dept:add\",\"pid\":35,\"subCount\":0,\"title\":\"部门新增\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325047000,\"hasChildren\":false,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":57,\"label\":\"部门编辑\",\"leaf\":true,\"menuSort\":3,\"path\":\"\",\"permission\":\"dept:edit\",\"pid\":35,\"subCount\":0,\"title\":\"部门编辑\",\"type\":2},{\"cache\":false,\"component\":\"\",\"createTime\":1572325061000,\"hasChildren\":false,\"hidden\":false,\"iFrame\":false,\"icon\":\"\",\"id\":58,\"label\":\"部门删除\",\"leaf\":true,\"menuSort\":4,\"path\":\"\",\"permission\":\"dept:del\",\"pid\":35,\"subCount\":0,\"title\":\"部门删除\",\"type\":2}],\"component\":\"system/job/index\",\"componentName\":\"Job\",\"createTime\":1553838678000,\"hasChildren\":true,\"hidden\":true,\"iFrame\":false,\"icon\":\"Steve-Jobs\",\"id\":37,\"label\":\"岗位管理\",\"leaf\":false,\"menuSort\":7,\"path\":\"job\",\"permission\":\"job:list\",\"pid\":1,\"subCount\":3,\"title\":\"岗位管理\",\"type\":1}', '171.218.192.255', 2123, 'admin', '中国四川省成都市', 'MicroMessenger 6.8.0', NULL, '2024-09-15 20:35:18'); +INSERT INTO `sys_log` VALUES (3685, '修改菜单', 'INFO', 'me.zhengjie.modules.system.rest.MenuController.updateMenu()', '{\"cache\":false,\"component\":\"system/timing/index\",\"componentName\":\"Timing\",\"createTime\":1546864480000,\"hasChildren\":true,\"hidden\":true,\"iFrame\":false,\"icon\":\"timing\",\"id\":28,\"label\":\"任务调度\",\"leaf\":false,\"menuSort\":999,\"path\":\"timing\",\"permission\":\"timing:list\",\"pid\":1,\"subCount\":3,\"title\":\"任务调度\",\"type\":1}', '171.218.192.255', 1453, 'admin', '中国四川省成都市', 'MicroMessenger 6.8.0', NULL, '2024-09-15 20:35:53'); +INSERT INTO `sys_log` VALUES (3686, '修改菜单', 'INFO', 'me.zhengjie.modules.system.rest.MenuController.updateMenu()', '{\"cache\":false,\"component\":\"system/timing/index\",\"componentName\":\"Timing\",\"createTime\":1546864480000,\"hasChildren\":true,\"hidden\":true,\"iFrame\":false,\"icon\":\"timing\",\"id\":28,\"label\":\"任务调度\",\"leaf\":false,\"menuSort\":999,\"path\":\"timing\",\"permission\":\"timing:list\",\"pid\":1,\"subCount\":3,\"title\":\"任务调度\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1726403752000}', '171.218.192.255', 1492, 'admin', '中国四川省成都市', 'MicroMessenger 6.8.0', NULL, '2024-09-15 20:36:06'); +INSERT INTO `sys_log` VALUES (3687, '修改菜单', 'INFO', 'me.zhengjie.modules.system.rest.MenuController.updateMenu()', '{\"cache\":false,\"component\":\"system/dict/index\",\"componentName\":\"Dict\",\"createTime\":1554868144000,\"hasChildren\":true,\"hidden\":true,\"iFrame\":false,\"icon\":\"dictionary\",\"id\":39,\"label\":\"字典管理\",\"leaf\":false,\"menuSort\":8,\"path\":\"dict\",\"permission\":\"dict:list\",\"pid\":1,\"subCount\":3,\"title\":\"字典管理\",\"type\":1,\"updateBy\":\"admin\",\"updateTime\":1726403752000}', '171.218.192.255', 1452, 'admin', '中国四川省成都市', 'MicroMessenger 6.8.0', NULL, '2024-09-15 20:36:22'); +INSERT INTO `sys_log` VALUES (3688, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '171.218.192.255', 678, 'admin', '中国四川省成都市', 'Chrome 128', 'me.zhengjie.exception.BadRequestException: 验证码错误\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$5fc231d3.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-15 20:36:56'); +INSERT INTO `sys_log` VALUES (3689, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '171.218.192.255', 675, 'admin', '中国四川省成都市', 'Chrome 128', 'me.zhengjie.exception.BadRequestException: 验证码错误\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$5fc231d3.login()\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.lang.Thread.run(Thread.java:750)\n', '2024-09-15 20:37:04'); +INSERT INTO `sys_log` VALUES (3690, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '171.218.192.255', 1507, 'admin', '中国四川省成都市', 'Chrome 128', NULL, '2024-09-15 20:37:23'); +INSERT INTO `sys_log` VALUES (3691, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '171.218.181.2', 1525, 'admin', '中国四川省成都市', 'Chrome 128', NULL, '2024-09-15 20:56:37'); +INSERT INTO `sys_log` VALUES (3692, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 40, 'admin', 'IANA保留地址', 'Unknown null', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$737fe00f.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-19 12:29:53'); +INSERT INTO `sys_log` VALUES (3693, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 1, 'admin', 'IANA保留地址', 'Unknown null', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$737fe00f.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-19 12:30:47'); +INSERT INTO `sys_log` VALUES (3694, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 1, 'admin', 'IANA保留地址', 'Unknown null', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$737fe00f.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-19 12:31:13'); +INSERT INTO `sys_log` VALUES (3695, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 4801, 'admin', 'IANA保留地址', 'Unknown null', 'javax.crypto.BadPaddingException: Decryption error\r\n at sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:370)\r\n at sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\r\n at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:370)\r\n at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:404)\r\n at javax.crypto.Cipher.doFinal(Cipher.java:2168)\r\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\r\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\r\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\r\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\r\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$737fe00f.login()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\r\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', '2024-09-19 12:31:30'); +INSERT INTO `sys_log` VALUES (3696, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '0:0:0:0:0:0:0:1', 3028, 'admin', 'IANA保留地址', 'Unknown null', NULL, '2024-09-19 12:33:31'); +INSERT INTO `sys_log` VALUES (3697, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 458, 'admin', '������IP', 'Unknown null', 'javax.crypto.BadPaddingException: Decryption error\n at java.base/sun.security.rsa.RSAPadding.unpadV15(RSAPadding.java:369)\n at java.base/sun.security.rsa.RSAPadding.unpad(RSAPadding.java:282)\n at java.base/com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:371)\n at java.base/com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:405)\n at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2202)\n at me.zhengjie.utils.RsaUtils.doLongerCipherFinal(RsaUtils.java:144)\n at me.zhengjie.utils.RsaUtils.decryptByPrivateKey(RsaUtils.java:120)\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:80)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$2749c2e5.login()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 12:40:19'); +INSERT INTO `sys_log` VALUES (3698, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 1065, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 16:45:48'); +INSERT INTO `sys_log` VALUES (3699, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 2, 'admin', '������IP', 'Chrome 128', 'me.zhengjie.exception.BadRequestException: ??????????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 16:46:12'); +INSERT INTO `sys_log` VALUES (3700, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 58, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:24:41'); +INSERT INTO `sys_log` VALUES (3701, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 1, 'admin', '������IP', 'Chrome 128', 'me.zhengjie.exception.BadRequestException: ??????????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 17:25:55'); +INSERT INTO `sys_log` VALUES (3702, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 62, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:26:02'); +INSERT INTO `sys_log` VALUES (3703, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 54, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:27:46'); +INSERT INTO `sys_log` VALUES (3704, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 1, 'admin', '������IP', 'Chrome 128', 'me.zhengjie.exception.BadRequestException: ??????????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 17:27:53'); +INSERT INTO `sys_log` VALUES (3705, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 54, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:27:56'); +INSERT INTO `sys_log` VALUES (3706, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 63, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:28:44'); +INSERT INTO `sys_log` VALUES (3707, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 54, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:29:12'); +INSERT INTO `sys_log` VALUES (3708, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 53, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:33:06'); +INSERT INTO `sys_log` VALUES (3709, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 54, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:42:55'); +INSERT INTO `sys_log` VALUES (3710, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 53, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 17:43:38'); +INSERT INTO `sys_log` VALUES (3711, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 54, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 18:05:35'); +INSERT INTO `sys_log` VALUES (3712, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 1, 'admin', '������IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: ?????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 19:40:12'); +INSERT INTO `sys_log` VALUES (3713, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 1280, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-19 19:40:22'); +INSERT INTO `sys_log` VALUES (3714, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 1, 'admin', '������IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: ?????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at jdk.internal.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at jdk.internal.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 20:06:32'); +INSERT INTO `sys_log` VALUES (3715, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 0, 'admin', '������IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: ??????????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at jdk.internal.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at jdk.internal.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 20:06:39'); +INSERT INTO `sys_log` VALUES (3716, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 1, 'admin', '������IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: ?????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at jdk.internal.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at jdk.internal.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 20:06:51'); +INSERT INTO `sys_log` VALUES (3717, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 2, 'admin', '������IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: ??????????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:86)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at jdk.internal.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$1787fe54.login()\n at jdk.internal.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-19 20:06:58'); +INSERT INTO `sys_log` VALUES (3718, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 53, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-19 20:07:09'); +INSERT INTO `sys_log` VALUES (3719, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.1.0.2', 52, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 21:01:16'); +INSERT INTO `sys_log` VALUES (3720, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.1.0.2', 59, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 21:20:25'); +INSERT INTO `sys_log` VALUES (3721, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.1.0.2', 53, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 21:28:24'); +INSERT INTO `sys_log` VALUES (3722, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.1.0.2', 54, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 22:02:32'); +INSERT INTO `sys_log` VALUES (3723, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.1.0.2', 225, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-19 22:32:24'); +INSERT INTO `sys_log` VALUES (3724, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 2562, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 09:35:26'); +INSERT INTO `sys_log` VALUES (3725, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '192.168.102.135', 407, 'admin', '������IP', 'Chrome 128', NULL, '2024-09-20 09:46:45'); +INSERT INTO `sys_log` VALUES (3726, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 62, 'admin', '������IP', 'MSEdge 128', NULL, '2024-09-20 10:20:59'); +INSERT INTO `sys_log` VALUES (3727, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 61, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 10:21:46'); +INSERT INTO `sys_log` VALUES (3728, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 736, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:02:53'); +INSERT INTO `sys_log` VALUES (3729, '新增用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.createUser()', '{\"createBy\":\"admin\",\"createTime\":1726801398567,\"dept\":{\"hasChildren\":false,\"id\":7,\"leaf\":true,\"subCount\":0},\"deptId\":7,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":11}],\"nickName\":\"ceshi22\",\"password\":\"$2a$10$xWLnVZzNQJUmxeFW14/Vde.XqCrU0p.iNnQGYLPBcvqaOIdUu1aiq\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801398568,\"username\":\"ceshi2\"}', '10.10.10.79', 798, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:03:19'); +INSERT INTO `sys_log` VALUES (3730, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华南分部\",\"leaf\":true,\"name\":\"华南分部\",\"subCount\":0},\"deptId\":7,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 150, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:04:21'); +INSERT INTO `sys_log` VALUES (3731, '用户登录', 'ERROR', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 3, 'admin', '������IP', 'Chrome 127', 'me.zhengjie.exception.BadRequestException: ?????\n at me.zhengjie.modules.security.rest.AuthorizationController.login(AuthorizationController.java:89)\n at me.zhengjie.modules.security.rest.AuthorizationController$$FastClassBySpringCGLIB$$f65d16c0.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.security.rest.AuthorizationController$$EnhancerBySpringCGLIB$$b7e6f772.login()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\n', '2024-09-20 11:14:17'); +INSERT INTO `sys_log` VALUES (3732, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 95, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:14:21'); +INSERT INTO `sys_log` VALUES (3733, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 127, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:14:26'); +INSERT INTO `sys_log` VALUES (3734, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 92, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:14:37'); +INSERT INTO `sys_log` VALUES (3735, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1725872559000,\"dept\":{\"hasChildren\":false,\"id\":5,\"label\":\"运维部\",\"leaf\":true,\"name\":\"运维部\",\"subCount\":0},\"deptId\":5,\"email\":\"796607890@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":4,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"zhen\",\"phone\":\"18669357895\",\"roles\":[{\"dataScope\":\"本级\",\"id\":2,\"level\":2,\"name\":\"普通用户\"}],\"updateBy\":\"admin\",\"updateTime\":1725872559000,\"username\":\"lizhen\"}', '10.10.10.79', 100, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:15:59'); +INSERT INTO `sys_log` VALUES (3736, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 123, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:17:42'); +INSERT INTO `sys_log` VALUES (3737, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 270, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:29:45'); +INSERT INTO `sys_log` VALUES (3738, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1725872559000,\"dept\":{\"hasChildren\":false,\"id\":5,\"label\":\"运维部\",\"leaf\":true,\"name\":\"运维部\",\"subCount\":0},\"deptId\":5,\"email\":\"796607890@qq.com\",\"enabled\":true,\"gender\":\"男\",\"id\":4,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"zhen\",\"phone\":\"18669357895\",\"roles\":[{\"dataScope\":\"本级\",\"id\":2,\"level\":2,\"name\":\"普通用户\"}],\"updateBy\":\"admin\",\"updateTime\":1725872559000,\"username\":\"lizhen\"}', '10.10.10.79', 383, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:32:03'); +INSERT INTO `sys_log` VALUES (3739, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 281, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:41:37'); +INSERT INTO `sys_log` VALUES (3740, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 255, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:42:31'); +INSERT INTO `sys_log` VALUES (3741, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 108, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:43:26'); +INSERT INTO `sys_log` VALUES (3742, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 131, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:46:49'); +INSERT INTO `sys_log` VALUES (3743, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"ceshi22\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 112, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:47:51'); +INSERT INTO `sys_log` VALUES (3744, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 72, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:48:10'); +INSERT INTO `sys_log` VALUES (3745, '新增角色', 'INFO', 'me.zhengjie.modules.system.rest.RoleController.createRole()', '{\"createBy\":\"admin\",\"createTime\":1726804616583,\"dataScope\":\"全部\",\"depts\":[],\"id\":4,\"level\":3,\"name\":\"测试\",\"updateBy\":\"admin\",\"updateTime\":1726804616584}', '10.10.10.79', 286, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:56:57'); +INSERT INTO `sys_log` VALUES (3746, '修改角色', 'INFO', 'me.zhengjie.modules.system.rest.RoleController.updateRole()', '{\"createBy\":\"admin\",\"createTime\":1726804617000,\"dataScope\":\"自定义\",\"depts\":[{\"hasChildren\":false,\"id\":6,\"leaf\":true,\"subCount\":0}],\"id\":4,\"level\":3,\"name\":\"测试\",\"updateBy\":\"admin\",\"updateTime\":1726804617000}', '10.10.10.79', 376, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:57:09'); +INSERT INTO `sys_log` VALUES (3747, '修改角色菜单', 'INFO', 'me.zhengjie.modules.system.rest.RoleController.updateRoleMenu()', '{\"dataScope\":\"本级\",\"id\":4,\"level\":3,\"menus\":[{\"hasChildren\":false,\"id\":35,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":37,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":39,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":41,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":44,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":45,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":46,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":48,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":49,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":50,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":52,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":53,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":117,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":54,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":118,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":119,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":56,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":57,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":121,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":58,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":122,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":123,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":60,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":124,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":61,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":125,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":62,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":126,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":127,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":64,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":1,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":65,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":2,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":66,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":3,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":5,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":6,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":7,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":73,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":9,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":74,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":75,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":80,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":28,\"leaf\":true,\"menuSort\":999,\"subCount\":0},{\"hasChildren\":false,\"id\":32,\"leaf\":true,\"menuSort\":999,\"subCount\":0}]}', '10.10.10.79', 216, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 11:57:20'); +INSERT INTO `sys_log` VALUES (3748, '修改用户', 'ERROR', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"status\":true,\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 213, 'admin', '������IP', 'Chrome 127', 'org.springframework.jdbc.BadSqlGrammarException: \n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n### The error may exist in me/zhengjie/modules/system/mapper/UserMapper.java (best guess)\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: SELECT user_id AS id,dept_id,status,username,nick_name,email,phone,gender,avatar_name,avatar_path,password,enabled,is_admin,pwd_reset_time,create_by,update_by,create_time,update_time FROM sys_user WHERE user_id=?\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\n at com.sun.proxy.$Proxy119.selectById(Unknown Source)\n at com.baomidou.mybatisplus.extension.service.IService.getById(IService.java:292)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.update(UserServiceImpl.java:108)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$5e2b1d47.update()\n at me.zhengjie.modules.system.rest.UserController.updateUser(UserController.java:122)\n at me.zhengjie.modules.system.rest.UserController$$FastClassBySpringCGLIB$$2bb70b4b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.rest.UserController$$EnhancerBySpringCGLIB$$5bda5bdb.updateUser()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:920)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:684)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\n at jdk.internal.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\n at com.sun.proxy.$Proxy231.execute(Unknown Source)\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\n at jdk.internal.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\n at com.sun.proxy.$Proxy229.query(Unknown Source)\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\n at com.sun.proxy.$Proxy228.query(Unknown Source)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\n at jdk.internal.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\n ... 137 more\n', '2024-09-20 11:57:57'); +INSERT INTO `sys_log` VALUES (3749, '修改用户', 'ERROR', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"status\":true,\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 68, 'admin', '������IP', 'Chrome 127', 'org.springframework.jdbc.BadSqlGrammarException: \n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n### The error may exist in me/zhengjie/modules/system/mapper/UserMapper.java (best guess)\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: SELECT user_id AS id,dept_id,status,username,nick_name,email,phone,gender,avatar_name,avatar_path,password,enabled,is_admin,pwd_reset_time,create_by,update_by,create_time,update_time FROM sys_user WHERE user_id=?\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\n at com.sun.proxy.$Proxy119.selectById(Unknown Source)\n at com.baomidou.mybatisplus.extension.service.IService.getById(IService.java:292)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.update(UserServiceImpl.java:108)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$5e2b1d47.update()\n at me.zhengjie.modules.system.rest.UserController.updateUser(UserController.java:122)\n at me.zhengjie.modules.system.rest.UserController$$FastClassBySpringCGLIB$$2bb70b4b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.rest.UserController$$EnhancerBySpringCGLIB$$5bda5bdb.updateUser()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:920)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:684)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\n at jdk.internal.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\n at com.sun.proxy.$Proxy231.execute(Unknown Source)\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\n at jdk.internal.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\n at com.sun.proxy.$Proxy229.query(Unknown Source)\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\n at com.sun.proxy.$Proxy228.query(Unknown Source)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\n at jdk.internal.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\n ... 137 more\n', '2024-09-20 11:58:55'); +INSERT INTO `sys_log` VALUES (3750, '修改用户', 'ERROR', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"status\":true,\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 8, 'admin', '������IP', 'Chrome 127', 'org.springframework.jdbc.BadSqlGrammarException: \n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n### The error may exist in me/zhengjie/modules/system/mapper/UserMapper.java (best guess)\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: SELECT user_id AS id,dept_id,status,username,nick_name,email,phone,gender,avatar_name,avatar_path,password,enabled,is_admin,pwd_reset_time,create_by,update_by,create_time,update_time FROM sys_user WHERE user_id=?\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\n at com.sun.proxy.$Proxy119.selectById(Unknown Source)\n at com.baomidou.mybatisplus.extension.service.IService.getById(IService.java:292)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.update(UserServiceImpl.java:108)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$5e2b1d47.update()\n at me.zhengjie.modules.system.rest.UserController.updateUser(UserController.java:122)\n at me.zhengjie.modules.system.rest.UserController$$FastClassBySpringCGLIB$$2bb70b4b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.rest.UserController$$EnhancerBySpringCGLIB$$5bda5bdb.updateUser()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:920)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:684)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\n at jdk.internal.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\n at com.sun.proxy.$Proxy231.execute(Unknown Source)\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\n at jdk.internal.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\n at com.sun.proxy.$Proxy229.query(Unknown Source)\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\n at com.sun.proxy.$Proxy228.query(Unknown Source)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\n at jdk.internal.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\n ... 137 more\n', '2024-09-20 12:03:50'); +INSERT INTO `sys_log` VALUES (3751, '修改用户', 'ERROR', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"status\":true,\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 11, 'admin', '������IP', 'Chrome 127', 'org.springframework.jdbc.BadSqlGrammarException: \n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n### The error may exist in me/zhengjie/modules/system/mapper/UserMapper.java (best guess)\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: SELECT user_id AS id,dept_id,status,username,nick_name,email,phone,gender,avatar_name,avatar_path,password,enabled,is_admin,pwd_reset_time,create_by,update_by,create_time,update_time FROM sys_user WHERE user_id=?\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\n at com.sun.proxy.$Proxy119.selectById(Unknown Source)\n at com.baomidou.mybatisplus.extension.service.IService.getById(IService.java:292)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.update(UserServiceImpl.java:108)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$5e2b1d47.update()\n at me.zhengjie.modules.system.rest.UserController.updateUser(UserController.java:122)\n at me.zhengjie.modules.system.rest.UserController$$FastClassBySpringCGLIB$$2bb70b4b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.rest.UserController$$EnhancerBySpringCGLIB$$5bda5bdb.updateUser()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:920)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:684)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\n at jdk.internal.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\n at com.sun.proxy.$Proxy231.execute(Unknown Source)\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\n at jdk.internal.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\n at com.sun.proxy.$Proxy229.query(Unknown Source)\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\n at com.sun.proxy.$Proxy228.query(Unknown Source)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\n at jdk.internal.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\n ... 137 more\n', '2024-09-20 12:05:45'); +INSERT INTO `sys_log` VALUES (3752, '修改用户', 'ERROR', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8,\"name\":\"人事专员\"}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"全部\",\"id\":1,\"level\":1,\"name\":\"超级管理员\"}],\"status\":true,\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 37, 'admin', '������IP', 'Chrome 127', 'org.springframework.jdbc.BadSqlGrammarException: \n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n### The error may exist in me/zhengjie/modules/system/mapper/UserMapper.java (best guess)\n### The error may involve defaultParameterMap\n### The error occurred while setting parameters\n### SQL: SELECT user_id AS id,dept_id,status,username,nick_name,email,phone,gender,avatar_name,avatar_path,password,enabled,is_admin,pwd_reset_time,create_by,update_by,create_time,update_time FROM sys_user WHERE user_id=?\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)\n at com.sun.proxy.$Proxy119.selectById(Unknown Source)\n at com.baomidou.mybatisplus.extension.service.IService.getById(IService.java:292)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl.update(UserServiceImpl.java:108)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$FastClassBySpringCGLIB$$501bea8b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$5e2b1d47.update()\n at me.zhengjie.modules.system.rest.UserController.updateUser(UserController.java:122)\n at me.zhengjie.modules.system.rest.UserController$$FastClassBySpringCGLIB$$2bb70b4b.invoke()\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:64)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n at me.zhengjie.aspect.LogAspect.logAround(LogAspect.java:68)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)\n at me.zhengjie.modules.system.rest.UserController$$EnhancerBySpringCGLIB$$5bda5bdb.updateUser()\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:920)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:684)\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at me.zhengjie.modules.security.security.TokenFilter.doFilter(TokenFilter.java:90)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)\n at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769)\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n at java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'status\' in \'field list\'\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:371)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3461)\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3459)\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)\n at jdk.internal.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)\n at com.sun.proxy.$Proxy231.execute(Unknown Source)\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\n at jdk.internal.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)\n at com.sun.proxy.$Proxy229.query(Unknown Source)\n at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\n at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)\n at com.sun.proxy.$Proxy228.query(Unknown Source)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\n at jdk.internal.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)\n ... 137 more\n', '2024-09-20 12:07:12'); +INSERT INTO `sys_log` VALUES (3753, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 323, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 12:08:35'); +INSERT INTO `sys_log` VALUES (3754, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"ces\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 264, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 12:08:50'); +INSERT INTO `sys_log` VALUES (3755, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"ce12\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 349, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 12:20:27'); +INSERT INTO `sys_log` VALUES (3756, '修改用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.updateUser()', '{\"createBy\":\"admin\",\"createTime\":1726801399000,\"dept\":{\"hasChildren\":false,\"id\":8,\"label\":\"华北分部\",\"leaf\":true,\"name\":\"华北分部\",\"subCount\":0},\"deptId\":8,\"enabled\":true,\"gender\":\"男\",\"id\":5,\"isAdmin\":false,\"jobs\":[{\"id\":8}],\"nickName\":\"562277\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726801399000,\"username\":\"ceshi2\"}', '10.10.10.79', 154, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 12:55:06'); +INSERT INTO `sys_log` VALUES (3757, '删除用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.deleteUser()', '[5]', '10.10.10.79', 170, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 12:55:16'); +INSERT INTO `sys_log` VALUES (3758, '删除角色', 'INFO', 'me.zhengjie.modules.system.rest.RoleController.deleteRole()', '[4]', '10.10.10.79', 379, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 12:55:28'); +INSERT INTO `sys_log` VALUES (3759, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 739, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 13:34:50'); +INSERT INTO `sys_log` VALUES (3760, '新增用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.createUser()', '{\"createBy\":\"admin\",\"createTime\":1726810568788,\"dept\":{\"hasChildren\":false,\"id\":7,\"leaf\":true,\"subCount\":0},\"deptId\":7,\"enabled\":false,\"gender\":\"男\",\"id\":6,\"isAdmin\":false,\"jobs\":[{\"id\":11}],\"nickName\":\"测试1\",\"password\":\"$2a$10$XQL0AsbmbdGNpXPJsR.MPO4vM2ml21pTAU8qZ5XRxqhtnY245AejW\",\"roles\":[{\"dataScope\":\"本级\",\"id\":1,\"level\":3}],\"updateBy\":\"admin\",\"updateTime\":1726810568788,\"username\":\"ceshi111\"}', '10.10.10.79', 369, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 13:36:09'); +INSERT INTO `sys_log` VALUES (3761, '删除用户', 'INFO', 'me.zhengjie.modules.system.rest.UserController.deleteUser()', '[6]', '10.10.10.79', 223, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 13:36:16'); +INSERT INTO `sys_log` VALUES (3762, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 2992, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 17:06:19'); +INSERT INTO `sys_log` VALUES (3763, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 670, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 17:29:13'); +INSERT INTO `sys_log` VALUES (3764, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 394, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 17:44:19'); +INSERT INTO `sys_log` VALUES (3765, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 2299, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 18:48:11'); +INSERT INTO `sys_log` VALUES (3766, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 57, 'admin', '������IP', 'Chrome 127', NULL, '2024-09-20 18:51:15'); +INSERT INTO `sys_log` VALUES (3767, '用户登录', 'INFO', 'me.zhengjie.modules.security.rest.AuthorizationController.login()', '{\"username\":\"admin\"}', '10.10.10.79', 55, 'admin', '������IP', 'MSEdge 129', NULL, '2024-09-20 19:07:05'); + +-- ---------------------------- +-- Table structure for sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( + `menu_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `pid` bigint NULL DEFAULT NULL COMMENT '上级菜单ID', + `sub_count` int NULL DEFAULT 0 COMMENT '子菜单数目', + `type` int NULL DEFAULT NULL COMMENT '菜单类型', + `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单标题', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '组件名称', + `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '组件', + `menu_sort` int NULL DEFAULT NULL COMMENT '排序', + `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '图标', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '链接地址', + `i_frame` bit(1) NULL DEFAULT NULL COMMENT '是否外链', + `cache` bit(1) NULL DEFAULT b'0' COMMENT '缓存', + `hidden` bit(1) NULL DEFAULT b'0' COMMENT '隐藏', + `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '权限', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`menu_id`) USING BTREE, + UNIQUE INDEX `uniq_title`(`title` ASC) USING BTREE, + UNIQUE INDEX `uniq_name`(`name` ASC) USING BTREE, + INDEX `inx_pid`(`pid` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统菜单' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_menu +-- ---------------------------- +INSERT INTO `sys_menu` VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:11:29', NULL); +INSERT INTO `sys_menu` VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL); +INSERT INTO `sys_menu` VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL); +INSERT INTO `sys_menu` VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL); +INSERT INTO `sys_menu` VALUES (6, NULL, 5, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL); +INSERT INTO `sys_menu` VALUES (7, 6, 0, 1, '操作日志', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57'); +INSERT INTO `sys_menu` VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL); +INSERT INTO `sys_menu` VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'1', 'timing:list', NULL, 'admin', '2019-01-07 20:34:40', '2024-09-15 20:35:52'); +INSERT INTO `sys_menu` VALUES (32, 6, 0, 1, '异常日志', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL); +INSERT INTO `sys_menu` VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'1', 'dept:list', NULL, 'admin', '2019-03-25 09:46:00', '2024-09-15 20:34:58'); +INSERT INTO `sys_menu` VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'1', 'job:list', NULL, 'admin', '2019-03-29 13:51:18', '2024-09-15 20:35:16'); +INSERT INTO `sys_menu` VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'1', 'dict:list', NULL, 'admin', '2019-04-10 11:49:04', '2024-09-15 20:36:21'); +INSERT INTO `sys_menu` VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL); +INSERT INTO `sys_menu` VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL); +INSERT INTO `sys_menu` VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL); +INSERT INTO `sys_menu` VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL); +INSERT INTO `sys_menu` VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL); +INSERT INTO `sys_menu` VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL); +INSERT INTO `sys_menu` VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL); +INSERT INTO `sys_menu` VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL); +INSERT INTO `sys_menu` VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL); +INSERT INTO `sys_menu` VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL); +INSERT INTO `sys_menu` VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL); +INSERT INTO `sys_menu` VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL); +INSERT INTO `sys_menu` VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL); +INSERT INTO `sys_menu` VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL); +INSERT INTO `sys_menu` VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL); +INSERT INTO `sys_menu` VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL); +INSERT INTO `sys_menu` VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL); +INSERT INTO `sys_menu` VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL); +INSERT INTO `sys_menu` VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL); +INSERT INTO `sys_menu` VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL); +INSERT INTO `sys_menu` VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL); +INSERT INTO `sys_menu` VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL); +INSERT INTO `sys_menu` VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL); +INSERT INTO `sys_menu` VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL); +INSERT INTO `sys_menu` VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL); +INSERT INTO `sys_menu` VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50'); +INSERT INTO `sys_menu` VALUES (82, 36, 0, 1, '生成配置', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL); +INSERT INTO `sys_menu` VALUES (102, 97, 0, 2, '删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deployHistory:del', NULL, NULL, '2019-11-17 09:32:48', NULL); +INSERT INTO `sys_menu` VALUES (103, 92, 0, 2, '服务器新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:add', NULL, NULL, '2019-11-17 11:08:33', NULL); +INSERT INTO `sys_menu` VALUES (104, 92, 0, 2, '服务器编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:edit', NULL, NULL, '2019-11-17 11:08:57', NULL); +INSERT INTO `sys_menu` VALUES (105, 92, 0, 2, '服务器删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:del', NULL, NULL, '2019-11-17 11:09:15', NULL); +INSERT INTO `sys_menu` VALUES (106, 93, 0, 2, '应用新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:add', NULL, NULL, '2019-11-17 11:10:03', NULL); +INSERT INTO `sys_menu` VALUES (107, 93, 0, 2, '应用编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:edit', NULL, NULL, '2019-11-17 11:10:28', NULL); +INSERT INTO `sys_menu` VALUES (108, 93, 0, 2, '应用删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:del', NULL, NULL, '2019-11-17 11:10:55', NULL); +INSERT INTO `sys_menu` VALUES (109, 94, 0, 2, '部署新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:add', NULL, NULL, '2019-11-17 11:11:22', NULL); +INSERT INTO `sys_menu` VALUES (110, 94, 0, 2, '部署编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:edit', NULL, NULL, '2019-11-17 11:11:41', NULL); +INSERT INTO `sys_menu` VALUES (111, 94, 0, 2, '部署删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:del', NULL, NULL, '2019-11-17 11:12:01', NULL); +INSERT INTO `sys_menu` VALUES (112, 98, 0, 2, '数据库新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:add', NULL, NULL, '2019-11-17 11:12:43', NULL); +INSERT INTO `sys_menu` VALUES (113, 98, 0, 2, '数据库编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:edit', NULL, NULL, '2019-11-17 11:12:58', NULL); +INSERT INTO `sys_menu` VALUES (114, 98, 0, 2, '数据库删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:del', NULL, NULL, '2019-11-17 11:13:14', NULL); +INSERT INTO `sys_menu` VALUES (116, 36, 0, 1, '生成预览', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL); +INSERT INTO `sys_menu` VALUES (117, NULL, 3, 1, '会员列表', 'Member', 'member/index', 6, 'member', 'member', b'0', b'0', b'0', 'member:list', NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (118, NULL, 5, 1, '会员资产', 'MemberAccount', '', 7, 'memberAccount', 'memberAccount', b'0', b'0', b'0', 'member:account', NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (119, NULL, 3, 1, '团队列表', 'Team', 'team/index', 8, 'team', 'team', b'0', b'0', b'0', 'team:list', NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (121, 118, 0, 1, '资产列表', 'MemberAccountList', 'memberAccount/memberAccountList/index', 27, 'memberAccountList', 'memberAccount/memberAccountList', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (122, 118, 0, 1, 'AST余额明细', 'astAccount', 'memberAccount/astAccount/index', 28, 'astAccount', 'memberAccount/astAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (123, 118, 0, 1, 'usdt明细', 'usdtAccount', 'memberAccount/usdtAccount/index', 29, 'usdtaccount', 'memberAccount/usdtAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (124, 118, 0, 1, '注册空投明细', 'registerAccount', 'memberAccount/registerAccount/index', 30, 'registerAccount', 'memberAccount/registerAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (125, 118, 0, 1, '邀请注册空投明细', '\ninvitationAccount', 'memberAccount/invitationAccount', 31, 'invitationAccount', 'memberAccount/invitationAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (126, 118, 0, 1, '质押明细', 'pledgeAccount', 'memberAccount/pledgeAccount', 32, 'pledgeAccount', 'memberAccount/pledgeAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (127, 118, 0, 1, '质押奖励明细', 'pledgeReward', 'memberAccount/pledgeReward', 33, 'pledgeReward', 'memberAccount/pledgeReward', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for sys_quartz_job +-- ---------------------------- +DROP TABLE IF EXISTS `sys_quartz_job`; +CREATE TABLE `sys_quartz_job` ( + `job_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bean_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'Spring Bean名称', + `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'cron 表达式', + `is_pause` bit(1) NULL DEFAULT NULL COMMENT '状态:1暂停、0启用', + `job_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '任务名称', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '方法名称', + `params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注', + `person_in_charge` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '负责人', + `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '报警邮箱', + `sub_task` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '子任务ID', + `pause_after_failure` bit(1) NULL DEFAULT NULL COMMENT '任务失败后是否暂停', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`job_id`) USING BTREE, + INDEX `inx_is_pause`(`is_pause` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '定时任务' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_quartz_job +-- ---------------------------- +INSERT INTO `sys_quartz_job` VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33'); +INSERT INTO `sys_quartz_job` VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '5,6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12'); +INSERT INTO `sys_quartz_job` VALUES (5, 'Test', '0/5 * * * * ?', b'1', '任务告警测试', 'run', NULL, '测试', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13'); +INSERT INTO `sys_quartz_job` VALUES (6, 'testTask', '0/5 * * * * ?', b'1', '测试3', 'run2', NULL, '测试3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07'); + +-- ---------------------------- +-- Table structure for sys_quartz_log +-- ---------------------------- +DROP TABLE IF EXISTS `sys_quartz_log`; +CREATE TABLE `sys_quartz_log` ( + `log_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bean_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `create_time` datetime NULL DEFAULT NULL, + `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `exception_detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `is_success` bit(1) NULL DEFAULT NULL, + `job_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `time` bigint NULL DEFAULT NULL, + PRIMARY KEY (`log_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '定时任务日志' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_quartz_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_role` ( + `role_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '名称', + `level` int NULL DEFAULT NULL COMMENT '角色级别', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '描述', + `data_scope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据权限', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`role_id`) USING BTREE, + UNIQUE INDEX `uniq_name`(`name` ASC) USING BTREE, + INDEX `role_name_index`(`name` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_role +-- ---------------------------- +INSERT INTO `sys_role` VALUES (1, '超级管理员', 1, '-', '全部', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24'); +INSERT INTO `sys_role` VALUES (2, '普通用户', 2, '-', '本级', NULL, 'admin', '2018-11-23 13:09:06', '2024-09-09 17:03:36'); +INSERT INTO `sys_role` VALUES (3, '管理员', 1, NULL, '自定义', 'admin', 'admin', '2024-09-08 20:05:41', '2024-09-08 20:11:12'); + +-- ---------------------------- +-- Table structure for sys_roles_depts +-- ---------------------------- +DROP TABLE IF EXISTS `sys_roles_depts`; +CREATE TABLE `sys_roles_depts` ( + `role_id` bigint NOT NULL, + `dept_id` bigint NOT NULL, + PRIMARY KEY (`role_id`, `dept_id`) USING BTREE, + INDEX `FK7qg6itn5ajdoa9h9o78v9ksur`(`dept_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色部门关联' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_roles_depts +-- ---------------------------- +INSERT INTO `sys_roles_depts` VALUES (3, 2); +INSERT INTO `sys_roles_depts` VALUES (3, 5); +INSERT INTO `sys_roles_depts` VALUES (3, 6); +INSERT INTO `sys_roles_depts` VALUES (3, 7); + +-- ---------------------------- +-- Table structure for sys_roles_menus +-- ---------------------------- +DROP TABLE IF EXISTS `sys_roles_menus`; +CREATE TABLE `sys_roles_menus` ( + `menu_id` bigint NOT NULL COMMENT '菜单ID', + `role_id` bigint NOT NULL COMMENT '角色ID', + PRIMARY KEY (`menu_id`, `role_id`) USING BTREE, + INDEX `FKcngg2qadojhi3a651a5adkvbq`(`role_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色菜单关联' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_roles_menus +-- ---------------------------- +INSERT INTO `sys_roles_menus` VALUES (1, 1); +INSERT INTO `sys_roles_menus` VALUES (2, 1); +INSERT INTO `sys_roles_menus` VALUES (3, 1); +INSERT INTO `sys_roles_menus` VALUES (5, 1); +INSERT INTO `sys_roles_menus` VALUES (6, 1); +INSERT INTO `sys_roles_menus` VALUES (7, 1); +INSERT INTO `sys_roles_menus` VALUES (9, 1); +INSERT INTO `sys_roles_menus` VALUES (28, 1); +INSERT INTO `sys_roles_menus` VALUES (32, 1); +INSERT INTO `sys_roles_menus` VALUES (35, 1); +INSERT INTO `sys_roles_menus` VALUES (37, 1); +INSERT INTO `sys_roles_menus` VALUES (39, 1); +INSERT INTO `sys_roles_menus` VALUES (41, 1); +INSERT INTO `sys_roles_menus` VALUES (44, 1); +INSERT INTO `sys_roles_menus` VALUES (45, 1); +INSERT INTO `sys_roles_menus` VALUES (46, 1); +INSERT INTO `sys_roles_menus` VALUES (48, 1); +INSERT INTO `sys_roles_menus` VALUES (49, 1); +INSERT INTO `sys_roles_menus` VALUES (50, 1); +INSERT INTO `sys_roles_menus` VALUES (52, 1); +INSERT INTO `sys_roles_menus` VALUES (53, 1); +INSERT INTO `sys_roles_menus` VALUES (54, 1); +INSERT INTO `sys_roles_menus` VALUES (56, 1); +INSERT INTO `sys_roles_menus` VALUES (57, 1); +INSERT INTO `sys_roles_menus` VALUES (58, 1); +INSERT INTO `sys_roles_menus` VALUES (60, 1); +INSERT INTO `sys_roles_menus` VALUES (61, 1); +INSERT INTO `sys_roles_menus` VALUES (62, 1); +INSERT INTO `sys_roles_menus` VALUES (64, 1); +INSERT INTO `sys_roles_menus` VALUES (65, 1); +INSERT INTO `sys_roles_menus` VALUES (66, 1); +INSERT INTO `sys_roles_menus` VALUES (73, 1); +INSERT INTO `sys_roles_menus` VALUES (74, 1); +INSERT INTO `sys_roles_menus` VALUES (75, 1); +INSERT INTO `sys_roles_menus` VALUES (77, 1); +INSERT INTO `sys_roles_menus` VALUES (78, 1); +INSERT INTO `sys_roles_menus` VALUES (79, 1); +INSERT INTO `sys_roles_menus` VALUES (80, 1); +INSERT INTO `sys_roles_menus` VALUES (82, 1); +INSERT INTO `sys_roles_menus` VALUES (102, 1); +INSERT INTO `sys_roles_menus` VALUES (103, 1); +INSERT INTO `sys_roles_menus` VALUES (104, 1); +INSERT INTO `sys_roles_menus` VALUES (105, 1); +INSERT INTO `sys_roles_menus` VALUES (106, 1); +INSERT INTO `sys_roles_menus` VALUES (107, 1); +INSERT INTO `sys_roles_menus` VALUES (108, 1); +INSERT INTO `sys_roles_menus` VALUES (109, 1); +INSERT INTO `sys_roles_menus` VALUES (110, 1); +INSERT INTO `sys_roles_menus` VALUES (111, 1); +INSERT INTO `sys_roles_menus` VALUES (112, 1); +INSERT INTO `sys_roles_menus` VALUES (113, 1); +INSERT INTO `sys_roles_menus` VALUES (114, 1); +INSERT INTO `sys_roles_menus` VALUES (116, 1); +INSERT INTO `sys_roles_menus` VALUES (117, 1); +INSERT INTO `sys_roles_menus` VALUES (118, 1); +INSERT INTO `sys_roles_menus` VALUES (119, 1); +INSERT INTO `sys_roles_menus` VALUES (121, 1); +INSERT INTO `sys_roles_menus` VALUES (122, 1); +INSERT INTO `sys_roles_menus` VALUES (123, 1); +INSERT INTO `sys_roles_menus` VALUES (124, 1); +INSERT INTO `sys_roles_menus` VALUES (125, 1); +INSERT INTO `sys_roles_menus` VALUES (126, 1); +INSERT INTO `sys_roles_menus` VALUES (127, 1); +INSERT INTO `sys_roles_menus` VALUES (1, 2); +INSERT INTO `sys_roles_menus` VALUES (2, 2); +INSERT INTO `sys_roles_menus` VALUES (3, 2); +INSERT INTO `sys_roles_menus` VALUES (6, 2); +INSERT INTO `sys_roles_menus` VALUES (7, 2); +INSERT INTO `sys_roles_menus` VALUES (9, 2); +INSERT INTO `sys_roles_menus` VALUES (10, 2); +INSERT INTO `sys_roles_menus` VALUES (11, 2); +INSERT INTO `sys_roles_menus` VALUES (14, 2); +INSERT INTO `sys_roles_menus` VALUES (15, 2); +INSERT INTO `sys_roles_menus` VALUES (19, 2); +INSERT INTO `sys_roles_menus` VALUES (27, 2); +INSERT INTO `sys_roles_menus` VALUES (30, 2); +INSERT INTO `sys_roles_menus` VALUES (32, 2); +INSERT INTO `sys_roles_menus` VALUES (33, 2); +INSERT INTO `sys_roles_menus` VALUES (34, 2); +INSERT INTO `sys_roles_menus` VALUES (36, 2); +INSERT INTO `sys_roles_menus` VALUES (48, 2); +INSERT INTO `sys_roles_menus` VALUES (49, 2); +INSERT INTO `sys_roles_menus` VALUES (50, 2); +INSERT INTO `sys_roles_menus` VALUES (80, 2); +INSERT INTO `sys_roles_menus` VALUES (82, 2); +INSERT INTO `sys_roles_menus` VALUES (83, 2); +INSERT INTO `sys_roles_menus` VALUES (116, 2); +INSERT INTO `sys_roles_menus` VALUES (1, 3); +INSERT INTO `sys_roles_menus` VALUES (2, 3); +INSERT INTO `sys_roles_menus` VALUES (6, 3); +INSERT INTO `sys_roles_menus` VALUES (7, 3); +INSERT INTO `sys_roles_menus` VALUES (9, 3); +INSERT INTO `sys_roles_menus` VALUES (10, 3); +INSERT INTO `sys_roles_menus` VALUES (11, 3); +INSERT INTO `sys_roles_menus` VALUES (15, 3); +INSERT INTO `sys_roles_menus` VALUES (21, 3); +INSERT INTO `sys_roles_menus` VALUES (22, 3); +INSERT INTO `sys_roles_menus` VALUES (23, 3); +INSERT INTO `sys_roles_menus` VALUES (24, 3); +INSERT INTO `sys_roles_menus` VALUES (27, 3); +INSERT INTO `sys_roles_menus` VALUES (32, 3); +INSERT INTO `sys_roles_menus` VALUES (33, 3); +INSERT INTO `sys_roles_menus` VALUES (34, 3); +INSERT INTO `sys_roles_menus` VALUES (37, 3); +INSERT INTO `sys_roles_menus` VALUES (41, 3); +INSERT INTO `sys_roles_menus` VALUES (44, 3); +INSERT INTO `sys_roles_menus` VALUES (46, 3); +INSERT INTO `sys_roles_menus` VALUES (60, 3); +INSERT INTO `sys_roles_menus` VALUES (61, 3); +INSERT INTO `sys_roles_menus` VALUES (62, 3); +INSERT INTO `sys_roles_menus` VALUES (80, 3); +INSERT INTO `sys_roles_menus` VALUES (83, 3); +INSERT INTO `sys_roles_menus` VALUES (90, 3); +INSERT INTO `sys_roles_menus` VALUES (92, 3); +INSERT INTO `sys_roles_menus` VALUES (93, 3); +INSERT INTO `sys_roles_menus` VALUES (94, 3); +INSERT INTO `sys_roles_menus` VALUES (97, 3); +INSERT INTO `sys_roles_menus` VALUES (98, 3); +INSERT INTO `sys_roles_menus` VALUES (102, 3); +INSERT INTO `sys_roles_menus` VALUES (103, 3); +INSERT INTO `sys_roles_menus` VALUES (104, 3); +INSERT INTO `sys_roles_menus` VALUES (105, 3); +INSERT INTO `sys_roles_menus` VALUES (106, 3); +INSERT INTO `sys_roles_menus` VALUES (107, 3); +INSERT INTO `sys_roles_menus` VALUES (108, 3); +INSERT INTO `sys_roles_menus` VALUES (109, 3); +INSERT INTO `sys_roles_menus` VALUES (110, 3); +INSERT INTO `sys_roles_menus` VALUES (111, 3); +INSERT INTO `sys_roles_menus` VALUES (112, 3); +INSERT INTO `sys_roles_menus` VALUES (113, 3); +INSERT INTO `sys_roles_menus` VALUES (114, 3); + +-- ---------------------------- +-- Table structure for sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `dept_id` bigint NULL DEFAULT NULL COMMENT '部门名称', + `username` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户名', + `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '昵称', + `gender` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '性别', + `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '手机号码', + `email` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '邮箱', + `avatar_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '头像地址', + `avatar_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '头像真实路径', + `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码', + `is_admin` bit(1) NULL DEFAULT b'0' COMMENT '是否为admin账号', + `enabled` bit(1) NULL DEFAULT NULL COMMENT '状态:1启用、0禁用', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `pwd_reset_time` datetime NULL DEFAULT NULL COMMENT '修改密码的时间', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`user_id`) USING BTREE, + UNIQUE INDEX `UK_kpubos9gc2cvtkb0thktkbkes`(`email` ASC) USING BTREE, + UNIQUE INDEX `username`(`username` ASC) USING BTREE, + UNIQUE INDEX `uniq_username`(`username` ASC) USING BTREE, + UNIQUE INDEX `uniq_email`(`email` ASC) USING BTREE, + INDEX `FK5rwmryny6jthaaxkogownknqp`(`dept_id` ASC) USING BTREE, + INDEX `inx_enabled`(`enabled` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统用户' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_user +-- ---------------------------- +INSERT INTO `sys_user` VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '201507802@qq.com', 'avatar-20200806032259161.png', '/Users/jie/Documents/work/me/admin/eladmin/~/avatar/avatar-20200806032259161.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31'); +INSERT INTO `sys_user` VALUES (2, 2, 'test', '测试', '男', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'0', b'1', 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2024-09-06 17:42:50'); +INSERT INTO `sys_user` VALUES (3, 17, 'mei', 'msh', '男', '18269745893', '792607890@qq.com', NULL, NULL, '$2a$10$rbDSh6KNCVpayv9e6k9F0OVHQqjAKd5G9dkyJHqB1JxHRsobJwbAG', b'0', b'1', 'admin', 'admin', NULL, '2024-09-08 20:08:08', '2024-09-08 20:08:08'); +INSERT INTO `sys_user` VALUES (4, 5, 'lizhen', 'zhen', '男', '18669357895', '796607890@qq.com', NULL, NULL, '$2a$10$Pq4ZOqIFp0LZrNOVTC7ez.KV6I46uPkO.Pd5wUpAf/qLtrx5QY3Su', b'0', b'1', 'admin', 'admin', NULL, '2024-09-09 17:02:39', '2024-09-09 17:02:39'); + +-- ---------------------------- +-- Table structure for sys_users_jobs +-- ---------------------------- +DROP TABLE IF EXISTS `sys_users_jobs`; +CREATE TABLE `sys_users_jobs` ( + `user_id` bigint NOT NULL COMMENT '用户ID', + `job_id` bigint NOT NULL COMMENT '岗位ID', + PRIMARY KEY (`user_id`, `job_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_users_jobs +-- ---------------------------- +INSERT INTO `sys_users_jobs` VALUES (1, 11); +INSERT INTO `sys_users_jobs` VALUES (2, 12); +INSERT INTO `sys_users_jobs` VALUES (3, 11); +INSERT INTO `sys_users_jobs` VALUES (4, 8); + +-- ---------------------------- +-- Table structure for sys_users_roles +-- ---------------------------- +DROP TABLE IF EXISTS `sys_users_roles`; +CREATE TABLE `sys_users_roles` ( + `user_id` bigint NOT NULL COMMENT '用户ID', + `role_id` bigint NOT NULL COMMENT '角色ID', + PRIMARY KEY (`user_id`, `role_id`) USING BTREE, + INDEX `FKq4eq273l04bpu4efj0jd0jb98`(`role_id` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户角色关联' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_users_roles +-- ---------------------------- +INSERT INTO `sys_users_roles` VALUES (1, 1); +INSERT INTO `sys_users_roles` VALUES (2, 2); +INSERT INTO `sys_users_roles` VALUES (4, 2); +INSERT INTO `sys_users_roles` VALUES (3, 3); + +-- ---------------------------- +-- Table structure for tool_alipay_config +-- ---------------------------- +DROP TABLE IF EXISTS `tool_alipay_config`; +CREATE TABLE `tool_alipay_config` ( + `config_id` bigint NOT NULL COMMENT 'ID', + `app_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '应用ID', + `charset` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '编码', + `format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '类型 固定格式json', + `gateway_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '网关地址', + `notify_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '异步回调', + `private_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '私钥', + `public_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '公钥', + `return_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '回调地址', + `sign_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '签名方式', + `sys_service_provider_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '商户号', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '支付宝配置类' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tool_alipay_config +-- ---------------------------- +INSERT INTO `tool_alipay_config` VALUES (1, '2016091700532697', 'utf-8', 'JSON', 'https://openapi.alipaydev.com/gateway.do', 'http://api.auauz.net/api/aliPay/notify', 'MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5js8sInU10AJ0cAQ8UMMyXrQ+oHZEkVt5lBwsStmTJ7YikVYgbskx1YYEXTojRsWCb+SH/kDmDU4pK/u91SJ4KFCRMF2411piYuXU/jF96zKrADznYh/zAraqT6hvAIVtQAlMHN53nx16rLzZ/8jDEkaSwT7+HvHiS+7sxSojnu/3oV7BtgISoUNstmSe8WpWHOaWv19xyS+Mce9MY4BfseFhzTICUymUQdd/8hXA28/H6osUfAgsnxAKv7Wil3aJSgaJczWuflYOve0dJ3InZkhw5Cvr0atwpk8YKBQjy5CdkoHqvkOcIB+cYHXJKzOE5tqU7inSwVbHzOLQ3XbnAgMBAAECggEAVJp5eT0Ixg1eYSqFs9568WdetUNCSUchNxDBu6wxAbhUgfRUGZuJnnAll63OCTGGck+EGkFh48JjRcBpGoeoHLL88QXlZZbC/iLrea6gcDIhuvfzzOffe1RcZtDFEj9hlotg8dQj1tS0gy9pN9g4+EBH7zeu+fyv+qb2e/v1l6FkISXUjpkD7RLQr3ykjiiEw9BpeKb7j5s7Kdx1NNIzhkcQKNqlk8JrTGDNInbDM6inZfwwIO2R1DHinwdfKWkvOTODTYa2MoAvVMFT9Bec9FbLpoWp7ogv1JMV9svgrcF9XLzANZ/OQvkbe9TV9GWYvIbxN6qwQioKCWO4GPnCAQKBgQDgW5MgfhX8yjXqoaUy/d1VjI8dHeIyw8d+OBAYwaxRSlCfyQ+tieWcR2HdTzPca0T0GkWcKZm0ei5xRURgxt4DUDLXNh26HG0qObbtLJdu/AuBUuCqgOiLqJ2f1uIbrz6OZUHns+bT/jGW2Ws8+C13zTCZkZt9CaQsrp3QOGDx5wKBgQDTul39hp3ZPwGNFeZdkGoUoViOSd5Lhowd5wYMGAEXWRLlU8z+smT5v0POz9JnIbCRchIY2FAPKRdVTICzmPk2EPJFxYTcwaNbVqL6lN7J2IlXXMiit5QbiLauo55w7plwV6LQmKm9KV7JsZs5XwqF7CEovI7GevFzyD3w+uizAQKBgC3LY1eRhOlpWOIAhpjG6qOoohmeXOphvdmMlfSHq6WYFqbWwmV4rS5d/6LNpNdL6fItXqIGd8I34jzql49taCmi+A2nlR/E559j0mvM20gjGDIYeZUz5MOE8k+K6/IcrhcgofgqZ2ZED1ksHdB/E8DNWCswZl16V1FrfvjeWSNnAoGAMrBplCrIW5xz+J0Hm9rZKrs+AkK5D4fUv8vxbK/KgxZ2KaUYbNm0xv39c+PZUYuFRCz1HDGdaSPDTE6WeWjkMQd5mS6ikl9hhpqFRkyh0d0fdGToO9yLftQKOGE/q3XUEktI1XvXF0xyPwNgUCnq0QkpHyGVZPtGFxwXiDvpvgECgYA5PoB+nY8iDiRaJNko9w0hL4AeKogwf+4TbCw+KWVEn6jhuJa4LFTdSqp89PktQaoVpwv92el/AhYjWOl/jVCm122f9b7GyoelbjMNolToDwe5pF5RnSpEuDdLy9MfE8LnE3PlbE7E5BipQ3UjSebkgNboLHH/lNZA5qvEtvbfvQ==', 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAut9evKRuHJ/2QNfDlLwvN/S8l9hRAgPbb0u61bm4AtzaTGsLeMtScetxTWJnVvAVpMS9luhEJjt+Sbk5TNLArsgzzwARgaTKOLMT1TvWAK5EbHyI+eSrc3s7Awe1VYGwcubRFWDm16eQLv0k7iqiw+4mweHSz/wWyvBJVgwLoQ02btVtAQErCfSJCOmt0Q/oJQjj08YNRV4EKzB19+f5A+HQVAKy72dSybTzAK+3FPtTtNen/+b5wGeat7c32dhYHnGorPkPeXLtsqqUTp1su5fMfd4lElNdZaoCI7osZxWWUo17vBCZnyeXc9fk0qwD9mK6yRAxNbrY72Xx5VqIqwIDAQAB', 'http://api.auauz.net/api/aliPay/return', 'RSA2', '2088102176044281'); + +-- ---------------------------- +-- Table structure for tool_email_config +-- ---------------------------- +DROP TABLE IF EXISTS `tool_email_config`; +CREATE TABLE `tool_email_config` ( + `config_id` bigint NOT NULL COMMENT 'ID', + `from_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '收件人', + `host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '邮件服务器SMTP地址', + `pass` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码', + `port` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '端口', + `user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '发件者用户名', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '邮箱配置' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tool_email_config +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tool_local_storage +-- ---------------------------- +DROP TABLE IF EXISTS `tool_local_storage`; +CREATE TABLE `tool_local_storage` ( + `storage_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件真实的名称', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件名', + `suffix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '后缀', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '路径', + `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '类型', + `size` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '大小', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`storage_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '本地存储' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tool_local_storage +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tool_picture +-- ---------------------------- +DROP TABLE IF EXISTS `tool_picture`; +CREATE TABLE `tool_picture` ( + `picture_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `filename` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '图片名称', + `md5code` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '文件的MD5值', + `size` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '图片大小', + `url` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '图片地址', + `delete_url` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '删除的URL', + `height` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '图片高度', + `width` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '图片宽度', + `username` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '用户名称', + `create_time` datetime NULL DEFAULT NULL COMMENT '上传日期', + PRIMARY KEY (`picture_id`) USING BTREE, + UNIQUE INDEX `uniq_md5_code`(`md5code` ASC) USING BTREE, + INDEX `inx_url`(`url` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = 'Sm.Ms图床' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tool_picture +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tool_qiniu_config +-- ---------------------------- +DROP TABLE IF EXISTS `tool_qiniu_config`; +CREATE TABLE `tool_qiniu_config` ( + `config_id` bigint NOT NULL COMMENT 'ID', + `access_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT 'accessKey', + `bucket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'Bucket 识别符', + `host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '外链域名', + `secret_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT 'secretKey', + `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '空间类型', + `zone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '机房', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '七牛云配置' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tool_qiniu_config +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tool_qiniu_content +-- ---------------------------- +DROP TABLE IF EXISTS `tool_qiniu_content`; +CREATE TABLE `tool_qiniu_content` ( + `content_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bucket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'Bucket 识别符', + `name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件名称', + `size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件大小', + `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件类型:私有或公开', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件url', + `suffix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件后缀', + `update_time` datetime NULL DEFAULT NULL COMMENT '上传或同步的时间', + PRIMARY KEY (`content_id`) USING BTREE, + UNIQUE INDEX `uniq_name`(`name` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '七牛云文件存储' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tool_qiniu_content +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/mnt_app.sql b/sql/mnt_app.sql new file mode 100644 index 0000000..c2be230 --- /dev/null +++ b/sql/mnt_app.sql @@ -0,0 +1,44 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:02:57 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for mnt_app +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_app`; +CREATE TABLE `mnt_app` ( + `app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '应用名称', + `upload_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '上传目录', + `deploy_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部署路径', + `backup_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备份路径', + `port` int(255) NULL DEFAULT NULL COMMENT '应用端口', + `start_script` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '启动脚本', + `deploy_script` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部署脚本', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`app_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '应用管理' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of mnt_app +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/mnt_database.sql b/sql/mnt_database.sql new file mode 100644 index 0000000..134ebca --- /dev/null +++ b/sql/mnt_database.sql @@ -0,0 +1,41 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:05 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for mnt_database +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_database`; +CREATE TABLE `mnt_database` ( + `db_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '名称', + `jdbc_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'jdbc连接', + `user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '账号', + `pwd` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '密码', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`db_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据库管理' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of mnt_database +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/mnt_deploy.sql b/sql/mnt_deploy.sql new file mode 100644 index 0000000..a097880 --- /dev/null +++ b/sql/mnt_deploy.sql @@ -0,0 +1,39 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:11 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for mnt_deploy +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_deploy`; +CREATE TABLE `mnt_deploy` ( + `deploy_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `app_id` bigint(20) NULL DEFAULT NULL COMMENT '应用编号', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL, + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`deploy_id`) USING BTREE, + INDEX `FK6sy157pseoxx4fmcqr1vnvvhy`(`app_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '部署管理' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of mnt_deploy +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/mnt_deploy_history.sql b/sql/mnt_deploy_history.sql new file mode 100644 index 0000000..ae2b7fe --- /dev/null +++ b/sql/mnt_deploy_history.sql @@ -0,0 +1,38 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:19 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for mnt_deploy_history +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_deploy_history`; +CREATE TABLE `mnt_deploy_history` ( + `history_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'ID', + `app_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用名称', + `deploy_date` datetime NOT NULL COMMENT '部署日期', + `deploy_user` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '部署用户', + `ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '服务器IP', + `deploy_id` bigint(20) NULL DEFAULT NULL COMMENT '部署编号', + PRIMARY KEY (`history_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '部署历史管理' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of mnt_deploy_history +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/mnt_deploy_server.sql b/sql/mnt_deploy_server.sql new file mode 100644 index 0000000..83deb29 --- /dev/null +++ b/sql/mnt_deploy_server.sql @@ -0,0 +1,35 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:26 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for mnt_deploy_server +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_deploy_server`; +CREATE TABLE `mnt_deploy_server` ( + `deploy_id` bigint(20) NOT NULL COMMENT '部署ID', + `server_id` bigint(20) NOT NULL COMMENT '服务ID', + PRIMARY KEY (`deploy_id`, `server_id`) USING BTREE, + INDEX `FKeaaha7jew9a02b3bk9ghols53`(`server_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '应用与服务器关联' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of mnt_deploy_server +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/mnt_server.sql b/sql/mnt_server.sql new file mode 100644 index 0000000..0f3338c --- /dev/null +++ b/sql/mnt_server.sql @@ -0,0 +1,43 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:33 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for mnt_server +-- ---------------------------- +DROP TABLE IF EXISTS `mnt_server`; +CREATE TABLE `mnt_server` ( + `server_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '账号', + `ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'IP地址', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '名称', + `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码', + `port` int(11) NULL DEFAULT NULL COMMENT '端口', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`server_id`) USING BTREE, + INDEX `idx_ip`(`ip`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '服务器管理' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of mnt_server +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_dept.sql b/sql/sys_dept.sql new file mode 100644 index 0000000..1203351 --- /dev/null +++ b/sql/sys_dept.sql @@ -0,0 +1,51 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:47 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_dept +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dept`; +CREATE TABLE `sys_dept` ( + `dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `pid` bigint(20) NULL DEFAULT NULL COMMENT '上级部门', + `sub_count` int(5) NULL DEFAULT 0 COMMENT '子部门数目', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '名称', + `dept_sort` int(5) NULL DEFAULT 999 COMMENT '排序', + `enabled` bit(1) NOT NULL COMMENT '状态', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`dept_id`) USING BTREE, + INDEX `inx_pid`(`pid`) USING BTREE, + INDEX `inx_enabled`(`enabled`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '部门' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_dept +-- ---------------------------- +INSERT INTO `sys_dept` VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47'); +INSERT INTO `sys_dept` VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27'); +INSERT INTO `sys_dept` VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21'); +INSERT INTO `sys_dept` VALUES (7, NULL, 2, '华南分部', 0, b'0', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56'); +INSERT INTO `sys_dept` VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00'); +INSERT INTO `sys_dept` VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13'); +INSERT INTO `sys_dept` VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_dict.sql b/sql/sys_dict.sql new file mode 100644 index 0000000..b250af3 --- /dev/null +++ b/sql/sys_dict.sql @@ -0,0 +1,42 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:54 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_dict +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict`; +CREATE TABLE `sys_dict` ( + `dict_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典名称', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '描述', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`dict_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据字典' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_dict +-- ---------------------------- +INSERT INTO `sys_dict` VALUES (1, 'user_status', '用户状态', NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict` VALUES (4, 'dept_status', '部门状态', NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict` VALUES (5, 'job_status', '岗位状态', NULL, NULL, '2019-10-27 20:31:36', NULL); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_dict_detail.sql b/sql/sys_dict_detail.sql new file mode 100644 index 0000000..19a2355 --- /dev/null +++ b/sql/sys_dict_detail.sql @@ -0,0 +1,48 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:03:59 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_dict_detail +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict_detail`; +CREATE TABLE `sys_dict_detail` ( + `detail_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `dict_id` bigint(11) NULL DEFAULT NULL COMMENT '字典id', + `label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典标签', + `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '字典值', + `dict_sort` int(5) NULL DEFAULT NULL COMMENT '排序', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`detail_id`) USING BTREE, + INDEX `FK5tpkputc6d9nboxojdbgnpmyb`(`dict_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据字典详情' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_dict_detail +-- ---------------------------- +INSERT INTO `sys_dict_detail` VALUES (1, 1, '激活', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict_detail` VALUES (2, 1, '禁用', 'false', 2, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` VALUES (3, 4, '启用', 'true', 1, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` VALUES (4, 4, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict_detail` VALUES (5, 5, '启用', 'true', 1, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` VALUES (6, 5, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_job.sql b/sql/sys_job.sql new file mode 100644 index 0000000..748bd80 --- /dev/null +++ b/sql/sys_job.sql @@ -0,0 +1,46 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:06 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_job +-- ---------------------------- +DROP TABLE IF EXISTS `sys_job`; +CREATE TABLE `sys_job` ( + `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '岗位名称', + `enabled` bit(1) NOT NULL COMMENT '岗位状态', + `job_sort` int(5) NULL DEFAULT NULL COMMENT '排序', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`job_id`) USING BTREE, + UNIQUE INDEX `uniq_name`(`name`) USING BTREE, + INDEX `inx_enabled`(`enabled`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '岗位' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_job +-- ---------------------------- +INSERT INTO `sys_job` VALUES (8, '人事专员', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL); +INSERT INTO `sys_job` VALUES (10, '产品经理', b'0', 4, NULL, 'admin', '2019-03-29 14:55:51', '2024-09-12 11:27:30'); +INSERT INTO `sys_job` VALUES (11, '全栈开发', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2024-09-08 20:29:22'); +INSERT INTO `sys_job` VALUES (12, '软件测试', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_menu.sql b/sql/sys_menu.sql new file mode 100644 index 0000000..7de02b9 --- /dev/null +++ b/sql/sys_menu.sql @@ -0,0 +1,116 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:22 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( + `menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `pid` bigint(20) NULL DEFAULT NULL COMMENT '上级菜单ID', + `sub_count` int(5) NULL DEFAULT 0 COMMENT '子菜单数目', + `type` int(11) NULL DEFAULT NULL COMMENT '菜单类型', + `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '菜单标题', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '组件名称', + `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '组件', + `menu_sort` int(5) NULL DEFAULT NULL COMMENT '排序', + `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '图标', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '链接地址', + `i_frame` bit(1) NULL DEFAULT NULL COMMENT '是否外链', + `cache` bit(1) NULL DEFAULT b'0' COMMENT '缓存', + `hidden` bit(1) NULL DEFAULT b'0' COMMENT '隐藏', + `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '权限', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`menu_id`) USING BTREE, + UNIQUE INDEX `uniq_title`(`title`) USING BTREE, + UNIQUE INDEX `uniq_name`(`name`) USING BTREE, + INDEX `inx_pid`(`pid`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统菜单' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_menu +-- ---------------------------- +INSERT INTO `sys_menu` VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:11:29', NULL); +INSERT INTO `sys_menu` VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL); +INSERT INTO `sys_menu` VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL); +INSERT INTO `sys_menu` VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL); +INSERT INTO `sys_menu` VALUES (6, NULL, 5, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL); +INSERT INTO `sys_menu` VALUES (7, 6, 0, 1, '操作日志', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57'); +INSERT INTO `sys_menu` VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL); +INSERT INTO `sys_menu` VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'1', 'timing:list', NULL, 'admin', '2019-01-07 20:34:40', '2024-09-15 20:35:52'); +INSERT INTO `sys_menu` VALUES (32, 6, 0, 1, '异常日志', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL); +INSERT INTO `sys_menu` VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'1', 'dept:list', NULL, 'admin', '2019-03-25 09:46:00', '2024-09-15 20:34:58'); +INSERT INTO `sys_menu` VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'1', 'job:list', NULL, 'admin', '2019-03-29 13:51:18', '2024-09-15 20:35:16'); +INSERT INTO `sys_menu` VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'1', 'dict:list', NULL, 'admin', '2019-04-10 11:49:04', '2024-09-15 20:36:21'); +INSERT INTO `sys_menu` VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL); +INSERT INTO `sys_menu` VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL); +INSERT INTO `sys_menu` VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL); +INSERT INTO `sys_menu` VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL); +INSERT INTO `sys_menu` VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL); +INSERT INTO `sys_menu` VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL); +INSERT INTO `sys_menu` VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL); +INSERT INTO `sys_menu` VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL); +INSERT INTO `sys_menu` VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL); +INSERT INTO `sys_menu` VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL); +INSERT INTO `sys_menu` VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL); +INSERT INTO `sys_menu` VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL); +INSERT INTO `sys_menu` VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL); +INSERT INTO `sys_menu` VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL); +INSERT INTO `sys_menu` VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL); +INSERT INTO `sys_menu` VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL); +INSERT INTO `sys_menu` VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL); +INSERT INTO `sys_menu` VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL); +INSERT INTO `sys_menu` VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL); +INSERT INTO `sys_menu` VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL); +INSERT INTO `sys_menu` VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL); +INSERT INTO `sys_menu` VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL); +INSERT INTO `sys_menu` VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL); +INSERT INTO `sys_menu` VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL); +INSERT INTO `sys_menu` VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL); +INSERT INTO `sys_menu` VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50'); +INSERT INTO `sys_menu` VALUES (82, 36, 0, 1, '生成配置', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL); +INSERT INTO `sys_menu` VALUES (102, 97, 0, 2, '删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deployHistory:del', NULL, NULL, '2019-11-17 09:32:48', NULL); +INSERT INTO `sys_menu` VALUES (103, 92, 0, 2, '服务器新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:add', NULL, NULL, '2019-11-17 11:08:33', NULL); +INSERT INTO `sys_menu` VALUES (104, 92, 0, 2, '服务器编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:edit', NULL, NULL, '2019-11-17 11:08:57', NULL); +INSERT INTO `sys_menu` VALUES (105, 92, 0, 2, '服务器删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:del', NULL, NULL, '2019-11-17 11:09:15', NULL); +INSERT INTO `sys_menu` VALUES (106, 93, 0, 2, '应用新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:add', NULL, NULL, '2019-11-17 11:10:03', NULL); +INSERT INTO `sys_menu` VALUES (107, 93, 0, 2, '应用编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:edit', NULL, NULL, '2019-11-17 11:10:28', NULL); +INSERT INTO `sys_menu` VALUES (108, 93, 0, 2, '应用删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:del', NULL, NULL, '2019-11-17 11:10:55', NULL); +INSERT INTO `sys_menu` VALUES (109, 94, 0, 2, '部署新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:add', NULL, NULL, '2019-11-17 11:11:22', NULL); +INSERT INTO `sys_menu` VALUES (110, 94, 0, 2, '部署编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:edit', NULL, NULL, '2019-11-17 11:11:41', NULL); +INSERT INTO `sys_menu` VALUES (111, 94, 0, 2, '部署删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:del', NULL, NULL, '2019-11-17 11:12:01', NULL); +INSERT INTO `sys_menu` VALUES (112, 98, 0, 2, '数据库新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:add', NULL, NULL, '2019-11-17 11:12:43', NULL); +INSERT INTO `sys_menu` VALUES (113, 98, 0, 2, '数据库编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:edit', NULL, NULL, '2019-11-17 11:12:58', NULL); +INSERT INTO `sys_menu` VALUES (114, 98, 0, 2, '数据库删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:del', NULL, NULL, '2019-11-17 11:13:14', NULL); +INSERT INTO `sys_menu` VALUES (116, 36, 0, 1, '生成预览', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL); +INSERT INTO `sys_menu` VALUES (117, NULL, 3, 1, '会员列表', 'Member', 'member/index', 6, 'member', 'member', b'0', b'0', b'0', 'member:list', NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (118, NULL, 5, 1, '会员资产', 'MemberAccount', '', 7, 'memberAccount', 'memberAccount', b'0', b'0', b'0', 'member:account', NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (119, NULL, 3, 1, '团队列表', 'Team', 'team/index', 8, 'team', 'team', b'0', b'0', b'0', 'team:list', NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (121, 118, 0, 1, '资产列表', 'MemberAccountList', 'memberAccount/memberAccountList/index', 27, 'memberAccountList', 'memberAccount/memberAccountList', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (122, 118, 0, 1, 'AST余额明细', 'astAccount', 'memberAccount/astAccount/index', 28, 'astAccount', 'memberAccount/astAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (123, 118, 0, 1, 'usdt明细', 'usdtAccount', 'memberAccount/usdtAccount/index', 29, 'usdtaccount', 'memberAccount/usdtAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (124, 118, 0, 1, '注册空投明细', 'registerAccount', 'memberAccount/registerAccount/index', 30, 'registerAccount', 'memberAccount/registerAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (125, 118, 0, 1, '邀请注册空投明细', '\ninvitationAccount', 'memberAccount/invitationAccount', 31, 'invitationAccount', 'memberAccount/invitationAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (126, 118, 0, 1, '质押明细', 'pledgeAccount', 'memberAccount/pledgeAccount', 32, 'pledgeAccount', 'memberAccount/pledgeAccount', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); +INSERT INTO `sys_menu` VALUES (127, 118, 0, 1, '质押奖励明细', 'pledgeReward', 'memberAccount/pledgeReward', 33, 'pledgeReward', 'memberAccount/pledgeReward', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_quartz_job.sql b/sql/sys_quartz_job.sql new file mode 100644 index 0000000..c0d4b39 --- /dev/null +++ b/sql/sys_quartz_job.sql @@ -0,0 +1,53 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:29 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_quartz_job +-- ---------------------------- +DROP TABLE IF EXISTS `sys_quartz_job`; +CREATE TABLE `sys_quartz_job` ( + `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bean_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'Spring Bean名称', + `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'cron 表达式', + `is_pause` bit(1) NULL DEFAULT NULL COMMENT '状态:1暂停、0启用', + `job_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '任务名称', + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '方法名称', + `params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '参数', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注', + `person_in_charge` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '负责人', + `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '报警邮箱', + `sub_task` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '子任务ID', + `pause_after_failure` bit(1) NULL DEFAULT NULL COMMENT '任务失败后是否暂停', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`job_id`) USING BTREE, + INDEX `inx_is_pause`(`is_pause`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '定时任务' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_quartz_job +-- ---------------------------- +INSERT INTO `sys_quartz_job` VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33'); +INSERT INTO `sys_quartz_job` VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '5,6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12'); +INSERT INTO `sys_quartz_job` VALUES (5, 'Test', '0/5 * * * * ?', b'1', '任务告警测试', 'run', NULL, '测试', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13'); +INSERT INTO `sys_quartz_job` VALUES (6, 'testTask', '0/5 * * * * ?', b'1', '测试3', 'run2', NULL, '测试3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_quartz_log.sql b/sql/sys_quartz_log.sql new file mode 100644 index 0000000..cfdf937 --- /dev/null +++ b/sql/sys_quartz_log.sql @@ -0,0 +1,42 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:35 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_quartz_log +-- ---------------------------- +DROP TABLE IF EXISTS `sys_quartz_log`; +CREATE TABLE `sys_quartz_log` ( + `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bean_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `create_time` datetime NULL DEFAULT NULL, + `cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `exception_detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL, + `is_success` bit(1) NULL DEFAULT NULL, + `job_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `method_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `params` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL, + `time` bigint(20) NULL DEFAULT NULL, + PRIMARY KEY (`log_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '定时任务日志' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_quartz_log +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_role.sql b/sql/sys_role.sql new file mode 100644 index 0000000..0af54d7 --- /dev/null +++ b/sql/sys_role.sql @@ -0,0 +1,46 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:41 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_role` ( + `role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '名称', + `level` int(50) NULL DEFAULT NULL COMMENT '角色级别', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '描述', + `data_scope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据权限', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`role_id`) USING BTREE, + UNIQUE INDEX `uniq_name`(`name`) USING BTREE, + INDEX `role_name_index`(`name`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_role +-- ---------------------------- +INSERT INTO `sys_role` VALUES (1, '超级管理员', 1, '-', '全部', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24'); +INSERT INTO `sys_role` VALUES (2, '普通用户', 2, '-', '本级', NULL, 'admin', '2018-11-23 13:09:06', '2024-09-09 17:03:36'); +INSERT INTO `sys_role` VALUES (3, '管理员', 1, NULL, '自定义', 'admin', 'admin', '2024-09-08 20:05:41', '2024-09-08 20:11:12'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_roles_depts.sql b/sql/sys_roles_depts.sql new file mode 100644 index 0000000..ba49b5f --- /dev/null +++ b/sql/sys_roles_depts.sql @@ -0,0 +1,39 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:46 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_roles_depts +-- ---------------------------- +DROP TABLE IF EXISTS `sys_roles_depts`; +CREATE TABLE `sys_roles_depts` ( + `role_id` bigint(20) NOT NULL, + `dept_id` bigint(20) NOT NULL, + PRIMARY KEY (`role_id`, `dept_id`) USING BTREE, + INDEX `FK7qg6itn5ajdoa9h9o78v9ksur`(`dept_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色部门关联' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_roles_depts +-- ---------------------------- +INSERT INTO `sys_roles_depts` VALUES (3, 2); +INSERT INTO `sys_roles_depts` VALUES (3, 5); +INSERT INTO `sys_roles_depts` VALUES (3, 6); +INSERT INTO `sys_roles_depts` VALUES (3, 7); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_roles_menus.sql b/sql/sys_roles_menus.sql new file mode 100644 index 0000000..fea2260 --- /dev/null +++ b/sql/sys_roles_menus.sql @@ -0,0 +1,166 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:51 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_roles_menus +-- ---------------------------- +DROP TABLE IF EXISTS `sys_roles_menus`; +CREATE TABLE `sys_roles_menus` ( + `menu_id` bigint(20) NOT NULL COMMENT '菜单ID', + `role_id` bigint(20) NOT NULL COMMENT '角色ID', + PRIMARY KEY (`menu_id`, `role_id`) USING BTREE, + INDEX `FKcngg2qadojhi3a651a5adkvbq`(`role_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '角色菜单关联' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_roles_menus +-- ---------------------------- +INSERT INTO `sys_roles_menus` VALUES (1, 1); +INSERT INTO `sys_roles_menus` VALUES (2, 1); +INSERT INTO `sys_roles_menus` VALUES (3, 1); +INSERT INTO `sys_roles_menus` VALUES (5, 1); +INSERT INTO `sys_roles_menus` VALUES (6, 1); +INSERT INTO `sys_roles_menus` VALUES (7, 1); +INSERT INTO `sys_roles_menus` VALUES (9, 1); +INSERT INTO `sys_roles_menus` VALUES (28, 1); +INSERT INTO `sys_roles_menus` VALUES (32, 1); +INSERT INTO `sys_roles_menus` VALUES (35, 1); +INSERT INTO `sys_roles_menus` VALUES (37, 1); +INSERT INTO `sys_roles_menus` VALUES (39, 1); +INSERT INTO `sys_roles_menus` VALUES (41, 1); +INSERT INTO `sys_roles_menus` VALUES (44, 1); +INSERT INTO `sys_roles_menus` VALUES (45, 1); +INSERT INTO `sys_roles_menus` VALUES (46, 1); +INSERT INTO `sys_roles_menus` VALUES (48, 1); +INSERT INTO `sys_roles_menus` VALUES (49, 1); +INSERT INTO `sys_roles_menus` VALUES (50, 1); +INSERT INTO `sys_roles_menus` VALUES (52, 1); +INSERT INTO `sys_roles_menus` VALUES (53, 1); +INSERT INTO `sys_roles_menus` VALUES (54, 1); +INSERT INTO `sys_roles_menus` VALUES (56, 1); +INSERT INTO `sys_roles_menus` VALUES (57, 1); +INSERT INTO `sys_roles_menus` VALUES (58, 1); +INSERT INTO `sys_roles_menus` VALUES (60, 1); +INSERT INTO `sys_roles_menus` VALUES (61, 1); +INSERT INTO `sys_roles_menus` VALUES (62, 1); +INSERT INTO `sys_roles_menus` VALUES (64, 1); +INSERT INTO `sys_roles_menus` VALUES (65, 1); +INSERT INTO `sys_roles_menus` VALUES (66, 1); +INSERT INTO `sys_roles_menus` VALUES (73, 1); +INSERT INTO `sys_roles_menus` VALUES (74, 1); +INSERT INTO `sys_roles_menus` VALUES (75, 1); +INSERT INTO `sys_roles_menus` VALUES (77, 1); +INSERT INTO `sys_roles_menus` VALUES (78, 1); +INSERT INTO `sys_roles_menus` VALUES (79, 1); +INSERT INTO `sys_roles_menus` VALUES (80, 1); +INSERT INTO `sys_roles_menus` VALUES (82, 1); +INSERT INTO `sys_roles_menus` VALUES (102, 1); +INSERT INTO `sys_roles_menus` VALUES (103, 1); +INSERT INTO `sys_roles_menus` VALUES (104, 1); +INSERT INTO `sys_roles_menus` VALUES (105, 1); +INSERT INTO `sys_roles_menus` VALUES (106, 1); +INSERT INTO `sys_roles_menus` VALUES (107, 1); +INSERT INTO `sys_roles_menus` VALUES (108, 1); +INSERT INTO `sys_roles_menus` VALUES (109, 1); +INSERT INTO `sys_roles_menus` VALUES (110, 1); +INSERT INTO `sys_roles_menus` VALUES (111, 1); +INSERT INTO `sys_roles_menus` VALUES (112, 1); +INSERT INTO `sys_roles_menus` VALUES (113, 1); +INSERT INTO `sys_roles_menus` VALUES (114, 1); +INSERT INTO `sys_roles_menus` VALUES (116, 1); +INSERT INTO `sys_roles_menus` VALUES (117, 1); +INSERT INTO `sys_roles_menus` VALUES (118, 1); +INSERT INTO `sys_roles_menus` VALUES (119, 1); +INSERT INTO `sys_roles_menus` VALUES (121, 1); +INSERT INTO `sys_roles_menus` VALUES (122, 1); +INSERT INTO `sys_roles_menus` VALUES (123, 1); +INSERT INTO `sys_roles_menus` VALUES (124, 1); +INSERT INTO `sys_roles_menus` VALUES (125, 1); +INSERT INTO `sys_roles_menus` VALUES (126, 1); +INSERT INTO `sys_roles_menus` VALUES (127, 1); +INSERT INTO `sys_roles_menus` VALUES (1, 2); +INSERT INTO `sys_roles_menus` VALUES (2, 2); +INSERT INTO `sys_roles_menus` VALUES (3, 2); +INSERT INTO `sys_roles_menus` VALUES (6, 2); +INSERT INTO `sys_roles_menus` VALUES (7, 2); +INSERT INTO `sys_roles_menus` VALUES (9, 2); +INSERT INTO `sys_roles_menus` VALUES (10, 2); +INSERT INTO `sys_roles_menus` VALUES (11, 2); +INSERT INTO `sys_roles_menus` VALUES (14, 2); +INSERT INTO `sys_roles_menus` VALUES (15, 2); +INSERT INTO `sys_roles_menus` VALUES (19, 2); +INSERT INTO `sys_roles_menus` VALUES (27, 2); +INSERT INTO `sys_roles_menus` VALUES (30, 2); +INSERT INTO `sys_roles_menus` VALUES (32, 2); +INSERT INTO `sys_roles_menus` VALUES (33, 2); +INSERT INTO `sys_roles_menus` VALUES (34, 2); +INSERT INTO `sys_roles_menus` VALUES (36, 2); +INSERT INTO `sys_roles_menus` VALUES (48, 2); +INSERT INTO `sys_roles_menus` VALUES (49, 2); +INSERT INTO `sys_roles_menus` VALUES (50, 2); +INSERT INTO `sys_roles_menus` VALUES (80, 2); +INSERT INTO `sys_roles_menus` VALUES (82, 2); +INSERT INTO `sys_roles_menus` VALUES (83, 2); +INSERT INTO `sys_roles_menus` VALUES (116, 2); +INSERT INTO `sys_roles_menus` VALUES (1, 3); +INSERT INTO `sys_roles_menus` VALUES (2, 3); +INSERT INTO `sys_roles_menus` VALUES (6, 3); +INSERT INTO `sys_roles_menus` VALUES (7, 3); +INSERT INTO `sys_roles_menus` VALUES (9, 3); +INSERT INTO `sys_roles_menus` VALUES (10, 3); +INSERT INTO `sys_roles_menus` VALUES (11, 3); +INSERT INTO `sys_roles_menus` VALUES (15, 3); +INSERT INTO `sys_roles_menus` VALUES (21, 3); +INSERT INTO `sys_roles_menus` VALUES (22, 3); +INSERT INTO `sys_roles_menus` VALUES (23, 3); +INSERT INTO `sys_roles_menus` VALUES (24, 3); +INSERT INTO `sys_roles_menus` VALUES (27, 3); +INSERT INTO `sys_roles_menus` VALUES (32, 3); +INSERT INTO `sys_roles_menus` VALUES (33, 3); +INSERT INTO `sys_roles_menus` VALUES (34, 3); +INSERT INTO `sys_roles_menus` VALUES (37, 3); +INSERT INTO `sys_roles_menus` VALUES (41, 3); +INSERT INTO `sys_roles_menus` VALUES (44, 3); +INSERT INTO `sys_roles_menus` VALUES (46, 3); +INSERT INTO `sys_roles_menus` VALUES (60, 3); +INSERT INTO `sys_roles_menus` VALUES (61, 3); +INSERT INTO `sys_roles_menus` VALUES (62, 3); +INSERT INTO `sys_roles_menus` VALUES (80, 3); +INSERT INTO `sys_roles_menus` VALUES (83, 3); +INSERT INTO `sys_roles_menus` VALUES (90, 3); +INSERT INTO `sys_roles_menus` VALUES (92, 3); +INSERT INTO `sys_roles_menus` VALUES (93, 3); +INSERT INTO `sys_roles_menus` VALUES (94, 3); +INSERT INTO `sys_roles_menus` VALUES (97, 3); +INSERT INTO `sys_roles_menus` VALUES (98, 3); +INSERT INTO `sys_roles_menus` VALUES (102, 3); +INSERT INTO `sys_roles_menus` VALUES (103, 3); +INSERT INTO `sys_roles_menus` VALUES (104, 3); +INSERT INTO `sys_roles_menus` VALUES (105, 3); +INSERT INTO `sys_roles_menus` VALUES (106, 3); +INSERT INTO `sys_roles_menus` VALUES (107, 3); +INSERT INTO `sys_roles_menus` VALUES (108, 3); +INSERT INTO `sys_roles_menus` VALUES (109, 3); +INSERT INTO `sys_roles_menus` VALUES (110, 3); +INSERT INTO `sys_roles_menus` VALUES (111, 3); +INSERT INTO `sys_roles_menus` VALUES (112, 3); +INSERT INTO `sys_roles_menus` VALUES (113, 3); +INSERT INTO `sys_roles_menus` VALUES (114, 3); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_user.sql b/sql/sys_user.sql new file mode 100644 index 0000000..114f620 --- /dev/null +++ b/sql/sys_user.sql @@ -0,0 +1,60 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:04:57 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门名称', + `username` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户名', + `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '昵称', + `gender` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '性别', + `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '手机号码', + `email` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '邮箱', + `avatar_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '头像地址', + `avatar_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '头像真实路径', + `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码', + `is_effective` int(11) NULL DEFAULT NULL, + `is_admin` bit(1) NULL DEFAULT b'0' COMMENT '是否为admin账号', + `enabled` bit(1) NULL DEFAULT NULL COMMENT '状态:1启用、0禁用', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `pwd_reset_time` datetime NULL DEFAULT NULL COMMENT '修改密码的时间', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`user_id`) USING BTREE, + UNIQUE INDEX `UK_kpubos9gc2cvtkb0thktkbkes`(`email`) USING BTREE, + UNIQUE INDEX `username`(`username`) USING BTREE, + UNIQUE INDEX `uniq_username`(`username`) USING BTREE, + UNIQUE INDEX `uniq_email`(`email`) USING BTREE, + INDEX `FK5rwmryny6jthaaxkogownknqp`(`dept_id`) USING BTREE, + INDEX `inx_enabled`(`enabled`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统用户' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_user +-- ---------------------------- +INSERT INTO `sys_user` VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '201507802@qq.com', 'avatar-20200806032259161.png', '/Users/jie/Documents/work/me/admin/eladmin/~/avatar/avatar-20200806032259161.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', 1, b'1', b'1', NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31'); +INSERT INTO `sys_user` VALUES (2, 2, 'test', '测试', '男', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', 1, b'0', b'1', 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2024-09-06 17:42:50'); +INSERT INTO `sys_user` VALUES (3, 17, 'mei', 'msh', '男', '18269745893', '792607890@qq.com', NULL, NULL, '$2a$10$rbDSh6KNCVpayv9e6k9F0OVHQqjAKd5G9dkyJHqB1JxHRsobJwbAG', 1, b'0', b'1', 'admin', 'admin', NULL, '2024-09-08 20:08:08', '2024-09-08 20:08:08'); +INSERT INTO `sys_user` VALUES (4, 5, 'lizhen', 'zhen', '男', '18669357895', '796607890@qq.com', NULL, NULL, '$2a$10$Pq4ZOqIFp0LZrNOVTC7ez.KV6I46uPkO.Pd5wUpAf/qLtrx5QY3Su', NULL, b'0', b'1', 'admin', 'admin', NULL, '2024-09-09 17:02:39', '2024-09-09 17:02:39'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_users_jobs.sql b/sql/sys_users_jobs.sql new file mode 100644 index 0000000..be3084c --- /dev/null +++ b/sql/sys_users_jobs.sql @@ -0,0 +1,38 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:01 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_users_jobs +-- ---------------------------- +DROP TABLE IF EXISTS `sys_users_jobs`; +CREATE TABLE `sys_users_jobs` ( + `user_id` bigint(20) NOT NULL COMMENT '用户ID', + `job_id` bigint(20) NOT NULL COMMENT '岗位ID', + PRIMARY KEY (`user_id`, `job_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_users_jobs +-- ---------------------------- +INSERT INTO `sys_users_jobs` VALUES (1, 11); +INSERT INTO `sys_users_jobs` VALUES (2, 12); +INSERT INTO `sys_users_jobs` VALUES (3, 11); +INSERT INTO `sys_users_jobs` VALUES (4, 8); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/sys_users_roles.sql b/sql/sys_users_roles.sql new file mode 100644 index 0000000..9eb88eb --- /dev/null +++ b/sql/sys_users_roles.sql @@ -0,0 +1,39 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:06 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_users_roles +-- ---------------------------- +DROP TABLE IF EXISTS `sys_users_roles`; +CREATE TABLE `sys_users_roles` ( + `user_id` bigint(20) NOT NULL COMMENT '用户ID', + `role_id` bigint(20) NOT NULL COMMENT '角色ID', + PRIMARY KEY (`user_id`, `role_id`) USING BTREE, + INDEX `FKq4eq273l04bpu4efj0jd0jb98`(`role_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户角色关联' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_users_roles +-- ---------------------------- +INSERT INTO `sys_users_roles` VALUES (1, 1); +INSERT INTO `sys_users_roles` VALUES (2, 2); +INSERT INTO `sys_users_roles` VALUES (4, 2); +INSERT INTO `sys_users_roles` VALUES (3, 3); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/tool_alipay_config.sql b/sql/tool_alipay_config.sql new file mode 100644 index 0000000..b504dd8 --- /dev/null +++ b/sql/tool_alipay_config.sql @@ -0,0 +1,44 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:12 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tool_alipay_config +-- ---------------------------- +DROP TABLE IF EXISTS `tool_alipay_config`; +CREATE TABLE `tool_alipay_config` ( + `config_id` bigint(20) NOT NULL COMMENT 'ID', + `app_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '应用ID', + `charset` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '编码', + `format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '类型 固定格式json', + `gateway_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '网关地址', + `notify_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '异步回调', + `private_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '私钥', + `public_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '公钥', + `return_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '回调地址', + `sign_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '签名方式', + `sys_service_provider_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '商户号', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '支付宝配置类' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tool_alipay_config +-- ---------------------------- +INSERT INTO `tool_alipay_config` VALUES (1, '2016091700532697', 'utf-8', 'JSON', 'https://openapi.alipaydev.com/gateway.do', 'http://api.auauz.net/api/aliPay/notify', 'MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5js8sInU10AJ0cAQ8UMMyXrQ+oHZEkVt5lBwsStmTJ7YikVYgbskx1YYEXTojRsWCb+SH/kDmDU4pK/u91SJ4KFCRMF2411piYuXU/jF96zKrADznYh/zAraqT6hvAIVtQAlMHN53nx16rLzZ/8jDEkaSwT7+HvHiS+7sxSojnu/3oV7BtgISoUNstmSe8WpWHOaWv19xyS+Mce9MY4BfseFhzTICUymUQdd/8hXA28/H6osUfAgsnxAKv7Wil3aJSgaJczWuflYOve0dJ3InZkhw5Cvr0atwpk8YKBQjy5CdkoHqvkOcIB+cYHXJKzOE5tqU7inSwVbHzOLQ3XbnAgMBAAECggEAVJp5eT0Ixg1eYSqFs9568WdetUNCSUchNxDBu6wxAbhUgfRUGZuJnnAll63OCTGGck+EGkFh48JjRcBpGoeoHLL88QXlZZbC/iLrea6gcDIhuvfzzOffe1RcZtDFEj9hlotg8dQj1tS0gy9pN9g4+EBH7zeu+fyv+qb2e/v1l6FkISXUjpkD7RLQr3ykjiiEw9BpeKb7j5s7Kdx1NNIzhkcQKNqlk8JrTGDNInbDM6inZfwwIO2R1DHinwdfKWkvOTODTYa2MoAvVMFT9Bec9FbLpoWp7ogv1JMV9svgrcF9XLzANZ/OQvkbe9TV9GWYvIbxN6qwQioKCWO4GPnCAQKBgQDgW5MgfhX8yjXqoaUy/d1VjI8dHeIyw8d+OBAYwaxRSlCfyQ+tieWcR2HdTzPca0T0GkWcKZm0ei5xRURgxt4DUDLXNh26HG0qObbtLJdu/AuBUuCqgOiLqJ2f1uIbrz6OZUHns+bT/jGW2Ws8+C13zTCZkZt9CaQsrp3QOGDx5wKBgQDTul39hp3ZPwGNFeZdkGoUoViOSd5Lhowd5wYMGAEXWRLlU8z+smT5v0POz9JnIbCRchIY2FAPKRdVTICzmPk2EPJFxYTcwaNbVqL6lN7J2IlXXMiit5QbiLauo55w7plwV6LQmKm9KV7JsZs5XwqF7CEovI7GevFzyD3w+uizAQKBgC3LY1eRhOlpWOIAhpjG6qOoohmeXOphvdmMlfSHq6WYFqbWwmV4rS5d/6LNpNdL6fItXqIGd8I34jzql49taCmi+A2nlR/E559j0mvM20gjGDIYeZUz5MOE8k+K6/IcrhcgofgqZ2ZED1ksHdB/E8DNWCswZl16V1FrfvjeWSNnAoGAMrBplCrIW5xz+J0Hm9rZKrs+AkK5D4fUv8vxbK/KgxZ2KaUYbNm0xv39c+PZUYuFRCz1HDGdaSPDTE6WeWjkMQd5mS6ikl9hhpqFRkyh0d0fdGToO9yLftQKOGE/q3XUEktI1XvXF0xyPwNgUCnq0QkpHyGVZPtGFxwXiDvpvgECgYA5PoB+nY8iDiRaJNko9w0hL4AeKogwf+4TbCw+KWVEn6jhuJa4LFTdSqp89PktQaoVpwv92el/AhYjWOl/jVCm122f9b7GyoelbjMNolToDwe5pF5RnSpEuDdLy9MfE8LnE3PlbE7E5BipQ3UjSebkgNboLHH/lNZA5qvEtvbfvQ==', 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAut9evKRuHJ/2QNfDlLwvN/S8l9hRAgPbb0u61bm4AtzaTGsLeMtScetxTWJnVvAVpMS9luhEJjt+Sbk5TNLArsgzzwARgaTKOLMT1TvWAK5EbHyI+eSrc3s7Awe1VYGwcubRFWDm16eQLv0k7iqiw+4mweHSz/wWyvBJVgwLoQ02btVtAQErCfSJCOmt0Q/oJQjj08YNRV4EKzB19+f5A+HQVAKy72dSybTzAK+3FPtTtNen/+b5wGeat7c32dhYHnGorPkPeXLtsqqUTp1su5fMfd4lElNdZaoCI7osZxWWUo17vBCZnyeXc9fk0qwD9mK6yRAxNbrY72Xx5VqIqwIDAQAB', 'http://api.auauz.net/api/aliPay/return', 'RSA2', '2088102176044281'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/tool_email_config.sql b/sql/tool_email_config.sql new file mode 100644 index 0000000..2e7a039 --- /dev/null +++ b/sql/tool_email_config.sql @@ -0,0 +1,38 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:19 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tool_email_config +-- ---------------------------- +DROP TABLE IF EXISTS `tool_email_config`; +CREATE TABLE `tool_email_config` ( + `config_id` bigint(20) NOT NULL COMMENT 'ID', + `from_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '收件人', + `host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '邮件服务器SMTP地址', + `pass` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '密码', + `port` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '端口', + `user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '发件者用户名', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '邮箱配置' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tool_email_config +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/tool_local_storage.sql b/sql/tool_local_storage.sql new file mode 100644 index 0000000..44e48ef --- /dev/null +++ b/sql/tool_local_storage.sql @@ -0,0 +1,43 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:24 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tool_local_storage +-- ---------------------------- +DROP TABLE IF EXISTS `tool_local_storage`; +CREATE TABLE `tool_local_storage` ( + `storage_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件真实的名称', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件名', + `suffix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '后缀', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '路径', + `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '类型', + `size` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '大小', + `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者', + `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '更新者', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`storage_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '本地存储' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tool_local_storage +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/tool_picture.sql b/sql/tool_picture.sql new file mode 100644 index 0000000..7a072f5 --- /dev/null +++ b/sql/tool_picture.sql @@ -0,0 +1,44 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:30 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tool_picture +-- ---------------------------- +DROP TABLE IF EXISTS `tool_picture`; +CREATE TABLE `tool_picture` ( + `picture_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片名称', + `md5code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件的MD5值', + `size` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片大小', + `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片地址', + `delete_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除的URL', + `height` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片高度', + `width` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片宽度', + `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名称', + `create_time` datetime NULL DEFAULT NULL COMMENT '上传日期', + PRIMARY KEY (`picture_id`) USING BTREE, + UNIQUE INDEX `uniq_md5_code`(`md5code`) USING BTREE, + INDEX `inx_url`(`url`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'Sm.Ms图床' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tool_picture +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/tool_qiniu_config.sql b/sql/tool_qiniu_config.sql new file mode 100644 index 0000000..5a27eb0 --- /dev/null +++ b/sql/tool_qiniu_config.sql @@ -0,0 +1,39 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:35 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tool_qiniu_config +-- ---------------------------- +DROP TABLE IF EXISTS `tool_qiniu_config`; +CREATE TABLE `tool_qiniu_config` ( + `config_id` bigint(20) NOT NULL COMMENT 'ID', + `access_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT 'accessKey', + `bucket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'Bucket 识别符', + `host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '外链域名', + `secret_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT 'secretKey', + `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '空间类型', + `zone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '机房', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '七牛云配置' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tool_qiniu_config +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/tool_qiniu_content.sql b/sql/tool_qiniu_content.sql new file mode 100644 index 0000000..235dc96 --- /dev/null +++ b/sql/tool_qiniu_content.sql @@ -0,0 +1,41 @@ +/* + Navicat Premium Data Transfer + + Source Server : 远程 + Source Server Type : MySQL + Source Server Version : 50744 (5.7.44) + Source Host : 8.137.112.156:3307 + Source Schema : crm + + Target Server Type : MySQL + Target Server Version : 50744 (5.7.44) + File Encoding : 65001 + + Date: 18/09/2024 15:05:40 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tool_qiniu_content +-- ---------------------------- +DROP TABLE IF EXISTS `tool_qiniu_content`; +CREATE TABLE `tool_qiniu_content` ( + `content_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `bucket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'Bucket 识别符', + `name` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件名称', + `size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件大小', + `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件类型:私有或公开', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件url', + `suffix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件后缀', + `update_time` datetime NULL DEFAULT NULL COMMENT '上传或同步的时间', + PRIMARY KEY (`content_id`) USING BTREE, + UNIQUE INDEX `uniq_name`(`name`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '七牛云文件存储' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tool_qiniu_content +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1;