fix: 数据资产详细信息,数据结构完成
parent
15484a31a5
commit
28d6400be9
|
@ -2,14 +2,12 @@ package com.muyu.etl.domain;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
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.TreeEntity;
|
||||
|
||||
/**
|
||||
* 库表基础信息对象 table_info
|
||||
|
@ -50,4 +48,7 @@ public class TableInfo extends TreeEntity
|
|||
private String center;
|
||||
|
||||
|
||||
private Long parentId;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public class TableInfoStructureResp
|
|||
/** 表备注 */
|
||||
@Excel(name = "表备注")
|
||||
private String tableRemark;
|
||||
private Long parentId;
|
||||
|
||||
/** 数据量 */
|
||||
@Excel(name = "数据量")
|
||||
|
|
|
@ -133,7 +133,7 @@ public class BasicConfigInfoServiceImpl extends ServiceImpl<BasicConfigInfoMapp
|
|||
System.out.println("Connected to the MySQL server successfully.");
|
||||
//同步数据库信息
|
||||
//树级结构,库,表
|
||||
TableInfo tableInfo = new TableInfo().builder()
|
||||
TableInfo tableInfo = TableInfo.builder()
|
||||
.basicId(basicConfigInfo.getId())
|
||||
.parentId(0L)
|
||||
.tableRemark("")
|
||||
|
@ -154,14 +154,14 @@ public class BasicConfigInfoServiceImpl extends ServiceImpl<BasicConfigInfoMapp
|
|||
String tableName1 = rs.getString("TABLE_NAME");
|
||||
String tableRemark = rs.getString("REMARKS");
|
||||
Connection finalConn = conn;
|
||||
PreparedStatement ps = conn.prepareStatement("select * from " + tableName1);
|
||||
PreparedStatement ps = conn.prepareStatement("select* from " + tableName1);
|
||||
ResultSet rset = ps.executeQuery();
|
||||
Long rowCount = 0L;
|
||||
while(rset.next()) {rowCount++;}
|
||||
TableInfo build = TableInfo.builder()
|
||||
.basicId(basicConfigInfo.getId())
|
||||
.tableName(tableName1)
|
||||
.tableRemark(tableRemark.isEmpty()? "":tableRemark)
|
||||
.tableRemark(tableRemark.isEmpty()? "null":tableRemark)
|
||||
.parentId(tableInfo.getId())
|
||||
.center("Y")
|
||||
.updateBy(SecurityUtils.getUsername())
|
||||
|
@ -318,6 +318,7 @@ public class BasicConfigInfoServiceImpl extends ServiceImpl<BasicConfigInfoMapp
|
|||
.center(info.getCenter())
|
||||
.tableRemark(info.getTableRemark())
|
||||
.dataNum(info.getDataNum())
|
||||
.parentId(info.getParentId())
|
||||
.databaseType(basicConfigInfo.getDatabaseType())
|
||||
.structureList(structureList)
|
||||
.basicId(info.getBasicId())
|
||||
|
|
Loading…
Reference in New Issue