diff --git a/etl-modules/etl-data-source/etl-data-source-common/src/main/java/com/etl/data/domain/DataSource.java b/etl-modules/etl-data-source/etl-data-source-common/src/main/java/com/etl/data/domain/DataSource.java new file mode 100644 index 0000000..8f1f64a --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-common/src/main/java/com/etl/data/domain/DataSource.java @@ -0,0 +1,108 @@ +package com.etl.data.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.etl.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + + +/** + * @ClassName DataSource + * @Description 描述 + * @Author YunFei.Du + * @Date 2024/4/20 11:36 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("data_source") +public class DataSource extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 数据源id + */ + private Long id; + + /** + * 数据源名称 + */ + private String dataSourceName; + + /** + * 数据库连接地址 + */ + private String linkAddress; + + /** + * 主机iq + */ + private String port; + /** + * 端口 + */ + private String sql; + + + /** + * 数据库名称 + */ + private String databaseName; + + /** + * 用户名 + */ + private String username; + + /** + * 密码 + */ + private String password; + + /** + * 数据表名称 + */ + private String tableName; + + /** 数据连接参数 */ + private String connectionParam; + + /** 初始连接数量 */ + private Long initNum; + + /** 最大连接数量 */ + private Long maxNum; + /** + * 连接池数量 + */ + private Long count; + + + /** 最大等待时间 */ + private Long maxWaitTime; + + /** 最大等待次数 */ + private Long maxWaitSize; + + /** + * 数据源类型 + */ + private String type; + + /** 数据来源名称 */ + private String systemName; + + /** 连接驱动名称 */ + private String jdbcDriver; + + /** 模式名称 */ + private String modeName; + +} diff --git a/etl-modules/etl-data-source/etl-data-source-common/src/main/java/com/etl/data/domain/resp/DataSourceResp.java b/etl-modules/etl-data-source/etl-data-source-common/src/main/java/com/etl/data/domain/resp/DataSourceResp.java new file mode 100644 index 0000000..61a7f6f --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-common/src/main/java/com/etl/data/domain/resp/DataSourceResp.java @@ -0,0 +1,20 @@ +package com.etl.data.domain.resp; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** + * @ClassName DataSourceResp + * @Description 描述 + * @Author YunFei.Du + * @Date 2024/4/20 11:42 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +public class DataSourceResp { + +} diff --git a/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/ETLDataSourceApplication.java b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/ETLDataSourceApplication.java new file mode 100644 index 0000000..9545f48 --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/ETLDataSourceApplication.java @@ -0,0 +1,24 @@ +package com.etl.data; + +import com.etl.common.security.annotation.EnableCustomConfig; +import com.etl.common.security.annotation.EnableMyFeignClients; +import com.etl.common.swagger.annotation.EnableCustomSwagger2; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 数据源模块 + * + * @author YunFei + */ +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableMyFeignClients +@SpringBootApplication +@MapperScan("com.etl.data.mapper") +public class ETLDataSourceApplication { + public static void main (String[] args) { + SpringApplication.run(ETLDataSourceApplication.class, args); + } +} diff --git a/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/controller/DataSourceController.java b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/controller/DataSourceController.java new file mode 100644 index 0000000..cc1c193 --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/controller/DataSourceController.java @@ -0,0 +1,22 @@ +package com.etl.data.controller; + +import com.etl.common.core.web.controller.BaseController; +import com.etl.data.service.DataSourceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 数据源 + * @author YunFei.Du + * @date 21:47 2024/4/25 + */ +@RestController +@RequestMapping("/source") +public class DataSourceController extends BaseController { + @Autowired + private DataSourceService dataSourceService; + + + +} diff --git a/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/mapper/DataSourceMapper.java b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/mapper/DataSourceMapper.java new file mode 100644 index 0000000..cd889f3 --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/mapper/DataSourceMapper.java @@ -0,0 +1,13 @@ +package com.etl.data.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.etl.data.domain.DataSource; + +/** + * @ClassName DataSourceMapper + * @Description 描述 + * @Author YunFei.Du + * @Date 2024/4/20 11:46 + */ +public interface DataSourceMapper extends BaseMapper { +} diff --git a/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/service/DataSourceService.java b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/service/DataSourceService.java new file mode 100644 index 0000000..592a0f2 --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/service/DataSourceService.java @@ -0,0 +1,14 @@ +package com.etl.data.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.etl.data.domain.DataSource; + +/** + * @ClassName DataMansgerService + * @Description 描述 + * @Author YunFei.Du + * @Date 2024/4/20 11:48 + */ +public interface DataSourceService extends IService { + +} diff --git a/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/service/impl/DataSourceServiceImpl.java b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/service/impl/DataSourceServiceImpl.java new file mode 100644 index 0000000..1aa4a14 --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-server/src/main/java/com/etl/data/service/impl/DataSourceServiceImpl.java @@ -0,0 +1,19 @@ +package com.etl.data.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.etl.data.domain.DataSource; +import com.etl.data.mapper.DataSourceMapper; +import com.etl.data.service.DataSourceService; +import org.springframework.stereotype.Service; + + +/** + * @ClassName DataSourceServiceImpl + * @Description 描述 + * @Author YunFei.Du + * @Date 2024/4/20 11:49 + */ +@Service +public class DataSourceServiceImpl extends ServiceImpl implements DataSourceService { + +} diff --git a/etl-modules/etl-data-source/etl-data-source-server/src/main/resources/mapper/data/DataSourceMapper.xml b/etl-modules/etl-data-source/etl-data-source-server/src/main/resources/mapper/data/DataSourceMapper.xml new file mode 100644 index 0000000..d9a976b --- /dev/null +++ b/etl-modules/etl-data-source/etl-data-source-server/src/main/resources/mapper/data/DataSourceMapper.xml @@ -0,0 +1,7 @@ + + + + +