package com.iailab.module.data.video.controller.admin.camera; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.framework.common.pojo.PageResult; import com.iailab.module.data.video.controller.admin.camera.vo.ImagePageReqVO; import com.iailab.module.data.video.dto.ImageDTO; import com.iailab.module.data.video.service.ImageService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.List; import static com.iailab.framework.common.pojo.CommonResult.success; /** * @author Houzhongjian * @Description * @createTime 2024年11月01日 */ @RestController @RequestMapping("/data/video/image") @Tag(name = "截图管理") public class ImageController { @Autowired private ImageService imageService; @GetMapping("page") @Operation(summary = "分页") @PreAuthorize("@ss.hasPermission('video:image:query')") public CommonResult> page(@Valid ImagePageReqVO imagePageReqVO) { return success(imageService.getPage(imagePageReqVO)); } @GetMapping("list") @PreAuthorize("@ss.hasPermission('video:image:query')") public CommonResult> list(@Valid ImagePageReqVO imagePageReqVO) { List list = imageService.list(imagePageReqVO); return success(list); } @GetMapping("/get") @Operation(summary = "信息") @PreAuthorize("@ss.hasPermission('video:image:query')") @Parameter(name = "id", description = "编号", required = true, example = "1024") public CommonResult get(@RequestParam("id") String id) { ImageDTO data = imageService.get(id); return success(data); } @DeleteMapping("/delete") @Operation(summary = "删除") @PreAuthorize("@ss.hasPermission('video:image:delete')") public CommonResult delete(@RequestParam("id") String id) { imageService.delete(id); return success(); } }