fix(数据源): API 数据源支持选择及组合多层级中的字段

This commit is contained in:
taojinlong 2022-07-20 18:05:31 +08:00
parent 77de17121b
commit 7426106c7c

View File

@ -263,7 +263,7 @@ public class ApiProvider extends Provider {
o.put("extField", 0);
o.put("checked", false);
for (DatasetTableFieldDTO fieldDTO : apiDefinition.getFields()) {
if (fieldDTO.getJsonPath().equals(o.getString("jsonPath"))) {
if (StringUtils.isNotEmpty(o.getString("jsonPath")) && StringUtils.isNotEmpty(fieldDTO.getJsonPath()) && fieldDTO.getJsonPath().equals(o.getString("jsonPath"))) {
o.put("checked", true);
o.put("deExtractType", fieldDTO.getDeExtractType());
o.put("name", fieldDTO.getName());