提交 | 用户 | 时间
|
08b6a5
|
1 |
package com.iailab.module.data.video.controller.admin.camera; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
|
4 |
import com.iailab.framework.common.pojo.PageResult; |
|
5 |
import com.iailab.module.data.video.controller.admin.camera.vo.ImagePageReqVO; |
|
6 |
import com.iailab.module.data.video.dto.ImageDTO; |
|
7 |
import com.iailab.module.data.video.service.ImageService; |
|
8 |
import io.swagger.v3.oas.annotations.Operation; |
|
9 |
import io.swagger.v3.oas.annotations.Parameter; |
|
10 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
11 |
import org.springframework.beans.factory.annotation.Autowired; |
|
12 |
import org.springframework.security.access.prepost.PreAuthorize; |
|
13 |
import org.springframework.web.bind.annotation.*; |
|
14 |
|
|
15 |
import javax.validation.Valid; |
|
16 |
import java.util.List; |
|
17 |
|
|
18 |
import static com.iailab.framework.common.pojo.CommonResult.success; |
|
19 |
|
|
20 |
/** |
|
21 |
* @author Houzhongjian |
|
22 |
* @Description |
|
23 |
* @createTime 2024年11月01日 |
|
24 |
*/ |
|
25 |
@RestController |
|
26 |
@RequestMapping("/data/video/image") |
|
27 |
@Tag(name = "截图管理") |
|
28 |
public class ImageController { |
|
29 |
|
|
30 |
@Autowired |
|
31 |
private ImageService imageService; |
|
32 |
|
|
33 |
@GetMapping("page") |
|
34 |
@Operation(summary = "分页") |
|
35 |
@PreAuthorize("@ss.hasPermission('video:image:query')") |
|
36 |
public CommonResult<PageResult<ImageDTO>> page(@Valid ImagePageReqVO imagePageReqVO) { |
|
37 |
return success(imageService.getPage(imagePageReqVO)); |
|
38 |
} |
|
39 |
|
|
40 |
@GetMapping("list") |
|
41 |
@PreAuthorize("@ss.hasPermission('video:image:query')") |
|
42 |
public CommonResult<List<ImageDTO>> list(@Valid ImagePageReqVO imagePageReqVO) { |
|
43 |
List<ImageDTO> list = imageService.list(imagePageReqVO); |
|
44 |
return success(list); |
|
45 |
} |
|
46 |
|
|
47 |
@GetMapping("/get") |
|
48 |
@Operation(summary = "信息") |
|
49 |
@PreAuthorize("@ss.hasPermission('video:image:query')") |
|
50 |
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|
51 |
public CommonResult<ImageDTO> get(@RequestParam("id") String id) { |
|
52 |
ImageDTO data = imageService.get(id); |
|
53 |
return success(data); |
|
54 |
} |
|
55 |
|
|
56 |
@DeleteMapping("/delete") |
|
57 |
@Operation(summary = "删除") |
|
58 |
@PreAuthorize("@ss.hasPermission('video:image:delete')") |
|
59 |
public CommonResult delete(@RequestParam("id") String id) { |
|
60 |
imageService.delete(id); |
|
61 |
return success(); |
|
62 |
} |
|
63 |
|
|
64 |
} |