向TaskList插入数据时开启事务

This commit is contained in:
2024-03-26 17:23:40 +08:00
parent d411b428f8
commit 4bf4dc2588

View File

@@ -66,6 +66,7 @@ public class SuperResolutionServiceImpl extends ServiceImpl<TaskListMapper, Task
private String endpoint;
@Override
@Transactional(rollbackFor = Exception.class)
public List<String> prepareForSR(List<SuperResolutionDTO> superResolutionDTOList) {
Long accountId = UserContext.getUserHolder().getId();
@@ -162,6 +163,7 @@ public class SuperResolutionServiceImpl extends ServiceImpl<TaskListMapper, Task
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateSROutput(String taskId, String status, String output) {
UpdateWrapper<TaskList> uw = new UpdateWrapper<>();
uw.eq("task_id", taskId);