fix(血缘关-数据源列表): 数据源列表按照类型和名称升序排序

This commit is contained in:
wisonic-s 2023-01-12 10:56:26 +08:00
parent 2abcc45027
commit 1df6e4b3e2
2 changed files with 3 additions and 5 deletions

View File

@ -124,7 +124,7 @@
and configuration = #{configuration,jdbcType=LONGVARCHAR}
</if>
</where>
<if test="sort == null">
<if test="sort != null">
order by ${sort}
</if>
</select>

View File

@ -158,11 +158,9 @@ public class DatasourceService {
}
public List<DatasourceDTO> getDatasourceList(DatasourceUnionRequest request) throws Exception {
request.setSort("update_time desc");
request.setSort("type,name");
List<DatasourceDTO> datasourceDTOS = extDataSourceMapper.queryUnion(request);
datasourceDTOS.forEach(datasourceDTO -> {
datasourceTrans(datasourceDTO);
});
datasourceDTOS.forEach(this::datasourceTrans);
return datasourceDTOS;
}