Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sentinel
Commits
c2a731ad
Commit
c2a731ad
authored
Feb 14, 2019
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加取值
parent
3ec94e07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
AliyunApiController.java
...main/java/com/egolm/film/api/web/AliyunApiController.java
+4
-6
application-dev.properties
src/main/resources/application-dev.properties
+1
-1
application-pro.properties
src/main/resources/application-pro.properties
+1
-1
No files found.
src/main/java/com/egolm/film/api/web/AliyunApiController.java
View file @
c2a731ad
...
...
@@ -41,8 +41,8 @@ public class AliyunApiController {
private
String
accessKeySecret
;
@Value
(
"${aliyun.video.templateId}"
)
private
String
templateId
;
@Value
(
"${aliyun.video.template
Group
Id}"
)
private
String
template
Group
Id
;
@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."
);
}
...
...
src/main/resources/application-dev.properties
View file @
c2a731ad
...
...
@@ -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.template
Group
Id
=
d9f4a79cba14ce4cbc98d6516d35bf37
opt.project.type
=
1
\ No newline at end of file
src/main/resources/application-pro.properties
View file @
c2a731ad
...
...
@@ -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.template
Group
Id
=
d9f4a79cba14ce4cbc98d6516d35bf37
opt.project.type
=
1
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment