From 9eba0c7613bdc58a776f93b7f9914767bbb84b9a Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Thu, 16 Nov 2023 15:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=88=BF=E5=B1=8B=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E5=85=A5=E4=BA=BA=E5=8F=A3=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=20=20--renpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/house/impl/HouseServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java index 6e7a659..4c29a13 100644 --- a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java +++ b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java @@ -149,11 +149,13 @@ public class HouseServiceImpl extends AbstractService implements IHouseService { for (PopulationVO populationVO : populationVOList) { if("1".equals(populationVO.getOutHouse())) { populationService.update(populationVO.getPopulationId(), populationVO); - } else if(StringUtils.isEmpty(populationVO.getPopulationId())) { - populationVO.setHouseId(houseId); + } + } + + populationdao.deleteById(houseId); + for (PopulationVO populationVO : populationVOList) { + if(!"1".equals(populationVO.getOutHouse())) { populationService.save(token, populationVO); - }else { - populationdao.deleteById(populationVO.getPopulationId()); } } }