Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
程序猿小郑
microservices-platform
提交
c72aeaad
microservices-platform
项目概览
程序猿小郑
/
microservices-platform
与 Fork 源项目一致
Fork自
zlt2000 / microservices-platform
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
microservices-platform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c72aeaad
编写于
8月 12, 2019
作者:
zlt2000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
升级easypoi到v4.1.0,并解决poi包冲突问题
上级
d857cc17
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
30 deletion
+24
-30
pom.xml
pom.xml
+10
-15
zlt-business/user-center/pom.xml
zlt-business/user-center/pom.xml
+0
-9
zlt-business/user-center/src/main/java/com/central/user/model/SysUserExcel.java
...er/src/main/java/com/central/user/model/SysUserExcel.java
+1
-1
zlt-commons/zlt-common-spring-boot-starter/pom.xml
zlt-commons/zlt-common-spring-boot-starter/pom.xml
+8
-0
zlt-commons/zlt-common-spring-boot-starter/src/main/java/com/central/common/utils/ExcelUtil.java
...ter/src/main/java/com/central/common/utils/ExcelUtil.java
+3
-3
zlt-web/back-web/src/main/resources/static/pages/system/user.html
...back-web/src/main/resources/static/pages/system/user.html
+2
-2
未找到文件。
pom.xml
浏览文件 @
c72aeaad
...
...
@@ -31,7 +31,8 @@
<mybatis-plus-boot-starter.version>
3.1.2
</mybatis-plus-boot-starter.version>
<aliyun-sdk-oss>
3.4.2
</aliyun-sdk-oss>
<qiniu-java-sdk>
7.2.18
</qiniu-java-sdk>
<easypoi.version>
4.0.0
</easypoi.version>
<easypoi.version>
4.1.0
</easypoi.version>
<poi.version>
4.1.0
</poi.version>
<spring-boot-admin.version>
2.0.6
</spring-boot-admin.version>
<velocity.version>
1.7
</velocity.version>
<commons-configuration.version>
1.10
</commons-configuration.version>
...
...
@@ -225,26 +226,20 @@
<artifactId>
qiniu-java-sdk
</artifactId>
<version>
${qiniu-java-sdk}
</version>
</dependency>
<!-- easypoi -->
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
${easypoi.version}
</version>
<exclusions>
<exclusion>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
</exclusion>
</exclusions>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
<version>
${poi.version}
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-web
</artifactId>
<version>
${
easy
poi.version}
</version>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
${poi.version}
</version>
</dependency>
<!-- easypoi -->
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-
annotation
</artifactId>
<artifactId>
easypoi-
base
</artifactId>
<version>
${easypoi.version}
</version>
</dependency>
<dependency>
...
...
zlt-business/user-center/pom.xml
浏览文件 @
c72aeaad
...
...
@@ -63,15 +63,6 @@
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-web
</artifactId>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-annotation
</artifactId>
</dependency>
<dependency>
<groupId>
io.micrometer
</groupId>
<artifactId>
micrometer-registry-prometheus
</artifactId>
...
...
zlt-business/user-center/src/main/java/com/central/user/model/SysUserExcel.java
浏览文件 @
c72aeaad
...
...
@@ -24,7 +24,7 @@ public class SysUserExcel implements Serializable {
@Excel
(
name
=
"手机号码"
,
height
=
20
,
width
=
30
,
isImportField
=
"true_st"
)
private
String
mobile
;
@Excel
(
name
=
"
学生性别"
,
replace
=
{
"男_0"
,
"女_1"
},
suffix
=
"生"
,
isImportField
=
"true_st"
)
@Excel
(
name
=
"
性别"
,
replace
=
{
"男_0"
,
"女_1"
}
,
isImportField
=
"true_st"
)
private
Integer
sex
;
@Excel
(
name
=
"创建时间"
,
format
=
CommonConstant
.
DATETIME_FORMAT
,
isImportField
=
"true_st"
,
width
=
20
)
...
...
zlt-commons/zlt-common-spring-boot-starter/pom.xml
浏览文件 @
c72aeaad
...
...
@@ -54,6 +54,14 @@
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
</dependency>
<!-- easypoi -->
<dependency>
<groupId>
cn.afterturn
</groupId>
...
...
zlt-commons/zlt-common-spring-boot-starter/src/main/java/com/central/common/utils/ExcelUtil.java
浏览文件 @
c72aeaad
...
...
@@ -42,7 +42,7 @@ public class ExcelUtil {
*/
public
static
void
exportExcel
(
List
<?>
list
,
String
title
,
String
sheetName
,
Class
<?>
pojoClass
,
String
fileName
,
boolean
isCreateHeader
,
HttpServletResponse
response
)
throws
IOException
{
ExportParams
exportParams
=
new
ExportParams
(
title
,
sheetName
);
ExportParams
exportParams
=
new
ExportParams
(
title
,
sheetName
,
ExcelType
.
XSSF
);
exportParams
.
setCreateHeadRows
(
isCreateHeader
);
defaultExport
(
list
,
pojoClass
,
fileName
,
response
,
exportParams
);
...
...
@@ -61,7 +61,7 @@ public class ExcelUtil {
*/
public
static
void
exportExcel
(
List
<?>
list
,
String
title
,
String
sheetName
,
Class
<?>
pojoClass
,
String
fileName
,
HttpServletResponse
response
)
throws
IOException
{
defaultExport
(
list
,
pojoClass
,
fileName
,
response
,
new
ExportParams
(
title
,
sheetName
));
defaultExport
(
list
,
pojoClass
,
fileName
,
response
,
new
ExportParams
(
title
,
sheetName
,
ExcelType
.
XSSF
));
}
/**
...
...
@@ -93,7 +93,7 @@ public class ExcelUtil {
private
static
void
downLoadExcel
(
String
fileName
,
HttpServletResponse
response
,
Workbook
workbook
)
throws
IOException
{
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
set
Header
(
"content-Type"
,
"application/vnd.ms-excel
"
);
response
.
set
ContentType
(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
workbook
.
write
(
response
.
getOutputStream
());
}
...
...
zlt-web/back-web/src/main/resources/static/pages/system/user.html
浏览文件 @
c72aeaad
...
...
@@ -150,12 +150,12 @@
$
(
'
#user-btn-export
'
).
click
(
function
()
{
var
url
=
config
.
base_server
+
'
api-user/users/export?access_token=
'
+
config
.
getToken
().
access_token
;
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'
GE
T
'
,
url
,
true
);
xhr
.
open
(
'
POS
T
'
,
url
,
true
);
xhr
.
responseType
=
"
blob
"
;
xhr
.
setRequestHeader
(
"
client_type
"
,
"
DESKTOP_WEB
"
);
xhr
.
onload
=
function
()
{
if
(
this
.
status
==
200
)
{
var
fileName
=
"
user.xls
"
;
var
fileName
=
"
user.xls
x
"
;
var
blob
=
this
.
response
;
var
a
=
document
.
createElement
(
'
a
'
);
a
.
innerHTML
=
fileName
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录