package com.newfiber.api.pc.controller; import com.newfiber.api.core.commons.ResultCode; import com.newfiber.api.core.commons.ResultObj; import com.newfiber.api.pc.model.entity.VideoSurveillance; import com.newfiber.api.pc.service.VideoSurveillanceService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; import java.util.Map; /** * @description: 视频监测点控制层 * @author: 张鸿志 * @date: 2021/1/19 9:36 * @version: v1.0 */ @RestController @RequestMapping("/video") @Api(value = "VideoSurveillanceController",tags = "视频监测点控制层") public class VideoSurveillanceController { @Autowired private VideoSurveillanceService videoSurveillanceService; @PostMapping("/parentGroup") @ApiOperation("按照所属站点进行分组查询") public ResultObj<Map<String, List<VideoSurveillance>>> selectVideoByParentGroup(){ return new ResultObj<>(ResultCode.OK,videoSurveillanceService.selectVideoByParentGroup()); } @PostMapping("/queryList") @ApiOperation("查询所有的视频监测点数据") public ResultObj<List<VideoSurveillance>> queryList(){ return new ResultObj<>(ResultCode.OK,videoSurveillanceService.selectList(null)); } }