| | |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteSpecialInputUser(Long id) { |
| | | public R deleteSpecialInputUser(Long id,Long communityId) { |
| | | // 查询特殊群体人员 |
| | | ComMngPopulationDO populationDO = this.baseMapper.selectById(id); |
| | | if (populationDO == null) { |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | populationDO.setLabel(null); |
| | | |
| | | // 清理社区与人口关联信息的label信息 |
| | | List<ComMngPopulationCommunityTagsDO> communityTagsDOList = comMngPopulationCommunityTagsDAO.selectList(new QueryWrapper<ComMngPopulationCommunityTagsDO>() |
| | | .lambda().eq(ComMngPopulationCommunityTagsDO::getPopulationId,id).eq(ComMngPopulationCommunityTagsDO::getCommunityId,communityId)); |
| | | if(communityTagsDOList != null && communityTagsDOList.size() > 0){ |
| | | communityTagsDOList.forEach(communityTags -> { |
| | | communityTags.setLabel(null); |
| | | comMngPopulationCommunityTagsDAO.updateById(communityTags); |
| | | }); |
| | | } |
| | | |
| | | if (this.baseMapper.updateById(populationDO) > 0) { |
| | | return R.ok(); |
| | | } else { |