Skip to content

Commit

Permalink
[fix]获取扩展选项时仅使用用户设置的,兼容旧版选项
Browse files Browse the repository at this point in the history
  • Loading branch information
yajuhua committed Jul 30, 2024
1 parent 0f41a60 commit cc7a40d
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,35 @@ public Result<EditSubVO> getEditSubInfo(@PathVariable String uuid)throws Excepti
List<InputAndSelectData> inputListData = new ArrayList<>();
List<InputAndSelectData> selectListData = new ArrayList<>();

//获取扩展选项时仅使用用户设置的,兼容旧版选项
//input类型
List<Input> filterInputDataList = editSubVO.getExtendList().getInputList().stream().filter(new Predicate<Input>() {
@Override
public boolean test(Input input) {
for (Extend extend : anExtends) {
if (input.getName().equals(extend.getName())) {
return true;
}
}
return false;
}
}).collect(Collectors.toList());
editSubVO.getExtendList().setInputList(filterInputDataList);

//select类型
List<Select> filterSelectDataList = editSubVO.getExtendList().getSelectList().stream().filter(new Predicate<Select>() {
@Override
public boolean test(Select select) {
for (Extend extend : anExtends) {
if (select.getName().equals(extend.getName())) {
return true;
}
}
return false;
}
}).collect(Collectors.toList());
editSubVO.getExtendList().setSelectList(filterSelectDataList);

//4.将selectList和inputList封装成VO
for (Select select : extendListVO.getExtendList().getSelectList()) {
for (Extend extend : anExtends) {
Expand Down

0 comments on commit cc7a40d

Please sign in to comment.