Skip to content

Commit 5a53d95

Browse files
committed
refactor(excel): file => excel
1 parent 8806eb9 commit 5a53d95

File tree

19 files changed

+252
-118
lines changed

19 files changed

+252
-118
lines changed

continew-starter-bom/pom.xml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,24 @@
196196
<version>${revision}</version>
197197
</dependency>
198198

199-
<!-- 文件处理模块 - Excel -->
199+
<!-- Excel 文件处理模块 - FastExcel -->
200200
<dependency>
201201
<groupId>top.continew</groupId>
202-
<artifactId>continew-starter-file-excel</artifactId>
202+
<artifactId>continew-starter-excel-fastexcel</artifactId>
203+
<version>${revision}</version>
204+
</dependency>
205+
<!-- Excel 文件处理模块 - POI -->
206+
<dependency>
207+
<groupId>top.continew</groupId>
208+
<artifactId>continew-starter-excel-poi</artifactId>
209+
<version>${revision}</version>
210+
</dependency>
211+
<!-- Excel 文件处理模块 - 核心模块 -->
212+
<dependency>
213+
<groupId>top.continew</groupId>
214+
<artifactId>continew-starter-excel-core</artifactId>
203215
<version>${revision}</version>
204216
</dependency>
205-
206217

207218
<!-- 存储模块 - 本地存储 -->
208219
<dependency>

continew-starter-dependencies/pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<easy-captcha.version>1.6.2</easy-captcha.version>
3333
<nashorn.version>15.6</nashorn.version>
3434
<fastexcel.version>1.2.0</fastexcel.version>
35+
<poi.version>5.4.1</poi.version>
3536
<x-file-storage.version>2.2.1</x-file-storage.version>
3637
<aws-s3-v1.version>1.12.783</aws-s3-v1.version>
3738
<aws-sdk.version>2.31.63</aws-sdk.version>
@@ -207,13 +208,20 @@
207208
<version>${nashorn.version}</version>
208209
</dependency>
209210

