forked from github/dataease
refactor: 更新 X-Pack
This commit is contained in:
parent
1e8f5ec786
commit
66183622ff
@ -70,7 +70,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static io.dataease.datasource.server.DatasourceTaskServer.ScheduleType.MANUAL;
|
||||
import static io.dataease.datasource.server.DatasourceTaskServer.ScheduleType.RIGHTNOW;
|
||||
import static io.dataease.result.ResultCode.DS_RESOURCE_UNCHECKED;
|
||||
|
||||
|
||||
@RestController
|
||||
@ -530,7 +529,7 @@ public class DatasourceServer implements DatasourceApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DatasourceDTO> innerList(List<Long> ids) throws DEException {
|
||||
public List<DatasourceDTO> innerList(List<Long> ids, List<String> types) throws DEException {
|
||||
List<DatasourceDTO> list = new ArrayList<>();
|
||||
LambdaQueryWrapper<CoreDatasource> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (ids != null) {
|
||||
@ -540,9 +539,20 @@ public class DatasourceServer implements DatasourceApi {
|
||||
queryWrapper.in(CoreDatasource::getId, ids);
|
||||
}
|
||||
}
|
||||
if (types != null) {
|
||||
if (types.isEmpty()) {
|
||||
return list;
|
||||
} else {
|
||||
queryWrapper.in(CoreDatasource::getType, types);
|
||||
}
|
||||
}
|
||||
List<CoreDatasource> dsList = datasourceMapper.selectList(queryWrapper);
|
||||
for (CoreDatasource datasource : dsList) {
|
||||
list.add(convertCoreDatasource(datasource.getId(), false, datasource));
|
||||
try {
|
||||
list.add(convertCoreDatasource(datasource.getId(), false, datasource));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit ecc332d1abc22b822956380277990708ef8457b3
|
||||
Subproject commit 9a7b3488f9e8dee6ea156cbdf34f789dda011f7d
|
@ -2,7 +2,9 @@ package io.dataease.api.ds;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.ds.vo.*;
|
||||
import io.dataease.api.ds.vo.ApiDefinition;
|
||||
import io.dataease.api.ds.vo.CoreDatasourceTaskLogDTO;
|
||||
import io.dataease.api.ds.vo.ExcelFileData;
|
||||
import io.dataease.auth.DeApiPath;
|
||||
import io.dataease.auth.DePermit;
|
||||
import io.dataease.exception.DEException;
|
||||
@ -79,7 +81,8 @@ public interface DatasourceApi {
|
||||
DatasourceDTO get(@PathVariable("datasourceId") Long datasourceId) throws DEException;
|
||||
|
||||
DatasourceDTO innerGet(Long datasourceId) throws DEException;
|
||||
List<DatasourceDTO> innerList(List<Long> ids) throws DEException;
|
||||
|
||||
List<DatasourceDTO> innerList(List<Long> ids, List<String> types) throws DEException;
|
||||
|
||||
@DePermit({"#p0+':read'"})
|
||||
@GetMapping("/hidePw/{datasourceId}")
|
||||
|
Loading…
Reference in New Issue
Block a user