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
d567c702
Commit
d567c702
authored
Jan 02, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
fab9f869
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
FilmController.java
src/main/java/com/egolm/film/api/web/FilmController.java
+20
-0
WebUtilController.java
.../java/com/egolm/film/api/web/admin/WebUtilController.java
+0
-19
No files found.
src/main/java/com/egolm/film/api/web/FilmController.java
View file @
d567c702
package
com
.
egolm
.
film
.
api
.
web
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.film.api.service.ExportService
;
import
com.egolm.film.api.service.FilmService
;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.bean.Fc_member_film_issuer
;
...
...
@@ -30,6 +38,9 @@ public class FilmController {
@Autowired
FilmService
memberFilmService
;
@Autowired
ExportService
exportService
;
@ResponseBody
@PostMapping
(
"get_detail"
)
@ApiOperation
(
"获取全部申报信息"
)
...
...
@@ -153,4 +164,13 @@ public class FilmController {
return
Rjx
.
jsonOk
().
set
(
"id"
,
filmBase
.
getId
());
}
@Transactional
@GetMapping
(
"exportExcel"
)
@ApiOperation
(
"导出Excel"
)
public
void
exportExcel
(
HttpServletResponse
response
)
throws
IOException
{
response
.
setContentType
(
"application/octet-stream"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
"影片列表["
+
DateUtil
.
format
(
new
Date
(),
"yyMMdd-HHmmss"
)
+
"].xls"
,
"UTF-8"
));
exportService
.
export
(
response
.
getOutputStream
());
}
}
src/main/java/com/egolm/film/api/web/admin/WebUtilController.java
View file @
d567c702
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.io.IOException
;
import
java.lang.reflect.Method
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -24,13 +18,11 @@ import org.springframework.web.servlet.mvc.condition.PatternsRequestCondition;
import
org.springframework.web.servlet.mvc.method.RequestMappingInfo
;
import
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.Util
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.api.service.ExportService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.bean.Fc_admin
;
import
com.egolm.film.bean.Fc_logs_ext
;
...
...
@@ -58,9 +50,6 @@ public class WebUtilController {
@Autowired
AdminTokenService
tokenService
;
@Autowired
ExportService
exportService
;
@Autowired
private
RequestMappingHandlerMapping
requestMappingHandlerMapping
;
...
...
@@ -193,12 +182,4 @@ public class WebUtilController {
return
Rjx
.
jsonOk
();
}
@Transactional
@GetMapping
(
"exportExcel"
)
@ApiOperation
(
"导出Excel"
)
public
void
exportExcel
(
HttpServletResponse
response
)
throws
IOException
{
response
.
setContentType
(
"application/octet-stream"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
"影片列表["
+
DateUtil
.
format
(
new
Date
(),
"yyMMdd-HHmmss"
)
+
"].xls"
,
"UTF-8"
));
exportService
.
export
(
response
.
getOutputStream
());
}
}
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