09051901:对这个资产展示使用线程池的方法去做,第三次优化代码

master
冷调 2024-09-05 19:06:16 +08:00
parent 08453fdbd2
commit 190ed47dac
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
while (resultSet.next()) { while (resultSet.next()) {
for (int i = 1; i <= columnCount; i++) { for (int i = 1; i <= columnCount; i++) {
final int index = i; final int index = i;
futures.add(threadPool.submit(() -> { futures.add(executorService.submit(() -> {
String columnTypeName = metaData.getColumnTypeName(index); String columnTypeName = metaData.getColumnTypeName(index);
return DataValue.builder() return DataValue.builder()
.key(metaData.getColumnName(index)) .key(metaData.getColumnName(index))