From 26021cd6733f0e28becb95e3eefd2c44f9a987bb Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Thu, 16 Nov 2023 15:25:22 +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 --- .../java/com/cm/population/dao/population/IPopulationDao.java | 4 ++-- .../cm/population/service/house/impl/HouseServiceImpl.java | 2 +- .../resources/mybatis/mapper/population/population-mapper.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/cm/population/dao/population/IPopulationDao.java b/src/main/java/com/cm/population/dao/population/IPopulationDao.java index 0401673..789db99 100644 --- a/src/main/java/com/cm/population/dao/population/IPopulationDao.java +++ b/src/main/java/com/cm/population/dao/population/IPopulationDao.java @@ -120,9 +120,9 @@ public interface IPopulationDao { /** * 通过房屋ID删除人员信息 * - * @param populationId + * @param houseId * @throws UpdateException */ - void deleteById(String populationId) throws RemoveException; + void deleteByHouseId(String houseId) throws RemoveException; } \ No newline at end of file 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 4c29a13..382cac0 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 @@ -152,7 +152,7 @@ public class HouseServiceImpl extends AbstractService implements IHouseService { } } - populationdao.deleteById(houseId); + populationdao.deleteByHouseId(houseId); for (PopulationVO populationVO : populationVOList) { if(!"1".equals(populationVO.getOutHouse())) { populationService.save(token, populationVO); diff --git a/src/main/resources/mybatis/mapper/population/population-mapper.xml b/src/main/resources/mybatis/mapper/population/population-mapper.xml index 4f88d2a..582bd78 100644 --- a/src/main/resources/mybatis/mapper/population/population-mapper.xml +++ b/src/main/resources/mybatis/mapper/population/population-mapper.xml @@ -110,11 +110,11 @@ - + DELETE FROM house_population WHERE - population_id = #{population_id} + house_id = #{houseId} AND out_house != 1