张晓波
2023-09-19 164694c47c35d6654df69b533e8dbf8b5423efc5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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<String, Object> values){
        String types = request.getParameter("types");
        String deviceNum = request.getParameter("deviceNum");
        String channelNo = request.getParameter("channelNo");
        Map<String, Object> 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<String,Object> values){
        return videoService.videoListPage(values);
    }
 
    //web视频接口
    @PostMapping("/webVideoList")
    public BasicResult webVideoList(@RequestBody Map<String,Object> values){
        return videoService.webVideoList(values);
    }
 
 
    //返回视频地址路径  微信小程序的  视频接口
    @PostMapping("/videoListPathWX")
    public BasicResult videoListPathWX(HttpServletRequest request,Map<String, Object> values){
        String types = request.getParameter("types");
        String deviceNum = request.getParameter("deviceNum");
        String channelNo = request.getParameter("channelNo");
        Map<String, Object> 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);
    }
 
}