Skip to content

Commit

Permalink
fix(场景联动): 修复场景联动触发条件,当选择为事件时,json参数为enum,没有enum枚举选项问题 (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
fighter-wang authored May 6, 2024
1 parent 884d7ea commit ff0f7dd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ private List<TermColumn> createTermColumn(String prefix, PropertyMetadata proper
TermColumn term = createTermColumn(_prefix, prop, false, valueTypes).get(0);
column.setColumn(term.getColumn());
column.setName(term.getName());
column.setOptions(term.getOptions());
column.withOthers(term.getOthers());
} else {
column.setChildren(createTermColumn(_prefix, prop, last, valueTypes));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class TermColumn {
@Schema(description = "可选内容")
private List<PropertyMetric> options;

@Schema(description = "其它配置")
private Map<String, Object> others;

@Schema(description = "子列,在类型为object时有值")
private List<TermColumn> children;

Expand Down Expand Up @@ -235,4 +238,15 @@ public void refactorFullName(String parentName) {
}
}

public TermColumn withOthers(Map<String, Object> options) {
if (options != null) {
safeOptions().putAll(options);
}
return this;
}

public synchronized Map<String, Object> safeOptions() {
return others == null ? others = new HashMap<>() : others;
}

}

0 comments on commit ff0f7dd

Please sign in to comment.