Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rtjl
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
rtjl
Commits
9180c464
提交
9180c464
authored
12月 12, 2019
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
43e0c31c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
41 行增加
和
1 行删除
+41
-1
LoginLogController.java
.../zrqx/member/bg/member/controller/LoginLogController.java
+38
-0
LoginLogListVO.java
.../com/zrqx/member/commons/vo/bg/member/LoginLogListVO.java
+3
-1
没有找到文件。
app/member/src/main/java/com/zrqx/member/bg/member/controller/LoginLogController.java
浏览文件 @
9180c464
package
com
.
zrqx
.
member
.
bg
.
member
.
controller
;
package
com
.
zrqx
.
member
.
bg
.
member
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -8,12 +13,15 @@ import org.springframework.web.bind.annotation.GetMapping;
...
@@ -8,12 +13,15 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zrqx.core.util.bean.BeanUtils
;
import
com.zrqx.core.util.excelutil.ExcelUtil
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageInfo
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.page.PageParam
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.core.util.response.CallBack
;
import
com.zrqx.member.bg.member.service.LoginLogService
;
import
com.zrqx.member.bg.member.service.LoginLogService
;
import
com.zrqx.member.commons.form.bg.member.QueryLoginLogForm
;
import
com.zrqx.member.commons.form.bg.member.QueryLoginLogForm
;
import
com.zrqx.member.commons.model.LoginLog
;
import
com.zrqx.member.commons.model.LoginLog
;
import
com.zrqx.member.commons.vo.bg.member.LoginLogListVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -52,4 +60,34 @@ public class LoginLogController {
...
@@ -52,4 +60,34 @@ public class LoginLogController {
return
CallBack
.
success
(
llService
.
queryExample
(
pageParam
,
ex
));
return
CallBack
.
success
(
llService
.
queryExample
(
pageParam
,
ex
));
}
}
@ApiOperation
(
"导出会员信息Excel"
)
@GetMapping
(
"/export"
)
public
CallBack
<?>
exportMemberPage
(
QueryLoginLogForm
form
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Example
ex
=
llService
.
createExample
();
Criteria
cr
=
ex
.
createCriteria
();
if
(
form
.
getLoginAccount
()
!=
null
)
{
cr
.
andLike
(
"loginAccount"
,
form
.
getLoginAccount
()+
"%"
);
}
if
(
StringUtils
.
isNotBlank
(
form
.
getBeginTime
()))
{
cr
.
andGreaterThanOrEqualTo
(
"createTime"
,
form
.
getBeginTime
());
}
if
(
StringUtils
.
isNotBlank
(
form
.
getEndTime
()))
{
cr
.
andLessThanOrEqualTo
(
"createTime"
,
form
.
getEndTime
()+
" 23:59:59"
);
}
List
<
LoginLog
>
loginLogList
=
llService
.
selectByExample
(
ex
);
List
<
LoginLogListVO
>
list
=
BeanUtils
.
copyList
(
loginLogList
,
LoginLogListVO
.
class
);
for
(
LoginLogListVO
loginLogListVO
:
list
)
{
loginLogListVO
.
setChannel
(
"app"
);
}
try
{
ExcelUtil
.
getInstance
().
exportExcel
(
list
,
LoginLogListVO
.
class
,
"用户登录信息信息.xlsx"
,
response
,
request
);
}
catch
(
Exception
e
)
{
return
CallBack
.
fail
(
e
.
getMessage
());
}
return
CallBack
.
success
();
}
}
}
app/member/src/main/java/com/zrqx/member/commons/vo/bg/member/LoginLogListVO.java
浏览文件 @
9180c464
...
@@ -6,6 +6,8 @@ import lombok.Data;
...
@@ -6,6 +6,8 @@ import lombok.Data;
import
com.zrqx.core.util.excelutil.ExcelResources
;
import
com.zrqx.core.util.excelutil.ExcelResources
;
import
io.swagger.annotations.ApiModelProperty
;
@Data
@Data
public
class
LoginLogListVO
{
public
class
LoginLogListVO
{
...
@@ -16,7 +18,7 @@ public class LoginLogListVO {
...
@@ -16,7 +18,7 @@ public class LoginLogListVO {
@ExcelResources
(
title
=
"登录时间"
,
order
=
3
)
@ExcelResources
(
title
=
"登录时间"
,
order
=
3
)
private
Date
createTime
;
private
Date
createTime
;
@ExcelResources
(
title
=
"登录方式"
,
order
=
4
)
@ExcelResources
(
title
=
"登录方式"
,
order
=
4
)
private
String
channel
_zh
;
private
String
channel
;
@ExcelResources
(
title
=
"描述"
,
order
=
5
)
@ExcelResources
(
title
=
"描述"
,
order
=
5
)
private
String
description
;
private
String
description
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论