Merge pull request #12692 from ulleo/dev-v2

fix(X-Pack): 修复使用内建数据库的数据填报不能正常获取数据源连接的问题
This commit is contained in:
ulleo 2024-10-14 16:24:32 +08:00 committed by GitHub
commit 9204372e2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 1 deletions

View File

@ -488,6 +488,15 @@ public class DatasourceServer implements DatasourceApi {
return getDatasourceDTOById(datasourceId, false); return getDatasourceDTOById(datasourceId, false);
} }
@Override
public String getName(Long datasourceId) throws DEException {
CoreDatasource datasource = datasourceMapper.selectById(datasourceId);
if (datasource == null) {
DEException.throwException("不存在的数据源!");
}
return datasource.getName();
}
@Override @Override
public List<DatasourceDTO> innerList(List<Long> ids, List<String> types) throws DEException { public List<DatasourceDTO> innerList(List<Long> ids, List<String> types) throws DEException {
List<DatasourceDTO> list = new ArrayList<>(); List<DatasourceDTO> list = new ArrayList<>();

@ -1 +1 @@
Subproject commit 0f366f1a1d66d5a7f24d12dc0c07669b26234627 Subproject commit 9e045fdd0b33b058a15ac44affbeb2c1eb12552a

View File

@ -150,6 +150,8 @@ public interface DatasourceApi {
DatasourceDTO innerGet(Long datasourceId) throws DEException; DatasourceDTO innerGet(Long datasourceId) throws DEException;
String getName(Long datasourceId) throws DEException;
List<DatasourceDTO> innerList(List<Long> ids, List<String> types) throws DEException; List<DatasourceDTO> innerList(List<Long> ids, List<String> types) throws DEException;
} }

View File

@ -47,6 +47,8 @@ public class DataFillingDTO implements Serializable {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long datasource; private Long datasource;
private String datasourceName;
/** /**
* 表单内容 * 表单内容
*/ */