File tree Expand file tree Collapse file tree
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8484 select
8585 <include refid =" baseSqlV2" >
8686 <property name =" alias" value =" p" />
87- </include >
88- ,
87+ </include > ,
8988 u.user_name as user_name,
90- (SELECT COUNT(*) FROM t_ds_process_definition AS def WHERE def.project_code = p.code) AS def_count,
91- (SELECT COUNT(*) FROM t_ds_process_definition_log def, t_ds_process_instance inst WHERE def.code =
92- inst.process_definition_code and def.version = inst.process_definition_version AND def.project_code = p.code
93- AND inst.state=1 ) as inst_running_count
89+ count(distinct def.id) AS def_count,
90+ count(distinct inst.id) as inst_running_count
9491 from t_ds_project p
9592 left join t_ds_user u on u.id=p.user_id
93+ left join t_ds_process_definition def
94+ on def.project_code = p.code
95+ left join t_ds_process_instance inst
96+ on inst.process_definition_code = def.code
97+ and inst.process_definition_version = def.version
98+ and inst.state = 1
9699 where 1=1
97100 <if test =" projectsIds != null and projectsIds.size() > 0" >
98101 and p.id in
105108 OR p.description LIKE concat('%', #{searchName}, '%')
106109 )
107110 </if >
108- order by p.create_time desc
111+ group by p.id
112+ order by p.id desc
109113 </select >
110114 <select id =" queryAuthedProjectListByUserId" resultType =" org.apache.dolphinscheduler.dao.entity.Project" >
111115 select
You can’t perform that action at this time.
0 commit comments