|
|
@ -760,7 +760,12 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao |
|
|
|
@Transactional |
|
|
|
public void neighborHoodPropertyUpdate(List<NeighborHoodAndManagementDTO> updateNeighborHoodAndManagement) { |
|
|
|
if (CollectionUtils.isNotEmpty(updateNeighborHoodAndManagement)){ |
|
|
|
baseDao.neighborHoodPropertyUpdate(updateNeighborHoodAndManagement); |
|
|
|
baseDao.delProperty(updateNeighborHoodAndManagement.stream().map(m -> m.getNeighborHoodId()).collect(Collectors.toList())); |
|
|
|
List<IcNeighborHoodPropertyEntity> entities = ConvertUtils.sourceToTarget(updateNeighborHoodAndManagement, IcNeighborHoodPropertyEntity.class); |
|
|
|
List<IcNeighborHoodPropertyEntity> collect = entities.stream().filter(e -> StringUtils.isNotBlank(e.getPropertyId())).collect(Collectors.toList()); |
|
|
|
if (CollectionUtils.isNotEmpty(collect)){ |
|
|
|
neighborHoodPropertyService.insertBatch(collect); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|