增加拉流代理修改功能
This commit is contained in:
@@ -75,7 +75,28 @@ public class StreamProxyController {
|
||||
WVPResult<StreamInfo> result = streamProxyService.save(param);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation("修改代理")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "param", value = "代理参数", dataTypeClass = StreamProxyItem.class),
|
||||
})
|
||||
@PostMapping(value = "/update")
|
||||
@ResponseBody
|
||||
public WVPResult update(@RequestBody StreamProxyItem param){
|
||||
logger.info("修改代理: " + JSONObject.toJSONString(param));
|
||||
WVPResult<StreamInfo> result = new WVPResult<>();
|
||||
if(StringUtils.isEmpty(param.getApp())||StringUtils.isEmpty(param.getStream())){
|
||||
result.setCode(400);
|
||||
result.setMsg("app不能为null且stream不能为null,请检查具体参数!");
|
||||
return result;
|
||||
}
|
||||
streamProxyService.del(param.getApp(), param.getStream());
|
||||
if (StringUtils.isEmpty(param.getMediaServerId())) param.setMediaServerId("auto");
|
||||
if (StringUtils.isEmpty(param.getType())) param.setType("default");
|
||||
if (StringUtils.isEmpty(param.getGbId())) param.setGbId(null);
|
||||
param.setEnable(false);
|
||||
result = streamProxyService.save(param);
|
||||
return result;
|
||||
}
|
||||
@ApiOperation("获取ffmpeg.cmd模板")
|
||||
@GetMapping(value = "/ffmpeg_cmd/list")
|
||||
@ApiImplicitParams({
|
||||
|
||||
Reference in New Issue
Block a user