diff --git a/cloud-property-common/src/main/java/com/muyu/common/domain/TableNames.java b/cloud-property-common/src/main/java/com/muyu/common/domain/TableNames.java index 0fac498..56ce56e 100644 --- a/cloud-property-common/src/main/java/com/muyu/common/domain/TableNames.java +++ b/cloud-property-common/src/main/java/com/muyu/common/domain/TableNames.java @@ -37,4 +37,8 @@ public class TableNames { */ private Integer dataId; + public TableNames(String name, Integer dataId) { + this.name = name; + this.dataId = dataId; + } } diff --git a/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java b/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java index 45bd465..c320004 100644 --- a/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java +++ b/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java @@ -41,11 +41,10 @@ public class TableRunNameServiceImpl // 在这里执行你的数据库操作 PreparedStatement preparedStatement = conn.prepareStatement(sql); ResultSet rs = preparedStatement.executeQuery(); - TableNames tableNames = new TableNames(); ArrayList list = new ArrayList<>(); while (rs.next()) { String tables = rs.getString("Tables_in_core_data_warehouse"); - list.add(new TableNames(0,tables,0)); + list.add(new TableNames(tables,0)); } JdbcHelper.close(conn,preparedStatement,rs);