From 7ae69e8a4827d8e499e76ef4bb86f03378586e92 Mon Sep 17 00:00:00 2001
From: ruyaxie <648179520@qq.comgit>
Date: Fri, 23 Aug 2024 20:14:09 +0800
Subject: [PATCH] =?UTF-8?q?fix():=E5=88=9D=E5=A7=8B=E5=8C=96cloud-etl-comm?=
=?UTF-8?q?on?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 6 -
.../java/com/muyu/etl/domain/DataSource.java | 117 -----------------
.../java/com/muyu/etl/domain/EtlData.java | 70 ----------
.../muyu/etl/domain/req/DataSourceAddReq.java | 68 ----------
.../muyu/etl/domain/req/DataSourceReq.java | 51 --------
.../muyu/etl/domain/req/DataSourceUpdReq.java | 64 ----------
.../muyu/etl/domain/resp/DataSourceResp.java | 120 ------------------
7 files changed, 496 deletions(-)
delete mode 100644 src/main/java/com/muyu/etl/domain/DataSource.java
delete mode 100644 src/main/java/com/muyu/etl/domain/EtlData.java
delete mode 100644 src/main/java/com/muyu/etl/domain/req/DataSourceAddReq.java
delete mode 100644 src/main/java/com/muyu/etl/domain/req/DataSourceReq.java
delete mode 100644 src/main/java/com/muyu/etl/domain/req/DataSourceUpdReq.java
delete mode 100644 src/main/java/com/muyu/etl/domain/resp/DataSourceResp.java
diff --git a/pom.xml b/pom.xml
index cd95042..7dd74e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,12 +28,6 @@
com.muyu
cloud-common-api-doc
-
-
- mysql
- mysql-connector-java
- 8.0.23
-
diff --git a/src/main/java/com/muyu/etl/domain/DataSource.java b/src/main/java/com/muyu/etl/domain/DataSource.java
deleted file mode 100644
index f5eb501..0000000
--- a/src/main/java/com/muyu/etl/domain/DataSource.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.muyu.etl.domain;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.muyu.common.core.web.domain.BaseEntity;
-import com.muyu.etl.domain.req.DataSourceAddReq;
-import com.muyu.etl.domain.req.DataSourceUpdReq;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-/**
- * @version 1.0
- * @Author xie ya ru
- * @Date 2024/8/19 19:04
- * @注释
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@SuperBuilder
-@EqualsAndHashCode(callSuper = true)
-@TableName(value = "order_pay_customer",autoResultMap = true)
-public class DataSource extends BaseEntity {
- /**
- * 主键
- */
- @TableId(value = "id",type = IdType.AUTO)
- private Long dataSourceId;
- /**
- *数据源类型 mysql
- */
- private String databaseType;
- /**
- *数据源名称 127.0.0.1
- */
- private String databaseFormName;
- /**
- *数据来源地址 jdbc:mysql://localhost:3306/dbname?useUnicode=true&serverTimezone=Asia/Shanghai
- */
- private String databaseUrl;
- /**
- *来源地址端口号 3306
- */
- private String databasePost;
- /**
- *数据库名称 cloud-server
- */
- private String databaseName;
- /**
- * 表名称
- */
- private String tableName;
- /**
- *数据库登录名 root
- */
- private String userName;
- /**
- *数据库登录密码 123
- */
- private String userPwd;
-
- /**
- *数据源状态(1启用,2禁用)
- */
- private String status;
-
- public static DataSource addBuild(DataSourceAddReq req){
- return DataSource.builder()
- .databaseFormName(req.getDatabaseFormName())
- .databaseType(req.getDatabaseType())
- .databaseUrl(req.getDatabaseUrl())
- .databasePost(req.getDatabasePost())
- .databaseName(req.getDatabaseName())
- .userName(req.getUserName())
- .userPwd(req.getUserPwd())
- .build();
- }
-
-
- public static DataSource updBuild(Long dataSourceId, DataSourceUpdReq req){
- return DataSource.builder()
- .dataSourceId(dataSourceId)
- .databaseFormName(req.getDatabaseFormName())
- .databaseType(req.getDatabaseType())
- .databaseUrl(req.getDatabaseUrl())
- .databasePost(req.getDatabasePost())
- .databaseName(req.getDatabaseName())
- .userName(req.getUserName())
- .userPwd(req.getUserPwd())
- .build();
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
diff --git a/src/main/java/com/muyu/etl/domain/EtlData.java b/src/main/java/com/muyu/etl/domain/EtlData.java
deleted file mode 100644
index 3a01178..0000000
--- a/src/main/java/com/muyu/etl/domain/EtlData.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.muyu.etl.domain;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * @version 1.0
- * @Author xie ya ru
- * @Date 2024/8/22 17:03
- * @注释
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-public class EtlData {
- /**
- * 字段名称 cloud_id
- */
- private String columnName;
- /**
- * 字段值 1
- */
- private String columnValue;
- /**
- * 字段类型 Long
- */
- private String columnType;
- /**
- * 字段默认长度 19
- */
- private Integer columnSize;
- /**
- * 字段是否为空 ture false
- */
- private Boolean isNullable;
- /**
- * 字段默认值 1
- */
- private String defaultValue;
- /**
- * 字段描述 主键
- */
- private String remarks;
- /**
- * 小数位数 2
- */
- private Integer decimalDigits;
- /**
- * 行号
- */
- private String row;
-
- public static EtlData setEtlData(String columnName,String columnValue,String columnType,Integer columnSize,Boolean isNullable,String defaultValue,String remarks,Integer decimalDigits,String row) {
- return EtlData.builder()
- .columnName(columnName)
- .columnValue(columnValue)
- .columnType(columnType)
- .columnSize(columnSize)
- .isNullable(isNullable)
- .defaultValue(defaultValue)
- .remarks(remarks)
- .decimalDigits(decimalDigits)
- .row(row)
- .build();
- }
-
-}
diff --git a/src/main/java/com/muyu/etl/domain/req/DataSourceAddReq.java b/src/main/java/com/muyu/etl/domain/req/DataSourceAddReq.java
deleted file mode 100644
index 3d06dca..0000000
--- a/src/main/java/com/muyu/etl/domain/req/DataSourceAddReq.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.muyu.etl.domain.req;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.validation.constraints.NotEmpty;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-/**
- * @version 1.0
- * @Author xie ya ru
- * @Date 2024/8/19 19:14
- * @注释
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Tag(name = "添加数据源信息" ,description = "数据源详细信息的添加")
-public class DataSourceAddReq {
- /**
- * 数据源类型
- */
- @NotEmpty(message = "数据来源不可为空")
- @Schema(type = "String",defaultValue = "MySQL",description = "数据信息来源的信息名称",requiredProperties = "true")
- private String databaseType;
- /**
- * 数据源名称
- */
- @NotEmpty(message = "数据源名称不可为空")
- @Schema(type = "String",defaultValue = "cloud-app",description = "数据源的来源的名称",requiredProperties = "true")
- private String databaseFormName;
- /**
- * 数据来源地址
- */
- @NotEmpty(message = "数据来源地址不可为空")
- @Schema(type = "String",defaultValue = "127.0.0.1",description = "数据来源地址",requiredProperties = "true")
- private String databaseUrl;
- /**
- * 来源地址端口号
- */
- @Schema(type = "String",defaultValue = "3306",description = "来源地址端口号")
- private String databasePost;
- /**
- * 数据库名称
- */
- @Schema(type = "String",defaultValue = "cloud-server",description = "数据库名称")
- private String databaseName;
- /**
- * 表名称
- */
- @Schema(type = "String",defaultValue = "t_student",description = "表名称")
- private String tableName;
- /**
- * 数据库登录名
- */
- @Schema(type = "String",defaultValue = "root",description = "数据库登录名")
- private String userName;
- /**
- * 数据库登录密码
- */
- @Schema(type = "String",defaultValue = "wuzuxiaoniu@123.",description = "数据库登录密码")
- private String userPwd;
-
-}
diff --git a/src/main/java/com/muyu/etl/domain/req/DataSourceReq.java b/src/main/java/com/muyu/etl/domain/req/DataSourceReq.java
deleted file mode 100644
index ad04525..0000000
--- a/src/main/java/com/muyu/etl/domain/req/DataSourceReq.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.muyu.etl.domain.req;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-/**
- * @version 1.0
- * @Author xie ya ru
- * @Date 2024/8/19 19:14
- * @注释
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Tag(name = "添加数据源信息" ,description = "数据源详细信息的添加")
-public class DataSourceReq {
- /**
- * 数据源类型
- */
- @Schema(type = "String",defaultValue = "MySQL",description = "数据信息来源的信息名称")
- private String databaseType;
- /**
- * 数据源名称
- */
- @Schema(type = "String",defaultValue = "cloud-app",description = "数据源的来源的名称")
- private String databaseFormName;
- /**
- * 数据库名称
- */
- @Schema(type = "String",defaultValue = "cloud-server",description = "数据库名称")
- private String databaseName;
-
- /**
- * 表名称
- */
- @Schema(type = "String",defaultValue = "t_student",description = "表名称")
- private String tableName;
- /**
- *数据源状态(1启用,2禁用)
- */
- @Schema(type = "Integer",defaultValue = "1",description = "数据源状态(1启用,2禁用)")
- private String status;
-
-
-}
diff --git a/src/main/java/com/muyu/etl/domain/req/DataSourceUpdReq.java b/src/main/java/com/muyu/etl/domain/req/DataSourceUpdReq.java
deleted file mode 100644
index 9a0f968..0000000
--- a/src/main/java/com/muyu/etl/domain/req/DataSourceUpdReq.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.muyu.etl.domain.req;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-/**
- * @version 1.0
- * @Author xie ya ru
- * @Date 2024/8/19 19:14
- * @注释
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Tag(name = "修改数据源信息" ,description = "数据源详细信息的部分修改")
-public class DataSourceUpdReq {
- /**
- * 数据源类型
- */
- @Schema(type = "String",defaultValue = "MySQL",description = "数据信息来源的信息名称")
- private String databaseType;
- /**
- * 数据源名称
- */
- @Schema(type = "String",defaultValue = "cloud-app",description = "数据源的来源的名称")
- private String databaseFormName;
- /**
- * 数据来源地址
- */
- @Schema(type = "String",defaultValue = "127.0.0.1",description = "数据来源地址")
- private String databaseUrl;
- /**
- * 来源地址端口号
- */
- @Schema(type = "String",defaultValue = "3306",description = "来源地址端口号")
- private String databasePost;
- /**
- * 数据库名称
- */
- @Schema(type = "String",defaultValue = "cloud-server",description = "数据库名称")
- private String databaseName;
- /**
- * 表名称
- */
- @Schema(type = "String",defaultValue = "t_student",description = "表名称")
- private String tableName;
- /**
- * 数据库登录名
- */
- @Schema(type = "String",defaultValue = "root",description = "数据库登录名")
- private String userName;
- /**
- * 数据库登录密码
- */
- @Schema(type = "String",defaultValue = "wuzuxiaoniu@123.",description = "数据库登录密码")
- private String userPwd;
-
-}
diff --git a/src/main/java/com/muyu/etl/domain/resp/DataSourceResp.java b/src/main/java/com/muyu/etl/domain/resp/DataSourceResp.java
deleted file mode 100644
index d2078fd..0000000
--- a/src/main/java/com/muyu/etl/domain/resp/DataSourceResp.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package com.muyu.etl.domain.resp;
-
-import com.muyu.etl.domain.DataSource;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.SuperBuilder;
-
-/**
- * @version 1.0
- * @Author xie ya ru
- * @Date 2024/8/19 19:12
- * @注释
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Tag(name = "数据源输出信息",description = "查询数据源信息需要输出的字段")
-public class DataSourceResp {
- /**
- * 主键
- */
- @Schema(type = "String",defaultValue = "1",description = "数据源主键")
- private Long dataSourceId; /**
- * 数据源类型
- */
- @Schema(type = "String",defaultValue = "MySQL",description = "数据信息来源的信息名称")
- private String databaseType;
- /**
- * 数据源名称
- */
- @Schema(type = "String",defaultValue = "cloud-app",description = "数据源的来源的名称")
- private String databaseFormName;
- /**
- * 数据来源地址
- */
- @Schema(type = "String",defaultValue = "127.0.0.1",description = "数据来源地址")
- private String databaseUrl;
- /**
- * 来源地址端口号
- */
- @Schema(type = "String",defaultValue = "3306",description = "来源地址端口号")
- private String databasePost;
- /**
- * 数据库名称
- */
- @Schema(type = "String",defaultValue = "cloud-server",description = "数据库名称")
- private String databaseName;
- /**
- * 数据库登录名
- */
- @Schema(type = "String",defaultValue = "root",description = "数据库登录名")
- private String userName;
- /**
- * 数据库登录密码
- */
- @Schema(type = "String",defaultValue = "wuzuxiaoniu@123.",description = "数据库登录密码")
- private String userPwd;
- /**
- * 数据源状态(1启用,2禁用)
- */
- @Schema(type = "String",defaultValue = "1",description = "数据源状态")
- private String status;
-
-
- public static DataSourceResp dataSourceRespBuild(DataSource dataSource){
- return DataSourceResp.builder()
- .dataSourceId(dataSource.getDataSourceId())
- .databaseName(dataSource.getDatabaseName())
- .databaseType(dataSource.getDatabaseType())
- .databaseFormName(dataSource.getDatabaseFormName())
- .databaseUrl(dataSource.getDatabaseUrl())
- .databasePost(dataSource.getDatabasePost())
- .databaseName(dataSource.getDatabaseName())
- .userName(dataSource.getUserName())
- .userPwd(dataSource.getUserPwd())
- .status(dataSource.getStatus())
- .build();
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}