springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngVillageServeExcelListen.java
@@ -34,6 +34,12 @@ @Override public void invoke(ComMngVillageServeExcelVO comMngVillageServeExcelVO, AnalysisContext analysisContext) { try { Integer.parseInt(comMngVillageServeExcelVO.getHouseNum()); } catch (Exception e){ throw new ServiceException("门牌号只能为纯数字"); } list.add(comMngVillageServeExcelVO); // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM if (list.size() >= BATCH_COUNT) { springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -202,8 +202,11 @@ boolean result = comMngVillageDOs.stream().anyMatch( village -> village.getAlley().equals(vo.getAlley()) && village.getHouseNum().equals(vo.getHouseNum())); if (result) { return R.fail("导入街路巷已存在(" + vo.getAlley() + ")"); return R.fail("导入街路巷重复(" + vo.getAlley() + ")"); } ComMngVillageDO comMngVillageDO=new ComMngVillageDO(); BeanUtils.copyProperties(vo,comMngVillageDO); comMngVillageDOs.add(comMngVillageDO); index++; } ComActDO comActDO = comActDAO.selectById(communityId);