├── .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 | 
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 | 
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 |
--------------------------------------------------------------------------------
/dms-ui/public/images/databases/redis.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |