Commit bf78ec83 authored by 胡定国's avatar 胡定国

策略排序

parent 4717a79d
......@@ -545,12 +545,13 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
}
// 排除白名单相关策略
List<String> excludeCodes = Lists.newArrayList("9010", "9020", "9030", "9040", "9050", "7030");
return resp.attributes.stream().filter(v -> !excludeCodes.contains(v.getConstantCode())).map(item -> {
SysConstantVO vo = new SysConstantVO();
vo.setConstantCode(item.getConstantCode());
vo.setConstantName(item.getConstantName());
vo.setConstantValue(item.getConstantValue());
return vo;
}).collect(Collectors.toList());
return resp.attributes.stream().sorted(Comparator.comparing(SysConstantResp::getConstantCode))
.filter(v -> !excludeCodes.contains(v.getConstantCode())).map(item -> {
SysConstantVO vo = new SysConstantVO();
vo.setConstantCode(item.getConstantCode());
vo.setConstantName(item.getConstantName());
vo.setConstantValue(item.getConstantValue());
return vo;
}).collect(Collectors.toList());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment