09052219:对这个资产展示使用线程池的方法去做,第五次优化代码
parent
0407897407
commit
8761dfc3d6
|
@ -32,6 +32,7 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DataSourceService dataSourceService;
|
private DataSourceService dataSourceService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DataValue> findTableValue(DataValueModel dataValueModel) {
|
public List<DataValue> findTableValue(DataValueModel dataValueModel) {
|
||||||
List<DataValue> dataValueList = new ArrayList<>();
|
List<DataValue> dataValueList = new ArrayList<>();
|
||||||
|
@ -85,7 +86,7 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
PreparedStatement preparedStatement = conn.prepareStatement(SELECTALL+tableName+"limit 1000");
|
PreparedStatement preparedStatement = conn.prepareStatement(SELECTALL+tableName+"limit 200");
|
||||||
|
|
||||||
ResultSet resultSet = preparedStatement.executeQuery();
|
ResultSet resultSet = preparedStatement.executeQuery();
|
||||||
ResultSetMetaData metaData = resultSet.getMetaData();
|
ResultSetMetaData metaData = resultSet.getMetaData();
|
||||||
|
@ -134,6 +135,9 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue