Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
c0d63ae5
Commit
c0d63ae5
authored
Mar 04, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
916efed5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
FilmUploadController.java
...va/com/egolm/film/api/web/admin/FilmUploadController.java
+29
-1
No files found.
src/main/java/com/egolm/film/api/web/admin/FilmUploadController.java
View file @
c0d63ae5
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -16,6 +17,7 @@ import com.egolm.common.jdbc.Page;
import
com.egolm.film.api.service.OtherUploadService
;
import
com.egolm.film.bean.Fc_film_upload
;
import
com.egolm.film.util.FilmContrants
;
import
com.egolm.film.util.OSSUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -180,4 +182,30 @@ public class FilmUploadController {
otherUploadService
.
updateFail
(
film_no
,
number
,
errorMessage
);
return
Rjx
.
jsonOk
();
}
@Value
(
"${aliyun.sts.accessKeyId}"
)
private
String
accessKeyId
;
@Value
(
"${aliyun.sts.accessKeySecret}"
)
private
String
accessKeySecret
;
@Value
(
"${aliyun.oss.endpoint}"
)
private
String
endpoint
;
@Value
(
"${aliyun.oss.bucket}"
)
private
String
bucket
;
@ResponseBody
@Transactional
@PostMapping
(
"getOssMvPath"
)
@ApiOperation
(
"获取OSS图片访问路径"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
true
,
name
=
"film_no"
,
value
=
"影片NO"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"int"
,
required
=
false
,
name
=
"number"
,
value
=
"集数"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"String"
,
required
=
false
,
name
=
"errorMessage"
,
value
=
"失败原因"
),
})
public
Object
getOssMvPath
(
String
tv_poster
){
OSSUtils
ossUtil
=
new
OSSUtils
(
endpoint
,
accessKeyId
,
accessKeySecret
);
String
ossPicPath
=
ossUtil
.
urlSign
(
bucket
,
tv_poster
,
60
*
24
);
ossUtil
.
closeOssClient
();
return
Rjx
.
jsonOk
().
setData
(
ossPicPath
);
}
}
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