├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── ci.yml │ └── docker-publish.yml ├── .gitignore ├── LICENSE ├── README.md ├── dms-alert ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── basedt │ └── dms │ └── alert │ ├── DmsAlert.java │ ├── SysMessageService.java │ ├── convert │ └── SysMessageConvert.java │ ├── dto │ └── SysMessageDTO.java │ ├── impl │ ├── EmailAlertServiceImpl.java │ └── MessageAlertServiceImpl.java │ └── param │ └── SysMessageParam.java ├── dms-api ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── basedt │ │ │ └── dms │ │ │ ├── DmsApplication.java │ │ │ └── api │ │ │ ├── annotation │ │ │ └── AuditLogging.java │ │ │ ├── aspect │ │ │ └── LogAspect.java │ │ │ ├── config │ │ │ ├── AsyncConfig.java │ │ │ ├── DataSourceConfig.java │ │ │ ├── DruidConfig.java │ │ │ ├── I18nConfig.java │ │ │ ├── MinioConfig.java │ │ │ ├── MybatisConfig.java │ │ │ ├── RedisConfig.java │ │ │ ├── SocketIOConfig.java │ │ │ ├── SpringDocConfig.java │ │ │ ├── ValidatorConfig.java │ │ │ ├── WebMvcConfig.java │ │ │ └── WebSecurityConfig.java │ │ │ ├── controller │ │ │ ├── CommonController.java │ │ │ ├── meta │ │ │ │ └── MetaDataController.java │ │ │ ├── sys │ │ │ │ ├── LogController.java │ │ │ │ ├── MessageController.java │ │ │ │ ├── PrivilegeController.java │ │ │ │ ├── RoleController.java │ │ │ │ ├── SysConfigController.java │ │ │ │ ├── SysDictController.java │ │ │ │ └── UserController.java │ │ │ └── workspace │ │ │ │ ├── DataSourceController.java │ │ │ │ ├── DataTaskController.java │ │ │ │ ├── FileCatalogController.java │ │ │ │ ├── FileController.java │ │ │ │ ├── LLMChatController.java │ │ │ │ ├── SqlController.java │ │ │ │ └── WorkspaceController.java │ │ │ ├── exception │ │ │ └── GlobalExceptionHandler.java │ │ │ ├── init │ │ │ ├── DatabaseInitRunner.java │ │ │ ├── DmsApplicationRunner.java │ │ │ └── SocketIOServerRunner.java │ │ │ ├── socket │ │ │ ├── SocketAuthorizationListener.java │ │ │ └── SqlScriptHandler.java │ │ │ └── vo │ │ │ ├── ChatParamVO.java │ │ │ ├── EmailBindVO.java │ │ │ ├── LoginInfoVO.java │ │ │ ├── PwdChangeVO.java │ │ │ ├── RegisterInfoVO.java │ │ │ ├── ResultSetVO.java │ │ │ └── meta │ │ │ ├── ColumnInfoVO.java │ │ │ ├── IndexInfoVO.java │ │ │ ├── PartitionInfoVO.java │ │ │ ├── TableInfoConvert.java │ │ │ └── TableInfoVO.java │ └── resources │ │ ├── application-dev.yml │ │ ├── application.yml │ │ ├── db │ │ └── init │ │ │ ├── dms.sql │ │ │ └── dms_quartz.sql │ │ ├── logback-spring.xml │ │ └── static │ │ └── i18n │ │ ├── messages.properties │ │ ├── messages_en_US.properties │ │ └── messages_zh_CN.properties │ └── test │ ├── java │ └── com │ │ └── basedt │ │ └── dms │ │ ├── DmsApplicationTest.java │ │ └── service │ │ ├── llm │ │ └── LLMServiceTest.java │ │ └── security │ │ └── PrivilegesTests.java │ └── resources │ └── privilege.txt ├── dms-common ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── basedt │ └── dms │ └── common │ ├── constant │ ├── Constants.java │ └── DictConstants.java │ ├── enums │ ├── AlertType.java │ ├── Bool.java │ ├── DataType.java │ ├── ErrorShowType.java │ ├── FileEncoding.java │ ├── FileStatus.java │ ├── FileType.java │ ├── LLMType.java │ ├── LoginType.java │ ├── RegisterChannel.java │ ├── ResponseCode.java │ ├── RoleStatus.java │ ├── RoleType.java │ ├── SqlStatus.java │ ├── TaskStatus.java │ ├── TaskType.java │ └── UserStatus.java │ ├── exception │ └── DmsException.java │ ├── utils │ ├── DateTimeUtil.java │ ├── I18nUtil.java │ ├── IdGenerateUtil.java │ ├── MinioUtil.java │ ├── PropertiesUtil.java │ └── RedisUtil.java │ └── vo │ ├── DictVO.java │ ├── ResponseVO.java │ └── TreeNodeVO.java ├── dms-dao ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── basedt │ │ └── dms │ │ └── dao │ │ ├── entity │ │ ├── BaseDO.java │ │ ├── log │ │ │ ├── LogAction.java │ │ │ ├── LogDataTask.java │ │ │ ├── LogLogin.java │ │ │ └── LogSqlHistory.java │ │ └── master │ │ │ ├── sys │ │ │ ├── SysConfig.java │ │ │ ├── SysDict.java │ │ │ ├── SysDictType.java │ │ │ ├── SysMessage.java │ │ │ ├── SysPrivilege.java │ │ │ ├── SysRole.java │ │ │ ├── SysRolePrivilege.java │ │ │ ├── SysUser.java │ │ │ └── SysUserRole.java │ │ │ └── workspace │ │ │ ├── DmsDataSource.java │ │ │ ├── DmsDataTask.java │ │ │ ├── DmsFile.java │ │ │ ├── DmsFileCatalog.java │ │ │ └── DmsWorkspace.java │ │ └── mapper │ │ ├── log │ │ ├── LogActionMapper.java │ │ ├── LogDataTaskMapper.java │ │ ├── LogLoginMapper.java │ │ └── LogSqlHistoryMapper.java │ │ └── master │ │ ├── sys │ │ ├── SysConfigMapper.java │ │ ├── SysDictMapper.java │ │ ├── SysDictTypeMapper.java │ │ ├── SysMessageMapper.java │ │ ├── SysPrivilegeMapper.java │ │ ├── SysRoleMapper.java │ │ ├── SysRolePrivilegeMapper.java │ │ ├── SysUserMapper.java │ │ └── SysUserRoleMapper.java │ │ └── workspace │ │ ├── DmsDataSourceMapper.java │ │ ├── DmsDataTaskMapper.java │ │ ├── DmsFileCatalogMapper.java │ │ ├── DmsFileMapper.java │ │ └── DmsWorkspaceMapper.java │ └── resources │ └── com.basedt.dms.dao.mapper │ ├── log │ ├── LogActionMapper.xml │ ├── LogDataTaskMapper.xml │ ├── LogLoginMapper.xml │ └── LogSqlHistoryMapper.xml │ └── master │ ├── sys │ ├── SysConfigMapper.xml │ ├── SysDictMapper.xml │ ├── SysDictTypeMapper.xml │ ├── SysMessageMapper.xml │ ├── SysPrivilegeMapper.xml │ ├── SysRoleMapper.xml │ ├── SysRolePrivilegeMapper.xml │ ├── SysUserMapper.xml │ └── SysUserRoleMapper.xml │ └── workspace │ ├── DmsDataSourceMapper.xml │ ├── DmsDataTask.xml │ ├── DmsFile.xml │ ├── DmsFileCatalog.xml │ └── DmsWorkspaceMapper.xml ├── dms-plugins ├── dms-plugins-core │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── plugins │ │ └── core │ │ ├── Plugin.java │ │ ├── PluginInfo.java │ │ ├── PluginLoader.java │ │ └── PluginType.java ├── dms-plugins-datasource │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── basedt │ │ │ └── dms │ │ │ └── plugins │ │ │ └── datasource │ │ │ ├── AbstractDataSourcePlugin.java │ │ │ ├── CatalogHandler.java │ │ │ ├── DataSourcePlugin.java │ │ │ ├── DataSourcePluginManager.java │ │ │ ├── ForeignTableHandler.java │ │ │ ├── FunctionHandler.java │ │ │ ├── IndexHandler.java │ │ │ ├── MaterializedViewHandler.java │ │ │ ├── MetaDataService.java │ │ │ ├── SequenceHandler.java │ │ │ ├── TableHandler.java │ │ │ ├── ViewHandler.java │ │ │ ├── dto │ │ │ ├── CatalogDTO.java │ │ │ ├── ColumnDTO.java │ │ │ ├── DataSourceDTO.java │ │ │ ├── FunctionDTO.java │ │ │ ├── GroupDTO.java │ │ │ ├── IndexDTO.java │ │ │ ├── MaterializedViewDTO.java │ │ │ ├── ObjectDTO.java │ │ │ ├── PartitionDTO.java │ │ │ ├── SchemaDTO.java │ │ │ ├── SequenceDTO.java │ │ │ ├── SuggestionDTO.java │ │ │ ├── TableDTO.java │ │ │ ├── TypeInfoDTO.java │ │ │ └── ViewDTO.java │ │ │ ├── enums │ │ │ ├── DataSourceType.java │ │ │ ├── DbGroupType.java │ │ │ ├── DbObjectType.java │ │ │ └── DmlType.java │ │ │ ├── impl │ │ │ ├── MetaDataServiceImpl.java │ │ │ ├── clickhouse │ │ │ │ ├── ClickHouseCatalogHandler.java │ │ │ │ ├── ClickHouseFgnTableHandler.java │ │ │ │ ├── ClickHouseFunctionHandler.java │ │ │ │ ├── ClickHouseMaterializedViewHandler.java │ │ │ │ ├── ClickHousePluginImpl.java │ │ │ │ ├── ClickHouseTableHandler.java │ │ │ │ └── ClickHouseViewHandler.java │ │ │ ├── doris │ │ │ │ ├── DorisCatalogHandler.java │ │ │ │ ├── DorisFunctionHandler.java │ │ │ │ ├── DorisIndexHandler.java │ │ │ │ ├── DorisMaterializedViewHandler.java │ │ │ │ └── DorisPluginImpl.java │ │ │ ├── gaussdb │ │ │ │ ├── GaussdbMaterializedViewHandler.java │ │ │ │ └── GaussdbPluginImpl.java │ │ │ ├── greenplum │ │ │ │ └── GreenplumPluginImpl.java │ │ │ ├── hive │ │ │ │ ├── HiveCatalogHandler.java │ │ │ │ ├── HiveMaterializedViewHandler.java │ │ │ │ ├── HivePluginImpl.java │ │ │ │ ├── HiveTableHandler.java │ │ │ │ └── HiveViewHandler.java │ │ │ ├── hologres │ │ │ │ └── HologresPluginImpl.java │ │ │ ├── jdbc │ │ │ │ ├── JdbcCatalogHandler.java │ │ │ │ ├── JdbcForeignTableHandler.java │ │ │ │ ├── JdbcFunctionHandler.java │ │ │ │ ├── JdbcIndexHandler.java │ │ │ │ ├── JdbcMaterializedViewHandler.java │ │ │ │ ├── JdbcSequenceHandler.java │ │ │ │ ├── JdbcTableHandler.java │ │ │ │ └── JdbcViewHandler.java │ │ │ ├── mariadb │ │ │ │ └── MariadbPluginImpl.java │ │ │ ├── mssql │ │ │ │ ├── MssqlCatalogHandler.java │ │ │ │ ├── MssqlFunctionHandler.java │ │ │ │ ├── MssqlIndexHandler.java │ │ │ │ ├── MssqlPluginImpl.java │ │ │ │ ├── MssqlSequenceHandler.java │ │ │ │ ├── MssqlTableHandler.java │ │ │ │ └── MssqlViewHandler.java │ │ │ ├── mysql │ │ │ │ ├── MysqlCatalogHandler.java │ │ │ │ ├── MysqlFunctionHandler.java │ │ │ │ ├── MysqlIndexHandler.java │ │ │ │ ├── MysqlPluginImpl.java │ │ │ │ ├── MysqlTableHandler.java │ │ │ │ └── MysqlViewHandler.java │ │ │ ├── oracle │ │ │ │ ├── OracleCatalogHandler.java │ │ │ │ ├── OracleFgnTableHandler.java │ │ │ │ ├── OracleFunctionHandler.java │ │ │ │ ├── OracleIndexHandler.java │ │ │ │ ├── OracleMaterializedViewHandler.java │ │ │ │ ├── OraclePluginImpl.java │ │ │ │ ├── OracleSequenceHandler.java │ │ │ │ ├── OracleTableHandler.java │ │ │ │ └── OracleViewHandler.java │ │ │ ├── polardb │ │ │ │ ├── PolardbMysqlPluginImpl.java │ │ │ │ └── PolardbPostgrePluginImpl.java │ │ │ └── postgre │ │ │ │ ├── PostgreCatalogHandler.java │ │ │ │ ├── PostgreFunctionHandler.java │ │ │ │ ├── PostgreIndexHandler.java │ │ │ │ ├── PostgreMaterializedViewHandler.java │ │ │ │ ├── PostgreObjectTypeMapper.java │ │ │ │ ├── PostgrePluginImpl.java │ │ │ │ ├── PostgreSequenceHandler.java │ │ │ │ ├── PostgreTableHandler.java │ │ │ │ └── PostgreViewHandler.java │ │ │ ├── param │ │ │ ├── MetaObjectParam.java │ │ │ └── TableInfoParam.java │ │ │ └── utils │ │ │ └── JdbcUtil.java │ │ └── test │ │ └── resources │ │ └── sql_init │ │ ├── doris.sql │ │ └── oracle.sql ├── dms-plugins-input │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── plugins │ │ └── input │ │ ├── AbstractInputPlugin.java │ │ ├── InputPlugin.java │ │ ├── InputPluginManager.java │ │ └── impl │ │ ├── CsvInputPlugin.java │ │ └── ExcelInputPlugin.java ├── dms-plugins-output │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── plugins │ │ └── output │ │ ├── AbstractOutputPlugin.java │ │ ├── OutputPlugin.java │ │ ├── OutputPluginManager.java │ │ └── impl │ │ ├── CsvOutputPlugin.java │ │ ├── ExcelOutputPlugin.java │ │ └── OrcOutputPlugin.java └── pom.xml ├── dms-scheduler ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── basedt │ └── dms │ └── scheduler │ ├── DmsJobListener.java │ ├── config │ └── QuartzConfig.java │ ├── job │ └── MySampleJob.java │ └── utils │ └── QuartzSchedulerUtil.java ├── dms-service ├── dms-service-base │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── service │ │ └── base │ │ ├── convert │ │ └── BaseConvert.java │ │ ├── datasource │ │ ├── DS.java │ │ ├── RoutingDataSource.java │ │ ├── RoutingDataSourceAspect.java │ │ └── RoutingDataSourceContext.java │ │ ├── dto │ │ ├── BaseDTO.java │ │ └── PageDTO.java │ │ └── param │ │ └── PaginationParam.java ├── dms-service-llm │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── service │ │ └── llm │ │ ├── DmsChatClient.java │ │ ├── LLMService.java │ │ ├── dto │ │ └── ChatMsgDTO.java │ │ └── service │ │ └── LLMServiceImpl.java ├── dms-service-log │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── service │ │ └── log │ │ ├── LogActionService.java │ │ ├── LogDataTaskService.java │ │ ├── LogLoginService.java │ │ ├── LogSqlHistoryService.java │ │ ├── convert │ │ ├── LogActionConvert.java │ │ ├── LogDataTaskConvert.java │ │ ├── LogLoginConvert.java │ │ └── LogSqlHistoryConvert.java │ │ ├── dto │ │ ├── LogActionDTO.java │ │ ├── LogDataTaskDTO.java │ │ ├── LogLoginDTO.java │ │ └── LogSqlHistoryDTO.java │ │ ├── impl │ │ ├── LogActionServiceImpl.java │ │ ├── LogDataTaskServiceImpl.java │ │ ├── LogLoginServiceImpl.java │ │ └── LogSqlHistoryServiceImpl.java │ │ └── param │ │ ├── LogActionParam.java │ │ ├── LogLoginParam.java │ │ └── LogSqlHistoryParam.java ├── dms-service-security │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── service │ │ └── security │ │ ├── DmsSecurityService.java │ │ ├── SessionFilter.java │ │ ├── UserDetailsInfo.java │ │ ├── annotation │ │ ├── AnonymousAccess.java │ │ └── PrivilegeDesc.java │ │ ├── enums │ │ ├── ActionCode.java │ │ ├── BlockCode.java │ │ ├── DmsPrivileges.java │ │ ├── ModuleCode.java │ │ └── PageCode.java │ │ ├── handler │ │ ├── CustomAccessDeniedHandler.java │ │ └── CustomAuthenticationEntryPoint.java │ │ ├── impl │ │ ├── DmsSecurityServiceImpl.java │ │ └── UserDetailsServiceImpl.java │ │ └── utils │ │ ├── CookieUtil.java │ │ └── SecurityUtil.java ├── dms-service-sys │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── service │ │ └── sys │ │ ├── SysConfigService.java │ │ ├── SysDictService.java │ │ ├── SysDictTypeService.java │ │ ├── SysPrivilegeService.java │ │ ├── SysRolePrivilegeService.java │ │ ├── SysRoleService.java │ │ ├── SysUserRoleService.java │ │ ├── SysUserService.java │ │ ├── cache │ │ ├── CaffeineCacheConfig.java │ │ └── DictCache.java │ │ ├── convert │ │ ├── DictVoConvert.java │ │ ├── SysConfigConvert.java │ │ ├── SysDictConvert.java │ │ ├── SysDictTypeConvert.java │ │ ├── SysPrivilegeConvert.java │ │ ├── SysRoleConvert.java │ │ ├── SysRolePrivilegeConvert.java │ │ ├── SysUserConvert.java │ │ └── SysUserRoleConvert.java │ │ ├── dto │ │ ├── EmailConfigDTO.java │ │ ├── LLMConfigDTO.java │ │ ├── SysConfigDTO.java │ │ ├── SysDictDTO.java │ │ ├── SysDictTypeDTO.java │ │ ├── SysPrivilegeDTO.java │ │ ├── SysRoleDTO.java │ │ ├── SysRolePrivilegeDTO.java │ │ ├── SysUserDTO.java │ │ └── SysUserRoleDTO.java │ │ ├── impl │ │ ├── SysConfigServiceImpl.java │ │ ├── SysDictServiceImpl.java │ │ ├── SysDictTypeServiceImpl.java │ │ ├── SysPrivilegeServiceImpl.java │ │ ├── SysRolePrivilegeServiceImpl.java │ │ ├── SysRoleServiceImpl.java │ │ ├── SysUserRoleServiceImpl.java │ │ └── SysUserServiceImpl.java │ │ └── param │ │ ├── SysDictParam.java │ │ ├── SysDictTypeParam.java │ │ ├── SysRoleParam.java │ │ └── SysUserParam.java ├── dms-service-workspace │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── basedt │ │ └── dms │ │ └── service │ │ └── workspace │ │ ├── DmsDataSourceService.java │ │ ├── DmsDataTaskService.java │ │ ├── DmsFileCatalogService.java │ │ ├── DmsFileService.java │ │ ├── DmsWorkspaceService.java │ │ ├── convert │ │ ├── DataSourceConvert.java │ │ ├── DmsDataSourceConvert.java │ │ ├── DmsDataTaskConvert.java │ │ ├── DmsFileCatalogConvert.java │ │ ├── DmsFileConvert.java │ │ └── DmsWorkspaceConvert.java │ │ ├── dto │ │ ├── DmsDataSourceDTO.java │ │ ├── DmsDataTaskDTO.java │ │ ├── DmsFileCatalogDTO.java │ │ ├── DmsFileDTO.java │ │ └── DmsWorkspaceDTO.java │ │ ├── impl │ │ ├── DmsDataSourceServiceImpl.java │ │ ├── DmsDataTaskServiceImpl.java │ │ ├── DmsFileCatalogServiceImpl.java │ │ ├── DmsFileServiceImpl.java │ │ └── DmsWorkspaceServiceImpl.java │ │ ├── param │ │ ├── DmsDataSourceParam.java │ │ ├── DmsDataTaskParam.java │ │ ├── DmsFileParam.java │ │ ├── DmsSqlExecParam.java │ │ └── DmsWorkspaceParam.java │ │ └── vo │ │ ├── DmsFileVO.java │ │ └── DmsImportTaskVO.java └── pom.xml ├── dms-ui ├── .env ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .hintrc ├── .npmrc ├── .prettierignore ├── .prettierrc ├── config │ ├── config.ts │ ├── defaultSettings.ts │ ├── proxy.ts │ └── routes.ts ├── jsconfig.json ├── package.json ├── pom.xml ├── public │ ├── CNAME │ ├── favicon.ico │ ├── images │ │ ├── bg.png │ │ └── databases │ │ │ ├── apachehadoop.svg │ │ │ ├── apachehive.svg │ │ │ ├── apachekafka.svg │ │ │ ├── clickhouse.svg │ │ │ ├── doris.svg │ │ │ ├── gaussdb.svg │ │ │ ├── greenplum.svg │ │ │ ├── hologres.svg │ │ │ ├── mariadb.svg │ │ │ ├── mssql.svg │ │ │ ├── mysql.svg │ │ │ ├── oracle.svg │ │ │ ├── polardb_mysql.svg │ │ │ ├── polardb_postgre.svg │ │ │ ├── postgresql.svg │ │ │ └── redis.svg │ └── logo.svg ├── src │ ├── access.ts │ ├── app.tsx │ ├── components │ │ ├── AppLogoComponent │ │ │ └── index.tsx │ │ ├── CloseableTab │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── CodeEditor │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── suggestionsProvider.tsx │ │ ├── CollapsedIcon │ │ │ └── index.tsx │ │ ├── DmsAgGrid │ │ │ ├── DataExportModal.tsx │ │ │ ├── DmsGrid.tsx │ │ │ ├── DmsGrid.type.ts │ │ │ ├── customHeader.tsx │ │ │ ├── index.tsx │ │ │ └── style │ │ │ │ ├── DmsGrid.less │ │ │ │ ├── ag-grid.css │ │ │ │ ├── ag-theme-balham.css │ │ │ │ └── style.less │ │ ├── DmsAgent │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── Footer │ │ │ └── index.tsx │ │ ├── Header │ │ │ ├── HeaderDropdown │ │ │ │ └── index.tsx │ │ │ ├── HeaderMegaMenu.tsx │ │ │ ├── RightContent │ │ │ │ ├── AvatarDropdown.tsx │ │ │ │ └── index.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── MarkDown │ │ │ └── DmsMarkdown.tsx │ │ └── SelectLang │ │ │ └── index.tsx │ ├── constants.ts │ ├── global.less │ ├── global.tsx │ ├── icons │ │ ├── ai-primary.svg │ │ ├── ai-white.svg │ │ ├── collect.svg │ │ ├── collects.svg │ │ ├── column.svg │ │ ├── database.svg │ │ ├── file.svg │ │ ├── folder.svg │ │ ├── function.svg │ │ ├── index.svg │ │ ├── schema.svg │ │ ├── sequence.svg │ │ ├── sortAsc.svg │ │ ├── sortDes.svg │ │ ├── table.svg │ │ ├── unfold.svg │ │ ├── unfoldBolb.svg │ │ └── view.svg │ ├── idb.ts │ ├── locales │ │ ├── en-US.ts │ │ ├── en-US │ │ │ ├── menu.ts │ │ │ ├── pages.ts │ │ │ └── pages │ │ │ │ ├── admin.ts │ │ │ │ ├── user.center.ts │ │ │ │ ├── user.ts │ │ │ │ └── workspace.ts │ │ ├── zh-CN.ts │ │ └── zh-CN │ │ │ ├── menu.ts │ │ │ ├── pages.ts │ │ │ └── pages │ │ │ ├── admin.ts │ │ │ ├── user.center.ts │ │ │ ├── user.ts │ │ │ └── workspace.ts │ ├── manifest.json │ ├── models │ │ └── global.tsx │ ├── pages │ │ ├── Abnormal │ │ │ ├── 403.tsx │ │ │ ├── 404.tsx │ │ │ └── 500.tsx │ │ ├── Admin │ │ │ ├── Dict │ │ │ │ ├── Data │ │ │ │ │ ├── DictDataForm.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── DictTypeForm.tsx │ │ │ │ └── index.tsx │ │ │ ├── Role │ │ │ │ ├── PrivilegeGrant.tsx │ │ │ │ ├── RoleForm.tsx │ │ │ │ ├── RoleUserGrant.tsx │ │ │ │ └── index.tsx │ │ │ ├── Setting │ │ │ │ ├── EmailSetting.tsx │ │ │ │ ├── LLMSetting.tsx │ │ │ │ └── index.tsx │ │ │ └── User │ │ │ │ ├── UserForm.tsx │ │ │ │ ├── UserRoleGrant.tsx │ │ │ │ └── index.tsx │ │ ├── Console │ │ │ ├── Dashboard │ │ │ │ └── index.tsx │ │ │ ├── Workspace │ │ │ │ ├── DataExport │ │ │ │ │ └── index.tsx │ │ │ │ ├── DataImport │ │ │ │ │ └── index.tsx │ │ │ │ ├── DataQuery │ │ │ │ │ ├── components │ │ │ │ │ │ ├── DataImportModal.tsx │ │ │ │ │ │ ├── DbCatalogTree.tsx │ │ │ │ │ │ ├── DbCreateModal.tsx │ │ │ │ │ │ ├── DbRenameModal.tsx │ │ │ │ │ │ ├── DbSelectModal.tsx │ │ │ │ │ │ ├── DbTableInfo.tsx │ │ │ │ │ │ ├── DdlConfirmModal.tsx │ │ │ │ │ │ ├── DndRow.tsx │ │ │ │ │ │ ├── FileCatalogModal.tsx │ │ │ │ │ │ ├── FileCatalogTree.tsx │ │ │ │ │ │ ├── FileModal.tsx │ │ │ │ │ │ ├── FileRenameModal.tsx │ │ │ │ │ │ └── ScriptPreviewModal.tsx │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── DataSource │ │ │ │ │ ├── components │ │ │ │ │ │ ├── DataSourceTypeSelect.tsx │ │ │ │ │ │ ├── GenericDataSourceForm.tsx │ │ │ │ │ │ └── HiveDataSourceForm.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── QueryHistory │ │ │ │ │ └── index.tsx │ │ │ │ ├── components │ │ │ │ │ ├── TaskLogModal.tsx │ │ │ │ │ └── WorkspaceForm.tsx │ │ │ │ └── index.tsx │ │ │ └── index.tsx │ │ └── User │ │ │ ├── Login │ │ │ └── index.tsx │ │ │ ├── Register │ │ │ └── index.tsx │ │ │ ├── components │ │ │ ├── MailChangeForm.tsx │ │ │ ├── PasswordChangeForm.tsx │ │ │ ├── UserLog.tsx │ │ │ ├── UserMessage.tsx │ │ │ ├── UserProfile.tsx │ │ │ └── UserSecurity.tsx │ │ │ ├── index.less │ │ │ └── index.tsx │ ├── requestErrorConfig.ts │ ├── service-worker.js │ ├── services │ │ ├── admin │ │ │ ├── auth.service.ts │ │ │ ├── config.service.ts │ │ │ ├── dict.data.service.ts │ │ │ ├── dict.type.service.ts │ │ │ ├── privilege.service.ts │ │ │ ├── role.service.ts │ │ │ ├── typings.d.ts │ │ │ └── user.service.ts │ │ ├── meta │ │ │ ├── metadata.service.ts │ │ │ └── typings.d.ts │ │ ├── user │ │ │ ├── log.service.ts │ │ │ ├── msg.service.ts │ │ │ └── typings.d.ts │ │ └── workspace │ │ │ ├── aiChat.service.ts │ │ │ ├── data.task.ts │ │ │ ├── datasource.service.ts │ │ │ ├── file.catalog.service.ts │ │ │ ├── file.service.ts │ │ │ ├── sql.service.ts │ │ │ ├── typings.d.ts │ │ │ └── workspace.service.ts │ ├── socket.ts │ ├── tailwind.config.js │ ├── tailwind.css │ ├── typings.d.ts │ └── utils │ │ ├── ExcelUtil.ts │ │ └── NumberUtil.ts └── tsconfig.json ├── lombok.config ├── pom.xml └── scripts └── docker ├── build ├── dms-backend │ ├── Dockerfile │ └── application-docker.yml └── dms-frontend │ ├── Dockerfile │ └── nginx.conf ├── local └── docker-compose.yml └── thirdparties ├── README.md ├── clickhouse └── docker-compose.yml ├── doris └── docker-compose.yml ├── gaussdb └── docker-compose.yml ├── greenplum └── docker-compose.yml ├── hive └── docker-compose.yml ├── mariadb └── docker-compose.yml ├── mongodb └── docker-compose.yml ├── mssql └── docker-compose.yml ├── mysql ├── docker-compose.yml └── my_custom.cnf ├── oracle └── docker-compose.yml └── spark └── docker-compose.yml /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **Environment:** 14 | - OS: [e.g. iOS] 15 | - Browser [e.g. chrome, safari] 16 | - Version [e.g. 22] 17 | 18 | **To Reproduce** 19 | Steps to reproduce the behavior: 20 | 1. Go to '...' 21 | 2. Click on '....' 22 | 3. Scroll down to '....' 23 | 4. See error 24 | 25 | **Expected behavior** 26 | A clear and concise description of what you expected to happen. 27 | 28 | **Screenshots** 29 | If applicable, add screenshots to help explain your problem. 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: DMS CI 2 | 3 | on: 4 | push: 5 | branches: [ 'main','dev','feature/**','releases/**' ] 6 | paths-ignore: [ '**/*.md', '**/*.svg','**/*.png' ] 7 | pull_request: 8 | branches: [ 'main','dev','feature/**','releases/**' ] 9 | paths-ignore: [ '**/*.md', '**/*.svg','**/*.png' ] 10 | workflow_dispatch: 11 | 12 | jobs: 13 | build: 14 | strategy: 15 | fail-fast: false 16 | matrix: 17 | os: [ ubuntu-latest, macos-latest, windows-latest ] 18 | jdk: [ 17 ] 19 | runs-on: ${{ matrix.os }} 20 | steps: 21 | - name: Checkout Source Code 22 | uses: actions/checkout@v4 23 | - name: Setup Jdk Env ${{ matrix.jdk }} 24 | uses: actions/setup-java@v4 25 | with: 26 | java-version: ${{ matrix.jdk }} 27 | distribution: 'corretto' 28 | cache: 'maven' 29 | - name: Build Project With Maven 30 | run: mvn clean package -B -U -T 4 '-Dmaven.test.skip=true' --file pom.xml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | **/target/ 4 | 5 | # Log file 6 | *.log 7 | 8 | # BlueJ files 9 | *.ctxt 10 | 11 | # Mobile Tools for Java (J2ME) 12 | .mtj.tmp/ 13 | 14 | # Package Files # 15 | *.jar 16 | *.war 17 | *.nar 18 | *.ear 19 | *.zip 20 | *.tar.gz 21 | *.rar 22 | 23 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 24 | hs_err_pid* 25 | 26 | # idea 27 | /.idea/ 28 | *.iml 29 | **/.flattened-pom.xml 30 | 31 | # docker 32 | /scripts/docker/data/ 33 | /scripts/docker/thirdparties/**/data/ 34 | # macos 35 | .DS_Store 36 | 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Base DMS is an open-source, free, and AI-powered intelligent data management system. It provides a web-based SQL editor for querying and managing database objects, and supports AI assisted development. Currently, it is compatible with multiple databases including MySQL, Oracle, PostgreSQL, Apache Doris, and more. 4 | 5 | ![sql-ide.png](https://basedt.github.io/dms-web/static/image/sql-ide.d1a00530.png) 6 | 7 | ## Features 8 | 9 | - **User-friendly**: Provides a graphical web interface for intuitive and simple operation 10 | - **Database Management**: Supports common databases such as MySQL, Oracle, PostgreSQL, and more 11 | - **SQL Editor**: Offers a web-based SQL editor for online querying, with code suggestions and SQL file management 12 | - **AI Integration**: Enables AI LLM configuration and provides conversational AI assistance for development 13 | - **Import/Export**: Supports data import/export operations, with split configuration for exporting large tables 14 | - **SQL Auditing**: Tracks historical SQL execution records for administrator auditing and traceability 15 | 16 | ## Try DMS 17 | 18 | [Get Started](https://basedt.github.io/dms-web/document/start/quickStart.html) Quickly to Learn How to Use DMS 19 | 20 | ## WeChat 21 | 22 | ![qrcode_wechat.jpg](https://basedt.github.io/dms-web/static/image/qrcode_wechat.cfe6b758.jpg) 23 | -------------------------------------------------------------------------------- /dms-alert/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | dms 7 | com.basedt 8 | ${reversion} 9 | 10 | 4.0.0 11 | 12 | dms-alert 13 | 14 | 15 | 16 | 17 | com.basedt 18 | dms-service-sys 19 | ${reversion} 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-mail 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /dms-alert/src/main/java/com/basedt/dms/alert/SysMessageService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.alert; 19 | 20 | import com.basedt.dms.alert.dto.SysMessageDTO; 21 | import com.basedt.dms.alert.param.SysMessageParam; 22 | import com.basedt.dms.service.base.dto.PageDTO; 23 | 24 | import java.util.List; 25 | import java.util.Set; 26 | 27 | public interface SysMessageService { 28 | 29 | PageDTO listMessageByPage(SysMessageParam param); 30 | 31 | void insert(SysMessageDTO messageDTO); 32 | 33 | void update(SysMessageDTO messageDTO); 34 | 35 | List listByIds(Set ids); 36 | 37 | Long countUnReadMsg(String receiver); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /dms-alert/src/main/java/com/basedt/dms/alert/dto/SysMessageDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.alert.dto; 19 | 20 | import com.basedt.dms.common.vo.DictVO; 21 | import com.basedt.dms.service.base.dto.BaseDTO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | @Data 26 | @EqualsAndHashCode(callSuper = true) 27 | public class SysMessageDTO extends BaseDTO { 28 | 29 | private String title; 30 | 31 | private DictVO messageType; 32 | 33 | private String receiver; 34 | 35 | private String sender; 36 | 37 | private String content; 38 | 39 | private DictVO isRead; 40 | 41 | private DictVO isDelete; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /dms-alert/src/main/java/com/basedt/dms/alert/param/SysMessageParam.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.alert.param; 19 | 20 | import com.basedt.dms.service.base.param.PaginationParam; 21 | import lombok.Data; 22 | import lombok.EqualsAndHashCode; 23 | 24 | @Data 25 | @EqualsAndHashCode(callSuper = true) 26 | public class SysMessageParam extends PaginationParam { 27 | 28 | private String receiver; 29 | 30 | private String isRead; 31 | 32 | private String isDelete; 33 | 34 | private String messageType; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/DmsApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms; 19 | 20 | import cn.hutool.extra.spring.EnableSpringUtil; 21 | import org.springframework.boot.SpringApplication; 22 | import org.springframework.boot.autoconfigure.SpringBootApplication; 23 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisIndexedHttpSession; 24 | 25 | @SpringBootApplication 26 | @EnableSpringUtil 27 | @EnableRedisIndexedHttpSession(maxInactiveIntervalInSeconds = 60 * 3, redisNamespace = "dms:session") 28 | public class DmsApplication { 29 | public static void main(String[] args) { 30 | SpringApplication.run(DmsApplication.class); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/annotation/AuditLogging.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.api.annotation; 19 | 20 | import java.lang.annotation.ElementType; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.RetentionPolicy; 23 | import java.lang.annotation.Target; 24 | 25 | @Target(ElementType.METHOD) 26 | @Retention(RetentionPolicy.RUNTIME) 27 | public @interface AuditLogging { 28 | 29 | String value() default ""; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/vo/ChatParamVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.api.vo; 20 | 21 | import lombok.Data; 22 | 23 | import java.util.List; 24 | 25 | @Data 26 | public class ChatParamVO { 27 | 28 | private String cid; 29 | 30 | private List messages; 31 | } 32 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/vo/EmailBindVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.api.vo; 19 | 20 | import jakarta.validation.constraints.Email; 21 | import lombok.Data; 22 | 23 | import jakarta.validation.constraints.NotBlank; 24 | 25 | @Data 26 | public class EmailBindVO { 27 | 28 | @NotBlank 29 | @Email 30 | private String email; 31 | 32 | @NotBlank 33 | private String authCode; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/vo/PwdChangeVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.api.vo; 19 | 20 | import lombok.Data; 21 | 22 | import jakarta.validation.constraints.NotNull; 23 | 24 | @Data 25 | public class PwdChangeVO { 26 | 27 | @NotNull 28 | private String oldPassword; 29 | 30 | @NotNull 31 | private String password; 32 | 33 | @NotNull 34 | private String confirmPassword; 35 | } 36 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/vo/meta/ColumnInfoVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.api.vo.meta; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serial; 24 | import java.io.Serializable; 25 | 26 | @Data 27 | public class ColumnInfoVO implements Serializable { 28 | 29 | @Serial 30 | private static final long serialVersionUID = 1L; 31 | 32 | private String id; 33 | 34 | private String columnName; 35 | 36 | private String dataType; 37 | 38 | private String defaultValue; 39 | 40 | private String comment; 41 | 42 | private Boolean nullable; 43 | 44 | private Integer ordinal; 45 | } 46 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/vo/meta/IndexInfoVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.api.vo.meta; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serial; 24 | import java.io.Serializable; 25 | import java.util.List; 26 | 27 | @Data 28 | public class IndexInfoVO implements Serializable { 29 | 30 | @Serial 31 | private static final long serialVersionUID = 1L; 32 | 33 | private String id; 34 | 35 | private String indexName; 36 | 37 | private String indexType; 38 | 39 | private Boolean uniqueness; 40 | 41 | private List columns; 42 | 43 | private Boolean pk; 44 | 45 | private Boolean fk; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/vo/meta/PartitionInfoVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.api.vo.meta; 20 | 21 | import lombok.Data; 22 | 23 | import java.io.Serial; 24 | import java.io.Serializable; 25 | import java.time.LocalDateTime; 26 | 27 | @Data 28 | public class PartitionInfoVO implements Serializable { 29 | 30 | @Serial 31 | private static final long serialVersionUID = 1L; 32 | 33 | private String id; 34 | 35 | private String partitionName; 36 | 37 | private String partitionExpr; 38 | 39 | private Long rows; 40 | 41 | private Long size; 42 | 43 | private LocalDateTime createTime; 44 | 45 | private LocalDateTime updateTime; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /dms-api/src/main/java/com/basedt/dms/api/vo/meta/TableInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.basedt.dms.api.vo.meta; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotNull; 6 | import java.io.Serial; 7 | import java.io.Serializable; 8 | import java.util.List; 9 | 10 | @Data 11 | public class TableInfoVO implements Serializable { 12 | 13 | @Serial 14 | private static final long serialVersionUID = 1L; 15 | 16 | private String catalog; 17 | 18 | @NotNull 19 | private String schemaName; 20 | 21 | @NotNull 22 | private String tableName; 23 | 24 | private String comment; 25 | 26 | private List columns; 27 | 28 | private List indexes; 29 | 30 | private List partitions; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dms-api/src/main/resources/static/i18n/messages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | -------------------------------------------------------------------------------- /dms-api/src/test/resources/privilege.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basedt/dms/afcef9229fd77d4d81a45cdd2789c5c1fa770052/dms-api/src/test/resources/privilege.txt -------------------------------------------------------------------------------- /dms-common/src/main/java/com/basedt/dms/common/enums/AlertType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.common.enums; 19 | 20 | import com.basedt.dms.common.vo.DictVO; 21 | import lombok.Getter; 22 | 23 | @Getter 24 | public enum AlertType { 25 | EMAIL("email", "Email"), 26 | MESSAGE("message", "Message"); 27 | private final String value; 28 | private final String label; 29 | 30 | AlertType(String value, String label) { 31 | this.label = label; 32 | this.value = value; 33 | } 34 | 35 | public DictVO toDict() { 36 | return new DictVO(this.getValue(), this.getLabel()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dms-common/src/main/java/com/basedt/dms/common/enums/DataType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.common.enums; 19 | 20 | public enum DataType { 21 | NUMBER, TEXT, BOOLEAN, DATESTRING, TIMESTAMP 22 | } 23 | -------------------------------------------------------------------------------- /dms-common/src/main/java/com/basedt/dms/common/enums/ErrorShowType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.common.enums; 19 | 20 | import lombok.Getter; 21 | 22 | @Getter 23 | public enum ErrorShowType { 24 | 25 | SILENT("0", "SILENT"), 26 | WARN_MESSAGE("1", "WARN_MESSAGE"), 27 | ERROR_MESSAGE("2", "ERROR_MESSAGE"), 28 | NOTIFICATION("4", "NOTIFICATION"), 29 | REDIRECT("9", "REDIRECT"); 30 | 31 | private final String value; 32 | private final String label; 33 | 34 | ErrorShowType(String value, String label) { 35 | this.label = label; 36 | this.value = value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dms-common/src/main/java/com/basedt/dms/common/enums/RegisterChannel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.common.enums; 19 | 20 | import com.basedt.dms.common.vo.DictVO; 21 | import lombok.Getter; 22 | 23 | @Getter 24 | public enum RegisterChannel { 25 | 26 | REGISTER("01", "REGISTER"), 27 | 28 | BACKGROUND_IMPORT("02", "BACKGROUND_IMPORT"); 29 | 30 | private final String value; 31 | private final String label; 32 | 33 | RegisterChannel(String value, String label) { 34 | this.value = value; 35 | this.label = label; 36 | } 37 | 38 | public DictVO toDict() { 39 | return new DictVO(this.getValue(), this.getLabel()); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /dms-common/src/main/java/com/basedt/dms/common/enums/RoleType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.common.enums; 19 | 20 | import com.basedt.dms.common.vo.DictVO; 21 | import lombok.Getter; 22 | 23 | @Getter 24 | public enum RoleType { 25 | ROLE_SYS("01", "SYS"), 26 | ROLE_USER("02", "USER"); 27 | private final String value; 28 | private final String label; 29 | 30 | RoleType(String value, String label) { 31 | this.label = label; 32 | this.value = value; 33 | } 34 | 35 | public DictVO toDict() { 36 | return new DictVO(this.getValue(), this.getLabel()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dms-common/src/main/java/com/basedt/dms/common/utils/IdGenerateUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.common.utils; 19 | 20 | import cn.hutool.core.lang.Snowflake; 21 | import cn.hutool.core.util.IdUtil; 22 | import org.sqids.Sqids; 23 | 24 | import java.util.Collections; 25 | 26 | public class IdGenerateUtil { 27 | 28 | public static String getId() { 29 | Snowflake snowflake = IdUtil.getSnowflake(1, 1); 30 | Sqids sqids = Sqids.builder() 31 | .minLength(6) 32 | .alphabet("abcABCxyzXYZdefghijklmnopqrstuvw0123456789DEFGHIJKLMNOPQRSTUVW") 33 | .build(); 34 | return sqids.encode(Collections.singletonList(snowflake.nextId())); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/entity/log/LogDataTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.entity.log; 19 | 20 | import com.baomidou.mybatisplus.annotation.TableName; 21 | import com.basedt.dms.dao.entity.BaseDO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | 26 | @Data 27 | @EqualsAndHashCode(callSuper = true) 28 | @TableName(value = "log_data_task", resultMap = "logDataTaskMap") 29 | public class LogDataTask extends BaseDO { 30 | 31 | private static final long serialVersionUID = 1L; 32 | 33 | private Long taskId; 34 | 35 | private String logInfo; 36 | } 37 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/entity/master/sys/SysConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.entity.master.sys; 19 | 20 | import com.baomidou.mybatisplus.annotation.TableName; 21 | import com.basedt.dms.dao.entity.BaseDO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | @Data 26 | @EqualsAndHashCode(callSuper = true) 27 | @TableName(value = "sys_config", resultMap = "sysConfigMap") 28 | public class SysConfig extends BaseDO { 29 | 30 | private static final long serialVersionUID = 1L; 31 | 32 | private String cfgCode; 33 | 34 | private String cfgValue; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/entity/master/sys/SysPrivilege.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.entity.master.sys; 19 | 20 | import com.baomidou.mybatisplus.annotation.TableName; 21 | import com.basedt.dms.dao.entity.BaseDO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | @Data 26 | @EqualsAndHashCode(callSuper = true) 27 | @TableName(value = "sys_privilege", resultMap = "sysPrivilegeMap") 28 | public class SysPrivilege extends BaseDO { 29 | 30 | private static final long serialVersionUID = 1L; 31 | 32 | private String privilegeCode; 33 | 34 | private String privilegeName; 35 | 36 | private String parentCode; 37 | 38 | private Integer level; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/entity/master/sys/SysRolePrivilege.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.entity.master.sys; 19 | 20 | import com.baomidou.mybatisplus.annotation.TableName; 21 | import com.basedt.dms.dao.entity.BaseDO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | @Data 26 | @EqualsAndHashCode(callSuper = true) 27 | @TableName(value = "sys_role_privilege", resultMap = "sysRolePrivilegeMap") 28 | public class SysRolePrivilege extends BaseDO { 29 | 30 | private static final long serialVersionUID = 1L; 31 | 32 | private Long roleId; 33 | 34 | private Long privilegeId; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/entity/master/sys/SysUserRole.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.entity.master.sys; 19 | 20 | import com.baomidou.mybatisplus.annotation.TableName; 21 | import com.basedt.dms.dao.entity.BaseDO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | @Data 26 | @EqualsAndHashCode(callSuper = true) 27 | @TableName(value = "sys_user_role", resultMap = "sysUserRoleMap") 28 | public class SysUserRole extends BaseDO { 29 | 30 | private static final long serialVersionUID = 1L; 31 | 32 | private Long userId; 33 | 34 | private Long roleId; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/entity/master/workspace/DmsFileCatalog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.entity.master.workspace; 19 | 20 | import com.baomidou.mybatisplus.annotation.TableName; 21 | import com.basedt.dms.dao.entity.BaseDO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | @Data 26 | @EqualsAndHashCode(callSuper = true) 27 | @TableName(value = "dms_file_catalog", resultMap = "dmsFileCatalogMap") 28 | public class DmsFileCatalog extends BaseDO { 29 | 30 | private static final long serialVersionUID = 1L; 31 | 32 | private String name; 33 | 34 | private Long pid; 35 | 36 | private Long workspaceId; 37 | } 38 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/entity/master/workspace/DmsWorkspace.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.entity.master.workspace; 19 | 20 | import com.baomidou.mybatisplus.annotation.TableName; 21 | import com.basedt.dms.dao.entity.BaseDO; 22 | import lombok.Data; 23 | import lombok.EqualsAndHashCode; 24 | 25 | @Data 26 | @EqualsAndHashCode(callSuper = true) 27 | @TableName(value = "dms_workspace", resultMap = "dmsWorkspaceMap") 28 | public class DmsWorkspace extends BaseDO { 29 | 30 | private static final long serialVersionUID = 1L; 31 | 32 | private String workspaceCode; 33 | 34 | private String workspaceName; 35 | 36 | private String owner; 37 | 38 | private String remark; 39 | } 40 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/log/LogActionMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.log; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.log.LogAction; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface LogActionMapper extends BaseMapper { 26 | } 27 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/log/LogDataTaskMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.log; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.log.LogDataTask; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface LogDataTaskMapper extends BaseMapper { 26 | } 27 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/log/LogLoginMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.log; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.log.LogLogin; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface LogLoginMapper extends BaseMapper { 26 | } 27 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/log/LogSqlHistoryMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.log; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.log.LogSqlHistory; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface LogSqlHistoryMapper extends BaseMapper { 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysConfigMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysConfig; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface SysConfigMapper extends BaseMapper { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysDictMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysDict; 22 | import org.apache.ibatis.annotations.Param; 23 | import org.springframework.stereotype.Repository; 24 | 25 | import java.util.List; 26 | 27 | @Repository 28 | public interface SysDictMapper extends BaseMapper { 29 | 30 | List selectByType(@Param("dictTypeCode") String dictTypeCode); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysDictTypeMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysDictType; 22 | import org.apache.ibatis.annotations.Param; 23 | import org.springframework.stereotype.Repository; 24 | 25 | @Repository 26 | public interface SysDictTypeMapper extends BaseMapper { 27 | 28 | SysDictType selectByCode(@Param("dictTypeCode") String dictTypeCode); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysMessageMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysMessage; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface SysMessageMapper extends BaseMapper { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysPrivilegeMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysPrivilege; 22 | import org.apache.ibatis.annotations.Param; 23 | import org.springframework.stereotype.Repository; 24 | 25 | import java.util.List; 26 | 27 | @Repository 28 | public interface SysPrivilegeMapper extends BaseMapper { 29 | 30 | List listPrivilegeByRole(@Param("roleId") Long roleId); 31 | } 32 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysRoleMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysRole; 22 | import org.apache.ibatis.annotations.Param; 23 | import org.springframework.stereotype.Repository; 24 | 25 | import java.util.List; 26 | 27 | @Repository 28 | public interface SysRoleMapper extends BaseMapper { 29 | 30 | List selectByUserName(@Param("userName") String userName); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysRolePrivilegeMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysRolePrivilege; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface SysRolePrivilegeMapper extends BaseMapper { 26 | } 27 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysUserMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysUser; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface SysUserMapper extends BaseMapper { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/sys/SysUserRoleMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.sys; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.sys.SysUserRole; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface SysUserRoleMapper extends BaseMapper { 26 | } 27 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/workspace/DmsDataSourceMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.workspace; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.workspace.DmsDataSource; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface DmsDataSourceMapper extends BaseMapper { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/workspace/DmsDataTaskMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.workspace; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.workspace.DmsDataTask; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface DmsDataTaskMapper extends BaseMapper { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/workspace/DmsFileCatalogMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.workspace; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.workspace.DmsFileCatalog; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface DmsFileCatalogMapper extends BaseMapper { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dms-dao/src/main/java/com/basedt/dms/dao/mapper/master/workspace/DmsWorkspaceMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.dao.mapper.master.workspace; 19 | 20 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 21 | import com.basedt.dms.dao.entity.master.workspace.DmsWorkspace; 22 | import org.springframework.stereotype.Repository; 23 | 24 | @Repository 25 | public interface DmsWorkspaceMapper extends BaseMapper { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | dms-plugins 7 | com.basedt 8 | ${reversion} 9 | 10 | 4.0.0 11 | dms-plugins-core 12 | 13 | 14 | 15 | com.basedt 16 | dms-common 17 | ${reversion} 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-core/src/main/java/com/basedt/dms/plugins/core/Plugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.core; 19 | 20 | public interface Plugin { 21 | 22 | PluginInfo getPluginInfo(); 23 | 24 | void setPluginInfo(PluginInfo pluginInfo); 25 | 26 | String getPluginName(); 27 | 28 | PluginType getPluginType(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-core/src/main/java/com/basedt/dms/plugins/core/PluginType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.core; 19 | 20 | public enum PluginType { 21 | DATASOURCE, 22 | RESOURCE_OUTPUT, 23 | RESOURCE_INPUT; 24 | } 25 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/ForeignTableHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.plugins.datasource; 20 | 21 | import com.basedt.dms.plugins.datasource.dto.ColumnDTO; 22 | import com.basedt.dms.plugins.datasource.dto.TableDTO; 23 | 24 | import javax.sql.DataSource; 25 | import java.sql.SQLException; 26 | import java.util.List; 27 | import java.util.Map; 28 | 29 | public interface ForeignTableHandler { 30 | 31 | List listForeignTables(String catalog, String schemaPattern, String tablePattern) throws SQLException; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/dto/FunctionDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.dto; 19 | 20 | import lombok.Data; 21 | import lombok.EqualsAndHashCode; 22 | 23 | @EqualsAndHashCode(callSuper = true) 24 | @Data 25 | public class FunctionDTO extends ObjectDTO { 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | private String sourceCode; 30 | 31 | private String remark; 32 | 33 | public String getFunctionName() { 34 | return this.getObjectName(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/dto/GroupDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.dto; 19 | 20 | import lombok.Data; 21 | 22 | @Data 23 | public class GroupDTO { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | private String groupKey; 28 | 29 | private String groupLabel; 30 | 31 | private String groupType; 32 | 33 | private String groupOrder; 34 | 35 | public GroupDTO(String groupKey, String groupLabel, String groupType, String groupOrder) { 36 | this.groupKey = groupKey; 37 | this.groupLabel = groupLabel; 38 | this.groupType = groupType; 39 | this.groupOrder = groupOrder; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/dto/MaterializedViewDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.dto; 19 | 20 | import lombok.Data; 21 | import lombok.EqualsAndHashCode; 22 | 23 | @EqualsAndHashCode(callSuper = true) 24 | @Data 25 | public class MaterializedViewDTO extends ObjectDTO { 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | private String querySql; 30 | 31 | private Long dataBytes; 32 | 33 | private String remark; 34 | 35 | public String getMViewName() { 36 | return this.getObjectName(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/dto/PartitionDTO.java: -------------------------------------------------------------------------------- 1 | package com.basedt.dms.plugins.datasource.dto; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | 6 | @EqualsAndHashCode(callSuper = true) 7 | @Data 8 | public class PartitionDTO extends ObjectDTO { 9 | 10 | private Long partitionRows; 11 | 12 | private Long partitionBytes; 13 | 14 | private String partitionExpr; 15 | 16 | public String getPartitionName() { 17 | return this.getObjectName(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/dto/SequenceDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.dto; 19 | 20 | import lombok.Data; 21 | import lombok.EqualsAndHashCode; 22 | 23 | @EqualsAndHashCode(callSuper = true) 24 | @Data 25 | public class SequenceDTO extends ObjectDTO { 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | private Long startValue; 30 | 31 | private Long minValue; 32 | 33 | private Long maxValue; 34 | 35 | private Long incrementBy; 36 | 37 | private Boolean isCycle; 38 | 39 | private Long lastValue; 40 | 41 | public String getSequenceName() { 42 | return this.getObjectName(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/dto/SuggestionDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.dto; 19 | 20 | import jakarta.validation.constraints.NotBlank; 21 | import lombok.Data; 22 | 23 | 24 | @Data 25 | public class SuggestionDTO { 26 | 27 | @NotBlank 28 | private String label; 29 | 30 | private String kind; 31 | 32 | private String documentation; 33 | 34 | @NotBlank 35 | private String insertText; 36 | 37 | private String detail; 38 | 39 | private String insertTextRules; 40 | 41 | } -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/dto/ViewDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.dto; 19 | 20 | import lombok.Data; 21 | import lombok.EqualsAndHashCode; 22 | 23 | @EqualsAndHashCode(callSuper = true) 24 | @Data 25 | public class ViewDTO extends ObjectDTO { 26 | 27 | private static final long serialVersionUID = 1L; 28 | 29 | private String querySql; 30 | 31 | private String remark; 32 | 33 | public String getViewName() { 34 | return getObjectName(); 35 | } 36 | 37 | public void setViewName(String viewName) { 38 | setObjectName(viewName); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/enums/DbGroupType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.enums; 19 | 20 | public enum DbGroupType { 21 | 22 | G_DATABASE, 23 | G_SCHEMA, 24 | G_TABLE, 25 | G_VIEW, 26 | G_MATERIALIZED_VIEW, 27 | G_INDEX, 28 | G_FUNCTION, 29 | G_SEQUENCE, 30 | G_FOREIGN_TABLE, 31 | G_TABLE_COLUMN, 32 | G_TABLE_PK, 33 | G_TABLE_FK, 34 | G_TABLE_INDEX, 35 | G_DEFAULT; 36 | } 37 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/enums/DbObjectType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.enums; 19 | 20 | public enum DbObjectType { 21 | CATALOG, 22 | DATABASE, 23 | SCHEMA, 24 | TABLE, 25 | VIEW, 26 | FOREIGN_TABLE, 27 | MATERIALIZED_VIEW, 28 | COLUMN, 29 | SEQUENCE, 30 | FUNCTION, 31 | INDEX, 32 | PK, 33 | FK, 34 | OBJECT; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/enums/DmlType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.datasource.enums; 19 | 20 | public enum DmlType { 21 | SELECT, INSERT, UPDATE, DELETE 22 | } 23 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/impl/clickhouse/ClickHouseFunctionHandler.java: -------------------------------------------------------------------------------- 1 | package com.basedt.dms.plugins.datasource.impl.clickhouse; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import com.basedt.dms.plugins.datasource.dto.FunctionDTO; 5 | import com.basedt.dms.plugins.datasource.impl.jdbc.JdbcFunctionHandler; 6 | 7 | import java.sql.SQLException; 8 | import java.util.List; 9 | 10 | public class ClickHouseFunctionHandler extends JdbcFunctionHandler { 11 | 12 | @Override 13 | public List listFunctionDetails(String catalog, String schemaPattern, String functionPattern) throws SQLException { 14 | String sql = "select" + catalog + 15 | " as catalog_name," + schemaPattern + 16 | " as schema_name," + 17 | " t.name as object_name," + 18 | " 'FUNCTION' as object_type," + 19 | " '' as source_code," + 20 | " toDateTime('1970-01-01 00:00:00') as create_time," + 21 | " toDateTime('1970-01-01 00:00:00') as last_ddl_time," + 22 | " t.description as remark" + 23 | " from system.functions t " + 24 | " where 1=1 "; 25 | if (StrUtil.isNotEmpty(functionPattern)) { 26 | sql += " and t.name = '" + functionPattern + "'"; 27 | } 28 | return super.listFunctionFromDB(sql); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/impl/doris/DorisCatalogHandler.java: -------------------------------------------------------------------------------- 1 | package com.basedt.dms.plugins.datasource.impl.doris; 2 | 3 | import com.basedt.dms.plugins.datasource.dto.SchemaDTO; 4 | import com.basedt.dms.plugins.datasource.impl.mysql.MysqlCatalogHandler; 5 | 6 | import java.sql.SQLException; 7 | import java.util.List; 8 | import java.util.stream.Collectors; 9 | 10 | import static com.basedt.dms.plugins.datasource.enums.DbObjectType.*; 11 | 12 | public class DorisCatalogHandler extends MysqlCatalogHandler { 13 | 14 | @Override 15 | public List listSchemas(String catalog, String schemaPattern) throws SQLException { 16 | return super.listSchemas(catalog, schemaPattern).stream().filter(s -> { 17 | if ("__internal_schema".equalsIgnoreCase(s.getSchemaName())) { 18 | return false; 19 | } else { 20 | return true; 21 | } 22 | }).collect(Collectors.toList()); 23 | } 24 | 25 | @Override 26 | public List listObjectTypes() throws SQLException { 27 | List objectTypes = super.listObjectTypes(); 28 | objectTypes.add(FOREIGN_TABLE.name()); 29 | objectTypes.add(MATERIALIZED_VIEW.name()); 30 | return objectTypes.stream().filter(s -> { 31 | if (INDEX.name().equalsIgnoreCase(s)) { 32 | return false; 33 | } else { 34 | return true; 35 | } 36 | }).collect(Collectors.toList()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/impl/greenplum/GreenplumPluginImpl.java: -------------------------------------------------------------------------------- 1 | package com.basedt.dms.plugins.datasource.impl.greenplum; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import com.basedt.dms.common.constant.Constants; 5 | import com.basedt.dms.plugins.core.PluginInfo; 6 | import com.basedt.dms.plugins.core.PluginType; 7 | import com.basedt.dms.plugins.datasource.DataSourcePlugin; 8 | import com.basedt.dms.plugins.datasource.enums.DataSourceType; 9 | import com.basedt.dms.plugins.datasource.impl.postgre.PostgrePluginImpl; 10 | import com.google.auto.service.AutoService; 11 | 12 | import java.util.Map; 13 | import java.util.Properties; 14 | 15 | @AutoService(DataSourcePlugin.class) 16 | public class GreenplumPluginImpl extends PostgrePluginImpl { 17 | 18 | public GreenplumPluginImpl() { 19 | init(); 20 | } 21 | 22 | public GreenplumPluginImpl(Properties props) { 23 | super(props); 24 | init(); 25 | } 26 | 27 | public GreenplumPluginImpl(String hostName, Integer port, String databaseName, String userName, String password, Map attributes) { 28 | super(hostName, port, databaseName, userName, password, attributes); 29 | init(); 30 | } 31 | 32 | private void init() { 33 | setPluginInfo(new PluginInfo(StrUtil.concat(true, PluginType.DATASOURCE.name(), Constants.SEPARATOR_UNDERLINE, DataSourceType.GREENPLUM.getValue()).toUpperCase(), 34 | PluginType.DATASOURCE)); 35 | setDriverClassName("org.postgresql.Driver"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/impl/hive/HiveCatalogHandler.java: -------------------------------------------------------------------------------- 1 | package com.basedt.dms.plugins.datasource.impl.hive; 2 | 3 | import com.basedt.dms.plugins.datasource.impl.jdbc.JdbcCatalogHandler; 4 | 5 | import java.sql.SQLException; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | import java.util.stream.Collectors; 9 | 10 | import static com.basedt.dms.plugins.datasource.enums.DbObjectType.*; 11 | 12 | public class HiveCatalogHandler extends JdbcCatalogHandler { 13 | 14 | @Override 15 | public List listObjectTypes() throws SQLException { 16 | List list = new ArrayList() {{ 17 | add(TABLE.name()); 18 | add(VIEW.name()); 19 | add(MATERIALIZED_VIEW.name()); 20 | }}; 21 | return list.stream().map(String::toLowerCase).collect(Collectors.toList()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/main/java/com/basedt/dms/plugins/datasource/impl/mssql/MssqlCatalogHandler.java: -------------------------------------------------------------------------------- 1 | package com.basedt.dms.plugins.datasource.impl.mssql; 2 | 3 | import com.basedt.dms.plugins.datasource.dto.CatalogDTO; 4 | import com.basedt.dms.plugins.datasource.impl.jdbc.JdbcCatalogHandler; 5 | 6 | import java.sql.SQLException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import java.util.stream.Collectors; 10 | 11 | import static com.basedt.dms.plugins.datasource.enums.DbObjectType.*; 12 | 13 | public class MssqlCatalogHandler extends JdbcCatalogHandler { 14 | 15 | @Override 16 | public List listCatalogs() throws SQLException { 17 | CatalogDTO catalogDTO = new CatalogDTO(this.databaseName); 18 | return new ArrayList() {{ 19 | add(catalogDTO); 20 | }}; 21 | } 22 | 23 | @Override 24 | public List listObjectTypes() throws SQLException { 25 | List list = new ArrayList() {{ 26 | add(TABLE.name()); 27 | add(VIEW.name()); 28 | add(FUNCTION.name()); 29 | add(INDEX.name()); 30 | }}; 31 | return list.stream().map(String::toLowerCase).collect(Collectors.toList()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/test/resources/sql_init/doris.sql: -------------------------------------------------------------------------------- 1 | create database sample; 2 | 3 | CREATE TABLE table_hash 4 | ( 5 | id BIGINT, 6 | name VARCHAR(2048), 7 | age SMALLINT DEFAULT 10, 8 | created datetime default CURRENT_TIMESTAMP 9 | ) 10 | UNIQUE KEY(id) 11 | DISTRIBUTED BY HASH (id) BUCKETS 32 12 | PROPERTIES ( 13 | "replication_num" = "1" 14 | ); -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-datasource/src/test/resources/sql_init/oracle.sql: -------------------------------------------------------------------------------- 1 | create table t_test_table as 2 | select * from all_objects; 3 | -- create index 4 | alter table t_test_table add constraint T_TEST_TABLE_PK primary key (OBJECT_ID); 5 | create index idx_t_test_table_name on T_TEST_TABLE(OBJECT_NAME); 6 | 7 | create view t_test_view as 8 | select * from t_test_table; -------------------------------------------------------------------------------- /dms-plugins/dms-plugins-input/src/main/java/com/basedt/dms/plugins/input/InputPlugin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.plugins.input; 19 | 20 | import com.basedt.dms.common.enums.FileType; 21 | import com.basedt.dms.plugins.core.Plugin; 22 | 23 | import java.io.ByteArrayOutputStream; 24 | import java.io.File; 25 | import java.io.IOException; 26 | 27 | public interface InputPlugin extends Plugin { 28 | 29 | File getFile(); 30 | 31 | void setFile(File file); 32 | 33 | String getFileEncoding(); 34 | 35 | void setFileEncoding(String fileEncoding); 36 | 37 | FileType getFileType(); 38 | 39 | void setFileType(FileType fileType); 40 | 41 | ByteArrayOutputStream read() throws IOException; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /dms-plugins/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | dms 7 | com.basedt 8 | ${reversion} 9 | 10 | 4.0.0 11 | dms-plugins 12 | pom 13 | 14 | 15 | dms-plugins-core 16 | dms-plugins-datasource 17 | dms-plugins-output 18 | dms-plugins-input 19 | 20 | 21 | -------------------------------------------------------------------------------- /dms-scheduler/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.basedt 8 | dms 9 | ${reversion} 10 | 11 | 12 | dms-scheduler 13 | 14 | 15 | 16 | org.springframework.boot 17 | spring-boot-starter-quartz 18 | 19 | 20 | 21 | com.basedt 22 | dms-dao 23 | ${reversion} 24 | 25 | 26 | -------------------------------------------------------------------------------- /dms-scheduler/src/main/java/com/basedt/dms/scheduler/job/MySampleJob.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.scheduler.job; 19 | 20 | //public class MySampleJob extends QuartzJobBean { 21 | // 22 | // @Override 23 | // protected void executeInternal(JobExecutionContext context) throws JobExecutionException { 24 | // System.out.println("定时任务运行了:" + DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(LocalDateTime.now())); 25 | // } 26 | //} 27 | -------------------------------------------------------------------------------- /dms-service/dms-service-base/src/main/java/com/basedt/dms/service/base/convert/BaseConvert.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.base.convert; 19 | 20 | import java.util.List; 21 | 22 | public interface BaseConvert { 23 | 24 | E toDo(D dto); 25 | 26 | D toDto(E entity); 27 | 28 | List toDo(List dtoList); 29 | 30 | List toDto(List entityList); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dms-service/dms-service-base/src/main/java/com/basedt/dms/service/base/datasource/DS.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.base.datasource; 19 | 20 | import java.lang.annotation.ElementType; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.RetentionPolicy; 23 | import java.lang.annotation.Target; 24 | 25 | @Target({ElementType.METHOD, ElementType.TYPE}) 26 | @Retention(RetentionPolicy.RUNTIME) 27 | public @interface DS { 28 | 29 | String value(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /dms-service/dms-service-base/src/main/java/com/basedt/dms/service/base/datasource/RoutingDataSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.base.datasource; 19 | 20 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 21 | 22 | public class RoutingDataSource extends AbstractRoutingDataSource { 23 | 24 | @Override 25 | protected Object determineCurrentLookupKey() { 26 | return RoutingDataSourceContext.getDataSourceRoutingKey(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /dms-service/dms-service-llm/src/main/java/com/basedt/dms/service/llm/LLMService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.service.llm; 20 | 21 | import reactor.core.publisher.Flux; 22 | 23 | import java.util.List; 24 | 25 | public interface LLMService { 26 | 27 | String simpleChat(List message, String cid); 28 | 29 | Flux streamChat(List message, String cid); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /dms-service/dms-service-llm/src/main/java/com/basedt/dms/service/llm/dto/ChatMsgDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.service.llm.dto; 20 | 21 | import lombok.Data; 22 | 23 | @Data 24 | public class ChatMsgDTO { 25 | 26 | private String content; 27 | 28 | public ChatMsgDTO() { 29 | } 30 | 31 | public ChatMsgDTO(String content) { 32 | this.content = content; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.basedt 8 | dms-service 9 | ${reversion} 10 | 11 | 12 | dms-service-log 13 | 14 | 15 | 16 | com.basedt 17 | dms-service-sys 18 | ${reversion} 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/src/main/java/com/basedt/dms/service/log/LogActionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.log; 19 | 20 | import com.basedt.dms.service.base.dto.PageDTO; 21 | import com.basedt.dms.service.log.dto.LogActionDTO; 22 | import com.basedt.dms.service.log.param.LogActionParam; 23 | 24 | public interface LogActionService { 25 | 26 | int insert(LogActionDTO logLoginDTO); 27 | 28 | PageDTO listByPage(LogActionParam param); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/src/main/java/com/basedt/dms/service/log/LogDataTaskService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.log; 19 | 20 | import com.basedt.dms.service.log.dto.LogDataTaskDTO; 21 | 22 | import java.util.List; 23 | 24 | public interface LogDataTaskService { 25 | 26 | int insert(LogDataTaskDTO logDataTaskDTO); 27 | 28 | List listByTask(Long taskId); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/src/main/java/com/basedt/dms/service/log/LogLoginService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.log; 19 | 20 | import com.basedt.dms.service.base.dto.PageDTO; 21 | import com.basedt.dms.service.log.dto.LogLoginDTO; 22 | import com.basedt.dms.service.log.param.LogLoginParam; 23 | 24 | public interface LogLoginService { 25 | 26 | int insert(LogLoginDTO logLoginDTO); 27 | 28 | PageDTO listByPage(LogLoginParam param); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/src/main/java/com/basedt/dms/service/log/LogSqlHistoryService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.log; 19 | 20 | import com.basedt.dms.service.base.dto.PageDTO; 21 | import com.basedt.dms.service.log.dto.LogSqlHistoryDTO; 22 | import com.basedt.dms.service.log.param.LogSqlHistoryParam; 23 | 24 | public interface LogSqlHistoryService { 25 | 26 | int insert(LogSqlHistoryDTO logSqlHistoryDTO); 27 | 28 | PageDTO listByPage(LogSqlHistoryParam param); 29 | } 30 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/src/main/java/com/basedt/dms/service/log/convert/LogActionConvert.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.log.convert; 19 | 20 | import com.basedt.dms.dao.entity.log.LogAction; 21 | import com.basedt.dms.service.base.convert.BaseConvert; 22 | import com.basedt.dms.service.log.dto.LogActionDTO; 23 | import org.mapstruct.Mapper; 24 | import org.mapstruct.ReportingPolicy; 25 | import org.mapstruct.factory.Mappers; 26 | 27 | @Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE) 28 | public interface LogActionConvert extends BaseConvert { 29 | 30 | LogActionConvert INSTANCE = Mappers.getMapper(LogActionConvert.class); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/src/main/java/com/basedt/dms/service/log/convert/LogDataTaskConvert.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.log.convert; 19 | 20 | import com.basedt.dms.dao.entity.log.LogDataTask; 21 | import com.basedt.dms.service.base.convert.BaseConvert; 22 | import com.basedt.dms.service.log.dto.LogDataTaskDTO; 23 | import org.mapstruct.Mapper; 24 | import org.mapstruct.ReportingPolicy; 25 | import org.mapstruct.factory.Mappers; 26 | 27 | @Mapper(uses = {}, unmappedTargetPolicy = ReportingPolicy.IGNORE) 28 | public interface LogDataTaskConvert extends BaseConvert { 29 | 30 | LogDataTaskConvert INSTANCE = Mappers.getMapper(LogDataTaskConvert.class); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dms-service/dms-service-log/src/main/java/com/basedt/dms/service/log/param/LogActionParam.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.log.param; 19 | 20 | import com.basedt.dms.service.base.param.PaginationParam; 21 | import lombok.Data; 22 | import lombok.EqualsAndHashCode; 23 | 24 | import java.time.LocalDateTime; 25 | 26 | @Data 27 | @EqualsAndHashCode(callSuper = true) 28 | public class LogActionParam extends PaginationParam { 29 | 30 | private String userName; 31 | 32 | private LocalDateTime actionTime; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /dms-service/dms-service-security/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | dms-service 7 | com.basedt 8 | ${reversion} 9 | 10 | 4.0.0 11 | 12 | dms-service-security 13 | 14 | 15 | 16 | 17 | com.basedt 18 | dms-service-sys 19 | ${reversion} 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-security 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-web 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-webflux 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /dms-service/dms-service-security/src/main/java/com/basedt/dms/service/security/annotation/AnonymousAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.security.annotation; 19 | 20 | import java.lang.annotation.ElementType; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.RetentionPolicy; 23 | import java.lang.annotation.Target; 24 | 25 | 26 | @Target(ElementType.METHOD) 27 | @Retention(RetentionPolicy.RUNTIME) 28 | public @interface AnonymousAccess { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /dms-service/dms-service-security/src/main/java/com/basedt/dms/service/security/annotation/PrivilegeDesc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.security.annotation; 19 | 20 | import com.basedt.dms.service.security.enums.*; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | @Target(ElementType.FIELD) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | public @interface PrivilegeDesc { 30 | 31 | ModuleCode module(); 32 | 33 | PageCode page(); 34 | 35 | BlockCode block(); 36 | 37 | ActionCode action(); 38 | 39 | DmsPrivileges parent(); 40 | } 41 | -------------------------------------------------------------------------------- /dms-service/dms-service-security/src/main/java/com/basedt/dms/service/security/enums/ModuleCode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.security.enums; 19 | 20 | import lombok.Getter; 21 | 22 | @Getter 23 | public enum ModuleCode { 24 | 25 | SYS("sys", "dms.p.sys.dft.dft.show"), 26 | WORKSPACE("ws", "dms.p.ws.dft.dft.show"); 27 | 28 | private final String value; 29 | private final String label; 30 | 31 | ModuleCode(String value, String label) { 32 | this.value = value; 33 | this.label = label; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | dms-service 7 | com.basedt 8 | ${reversion} 9 | 10 | 4.0.0 11 | 12 | dms-service-sys 13 | 14 | 15 | 16 | 17 | com.basedt 18 | dms-service-base 19 | ${reversion} 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/SysConfigService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys; 19 | 20 | import com.basedt.dms.service.sys.dto.LLMConfigDTO; 21 | import com.basedt.dms.service.sys.dto.SysConfigDTO; 22 | 23 | public interface SysConfigService { 24 | 25 | void insert(SysConfigDTO config); 26 | 27 | void update(SysConfigDTO config); 28 | 29 | void update(String key, String value); 30 | 31 | void deleteByKey(String key); 32 | 33 | String selectValueByKey(String key); 34 | 35 | LLMConfigDTO getLLMConfig(); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/SysDictService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys; 19 | 20 | import com.basedt.dms.service.base.dto.PageDTO; 21 | import com.basedt.dms.service.sys.dto.SysDictDTO; 22 | import com.basedt.dms.service.sys.param.SysDictParam; 23 | 24 | import java.util.List; 25 | 26 | public interface SysDictService { 27 | 28 | void insert(SysDictDTO sysDictDTO); 29 | 30 | void update(SysDictDTO sysDictDTO); 31 | 32 | void deleteById(Long id); 33 | 34 | void deleteBatch(List idList); 35 | 36 | SysDictDTO selectOne(Long id); 37 | 38 | PageDTO listByPage(SysDictParam param); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/SysPrivilegeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys; 19 | 20 | import cn.hutool.core.lang.tree.Tree; 21 | import com.basedt.dms.service.sys.dto.SysPrivilegeDTO; 22 | 23 | import java.util.List; 24 | 25 | public interface SysPrivilegeService { 26 | 27 | List> listPrivilegeTree(); 28 | 29 | void insert(SysPrivilegeDTO privilege); 30 | 31 | void truncate(); 32 | 33 | List listPrivilegeByRole(Long roleId); 34 | 35 | void grantPrivilegeToRole(Long roleId, List privilegeCode); 36 | } 37 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/SysRolePrivilegeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys; 19 | 20 | import com.basedt.dms.service.sys.dto.SysRolePrivilegeDTO; 21 | 22 | public interface SysRolePrivilegeService { 23 | 24 | void insert(SysRolePrivilegeDTO rolePrivilegeDTO); 25 | 26 | void deleteByRoleId(Long... roleId); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/SysUserRoleService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys; 19 | 20 | import com.basedt.dms.service.sys.dto.SysUserRoleDTO; 21 | 22 | import java.util.List; 23 | 24 | public interface SysUserRoleService { 25 | 26 | void insert(SysUserRoleDTO userRoleDTO); 27 | 28 | void deleteByRoleId(Long... roleId); 29 | 30 | void deleteByUserId(Long... userId); 31 | 32 | List selectByUserId(Long userId); 33 | 34 | List selectByRoleId(Long... roleId); 35 | } 36 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/convert/SysConfigConvert.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys.convert; 19 | 20 | import com.basedt.dms.dao.entity.master.sys.SysConfig; 21 | import com.basedt.dms.service.base.convert.BaseConvert; 22 | import com.basedt.dms.service.sys.dto.SysConfigDTO; 23 | import org.mapstruct.Mapper; 24 | import org.mapstruct.ReportingPolicy; 25 | import org.mapstruct.factory.Mappers; 26 | 27 | @Mapper(uses = {}, unmappedTargetPolicy = ReportingPolicy.IGNORE) 28 | public interface SysConfigConvert extends BaseConvert { 29 | 30 | SysConfigConvert INSTANCE = Mappers.getMapper(SysConfigConvert.class); 31 | } 32 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/convert/SysUserRoleConvert.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys.convert; 19 | 20 | import com.basedt.dms.dao.entity.master.sys.SysUserRole; 21 | import com.basedt.dms.service.base.convert.BaseConvert; 22 | import com.basedt.dms.service.sys.dto.SysUserRoleDTO; 23 | import org.mapstruct.Mapper; 24 | import org.mapstruct.ReportingPolicy; 25 | import org.mapstruct.factory.Mappers; 26 | 27 | @Mapper(uses = {}, unmappedTargetPolicy = ReportingPolicy.IGNORE) 28 | public interface SysUserRoleConvert extends BaseConvert { 29 | 30 | SysUserRoleConvert INSTANCE = Mappers.getMapper(SysUserRoleConvert.class); 31 | } 32 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/dto/EmailConfigDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.sys.dto; 19 | 20 | import io.swagger.v3.oas.annotations.media.Schema; 21 | import jakarta.validation.constraints.Email; 22 | import lombok.Data; 23 | 24 | import jakarta.validation.constraints.NotBlank; 25 | import jakarta.validation.constraints.NotNull; 26 | 27 | @Data 28 | @Schema(name = "EmailConfigDTO", title = "email config dto") 29 | public class EmailConfigDTO { 30 | @Email 31 | private String email; 32 | 33 | @NotBlank 34 | private String password; 35 | 36 | @NotBlank 37 | private String host; 38 | 39 | @NotNull 40 | private Integer port; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /dms-service/dms-service-sys/src/main/java/com/basedt/dms/service/sys/dto/LLMConfigDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.basedt.dms.service.sys.dto; 20 | 21 | import io.swagger.v3.oas.annotations.media.Schema; 22 | import jakarta.validation.constraints.NotBlank; 23 | import lombok.Data; 24 | 25 | 26 | @Data 27 | @Schema(name = "LLMConfigDTO", title = "llm config dto") 28 | public class LLMConfigDTO { 29 | 30 | @NotBlank 31 | private String type; 32 | 33 | @NotBlank 34 | private String model; 35 | 36 | @NotBlank 37 | private String baseUrl; 38 | 39 | @NotBlank 40 | private String apiKey; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /dms-service/dms-service-workspace/src/main/java/com/basedt/dms/service/workspace/DmsFileCatalogService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.workspace; 19 | 20 | import cn.hutool.core.lang.tree.Tree; 21 | import com.basedt.dms.common.exception.DmsException; 22 | import com.basedt.dms.service.workspace.dto.DmsFileCatalogDTO; 23 | 24 | import java.util.List; 25 | 26 | public interface DmsFileCatalogService { 27 | 28 | void insert(DmsFileCatalogDTO fileCatalogDTO); 29 | 30 | void update(DmsFileCatalogDTO fileCatalogDTO); 31 | 32 | void deleteById(Long id) throws DmsException; 33 | 34 | List> listCatalogTree(Long workspaceId, Long id); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dms-service/dms-service-workspace/src/main/java/com/basedt/dms/service/workspace/param/DmsDataSourceParam.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.workspace.param; 19 | 20 | import com.basedt.dms.service.base.param.PaginationParam; 21 | import lombok.Data; 22 | import lombok.EqualsAndHashCode; 23 | 24 | @Data 25 | @EqualsAndHashCode(callSuper = true) 26 | public class DmsDataSourceParam extends PaginationParam { 27 | 28 | private Long workspaceId; 29 | 30 | private String datasourceName; 31 | 32 | private String datasourceType; 33 | 34 | private String hostName; 35 | 36 | private String databaseName; 37 | } 38 | -------------------------------------------------------------------------------- /dms-service/dms-service-workspace/src/main/java/com/basedt/dms/service/workspace/param/DmsFileParam.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.workspace.param; 19 | 20 | import com.basedt.dms.service.base.param.PaginationParam; 21 | import lombok.Data; 22 | import lombok.EqualsAndHashCode; 23 | 24 | @Data 25 | @EqualsAndHashCode(callSuper = true) 26 | public class DmsFileParam extends PaginationParam { 27 | 28 | private Long workspaceId; 29 | 30 | private String fileName; 31 | 32 | private Long fileCatalog; 33 | 34 | private String fileType; 35 | 36 | private String owner; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /dms-service/dms-service-workspace/src/main/java/com/basedt/dms/service/workspace/param/DmsSqlExecParam.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.workspace.param; 19 | 20 | import lombok.Data; 21 | 22 | import jakarta.validation.constraints.NotNull; 23 | 24 | @Data 25 | public class DmsSqlExecParam { 26 | 27 | @NotNull 28 | private Long workspaceId; 29 | 30 | @NotNull 31 | private Long dataSourceId; 32 | 33 | @NotNull 34 | private String script; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dms-service/dms-service-workspace/src/main/java/com/basedt/dms/service/workspace/param/DmsWorkspaceParam.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.workspace.param; 19 | 20 | import com.basedt.dms.service.base.param.PaginationParam; 21 | import lombok.Data; 22 | import lombok.EqualsAndHashCode; 23 | 24 | @Data 25 | @EqualsAndHashCode(callSuper = true) 26 | public class DmsWorkspaceParam extends PaginationParam { 27 | 28 | private String workspaceCode; 29 | 30 | private String workspaceName; 31 | 32 | private String owner; 33 | } 34 | -------------------------------------------------------------------------------- /dms-service/dms-service-workspace/src/main/java/com/basedt/dms/service/workspace/vo/DmsFileVO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.basedt.dms.service.workspace.vo; 19 | 20 | import io.swagger.v3.oas.annotations.media.Schema; 21 | import lombok.Data; 22 | 23 | import jakarta.validation.constraints.NotNull; 24 | 25 | @Data 26 | public class DmsFileVO { 27 | 28 | private static final long serialVersionUID = 1L; 29 | 30 | @NotNull 31 | @Schema(name = "id", title = "file id") 32 | private Long id; 33 | 34 | @Schema(name = "newFileName", title = "new file name") 35 | private String newFileName; 36 | 37 | @Schema(name = "newFileCatalog", title = "new file catalog") 38 | private Long newFileCatalog; 39 | } 40 | -------------------------------------------------------------------------------- /dms-service/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | dms 7 | com.basedt 8 | ${reversion} 9 | 10 | 4.0.0 11 | dms-service 12 | pom 13 | 14 | 15 | dms-service-sys 16 | dms-service-base 17 | dms-service-security 18 | dms-service-log 19 | dms-service-workspace 20 | dms-service-llm 21 | 22 | 23 | -------------------------------------------------------------------------------- /dms-ui/.env: -------------------------------------------------------------------------------- 1 | PORT=8000 2 | UMI_DEV_SERVER_COMPRESS=none -------------------------------------------------------------------------------- /dms-ui/.eslintignore: -------------------------------------------------------------------------------- 1 | /scripts 2 | /config 3 | .history 4 | public 5 | dist 6 | .umi 7 | mock -------------------------------------------------------------------------------- /dms-ui/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [require.resolve('@umijs/lint/dist/config/eslint')], 3 | globals: { 4 | page: true, 5 | REACT_APP_ENV: true, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /dms-ui/.gitignore: -------------------------------------------------------------------------------- 1 | # umi 2 | .umi 3 | .umi-production 4 | 5 | 6 | yarn.lock 7 | package-lock.json 8 | pnpm-lock.yaml 9 | *bak 10 | 11 | # dependencies 12 | **/node_modules 13 | dist 14 | 15 | .vscode 16 | node -------------------------------------------------------------------------------- /dms-ui/.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "development" 4 | ], 5 | "hints": { 6 | "no-inline-styles": "off", 7 | "typescript-config/consistent-casing": "off", 8 | "axe/forms": [ 9 | "default", 10 | { 11 | "label": "off" 12 | } 13 | ] 14 | } 15 | } -------------------------------------------------------------------------------- /dms-ui/.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmmirror.com/ 2 | -------------------------------------------------------------------------------- /dms-ui/.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .umi 3 | .umi-production 4 | **/*.svg 5 | .eslintignore 6 | .gitignore 7 | .prettierignore 8 | LICENSE 9 | CNAME 10 | /build 11 | /public -------------------------------------------------------------------------------- /dms-ui/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "proseWrap": "never", 6 | "overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }], 7 | "plugins": [ 8 | "prettier-plugin-organize-imports", 9 | "prettier-plugin-packagejson", 10 | "prettier-plugin-two-style-order" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /dms-ui/config/defaultSettings.ts: -------------------------------------------------------------------------------- 1 | import { Settings as LayoutSettings } from '@ant-design/pro-components'; 2 | 3 | /** 4 | * @name 5 | */ 6 | const Settings: LayoutSettings & { 7 | pwa?: boolean; 8 | logo?: string; 9 | } = { 10 | navTheme: 'light', 11 | // 拂晓蓝 12 | colorPrimary: '#2F54EB', 13 | layout: 'mix', 14 | contentWidth: 'Fluid', 15 | fixedHeader: false, 16 | fixSiderbar: true, 17 | colorWeak: false, 18 | title: 'BaseDMS', 19 | pwa: false, 20 | iconfontUrl: '', 21 | splitMenus: true, 22 | siderMenuType: 'sub', 23 | }; 24 | 25 | export default Settings; 26 | -------------------------------------------------------------------------------- /dms-ui/config/proxy.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @name 代理的配置 3 | * @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置 4 | * ------------------------------- 5 | * The agent cannot take effect in the production environment 6 | * so there is no configuration of the production environment 7 | * For details, please see 8 | * https://pro.ant.design/docs/deploy 9 | * 10 | * @doc https://umijs.org/docs/guides/proxy 11 | */ 12 | export default { 13 | dev: { 14 | '/api/': { 15 | target: 'http://localhost:8080/dms', 16 | changeOrigin: true, 17 | }, 18 | }, 19 | pre: { 20 | '/api/': { 21 | target: 'http://localhost:8080/dms', 22 | changeOrigin: true, 23 | }, 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /dms-ui/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react-jsx", 4 | "emitDecoratorMetadata": true, 5 | "experimentalDecorators": true, 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/*": ["./src/*"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /dms-ui/public/CNAME: -------------------------------------------------------------------------------- 1 | basedt.dms -------------------------------------------------------------------------------- /dms-ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basedt/dms/afcef9229fd77d4d81a45cdd2789c5c1fa770052/dms-ui/public/favicon.ico -------------------------------------------------------------------------------- /dms-ui/public/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basedt/dms/afcef9229fd77d4d81a45cdd2789c5c1fa770052/dms-ui/public/images/bg.png -------------------------------------------------------------------------------- /dms-ui/public/images/databases/clickhouse.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/public/images/databases/doris.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/public/images/databases/gaussdb.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/public/images/databases/oracle.svg: -------------------------------------------------------------------------------- 1 | Oracle -------------------------------------------------------------------------------- /dms-ui/public/images/databases/redis.svg: -------------------------------------------------------------------------------- 1 | Redis -------------------------------------------------------------------------------- /dms-ui/src/access.ts: -------------------------------------------------------------------------------- 1 | import { AuthService } from "./services/admin/auth.service"; 2 | 3 | /** 4 | * @see https://umijs.org/zh-CN/plugins/plugin-access 5 | * */ 6 | export default function access( 7 | initialState: { currentUser?: DMS.SysUser } | undefined 8 | ) { 9 | const { currentUser } = initialState ?? {}; 10 | 11 | return { 12 | canAccess: (code: string) => { 13 | return AuthService.hasPrivilege(code, currentUser as DMS.SysUser); 14 | }, 15 | normalRouteFilter: (route: any) => { 16 | return AuthService.hasPrivilege(route?.pCode, currentUser as DMS.SysUser); 17 | }, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /dms-ui/src/components/CloseableTab/index.less: -------------------------------------------------------------------------------- 1 | @tab-max-width: 180px; 2 | @tab-title-min-width: 56px; 3 | @tab-title-max-width: 160px; 4 | @tab-icon-size: 10px; 5 | @tab-icon-margin: 5px; 6 | @not-cave-bg: #adc6ff; 7 | @active-tab-bg: #f6f6f6; 8 | 9 | .closeable-tabs { 10 | height: 100%; 11 | overflow-y: auto; 12 | 13 | .tab-card { 14 | display: flex; 15 | align-items: center; 16 | max-width: @tab-max-width; 17 | 18 | .tab-card-title { 19 | display: flex; 20 | align-items: center; 21 | min-width: @tab-title-min-width; 22 | max-width: @tab-title-max-width; 23 | padding: 0 6px; 24 | } 25 | 26 | .tab-card-icon { 27 | width: @tab-icon-size; 28 | height: @tab-icon-size; 29 | margin: 0 @tab-icon-margin; 30 | } 31 | } 32 | 33 | .tab-notCave { 34 | display: flex; 35 | align-items: center; 36 | height: 100%; 37 | background: @not-cave-bg; 38 | } 39 | 40 | .ant-tabs-nav { 41 | margin: 0 0 6px 0; 42 | 43 | .ant-tabs-tab { 44 | height: 100%; 45 | padding: 0; 46 | font-size: 14px; 47 | 48 | > div { 49 | display: flex; 50 | align-items: center; 51 | height: 100%; 52 | } 53 | } 54 | 55 | .ant-tabs-tab-active { 56 | background-color: @active-tab-bg; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /dms-ui/src/components/CodeEditor/index.less: -------------------------------------------------------------------------------- 1 | .panel_handle_hover { 2 | border: 1px solid #f3f3f3 !important; 3 | 4 | &:hover { 5 | border: 3px solid #e6f4ff !important; 6 | } 7 | } 8 | 9 | .codeEditor { 10 | &_rightContent { 11 | display: flex; 12 | flex-direction: column; 13 | border: 1px solid #f1f1f1; 14 | border-top-color: transparent; 15 | 16 | >span { 17 | display: flex; 18 | align-items: center; 19 | cursor: pointer; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /dms-ui/src/components/DmsAgent/index.less: -------------------------------------------------------------------------------- 1 | .codeAi { 2 | height: 100%; 3 | padding: 0 4px; 4 | 5 | .ant-sender .ant-sender-content { 6 | flex-direction: column; 7 | } 8 | 9 | .codeAiTop { 10 | display: flex; 11 | height: 36px; 12 | padding: 2px 0; 13 | border-bottom: 1px solid #f0f0f0; 14 | } 15 | 16 | .ant-sender { 17 | textarea { 18 | height: 100% !important; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /dms-ui/src/components/Footer/index.tsx: -------------------------------------------------------------------------------- 1 | import { GithubOutlined } from "@ant-design/icons"; 2 | import { Button, Divider, Space } from "antd"; 3 | import React from "react"; 4 | 5 | const Footer: React.FC<{ collapsed: boolean | undefined }> = (props) => { 6 | const { collapsed } = props; 7 | const currentYear = new Date().getFullYear(); 8 | 9 | return ( 10 | <> 11 | 12 | {collapsed ? ( 13 |
20 | 21 | 22 | 23 |
24 | ) : ( 25 |
26 | 27 | ©{currentYear} 28 | BASEDT.COM 29 | 30 |
31 | )} 32 | 33 | ); 34 | }; 35 | 36 | export default Footer; 37 | -------------------------------------------------------------------------------- /dms-ui/src/components/Header/HeaderDropdown/index.tsx: -------------------------------------------------------------------------------- 1 | import { Dropdown } from 'antd'; 2 | import { createStyles } from 'antd-style'; 3 | import type { DropDownProps } from 'antd/es/dropdown'; 4 | import React from 'react'; 5 | 6 | export type HeaderDropdownProps = { 7 | overlayClassName?: string; 8 | placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomCenter'; 9 | } & Omit; 10 | 11 | const useStyles = createStyles(({ token, css }) => ({ 12 | headerDropdown: { 13 | [`@media screen and (max-width: ${token.screenXS})`]: { 14 | width: '100%', 15 | }, 16 | }, 17 | })); 18 | 19 | const HeaderDropdown: React.FC = ({ overlayClassName: cls, ...restProps }) => { 20 | const { styles, cx, theme } = useStyles(); 21 | 22 | return ( 23 | 24 | ); 25 | }; 26 | 27 | export default HeaderDropdown; 28 | -------------------------------------------------------------------------------- /dms-ui/src/components/Header/index.tsx: -------------------------------------------------------------------------------- 1 | import { HeaderViewProps } from '@ant-design/pro-layout/es/components/Header'; 2 | import { Divider } from 'antd'; 3 | import React from 'react'; 4 | import AppsLogo from '../AppLogoComponent'; 5 | import HeaderMegaMenu from './HeaderMegaMenu'; 6 | import GlobalHeaderRight from './RightContent'; 7 | import './index.less'; 8 | 9 | const Header: React.FC<{ 10 | headerProps: HeaderViewProps; 11 | }> = (props) => { 12 | const { headerProps } = props; 13 | 14 | return ( 15 | <> 16 |
17 |
18 |
22 | 23 | 24 | 30 |
31 |
32 |
33 | 34 |
35 |
36 |
37 | 38 | ); 39 | }; 40 | export default Header; 41 | -------------------------------------------------------------------------------- /dms-ui/src/components/MarkDown/DmsMarkdown.tsx: -------------------------------------------------------------------------------- 1 | // import React from 'react'; 2 | // import Markdown from 'react-markdown'; 3 | // import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; 4 | // import { dracula } from 'react-syntax-highlighter/dist/esm/styles/prism'; 5 | // import remarkGfm from 'remark-gfm'; 6 | 7 | // // 自定义代码块组件 8 | // // const CodeBlock = ({ children, className, ...props }) => { 9 | // // const language = className?.replace('language-', '') || 'text'; 10 | // // return ( 11 | // // 16 | // // {children} 17 | // // 18 | // // ); 19 | // // }; 20 | 21 | // // const DmsMarkdown = ({ content }) => { 22 | // // return ( 23 | // // 26 | // // {content} 27 | // // 28 | // // ); 29 | // // }; 30 | 31 | // const DmsMarkdown: React.FC<{ content: string }> = (props) => { 32 | // const codeBlock = (children: string, className: string) => { 33 | // const language = className?.replace('language-', '') || 'text'; 34 | // return {children}; 35 | // }; 36 | 37 | // return ( 38 | // <> 39 | // 40 | // {props.content} 41 | // 42 | // 43 | // ); 44 | // }; 45 | 46 | // export default DmsMarkdown; 47 | -------------------------------------------------------------------------------- /dms-ui/src/components/SelectLang/index.tsx: -------------------------------------------------------------------------------- 1 | import { TranslationOutlined } from "@ant-design/icons"; 2 | import { setLocale } from "@umijs/max"; 3 | import { Dropdown, MenuProps, Space } from "antd"; 4 | 5 | const SelectLang: React.FC<{ className?: string }> = (props) => { 6 | const { className } = props; 7 | 8 | const items: MenuProps["items"] = [ 9 | { 10 | key: "zh-CN", 11 | label: ( 12 | { 14 | changeLang("zh-CN"); 15 | }} 16 | > 17 | 🇨🇳 18 | 简体中文 19 | 20 | ), 21 | }, 22 | { 23 | key: "en-US", 24 | label: ( 25 | { 27 | changeLang("en-US"); 28 | }} 29 | > 30 | 🇺🇸 31 | English 32 | 33 | ), 34 | }, 35 | ]; 36 | 37 | const changeLang = (lang: string): void => { 38 | setLocale(lang, true); 39 | }; 40 | 41 | return ( 42 | 43 | 48 | 49 | 50 | 51 | ); 52 | }; 53 | 54 | export default SelectLang; 55 | -------------------------------------------------------------------------------- /dms-ui/src/global.less: -------------------------------------------------------------------------------- 1 | html, 2 | body, 3 | #root { 4 | height: 100%; 5 | margin: 0; 6 | padding: 0; 7 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 8 | "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", 9 | "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 10 | } 11 | 12 | .colorWeak { 13 | filter: invert(80%); 14 | } 15 | 16 | .ant-layout { 17 | min-height: 100vh; 18 | } 19 | .ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed { 20 | left: unset; 21 | } 22 | 23 | canvas { 24 | display: block; 25 | } 26 | 27 | body { 28 | text-rendering: optimizeLegibility; 29 | -webkit-font-smoothing: antialiased; 30 | -moz-osx-font-smoothing: grayscale; 31 | } 32 | 33 | ul, 34 | ol { 35 | list-style: none; 36 | } 37 | 38 | @media (max-width: 768px) { 39 | .ant-table { 40 | width: 100%; 41 | overflow-x: auto; 42 | &-thead > tr, 43 | &-tbody > tr { 44 | > th, 45 | > td { 46 | white-space: pre; 47 | > span { 48 | display: block; 49 | } 50 | } 51 | } 52 | } 53 | } 54 | 55 | .ant-pro-card .ant-pro-card-body { 56 | display: block; 57 | box-sizing: border-box; 58 | height: 100%; 59 | padding-inline: 0px; 60 | padding-block: 16px; 61 | .ant-table-thead .ant-table-cell { 62 | background-color: white; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /dms-ui/src/icons/ai-primary.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/ai-white.svg: -------------------------------------------------------------------------------- 1 | 3 | 6 | -------------------------------------------------------------------------------- /dms-ui/src/icons/collect.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/collects.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/column.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/database.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/folder.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/function.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/index.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/schema.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/sequence.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/unfold.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/unfoldBolb.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/icons/view.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dms-ui/src/locales/en-US/menu.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | "menu.login": "Login", 3 | "menu.register": "Register", 4 | "menu.console": "Console", 5 | "menu.admin": "System", 6 | "menu.admin.user": "User", 7 | "menu.admin.role": "Role", 8 | "menu.admin.dict": "Dictionary", 9 | "menu.admin.setting": "Settings", 10 | "menu.console.dashboard": "Dashboard", 11 | "menu.console.workspace": "Workspace", 12 | "menu.datasource": "DataSource", 13 | "menu.query": "Query", 14 | "menu.di": "Data Integration", 15 | "menu.develop": "Data Development", 16 | "menu.log": "Run History", 17 | "menu.export": "Data Export", 18 | "menu.import": "Data Import", 19 | }; 20 | -------------------------------------------------------------------------------- /dms-ui/src/locales/en-US/pages.ts: -------------------------------------------------------------------------------- 1 | import admin from "./pages/admin"; 2 | import user from "./pages/user"; 3 | import userCenter from "./pages/user.center"; 4 | import workspace from "./pages/workspace"; 5 | export default { 6 | ...workspace, 7 | ...admin, 8 | ...user, 9 | ...userCenter, 10 | }; 11 | -------------------------------------------------------------------------------- /dms-ui/src/locales/en-US/pages/user.center.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | "dms.user.center.profile": "Profile", 3 | "dms.user.center.security": "Security Settings", 4 | "dms.user.center.security.password": "Password", 5 | "dms.user.center.security.password.desc": 6 | "Current account password strength: Strong", 7 | "dms.user.center.security.password.edit": "Change Password", 8 | "dms.user.center.security.password.old": "Old Password", 9 | "dms.user.center.security.password.new": "New Password", 10 | "dms.user.center.security.password.confirm": "Confirm Password", 11 | "dms.user.center.security.email": "Bind Email", 12 | "dms.user.center.security.email.desc": "Email: ", 13 | "dms.user.center.security.email.edit": "Change Email", 14 | "dms.user.center.security.email.mail": "Email", 15 | "dms.user.center.security.email.authCode": "Verification Code", 16 | "dms.user.center.security.email.authCode.get": "Get Verification Code", 17 | "dms.user.center.security.email.authCode.info": 18 | "Verification code has been sent to your email, please check your inbox!", 19 | "dms.user.center.message": "Notifications", 20 | "dms.user.center.log": "Login Log", 21 | "dms.user.center.log.ipAddress": "IP Address: ", 22 | "dms.user.center.log.clientInfo": "Client: ", 23 | "dms.user.center.log.os": "Operating System: ", 24 | "dms.user.center.log.browser": "Browser: ", 25 | }; 26 | -------------------------------------------------------------------------------- /dms-ui/src/locales/zh-CN/menu.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | "menu.login": "登录", 3 | "menu.register": "注册", 4 | "menu.console": "控制台", 5 | "menu.admin": "系统管理", 6 | "menu.admin.user": "用户管理", 7 | "menu.admin.role": "角色管理", 8 | "menu.admin.dict": "数据字典", 9 | "menu.admin.setting": "系统设置", 10 | "menu.console.dashboard": "概览", 11 | "menu.console.workspace": "工作空间", 12 | "menu.datasource": "数据源", 13 | "menu.query": "SQL查询", 14 | "menu.di": "数据集成", 15 | "menu.develop": "数据开发", 16 | "menu.log": "运行历史", 17 | "menu.export": "数据导出", 18 | "menu.import": "数据导入", 19 | }; 20 | -------------------------------------------------------------------------------- /dms-ui/src/locales/zh-CN/pages.ts: -------------------------------------------------------------------------------- 1 | import admin from "./pages/admin"; 2 | import user from "./pages/user"; 3 | import userCenter from "./pages/user.center"; 4 | import workspace from "./pages/workspace"; 5 | export default { 6 | ...workspace, 7 | ...admin, 8 | ...user, 9 | ...userCenter, 10 | }; 11 | -------------------------------------------------------------------------------- /dms-ui/src/locales/zh-CN/pages/user.center.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | "dms.user.center.profile": "个人资料", 3 | "dms.user.center.security": "安全设置", 4 | "dms.user.center.security.password": "账户密码", 5 | "dms.user.center.security.password.desc": "当前账户密码强度为 : 强", 6 | "dms.user.center.security.password.edit": "修改密码", 7 | "dms.user.center.security.password.old": "原始密码", 8 | "dms.user.center.security.password.new": "新密码", 9 | "dms.user.center.security.password.confirm": "确认密码", 10 | "dms.user.center.security.email": "绑定邮箱", 11 | "dms.user.center.security.email.desc": "邮箱 : ", 12 | "dms.user.center.security.email.edit": "修改邮箱", 13 | "dms.user.center.security.email.mail": "邮箱", 14 | "dms.user.center.security.email.authCode": "验证码", 15 | "dms.user.center.security.email.authCode.get": "获取验证码", 16 | "dms.user.center.security.email.authCode.info": 17 | "验证码已发送到邮箱,请打开邮箱查看!", 18 | "dms.user.center.message": "消息通知", 19 | "dms.user.center.log": "登录日志", 20 | "dms.user.center.log.ipAddress": "IP地址 : ", 21 | "dms.user.center.log.clientInfo": "客户端 : ", 22 | "dms.user.center.log.os": "操作系统 : ", 23 | "dms.user.center.log.browser": "浏览器 : ", 24 | }; 25 | -------------------------------------------------------------------------------- /dms-ui/src/locales/zh-CN/pages/user.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | "dms.user.login.userName": "用户名", 3 | "dms.user.login.userName.placeholder": "请输入用户名", 4 | "dms.user.login.password": "密码", 5 | "dms.user.login.password.placeholder": "请输入密码", 6 | "dms.user.login.authCode": "验证码", 7 | "dms.user.login.authCode.placeholder": "请输入验证码", 8 | "dms.user.login.autoLogin": "自动登录", 9 | "dms.user.login.forgetPassword": "忘记密码", 10 | "dms.user.login.login": "登 录", 11 | "dms.user.login.register": "没有账号?立即注册", 12 | "dms.user.login.success": "登录成功", 13 | "dms.user.login.failure": "登录失败,请重试", 14 | "dms.user.register.userName": "用户名", 15 | "dms.user.register.userName.placeholder": "请输入用户名", 16 | "dms.user.register.email": "邮箱", 17 | "dms.user.register.email.placeholder": "请输入邮箱", 18 | "dms.user.register.password": "密码", 19 | "dms.user.register.password.placeholder": "请输入密码", 20 | "dms.user.register.confirmPassword": "确认密码", 21 | "dms.user.register.confirmPassword.placeholder": "请输入确认密码", 22 | "dms.user.register.authCode": "验证码", 23 | "dms.user.register.authCode.placeholder": "请输入验证码", 24 | "dms.user.register.register": "注 册", 25 | "dms.user.register.login": "已有账号?立即登录", 26 | "dms.user.register.success": "注册成功! 即将跳转登录界面", 27 | "dms.user.register.failure": "注册失败,请重试", 28 | }; 29 | -------------------------------------------------------------------------------- /dms-ui/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DMS", 3 | "short_name": "DMS", 4 | "display": "standalone", 5 | "start_url": "./?utm_source=homescreen", 6 | "theme_color": "#002140", 7 | "background_color": "#001529" 8 | } 9 | -------------------------------------------------------------------------------- /dms-ui/src/models/global.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState, useRef } from 'react'; 2 | 3 | const useGlobalModel = () => { 4 | const [tabsList, setTabsList] = useState({ id: '', oldTitle: '', newTitle: '' });//文件里修改名字时tabs编辑进行更新 5 | const [upDateFile, setUpDateFile] = useState(0);//控制文件列表更新 6 | const tabsKey = useRef('');//当前编辑器tabs默认激活的状态、 7 | const tableKey = useRef(1);//库表更新 8 | const [agGridkey, setAgGridkey] = useState('');//添加ag-grid的Key 9 | const [menuKey, setMenuKey] = useState('query');//添加ag-grid的Key 10 | const [selectTabsActive, setSelectTabsActive]: any = useState();//存储当前选中的tabs对象 11 | 12 | return { 13 | tabsKey, 14 | tabsList, 15 | tableKey, 16 | agGridkey, 17 | menuKey, 18 | upDateFile, 19 | selectTabsActive, 20 | setTabsList, 21 | setAgGridkey, 22 | setUpDateFile, 23 | setMenuKey, 24 | setSelectTabsActive 25 | }; 26 | }; 27 | 28 | export default useGlobalModel; 29 | -------------------------------------------------------------------------------- /dms-ui/src/pages/Abnormal/403.tsx: -------------------------------------------------------------------------------- 1 | import { Button, Result } from "antd"; 2 | import React from "react"; 3 | import { history, useIntl } from "@umijs/max"; 4 | 5 | const AccessDenied: React.FC = () => { 6 | const intl = useIntl(); 7 | return ( 8 | history.push("/")}> 14 | {intl.formatMessage({ id: "dms.common.operate.back.home" })} 15 | 16 | } 17 | > 18 | ); 19 | }; 20 | 21 | export default AccessDenied; 22 | -------------------------------------------------------------------------------- /dms-ui/src/pages/Abnormal/404.tsx: -------------------------------------------------------------------------------- 1 | import { Button, Result } from "antd"; 2 | import React from "react"; 3 | import { history, useIntl } from "@umijs/max"; 4 | 5 | const NoFoundPage: React.FC = () => { 6 | const intl = useIntl(); 7 | return ( 8 | history.push("/")}> 14 | {intl.formatMessage({ id: "dms.common.operate.back.home" })} 15 | 16 | } 17 | /> 18 | ); 19 | }; 20 | 21 | export default NoFoundPage; 22 | -------------------------------------------------------------------------------- /dms-ui/src/pages/Abnormal/500.tsx: -------------------------------------------------------------------------------- 1 | import { Button, Result } from "antd"; 2 | import React from "react"; 3 | import { history, useIntl } from "@umijs/max"; 4 | 5 | const ServerError: React.FC = () => { 6 | const intl = useIntl(); 7 | return ( 8 | history.push("/")}> 14 | {intl.formatMessage({ id: "dms.common.operate.back.home" })} 15 | 16 | } 17 | > 18 | ); 19 | }; 20 | 21 | export default ServerError; 22 | -------------------------------------------------------------------------------- /dms-ui/src/pages/Console/Dashboard/index.tsx: -------------------------------------------------------------------------------- 1 | const DashboardView: React.FC = () => { 2 | return <>; 3 | }; 4 | 5 | export default DashboardView; 6 | -------------------------------------------------------------------------------- /dms-ui/src/pages/Console/Workspace/DataQuery/components/DbCreateModal.tsx: -------------------------------------------------------------------------------- 1 | import { useIntl } from '@umijs/max'; 2 | import { Form, Modal } from 'antd'; 3 | import { useState } from 'react'; 4 | 5 | const DbCreateModal: React.FC> = (props) => { 6 | const intl = useIntl(); 7 | const [form] = Form.useForm(); 8 | const { open, data, handleOk, handleCancel } = props; 9 | const [loading, setLoading] = useState(false); 10 | return ( 11 | { 17 | setLoading(true); 18 | form.validateFields().then((values) => { 19 | //todo submit 20 | }); 21 | 22 | setLoading(false); 23 | }} 24 | destroyOnHidden={true} 25 | confirmLoading={loading} 26 | onCancel={handleCancel} 27 | styles={{ body: { paddingTop: 8 } }} 28 | width="540px" 29 | > 30 | hello 31 | 32 | ); 33 | }; 34 | 35 | export default DbCreateModal; 36 | -------------------------------------------------------------------------------- /dms-ui/src/pages/Console/Workspace/DataQuery/components/DdlConfirmModal.tsx: -------------------------------------------------------------------------------- 1 | import { Editor } from '@monaco-editor/react'; 2 | import { useIntl } from '@umijs/max'; 3 | import { Modal } from 'antd'; 4 | import { useState } from 'react'; 5 | 6 | const DdlConfirmModal: React.FC> = (props) => { 7 | const intl = useIntl(); 8 | const { open, data, handleOk, handleCancel } = props; 9 | const [loading, setLoading] = useState(false); 10 | return ( 11 | { 15 | setLoading(true); 16 | handleOk?.(false); 17 | setLoading(false); 18 | }} 19 | onCancel={handleCancel} 20 | confirmLoading={loading} 21 | destroyOnHidden={true} 22 | styles={{ 23 | body: { 24 | overflowY: 'scroll', 25 | maxHeight: '640px', 26 | paddingBottom: 12, 27 | height: 480, 28 | }, 29 | }} 30 | width="780px" 31 | > 32 | 33 | 34 | ); 35 | }; 36 | 37 | export default DdlConfirmModal; 38 | -------------------------------------------------------------------------------- /dms-ui/src/pages/User/index.less: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | height: 100vh; 6 | overflow: auto; 7 | background-image: url("/images/bg.png"); 8 | background-size: cover; 9 | } 10 | 11 | .mainContent { 12 | padding-top: 96px; 13 | } 14 | 15 | .logoInfo { 16 | display: flex; 17 | align-items: center; 18 | justify-content: center; 19 | margin-bottom: 40px; 20 | 21 | .title { 22 | margin-left: 16px; 23 | color: #252b3a; 24 | font-weight: 600; 25 | font-size: 36px; 26 | } 27 | } 28 | 29 | .loginForm { 30 | width: 460px; 31 | } 32 | 33 | .registerForm { 34 | width: 460px; 35 | } 36 | -------------------------------------------------------------------------------- /dms-ui/src/services/admin/config.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from '@umijs/max'; 2 | 3 | export const ConfigService = { 4 | url: '/api/sys/config', 5 | 6 | getMailInfo: async () => { 7 | return request>(`${ConfigService.url}` + '/email', { 8 | method: 'GET', 9 | }); 10 | }, 11 | 12 | setMailInfo: async (info: DMS.EmailConfig) => { 13 | return request>(`${ConfigService.url}` + '/email', { 14 | method: 'PUT', 15 | data: info, 16 | }); 17 | }, 18 | 19 | getLLMInfo: async () => { 20 | return request>(`${ConfigService.url}` + '/llm', { 21 | method: 'GET', 22 | }); 23 | }, 24 | 25 | setLLMInfo: async (info: DMS.LLMConfig) => { 26 | return request>(`${ConfigService.url}` + '/llm', { 27 | method: 'PUT', 28 | data: info, 29 | }); 30 | }, 31 | }; 32 | -------------------------------------------------------------------------------- /dms-ui/src/services/admin/dict.data.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const DictDataService = { 4 | url: "/api/sys/dict/data", 5 | 6 | list: async (queryParam: DMS.SysDictDataParam) => { 7 | return request>(`${DictDataService.url}`, { 8 | method: "GET", 9 | params: queryParam, 10 | }); 11 | }, 12 | 13 | listByType: async (type: string) => { 14 | return request>( 15 | `${DictDataService.url}/` + type, 16 | { 17 | method: "GET", 18 | } 19 | ); 20 | }, 21 | 22 | add: async (data: DMS.SysDictData) => { 23 | return request>(`${DictDataService.url}`, { 24 | method: "POST", 25 | data: data, 26 | }); 27 | }, 28 | 29 | update: async (data: DMS.SysDictData) => { 30 | return request>(`${DictDataService.url}`, { 31 | method: "PUT", 32 | data: data, 33 | }); 34 | }, 35 | 36 | delete: async (data: DMS.SysDictData) => { 37 | return request>(`${DictDataService.url}/` + data.id, { 38 | method: "DELETE", 39 | }); 40 | }, 41 | 42 | deleteBatch: async (idList: (number | string)[]) => { 43 | return request>(`${DictDataService.url}/batch`, { 44 | method: "POST", 45 | data: idList, 46 | }); 47 | }, 48 | }; 49 | -------------------------------------------------------------------------------- /dms-ui/src/services/admin/dict.type.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const DictTypeService = { 4 | url: "/api/sys/dict/type", 5 | 6 | list: async (queryParam: DMS.SysDictTypeParam) => { 7 | return request>(`${DictTypeService.url}`, { 8 | method: "GET", 9 | params: queryParam, 10 | }); 11 | }, 12 | 13 | add: async (dictType: DMS.SysDictType) => { 14 | return request>(`${DictTypeService.url}`, { 15 | method: "POST", 16 | data: dictType, 17 | }); 18 | }, 19 | 20 | update: async (dictType: DMS.SysDictType) => { 21 | return request>(`${DictTypeService.url}`, { 22 | method: "PUT", 23 | data: dictType, 24 | }); 25 | }, 26 | 27 | delete: async (dictType: DMS.SysDictType) => { 28 | return request>( 29 | `${DictTypeService.url}/` + dictType.id, 30 | { 31 | method: "DELETE", 32 | } 33 | ); 34 | }, 35 | 36 | deleteBatch: async (idList: (number | string)[]) => { 37 | return request>(`${DictTypeService.url}/batch`, { 38 | method: "POST", 39 | data: idList, 40 | }); 41 | }, 42 | }; 43 | -------------------------------------------------------------------------------- /dms-ui/src/services/admin/privilege.service.ts: -------------------------------------------------------------------------------- 1 | import { Key } from "react"; 2 | import { request } from "@umijs/max"; 3 | 4 | export const PrivilegeService = { 5 | url: "/api/sys/privilege", 6 | 7 | listAllPrivileges: async () => { 8 | return request>(`${PrivilegeService.url}`, { 9 | method: "GET", 10 | }); 11 | }, 12 | listPrivilegeByRole: async (roleId: string | number) => { 13 | return request>(`${PrivilegeService.url}/` + roleId, { 14 | method: "GET", 15 | }); 16 | }, 17 | grantPrivilegeToRole: async (roleId: string | number, privileges: Key[]) => { 18 | return request>(`${PrivilegeService.url}/` + roleId, { 19 | method: "POST", 20 | data: privileges, 21 | }); 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /dms-ui/src/services/user/log.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const LogService = { 4 | url: "/api/sys/log", 5 | 6 | list: async (param: DMS.QueryParam) => { 7 | return request>(`${LogService.url}`, { 8 | method: "GET", 9 | params: param, 10 | }); 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /dms-ui/src/services/user/msg.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const MsgService = { 4 | url: "/api/sys/message", 5 | 6 | list: async (param: DMS.SysMessageParam) => { 7 | return request>(`${MsgService.url}`, { 8 | method: "GET", 9 | params: param, 10 | }); 11 | }, 12 | read: async (ids: string | string[] | number[]) => { 13 | return request>(`${MsgService.url}`, { 14 | method: "POST", 15 | data: ids, 16 | }); 17 | }, 18 | countUnReadMsg: async () => { 19 | return request>(`${MsgService.url}/count`, { 20 | method: "GET", 21 | }); 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /dms-ui/src/services/user/typings.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace DMS { 2 | type LogLogin = { 3 | id?: number; 4 | userName: string; 5 | loginTime: Date; 6 | ipAddress: string; 7 | loginType: DMS.Dict; 8 | clientInfo?: string; 9 | osInfo?: string; 10 | browserInfo?: string; 11 | actionInfo?: string; 12 | createTime?: Date; 13 | updateTime?: Date; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /dms-ui/src/services/workspace/data.task.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const DataTaskService = { 4 | url: "/api/workspace/task", 5 | 6 | newExportTask: async (data: DMS.DataTask) => { 7 | return request>(`${DataTaskService.url}/export`, { 8 | method: "POST", 9 | data: data, 10 | }); 11 | }, 12 | 13 | newImportTask: async (data: DMS.ImportDataTaskParam) => { 14 | return request>(`${DataTaskService.url}/import`, { 15 | method: "POST", 16 | data: data, 17 | headers: { "Content-Type": "multipart/form-data" }, 18 | }); 19 | }, 20 | 21 | list: async (queryParam: DMS.DataTaskParam) => { 22 | return request>(`${DataTaskService.url}`, { 23 | method: "GET", 24 | params: queryParam, 25 | }); 26 | }, 27 | 28 | download: async (data: DMS.DataTask) => { 29 | const a = document.createElement("a"); 30 | const url = `${DataTaskService.url}/download/` + data.id; 31 | a.href = url; 32 | a.download = data.fileName + ""; 33 | a.click(); 34 | window.URL.revokeObjectURL(url); 35 | }, 36 | 37 | viewLog: async (taskId: number | string) => { 38 | return request>( 39 | `${DataTaskService.url}/log/` + taskId, 40 | { method: "GET" } 41 | ); 42 | }, 43 | }; 44 | -------------------------------------------------------------------------------- /dms-ui/src/services/workspace/file.catalog.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const FileCatalogService = { 4 | url: "/api/workspace/catalog", 5 | 6 | add: async (data: DMS.FileCatalog) => { 7 | return request>(`${FileCatalogService.url}`, { 8 | method: "POST", 9 | data: data, 10 | }); 11 | }, 12 | 13 | update: async (data: DMS.FileCatalog) => { 14 | return request>(`${FileCatalogService.url}`, { 15 | method: "PUT", 16 | data: data, 17 | }); 18 | }, 19 | 20 | delete: async (id: string | number) => { 21 | return request>(`${FileCatalogService.url}/` + id, { 22 | method: "DELETE", 23 | }); 24 | }, 25 | listCatalogTree: async ( 26 | workspaceId: string | number, 27 | id: string | number 28 | ) => { 29 | return request[]>>( 30 | `${FileCatalogService.url}`, 31 | { 32 | method: "GET", 33 | params: { workspaceId: workspaceId, id: id }, 34 | } 35 | ); 36 | }, 37 | }; 38 | -------------------------------------------------------------------------------- /dms-ui/src/services/workspace/sql.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const SqlHistoryService = { 4 | url: "/api/workspace/sql", 5 | 6 | list: async (queryParam: DMS.LogSqlHistoryParam) => { 7 | return request>(`${SqlHistoryService.url}`, { 8 | method: "GET", 9 | params: queryParam, 10 | }); 11 | }, 12 | stop: async (socketId: string) => { 13 | return request>( 14 | `${SqlHistoryService.url}/stop/` + socketId, 15 | { 16 | method: "POST", 17 | } 18 | ); 19 | }, 20 | }; 21 | -------------------------------------------------------------------------------- /dms-ui/src/services/workspace/workspace.service.ts: -------------------------------------------------------------------------------- 1 | import { request } from "@umijs/max"; 2 | 3 | export const WorkspaceService = { 4 | url: "/api/workspace", 5 | 6 | list: async (queryParam: DMS.WorkspaceParam) => { 7 | return request>(`${WorkspaceService.url}`, { 8 | method: "GET", 9 | params: queryParam, 10 | }); 11 | }, 12 | 13 | add: async (data: DMS.Workspace) => { 14 | return request>(`${WorkspaceService.url}`, { 15 | method: "POST", 16 | data: data, 17 | }); 18 | }, 19 | 20 | update: async (data: DMS.Workspace) => { 21 | return request>(`${WorkspaceService.url}`, { 22 | method: "PUT", 23 | data: data, 24 | }); 25 | }, 26 | 27 | delete: async (data: DMS.Workspace) => { 28 | return request>( 29 | `${WorkspaceService.url}/` + data.id, 30 | { 31 | method: "DELETE", 32 | } 33 | ); 34 | }, 35 | 36 | deleteBatch: async (idList: (number | string)[]) => { 37 | return request>(`${WorkspaceService.url}/batch`, { 38 | method: "POST", 39 | data: idList, 40 | }); 41 | }, 42 | }; 43 | -------------------------------------------------------------------------------- /dms-ui/src/socket.ts: -------------------------------------------------------------------------------- 1 | import { io } from "socket.io-client"; 2 | 3 | export const SqlSocketCreator = () => io("http://localhost:8366/sql", { 4 | transports: ["websocket"], 5 | }); 6 | -------------------------------------------------------------------------------- /dms-ui/src/tailwind.config.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = { 3 | theme: { 4 | extend: { 5 | typography: { 6 | DEFAULT: { 7 | css: { 8 | color: '#000000', 9 | code: { 10 | backgroundColor: '#bfbfbf', 11 | padding: '2px 6px 2px 6px', 12 | borderRadius: '6px' 13 | }, 14 | 'code::before': { 15 | display: 'none', 16 | }, 17 | 'code::after': { 18 | display: 'none', 19 | }, 20 | pre: { 21 | backgroundColor: '#1E1E1E', 22 | } 23 | }, 24 | 25 | }, 26 | } 27 | } 28 | }, 29 | plugins: [ 30 | require('@tailwindcss/typography'), 31 | ], 32 | } -------------------------------------------------------------------------------- /dms-ui/src/tailwind.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | @plugin "@tailwindcss/typography"; 3 | @config "./tailwind.config.js"; -------------------------------------------------------------------------------- /dms-ui/src/utils/NumberUtil.ts: -------------------------------------------------------------------------------- 1 | export const NumberUtil = { 2 | byteFormat: (size: number) => { 3 | if (size >= 0 && size <= 1024 * 1024) { 4 | return (size / 1024).toFixed(2) + "KB"; 5 | } else if (size > 1024 * 1024 && size <= 1024 * 1024 * 1024) { 6 | return (size / 1024 / 1024).toFixed(2) + "MB"; 7 | } else if (size > 1024 * 1024 * 1024 && size <= 1024 * 1024 * 1024 * 1024) { 8 | return (size / 1024 / 1024 / 1024).toFixed(2) + "GB"; 9 | } else if ( 10 | size > 1024 * 1024 * 1024 * 1024 && 11 | size <= 1024 * 1024 * 1024 * 1024 * 1024 12 | ) { 13 | return (size / 1024 / 1024 / 1024 / 1024).toFixed(2) + "TB"; 14 | } 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /dms-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "importHelpers": true, 7 | "jsx": "preserve", 8 | "esModuleInterop": true, 9 | "sourceMap": true, 10 | "baseUrl": "./", 11 | "skipLibCheck": true, 12 | "experimentalDecorators": true, 13 | "strict": true, 14 | "resolveJsonModule": true, 15 | "allowSyntheticDefaultImports": true, 16 | "paths": { 17 | "@/*": ["./src/*"], 18 | "@@/*": ["./src/.umi/*"], 19 | "@@test/*": ["./src/.umi-test/*"] 20 | } 21 | }, 22 | "include": ["./**/*.d.ts", "./**/*.ts", "./**/*.tsx"] 23 | } 24 | -------------------------------------------------------------------------------- /lombok.config: -------------------------------------------------------------------------------- 1 | config.stopBubbling = true 2 | lombok.addLombokGeneratedAnnotation = true 3 | -------------------------------------------------------------------------------- /scripts/docker/build/dms-backend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM amazoncorretto:17.0.14 as docker 2 | ENV DMS_HOME=/opt/app 3 | WORKDIR $DMS_HOME/dms 4 | COPY ./dms-api/target/dms-api.jar . 5 | COPY ./scripts/docker/build/dms-backend/application-docker.yml . 6 | EXPOSE 8080 7 | 8 | ENTRYPOINT ["sh","-c","java -jar -Dspring.profiles.active=docker $DMS_HOME/dms/dms-api.jar --spring.config.location=$DMS_HOME/dms/application-docker.yml --add-opens java.base/java.nio=ALL-UNNAMED"] -------------------------------------------------------------------------------- /scripts/docker/build/dms-frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:stable as docker 2 | ENV DMS_HOME=/opt/app 3 | WORKDIR $DMS_HOME/dms 4 | COPY ./dms-ui/dist ./ 5 | COPY ./scripts/docker/build/dms-frontend/nginx.conf /etc/nginx/nginx.conf 6 | EXPOSE 80 7 | 8 | CMD ["nginx","-g","daemon off;"] -------------------------------------------------------------------------------- /scripts/docker/thirdparties/clickhouse/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | ck: 20 | image: bitnami/clickhouse:25.3.2 21 | environment: 22 | - ALLOW_EMPTY_PASSWORD=no 23 | - CLICKHOUSE_ADMIN_USER=admin 24 | - CLICKHOUSE_ADMIN_PASSWORD=Passwd@123 25 | ports: 26 | - "8123:8123" 27 | - "9002:9000" 28 | - "9004:9004" 29 | - "9005:9005" 30 | - "9009:9009" 31 | volumes: 32 | - ./data:/bitnami/clickhouse 33 | networks: 34 | - ck_net 35 | networks: 36 | ck_net: 37 | driver: bridge -------------------------------------------------------------------------------- /scripts/docker/thirdparties/doris/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | version: '3.8' 18 | 19 | services: 20 | 21 | doris: 22 | image: apache/doris:doris-all-in-one-2.1.0 23 | ports: 24 | - 9030:9030 25 | restart: on-failure 26 | networks: 27 | - doris_net 28 | networks: 29 | doris_net: 30 | driver: bridge -------------------------------------------------------------------------------- /scripts/docker/thirdparties/gaussdb/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | gaussdb: 20 | image: enmotech/opengauss-lite:latest 21 | privileged: true 22 | environment: 23 | - GS_PASSWORD=Passwd@123 24 | - GS_PORT=5432 25 | volumes: 26 | - ./data:/var/lib/opengauss 27 | ports: 28 | - "25432:5432" 29 | networks: 30 | - gaussdb_net 31 | networks: 32 | gaussdb_net: 33 | driver: bridge 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /scripts/docker/thirdparties/greenplum/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | greenplum: 20 | image: andruche/greenplum:7 21 | ports: 22 | - "25432:5432" 23 | expose: 24 | - '25432' 25 | volumes: 26 | - ./data/master:/data/master 27 | - ./data/primary:/data/primary 28 | - ./data/backups:/data/backups -------------------------------------------------------------------------------- /scripts/docker/thirdparties/mariadb/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | mariadb: 20 | image: mariadb:11.7 21 | restart: always 22 | environment: 23 | - MARIADB_ROOT_PASSWORD=Passwd@123 24 | - MARIADB_DATABASE=sample 25 | ports: 26 | - "3306:3306" 27 | volumes: 28 | - ./data:/var/lib/mysql -------------------------------------------------------------------------------- /scripts/docker/thirdparties/mongodb/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | mongo: 20 | image: mongo:8.0 21 | ports: 22 | - "27017:27017" 23 | restart: always 24 | environment: 25 | MONGO_INITDB_ROOT_USERNAME: root 26 | MONGO_INITDB_ROOT_PASSWORD: 123456 27 | 28 | mongo-express: 29 | image: mongo-express 30 | restart: always 31 | ports: 32 | - 8081:8081 33 | environment: 34 | ME_CONFIG_MONGODB_ADMINUSERNAME: root 35 | ME_CONFIG_MONGODB_ADMINPASSWORD: 123456 36 | ME_CONFIG_MONGODB_URL: mongodb://root:123456@mongo:27017/ 37 | ME_CONFIG_BASICAUTH: false 38 | -------------------------------------------------------------------------------- /scripts/docker/thirdparties/mssql/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | mssql: 20 | image: mcr.microsoft.com/mssql/server:2022-latest 21 | environment: 22 | - MSSQL_PID=Developer 23 | - MSSQL_SA_PASSWORD=${Sa_Password:-#password123} 24 | - ACCEPT_EULA=Y 25 | ports: 26 | - "1433:1433" 27 | volumes: 28 | - ./data:/var/opt/mssql 29 | restart: always 30 | healthcheck: 31 | test: [ "CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P #password123 -Q 'SELECT 1' || exit 1" ] 32 | interval: 10s 33 | retries: 10 34 | start_period: 10s 35 | timeout: 3s 36 | networks: 37 | - mssql_net 38 | 39 | networks: 40 | mssql_net: 41 | driver: bridge -------------------------------------------------------------------------------- /scripts/docker/thirdparties/mysql/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | mysql: 20 | image: bitnami/mysql:8.0 21 | container_name: mysql 22 | environment: 23 | - TZ=Asia/Shanghai 24 | - MYSQL_ROOT_USER=root 25 | - MYSQL_ROOT_PASSWORD=123456 26 | - MYSQL_AUTHENTICATION_PLUGIN=mysql_native_password 27 | - MYSQL_DATABASE=sample 28 | ports: 29 | - "3306:3306" 30 | volumes: 31 | - ./my_custom.cnf:/opt/bitnami/mysql/conf/my_custom.cnf 32 | - ./init.d:/docker-entrypoint-initdb.d 33 | networks: 34 | - mysql_net 35 | 36 | networks: 37 | mysql_net: 38 | driver: bridge -------------------------------------------------------------------------------- /scripts/docker/thirdparties/mysql/my_custom.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | log-bin=mysql-bin 3 | binlog-format=ROW 4 | server_id=1 5 | 6 | lower_case_table_names=1 -------------------------------------------------------------------------------- /scripts/docker/thirdparties/oracle/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | services: 19 | 20 | oracle: 21 | image: apecloud/oracle:19.3.0-ee 22 | ports: 23 | - "1521:1521" 24 | restart: on-failure 25 | networks: 26 | - oracle_net 27 | networks: 28 | oracle_net: 29 | driver: bridge --------------------------------------------------------------------------------