fix: 高级搜索构造条件空指针bug

This commit is contained in:
2024-03-20 11:25:25 +08:00
parent afb4d67717
commit 3720d162e6
@@ -200,15 +200,15 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
if (parameterMap.containsKey("home_search_key")) {
parameterMap.remove("home_search_key");
fieldListSelect = fieldList;
fieldListCondition = fieldList.stream().filter(lawsTag -> Objects.equals(YesOrNoEnum.YES.getValue(),
lawsTag.getIsShowSearch().toString())).collect(Collectors.toList());
fieldListCondition = fieldList.stream().filter(lawsTag -> Objects.equals(YesOrNoEnum.YES.getInteger(),
lawsTag.getIsShowSearch())).collect(Collectors.toList());
} else {
// 筛选出查询列表显示的字段(不传id查列表)
fieldListSelect = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
.equals(lawsTag.getIsShowList().toString())).collect(Collectors.toList());
fieldListSelect = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getInteger()
.equals(lawsTag.getIsShowList())).collect(Collectors.toList());
// 筛选出用于查询的字段
fieldListCondition = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getValue()
.equals(lawsTag.getIsQuery().toString())).collect(Collectors.toList());
fieldListCondition = fieldList.stream().filter(lawsTag -> YesOrNoEnum.YES.getInteger()
.equals(lawsTag.getIsQuery())).collect(Collectors.toList());
}
// 加一个create_by字段