修复了修改task项的bug

master
yang.yongquan 2022-07-12 18:27:30 +08:00
parent 056a5ee8f7
commit f9ab646e23
1 changed files with 3 additions and 0 deletions

View File

@ -345,6 +345,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
if (typeChangeValue == 2) {
closed = closeTaskAndSubTask(token, task.getTaskProjectId(), task.getTaskId());
}
if (Objects.equals(rawTask, task)) {
return task;
}
if (!closed && baseMapper.update(task, Wrappers.<Task>lambdaQuery().eq(Task::getTaskId, task.getTaskId())) == 0) {
throw new BadRequestException(BadRequestException.OPERATE_FAILED);
}