├── .gitattributes ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── db-file ├── 1.x版本 │ ├── Dockerfile │ ├── opsli-boot.sql │ └── 升级SQL │ │ ├── 1.6.2 =》1.6.3 .sql │ │ └── 1.6.3 =》1.6.4.sql ├── 2.0版本 │ ├── 2.0 - 2.1.0 升级SQL.sql │ ├── Dockerfile │ └── opsli-boot.sql ├── 2.2-springboot3 │ ├── Dockerfile │ ├── opsli-boot.sql │ └── 说明.txt └── 账号密码.txt ├── docker-compose-server.yml ├── docker-compose.yml ├── opsli-api ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── opsli │ └── api │ ├── ApiFlag.java │ ├── base │ ├── encrypt │ │ ├── BaseEncrypt.java │ │ └── EncryptModel.java │ ├── result │ │ └── ResultWrapper.java │ └── warpper │ │ └── ApiWrapper.java │ ├── web │ ├── gentest │ │ ├── carinfo │ │ │ └── TestCarRestApi.java │ │ └── user │ │ │ └── TestUserRestApi.java │ ├── system │ │ ├── area │ │ │ └── SysAreaRestApi.java │ │ ├── dict │ │ │ ├── DictApi.java │ │ │ └── DictDetailApi.java │ │ ├── logs │ │ │ ├── LoginLogsApi.java │ │ │ ├── LogsApi.java │ │ │ └── OperationLogRestApi.java │ │ ├── menu │ │ │ └── MenuApi.java │ │ ├── options │ │ │ └── OptionsApi.java │ │ ├── org │ │ │ └── SysOrgRestApi.java │ │ ├── role │ │ │ ├── RoleApi.java │ │ │ └── RoleMenuRefApi.java │ │ ├── tenant │ │ │ └── TenantApi.java │ │ └── user │ │ │ ├── UserApi.java │ │ │ ├── UserOrgRefApi.java │ │ │ └── UserRoleRefApi.java │ └── test │ │ ├── TestApi.java │ │ └── TestRestApi.java │ └── wrapper │ ├── gentest │ ├── carinfo │ │ └── TestCarModel.java │ └── user │ │ └── TestUserModel.java │ ├── system │ ├── area │ │ └── SysAreaModel.java │ ├── dict │ │ ├── DictDetailModel.java │ │ ├── DictModel.java │ │ └── DictWrapper.java │ ├── logs │ │ ├── LoginLogsModel.java │ │ ├── LogsModel.java │ │ └── OperationLogModel.java │ ├── menu │ │ ├── MenuFullModel.java │ │ └── MenuModel.java │ ├── options │ │ └── OptionsModel.java │ ├── org │ │ └── SysOrgModel.java │ ├── role │ │ ├── RoleMenuRefModel.java │ │ └── RoleModel.java │ ├── tenant │ │ └── TenantModel.java │ └── user │ │ ├── EnableUserModel.java │ │ ├── ToUserPassword.java │ │ ├── UpdateUserEmailModel.java │ │ ├── UpdateUserMobileModel.java │ │ ├── UpdateUserPasswordByForgetModel.java │ │ ├── UserAvatarModel.java │ │ ├── UserInfo.java │ │ ├── UserModel.java │ │ ├── UserOrgRefModel.java │ │ ├── UserOrgRefWebModel.java │ │ ├── UserPassword.java │ │ ├── UserRoleRefModel.java │ │ ├── UserSelfSaveModel.java │ │ └── UserWebModel.java │ ├── test │ └── TestModel.java │ └── testt │ └── Test3Model.java ├── opsli-base-support ├── opsli-common │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opsli │ │ └── common │ │ ├── annotation │ │ ├── ApiRestController.java │ │ ├── ApiVersion.java │ │ ├── Limiter.java │ │ ├── OptionDict.java │ │ ├── SearchHis.java │ │ ├── hotdata │ │ │ ├── EnableHotData.java │ │ │ ├── HotDataDel.java │ │ │ └── HotDataPut.java │ │ └── validator │ │ │ ├── Validator.java │ │ │ ├── ValidatorLenMax.java │ │ │ └── ValidatorLenMin.java │ │ ├── api │ │ ├── ResultDto.java │ │ └── ResultVoMap.java │ │ ├── base │ │ └── msg │ │ │ └── BaseMsg.java │ │ ├── constants │ │ ├── CacheConstants.java │ │ ├── MenuConstants.java │ │ ├── MyBatisConstants.java │ │ ├── OrderConstants.java │ │ ├── RedisConstants.java │ │ ├── SignConstants.java │ │ ├── TokenConstants.java │ │ ├── TokenTypeConstants.java │ │ └── TreeConstants.java │ │ ├── enums │ │ ├── AlertType.java │ │ ├── CacheType.java │ │ ├── DictType.java │ │ ├── ExcelOperate.java │ │ ├── LoginFromEnum.java │ │ ├── LoginLimitRefuse.java │ │ ├── LoginModelType.java │ │ ├── OptionsType.java │ │ ├── SystemInfo.java │ │ ├── ValidatorType.java │ │ └── VerificationTypeEnum.java │ │ ├── exception │ │ ├── EmptyException.java │ │ ├── JwtException.java │ │ ├── ServiceException.java │ │ ├── TokenException.java │ │ └── WafException.java │ │ ├── msg │ │ ├── CommonMsg.java │ │ └── ValidatorMsg.java │ │ ├── thread │ │ ├── AsyncProcessExecutor.java │ │ ├── AsyncProcessExecutorByNormal.java │ │ ├── AsyncProcessExecutorByWait.java │ │ ├── AsyncProcessExecutorFactory.java │ │ ├── AsyncProcessExecutorOldByWait.java │ │ ├── AsyncProcessor.java │ │ ├── SyncProcessSingleExecutor.java │ │ └── ThreadPoolFactory.java │ │ └── utils │ │ ├── BigDecimalUtil.java │ │ ├── CheckStrength.java │ │ ├── ConvertBytesUtil.java │ │ ├── DefPatternPool.java │ │ ├── FieldUtil.java │ │ ├── HashIdsUtil.java │ │ ├── IPUtil.java │ │ ├── ListDistinctUtil.java │ │ ├── MessUtil.java │ │ ├── OutputStreamUtil.java │ │ ├── PackageUtil.java │ │ ├── Props.java │ │ ├── RateLimiterUtil.java │ │ ├── UniqueStrGeneratorUtils.java │ │ ├── WrapperUtil.java │ │ └── ZipUtils.java ├── opsli-core │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ ├── core │ │ │ ├── api │ │ │ │ ├── ApiRequestMappingHandlerMapping.java │ │ │ │ └── ApiVersionCondition.java │ │ │ ├── autoconfigure │ │ │ │ ├── conf │ │ │ │ │ ├── CorsConfig.java │ │ │ │ │ ├── MyBatisPlusConfig.java │ │ │ │ │ ├── SecurityConfig.java │ │ │ │ │ ├── SpringDocConfig.java │ │ │ │ │ ├── SpringWebMvcConfig.java │ │ │ │ │ └── SwaggerConfig.java │ │ │ │ └── properties │ │ │ │ │ ├── ApiPathProperties.java │ │ │ │ │ ├── CacheProperties.java │ │ │ │ │ ├── DbSourceProperties.java │ │ │ │ │ ├── EncryptProperties.java │ │ │ │ │ ├── GlobalProperties.java │ │ │ │ │ └── TokenProperties.java │ │ │ ├── base │ │ │ │ ├── controller │ │ │ │ │ └── BaseRestController.java │ │ │ │ ├── dto │ │ │ │ │ └── LoginUserDto.java │ │ │ │ ├── entity │ │ │ │ │ ├── BaseEntity.java │ │ │ │ │ └── HasChildren.java │ │ │ │ └── service │ │ │ │ │ ├── base │ │ │ │ │ └── BaseService.java │ │ │ │ │ ├── impl │ │ │ │ │ └── CrudServiceImpl.java │ │ │ │ │ └── interfaces │ │ │ │ │ ├── BaseServiceInterface.java │ │ │ │ │ └── CrudServiceInterface.java │ │ │ ├── cache │ │ │ │ ├── CacheUtil.java │ │ │ │ └── SecurityCache.java │ │ │ ├── eventbus │ │ │ │ ├── AbstractSpringEventBus.java │ │ │ │ ├── IEventBus.java │ │ │ │ ├── IEventConsumer.java │ │ │ │ └── SpringEventBus.java │ │ │ ├── factory │ │ │ │ └── CodeFactory.java │ │ │ ├── filters │ │ │ │ ├── .DS_Store │ │ │ │ ├── aspect │ │ │ │ │ ├── LimiterAop.java │ │ │ │ │ ├── SQLDataAop.java │ │ │ │ │ ├── SearchHisAop.java │ │ │ │ │ ├── UserCachingOperationNameGenerator.java │ │ │ │ │ └── ValidatorAop.java │ │ │ │ └── interceptor │ │ │ │ │ ├── MybatisAutoFillInterceptor.java │ │ │ │ │ ├── MybatisCryptoInterceptor.java │ │ │ │ │ ├── UserAuthInterceptor.java │ │ │ │ │ └── crypto │ │ │ │ │ └── ObjectProcessor.java │ │ │ ├── general │ │ │ │ └── StartPrint.java │ │ │ ├── handler │ │ │ │ └── GlobalExceptionHandler.java │ │ │ ├── holder │ │ │ │ └── UserContextHolder.java │ │ │ ├── listener │ │ │ │ ├── ApplicationFailedEventListener.java │ │ │ │ └── ApplicationReadyEventListener.java │ │ │ ├── log │ │ │ │ ├── annotation │ │ │ │ │ └── OperateLogger.java │ │ │ │ ├── aspect │ │ │ │ │ └── OperateLogAspect.java │ │ │ │ ├── bean │ │ │ │ │ └── OperationLog.java │ │ │ │ └── enums │ │ │ │ │ ├── LogLevelEnum.java │ │ │ │ │ ├── LogScopeEnum.java │ │ │ │ │ ├── LogTypeEnum.java │ │ │ │ │ ├── ModuleEnum.java │ │ │ │ │ └── OperationTypeEnum.java │ │ │ ├── msg │ │ │ │ ├── CoreMsg.java │ │ │ │ ├── JwtMsg.java │ │ │ │ └── TokenMsg.java │ │ │ ├── options │ │ │ │ ├── CryptoConfigFactory.java │ │ │ │ ├── EmailConfigFactory.java │ │ │ │ ├── SmsAliYunCaptchaConfigFactory.java │ │ │ │ └── SmsAliYunConfigFactory.java │ │ │ ├── persistence │ │ │ │ ├── Page.java │ │ │ │ └── querybuilder │ │ │ │ │ ├── GenQueryBuilder.java │ │ │ │ │ ├── QueryBuilder.java │ │ │ │ │ ├── WebQueryBuilder.java │ │ │ │ │ ├── chain │ │ │ │ │ ├── QueryBuilderChain.java │ │ │ │ │ ├── QueryDataPermsHandler.java │ │ │ │ │ └── QueryTenantHandler.java │ │ │ │ │ └── conf │ │ │ │ │ └── WebQueryConf.java │ │ │ ├── security │ │ │ │ ├── filter │ │ │ │ │ └── JwtAuthenticationTokenFilter.java │ │ │ │ └── service │ │ │ │ │ ├── EmailUserDetailDetailServiceImpl.java │ │ │ │ │ ├── MobileUserDetailDetailServiceImpl.java │ │ │ │ │ ├── UidUserDetailDetailServiceImpl.java │ │ │ │ │ └── UsernameUserDetailDetailServiceImpl.java │ │ │ └── utils │ │ │ │ ├── CaptchaUtil.java │ │ │ │ ├── CryptoUtil.java │ │ │ │ ├── DictUtil.java │ │ │ │ ├── DistributedLockUtil.java │ │ │ │ ├── EnjoyUtil.java │ │ │ │ ├── EnvPrefixTool.java │ │ │ │ ├── ExcelUtil.java │ │ │ │ ├── GlobalPropertiesUtil.java │ │ │ │ ├── JWTBizUtil.java │ │ │ │ ├── MenuUtil.java │ │ │ │ ├── OptionsUtil.java │ │ │ │ ├── OrgUtil.java │ │ │ │ ├── SearchHisUtil.java │ │ │ │ ├── SpringContextHolder.java │ │ │ │ ├── SystemInfoUtil.java │ │ │ │ ├── TenantUtil.java │ │ │ │ ├── ThrowExceptionUtil.java │ │ │ │ ├── TokenGenerator.java │ │ │ │ ├── TreeBuildUtil.java │ │ │ │ ├── UserTokenUtil.java │ │ │ │ ├── UserUtil.java │ │ │ │ ├── ValidatorUtil.java │ │ │ │ ├── VerificationCodeUtil.java │ │ │ │ └── excel │ │ │ │ └── factory │ │ │ │ ├── AbstractModelHelper.java │ │ │ │ └── ModelFactoryHelper.java │ │ │ └── plugins │ │ │ └── oss │ │ │ ├── OssStorageFactory.java │ │ │ ├── conf │ │ │ ├── ConfigFactory.java │ │ │ ├── LocalConfigFactory.java │ │ │ └── UpYunConfigFactory.java │ │ │ ├── enums │ │ │ └── OssStorageType.java │ │ │ ├── exception │ │ │ └── StoragePluginException.java │ │ │ ├── msg │ │ │ └── OssMsg.java │ │ │ └── service │ │ │ ├── BaseOssStorageService.java │ │ │ ├── OssStorageService.java │ │ │ └── impl │ │ │ ├── LocalStorageServiceImpl.java │ │ │ └── UpYunStorageServiceImpl.java │ │ └── resources │ │ ├── META-INF │ │ └── additional-spring-configuration-metadata.json │ │ └── banner.txt └── pom.xml ├── opsli-modulars ├── README.md ├── opsli-modulars-generator │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ ├── modulars │ │ │ └── generator │ │ │ │ ├── column │ │ │ │ ├── entity │ │ │ │ │ └── GenTableColumn.java │ │ │ │ ├── mapper │ │ │ │ │ ├── GenTableColumnMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── GenTableColumnMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── IGenTableColumnService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── GenTableColumnServiceImpl.java │ │ │ │ └── wrapper │ │ │ │ │ └── GenTableColumnModel.java │ │ │ │ ├── general │ │ │ │ └── actuator │ │ │ │ │ └── SQLActuator.java │ │ │ │ ├── importable │ │ │ │ ├── ImportTableUtil.java │ │ │ │ ├── entity │ │ │ │ │ ├── DatabaseColumn.java │ │ │ │ │ └── DatabaseTable.java │ │ │ │ ├── mapper │ │ │ │ │ ├── MySQLDatabaseTableMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── MySQLDatabaseTableMapper.xml │ │ │ │ └── service │ │ │ │ │ ├── DatabaseTableService.java │ │ │ │ │ └── MySQLDatabaseTableServiceImpl.java │ │ │ │ ├── logs │ │ │ │ ├── api │ │ │ │ │ └── GenLogsApi.java │ │ │ │ ├── entity │ │ │ │ │ └── GenLogs.java │ │ │ │ ├── mapper │ │ │ │ │ ├── GenLogsMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── GenLogsMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── IGenLogsService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── GenLogsServiceImpl.java │ │ │ │ ├── web │ │ │ │ │ └── GenLogsRestController.java │ │ │ │ └── wrapper │ │ │ │ │ ├── GenBuilderModel.java │ │ │ │ │ └── GenLogsModel.java │ │ │ │ ├── table │ │ │ │ ├── api │ │ │ │ │ └── TableApi.java │ │ │ │ ├── entity │ │ │ │ │ └── GenTable.java │ │ │ │ ├── mapper │ │ │ │ │ ├── GenTableMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── GenTableMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── IGenTableService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── GenTableServiceImpl.java │ │ │ │ ├── web │ │ │ │ │ └── GenTableRestController.java │ │ │ │ └── wrapper │ │ │ │ │ ├── GenTableAndColumnModel.java │ │ │ │ │ └── GenTableModel.java │ │ │ │ └── template │ │ │ │ ├── api │ │ │ │ ├── GenTemplateDetailRestApi.java │ │ │ │ └── GenTemplateRestApi.java │ │ │ │ ├── entity │ │ │ │ ├── GenTemplate.java │ │ │ │ └── GenTemplateDetail.java │ │ │ │ ├── mapper │ │ │ │ ├── GenTemplateDetailMapper.java │ │ │ │ ├── GenTemplateMapper.java │ │ │ │ └── xml │ │ │ │ │ ├── GenTemplateDetailMapper.xml │ │ │ │ │ └── GenTemplateMapper.xml │ │ │ │ ├── service │ │ │ │ ├── IGenTemplateDetailService.java │ │ │ │ ├── IGenTemplateService.java │ │ │ │ └── impl │ │ │ │ │ ├── GenTemplateDetailServiceImpl.java │ │ │ │ │ └── GenTemplateServiceImpl.java │ │ │ │ ├── web │ │ │ │ ├── GenTemplateDetailRestController.java │ │ │ │ └── GenTemplateRestController.java │ │ │ │ └── wrapper │ │ │ │ ├── GenTemplateAndDetailModel.java │ │ │ │ ├── GenTemplateCopyModel.java │ │ │ │ ├── GenTemplateDetailModel.java │ │ │ │ └── GenTemplateModel.java │ │ │ └── plugins │ │ │ └── generator │ │ │ ├── FieldTypeAttribute.java │ │ │ ├── SqlSyncUtil.java │ │ │ ├── SyncStrategy.java │ │ │ ├── TypeFormatter.java │ │ │ ├── converter │ │ │ ├── ColumnTypeConverter.java │ │ │ └── JavaColumnTypeConverter.java │ │ │ ├── database │ │ │ ├── mysql │ │ │ │ ├── MySqlSyncBuilder.java │ │ │ │ ├── MySqlSyncColumnType.java │ │ │ │ └── MySqlTypeFormatter.java │ │ │ ├── oracle │ │ │ │ └── OracleTypeFormatter.java │ │ │ ├── postgresql │ │ │ │ └── PostgreSqlTypeFormatter.java │ │ │ └── sqlserver │ │ │ │ └── SqlServerTypeFormatter.java │ │ │ ├── enums │ │ │ ├── CodeType.java │ │ │ ├── DataBaseType.java │ │ │ ├── JavaType.java │ │ │ └── TypeEnum.java │ │ │ ├── exception │ │ │ └── GeneratorException.java │ │ │ ├── factory │ │ │ └── GeneratorFactory.java │ │ │ ├── msg │ │ │ └── GeneratorMsg.java │ │ │ ├── strategy │ │ │ └── create │ │ │ │ └── CodeBuilder.java │ │ │ └── utils │ │ │ ├── EnjoyUtil.java │ │ │ ├── GenTemplateUtil.java │ │ │ └── GeneratorHandleUtil.java │ │ └── resources │ │ └── generator.yaml ├── opsli-modulars-system │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opsli │ │ │ └── modulars │ │ │ ├── system │ │ │ ├── SystemMsg.java │ │ │ ├── area │ │ │ │ ├── api │ │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ │ └── SysArea.java │ │ │ │ ├── mapper │ │ │ │ │ ├── SysAreaMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── SysAreaMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── ISysAreaService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── SysAreaServiceImpl.java │ │ │ │ └── web │ │ │ │ │ └── SysAreaRestController.java │ │ │ ├── dict │ │ │ │ ├── api │ │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ │ ├── SysDict.java │ │ │ │ │ └── SysDictDetail.java │ │ │ │ ├── mapper │ │ │ │ │ ├── DictDetailMapper.java │ │ │ │ │ ├── DictMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ ├── DictDetailMapper.xml │ │ │ │ │ │ └── DictMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── IDictDetailService.java │ │ │ │ │ ├── IDictService.java │ │ │ │ │ └── impl │ │ │ │ │ │ ├── DictDetailServiceImpl.java │ │ │ │ │ │ └── DictServiceImpl.java │ │ │ │ └── web │ │ │ │ │ ├── DictDetailRestController.java │ │ │ │ │ └── DictRestController.java │ │ │ ├── login │ │ │ │ ├── dto │ │ │ │ │ ├── EmailCodeModel.java │ │ │ │ │ ├── LoginCodeModel.java │ │ │ │ │ ├── LoginModel.java │ │ │ │ │ └── MobileCodeModel.java │ │ │ │ ├── event │ │ │ │ │ └── BadCredentialsEvent.java │ │ │ │ ├── handler │ │ │ │ │ ├── before │ │ │ │ │ │ ├── LoginCodeModelVerifyCodeBeforeHandler.java │ │ │ │ │ │ ├── LoginModelVerifyCaptchaBeforeHandler.java │ │ │ │ │ │ └── LoginModelVerifyTempLockedBeforeHandler.java │ │ │ │ │ ├── error │ │ │ │ │ │ └── BizServiceErrorHandler.java │ │ │ │ │ └── success │ │ │ │ │ │ ├── LoginClearErrorSuccessHandler.java │ │ │ │ │ │ ├── LoginCodeModelCreateAccessTokenHandler.java │ │ │ │ │ │ ├── LoginModelClearCaptchaSuccessHandler.java │ │ │ │ │ │ ├── LoginModelCreateAccessTokenHandler.java │ │ │ │ │ │ ├── LoginSuccessAfterVerifyHandler.java │ │ │ │ │ │ └── LoginSuccessLogHandler.java │ │ │ │ ├── vo │ │ │ │ │ ├── AuthAccessAndRefreshTokenDto.java │ │ │ │ │ └── AuthAccessTokenDto.java │ │ │ │ └── web │ │ │ │ │ ├── LoginByAccountRestController.java │ │ │ │ │ ├── LoginByCodeRestController.java │ │ │ │ │ └── LoginCommonRestController.java │ │ │ ├── logs │ │ │ │ ├── api │ │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ │ ├── OperationLog.java │ │ │ │ │ ├── SysLoginLogs.java │ │ │ │ │ └── SysLogs.java │ │ │ │ ├── event │ │ │ │ │ ├── LoginLogEvent.java │ │ │ │ │ └── OperationLogEvent.java │ │ │ │ ├── factory │ │ │ │ │ └── UserLoginLogFactory.java │ │ │ │ ├── mapper │ │ │ │ │ ├── LogsMapper.java │ │ │ │ │ ├── OperationLogMapper.java │ │ │ │ │ ├── SysLoginLogsMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ ├── LogsMapper.xml │ │ │ │ │ │ ├── OperationLogMapper.xml │ │ │ │ │ │ └── SysLoginLogsMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── ILoginLogsService.java │ │ │ │ │ ├── ILogsService.java │ │ │ │ │ ├── IOperationLogService.java │ │ │ │ │ └── impl │ │ │ │ │ │ ├── LoginLogsServiceImpl.java │ │ │ │ │ │ ├── LogsServiceImpl.java │ │ │ │ │ │ └── OperationLogServiceImpl.java │ │ │ │ └── web │ │ │ │ │ ├── LoginLogsRestController.java │ │ │ │ │ ├── LogsRestController.java │ │ │ │ │ └── OperationLogRestController.java │ │ │ ├── menu │ │ │ │ ├── api │ │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ │ └── SysMenu.java │ │ │ │ ├── factory │ │ │ │ │ └── MenuFactory.java │ │ │ │ ├── mapper │ │ │ │ │ ├── MenuMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── MenuMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── IMenuService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── MenuServiceImpl.java │ │ │ │ └── web │ │ │ │ │ └── MenuRestController.java │ │ │ ├── monitor │ │ │ │ └── web │ │ │ │ │ └── MonitorController.java │ │ │ ├── options │ │ │ │ ├── entity │ │ │ │ │ └── SysOptions.java │ │ │ │ ├── mapper │ │ │ │ │ ├── SysOptionsMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── SysOptionsMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── ISysOptionsService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── SysOptionsServiceImpl.java │ │ │ │ └── web │ │ │ │ │ └── SysOptionsRestController.java │ │ │ ├── org │ │ │ │ ├── api │ │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ │ └── SysOrg.java │ │ │ │ ├── mapper │ │ │ │ │ ├── SysOrgMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── SysOrgMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── ISysOrgService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── SysOrgServiceImpl.java │ │ │ │ └── web │ │ │ │ │ └── SysOrgRestController.java │ │ │ ├── role │ │ │ │ ├── api │ │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ │ ├── SysRole.java │ │ │ │ │ └── SysRoleMenuRef.java │ │ │ │ ├── mapper │ │ │ │ │ ├── RoleMapper.java │ │ │ │ │ ├── RoleMenuRefMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ ├── RoleMapper.xml │ │ │ │ │ │ └── RoleMenuRefMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── IRoleMenuRefService.java │ │ │ │ │ ├── IRoleService.java │ │ │ │ │ └── impl │ │ │ │ │ │ ├── RoleMenuRefServiceImpl.java │ │ │ │ │ │ └── RoleServiceImpl.java │ │ │ │ └── web │ │ │ │ │ ├── RoleMenuRefRestController.java │ │ │ │ │ └── RoleRestController.java │ │ │ ├── tenant │ │ │ │ ├── api │ │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ │ └── SysTenant.java │ │ │ │ ├── mapper │ │ │ │ │ ├── TenantMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ └── TenantMapper.xml │ │ │ │ ├── service │ │ │ │ │ ├── ITenantService.java │ │ │ │ │ └── impl │ │ │ │ │ │ └── TenantServiceImpl.java │ │ │ │ └── web │ │ │ │ │ └── TenantRestController.java │ │ │ └── user │ │ │ │ ├── api │ │ │ │ └── README.md │ │ │ │ ├── entity │ │ │ │ ├── SysUser.java │ │ │ │ ├── SysUserOrgRef.java │ │ │ │ ├── SysUserRoleRef.java │ │ │ │ └── SysUserWeb.java │ │ │ │ ├── mapper │ │ │ │ ├── UserMapper.java │ │ │ │ ├── UserOrgRefMapper.java │ │ │ │ ├── UserRoleRefMapper.java │ │ │ │ └── xml │ │ │ │ │ ├── UserMapper.xml │ │ │ │ │ ├── UserOrgRefMapper.xml │ │ │ │ │ └── UserRoleRefMapper.xml │ │ │ │ ├── service │ │ │ │ ├── IUserOrgRefService.java │ │ │ │ ├── IUserRoleRefService.java │ │ │ │ ├── IUserService.java │ │ │ │ └── impl │ │ │ │ │ ├── UserOrgRefServiceImpl.java │ │ │ │ │ ├── UserRoleRefServiceImpl.java │ │ │ │ │ └── UserServiceImpl.java │ │ │ │ └── web │ │ │ │ ├── UserOrgRefRestController.java │ │ │ │ ├── UserRestController.java │ │ │ │ └── UserRoleRefRestController.java │ │ │ └── tools │ │ │ ├── api │ │ │ └── ApiController.java │ │ │ ├── common │ │ │ ├── CommonRestController.java │ │ │ ├── OperationAuthRestController.java │ │ │ └── bean │ │ │ │ └── VerificationCodeBean.java │ │ │ ├── email │ │ │ └── web │ │ │ │ └── EmailRestController.java │ │ │ ├── oss │ │ │ └── web │ │ │ │ └── OssRestController.java │ │ │ └── searchhis │ │ │ └── web │ │ │ └── SearchHisRestController.java │ │ └── test │ │ └── java │ │ └── LimiterTest.java ├── opsli-modulars-test │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opsli │ │ └── modulars │ │ ├── gentest │ │ ├── carinfo │ │ │ ├── entity │ │ │ │ └── TestCar.java │ │ │ ├── mapper │ │ │ │ ├── TestCarMapper.java │ │ │ │ └── xml │ │ │ │ │ └── TestCarMapper.xml │ │ │ ├── service │ │ │ │ ├── ITestCarService.java │ │ │ │ └── impl │ │ │ │ │ └── TestCarServiceImpl.java │ │ │ └── web │ │ │ │ └── TestCarRestController.java │ │ └── user │ │ │ ├── entity │ │ │ └── TestUser.java │ │ │ ├── mapper │ │ │ ├── TestUserMapper.java │ │ │ └── xml │ │ │ │ └── TestUserMapper.xml │ │ │ ├── service │ │ │ ├── ITestUserService.java │ │ │ └── impl │ │ │ │ └── TestUserServiceImpl.java │ │ │ └── web │ │ │ └── TestUserRestController.java │ │ └── test │ │ ├── api │ │ └── README.md │ │ ├── entity │ │ └── TestEntity.java │ │ ├── mapper │ │ ├── TestMapper.java │ │ └── xml │ │ │ └── TestMapper.xml │ │ ├── service │ │ ├── ITestService.java │ │ └── impl │ │ │ └── TestServiceImpl.java │ │ └── web │ │ └── TestRestController.java └── pom.xml ├── opsli-plugins ├── README.md ├── opsli-plugins-crypto │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── opsli │ │ └── plugins │ │ └── crypto │ │ ├── CryptoPlugin.java │ │ ├── enums │ │ ├── CryptoAsymmetricType.java │ │ └── CryptoSymmetricType.java │ │ ├── exception │ │ └── CryptoException.java │ │ ├── model │ │ ├── CryptoAsymmetric.java │ │ └── CryptoSymmetric.java │ │ ├── msg │ │ └── CryptoMsg.java │ │ ├── spring │ │ ├── annotation │ │ │ └── CryptoMapperField.java │ │ ├── crypto │ │ │ ├── ICrypto.java │ │ │ └── impl │ │ │ │ ├── AESCrypto.java │ │ │ │ ├── DESCrypto.java │ │ │ │ ├── DESEDECrypto.java │ │ │ │ └── SM4Crypto.java │ │ └── enums │ │ │ └── CryptoType.java │ │ └── strategy │ │ ├── CryptoAsymmetricService.java │ │ ├── CryptoSymmetricService.java │ │ └── impl │ │ ├── CryptoAsymmetricServiceImpl.java │ │ └── CryptoSymmetricServiceImpl.java ├── opsli-plugins-email │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opsli │ │ └── plugins │ │ └── email │ │ ├── EmailPlugin.java │ │ ├── conf │ │ └── EmailConfig.java │ │ ├── exception │ │ └── EmailPluginException.java │ │ ├── msg │ │ └── EmailMsg.java │ │ ├── service │ │ └── EmailPluginImpl.java │ │ └── wrapper │ │ └── EmailModel.java ├── opsli-plugins-excel │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opsli │ │ └── plugins │ │ └── excel │ │ ├── ExcelPlugin.java │ │ ├── annotation │ │ ├── CellFontFormat.java │ │ ├── CellStyleFormat.java │ │ └── ExcelInfo.java │ │ ├── exception │ │ └── ExcelPluginException.java │ │ ├── listener │ │ ├── BatchExcelListener.java │ │ └── ExcelListener.java │ │ └── msg │ │ └── ExcelMsg.java ├── opsli-plugins-redis │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ └── plugins │ │ │ └── redis │ │ │ ├── RedisLockPlugins.java │ │ │ ├── RedisPlugin.java │ │ │ ├── conf │ │ │ └── RedisPluginConfig.java │ │ │ ├── exception │ │ │ └── RedisPluginException.java │ │ │ ├── jsonserializer │ │ │ └── FastJson2JsonRedisSerializer.java │ │ │ ├── lock │ │ │ ├── RedisLock.java │ │ │ └── RedisLockImpl.java │ │ │ ├── msg │ │ │ └── RedisMsg.java │ │ │ ├── pushsub │ │ │ ├── entity │ │ │ │ ├── BaseSubMessage.java │ │ │ │ └── RedisPushSubMessage.java │ │ │ └── receiver │ │ │ │ └── BaseReceiver.java │ │ │ └── scripts │ │ │ ├── RedisScriptCache.java │ │ │ └── enums │ │ │ └── RedisScriptsEnum.java │ │ └── resources │ │ ├── META-INF │ │ ├── additional-spring-configuration-metadata.json │ │ └── spring.factories │ │ └── lua │ │ ├── redis_lock.lua │ │ └── redis_unlock.lua ├── opsli-plugins-redisson │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ └── plugins │ │ │ └── redisson │ │ │ ├── RedissonLock.java │ │ │ ├── RedissonManager.java │ │ │ ├── annotation │ │ │ ├── DistributedLock.java │ │ │ └── DistributedLockHandler.java │ │ │ ├── conf │ │ │ └── RedissonConfig.java │ │ │ ├── constant │ │ │ └── GlobalConstant.java │ │ │ ├── enums │ │ │ └── RedissonType.java │ │ │ ├── properties │ │ │ └── RedissonProperties.java │ │ │ └── strategy │ │ │ ├── RedissonConfigService.java │ │ │ └── impl │ │ │ ├── ClusterConfigImpl.java │ │ │ ├── MasterslaveConfigImpl.java │ │ │ ├── SentinelConfigImpl.java │ │ │ └── StandaloneConfigImpl.java │ │ └── resources │ │ └── META-INF │ │ ├── additional-spring-configuration-metadata.json │ │ └── spring.factories ├── opsli-plugins-security │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ └── plugins │ │ │ └── security │ │ │ ├── JwtConstants.java │ │ │ ├── LoginUserInfo.java │ │ │ ├── SecurityConfig.java │ │ │ ├── UserDetailModel.java │ │ │ ├── authentication │ │ │ ├── AfterAuthenticationToken.java │ │ │ ├── EmailCodeAuthenticationToken.java │ │ │ ├── EmailPasswordAuthenticationToken.java │ │ │ ├── MobileCodeAuthenticationToken.java │ │ │ └── MobilePasswordAuthenticationToken.java │ │ │ ├── checker │ │ │ ├── DefaultPostAuthenticationChecks.java │ │ │ └── DefaultPreAuthenticationChecks.java │ │ │ ├── eventbus │ │ │ ├── AbstractSpringSecuritySecurityEventBus.java │ │ │ ├── ISecurityEventBus.java │ │ │ ├── ISecurityEventConsumer.java │ │ │ └── SpringSecurityEventBus.java │ │ │ ├── eventdto │ │ │ └── BadCredentials.java │ │ │ ├── exception │ │ │ ├── AuthException.java │ │ │ ├── AuthServiceException.java │ │ │ ├── errorcode │ │ │ │ ├── AuthErrorCodeEnum.java │ │ │ │ └── BaseAuthMsg.java │ │ │ └── handler │ │ │ │ ├── AccessDeniedHandlerImpl.java │ │ │ │ ├── AuthEntryHandler.java │ │ │ │ ├── AuthEntryHandlerImpl.java │ │ │ │ └── AuthenticationEntryPointImpl.java │ │ │ ├── handler │ │ │ ├── AuthErrorHandler.java │ │ │ ├── AuthServiceErrorHandler.java │ │ │ ├── LoginAccessDeniedListener.java │ │ │ ├── LoginAccessSuccessListener.java │ │ │ ├── LoginBeforeListener.java │ │ │ ├── LoginHandler.java │ │ │ ├── OtherErrorHandler.java │ │ │ └── SecurityErrorHandler.java │ │ │ ├── properties │ │ │ └── AuthProperties.java │ │ │ ├── provider │ │ │ ├── EmailCodeAuthenticationProvider.java │ │ │ ├── EmailPasswordAuthenticationProvider.java │ │ │ ├── IAuthenticationProvider.java │ │ │ ├── MobileCodeAuthenticationProvider.java │ │ │ ├── MobilePasswordAuthenticationProvider.java │ │ │ └── UsernamePasswordAuthenticationProvider.java │ │ │ ├── service │ │ │ ├── ILoadUserDetailService.java │ │ │ └── LoadUserDetailServiceFactory.java │ │ │ ├── utils │ │ │ ├── IpaddrUtil.java │ │ │ ├── JWTUtil.java │ │ │ ├── PasswordUtil.java │ │ │ └── WebUtils.java │ │ │ └── vo │ │ │ └── AuthResultWrapper.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── opsli-plugins-sms │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ └── plugins │ │ │ └── sms │ │ │ ├── SmsConfig.java │ │ │ ├── SmsFactory.java │ │ │ ├── enums │ │ │ └── SmsType.java │ │ │ ├── exceptions │ │ │ └── SmsException.java │ │ │ ├── model │ │ │ └── SmsModel.java │ │ │ ├── msg │ │ │ └── SmsMsgCodeEnum.java │ │ │ └── service │ │ │ ├── SmsService.java │ │ │ └── impl │ │ │ └── AliYunSmsServiceImpl.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── opsli-plugins-waf │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ └── plugins │ │ │ └── waf │ │ │ ├── conf │ │ │ └── WafConfig.java │ │ │ ├── filter │ │ │ └── WafFilter.java │ │ │ ├── msg │ │ │ └── WafMsg.java │ │ │ ├── properties │ │ │ └── WafProperties.java │ │ │ ├── servlet │ │ │ └── WafHttpServletRequestWrapper.java │ │ │ └── util │ │ │ ├── SQLFilterKit.java │ │ │ └── XSSFilterKit.java │ │ └── resources │ │ └── META-INF │ │ ├── additional-spring-configuration-metadata.json │ │ └── spring.factories └── pom.xml ├── opsli-starter ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── opsli │ │ │ └── OpsliApplication.java │ └── resources │ │ ├── application-dev.yaml │ │ ├── application-local.yaml │ │ ├── application-prod.yaml │ │ ├── application-test.yaml │ │ ├── application.yaml │ │ ├── ftl │ │ └── email │ │ │ └── email_code.ftl │ │ ├── logback-spring.xml │ │ └── msg │ │ └── README.md │ └── test │ └── java │ └── TestValidatorUtil.java ├── pom.xml ├── push.bat └── push.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=Java 2 | *.css linguist-language=Java 3 | *.html linguist-language=Java 4 | *.vue linguist-language=Java 5 | *.sql linguist-language=Java 6 | *.lua linguist-language=Lua 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | HELP.md 3 | target/ 4 | logs/ 5 | !.mvn/wrapper/maven-wrapper.jar 6 | !**/src/main/** 7 | !**/src/test/** 8 | 9 | ### STS ### 10 | .apt_generated 11 | .classpath 12 | .factorypath 13 | .project 14 | .settings 15 | .springBeans 16 | .sts4-cache 17 | 18 | ### IntelliJ IDEA ### 19 | .idea 20 | *.iws 21 | *.iml 22 | *.ipr 23 | 24 | ### NetBeans ### 25 | /nbproject/private/ 26 | /nbbuild/ 27 | /dist/ 28 | /nbdist/ 29 | /.nb-gradle/ 30 | build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | /git-pull.sh 35 | /git-push.sh 36 | /app-log/ 37 | /app-opsli-log/ 38 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # openjdk 22 2 | FROM azul/zulu-openjdk:22-jre 3 | 4 | MAINTAINER opsli.com 5 | LABEL description=OPSLI-快速开发平台 6 | LABEL qqGroup=724850675 7 | 8 | # 设置环境常量 9 | ENV TZ=Asia/Shanghai 10 | 11 | # 工作目录 12 | WORKDIR /usr/local/opsli/opsli-boot 13 | 14 | # 日志输出 15 | RUN ["echo","OPSLI 快速开发平台 building..."] 16 | 17 | # 拷贝Jar 18 | COPY ./opsli-starter/target/*.jar ./app.jar 19 | 20 | # 切换为上海时区 21 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ 22 | && echo $TZ > /etc/timezone 23 | 24 | # 启动镜像 25 | ENTRYPOINT ["java", "-Dfile.encoding=utf-8", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] 26 | CMD ["-Xmx2048m", "-Xms2048m", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=200", "--spring.profiles.active=dev"] 27 | 28 | # 暴露端口 29 | EXPOSE 7000 30 | -------------------------------------------------------------------------------- /db-file/1.x版本/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mysql:8.0.19 2 | 3 | MAINTAINER opsli.com 4 | LABEL version=V1.3.3 5 | LABEL description=OPSLI-快速开发平台 6 | LABEL qqGroup=724850675 7 | 8 | ENV TZ=Asia/Shanghai 9 | 10 | # 切换为上海时区 11 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ 12 | && echo $TZ > /etc/timezone 13 | 14 | COPY ./opsli-boot.sql /docker-entrypoint-initdb.d -------------------------------------------------------------------------------- /db-file/1.x版本/升级SQL/1.6.3 =》1.6.4.sql: -------------------------------------------------------------------------------- 1 | SET NAMES utf8mb4; 2 | SET FOREIGN_KEY_CHECKS = 0; 3 | 4 | update sys_menu 5 | set parent_ids = CONCAT_WS(',', 0, id) 6 | where parent_id = 0; 7 | 8 | update sys_menu pp 9 | left join sys_menu p on p.id = pp.parent_id 10 | set 11 | pp.parent_ids = CONCAT_WS(',', p.parent_ids, pp.id) 12 | where p.parent_id = 0; 13 | 14 | update sys_menu ppp 15 | left join sys_menu pp on pp.id = ppp.parent_id 16 | left join sys_menu p on p.id = pp.parent_id 17 | set 18 | ppp.parent_ids = CONCAT_WS(',', pp.parent_ids, ppp.id) 19 | where p.parent_id = 0; 20 | 21 | 22 | update sys_menu pppp 23 | left join sys_menu ppp on ppp.id = pppp.parent_id 24 | left join sys_menu pp on pp.id = ppp.parent_id 25 | left join sys_menu p on p.id = pp.parent_id 26 | set 27 | pppp.parent_ids = CONCAT_WS(',', ppp.parent_ids, pppp.id) 28 | where p.parent_id = 0; 29 | 30 | 31 | 32 | update sys_menu ppppp 33 | left join sys_menu pppp on pppp.id = ppppp.parent_id 34 | left join sys_menu ppp on ppp.id = pppp.parent_id 35 | left join sys_menu pp on pp.id = ppp.parent_id 36 | left join sys_menu p on p.id = pp.parent_id 37 | set 38 | ppppp.parent_ids = CONCAT_WS(',', pppp.parent_ids, ppppp.id) 39 | where p.parent_id = 0; 40 | 41 | 42 | SET FOREIGN_KEY_CHECKS = 1; 43 | -------------------------------------------------------------------------------- /db-file/2.0版本/2.0 - 2.1.0 升级SQL.sql: -------------------------------------------------------------------------------- 1 | -- 删除vue2 组件菜单 2 | delete from sys_menu 3 | where parent_ids like '0,1314068325453574145,1314071137365307394%' 4 | or parent_ids like '0,1314068325453574145,1314123690283114498%'; 5 | 6 | 7 | -- 清理用户权限垃圾数据 8 | delete ref from sys_role_menu_ref ref 9 | left join sys_menu m on m.id = ref.menu_id 10 | where m.id is null; 11 | -------------------------------------------------------------------------------- /db-file/2.0版本/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mysql:8.0.19 2 | 3 | MAINTAINER opsli.com 4 | LABEL version=V2.1.4 5 | LABEL description=OPSLI-快速开发平台 6 | LABEL qqGroup=724850675 7 | 8 | ENV TZ=Asia/Shanghai 9 | 10 | # 切换为上海时区 11 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ 12 | && echo $TZ > /etc/timezone 13 | 14 | COPY ./opsli-boot.sql /docker-entrypoint-initdb.d 15 | -------------------------------------------------------------------------------- /db-file/2.2-springboot3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mysql:8.0.19 2 | 3 | MAINTAINER opsli.com 4 | LABEL version=V2.2.0 5 | LABEL description=OPSLI-快速开发平台 6 | LABEL qqGroup=724850675 7 | 8 | ENV TZ=Asia/Shanghai 9 | 10 | # 切换为上海时区 11 | RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ 12 | && echo $TZ > /etc/timezone 13 | 14 | COPY ./opsli-boot.sql /docker-entrypoint-initdb.d 15 | -------------------------------------------------------------------------------- /db-file/2.2-springboot3/说明.txt: -------------------------------------------------------------------------------- 1 | springboot3 与 springboot2版本不兼容 2 | -------------------------------------------------------------------------------- /db-file/账号密码.txt: -------------------------------------------------------------------------------- 1 | 超级管理员 - 2 | system Bb123456. 3 | 4 | 普通管理员账户 - 5 | admin Aa123456. 6 | 7 | 演示账户 - 8 | demo Aa123456. 9 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | services: 3 | opsli-boot: 4 | build: ./ 5 | restart: on-failure 6 | container_name: opsli-boot 7 | image: opsli-boot 8 | environment: 9 | TZ: Asia/Shanghai 10 | LANG: en_US.UTF-8 11 | command: 12 | - -Xmx2048m 13 | - -Xms2048m 14 | - -XX:+UseG1GC 15 | - -XX:MaxGCPauseMillis=200 16 | - --spring.profiles.active=test 17 | privileged: true 18 | volumes: 19 | - /www/wwwroot/demo.opsli.bedebug.com/backend/logs:/usr/local/opsli/opsli-boot/logs #挂载目录 20 | ports: 21 | - "7000:7000" 22 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/ApiFlag.java: -------------------------------------------------------------------------------- 1 | package org.opsli.api; 2 | 3 | /** 4 | * 标示文件 请勿删除 5 | * 6 | * @author Pace 7 | * @date 2020-11-21 15:15 8 | */ 9 | public interface ApiFlag { } 10 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/base/encrypt/BaseEncrypt.java: -------------------------------------------------------------------------------- 1 | package org.opsli.api.base.encrypt; 2 | 3 | import com.alibaba.excel.annotation.ExcelIgnore; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import io.swagger.v3.oas.annotations.media.Schema; 6 | import lombok.Data; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * 加解密 12 | * 13 | * @author Pace 14 | * @date 2021-01-24 12:48 下午 15 | **/ 16 | @Data 17 | public class BaseEncrypt implements Serializable { 18 | 19 | private static final long serialVersionUID = 1L; 20 | 21 | /** 加密数据 */ 22 | @Schema(description = "加密数据") 23 | @ExcelIgnore 24 | @TableField(exist = false) 25 | private String encryptData; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/base/encrypt/EncryptModel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.api.base.encrypt; 17 | 18 | import io.swagger.v3.oas.annotations.media.Schema; 19 | import lombok.Data; 20 | import org.opsli.common.annotation.validator.Validator; 21 | import org.opsli.common.annotation.validator.ValidatorLenMax; 22 | import org.opsli.common.enums.ValidatorType; 23 | 24 | import java.io.Serial; 25 | import java.io.Serializable; 26 | 27 | /** 28 | * 登陆 加解密 29 | * 30 | * @author Pace 31 | * @date 2021-01-24 12:48 下午 32 | **/ 33 | @Data 34 | public class EncryptModel implements Serializable { 35 | 36 | @Serial 37 | private static final long serialVersionUID = 1L; 38 | 39 | @Validator({ValidatorType.IS_NOT_NULL}) 40 | @ValidatorLenMax(2000) 41 | @Schema(description = "加密数据") 42 | private String encryptData; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/wrapper/system/dict/DictWrapper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.api.wrapper.system.dict; 17 | 18 | import lombok.Data; 19 | import lombok.EqualsAndHashCode; 20 | 21 | /** 22 | * 数据字典 - 工具类用 23 | * 24 | * @author Pace 25 | * @date 2020-09-16 17:33 26 | */ 27 | @Data 28 | @EqualsAndHashCode(callSuper = false) 29 | public class DictWrapper { 30 | 31 | /** 类型编号 - 冗余 */ 32 | private String typeCode; 33 | 34 | /** 字典名称 */ 35 | private String dictName; 36 | 37 | /** 字典值 */ 38 | private String dictValue; 39 | 40 | /** 排序 */ 41 | private Integer dictSort; 42 | 43 | /** 消息 */ 44 | private DictDetailModel model; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/wrapper/system/user/EnableUserModel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.api.wrapper.system.user; 17 | 18 | import lombok.Data; 19 | import org.opsli.common.annotation.validator.Validator; 20 | import org.opsli.common.annotation.validator.ValidatorLenMax; 21 | import org.opsli.common.enums.ValidatorType; 22 | 23 | /** 24 | * 启用用户 25 | * 26 | * @author Pace 27 | * @date 2022-07-16 8:14 PM 28 | **/ 29 | @Data 30 | public class EnableUserModel { 31 | 32 | /** 主键 */ 33 | @Validator({ValidatorType.IS_NOT_NULL}) 34 | @ValidatorLenMax(50) 35 | private String userId; 36 | 37 | /** 是否启用 */ 38 | @Validator({ValidatorType.IS_NOT_NULL}) 39 | @ValidatorLenMax(10) 40 | private String enabled; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UpdateUserEmailModel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.api.wrapper.system.user; 17 | 18 | import lombok.Data; 19 | import org.opsli.common.annotation.validator.Validator; 20 | import org.opsli.common.annotation.validator.ValidatorLenMax; 21 | import org.opsli.common.enums.ValidatorType; 22 | 23 | /** 24 | * 修改用户邮箱 25 | * 26 | * @author Pace 27 | * @date 2022-07-16 8:14 PM 28 | **/ 29 | @Data 30 | public class UpdateUserEmailModel { 31 | 32 | /** 主键 */ 33 | @Validator({ValidatorType.IS_NOT_NULL, ValidatorType.IS_EMAIL}) 34 | @ValidatorLenMax(50) 35 | private String email; 36 | 37 | /** 验证码 */ 38 | @Validator({ValidatorType.IS_NOT_NULL}) 39 | @ValidatorLenMax(20) 40 | private String verificationCode; 41 | 42 | /** 凭证 */ 43 | @Validator({ValidatorType.IS_NOT_NULL}) 44 | private String certificate; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UpdateUserMobileModel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.api.wrapper.system.user; 17 | 18 | import lombok.Data; 19 | import org.opsli.common.annotation.validator.Validator; 20 | import org.opsli.common.annotation.validator.ValidatorLenMax; 21 | import org.opsli.common.enums.ValidatorType; 22 | 23 | /** 24 | * 修改用户手机 25 | * 26 | * @author Pace 27 | * @date 2022-07-16 8:14 PM 28 | **/ 29 | @Data 30 | public class UpdateUserMobileModel { 31 | 32 | /** 主键 */ 33 | @Validator({ValidatorType.IS_NOT_NULL, ValidatorType.IS_MOBILE}) 34 | @ValidatorLenMax(50) 35 | private String mobile; 36 | 37 | /** 验证码 */ 38 | @Validator({ValidatorType.IS_NOT_NULL}) 39 | @ValidatorLenMax(20) 40 | private String verificationCode; 41 | 42 | /** 凭证 */ 43 | @Validator({ValidatorType.IS_NOT_NULL}) 44 | private String certificate; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UserAvatarModel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.api.wrapper.system.user;
17 |
18 | import io.swagger.v3.oas.annotations.media.Schema;
19 | import lombok.Data;
20 | import lombok.EqualsAndHashCode;
21 | import org.opsli.common.annotation.validator.Validator;
22 | import org.opsli.common.enums.ValidatorType;
23 |
24 | /**
25 | * 用户信息表
26 | *
27 | * @author Pace
28 | * @date 2020-09-16 17:33
29 | */
30 | @Data
31 | @EqualsAndHashCode(callSuper = false)
32 | public class UserAvatarModel {
33 |
34 | @Schema(description = "图片地址")
35 | @Validator({ValidatorType.IS_NOT_NULL, ValidatorType.IS_URL})
36 | private String imgUrl;
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-common/README.md:
--------------------------------------------------------------------------------
1 | ## opsli 公共模块
2 | 1. core 核心
3 | 2. utils 工具类
4 | 3. api 统一RestFul返回API
5 | 4. base 基础类
6 | 5. conf 配置类
7 | 6. constant 常量类
8 | 7. excption 异常类
9 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-common/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation; 17 | 18 | 19 | import org.opsli.common.enums.AlertType; 20 | import org.opsli.common.utils.RateLimiterUtil; 21 | 22 | import java.lang.annotation.*; 23 | 24 | /** 25 | * Java 限流器 26 | * 27 | * @author Pace 28 | * @date 2020-12-31 29 | */ 30 | @Target(ElementType.METHOD) 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Documented 33 | public @interface Limiter { 34 | 35 | /** QPS */ 36 | double qps() default RateLimiterUtil.DEFAULT_QPS; 37 | 38 | /** 提醒方式 */ 39 | AlertType alertType() default AlertType.JSON; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/OptionDict.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation; 17 | 18 | 19 | import java.lang.annotation.*; 20 | 21 | /** 22 | * 参数配置 23 | * 24 | * @author Pace 25 | * @date 2020-09-22 17:07 26 | */ 27 | @Target(ElementType.FIELD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Documented 30 | public @interface OptionDict { 31 | 32 | /** 参数编码 */ 33 | String value(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/SearchHis.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation; 17 | 18 | import java.lang.annotation.*; 19 | 20 | /** 21 | * 搜索历史注解 22 | * 默认按照当前用户 key, 搜索记录排行最高 23 | * 24 | * @author Pace 25 | * @date 2020-09-22 17:07 26 | */ 27 | @Target(ElementType.METHOD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Documented 30 | public @interface SearchHis { 31 | 32 | /** 33 | * 搜索 key,即 url 参数key 34 | * 35 | * http://127.0.0.1/opsli-boot?username=123 36 | * 37 | * username 就是 key 38 | * 39 | * 如果使用条件构造器, 比如 username_EQ key需要一致 40 | * 41 | */ 42 | String[] keys(); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/hotdata/EnableHotData.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation.hotdata; 17 | 18 | import java.lang.annotation.*; 19 | 20 | /** 21 | * 添加在 Service get 方法上 , 默认获得 传入对象 key为id的数据 22 | * 23 | * 调用 热点数据 不论增加缓存 还是 删除缓存 24 | * 返回值 必须为 集成了 BaseEntity 的 类 25 | * 26 | * 注意:不论是什么缓存,只要是缓存 就多少会有一致性的问题,针对不是那么重要的数据 且高频访问的数据可以缓存起来 27 | * 28 | * 主动式 推送热点数据 29 | * 30 | * 用于 注解类 - 直接按照类开启 增 删 经过缓存 31 | * 32 | * 并发更新 不建议使用 热数据 ☆☆☆☆☆ 33 | * 34 | * @author Pace 35 | * @date 2020-09-16 16:36 36 | */ 37 | @Retention(RetentionPolicy.RUNTIME) 38 | @Target(ElementType.TYPE) 39 | @Documented 40 | public @interface EnableHotData { 41 | 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/hotdata/HotDataDel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation.hotdata; 17 | 18 | 19 | import java.lang.annotation.*; 20 | 21 | /** 22 | * 添加在 Service get 方法上 , 默认获得 传入对象 key为id的数据 23 | * 24 | * 调用 热点数据 不论增加缓存 还是 删除缓存 25 | * 返回值 必须为 集成了 BaseEntity 的 类 26 | * 27 | * 注意:不论是什么缓存,只要是缓存 就多少会有一致性的问题,针对不是那么重要的数据 且高频访问的数据可以缓存起来 28 | * 29 | * 并发更新 不建议使用 热数据 ☆☆☆☆☆ 30 | * 31 | * @author Pace 32 | * @date 2020-09-16 16:36 33 | */ 34 | @Retention(RetentionPolicy.RUNTIME) 35 | @Target(ElementType.METHOD) 36 | @Documented 37 | public @interface HotDataDel { 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/hotdata/HotDataPut.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation.hotdata; 17 | 18 | 19 | import java.lang.annotation.*; 20 | 21 | /** 22 | * 添加在 Service get 方法上 , 默认获得 传入对象 key为id的数据 23 | * 24 | * 调用 热点数据 不论增加缓存 还是 删除缓存 25 | * 返回值 必须为 集成了 BaseEntity 的 类 26 | * 27 | * 注意:不论是什么缓存,只要是缓存 就多少会有一致性的问题,针对不是那么重要的数据 且高频访问的数据可以缓存起来 28 | * 29 | * 并发更新 不建议使用 热数据 ☆☆☆☆☆ 30 | * 31 | * @author Pace 32 | * @date 2020-09-16 16:36 33 | */ 34 | @Retention(RetentionPolicy.RUNTIME) 35 | @Target(ElementType.METHOD) 36 | @Documented 37 | public @interface HotDataPut { 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/validator/Validator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation.validator; 17 | 18 | import org.opsli.common.enums.ValidatorType; 19 | 20 | import java.lang.annotation.*; 21 | 22 | /** 23 | * 字段验证器 24 | * 25 | * @author Pace 26 | * @date 2020-09-22 17:07 27 | */ 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Target(ElementType.FIELD) 30 | @Documented 31 | public @interface Validator { 32 | 33 | ValidatorType[] value(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/validator/ValidatorLenMax.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation.validator; 17 | 18 | 19 | import java.lang.annotation.*; 20 | 21 | /** 22 | * 字段验证器 - 字段最大长度 23 | * 对应 数据库 真实长度数 24 | * 25 | * @author Pace 26 | * @date 2020-09-22 17:07 27 | */ 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Target(ElementType.FIELD) 30 | @Documented 31 | public @interface ValidatorLenMax { 32 | 33 | int value(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/annotation/validator/ValidatorLenMin.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.annotation.validator; 17 | 18 | 19 | import java.lang.annotation.*; 20 | 21 | /** 22 | * 字段验证器 - 字段最大长度 23 | * 对应 数据库 真实长度数 24 | * 25 | * @author Pace 26 | * @date 2020-09-22 17:07 27 | */ 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Target(ElementType.FIELD) 30 | @Documented 31 | public @interface ValidatorLenMin { 32 | 33 | int value(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/base/msg/BaseMsg.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.base.msg; 17 | 18 | /** 19 | * 总消息类 用来存放消息 20 | * opsli将消息全部提取出至一个总文件 21 | * 22 | * @author Pace 23 | * @date 2020-09-22 17:07 24 | */ 25 | public interface BaseMsg { 26 | 27 | /** 28 | * 获取消息的状态码 29 | */ 30 | Integer getCode(); 31 | 32 | /** 33 | * 获取消息提示信息 34 | */ 35 | String getMessage(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/constants/CacheConstants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.constants; 17 | 18 | /** 19 | * 缓存 常量 20 | * 21 | * @author Pace 22 | * @date 2020-09-22 17:07 23 | */ 24 | public final class CacheConstants { 25 | 26 | public static final String PREFIX_NAME = "opsli"; 27 | 28 | /** Ehcache 缓存存放空间 */ 29 | public static final String EHCACHE_SPACE = "timed"; 30 | 31 | /** 热数据前缀 */ 32 | public static final String HOT_DATA_PREFIX = "hot_data"; 33 | 34 | 35 | private CacheConstants(){} 36 | } 37 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/constants/MenuConstants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.constants; 17 | 18 | /** 19 | * 菜单常量 20 | * 21 | * @author Pace 22 | * @date 2021年3月10日15:50:16 23 | */ 24 | public final class MenuConstants { 25 | 26 | /** 菜单根节点ID */ 27 | public static final String GEN_ID = "0"; 28 | 29 | /** 菜单类型 */ 30 | public static final String MENU = "1"; 31 | 32 | /** 按钮类型 */ 33 | public static final String BUTTON = "2"; 34 | 35 | /** 外链类型 */ 36 | public static final String EXTERNAL = "3"; 37 | 38 | private MenuConstants(){} 39 | 40 | } 41 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/constants/SignConstants.java: -------------------------------------------------------------------------------- 1 | package org.opsli.common.constants; 2 | 3 | /** 4 | * 签名 5 | * 6 | * @author Pace 7 | * @date 2020-09-16 17:42 8 | */ 9 | public final class SignConstants { 10 | 11 | /** 用户账号 */ 12 | public static final String ACCOUNT = "account"; 13 | 14 | /** 用户ID */ 15 | public static final String USER_ID = "userId"; 16 | 17 | /** 租户ID */ 18 | public static final String TENANT_ID = "tenantId"; 19 | 20 | /** 登陆来源 */ 21 | public static final String LOGIN_FROM = "loginFrom"; 22 | 23 | /** 时间戳 */ 24 | public static final String TIMESTAMP = "timestamp"; 25 | 26 | /** 其他信息 */ 27 | public static final String OTHER = "other"; 28 | 29 | /** 签名 类型 */ 30 | public static final String TYPE = "type"; 31 | 32 | private SignConstants(){} 33 | 34 | } 35 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/constants/TokenConstants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.constants; 17 | 18 | /** 19 | * Token 常量类 20 | * 21 | * @author Pace 22 | * @date 2020-09-16 17:42 23 | */ 24 | public final class TokenConstants { 25 | 26 | /** ACCESS_TOKEN */ 27 | public static final String ACCESS_TOKEN = "X-Token"; 28 | 29 | 30 | private TokenConstants(){} 31 | } 32 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/constants/TokenTypeConstants.java: -------------------------------------------------------------------------------- 1 | package org.opsli.common.constants; 2 | 3 | /** 4 | * Token类型 5 | * 6 | * @author Pace 7 | * @date 2020-09-16 17:42 8 | */ 9 | public final class TokenTypeConstants { 10 | 11 | /** 系统内部TOKEN */ 12 | public static final String TYPE_SYSTEM = "system"; 13 | 14 | /** 外部TOKEN */ 15 | public static final String TYPE_EXTERNAL = "external"; 16 | 17 | private TokenTypeConstants(){} 18 | } 19 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/constants/TreeConstants.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.constants; 17 | 18 | /** 19 | * 菜单常量 20 | * 21 | * @author Pace 22 | * @date 2021年3月10日15:50:16 23 | */ 24 | public final class TreeConstants { 25 | 26 | /** 是否包含子集 */ 27 | public static final String HAS_CHILDREN = "hasChildren"; 28 | 29 | 30 | /** 是否是叶子节点 */ 31 | public static final String IS_LEAF = "isLeaf"; 32 | 33 | 34 | private TreeConstants(){} 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/enums/AlertType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.enums; 17 | 18 | 19 | /** 20 | * 字典 21 | * 22 | * @author Pace 23 | * @date 2020-09-16 17:42 24 | */ 25 | public enum AlertType { 26 | 27 | /** alert 弹出 */ 28 | ALERT, 29 | 30 | /** JSON 回推*/ 31 | JSON, 32 | 33 | ; 34 | } 35 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/enums/ExcelOperate.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.enums; 17 | 18 | 19 | /** 20 | * Excel 操作类型 21 | * 22 | * @author Pace 23 | * @date 2020-09-16 17:42 24 | */ 25 | public enum ExcelOperate { 26 | 27 | /** 28 | * 读 29 | */ 30 | READ, 31 | 32 | /** 33 | * 写 34 | */ 35 | WRITE; 36 | 37 | ; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/enums/LoginLimitRefuse.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.enums; 17 | 18 | 19 | /** 20 | * 登录拒绝策略 21 | * 22 | * @author Pace 23 | * @date 2020-09-17 23:40 24 | */ 25 | public enum LoginLimitRefuse { 26 | 27 | /** 28 | * 前者 29 | */ 30 | BEFORE, 31 | 32 | /** 33 | * 后者 34 | */ 35 | AFTER; 36 | 37 | ; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/enums/SystemInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.enums; 17 | 18 | import java.util.UUID; 19 | 20 | /** 21 | * 通过单例 模式 生成系统唯一标示 22 | * 23 | * @author Pace 24 | * @date 2020-09-17 23:40 25 | */ 26 | public enum SystemInfo { 27 | 28 | /** 实例 */ 29 | INSTANCE; 30 | 31 | private final String systemID; 32 | 33 | SystemInfo(){ 34 | // 生成系统ID 35 | systemID = UUID.randomUUID().toString().replaceAll("-",""); 36 | } 37 | 38 | /** 39 | * 获得系统ID 40 | * @return String 41 | */ 42 | public String getSystemID() { 43 | return systemID; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/exception/EmptyException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.exception; 17 | 18 | 19 | /** 20 | * 空异常 21 | * 22 | * @author Pace 23 | * @date 2020-09-17 23:40 24 | */ 25 | public class EmptyException extends ServiceException{ 26 | 27 | private Integer code; 28 | 29 | private String errorMessage; 30 | 31 | public EmptyException() { 32 | super(400, "请求数据不完整或格式错误!"); 33 | } 34 | 35 | @Override 36 | public synchronized Throwable fillInStackTrace() { 37 | return null; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/exception/JwtException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.exception; 17 | 18 | import org.opsli.common.base.msg.BaseMsg; 19 | 20 | /** 21 | * Jwt 异常 22 | * 23 | * @author Pace 24 | * @date 2020-09-17 23:40 25 | */ 26 | public class JwtException extends ServiceException { 27 | 28 | public JwtException(Integer code, String errorMessage) { 29 | super(code, errorMessage); 30 | } 31 | 32 | public JwtException(BaseMsg msg) { 33 | super(msg); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/exception/TokenException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.exception; 17 | 18 | import org.opsli.common.base.msg.BaseMsg; 19 | 20 | /** 21 | * 认证 异常 22 | * 23 | * @author Pace 24 | * @date 2020-09-13 19:41 25 | */ 26 | public class TokenException extends ServiceException { 27 | 28 | public TokenException(Integer code, String errorMessage) { 29 | super(code, errorMessage); 30 | } 31 | 32 | public TokenException(BaseMsg msg) { 33 | super(msg); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/exception/WafException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.exception; 17 | 18 | import org.opsli.common.base.msg.BaseMsg; 19 | 20 | /** 21 | * Java 防火墙 异常类 22 | * 23 | * @author Pace 24 | * @date 2020-10-09 25 | */ 26 | public class WafException extends ServiceException { 27 | 28 | public WafException(Integer code, String errorMessage) { 29 | super(code, errorMessage); 30 | } 31 | 32 | public WafException(BaseMsg msg) { 33 | super(msg); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/thread/AsyncProcessExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.common.thread; 17 | 18 | import java.util.function.Function; 19 | 20 | /** 21 | * 异步进程 执行器 22 | * 23 | * @author Pace 24 | * @date 2021年7月15日13:43:37 25 | */ 26 | public interface AsyncProcessExecutor { 27 | 28 | 29 | /** 30 | * 存放任务 31 | * @param task 任务 32 | * @return AsyncProcessExecutor 33 | */ 34 | AsyncProcessExecutor put(final Runnable task); 35 | 36 | /** 37 | * 执行 38 | * @return boolean 39 | */ 40 | boolean execute(); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-common/src/main/java/org/opsli/common/thread/AsyncProcessExecutorFactory.java: -------------------------------------------------------------------------------- 1 | package org.opsli.common.thread; 2 | 3 | /** 4 | * 异步进程 执行器 工厂 5 | * 6 | * @author Pace 7 | * @date 2021年7月15日13:43:37 8 | */ 9 | public final class AsyncProcessExecutorFactory { 10 | 11 | /** 12 | * 创建等待执行器 13 | * @return AsyncProcessExecutor 14 | */ 15 | public static AsyncProcessExecutor createWaitExecutor(){ 16 | return new AsyncProcessExecutorByWait(); 17 | } 18 | 19 | /** 20 | * 创建等待执行器 21 | * @param key KEY 22 | * @return AsyncProcessExecutor 23 | */ 24 | public static AsyncProcessExecutor createWaitExecutor(String key){ 25 | return new AsyncProcessExecutorByWait(key); 26 | } 27 | 28 | /** 29 | * 创建正常执行器 30 | * @return AsyncProcessExecutor 31 | */ 32 | public static AsyncProcessExecutor createNormalExecutor(){ 33 | return new AsyncProcessExecutorByNormal(); 34 | } 35 | 36 | /** 37 | * 创建正常执行器 38 | * @param key KEY 39 | * @return AsyncProcessExecutor 40 | */ 41 | public static AsyncProcessExecutor createNormalExecutor(String key){ 42 | return new AsyncProcessExecutorByNormal(key); 43 | } 44 | 45 | // ===================== 46 | 47 | private AsyncProcessExecutorFactory(){} 48 | 49 | } 50 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-core/src/main/java/org/opsli/core/autoconfigure/properties/ApiPathProperties.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.core.autoconfigure.properties; 17 | 18 | import lombok.Data; 19 | import lombok.EqualsAndHashCode; 20 | import org.springframework.boot.context.properties.ConfigurationProperties; 21 | import org.springframework.context.annotation.Configuration; 22 | import org.springframework.stereotype.Component; 23 | 24 | /** 25 | * 接口路径前缀配置 26 | * 27 | * @author Pace 28 | * @date 2020-09-15 29 | */ 30 | @Configuration 31 | @ConfigurationProperties(prefix = ApiPathProperties.PROP_PREFIX) 32 | @Data 33 | @EqualsAndHashCode(callSuper = false) 34 | public class ApiPathProperties { 35 | 36 | public static final String PROP_PREFIX = "server.servlet.api.path"; 37 | 38 | /** 专门针对 Controller层接口路径前缀全局配置 */ 39 | private String globalPrefix; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-core/src/main/java/org/opsli/core/autoconfigure/properties/CacheProperties.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.core.autoconfigure.properties; 17 | 18 | import lombok.Data; 19 | import lombok.EqualsAndHashCode; 20 | import org.springframework.boot.context.properties.ConfigurationProperties; 21 | import org.springframework.context.annotation.Configuration; 22 | import org.springframework.stereotype.Component; 23 | 24 | /** 25 | * 接口路径前缀配置 26 | * 27 | * @author Pace 28 | * @date 2020-09-15 29 | */ 30 | @Configuration 31 | @ConfigurationProperties(prefix = CacheProperties.PROP_PREFIX) 32 | @Data 33 | @EqualsAndHashCode(callSuper = false) 34 | public class CacheProperties { 35 | 36 | public static final String PROP_PREFIX = "spring.cache"; 37 | 38 | /** 缓存前缀 */ 39 | private String prefix; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-core/src/main/java/org/opsli/core/autoconfigure/properties/EncryptProperties.java: -------------------------------------------------------------------------------- 1 | package org.opsli.core.autoconfigure.properties; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | /** 9 | * 加密配置加载 10 | * 11 | * @author Pace 12 | * @date 2022-08-07 13 | */ 14 | @Configuration 15 | @ConfigurationProperties(prefix = EncryptProperties.PROP_PREFIX) 16 | @Data 17 | @EqualsAndHashCode(callSuper = false) 18 | public class EncryptProperties { 19 | 20 | public static final String PROP_PREFIX = "opsli.data-encrypt"; 21 | 22 | /** 秘钥 */ 23 | private String key; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-core/src/main/java/org/opsli/core/autoconfigure/properties/TokenProperties.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.core.autoconfigure.properties; 17 | 18 | import lombok.Data; 19 | import lombok.EqualsAndHashCode; 20 | import org.springframework.boot.context.properties.ConfigurationProperties; 21 | import org.springframework.context.annotation.Configuration; 22 | import org.springframework.stereotype.Component; 23 | 24 | /** 25 | * Token配置 26 | * 27 | * @author Pace 28 | * @date 2020-09-15 29 | */ 30 | @Configuration 31 | @ConfigurationProperties(prefix = TokenProperties.PROP_PREFIX) 32 | @Data 33 | @EqualsAndHashCode(callSuper = false) 34 | public class TokenProperties { 35 | 36 | public static final String PROP_PREFIX = "opsli.auth.token"; 37 | 38 | /** 盐 */ 39 | private String secret; 40 | 41 | /** 有效时间 */ 42 | private int effectiveTime; 43 | 44 | } 45 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-core/src/main/java/org/opsli/core/base/entity/HasChildren.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package org.opsli.core.base.entity; 17 | 18 | import lombok.Data; 19 | import lombok.EqualsAndHashCode; 20 | 21 | /** 22 | * Tree表 23 | * 24 | * @author Pace 25 | * @date 2020-09-15 26 | */ 27 | @Data 28 | @EqualsAndHashCode(callSuper = false) 29 | public class HasChildren { 30 | 31 | 32 | /** 父级主键 */ 33 | private String parentId; 34 | 35 | /** 下级数量 */ 36 | private Integer count; 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /opsli-base-support/opsli-core/src/main/java/org/opsli/core/base/service/base/BaseService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com 3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.base.service.base;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
20 | import org.opsli.core.base.entity.BaseEntity;
21 | import org.opsli.core.base.service.interfaces.BaseServiceInterface;
22 |
23 | /**
24 | * 基础Service
25 | *
26 | * @author Pace
27 | * @date 2020-09-15
28 | */
29 | public abstract class BaseService
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.base.service.interfaces;
17 |
18 | import com.baomidou.mybatisplus.extension.service.IService;
19 |
20 | /**
21 | * 基础服务接口
22 | *
23 | * @author Pace
24 | * @date 2020-09-15
25 | */
26 | public interface BaseServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.eventbus;
17 |
18 | /**
19 | * EventBus 接口
20 | *
21 | * @author Pace
22 | * @date 2021年12月7日10:38:24
23 | */
24 | public interface IEventBus {
25 | /**
26 | * 发布事件
27 | * @param event 事件实体
28 | */
29 | void post(Object event);
30 |
31 | /**
32 | * 添加消费者
33 | * @param obj 消费者对象,默认以class为key
34 | */
35 | void addConsumer(Object obj);
36 |
37 | /**
38 | * 移除消费者
39 | * @param obj 消费者对象,默认以class为key
40 | */
41 | void removeConsumer(Object obj);
42 |
43 | /**
44 | * 扫描消费者
45 | * @param packageName 扫描包
46 | */
47 | void scanConsumer(String packageName);
48 | }
49 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/java/org/opsli/core/eventbus/IEventConsumer.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.eventbus;
17 |
18 | /**
19 | * EventBus 消费者接口
20 | *
21 | * @author Pace
22 | * @date 2020/9/25 12:19
23 | */
24 | public interface IEventConsumer
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.log.enums;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Getter;
20 |
21 | /**
22 | * 日志级别枚举
23 | *
24 | * @author Pace
25 | * @date 2021年7月15日20:28:24
26 | */
27 | @Getter
28 | @AllArgsConstructor
29 | public enum LogLevelEnum {
30 |
31 | /**
32 | * 日志级别枚举
33 | */
34 | DEBUG("-1"),
35 | INFO("0"),
36 | WARN("1"),
37 | ERROR("2"),
38 | TRACE("3");
39 |
40 | private final String value;
41 | }
42 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/java/org/opsli/core/log/enums/LogScopeEnum.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.log.enums;
17 |
18 | /**
19 | * 日志记录范围
20 | *
21 | * @author Pace
22 | * @date 2021年7月15日20:28:24
23 | */
24 | public enum LogScopeEnum {
25 |
26 | /**
27 | * 日志记录范围
28 | */
29 | ALL(0),
30 | REQUEST(1),
31 | RESPONSE(2)
32 | ;
33 |
34 | private final int value;
35 |
36 | public int getValue() {
37 | return value;
38 | }
39 |
40 | LogScopeEnum(int value) {
41 | this.value = value;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/java/org/opsli/core/log/enums/LogTypeEnum.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.log.enums;
17 |
18 | /**
19 | * 日志类型
20 | *
21 | * @author Pace
22 | * @date 2021年7月15日20:28:24
23 | */
24 | public enum LogTypeEnum {
25 |
26 | /** WEB */
27 | WEB("0"),
28 |
29 | /** 客户端 */
30 | CLIENT("1"),
31 |
32 | /** 后端 */
33 | BACKEND("2"),
34 |
35 | /** 程序自动 */
36 | AUTO("3")
37 | ;
38 |
39 | private final String value;
40 |
41 | public String getValue() {
42 | return value;
43 | }
44 |
45 | LogTypeEnum(String value) {
46 | this.value = value;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/java/org/opsli/core/log/enums/OperationTypeEnum.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.log.enums;
17 |
18 | /**
19 | * 操作类型
20 | *
21 | * @author Pace
22 | * @date 2021年7月15日20:27:27
23 | */
24 | public enum OperationTypeEnum {
25 | /**
26 | * 操作类型
27 | */
28 | UNKNOWN("unknown"),
29 | DELETE("delete"),
30 | SELECT("select"),
31 | UPDATE("update"),
32 | INSERT("insert");
33 |
34 | private String value;
35 |
36 | public String getValue() {
37 | return value;
38 | }
39 |
40 | public void setValue(String value) {
41 | this.value = value;
42 | }
43 |
44 | OperationTypeEnum(String s) {
45 | this.value = s;
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/java/org/opsli/core/msg/JwtMsg.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.msg;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 |
20 | /**
21 | * JWT类 - 消息
22 | *
23 | * @author Pace
24 | * @date 2020-09-13 19:36
25 | */
26 | public enum JwtMsg implements BaseMsg {
27 |
28 | /** 异常消息 */
29 | EXCEPTION_TOKEN(11000,"认证解密异常: {}"),
30 | EXCEPTION_DECODE(10101,"解密异常: {}"),
31 | EXCEPTION_ENCODE(10102,"加密异常: {}"),
32 |
33 |
34 | ;
35 |
36 | private final int code;
37 | private final String message;
38 |
39 | JwtMsg(int code, String message){
40 | this.code = code;
41 | this.message = message;
42 | }
43 |
44 | @Override
45 | public Integer getCode() {
46 | return this.code;
47 | }
48 |
49 | @Override
50 | public String getMessage() {
51 | return this.message;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/java/org/opsli/core/persistence/querybuilder/GenQueryBuilder.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.persistence.querybuilder;
17 |
18 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
19 | import org.opsli.core.base.entity.BaseEntity;
20 |
21 | /**
22 | * Web 条件构造器
23 | *
24 | * @author Pace
25 | * @date 2020-09-21 23:57
26 | */
27 | public class GenQueryBuilder
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.persistence.querybuilder;
17 |
18 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
19 | import org.opsli.core.base.entity.BaseEntity;
20 |
21 |
22 | /**
23 | * 查询构造器
24 | *
25 | * @author Pace
26 | * @date 2020-09-21 23:57
27 | */
28 | public interface QueryBuilder
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.core.utils.excel.factory;
17 |
18 |
19 | import cn.hutool.json.JSONObject;
20 | import org.opsli.api.base.warpper.ApiWrapper;
21 |
22 | /**
23 | *
24 | * 抽象 实体助手
25 | *
26 | * @author Pace
27 | * @date 2020-09-16
28 | */
29 | public abstract class AbstractModelHelper {
30 |
31 | /**
32 | * 抽象 创建导入对象
33 | *
34 | * @param dictJson 字典Json
35 | * @param wrapper 导入 wrapper
36 | */
37 | abstract public void transformByImport(JSONObject dictJson, ApiWrapper wrapper);
38 |
39 | /**
40 | * 抽象 创建导出对象
41 | *
42 | * @param dictJson 字典Json
43 | * @param wrapper 导出 wrapper
44 | */
45 | abstract public void transformByExport(JSONObject dictJson, ApiWrapper wrapper);
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/java/org/opsli/plugins/oss/conf/ConfigFactory.java:
--------------------------------------------------------------------------------
1 | package org.opsli.plugins.oss.conf;
2 |
3 |
4 | /**
5 | * 获得配置信息 接口
6 | *
7 | * @author Pace
8 | * @date 2021年5月7日17:39:32
9 | */
10 | public interface ConfigFactory
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.oss.exception;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 | import org.opsli.common.exception.ServiceException;
20 |
21 | /**
22 | * 存储服务 异常
23 | *
24 | * @author Pace
25 | * @date 2020-09-16 11:47
26 | */
27 | public class StoragePluginException extends ServiceException {
28 |
29 | public StoragePluginException(Integer code, String errorMessage) {
30 | super(code, errorMessage);
31 | }
32 |
33 | public StoragePluginException(Integer code, String errorMessage, Throwable e) {
34 | super(code, errorMessage);
35 | }
36 |
37 | public StoragePluginException(BaseMsg msg) {
38 | super(msg);
39 | }
40 |
41 | public StoragePluginException(BaseMsg msg, Throwable e) {
42 | super(msg);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/opsli-base-support/opsli-core/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 |
2 | ${AnsiColor.GREEN} ____ ____ ${AnsiColor.CYAN}_____ __ ____
3 | ${AnsiColor.GREEN} / __ \ / __ \ ${AnsiColor.CYAN}/ ___/ / / / _/
4 | ${AnsiColor.GREEN} / / / / / /_/ / ${AnsiColor.CYAN}\__ \ / / / /
5 | ${AnsiColor.GREEN}/ /_/ / / ____/ ${AnsiColor.CYAN}___/ / / /___ _/ /
6 | ${AnsiColor.GREEN}\____/ /_/ ${AnsiColor.CYAN}/____/ /_____//___/
7 |
8 |
9 | ${AnsiColor.BRIGHT_BLUE}:: opsli :: Running Spring Boot ${spring-boot.version} ::
10 | :: https://www.opsli.com ::
11 | ${AnsiColor.BRIGHT_GREEN}:: ${opsli.system-name} ::${AnsiColor.DEFAULT}
12 |
--------------------------------------------------------------------------------
/opsli-base-support/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.generator.column.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.generator.column.entity.GenTableColumn;
21 |
22 |
23 | /**
24 | * 代码生成器 - 表结构 Mapper
25 | *
26 | * @author Pace
27 | * @date 2020-09-16 17:34
28 | */
29 | @Mapper
30 | public interface GenTableColumnMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.generator.general.actuator;
17 |
18 | import org.apache.ibatis.annotations.Mapper;
19 | import org.apache.ibatis.annotations.Update;
20 |
21 |
22 | /**
23 | * 代码生成器 - SQL 执行器
24 | *
25 | * @author Pace
26 | * @date 2020-09-16 17:34
27 | */
28 | @Mapper
29 | public interface SQLActuator {
30 |
31 | /**
32 | * 执行
33 | */
34 | @Update("${sql}")
35 | void execute(String sql);
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/importable/entity/DatabaseTable.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.generator.importable.entity;
17 |
18 | import lombok.Data;
19 | import lombok.EqualsAndHashCode;
20 |
21 | /**
22 | * 代码生成器 - 数据库表
23 | *
24 | * @author Pace
25 | * @date 2020-09-16 17:34
26 | */
27 | @Data
28 | @EqualsAndHashCode(callSuper = false)
29 | public class DatabaseTable {
30 |
31 | /** 数据源 */
32 | private String dbSource;
33 |
34 | /** 数据库 */
35 | private String dbName;
36 |
37 | /** 表名称 */
38 | private String tableName;
39 |
40 | /** 描述 */
41 | private String tableComments;
42 |
43 | // ========================================
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/modulars/generator/logs/mapper/GenLogsMapper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.generator.logs.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.generator.logs.entity.GenLogs;
21 |
22 |
23 | /**
24 | * 代码生成器 - 生成日志 Mapper
25 | *
26 | * @author Pace
27 | * @date 2020-09-16 17:34
28 | */
29 | @Mapper
30 | public interface GenLogsMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.generator.table.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.generator.table.entity.GenTable;
21 |
22 | import java.util.List;
23 |
24 |
25 | /**
26 | * 代码生成器 - 表 Mapper
27 | *
28 | * @author Pace
29 | * @date 2020-09-16 17:34
30 | */
31 | @Mapper
32 | public interface GenTableMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package org.opsli.modulars.generator.template.mapper;
18 |
19 |
20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
21 | import org.apache.ibatis.annotations.Mapper;
22 | import org.apache.ibatis.annotations.Param;
23 |
24 | import org.opsli.modulars.generator.template.entity.GenTemplateDetail;
25 |
26 |
27 | /**
28 | * 代码模板详情 Mapper
29 | *
30 | * @author Pace
31 | * @date 2021-05-28 17:12:38
32 | */
33 | @Mapper
34 | public interface GenTemplateDetailMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package org.opsli.modulars.generator.template.mapper;
18 |
19 |
20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
21 | import org.apache.ibatis.annotations.Mapper;
22 | import org.apache.ibatis.annotations.Param;
23 |
24 | import org.opsli.modulars.generator.template.entity.GenTemplate;
25 |
26 |
27 | /**
28 | * 代码模板 Mapper
29 | *
30 | * @author Pace
31 | * @date 2021-05-27 14:33:49
32 | */
33 | @Mapper
34 | public interface GenTemplateMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.generator;
17 |
18 |
19 | import lombok.Data;
20 |
21 |
22 | /**
23 | * MySQL 字段类型 属性
24 | *
25 | * @author Pace
26 | * @date 2020-11-18 13:21
27 | */
28 | @Data
29 | public class FieldTypeAttribute {
30 |
31 | private boolean izLength;
32 |
33 | private boolean izPrecision;
34 |
35 | public FieldTypeAttribute() {
36 | }
37 |
38 | public FieldTypeAttribute(boolean izLength, boolean izPrecision) {
39 | this.izLength = izLength;
40 | this.izPrecision = izPrecision;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/plugins/generator/SyncStrategy.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.generator;
17 |
18 | import org.opsli.plugins.generator.enums.DataBaseType;
19 | import org.opsli.modulars.generator.table.wrapper.GenTableAndColumnModel;
20 |
21 | /**
22 | * 同步策略
23 | *
24 | * @author Pace
25 | * @date 2020-11-18 11:47
26 | */
27 | public interface SyncStrategy {
28 |
29 | /**
30 | * 获得分类
31 | * @return DataBaseType
32 | */
33 | DataBaseType getType();
34 |
35 | /**
36 | * 执行 同步操作
37 | *
38 | * @param model 模型
39 | */
40 | void execute(GenTableAndColumnModel model);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/plugins/generator/converter/ColumnTypeConverter.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.generator.converter;
17 |
18 | import org.opsli.plugins.generator.enums.TypeEnum;
19 |
20 | import java.util.List;
21 |
22 | /**
23 | * 将数据库类型转换成各语言对应的类型
24 | *
25 | * @author Pace
26 | * @date 2021年5月26日14:22:31
27 | */
28 | public interface ColumnTypeConverter {
29 |
30 | /**
31 | * 将数据库类型转成基本类型
32 | * @param type 数据库类型
33 | * @return 基本类型
34 | */
35 | String convertType(TypeEnum type);
36 |
37 | /**
38 | * 将数据库类型转成基本类型 (会多返 一个String 兜底类型)
39 | * @param type 数据库类型
40 | * @return List 基本类型
41 | */
42 | List
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.generator.exception;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 | import org.opsli.common.exception.ServiceException;
20 |
21 | /**
22 | * 代码生成器 异常类
23 | *
24 | * @author Pace
25 | * @date 2020-09-22 11:17
26 | */
27 | public class GeneratorException extends ServiceException {
28 |
29 | public GeneratorException(Integer code, String errorMessage) {
30 | super(code, errorMessage);
31 | }
32 |
33 | public GeneratorException(BaseMsg msg) {
34 | super(msg);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-generator/src/main/java/org/opsli/plugins/generator/factory/GeneratorFactory.java:
--------------------------------------------------------------------------------
1 | package org.opsli.plugins.generator.factory;
2 |
3 |
4 | /**
5 | * 代码生成器工厂
6 | *
7 | * @author Pace
8 | * @date 2021年6月1日19:10:36
9 | */
10 | public final class GeneratorFactory {
11 |
12 | public static String getJavaHeadAnnotation(){
13 | return "/**\n"+
14 | " * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com\n"+
15 | " * \n"+
16 | " * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n"+
17 | " * use this file except in compliance with the License. You may obtain a copy of\n"+
18 | " * the License at\n"+
19 | " * \n"+
20 | " * http://www.apache.org/licenses/LICENSE-2.0\n"+
21 | " * \n"+
22 | " * Unless required by applicable law or agreed to in writing, software\n"+
23 | " * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n"+
24 | " * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n"+
25 | " * License for the specific language governing permissions and limitations under\n"+
26 | " * the License.\n"+
27 | " */\n";
28 | }
29 |
30 |
31 | // ========================
32 |
33 | public GeneratorFactory(){}
34 | }
35 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-generator/src/main/resources/generator.yaml:
--------------------------------------------------------------------------------
1 | # 暂时只支持 mysql
2 | opsli:
3 | # 排除表 防止代码生成器直接 非法删除关键表
4 | exclude-tables:
5 | - gen_table
6 | - gen_table_column
7 | - gen_logs
8 | - gen_template
9 | - gen_template_detail
10 | - sys_dict
11 | - sys_dict_detail
12 | - sys_logs
13 | - sys_menu
14 | - sys_role
15 | - sys_role_menu_ref
16 | - sys_tenant
17 | - sys_user
18 | - sys_user_role_ref
19 | - sys_user_org_ref
20 | - sys_area
21 | - sys_org
22 | - sys_options
23 |
24 | # 排除字段
25 | exclude-fields:
26 | - id
27 | - version
28 | - create_by
29 | - create_time
30 | - update_by
31 | - update_time
32 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.area.service;
17 |
18 | import org.opsli.api.wrapper.system.area.SysAreaModel;
19 | import org.opsli.core.base.entity.HasChildren;
20 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
21 | import org.opsli.modulars.system.area.entity.SysArea;
22 |
23 | import java.util.List;
24 | import java.util.Set;
25 |
26 | /**
27 | * 地域表 Service
28 | *
29 | * @author Pace
30 | * @date 2020-11-28 18:59:59
31 | */
32 | public interface ISysAreaService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.dict.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.system.dict.entity.SysDictDetail;
21 |
22 | /**
23 | * 数据字典 明细 Mapper
24 | *
25 | * @author Pace
26 | * @date 2020-09-16 17:33
27 | */
28 | @Mapper
29 | public interface DictDetailMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.dict.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.system.dict.entity.SysDict;
21 |
22 | /**
23 | * 数据字典 Mapper
24 | *
25 | * @author Pace
26 | * @date 2020-09-16 17:33
27 | */
28 | @Mapper
29 | public interface DictMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.dict.service;
17 |
18 | import org.opsli.api.wrapper.system.dict.DictModel;
19 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
20 | import org.opsli.modulars.system.dict.entity.SysDict;
21 |
22 |
23 | /**
24 | * 数据字典 接口
25 | *
26 | * @author Pace
27 | * @date 2020-09-16 17:33
28 | */
29 | public interface IDictService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.login.dto;
17 |
18 | import lombok.Data;
19 | import org.opsli.common.annotation.validator.Validator;
20 | import org.opsli.common.annotation.validator.ValidatorLenMax;
21 | import org.opsli.common.enums.ValidatorType;
22 |
23 | /**
24 | * 邮箱
25 | *
26 | * @author Pace
27 | * @date 2022-07-16 8:14 PM
28 | **/
29 | @Data
30 | public class EmailCodeModel {
31 |
32 | /** 邮箱 */
33 | @Validator({ValidatorType.IS_NOT_NULL, ValidatorType.IS_EMAIL})
34 | @ValidatorLenMax(50)
35 | private String email;
36 |
37 | /** 类型 */
38 | @Validator({ValidatorType.IS_NOT_NULL})
39 | @ValidatorLenMax(50)
40 | private String type;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/login/dto/LoginCodeModel.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.login.dto;
17 |
18 | import lombok.Data;
19 | import org.opsli.common.annotation.validator.Validator;
20 | import org.opsli.common.annotation.validator.ValidatorLenMax;
21 | import org.opsli.common.enums.ValidatorType;
22 |
23 | /**
24 | * @author Pace
25 | * @date 2022-07-16 8:14 PM
26 | **/
27 | @Data
28 | public class LoginCodeModel {
29 |
30 | /** 主键 */
31 | @Validator({ValidatorType.IS_NOT_NULL})
32 | @ValidatorLenMax(50)
33 | private String principal;
34 |
35 | /** 验证码 */
36 | @ValidatorLenMax(20)
37 | private String verificationCode;
38 |
39 | /** 登录来源: 0:PC端;1:APP-安卓 2:APP-IOS 3:小程序 */
40 | @Validator({ValidatorType.IS_NOT_NULL})
41 | @ValidatorLenMax(5)
42 | private String loginFrom;
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/login/dto/MobileCodeModel.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.login.dto;
17 |
18 | import lombok.Data;
19 | import org.opsli.common.annotation.validator.Validator;
20 | import org.opsli.common.annotation.validator.ValidatorLenMax;
21 | import org.opsli.common.enums.ValidatorType;
22 |
23 | /**
24 | * 手机号
25 | *
26 | * @author Pace
27 | * @date 2022-07-16 8:14 PM
28 | **/
29 | @Data
30 | public class MobileCodeModel {
31 |
32 | /** 手机号 */
33 | @Validator({ValidatorType.IS_NOT_NULL, ValidatorType.IS_MOBILE})
34 | @ValidatorLenMax(50)
35 | private String mobile;
36 |
37 |
38 | /** 类型 */
39 | @Validator({ValidatorType.IS_NOT_NULL})
40 | @ValidatorLenMax(50)
41 | private String type;
42 | }
43 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/login/vo/AuthAccessAndRefreshTokenDto.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.login.vo;
17 |
18 | import lombok.Builder;
19 | import lombok.Getter;
20 | import lombok.Setter;
21 |
22 | import java.io.Serial;
23 | import java.io.Serializable;
24 |
25 | /**
26 | * 登录 Token 传输实体
27 | *
28 | * @author Pace
29 | * @since 2021-12-27
30 | */
31 | @Getter
32 | @Setter
33 | @Builder
34 | public class AuthAccessAndRefreshTokenDto implements Serializable {
35 |
36 | @Serial
37 | private static final long serialVersionUID = 1L;
38 |
39 | /** 刷新Token */
40 | private String refreshToken;
41 |
42 | /** 认证Token */
43 | private String accessToken;
44 |
45 | /** 失效时间戳 */
46 | private Long expiresAtTs;
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/login/vo/AuthAccessTokenDto.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.login.vo;
17 |
18 | import lombok.Builder;
19 | import lombok.Getter;
20 | import lombok.Setter;
21 |
22 | import java.io.Serial;
23 | import java.io.Serializable;
24 |
25 | /**
26 | * 登录 Token 传输实体
27 | *
28 | * @author Pace
29 | * @since 2021-12-27
30 | */
31 | @Getter
32 | @Setter
33 | @Builder
34 | public class AuthAccessTokenDto implements Serializable {
35 |
36 | @Serial
37 | private static final long serialVersionUID = 1L;
38 |
39 | /** 认证Token */
40 | private String accessToken;
41 |
42 | /** 失效时间戳 */
43 | private Long expiresAtTs;
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/logs/api/README.md:
--------------------------------------------------------------------------------
1 | ## 改造微服务时 将Feign 接口写在这里
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/logs/mapper/LogsMapper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.logs.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.system.logs.entity.SysLogs;
21 |
22 | import java.util.Date;
23 |
24 |
25 | /**
26 | * 日志 Mapper
27 | *
28 | * @author Pace
29 | * @date 2020-11-28 18:59:59
30 | */
31 | @Mapper
32 | public interface LogsMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.logs.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.apache.ibatis.annotations.Param;
21 | import org.opsli.modulars.system.logs.entity.OperationLog;
22 |
23 | /**
24 | * 行为日志 Mapper
25 | *
26 | * @author Pace
27 | * @date 2022-07-26 19:21:57
28 | */
29 | @Mapper
30 | public interface OperationLogMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.logs.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.system.logs.entity.SysLoginLogs;
21 |
22 | /**
23 | * 登录信息 Mapper
24 | *
25 | * @author Pace
26 | * @date 2020-11-28 18:59:59
27 | */
28 | @Mapper
29 | public interface SysLoginLogsMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.logs.service;
17 |
18 |
19 | import org.opsli.api.wrapper.system.logs.LoginLogsModel;
20 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
21 | import org.opsli.modulars.system.logs.entity.SysLoginLogs;
22 |
23 | /**
24 | * 登录日志 Service
25 | *
26 | * @author Pace
27 | * @date 2020-11-28 18:59:59
28 | */
29 | public interface ILoginLogsService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.logs.service;
17 |
18 | import org.opsli.api.wrapper.system.logs.LogsModel;
19 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
20 | import org.opsli.modulars.system.logs.entity.SysLogs;
21 |
22 |
23 | /**
24 | * 日志 Service
25 | *
26 | * @author Pace
27 | * @date 2020-11-28 18:59:59
28 | */
29 | public interface ILogsService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.logs.service;
17 |
18 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
19 |
20 |
21 | import org.opsli.modulars.system.logs.entity.OperationLog;
22 | import org.opsli.api.wrapper.system.logs.OperationLogModel;
23 |
24 | /**
25 | * 行为日志 Service
26 | *
27 | * @author Pace
28 | * @date 2022-07-26 19:21:57
29 | */
30 | public interface IOperationLogService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package org.opsli.modulars.system.options.mapper;
18 |
19 |
20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
21 | import org.apache.ibatis.annotations.Mapper;
22 | import org.apache.ibatis.annotations.Param;
23 |
24 | import org.opsli.modulars.system.options.entity.SysOptions;
25 |
26 |
27 | /**
28 | * 系统参数 Mapper
29 | *
30 | * @author Pace
31 | * @date 2021-02-07 18:24:38
32 | */
33 | @Mapper
34 | public interface SysOptionsMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package org.opsli.modulars.system.options.service;
18 |
19 |
20 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
21 |
22 |
23 |
24 | import org.opsli.modulars.system.options.entity.SysOptions;
25 | import org.opsli.api.wrapper.system.options.OptionsModel;
26 |
27 | import java.util.Map;
28 |
29 |
30 | /**
31 | * 系统参数 Service
32 | *
33 | * @author Pace
34 | * @date 2021-02-07 18:24:38
35 | */
36 | public interface ISysOptionsService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.org.service;
17 |
18 | import org.opsli.core.base.entity.HasChildren;
19 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
20 |
21 |
22 | import org.opsli.modulars.system.org.entity.SysOrg;
23 | import org.opsli.api.wrapper.system.org.SysOrgModel;
24 |
25 | import java.util.List;
26 | import java.util.Set;
27 |
28 | /**
29 | * 组织机构 Service
30 | *
31 | * @author Pace
32 | * @date 2021-02-07 18:24:38
33 | */
34 | public interface ISysOrgService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.role.entity;
17 |
18 | import com.baomidou.mybatisplus.annotation.TableId;
19 | import lombok.Data;
20 | import lombok.EqualsAndHashCode;
21 |
22 | import java.io.Serializable;
23 |
24 | /**
25 | * 角色表 - 菜单表
26 | *
27 | * @author Pace
28 | * @date 2020-09-16 17:33
29 | */
30 | @Data
31 | @EqualsAndHashCode(callSuper = false)
32 | public class SysRoleMenuRef implements Serializable {
33 |
34 | /** ID */
35 | @TableId
36 | private String id;
37 |
38 | /** 角色ID */
39 | private String roleId;
40 |
41 | /** 菜单ID */
42 | private String menuId;
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/role/mapper/RoleMapper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.role.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.system.role.entity.SysRole;
21 |
22 |
23 | /**
24 | * 角色 Mapper
25 | *
26 | * @author Pace
27 | * @date 2020-09-16 17:33
28 | */
29 | @Mapper
30 | public interface RoleMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.role.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.system.menu.entity.SysMenu;
21 | import org.opsli.modulars.system.role.entity.SysRoleMenuRef;
22 |
23 | import java.util.List;
24 |
25 | /**
26 | * 角色 - 菜单 Mapper
27 | *
28 | * @author Pace
29 | * @date 2020-09-16 17:33
30 | */
31 | @Mapper
32 | public interface RoleMenuRefMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.role.service;
17 |
18 | import org.opsli.api.wrapper.system.role.RoleModel;
19 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
20 | import org.opsli.modulars.system.role.entity.SysRole;
21 |
22 |
23 | /**
24 | * 角色 Service
25 | *
26 | * @author Pace
27 | * @date 2020-09-17 13:07
28 | */
29 | public interface IRoleService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.tenant.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.apache.ibatis.annotations.Param;
21 | import org.opsli.modulars.system.tenant.entity.SysTenant;
22 |
23 |
24 | /**
25 | * 租户 Mapper
26 | *
27 | * @author Pace
28 | * @date 2020-09-16 17:33
29 | */
30 | @Mapper
31 | public interface TenantMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.tenant.service;
17 |
18 | import org.opsli.api.wrapper.system.tenant.TenantModel;
19 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
20 | import org.opsli.modulars.system.tenant.entity.SysTenant;
21 |
22 |
23 | /**
24 | * 租户 Service
25 | *
26 | * @author Pace
27 | * @date 2020-09-16 17:33
28 | */
29 | public interface ITenantService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.user.entity;
17 |
18 | import com.baomidou.mybatisplus.annotation.TableId;
19 | import lombok.Data;
20 | import lombok.EqualsAndHashCode;
21 |
22 | import java.io.Serializable;
23 |
24 | /**
25 | * 用户信息 - 组织机构 关联关系表
26 | *
27 | * @author Pace
28 | * @date 2020-09-16 17:33
29 | */
30 | @Data
31 | @EqualsAndHashCode(callSuper = false)
32 | public class SysUserOrgRef implements Serializable {
33 |
34 | /** ID */
35 | @TableId
36 | private String id;
37 |
38 | /** 用户ID */
39 | private String userId;
40 |
41 | /** 当前组织 */
42 | private String orgId;
43 |
44 | /** 组织ID集合 xxx,xxx */
45 | private String orgIds;
46 |
47 | /** 是否默认 */
48 | private String izDef;
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/mapper/UserOrgRefMapper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.system.user.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.system.user.entity.SysUserOrgRef;
21 |
22 |
23 | /**
24 | * 用户组织 Mapper
25 | *
26 | * @author Pace
27 | * @date 2020-09-16 17:33
28 | */
29 | @Mapper
30 | public interface UserOrgRefMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.gentest.carinfo.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.apache.ibatis.annotations.Param;
21 | import org.opsli.modulars.gentest.carinfo.entity.TestCar;
22 |
23 | /**
24 | * 测试汽车 Mapper
25 | *
26 | * @author Pace
27 | * @date 2022-08-06 23:53:30
28 | */
29 | @Mapper
30 | public interface TestCarMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.gentest.carinfo.service;
17 |
18 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
19 |
20 |
21 | import org.opsli.modulars.gentest.carinfo.entity.TestCar;
22 | import org.opsli.api.wrapper.gentest.carinfo.TestCarModel;
23 |
24 | /**
25 | * 测试汽车 Service
26 | *
27 | * @author Pace
28 | * @date 2022-08-06 23:53:30
29 | */
30 | public interface ITestCarService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.gentest.user.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.apache.ibatis.annotations.Param;
21 | import org.opsli.modulars.gentest.user.entity.TestUser;
22 |
23 | /**
24 | * 某系统用户 Mapper
25 | *
26 | * @author Pace
27 | * @date 2020-11-22 12:12:05
28 | */
29 | @Mapper
30 | public interface TestUserMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.gentest.user.service;
17 |
18 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
19 |
20 |
21 | import org.opsli.modulars.gentest.user.entity.TestUser;
22 | import org.opsli.api.wrapper.gentest.user.TestUserModel;
23 |
24 | /**
25 | * 某系统用户 Service
26 | *
27 | * @author Pace
28 | * @date 2020-11-22 12:12:05
29 | */
30 | public interface ITestUserService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.test.entity;
17 |
18 | import lombok.Data;
19 | import lombok.EqualsAndHashCode;
20 | import org.opsli.core.base.entity.BaseEntity;
21 |
22 | /**
23 | * 测试类
24 | *
25 | * @author Pace
26 | * @date 2020-09-16 17:33
27 | */
28 | @Data
29 | @EqualsAndHashCode(callSuper = false)
30 | public class TestEntity extends BaseEntity {
31 |
32 | /** 名称 */
33 | private String name;
34 |
35 | /** 分类 */
36 | private String type;
37 |
38 | /** 备注 */
39 | private String remark;
40 |
41 |
42 | // ========================================
43 |
44 |
45 | /** 多租户字段 */
46 | private String tenantId;
47 |
48 | /** 逻辑删除字段 */
49 | //@TableLogic
50 | //private String deleted;
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/opsli-modulars/opsli-modulars-test/src/main/java/org/opsli/modulars/test/mapper/TestMapper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.test.mapper;
17 |
18 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
19 | import org.apache.ibatis.annotations.Mapper;
20 | import org.opsli.modulars.test.entity.TestEntity;
21 |
22 | /**
23 | * 测试 Mapper
24 | *
25 | * @author Pace
26 | * @date 2020-09-17 13:01
27 | */
28 | @Mapper
29 | public interface TestMapper extends BaseMapper
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.modulars.test.service;
17 |
18 | import org.opsli.api.wrapper.test.TestModel;
19 | import org.opsli.core.base.service.interfaces.CrudServiceInterface;
20 | import org.opsli.modulars.test.entity.TestEntity;
21 |
22 | /**
23 | * 测试 Service
24 | *
25 | * @author Pace
26 | * @date 2020-09-17 13:01
27 | */
28 | public interface ITestService extends CrudServiceInterface
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package opsli.plugins.crypto.exception;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 | import org.opsli.common.exception.ServiceException;
20 |
21 | /**
22 | * 加解密 异常
23 | *
24 | * @author Pace
25 | * @date 2021年5月17日16:49:53
26 | */
27 | public class CryptoException extends ServiceException {
28 |
29 | public CryptoException(Integer code, String errorMessage) {
30 | super(code, errorMessage);
31 | }
32 |
33 | public CryptoException(BaseMsg msg) {
34 | super(msg);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-crypto/src/main/java/opsli/plugins/crypto/model/CryptoAsymmetric.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package opsli.plugins.crypto.model;
17 |
18 | import lombok.Data;
19 | import opsli.plugins.crypto.enums.CryptoAsymmetricType;
20 |
21 | /**
22 | * 非对称加密
23 | *
24 | * @author Pace
25 | * @date 2021年5月17日15:59:52
26 | */
27 | @Data
28 | public class CryptoAsymmetric {
29 |
30 | /** 加解密类别 */
31 | private CryptoAsymmetricType cryptoType;
32 |
33 | /** 公钥 */
34 | private String publicKey;
35 |
36 | /** 私钥 */
37 | private String privateKey;
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-crypto/src/main/java/opsli/plugins/crypto/model/CryptoSymmetric.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package opsli.plugins.crypto.model;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Builder;
20 | import lombok.Data;
21 | import lombok.NoArgsConstructor;
22 | import opsli.plugins.crypto.enums.CryptoSymmetricType;
23 |
24 | /**
25 | * 对称加密
26 | *
27 | * @author Pace
28 | * @date 2021年5月17日15:59:52
29 | */
30 | @Data
31 | @Builder
32 | @AllArgsConstructor
33 | @NoArgsConstructor
34 | public class CryptoSymmetric {
35 |
36 | /** 加解密类别 */
37 | private CryptoSymmetricType cryptoType;
38 |
39 | /** 私钥 */
40 | private String privateKey;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-crypto/src/main/java/opsli/plugins/crypto/spring/annotation/CryptoMapperField.java:
--------------------------------------------------------------------------------
1 | package opsli.plugins.crypto.spring.annotation;
2 |
3 |
4 |
5 | import opsli.plugins.crypto.spring.crypto.ICrypto;
6 | import opsli.plugins.crypto.spring.crypto.impl.AESCrypto;
7 |
8 | import java.lang.annotation.*;
9 |
10 | /**
11 | * 字段加密
12 | * 注意注解只能放在可以被 mybatis Interceptor拦截器拦截的实体上 才能生效
13 | *
14 | * @author Pace
15 | * @date 2022-08-07 17:33
16 | */
17 | @Documented
18 | @Inherited
19 | @Retention(RetentionPolicy.RUNTIME)
20 | @Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})
21 | public @interface CryptoMapperField {
22 |
23 | /**
24 | * 秘钥 (加密口令,盐)
25 | * 优先 走全局配置 encrypt.property.key
26 | * @return String
27 | */
28 | String key() default "0546c7b2790448658a1816a7803d7ba1";
29 |
30 | /**
31 | * 加密解密器
32 | * @return Class extends ICrypto>
33 | */
34 | Class extends ICrypto> iCrypto() default AESCrypto.class;
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-crypto/src/main/java/opsli/plugins/crypto/spring/crypto/ICrypto.java:
--------------------------------------------------------------------------------
1 | package opsli.plugins.crypto.spring.crypto;
2 |
3 | /**
4 | * 加密解密器 可自行实现
5 | *
6 | * @author zhangylo
7 | */
8 | public interface ICrypto {
9 |
10 | /**
11 | * 加密
12 | *
13 | * @param value 加密前的值
14 | * @param key 秘钥
15 | * @return 加密后的值
16 | * @throws Exception
17 | */
18 | String encrypt(String value, String key) throws Exception;
19 |
20 | /**
21 | * 解密
22 | *
23 | * @param value 解密前的值
24 | * @param key 秘钥
25 | * @return 解密后的值
26 | * @throws Exception
27 | */
28 | String decrypt(String value, String key) throws Exception;
29 | }
30 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-crypto/src/main/java/opsli/plugins/crypto/spring/enums/CryptoType.java:
--------------------------------------------------------------------------------
1 | package opsli.plugins.crypto.spring.enums;
2 |
3 | /**
4 | * 加密解密枚举
5 | *
6 | * @author zhangylo
7 | */
8 | public enum CryptoType {
9 |
10 | /**
11 | * ENCRYPT 加密
12 | * DECRYPT 解密
13 | */
14 | ENCRYPT("com/encrypt"), DECRYPT("decrypt");
15 |
16 | /**
17 | * 对应加密器方法名称
18 | */
19 | private String method;
20 |
21 | CryptoType(String method) {
22 | this.method = method;
23 | }
24 |
25 | public String getMethod() {
26 | return method;
27 | }
28 |
29 | public void setMethod(String method) {
30 | this.method = method;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-email/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.email.exception;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 | import org.opsli.common.exception.ServiceException;
20 |
21 | /**
22 | * 邮件 异常
23 | *
24 | * @author Pace
25 | * @date 2020-09-16 11:47
26 | */
27 | public class EmailPluginException extends ServiceException {
28 |
29 | public EmailPluginException(Integer code, String errorMessage) {
30 | super(code, errorMessage);
31 | }
32 |
33 | public EmailPluginException(BaseMsg msg) {
34 | super(msg);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-email/src/main/java/org/opsli/plugins/email/wrapper/EmailModel.java:
--------------------------------------------------------------------------------
1 | package org.opsli.plugins.email.wrapper;
2 |
3 | import lombok.Data;
4 | import lombok.EqualsAndHashCode;
5 |
6 | /**
7 | * 邮件服务
8 | *
9 | * @author Pace
10 | * @date 2020-09-19 20:03
11 | */
12 | @Data
13 | @EqualsAndHashCode(callSuper = false)
14 | public class EmailModel {
15 |
16 | /** 收件人 */
17 | private String to;
18 |
19 | /** 主题 */
20 | private String subject;
21 |
22 | /** 内容 */
23 | private String content;
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-excel/src/main/java/org/opsli/plugins/excel/annotation/CellFontFormat.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.excel.annotation;
17 |
18 | import org.apache.poi.ss.usermodel.IndexedColors;
19 |
20 | import java.lang.annotation.*;
21 | /**
22 | * 字体格式化
23 | *
24 | * @author Pace
25 | * @date 2020-09-16 11:47
26 | */
27 | @Documented
28 | @Retention(RetentionPolicy.RUNTIME)
29 | @Target(ElementType.FIELD)
30 | public @interface CellFontFormat {
31 |
32 | String fontName() default "Arial";
33 |
34 | short fontHeightInPoints() default 10;
35 |
36 | IndexedColors fontColor() default IndexedColors.BLACK;
37 |
38 | boolean bold() default false;
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-excel/src/main/java/org/opsli/plugins/excel/annotation/ExcelInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.excel.annotation;
17 |
18 | import java.lang.annotation.*;
19 |
20 | /**
21 | * Excel 字典标示
22 | *
23 | * @author Pace
24 | * @date 2020-09-16 11:47
25 | */
26 | @Retention(RetentionPolicy.RUNTIME)
27 | @Target(ElementType.FIELD)
28 | @Documented
29 | public @interface ExcelInfo {
30 |
31 | /** 字典类型 code */
32 | String dictType() default "";
33 |
34 | /** 字段样式 */
35 | CellStyleFormat cellStyleFormat() default @CellStyleFormat();
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-excel/src/main/java/org/opsli/plugins/excel/exception/ExcelPluginException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.excel.exception;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 | import org.opsli.common.exception.ServiceException;
20 |
21 | /**
22 | * Excel 异常类
23 | *
24 | * @author Pace
25 | * @date 2020-09-16 11:47
26 | */
27 | public class ExcelPluginException extends ServiceException {
28 |
29 | public ExcelPluginException(Integer code, String errorMessage) {
30 | super(code, errorMessage);
31 | }
32 |
33 | public ExcelPluginException(BaseMsg msg) {
34 | super(msg);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-excel/src/main/java/org/opsli/plugins/excel/msg/ExcelMsg.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.excel.msg;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 |
20 | /**
21 | * Excel 消息
22 | *
23 | * @author Pace
24 | * @date 2020-09-16 11:47
25 | */
26 | public enum ExcelMsg implements BaseMsg {
27 |
28 | /** Excel 异常 */
29 | EXCEPTION_FILE_FORMAT(90000,"文件格式错误!"),
30 | EXCEPTION_CREATE_ERROR(90000,"创建文件失败!"),
31 | ;
32 |
33 |
34 | private final int code;
35 | private final String message;
36 |
37 | ExcelMsg(int code, String message){
38 | this.code = code;
39 | this.message = message;
40 | }
41 |
42 | @Override
43 | public Integer getCode() {
44 | return this.code;
45 | }
46 |
47 | @Override
48 | public String getMessage() {
49 | return this.message;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.redis;
17 |
18 | import org.opsli.plugins.redis.lock.RedisLock;
19 |
20 | /**
21 | * Redis 锁 接口
22 | *
23 | * @author Pace
24 | * @date 2020-09-16 11:47
25 | */
26 | public interface RedisLockPlugins {
27 |
28 | /**
29 | * 尝试锁
30 | * @param redisLock redis锁参数
31 | * @return RedisLock
32 | */
33 | RedisLock tryLock(RedisLock redisLock);
34 |
35 |
36 | /**
37 | * 释放锁
38 | * @param redisLock redis锁参数
39 | * @return boolean
40 | */
41 | boolean unLock(RedisLock redisLock);
42 | }
43 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/java/org/opsli/plugins/redis/exception/RedisPluginException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.redis.exception;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 | import org.opsli.common.exception.ServiceException;
20 |
21 | /**
22 | * Redis 异常
23 | *
24 | * @author Pace
25 | * @date 2020-09-16 11:47
26 | */
27 | public class RedisPluginException extends ServiceException {
28 |
29 | public RedisPluginException(Integer code, String errorMessage) {
30 | super(code, errorMessage);
31 | }
32 |
33 | public RedisPluginException(BaseMsg msg) {
34 | super(msg);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/java/org/opsli/plugins/redis/pushsub/entity/RedisPushSubMessage.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.redis.pushsub.entity;
17 |
18 | import java.io.Serializable;
19 |
20 | /**
21 | * Redis 消息订阅
22 | *
23 | * @author Pace
24 | * @date 2020-09-16 11:47
25 | */
26 | public interface RedisPushSubMessage extends Serializable {
27 |
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/java/org/opsli/plugins/redis/pushsub/receiver/BaseReceiver.java:
--------------------------------------------------------------------------------
1 | package org.opsli.plugins.redis.pushsub.receiver;
2 |
3 |
4 |
5 | /**
6 | * Redis 消息订阅实现基类
7 | *
8 | * @author Pace
9 | * @date 2020-09-15
10 | */
11 | public abstract class BaseReceiver {
12 |
13 | public static final String BASE_CHANNEL = "listener:msg:";
14 | private final String channel;
15 |
16 | public BaseReceiver(String channel){
17 | this.channel = BASE_CHANNEL+channel;
18 | }
19 |
20 | /**
21 | * 获得监听信道
22 | * @return String
23 | */
24 | public String getListenerChannel(){
25 | return this.channel;
26 | }
27 |
28 | /**
29 | * 获得消息
30 | * @param msg 消息
31 | */
32 | public abstract void receiveMessage(String msg);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/java/org/opsli/plugins/redis/scripts/enums/RedisScriptsEnum.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.redis.scripts.enums;
17 |
18 |
19 | /**
20 | * Redis 脚本枚举
21 | *
22 | * @author Pace
23 | * @date 2020-09-16 11:47
24 | */
25 | public enum RedisScriptsEnum {
26 |
27 | /** Redis加锁脚本 */
28 | REDIS_LOCK("/lua/redis_lock.lua"),
29 | /** Redis解锁脚本 */
30 | REDIS_UN_LOCK("/lua/redis_unlock.lua")
31 | ;
32 |
33 | /** 脚本路径 */
34 | private final String path;
35 |
36 | RedisScriptsEnum(String path){
37 | this.path = path;
38 | }
39 |
40 | /**
41 | * 获得路径
42 | * @return path
43 | */
44 | public String getPath() {
45 | return path;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/resources/META-INF/additional-spring-configuration-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "properties": [
3 | ]
4 | }
5 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.opsli.plugins.redis.conf.RedisPluginConfig
2 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/resources/lua/redis_lock.lua:
--------------------------------------------------------------------------------
1 | -- 加锁脚本
2 | -- key1:要加锁的名称 argv1:当前线程或主机的地址 argv2:锁存活的时间ms
3 | local expire_time = tonumber(ARGV[2])
4 | if redis.call('exists', KEYS[1]) == 0 then
5 | -- 锁不存在,创建一把锁,存入hash类型的值
6 | redis.call('hset', KEYS[1], ARGV[1], 1)
7 | -- 设置锁的存活时间,防止死锁
8 | redis.call('pexpire', KEYS[1], expire_time)
9 | return 1
10 | end
11 | if redis.call('hexists', KEYS[1], ARGV[1]) == 1 then
12 | -- 表示是同一线程重入
13 | redis.call('hincrby', KEYS[1], ARGV[1], 1)
14 | -- 重新设置锁的过期时间
15 | redis.call('pexpire', KEYS[1], expire_time)
16 | return 1
17 | end
18 | -- 没抢到锁,返回失败
19 | return 0
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redis/src/main/resources/lua/redis_unlock.lua:
--------------------------------------------------------------------------------
1 | -- 解锁脚本
2 | -- 判断是当前线程持有锁,避免解了其他线程加的锁
3 | if redis.call('hexists',KEYS[1],ARGV[1]) == 1 then
4 | -- 重入次数大于1,扣减次数
5 | --if tonumber(redis.call('hget',KEYS[1],ARGV[1])) > 1 then
6 | -- return redis.call('hincrby', KEYS[1], ARGV[1], -1)
7 | -- 重入次数等于1,删除该锁
8 | --else
9 | redis.call('del', KEYS[1]);
10 | return 1
11 | --end
12 | -- 判断不是当前线程持有锁,返回解锁失败
13 | else
14 | return 0
15 | end
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-redisson/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.security.checker;
17 |
18 | import org.springframework.security.authentication.CredentialsExpiredException;
19 | import org.springframework.security.core.userdetails.UserDetails;
20 | import org.springframework.security.core.userdetails.UserDetailsChecker;
21 | import org.springframework.stereotype.Component;
22 |
23 | /**
24 | * 用户凭证过期情况 检查
25 | *
26 | * @author Pace
27 | * @date 2022年07月18日16:18:37
28 | */
29 | @Component
30 | public class DefaultPostAuthenticationChecks implements UserDetailsChecker {
31 |
32 | @Override
33 | public void check(UserDetails user) {
34 | if (!user.isCredentialsNonExpired()) {
35 | throw new CredentialsExpiredException("User credentials has expired");
36 | }
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-security/src/main/java/org/opsli/plugins/security/eventbus/ISecurityEventBus.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.security.eventbus;
17 |
18 | /**
19 | * EventBus 接口
20 | *
21 | * @author Pace
22 | * @date 2021年12月7日10:38:24
23 | */
24 | public interface ISecurityEventBus {
25 | /**
26 | * 发布事件
27 | * @param event 事件实体
28 | */
29 | void post(Object event);
30 |
31 | /**
32 | * 添加消费者
33 | * @param obj 消费者对象,默认以class为key
34 | */
35 | void addConsumer(Object obj);
36 |
37 | /**
38 | * 移除消费者
39 | * @param obj 消费者对象,默认以class为key
40 | */
41 | void removeConsumer(Object obj);
42 |
43 | /**
44 | * 扫描消费者
45 | * @param packageName 扫描包
46 | */
47 | void scanConsumer(String packageName);
48 | }
49 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-security/src/main/java/org/opsli/plugins/security/eventbus/ISecurityEventConsumer.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.security.eventbus;
17 |
18 | /**
19 | * EventBus 消费者接口
20 | *
21 | * @author Pace
22 | * @date 2020/9/25 12:19
23 | */
24 | public interface ISecurityEventConsumer
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.security.eventdto;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Builder;
20 | import lombok.Data;
21 | import lombok.NoArgsConstructor;
22 |
23 | /**
24 | * 错误凭证
25 | *
26 | * @author Pace
27 | * @date 2022-07-16 8:14 PM
28 | **/
29 | @Builder
30 | @NoArgsConstructor
31 | @AllArgsConstructor
32 | @Data
33 | public class BadCredentials {
34 |
35 | /** 主键 */
36 | private String principal;
37 |
38 | /** 凭证 */
39 | private String credentials;
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-security/src/main/java/org/opsli/plugins/security/exception/errorcode/BaseAuthMsg.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.security.exception.errorcode;
17 |
18 | /**
19 | * 总消息类 用来存放消息
20 | * 将消息全部提取出至一个总文件
21 | *
22 | * @author Pace
23 | * @date 2020-09-22 17:07
24 | */
25 | public interface BaseAuthMsg {
26 |
27 | /**
28 | * 获取消息的状态码
29 | *
30 | * @return Integer
31 | */
32 | int getCode();
33 |
34 | /**
35 | * 获取消息的状态码
36 | *
37 | * @return Integer
38 | */
39 | String getDescription();
40 |
41 | /**
42 | * 获取消息提示信息
43 | *
44 | * @return String
45 | */
46 | String getMessage();
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-security/src/main/java/org/opsli/plugins/security/handler/LoginBeforeListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.security.handler;
17 |
18 | /**
19 | * 登录前 监听器
20 | *
21 | * @author Pace
22 | * @date 2022-07-16 10:51 PM
23 | **/
24 | public interface LoginBeforeListener {
25 |
26 | /**
27 | * 获得 监听器 类型
28 | * 注:如果指定了Type类型 则 如果当前消息类型与Listener的类型不符 则不会发器调用
29 | * @return Class
30 | */
31 | default Class> getModelType(){
32 | return Object.class;
33 | }
34 |
35 | /**
36 | * 执行
37 | * @param model 登录参数(认证信息)
38 | */
39 | void handle(Object model);
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-security/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2 | org.opsli.plugins.security.SecurityConfig
3 |
4 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-sms/src/main/java/org/opsli/plugins/sms/enums/SmsType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.sms.enums;
17 |
18 | /**
19 | * 短信类型
20 | *
21 | * @author 周鹏程
22 | * @date 2021年8月27日13:49:25
23 | */
24 | public enum SmsType {
25 |
26 | /** SMS 服务 */
27 | ALIYUN("阿里云"),
28 |
29 | ;
30 |
31 | private final String desc;
32 |
33 |
34 | public String getDesc() {
35 | return this.desc;
36 | }
37 |
38 | // =================
39 |
40 | SmsType(final String desc) {
41 | this.desc = desc;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-sms/src/main/java/org/opsli/plugins/sms/exceptions/SmsException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.sms.exceptions;
17 |
18 |
19 | import org.opsli.common.base.msg.BaseMsg;
20 | import org.opsli.common.exception.ServiceException;
21 |
22 | /**
23 | * 短信异常
24 | *
25 | * @author 周鹏程
26 | * @date 2021年8月27日14:27:35
27 | */
28 | public class SmsException extends ServiceException {
29 |
30 | public SmsException(Integer code, String errorMessage) {
31 | super(code, errorMessage);
32 | }
33 |
34 | public SmsException(BaseMsg msg) {
35 | super(msg);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-sms/src/main/java/org/opsli/plugins/sms/service/SmsService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.sms.service;
17 |
18 |
19 | import org.opsli.plugins.sms.enums.SmsType;
20 | import org.opsli.plugins.sms.model.SmsModel;
21 |
22 | /**
23 | * sms发送服务
24 | *
25 | * @author 周鹏程
26 | * @date 2021年8月27日14:08:09
27 | */
28 | public interface SmsService {
29 |
30 |
31 | /**
32 | * 获得类型
33 | * @return SmsType
34 | */
35 | SmsType getType();
36 |
37 | /**
38 | * 发送消息
39 | * @param smsModel 短信model
40 | */
41 | void sendSms(SmsModel smsModel);
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-sms/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.opsli.plugins.sms.SmsConfig
2 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-waf/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli.plugins.waf.msg;
17 |
18 | import org.opsli.common.base.msg.BaseMsg;
19 |
20 | /**
21 | * 防火墙 消息
22 | *
23 | * @author Pace
24 | * @date 2020-09-16
25 | */
26 | public enum WafMsg implements BaseMsg {
27 |
28 | /**
29 | * 防火墙
30 | */
31 | WAF_EXCEPTION_XSS(10500, "包含非法字符!"),
32 | WAF_EXCEPTION_SQL(10501, "包含非法字符!"),
33 |
34 | ;
35 |
36 |
37 | private final int code;
38 | private final String message;
39 |
40 | WafMsg(int code, String message){
41 | this.code = code;
42 | this.message = message;
43 | }
44 |
45 | @Override
46 | public Integer getCode() {
47 | return this.code;
48 | }
49 |
50 | @Override
51 | public String getMessage() {
52 | return this.message;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/opsli-plugins/opsli-plugins-waf/src/main/java/org/opsli/plugins/waf/properties/WafProperties.java:
--------------------------------------------------------------------------------
1 | package org.opsli.plugins.waf.properties;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.EqualsAndHashCode;
6 | import lombok.NoArgsConstructor;
7 | import org.springframework.boot.context.properties.ConfigurationProperties;
8 |
9 | import java.util.Set;
10 |
11 | /**
12 | * 软防火墙 配置
13 | *
14 | * @author Pace
15 | * @date 2020-12-19
16 | */
17 | @ConfigurationProperties(prefix = WafProperties.PROP_PREFIX)
18 | @Data
19 | @NoArgsConstructor
20 | @AllArgsConstructor
21 | @EqualsAndHashCode(callSuper = false)
22 | public class WafProperties {
23 |
24 | public static final String PROP_PREFIX = "opsli.waf";
25 |
26 |
27 | /** 是否生效 */
28 | private boolean enable;
29 |
30 | /** xss 过滤 */
31 | private boolean xssFilter;
32 |
33 | /** sql 过滤 */
34 | private boolean sqlFilter;
35 |
36 | /** 过滤器需要过滤的路径 */
37 | private Set
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package org.opsli;
17 |
18 | import org.springframework.boot.SpringApplication;
19 | import org.springframework.boot.autoconfigure.SpringBootApplication;
20 |
21 | /**
22 | * OPSLI 快速开发平台启动类
23 | *
24 | * @author Pace
25 | * @date 2020-09-09
26 | */
27 | @SpringBootApplication
28 | public class OpsliApplication {
29 |
30 | public static void main(String[] args){
31 | SpringApplication.run(OpsliApplication.class, args);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/opsli-starter/src/main/resources/ftl/email/email_code.ftl:
--------------------------------------------------------------------------------
1 |