src/main/java/org/springblade/modules/place/controller/PlaceController.java
@@ -35,6 +35,7 @@ import org.springblade.modules.place.excel.PlaceAndRelImporter; import org.springblade.modules.place.excel.PlaceExcel; import org.springblade.modules.place.excel.PlaceImporter; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.modules.place.entity.PlaceEntity; @@ -43,6 +44,8 @@ import org.springblade.modules.place.service.IPlaceService; import org.springblade.core.boot.ctrl.BladeController; import org.springframework.web.multipart.MultipartFile; import java.util.List; /** * 场所表 控制器 @@ -159,7 +162,9 @@ @ApiOperationSupport(order = 7) @ApiOperation(value = "逻辑删除", notes = "传入ids") public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(placeService.removeByIds(Func.toLongList(ids))); List<Long> longs = Func.toLongList(ids); // 返回 return R.status(placeService.removePlace(longs)); } /** src/main/java/org/springblade/modules/place/service/IPlaceService.java
@@ -130,4 +130,11 @@ * @return */ List<PlaceVO> getPlaceListByParam(List<String> stringList,String color); /** * 删除 * @param longs * @return */ boolean removePlace(List<Long> longs); } src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java
@@ -33,6 +33,7 @@ import org.springblade.modules.grid.service.IGridService; import org.springblade.modules.grid.service.IGridmanService; import org.springblade.modules.grid.vo.GridVO; import org.springblade.modules.house.entity.UserHouseLabelEntity; import org.springblade.modules.place.entity.*; import org.springblade.modules.place.excel.PlaceAndRelExcel; import org.springblade.modules.place.excel.PlaceExcel; @@ -856,4 +857,46 @@ public List<PlaceVO> getPlaceListByParam(List<String> stringList,String color) { return baseMapper.getPlaceListByParam(stringList,color); } /** * 删除 * @param longs * @return */ @Override @Transactional(rollbackFor = Exception.class) public boolean removePlace(List<Long> longs) { // 删除 boolean removeByIds = removeByIds(longs); // 删除对应的详情 removePlaceExt(longs); // 删除对应的标签绑定信息 removePlaceLabel(longs); // 返回 return removeByIds; } /** * 删除场所对应的详情 * @param longs */ public void removePlaceExt(List<Long> longs) { for (Long id : longs) { QueryWrapper<PlaceExtEntity> wrapper = new QueryWrapper<>(); wrapper.eq("place_id",id); placeExtService.remove(wrapper); } } /** * 删除对应的标签绑定信息 * @param longs */ public void removePlaceLabel(List<Long> longs) { for (Long id : longs) { QueryWrapper<PlacePoiLabel> wrapper = new QueryWrapper<>(); wrapper.eq("place_id",id); placePoiLabelService.remove(wrapper); } } } src/main/java/org/springblade/modules/system/service/impl/RegionServiceImpl.java
@@ -154,6 +154,9 @@ String regionCode = null; if (null!=dept){ regionCode = dept.getRegionCode(); if (regionCode.equals("3611")){ regionCode = "361102"; } } return NodeTreeUtil.getStringNodeTree(baseMapper.getTownTree(regionCode)); }