09061033:对这个资产展示使用线程池的方法去做,第六次优化代码
parent
c431f36d19
commit
b911e8edeb
|
@ -58,8 +58,6 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DataSourceService dataSourceService;
|
private DataSourceService dataSourceService;
|
||||||
@Autowired
|
|
||||||
private DataValueService dataValueService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<List<DataValue>> findTableValue(DataValueModel dataValueModel) {
|
public List<List<DataValue>> findTableValue(DataValueModel dataValueModel) {
|
||||||
|
@ -256,7 +254,7 @@ public class DataValueServiceImpl extends ServiceImpl<DataValueMapper, DataValue
|
||||||
return CompletableFuture.runAsync(() -> {
|
return CompletableFuture.runAsync(() -> {
|
||||||
try {
|
try {
|
||||||
// 具体的批量处理逻辑,例如写入文件、更新数据库等
|
// 具体的批量处理逻辑,例如写入文件、更新数据库等
|
||||||
dataValueService.saveBatch(batch);
|
this.saveBatch(batch);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 异步处理中的异常处理
|
// 异步处理中的异常处理
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
Loading…
Reference in New Issue