| | |
| | | import org.springframework.util.StopWatch; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 住户 服务实现类 |
| | |
| | | public List<HouseholdVO> getAllHouseHold(HouseholdVO household) { |
| | | return baseMapper.getAllHouseHold(household); |
| | | } |
| | | |
| | | /** |
| | | * 住户列表查询 |
| | | * @param household |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<HouseholdVO> selectHouseholdList(HouseholdVO household) { |
| | | List<HouseholdVO> householdVOS = baseMapper.selectHouseholdList(household); |
| | | // 遍历 |
| | | for (HouseholdVO householdVO : householdVOS) { |
| | | if (householdVO.getHouseholdLabelList().size()>0){ |
| | | List<String> labelNameList = householdVO.getHouseholdLabelList().stream().map(householdLabelVO -> householdLabelVO.getLabelName()) |
| | | .collect(Collectors.toList()); |
| | | householdVO.setLabelName(String.join(",",labelNameList)); |
| | | } |
| | | } |
| | | // 返回 |
| | | return householdVOS; |
| | | } |
| | | } |