| | |
| | | package com.ycl.controller.video; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.video.VideoPoint; |
| | | import com.ycl.service.video.impl.IVideoPointService; |
| | | import com.ycl.util.VideoUtil; |
| | | import com.ycl.vo.equipment.VideoPointVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | IVideoPointService iVideoPointService; |
| | | @Autowired |
| | | VideoUtil videoUtil; |
| | | |
| | | @GetMapping("/query") |
| | | @ApiOperation("查询") |
| | |
| | | @RequestParam Long current, |
| | | @RequestParam(required = false) Integer streetId, |
| | | @RequestParam(required = false) Integer communityId) { |
| | | return CommonResult.success(iVideoPointService.getList(streetId,communityId, current.intValue(), size.intValue())); |
| | | |
| | | IPage<VideoPointVo> pointVoIPage = iVideoPointService.getList(streetId, communityId, current.intValue(), size.intValue()); |
| | | // pointVoIPage.getRecords() |
| | | // .stream() |
| | | // .forEach(item -> item.setUrlAddress(videoUtil.getVideo(item.getPlatResourceId(), "HLS", 0))); |
| | | return CommonResult.success(pointVoIPage); |
| | | } |
| | | |
| | | @PostMapping("/addition") |
| | | @ApiOperation("添加") |
| | | @LogSave(operationType = "点位管理", contain = "添加点位") |
| | | public CommonResult addVideoPoint(@RequestBody VideoPoint videoPoint) { |
| | | videoPoint.setType(0); |
| | | return CommonResult.success(iVideoPointService.save(videoPoint)); |
| | | } |
| | | |