package com.thhy.materials.modules.biz.video.controller; import com.thhy.general.common.BasicResult; import com.thhy.materials.modules.biz.video.service.VideoService; import org.apache.ibatis.annotations.Mapper; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.websocket.RemoteEndpoint; import java.util.HashMap; import java.util.Map; @RestController @RequestMapping("/video") public class VideoController { @Resource private VideoService videoService; @GetMapping("/videoList") public BasicResult videoList(){ return videoService.videoList(); } //返回视频地址路径 @PostMapping("/videoListPath") public BasicResult videoListPath(HttpServletRequest request,Map values){ String types = request.getParameter("types"); String deviceNum = request.getParameter("deviceNum"); String channelNo = request.getParameter("channelNo"); Map hashMap = new HashMap<>(); hashMap.put("types",Integer.valueOf(types)); hashMap.put("deviceNum",deviceNum); hashMap.put("channelNo",channelNo); System.out.println("-----"+hashMap); System.out.println("-----"+hashMap); return videoService.videoListPath(hashMap); } @PostMapping("/videoListPage") public BasicResult videoListPage(@RequestBody Map values){ return videoService.videoListPage(values); } //web视频接口 @PostMapping("/webVideoList") public BasicResult webVideoList(@RequestBody Map values){ return videoService.webVideoList(values); } //返回视频地址路径 微信小程序的 视频接口 @PostMapping("/videoListPathWX") public BasicResult videoListPathWX(HttpServletRequest request,Map values){ String types = request.getParameter("types"); String deviceNum = request.getParameter("deviceNum"); String channelNo = request.getParameter("channelNo"); Map hashMap = new HashMap<>(); hashMap.put("types",Integer.valueOf(types)); hashMap.put("deviceNum",deviceNum); hashMap.put("channelNo",channelNo); System.out.println("-----"+hashMap); System.out.println("-----"+hashMap); return videoService.videoListPathWX(hashMap); } }