package com.ard.work.device.camera.controller;
|
|
import com.ard.common.core.web.controller.BaseController;
|
import com.ard.common.core.web.domain.AjaxResult;
|
import com.ard.common.core.web.page.TableDataInfo;
|
import com.ard.common.log.enums.BusinessType;
|
import com.ard.common.security.annotation.RequiresPermissions;
|
import com.ard.work.device.camera.domain.ArdCameraPtzScope;
|
import com.ard.work.device.camera.service.IArdCameraPtzScopeService;
|
import com.ard.common.log.annotation.Log;
|
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
import java.util.List;
|
|
/**
|
* 摄像头PTZ范围Controller
|
*
|
* @author 刘苏义
|
* @date 2024-09-05
|
*/
|
@Tag(name = "摄像头PTZ范围管理")
|
@RestController
|
@RequestMapping("/camera/ptzscope")
|
public class ArdCameraPtzScopeController extends BaseController {
|
|
@Autowired
|
private IArdCameraPtzScopeService ardCameraPtzScopeService;
|
|
/**
|
* 查询摄像头PTZ范围列表
|
*/
|
@Operation(summary = "查询摄像头PTZ范围列表")
|
@RequiresPermissions("camera:ptzscope:list")
|
@GetMapping("/list")
|
public TableDataInfo list(ArdCameraPtzScope ardCameraPtzScope) {
|
startPage();
|
List<ArdCameraPtzScope> list = ardCameraPtzScopeService.selectArdCameraPtzScopeList(ardCameraPtzScope);
|
return getDataTable(list);
|
}
|
|
/**
|
* 获取摄像头PTZ范围详细信息
|
*/
|
@Operation(tags = "获取摄像头PTZ范围详细信息")
|
@RequiresPermissions("camera:ptzscope:query")
|
@GetMapping(value = "/{id}")
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
return success(ardCameraPtzScopeService.selectArdCameraPtzScopeById(id));
|
}
|
|
/**
|
* 新增摄像头PTZ范围
|
*/
|
@RequiresPermissions("camera:ptzscope:add")
|
@Log(title = "摄像头PTZ范围", businessType = BusinessType.INSERT)
|
@PostMapping
|
public AjaxResult add(@RequestBody ArdCameraPtzScope ardCameraPtzScope) {
|
return toAjax(ardCameraPtzScopeService.insertArdCameraPtzScope(ardCameraPtzScope));
|
}
|
|
/**
|
* 修改摄像头PTZ范围
|
*/
|
@RequiresPermissions("camera:ptzscope:edit")
|
@Log(title = "摄像头PTZ范围", businessType = BusinessType.UPDATE)
|
@PutMapping
|
public AjaxResult edit(@RequestBody ArdCameraPtzScope ardCameraPtzScope) {
|
return toAjax(ardCameraPtzScopeService.updateArdCameraPtzScope(ardCameraPtzScope));
|
}
|
|
/**
|
* 删除摄像头PTZ范围
|
*/
|
@RequiresPermissions("camera:ptzscope:remove")
|
@Log(title = "摄像头PTZ范围", businessType = BusinessType.DELETE)
|
@DeleteMapping("/{ids}")
|
public AjaxResult remove(@PathVariable String[] ids) {
|
return toAjax(ardCameraPtzScopeService.deleteArdCameraPtzScopeByIds(ids));
|
}
|
}
|