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
f582413f
Commit
f582413f
authored
Dec 27, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
c3155945
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
12 deletions
+21
-12
WebUtilController.java
.../java/com/egolm/film/api/web/admin/WebUtilController.java
+3
-5
Export.java
src/main/java/com/egolm/film/util/Export.java
+18
-7
No files found.
src/main/java/com/egolm/film/api/web/admin/WebUtilController.java
View file @
f582413f
...
@@ -81,11 +81,9 @@ public class WebUtilController {
...
@@ -81,11 +81,9 @@ public class WebUtilController {
@Transactional
@Transactional
@PostMapping
(
"exportExcel"
)
@PostMapping
(
"exportExcel"
)
@ApiOperation
(
"导出Excel"
)
@ApiOperation
(
"导出Excel"
)
public
void
exportExcel
(
String
db_host
,
String
db_name
,
String
username
,
String
password
,
HttpServletResponse
response
)
throws
SQLException
,
IOException
{
public
void
exportExcel
(
String
db_host
,
String
db_name
,
String
username
,
String
password
)
throws
SQLException
,
IOException
{
String
filename
=
"export.xls"
;
this
.
verifyAuth
();
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
new
String
(
filename
.
getBytes
()));
new
Export
(
db_host
,
db_name
,
username
,
password
).
export
();
response
.
setContentType
(
"application/octet-stream"
);
new
Export
(
db_host
,
db_name
,
username
,
password
).
export
(
response
.
getOutputStream
());
}
}
@ResponseBody
@ResponseBody
...
...
src/main/java/com/egolm/film/util/Export.java
View file @
f582413f
This diff is collapsed.
Click to expand it.
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