Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
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
licc
volunteer_service
Commits
3181f651
Commit
3181f651
authored
Mar 01, 2021
by
liaoanyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户列表导出功能修改
parent
e9af1822
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
8 deletions
+36
-8
UserController.java
...cn/wisenergy/web/admin/controller/app/UserController.java
+36
-8
No files found.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java
View file @
3181f651
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.constant.RedisConsts
;
import
cn.wisenergy.common.utils.DateUtil
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.User
;
import
cn.wisenergy.model.dto.UserCommitDto
;
...
...
@@ -128,17 +129,44 @@ public class UserController {
return
R
.
ok
(
token
);
}
@ApiOperation
(
value
=
"用户Excel导出"
,
notes
=
"方案Excel导出"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"用户信息"
,
dataType
=
"UserQueryVo"
)
@PostMapping
(
value
=
"/createExcel"
)
public
R
<
Boolean
>
createExcel
(
@RequestBody
UserQueryVo
queryVo
,
HttpServletResponse
response
){
log
.
info
(
"UserController[]createExcel[]input.param.userId,recordId:"
+
queryVo
);
@ApiOperation
(
value
=
"用户Excel导出"
,
notes
=
"用户Excel导出"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"userName"
,
value
=
"用户名"
,
dataType
=
"string"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"电话"
,
dataType
=
"string"
),
@ApiImplicitParam
(
name
=
"startTime"
,
value
=
"开始时间"
,
dataType
=
"string"
),
@ApiImplicitParam
(
name
=
"endTime"
,
value
=
"结束时间"
,
dataType
=
"string"
)
})
@GetMapping
(
value
=
"/createExcel"
)
public
R
<
Boolean
>
createExcel
(
String
userName
,
String
phone
,
String
startTime
,
String
endTime
,
HttpServletResponse
response
){
log
.
info
(
"UserController[]createExcel[]input.param:"
+
userName
,
phone
,
startTime
,
endTime
);
UserQueryVo
userQueryVo
=
new
UserQueryVo
();
if
(
StringUtils
.
isEmpty
(
userName
)){
userQueryVo
.
setUserName
(
null
);
}
else
{
userQueryVo
.
setUserName
(
userName
);
}
if
(
null
==
queryVo
)
{
return
R
.
error
(
"入参为空!"
);
if
(
StringUtils
.
isEmpty
(
phone
))
{
userQueryVo
.
setPhone
(
null
);
}
else
{
userQueryVo
.
setPhone
(
phone
);
}
if
(
StringUtils
.
isEmpty
(
endTime
))
{
userQueryVo
.
setEndTime
(
null
);
}
else
{
userQueryVo
.
setEndTime
(
DateUtil
.
getTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
));
}
if
(
StringUtils
.
isEmpty
(
startTime
))
{
userQueryVo
.
setStartTime
(
null
);
}
else
{
userQueryVo
.
setStartTime
(
DateUtil
.
getTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
));
}
return
userService
.
createExcel
(
q
ueryVo
,
response
);
return
userService
.
createExcel
(
userQ
ueryVo
,
response
);
}
}
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