Browse Source

[Improvement][ApiServer]Task defination list paging sorted by updateTime not effect (#12622)

3.2.0-release
xuhhui 2 years ago committed by GitHub
parent
commit
0db1bb6ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java

5
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java

@ -1107,9 +1107,12 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe
return v; return v;
}); });
} }
// because taskMainInfoMap's value is TaskMainInfo, // because taskMainInfoMap's value is TaskMainInfo,
// TaskMainInfo have task code info, so only need gain taskMainInfoMap's values // TaskMainInfo have task code info, so only need gain taskMainInfoMap's values
taskMainInfoIPage.setRecords(Lists.newArrayList(taskMainInfoMap.values())); List<TaskMainInfo> resultRecords = Lists.newArrayList(taskMainInfoMap.values());
resultRecords.sort((o1, o2) -> o2.getTaskUpdateTime().compareTo(o1.getTaskUpdateTime()));
taskMainInfoIPage.setRecords(resultRecords);
} }
} }

Loading…
Cancel
Save