fix: 新增本地任务刷新功能
Some checks failed
ci / build (push) Failing after 4s

This commit is contained in:
han0
2025-10-21 16:36:56 +08:00
parent 09ee62df79
commit c1ff99355a
2 changed files with 9 additions and 0 deletions

View File

@@ -93,6 +93,8 @@ public class MaterialTaskController {
if (resp.getMeta().getCode() != 200) { if (resp.getMeta().getCode() != 200) {
return resp; return resp;
} }
} else {
materialTaskService.refresh(result);
} }
return FuHttpResponse.Builder().dataResponse().build(); return FuHttpResponse.Builder().dataResponse().build();

View File

@@ -69,6 +69,13 @@ public class MaterialTaskService extends ServiceImpl<BaseMapper<MaterialTask>, M
return result; return result;
} }
public void refresh(MaterialTask data) throws Exception {
this.importData(data);
data.setStatus(MaterialTaskStatus.DONE);
super.updateById(data);
}
private boolean importData(MaterialTask data) throws Exception { private boolean importData(MaterialTask data) throws Exception {
System.out.println("MaterialTaskService.importData | 导入数据 | task_id: " + data.getId()); System.out.println("MaterialTaskService.importData | 导入数据 | task_id: " + data.getId());
// 获取文件 // 获取文件