同步资产结构
parent
b829bb2b5c
commit
a4dc422c08
|
@ -233,7 +233,7 @@ public class DataSourceServiceImpl extends ServiceImpl<DataSourceMapper, DataSou
|
||||||
//遍历获取到的表结构集合
|
//遍历获取到的表结构集合
|
||||||
childrenList.forEach(children -> {
|
childrenList.forEach(children -> {
|
||||||
//查询指定数据库中指定表的记录数
|
//查询指定数据库中指定表的记录数
|
||||||
String sql1 = "select count(*) as tableNum from " + dataSource.getDatabaseName() + "." + children.getName();
|
String sql1 = "SELECT COUNT(*) AS tableNum FROM " + "`" + dataSource.getDatabaseName() + "`" + "." + "`" + children.getName() + "`";
|
||||||
try {
|
try {
|
||||||
//执行给定的sql语句
|
//执行给定的sql语句
|
||||||
ResultSet resultSet = statement.executeQuery(sql1);
|
ResultSet resultSet = statement.executeQuery(sql1);
|
||||||
|
|
Loading…
Reference in New Issue