From aa166b808df8cf3b6a5dee7cf5e666568c1edada Mon Sep 17 00:00:00 2001
From: yaoxin <1752800946@qq.com>
Date: Sat, 20 Apr 2024 13:35:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
muyu-modules/muyu-etl/pom.xml | 85 +++++++
.../muyu-etl/src/main/java/com/muyu/Main.java | 7 +
.../java/com/muyu/etl/MuYuETLApplication.java | 22 ++
.../etl/controller/DataSourceController.java | 114 +++++++++
.../java/com/muyu/etl/domain/DataSource.java | 224 ++++++++++++++++++
.../com/muyu/etl/mapper/DataSourceMapper.java | 61 +++++
.../muyu/etl/service/IDataSourceService.java | 65 +++++
.../service/impl/DataSourceServiceImpl.java | 124 ++++++++++
.../muyu-etl/src/main/resources/banner.txt | 2 +
.../muyu-etl/src/main/resources/bootstrap.yml | 28 +++
.../muyu-etl/src/main/resources/logback.xml | 74 ++++++
.../mapper/system/DataSourceMapper.xml | 136 +++++++++++
muyu-modules/pom.xml | 1 +
13 files changed, 943 insertions(+)
create mode 100644 muyu-modules/muyu-etl/pom.xml
create mode 100644 muyu-modules/muyu-etl/src/main/java/com/muyu/Main.java
create mode 100644 muyu-modules/muyu-etl/src/main/java/com/muyu/etl/MuYuETLApplication.java
create mode 100644 muyu-modules/muyu-etl/src/main/java/com/muyu/etl/controller/DataSourceController.java
create mode 100644 muyu-modules/muyu-etl/src/main/java/com/muyu/etl/domain/DataSource.java
create mode 100644 muyu-modules/muyu-etl/src/main/java/com/muyu/etl/mapper/DataSourceMapper.java
create mode 100644 muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/IDataSourceService.java
create mode 100644 muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/impl/DataSourceServiceImpl.java
create mode 100644 muyu-modules/muyu-etl/src/main/resources/banner.txt
create mode 100644 muyu-modules/muyu-etl/src/main/resources/bootstrap.yml
create mode 100644 muyu-modules/muyu-etl/src/main/resources/logback.xml
create mode 100644 muyu-modules/muyu-etl/src/main/resources/mapper/system/DataSourceMapper.xml
diff --git a/muyu-modules/muyu-etl/pom.xml b/muyu-modules/muyu-etl/pom.xml
new file mode 100644
index 0000000..4f978b4
--- /dev/null
+++ b/muyu-modules/muyu-etl/pom.xml
@@ -0,0 +1,85 @@
+
+
+ 4.0.0
+
+ com.muyu
+ muyu-modules
+ 3.6.3
+
+
+ muyu-etl
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ io.springfox
+ springfox-swagger-ui
+ ${swagger.fox.version}
+
+
+
+
+ com.mysql
+ mysql-connector-j
+
+
+
+
+ com.muyu
+ muyu-common-datasource
+
+
+
+
+ com.muyu
+ muyu-common-datascope
+
+
+
+
+ com.muyu
+ muyu-common-log
+
+
+
+
+ com.muyu
+ muyu-common-swagger
+
+
+
+
+
\ No newline at end of file
diff --git a/muyu-modules/muyu-etl/src/main/java/com/muyu/Main.java b/muyu-modules/muyu-etl/src/main/java/com/muyu/Main.java
new file mode 100644
index 0000000..95690d4
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/java/com/muyu/Main.java
@@ -0,0 +1,7 @@
+package com.muyu;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
diff --git a/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/MuYuETLApplication.java b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/MuYuETLApplication.java
new file mode 100644
index 0000000..51f43c4
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/MuYuETLApplication.java
@@ -0,0 +1,22 @@
+package com.muyu.etl;
+
+import com.muyu.common.security.annotation.EnableCustomConfig;
+import com.muyu.common.security.annotation.EnableMyFeignClients;
+import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * 系统模块
+ *
+ * @author muyu
+ */
+@EnableCustomConfig
+@EnableCustomSwagger2
+@EnableMyFeignClients
+@SpringBootApplication
+public class MuYuETLApplication {
+ public static void main (String[] args) {
+ SpringApplication.run(MuYuETLApplication.class, args);
+ }
+}
diff --git a/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/controller/DataSourceController.java b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/controller/DataSourceController.java
new file mode 100644
index 0000000..820b4bf
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/controller/DataSourceController.java
@@ -0,0 +1,114 @@
+package com.muyu.etl.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.muyu.common.log.annotation.Log;
+import com.muyu.common.log.enums.BusinessType;
+import com.muyu.common.security.annotation.RequiresPermissions;
+import com.muyu.etl.domain.DataSource;
+import com.muyu.etl.service.IDataSourceService;
+import com.muyu.common.core.web.controller.BaseController;
+import com.muyu.common.core.domain.Result;
+import com.muyu.common.core.utils.poi.ExcelUtil;
+import com.muyu.common.core.web.page.TableDataInfo;
+
+/**
+ * 【请填写功能名称】Controller
+ *
+ * @author ruoyi
+ * @date 2024-04-20
+ */
+@RestController
+@RequestMapping("/source")
+public class DataSourceController extends BaseController
+{
+ @Autowired
+ private IDataSourceService dataSourceService;
+
+ /**
+ * 查询【请填写功能名称】列表
+ */
+ @RequiresPermissions("system:source:list")
+ @GetMapping("/list")
+ public Result> list(DataSource dataSource)
+ {
+ startPage();
+ List list = dataSourceService.selectDataSourceList(dataSource);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出【请填写功能名称】列表
+ */
+ @RequiresPermissions("system:source:export")
+ @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, DataSource dataSource)
+ {
+ List list = dataSourceService.selectDataSourceList(dataSource);
+ ExcelUtil util = new ExcelUtil(DataSource.class);
+ util.exportExcel(response, list, "【请填写功能名称】数据");
+ }
+
+ /**
+ * 获取【请填写功能名称】详细信息
+ */
+ @RequiresPermissions("system:source:query")
+ @GetMapping(value = "/{id}")
+ public Result getInfo(@PathVariable("id") Long id)
+ {
+ return success(dataSourceService.selectDataSourceById(id));
+ }
+
+ /**
+ * 新增【请填写功能名称】
+ */
+ @RequiresPermissions("system:source:add")
+ @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+ @PostMapping
+ public Result add(@RequestBody DataSource dataSource)
+ {
+ return toAjax(dataSourceService.insertDataSource(dataSource));
+ }
+
+ /**
+ * 测试连接
+ */
+ @Log(title = "测试连接", businessType = BusinessType.INSERT)
+ @PostMapping("/TestConnection")
+ public Result testConnection(@RequestBody DataSource dataSource)
+ {
+ return dataSourceService.testConnection(dataSource);
+ }
+
+ /**
+ * 修改【请填写功能名称】
+ */
+ @RequiresPermissions("system:source:edit")
+ @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public Result edit(@RequestBody DataSource dataSource)
+ {
+ return toAjax(dataSourceService.updateDataSource(dataSource));
+ }
+
+ /**
+ * 删除【请填写功能名称】
+ */
+ @RequiresPermissions("system:source:remove")
+ @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public Result remove(@PathVariable Long[] ids)
+ {
+ return toAjax(dataSourceService.deleteDataSourceByIds(ids));
+ }
+}
diff --git a/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/domain/DataSource.java b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/domain/DataSource.java
new file mode 100644
index 0000000..12d5599
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/domain/DataSource.java
@@ -0,0 +1,224 @@
+package com.muyu.etl.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.muyu.common.core.annotation.Excel;
+import com.muyu.common.core.web.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 data_source
+ *
+ * @author ruoyi
+ * @date 2024-04-20
+ */
+public class DataSource extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** $column.columnComment */
+ private Long id;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String dataSourceName;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String linkAddress;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String port;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String databaseName;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String username;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String password;
+
+ /** 数据连接参数 */
+ @Excel(name = "数据连接参数")
+ private String connectionParam;
+
+ /** 初始连接数量 */
+ @Excel(name = "初始连接数量")
+ private Long initNum;
+
+ /** 最大连接数量 */
+ @Excel(name = "最大连接数量")
+ private Long maxNum;
+
+ /** 最大等待时间 */
+ @Excel(name = "最大等待时间")
+ private Long maxWaitTime;
+
+ /** 最大等待次数 */
+ @Excel(name = "最大等待次数")
+ private Long maxWaitSize;
+
+ /** $column.columnComment */
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String type;
+
+ /** 数据来源名称 */
+ @Excel(name = "数据来源名称")
+ private String systemName;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+ public void setDataSourceName(String dataSourceName)
+ {
+ this.dataSourceName = dataSourceName;
+ }
+
+ public String getDataSourceName()
+ {
+ return dataSourceName;
+ }
+ public void setLinkAddress(String linkAddress)
+ {
+ this.linkAddress = linkAddress;
+ }
+
+ public String getLinkAddress()
+ {
+ return linkAddress;
+ }
+ public void setPort(String port)
+ {
+ this.port = port;
+ }
+
+ public String getPort()
+ {
+ return port;
+ }
+ public void setDatabaseName(String databaseName)
+ {
+ this.databaseName = databaseName;
+ }
+
+ public String getDatabaseName()
+ {
+ return databaseName;
+ }
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+
+ public String getUsername()
+ {
+ return username;
+ }
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+ public String getPassword()
+ {
+ return password;
+ }
+ public void setConnectionParam(String connectionParam)
+ {
+ this.connectionParam = connectionParam;
+ }
+
+ public String getConnectionParam()
+ {
+ return connectionParam;
+ }
+ public void setInitNum(Long initNum)
+ {
+ this.initNum = initNum;
+ }
+
+ public Long getInitNum()
+ {
+ return initNum;
+ }
+ public void setMaxNum(Long maxNum)
+ {
+ this.maxNum = maxNum;
+ }
+
+ public Long getMaxNum()
+ {
+ return maxNum;
+ }
+ public void setMaxWaitTime(Long maxWaitTime)
+ {
+ this.maxWaitTime = maxWaitTime;
+ }
+
+ public Long getMaxWaitTime()
+ {
+ return maxWaitTime;
+ }
+ public void setMaxWaitSize(Long maxWaitSize)
+ {
+ this.maxWaitSize = maxWaitSize;
+ }
+
+ public Long getMaxWaitSize()
+ {
+ return maxWaitSize;
+ }
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+ public void setSystemName(String systemName)
+ {
+ this.systemName = systemName;
+ }
+
+ public String getSystemName()
+ {
+ return systemName;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("dataSourceName", getDataSourceName())
+ .append("linkAddress", getLinkAddress())
+ .append("port", getPort())
+ .append("databaseName", getDatabaseName())
+ .append("username", getUsername())
+ .append("password", getPassword())
+ .append("connectionParam", getConnectionParam())
+ .append("initNum", getInitNum())
+ .append("maxNum", getMaxNum())
+ .append("maxWaitTime", getMaxWaitTime())
+ .append("maxWaitSize", getMaxWaitSize())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .append("type", getType())
+ .append("systemName", getSystemName())
+ .toString();
+ }
+}
diff --git a/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/mapper/DataSourceMapper.java b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/mapper/DataSourceMapper.java
new file mode 100644
index 0000000..69100f9
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/mapper/DataSourceMapper.java
@@ -0,0 +1,61 @@
+package com.muyu.etl.mapper;
+
+import java.util.List;
+import com.muyu.etl.domain.DataSource;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-04-20
+ */
+public interface DataSourceMapper
+{
+ /**
+ * 查询【请填写功能名称】
+ *
+ * @param id 【请填写功能名称】主键
+ * @return 【请填写功能名称】
+ */
+ public DataSource selectDataSourceById(Long id);
+
+ /**
+ * 查询【请填写功能名称】列表
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 【请填写功能名称】集合
+ */
+ public List selectDataSourceList(DataSource dataSource);
+
+ /**
+ * 新增【请填写功能名称】
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 结果
+ */
+ public int insertDataSource(DataSource dataSource);
+
+ /**
+ * 修改【请填写功能名称】
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 结果
+ */
+ public int updateDataSource(DataSource dataSource);
+
+ /**
+ * 删除【请填写功能名称】
+ *
+ * @param id 【请填写功能名称】主键
+ * @return 结果
+ */
+ public int deleteDataSourceById(Long id);
+
+ /**
+ * 批量删除【请填写功能名称】
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteDataSourceByIds(Long[] ids);
+}
diff --git a/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/IDataSourceService.java b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/IDataSourceService.java
new file mode 100644
index 0000000..7c9870a
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/IDataSourceService.java
@@ -0,0 +1,65 @@
+package com.muyu.etl.service;
+
+import java.util.List;
+
+import com.muyu.common.core.domain.Result;
+import com.muyu.etl.domain.DataSource;
+
+/**
+ * 【请填写功能名称】Service接口
+ *
+ * @author ruoyi
+ * @date 2024-04-20
+ */
+public interface IDataSourceService
+{
+ /**
+ * 查询【请填写功能名称】
+ *
+ * @param id 【请填写功能名称】主键
+ * @return 【请填写功能名称】
+ */
+ public DataSource selectDataSourceById(Long id);
+
+ /**
+ * 查询【请填写功能名称】列表
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 【请填写功能名称】集合
+ */
+ public List selectDataSourceList(DataSource dataSource);
+
+ /**
+ * 新增【请填写功能名称】
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 结果
+ */
+ public int insertDataSource(DataSource dataSource);
+
+ /**
+ * 修改【请填写功能名称】
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 结果
+ */
+ public int updateDataSource(DataSource dataSource);
+
+ /**
+ * 批量删除【请填写功能名称】
+ *
+ * @param ids 需要删除的【请填写功能名称】主键集合
+ * @return 结果
+ */
+ public int deleteDataSourceByIds(Long[] ids);
+
+ /**
+ * 删除【请填写功能名称】信息
+ *
+ * @param id 【请填写功能名称】主键
+ * @return 结果
+ */
+ public int deleteDataSourceById(Long id);
+
+ Result testConnection(DataSource dataSource);
+}
diff --git a/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/impl/DataSourceServiceImpl.java b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/impl/DataSourceServiceImpl.java
new file mode 100644
index 0000000..8fbf05a
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/java/com/muyu/etl/service/impl/DataSourceServiceImpl.java
@@ -0,0 +1,124 @@
+package com.muyu.etl.service.impl;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.List;
+
+import com.muyu.common.core.domain.Result;
+import com.muyu.common.core.utils.DateUtils;
+import com.muyu.common.security.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.muyu.etl.mapper.DataSourceMapper;
+import com.muyu.etl.domain.DataSource;
+import com.muyu.etl.service.IDataSourceService;
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-04-20
+ */
+@Service
+public class DataSourceServiceImpl implements IDataSourceService
+{
+ @Autowired
+ private DataSourceMapper dataSourceMapper;
+
+ /**
+ * 查询【请填写功能名称】
+ *
+ * @param id 【请填写功能名称】主键
+ * @return 【请填写功能名称】
+ */
+ @Override
+ public DataSource selectDataSourceById(Long id)
+ {
+ return dataSourceMapper.selectDataSourceById(id);
+ }
+
+ /**
+ * 查询【请填写功能名称】列表
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 【请填写功能名称】
+ */
+ @Override
+ public List selectDataSourceList(DataSource dataSource)
+ {
+ return dataSourceMapper.selectDataSourceList(dataSource);
+ }
+
+ /**
+ * 新增【请填写功能名称】
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 结果
+ */
+ @Override
+ public int insertDataSource(DataSource dataSource)
+ {
+ dataSource.setCreateTime(DateUtils.getNowDate());
+ dataSource.setCreateBy(SecurityUtils.getUsername());
+ return dataSourceMapper.insertDataSource(dataSource);
+ }
+
+ /**
+ * 修改【请填写功能名称】
+ *
+ * @param dataSource 【请填写功能名称】
+ * @return 结果
+ */
+ @Override
+ public int updateDataSource(DataSource dataSource)
+ {
+ dataSource.setUpdateTime(DateUtils.getNowDate());
+ dataSource.setUpdateBy(SecurityUtils.getUsername());
+ return dataSourceMapper.updateDataSource(dataSource);
+ }
+
+ /**
+ * 批量删除【请填写功能名称】
+ *
+ * @param ids 需要删除的【请填写功能名称】主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDataSourceByIds(Long[] ids)
+ {
+ return dataSourceMapper.deleteDataSourceByIds(ids);
+ }
+
+ /**
+ * 删除【请填写功能名称】信息
+ *
+ * @param id 【请填写功能名称】主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDataSourceById(Long id)
+ {
+ return dataSourceMapper.deleteDataSourceById(id);
+ }
+
+ @Override
+ public Result testConnection(DataSource dataSource) {
+ String user = dataSource.getUsername();
+ String password = dataSource.getPassword();
+ String jdbcDriver = "com.mysql.cj.jdbc.Driver";
+ String jdbcUrl = "jdbc:mysql://"+dataSource.getLinkAddress()+":"+dataSource.getPort()+"/"+dataSource.getDatabaseName();
+ Connection conn = null;
+ try {
+ Class.forName(jdbcDriver);
+ } catch (ClassNotFoundException e) {
+ return Result.error("连接失败");
+ }
+ try {
+ conn = DriverManager.getConnection(jdbcUrl, user, password);
+ conn.close();
+ }catch (Exception e){
+ return Result.error("连接失败");
+ }
+ return Result.success("连接成功");
+ }
+}
diff --git a/muyu-modules/muyu-etl/src/main/resources/banner.txt b/muyu-modules/muyu-etl/src/main/resources/banner.txt
new file mode 100644
index 0000000..0dd5eee
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/resources/banner.txt
@@ -0,0 +1,2 @@
+Spring Boot Version: ${spring-boot.version}
+Spring Application Name: ${spring.application.name}
diff --git a/muyu-modules/muyu-etl/src/main/resources/bootstrap.yml b/muyu-modules/muyu-etl/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..6b4a84a
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/resources/bootstrap.yml
@@ -0,0 +1,28 @@
+# Tomcat
+server:
+ port: 9204
+
+# Spring
+spring:
+ application:
+ # 应用名称
+ name: muyu-etl
+ profiles:
+ # 环境配置
+ active: dev
+ cloud:
+ nacos:
+ discovery:
+ # 服务注册地址
+ server-addr: 43.142.44.217:8848
+ config:
+ # 配置中心地址
+ server-addr: 43.142.44.217:8848
+ # 配置文件格式
+ file-extension: yml
+ # 共享配置
+ shared-configs:
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+logging:
+ level:
+ com.muyu.system.mapper: DEBUG
diff --git a/muyu-modules/muyu-etl/src/main/resources/logback.xml b/muyu-modules/muyu-etl/src/main/resources/logback.xml
new file mode 100644
index 0000000..aa340cd
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/resources/logback.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+ ${log.pattern}
+
+
+
+
+
+ ${log.path}/info.log
+
+
+
+ ${log.path}/info.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+ ${log.pattern}
+
+
+
+ INFO
+
+ ACCEPT
+
+ DENY
+
+
+
+
+ ${log.path}/error.log
+
+
+
+ ${log.path}/error.%d{yyyy-MM-dd}.log
+
+ 60
+
+
+ ${log.pattern}
+
+
+
+ ERROR
+
+ ACCEPT
+
+ DENY
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/muyu-modules/muyu-etl/src/main/resources/mapper/system/DataSourceMapper.xml b/muyu-modules/muyu-etl/src/main/resources/mapper/system/DataSourceMapper.xml
new file mode 100644
index 0000000..2a88ad7
--- /dev/null
+++ b/muyu-modules/muyu-etl/src/main/resources/mapper/system/DataSourceMapper.xml
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select id, data_source_name, link_address, port, database_name, username, password, connection_param, init_num, max_num, max_wait_time, max_wait_size, create_by, create_time, update_by, update_time, remark, type, system_name from data_source
+
+
+
+
+
+
+
+ insert into data_source
+
+ data_source_name,
+ link_address,
+ port,
+ database_name,
+ username,
+ password,
+ connection_param,
+ init_num,
+ max_num,
+ max_wait_time,
+ max_wait_size,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+ remark,
+ type,
+ system_name,
+
+
+ #{dataSourceName},
+ #{linkAddress},
+ #{port},
+ #{databaseName},
+ #{username},
+ #{password},
+ #{connectionParam},
+ #{initNum},
+ #{maxNum},
+ #{maxWaitTime},
+ #{maxWaitSize},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+ #{remark},
+ #{type},
+ #{systemName},
+
+
+
+
+ update data_source
+
+ data_source_name = #{dataSourceName},
+ link_address = #{linkAddress},
+ port = #{port},
+ database_name = #{databaseName},
+ username = #{username},
+ password = #{password},
+ connection_param = #{connectionParam},
+ init_num = #{initNum},
+ max_num = #{maxNum},
+ max_wait_time = #{maxWaitTime},
+ max_wait_size = #{maxWaitSize},
+ create_by = #{createBy},
+ create_time = #{createTime},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+ remark = #{remark},
+ type = #{type},
+ system_name = #{systemName},
+
+ where id = #{id}
+
+
+
+ delete from data_source where id = #{id}
+
+
+
+ delete from data_source where id in
+
+ #{id}
+
+
+
\ No newline at end of file
diff --git a/muyu-modules/pom.xml b/muyu-modules/pom.xml
index 846198c..931eb34 100644
--- a/muyu-modules/pom.xml
+++ b/muyu-modules/pom.xml
@@ -13,6 +13,7 @@
muyu-gen
muyu-job
muyu-file
+ muyu-etl
muyu-modules