提交 812cbe3a authored 作者: Matrix's avatar Matrix

[核查模块] task修正

上级 054fd154
...@@ -317,15 +317,15 @@ public class TaskServiceImpl implements TaskService { ...@@ -317,15 +317,15 @@ public class TaskServiceImpl implements TaskService {
@ExceptionHandler(Exception.class) @ExceptionHandler(Exception.class)
@Log @Log
public TaskBto start(TaskBto taskBto) { public TaskBto start(TaskBto taskBto) {
Task task = taskDao.saveAndFlush(taskBto.toDo()); Task task = taskDao.save(taskBto.toDo());
myWebSocket.sendMessage1(); myWebSocket.sendMessage1();
Task task1 = taskDao.findById(task.getId()).get();
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
try { try {
Thread.sleep(2000); Thread.sleep(2000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
Task task1 = taskDao.findById(task.getId()).get();
BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(task1)); BcHash bcText = blockChainUtil.sendHash(1000, JacksonUtil.toJSon(task1));
String recordId = bcText.getData().getRecordID(); String recordId = bcText.getData().getRecordID();
task1.setRecordId(recordId); task1.setRecordId(recordId);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论