| | |
| | | package com.ard.web.controller.data; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ard.common.constant.DeviceConstants; |
| | | import com.ard.common.utils.uuid.IdUtils; |
| | | import com.ard.data.noflyzone.domain.FeatureCollection; |
| | | import io.swagger.annotations.Api; |
| | |
| | | /** |
| | | * 禁飞区管理Controller |
| | | * |
| | | * @author ruoyi |
| | | * @author ard |
| | | * @date 2025-10-14 |
| | | */ |
| | | @Api(tags = "禁飞区管理") |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdNoFlyZone ardNoFlyZone) |
| | | { |
| | | if (DeviceConstants.NOT_UNIQUE.equals(ardNoFlyZoneService.checkArdNoFlyZoneNameUnique(ardNoFlyZone))) { |
| | | return error("新增禁飞区'" + ardNoFlyZone.getName() + "'失败,已存在"); |
| | | } |
| | | return toAjax(ardNoFlyZoneService.insertArdNoFlyZone(ardNoFlyZone)); |
| | | } |
| | | |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdNoFlyZone ardNoFlyZone) |
| | | { |
| | | if (DeviceConstants.NOT_UNIQUE.equals(ardNoFlyZoneService.checkArdNoFlyZoneNameUnique(ardNoFlyZone))) { |
| | | return error("修改禁飞区'" + ardNoFlyZone.getName() + "'失败,已存在"); |
| | | } |
| | | return toAjax(ardNoFlyZoneService.updateArdNoFlyZone(ardNoFlyZone)); |
| | | } |
| | | |