210-
<!-- Easy Excel(基于 Java 的、快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
211+
<!-- FastExcel(基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
211212
<dependency>
212213
<groupId>cn.idev.excel</groupId>
213214
<artifactId>fastexcel</artifactId>
214215
<version>${fastexcel.version}</version>
215216
</dependency>
216217

218+
<!-- Apache POI(适用于 Microsoft 文档的 Java API) -->
219+
<dependency>
220+
<groupId>org.apache.poi</groupId>
221+
<artifactId>poi-ooxml</artifactId>
222+
<version>${poi.version}</version>
223+
</dependency>
224+
217225
<!-- X File Storage(一行代码将文件存储到本地、FTP、SFTP、WebDAV、阿里云 OSS、华为云 OBS...等其它兼容 S3 协议的存储平台) -->
218226
<dependency>
219227
<groupId>org.dromara.x-file-storage</groupId>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>top.continew</groupId>
8+
<artifactId>continew-starter-excel</artifactId>
9+
<version>${revision}</version>
10+
</parent>
11+
12+
<artifactId>continew-starter-excel-core</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<name>${project.artifactId}</name>
16+
<description>ContiNew Starter Excel 文件处理模块 - 核心模块</description>
17+
</project>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
3+
* <p>
4+
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* <p>
8+
* http://www.gnu.org/licenses/lgpl.html
9+
* <p>
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package top.continew.excel.annotation;
18+
19+
import java.lang.annotation.ElementType;
20+
import java.lang.annotation.Retention;
21+
import java.lang.annotation.RetentionPolicy;
22+
import java.lang.annotation.Target;
23+
24+
/**
25+
* Excel导出注解
26+
*
27+
* @author jiang4yu
28+
* @since 2.13.0
29+
*/
30+
@Target(ElementType.FIELD)
31+
@Retention(RetentionPolicy.RUNTIME)
32+
public @interface ExcelExport {
33+
34+
/**
35+
* 字段名称
36+
*/
37+
String value();
38+
39+
/**
40+
* 导出排序先后: 数字越小越靠前(默认按Java类字段顺序导出)
41+
*/
42+
int sort() default 0;
43+
44+
/**
45+
* 导出映射,格式如:0-未知;1-男;2-女
46+
*/
47+
String kv() default "";
48+
49+
/**
50+
* 导出模板示例值(有值的话,直接取该值,不做映射)
51+
*/
52+
String example() default "";
53+
54+
}
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1-
package top.continew.starter.file.poi.annotation;
1+
/*
2+
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
3+
* <p>
4+
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* <p>
8+
* http://www.gnu.org/licenses/lgpl.html
9+
* <p>
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package top.continew.excel.annotation;
218

319
import java.lang.annotation.ElementType;
420
import java.lang.annotation.Retention;
521
import java.lang.annotation.RetentionPolicy;
622
import java.lang.annotation.Target;
723

824
/**
25+
* Excel 导入注解
26+
*
927
* @author jiang4yu
28+
* @since 2.13.0
1029
*/
1130
@Target(ElementType.FIELD)
1231
@Retention(RetentionPolicy.RUNTIME)

continew-starter-file/continew-starter-file-excel/pom.xml renamed to continew-starter-excel/continew-starter-excel-fastexcel/pom.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@
55
<modelVersion>4.0.0</modelVersion>
66
<parent>
77
<groupId>top.continew</groupId>
8-
<artifactId>continew-starter-file</artifactId>
8+
<artifactId>continew-starter-excel</artifactId>
99
<version>${revision}</version>
1010
</parent>
1111

12-
<artifactId>continew-starter-file-excel</artifactId>
12+
<artifactId>continew-starter-excel-fastexcel</artifactId>
1313
<packaging>jar</packaging>
1414

1515
<name>${project.artifactId}</name>
16-
<description>ContiNew Starter 文件处理模块 - Excel</description>
16+
<description>ContiNew Starter Excel 文件处理模块 - FastExcel</description>
1717

1818
<dependencies>
19-
<!-- Easy Excel(基于 Java 的、快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
19+
<!-- Excel 文件处理模块 - 核心模块 -->
20+
<dependency>
21+
<groupId>top.continew</groupId>
22+
<artifactId>continew-starter-excel-core</artifactId>
23+
</dependency>
24+
25+
<!-- FastExcel(基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
2026
<dependency>
2127
<groupId>cn.idev.excel</groupId>
2228
<artifactId>fastexcel</artifactId>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package top.continew.starter.file.excel.converter;
17+
package top.continew.starter.excel.converter;
1818

1919
import cn.idev.excel.converters.Converter;
2020
import cn.idev.excel.enums.CellDataTypeEnum;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package top.continew.starter.file.excel.converter;
17+
package top.continew.starter.excel.converter;
1818

1919
import cn.hutool.core.convert.Convert;
2020
import cn.hutool.core.util.NumberUtil;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package top.continew.starter.file.excel.converter;
17+
package top.continew.starter.excel.converter;
1818

1919
import cn.hutool.core.collection.CollUtil;
2020
import cn.hutool.core.text.CharSequenceUtil;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package top.continew.starter.file.excel.util;
17+
package top.continew.starter.excel.util;
1818

1919
import cn.hutool.core.date.DatePattern;
2020
import cn.hutool.core.date.DateUtil;
@@ -25,7 +25,7 @@
2525
import org.slf4j.Logger;
2626
import org.slf4j.LoggerFactory;
2727
import top.continew.starter.core.exception.BaseException;
28-
import top.continew.starter.file.excel.converter.ExcelBigNumberConverter;
28+
import top.continew.starter.excel.converter.ExcelBigNumberConverter;
2929

3030
import java.util.Collections;
3131
import java.util.Date;

0 commit comments

Comments
 (0)