From 95add368e5a1a1a829362c86c146fa09f893a5b6 Mon Sep 17 00:00:00 2001 From: lwj <3529558005@qq.com> Date: Sat, 24 Aug 2024 20:00:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=92=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/muyu/domain/Structure.java | 2 ++ .../com/muyu/cloud/etl/service/impl/SourceServiceImpl.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cloud-etl-common/src/main/java/com/muyu/domain/Structure.java b/cloud-etl-common/src/main/java/com/muyu/domain/Structure.java index 65aefd7..d20cc4e 100644 --- a/cloud-etl-common/src/main/java/com/muyu/domain/Structure.java +++ b/cloud-etl-common/src/main/java/com/muyu/domain/Structure.java @@ -2,6 +2,7 @@ package com.muyu.domain; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import com.muyu.common.core.annotation.Excel; import com.muyu.common.core.web.domain.BaseEntity; import lombok.AllArgsConstructor; @@ -19,6 +20,7 @@ import lombok.experimental.SuperBuilder; @NoArgsConstructor @AllArgsConstructor @SuperBuilder +@TableName(value ="structure",autoResultMap = true) //数据库表相关 public class Structure extends BaseEntity { private static final long serialVersionUID = 1L; diff --git a/cloud-etl-server/src/main/java/com/muyu/cloud/etl/service/impl/SourceServiceImpl.java b/cloud-etl-server/src/main/java/com/muyu/cloud/etl/service/impl/SourceServiceImpl.java index 084d703..b26255e 100644 --- a/cloud-etl-server/src/main/java/com/muyu/cloud/etl/service/impl/SourceServiceImpl.java +++ b/cloud-etl-server/src/main/java/com/muyu/cloud/etl/service/impl/SourceServiceImpl.java @@ -144,6 +144,7 @@ public class SourceServiceImpl extends ServiceImpl impleme eq(TableInfo::getBasicId, source.getId()); }}); + TableInfo tableInfo = tableInfoService.selectTableInfoByName(tableInfoInsert); @@ -182,6 +183,7 @@ public class SourceServiceImpl extends ServiceImpl impleme eq(TableInfo::getBasicId, source.getId()); }}); + TableInfo table = tableInfoService.selectTableInfoByName(build); //线程池 @@ -259,6 +261,7 @@ public class SourceServiceImpl extends ServiceImpl impleme .isNull("YES".equals(isNullable) ? "Y" : "N") .defaultValue(columnDefault) .build(); + threadPool.submit(() -> { structureService.saveOrUpdate(build, new LambdaUpdateWrapper() {{ eq(Structure::getTableId, build.getTableId()); @@ -266,6 +269,7 @@ public class SourceServiceImpl extends ServiceImpl impleme eq(Structure::getColumnRemark, build.getColumnRemark()); }}); }); + } threadPool.shutdown(); ps.close(); @@ -274,5 +278,4 @@ public class SourceServiceImpl extends ServiceImpl impleme - }