|
|
@@ -69,7 +69,7 @@ public class MhUnitCacheImpl implements MhUnitCache, InitializingBean { |
|
|
|
return null; |
|
|
|
} |
|
|
|
putToChildIdMap(unit.getId(), unit.getParentId()); |
|
|
|
UnitDTO unitTmp = BeanUtil.copyProperties(unit, UnitDTO.class); |
|
|
|
UnitDTO unitTmp = BeanUtil.copyProperties(unit, UnitDTO.class, "type"); |
|
|
|
unitTmp.setType(MhUnitTypeEnum.getByCode(unit.getType()).orElse(null)); |
|
|
|
return unitTmp; |
|
|
|
} |
|
|
@@ -89,7 +89,7 @@ public class MhUnitCacheImpl implements MhUnitCache, InitializingBean { |
|
|
|
} |
|
|
|
return CollUtils.listToMap(allUnits, MhUnit::getId, w -> { |
|
|
|
putToChildIdMap(w.getId(), w.getParentId()); |
|
|
|
UnitDTO unit = BeanUtil.copyProperties(w, UnitDTO.class); |
|
|
|
UnitDTO unit = BeanUtil.copyProperties(w, UnitDTO.class, "type"); |
|
|
|
unit.setType(MhUnitTypeEnum.getByCode(w.getType()).orElse(null)); |
|
|
|
return unit; |
|
|
|
}); |
|
|
|