Commit c2a731ad authored by 张永's avatar 张永

增加取值

parent 3ec94e07
......@@ -41,8 +41,8 @@ public class AliyunApiController {
private String accessKeySecret;
@Value("${aliyun.video.templateId}")
private String templateId;
@Value("${aliyun.video.templateGroupId}")
private String templateGroupId;
@Autowired
private Messages messages;
......@@ -55,7 +55,6 @@ 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) {
......@@ -64,7 +63,6 @@ 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"));
......@@ -85,7 +83,7 @@ public class AliyunApiController {
return Rjx.jsonOk().set("RequestId", response.getRequestId()).set("UploadAuth", response.getUploadAuth())
.set("UploadAddress", response.getUploadAddress())
.set("VideoId", response.getVideoId()).set("templateId", templateId);
.set("VideoId", response.getVideoId());
}
......@@ -104,7 +102,7 @@ public class AliyunApiController {
AliyunUtil aliyunUtil = new AliyunUtil(accessKeyId,accessKeySecret);
RefreshUploadVideoResponse response = aliyunUtil.refreshUploadVideo(videoId);
if(response != null) {
return Rjx.jsonOk().set("RequestId", response.getRequestId()).set("UploadAuth", response.getUploadAuth()).set("UploadAddress", response.getUploadAddress()).set("templateId", templateId);
return Rjx.jsonOk().set("RequestId", response.getRequestId()).set("UploadAuth", response.getUploadAuth()).set("UploadAddress", response.getUploadAddress());
}else {
return Rjx.jsonErr().setCode(-1).setMessage("InvalidVideo.NotFound : The video does not exist.");
}
......
......@@ -37,5 +37,5 @@ spring.datasource.min-idle=10
aliyun.sts.accessKeyId=LTAIOtHCCpDLXYp8
aliyun.sts.accessKeySecret=9XTHW7P9TTRvCsBHBSclOue2tdWOoa
#\u89C6\u9891\u8F6C\u7801ID
aliyun.video.templateId=d9f4a79cba14ce4cbc98d6516d35bf37
aliyun.video.templateGroupId=d9f4a79cba14ce4cbc98d6516d35bf37
opt.project.type=1
\ No newline at end of file
......@@ -36,5 +36,5 @@ spring.datasource.min-idle=10
aliyun.sts.accessKeyId=LTAIOtHCCpDLXYp8
aliyun.sts.accessKeySecret=9XTHW7P9TTRvCsBHBSclOue2tdWOoa
#\u89C6\u9891\u8F6C\u7801ID
aliyun.video.templateId=d9f4a79cba14ce4cbc98d6516d35bf37
aliyun.video.templateGroupId=d9f4a79cba14ce4cbc98d6516d35bf37
opt.project.type=1
\ No newline at end of file
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