|
|
|
@ -102,11 +102,15 @@ public class DhcAreaController extends BaseController
@@ -102,11 +102,15 @@ public class DhcAreaController extends BaseController
|
|
|
|
|
* 删除区域 |
|
|
|
|
*/ |
|
|
|
|
@PreAuthorize("@ss.hasPermi('dhc:area:remove')") |
|
|
|
|
@Log(title = "区域", businessType = BusinessType.DELETE) |
|
|
|
|
@DeleteMapping("/{areaIds}") |
|
|
|
|
public AjaxResult remove(@PathVariable Long[] areaIds) |
|
|
|
|
@GetMapping("/del/{areaId}") |
|
|
|
|
public AjaxResult remove(@PathVariable("areaId") Long areaId) |
|
|
|
|
{ |
|
|
|
|
return toAjax(dhcAreaService.deleteDhcAreaByAreaIds(areaIds)); |
|
|
|
|
Integer count = dhcAreaService.deleteDhcAreaByAreaId(areaId); |
|
|
|
|
if (count == -1) { |
|
|
|
|
return AjaxResult.error("该区域存在子区域,请先删除子区域"); |
|
|
|
|
} else { |
|
|
|
|
return AjaxResult.success(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 查询区域信息 |
|
|
|
|