Commit cc072afd by jx-art

Integer类型判断修改判断方式

parent 21461adc
......@@ -160,7 +160,6 @@ public class ChangeTypeServiceImpl implements ChangeTypeService {
public List<ChangeTypePo> queryConfigType() {
//获取数据,创建目录集合,遍历分组
List<ChangeTypePo> changeTypes = mapper.queryArrayChangeTypes();
logger.error("查询所有一级二级配置类型"+changeTypes.size());
List<ChangeTypePo> pos = new ArrayList<>();
for (ChangeTypePo changeType : changeTypes) {
if (changeType.getParentId() == 0){
......@@ -169,13 +168,12 @@ public class ChangeTypeServiceImpl implements ChangeTypeService {
pos.add(changeType);
}else{
for (ChangeTypePo po : pos){
if (po.getId() == changeType.getParentId()){
if (po.getId().equals( changeType.getParentId())){
po.getChangeTypes().add(changeType);
}
}
}
}
logger.error("map处理后结果"+pos.size());
//去重如果父类下边包裹的List数量为0的时候就自动剔除
pos.removeIf(changeTypePo -> changeTypePo.getChangeTypes().size() == 0);
return pos;
......
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