Commit e9def1e1 authored by 张永's avatar 张永

加转码模板组参数

parent e9e40a82
......@@ -55,6 +55,7 @@ public class AliyunApiController {
@ApiImplicitParam(paramType = "query", name = "cateId", dataType = "Long", required = true, value = "分类ID", defaultValue = "0"),
@ApiImplicitParam(paramType = "query", name = "tags", dataType = "String", required = false, value = "视频标签,多个用逗号分隔", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "description", dataType = "String", required = false, value = "描述", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "templateGroupId", dataType = "String", required = false, value = "转码模板组ID", defaultValue = ""),
})
@RequestMapping(value = "/createUploadVideo",method=RequestMethod.POST)
public Object createUploadVideo(HttpServletRequest request) {
......@@ -63,6 +64,7 @@ public class AliyunApiController {
String cateId = request.getParameter("cateId");
String tags = request.getParameter("tags");
String description = request.getParameter("description");
String templateGroupId = request.getParameter("templateGroupId");
if(!StringUtil.isNotEmpty(fileName,title)) {
return Rjx.jsonErr().setMessage(messages.get("err.param_null"));
......@@ -76,6 +78,7 @@ public class AliyunApiController {
params.put("cateId", cateId);
params.put("tags", tags);
params.put("description", description);
params.put("templateGroupId", templateGroupId);
AliyunUtil aliyunUtil = new AliyunUtil(accessKeyId,accessKeySecret);
CreateUploadVideoResponse response = aliyunUtil.createUploadVideo(params);
......
......@@ -61,6 +61,7 @@ public class AliyunUtil {
request.setTags(params.get("tags")+"");
// 可选,视频描述
request.setDescription(params.get("description")+"");
request.setTemplateGroupId(params.get("templateGroupId")+"");
response = aliyunClient.getAcsResponse(request);
} catch (ServerException e) {
System.out.println("CreateUploadVideoRequest Server Exception:");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment