Browse Source

bug#2803,修改房屋名后社区查询和居民信息列表展示

release
yinzuomei 3 years ago
parent
commit
345e2e7a9f
  1. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerIcHouseRedis.java
  2. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseRedis.java
  3. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerIcHouseRedis.java

@ -62,4 +62,8 @@ public class CustomerIcHouseRedis {
return buildInfoResult.getData();
}
public static void delBuildingInfo(String buildingId){
String key = RedisKeys.getBuildingInfoKey(buildingId);
customerIcHouseRedis.redisUtils.delete(key);
}
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/IcHouseRedis.java

@ -90,6 +90,11 @@ public class IcHouseRedis {
return houseInfo;
}
public void delHouseInfo(String houseId,String customerId){
String key = RedisKeys.getHouseInfoCacheKey(houseId,customerId);
redisUtils.delete(key);
}
/**
* @Description 存放房屋临时缓存
* @param customerId

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -17,6 +17,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@ -572,6 +573,16 @@ public class BuildingServiceImpl implements BuildingService {
}
}
//删除楼栋下所有的房屋缓存
List<IcHouseEntity> houseList = icHouseDao.selectList(new QueryWrapper<IcHouseEntity>().lambda().eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId()));
if (!CollectionUtils.isEmpty(houseList)) {
houseList.forEach(house -> {
//删除房屋的缓存
icHouseRedis.delHouseInfo(house.getId(), customerId);
});
}
//删除楼栋缓存
CustomerIcHouseRedis.delBuildingInfo(formDTO.getBuildingId());
}
/**

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -72,7 +72,7 @@
<select id="searchHouseByPage" resultType="com.epmet.dto.result.IcHouseListResultDTO">
select
a.HOUSE_NAME as houseName,
concat(b.BUILDING_NAME,'-',d.UNIT_NUM,'-',a.DOOR_NAME) as houseName,
c.NEIGHBOR_HOOD_NAME as neighborHoodName,
b.BUILDING_NAME as buildingName,
CONCAT(d.UNIT_NUM,'单元') as unitNum,

Loading…
Cancel
Save