fuchanghai commented on code in PR #15452:
URL:
https://github.com/apache/dolphinscheduler/pull/15452#discussion_r1457028767
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java:
##########
@@ -855,4 +862,11 @@ public List<Long> getAuthorizedProjectCodes(User
loginUser) {
.map(Project::getCode)
.collect(Collectors.toList());
}
+
+ private void setRunningProcessInstanceNumber(List<Project> projectList) {
+ List<Long> projectsCodes =
projectList.stream().map(Project::getCode).collect(Collectors.toList());
+ List<ProjectInstanceRunningDTO> projectInstanceRunningDTOList =
projectMapper.queryRunningProcessInstanceNumber(projectsCodes);
Review Comment:
hi @chen877511127 i suggest that call method of
queryRunningProcessInstanceNumber when ```projectsCodes.size()>0```,
Otherwise, the SQL statement of the queryRunningProcessInstanceNumber method
will not trigger the ```<if test="projectsCodes != null and
projectsCodes.size() > 0"> ```, and all project information will be queried.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]