liusuyi
2026-05-12 9f327c33730ba10cb2d89aff99b727502232e968
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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));
    }
}