VchanConfController.java
1.82 KB
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
package com.viontech.controller;
import com.viontech.service.adapter.IVachanConfService;
import com.viontech.vo.VchanConfVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
/**
* @program: event_data_handle
* @description: 视频通道配置
* @author: authorName
* @create: 2020-03-23 13:14
**/
@RestController
public class VchanConfController extends BaseController {
@Autowired
IVachanConfService iVachanConfService;
@PostMapping(value = "/vchan/conf")
@ResponseBody
public Object add(@RequestBody VchanConfVo vchanConfVo){
iVachanConfService.add(vchanConfVo);
Map result = new HashMap<>(2);
result.put("ecode","200");
result.put("enote","OK");
return result;
}
@PostMapping(value = "/vchan/conf/{unid}")
@ResponseBody
public Object update(@RequestBody VchanConfVo vchanConfVo, @PathVariable("unid") Integer unid){
vchanConfVo.setVchanConfUnid(unid);
iVachanConfService.update(vchanConfVo);
Map result = new HashMap<>(2);
result.put("ecode","200");
result.put("enote","OK");
return result;
}
@DeleteMapping(value = "/vchan/conf/{unid}")
@ResponseBody
public Object delete(VchanConfVo vchanConfVo, @PathVariable("unid") Integer unid){
vchanConfVo.setVchanConfUnid(unid);
iVachanConfService.delete(vchanConfVo);
Map result = new HashMap<>(2);
result.put("ecode","200");
result.put("enote","OK");
return result;
}
@GetMapping(value = "/vchan/conf")
@ResponseBody
public Object findAll(VchanConfVo vchanConfVo){
return iVachanConfService.findAll(vchanConfVo);
}
}