refactor(excel): file => excel

This commit is contained in:
2025-06-17 21:19:57 +08:00
parent 8806eb9942
commit 5a53d953da
19 changed files with 253 additions and 119 deletions

View File

@@ -196,13 +196,24 @@
<version>${revision}</version>
</dependency>
<!-- 文件处理模块 - Excel -->
<!-- Excel 文件处理模块 - FastExcel -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-file-excel</artifactId>
<artifactId>continew-starter-excel-fastexcel</artifactId>
<version>${revision}</version>
</dependency>
<!-- Excel 文件处理模块 - POI -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-excel-poi</artifactId>
<version>${revision}</version>
</dependency>
<!-- Excel 文件处理模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-excel-core</artifactId>
<version>${revision}</version>
</dependency>
<!-- 存储模块 - 本地存储 -->
<dependency>

View File

@@ -32,6 +32,7 @@
<easy-captcha.version>1.6.2</easy-captcha.version>
<nashorn.version>15.6</nashorn.version>
<fastexcel.version>1.2.0</fastexcel.version>
<poi.version>5.4.1</poi.version>
<x-file-storage.version>2.2.1</x-file-storage.version>
<aws-s3-v1.version>1.12.783</aws-s3-v1.version>
<aws-sdk.version>2.31.63</aws-sdk.version>
@@ -207,13 +208,20 @@
<version>${nashorn.version}</version>
</dependency>
<!-- Easy Excel基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<!-- FastExcel基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>
<version>${fastexcel.version}</version>
</dependency>
<!-- Apache POI适用于 Microsoft 文档的 Java API -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- X File Storage一行代码将文件存储到本地、FTP、SFTP、WebDAV、阿里云 OSS、华为云 OBS...等其它兼容 S3 协议的存储平台) -->
<dependency>
<groupId>org.dromara.x-file-storage</groupId>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>top.continew</groupId>
<artifactId>continew-starter-excel</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-excel-core</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter Excel 文件处理模块 - 核心模块</description>
</project>

View File

@@ -0,0 +1,54 @@
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Excel导出注解
*
* @author jiang4yu
* @since 2.13.0
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcelExport {
/**
* 字段名称
*/
String value();
/**
* 导出排序先后: 数字越小越靠前默认按Java类字段顺序导出
*/
int sort() default 0;
/**
* 导出映射格式如0-未知;1-男;2-女
*/
String kv() default "";
/**
* 导出模板示例值(有值的话,直接取该值,不做映射)
*/
String example() default "";
}

View File

@@ -1,4 +1,20 @@
package top.continew.starter.file.poi.annotation;
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -6,7 +22,10 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Excel 导入注解
*
* @author jiang4yu
* @since 2.13.0
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)

View File

@@ -5,18 +5,24 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>top.continew</groupId>
<artifactId>continew-starter-file</artifactId>
<artifactId>continew-starter-excel</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-file-excel</artifactId>
<artifactId>continew-starter-excel-fastexcel</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter 文件处理模块 - Excel</description>
<description>ContiNew Starter Excel 文件处理模块 - FastExcel</description>
<dependencies>
<!-- Easy Excel基于 Java 的、快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<!-- Excel 文件处理模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-excel-core</artifactId>
</dependency>
<!-- FastExcel基于 Java 的快速、简洁、解决大文件内存溢出的 Excel 处理工具) -->
<dependency>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.converter;
package top.continew.starter.excel.converter;
import cn.idev.excel.converters.Converter;
import cn.idev.excel.enums.CellDataTypeEnum;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.converter;
package top.continew.starter.excel.converter;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.NumberUtil;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.converter;
package top.continew.starter.excel.converter;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.text.CharSequenceUtil;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package top.continew.starter.file.excel.util;
package top.continew.starter.excel.util;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
@@ -25,7 +25,7 @@ import jakarta.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import top.continew.starter.core.exception.BaseException;
import top.continew.starter.file.excel.converter.ExcelBigNumberConverter;
import top.continew.starter.excel.converter.ExcelBigNumberConverter;
import java.util.Collections;
import java.util.Date;

View File

@@ -3,37 +3,33 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>top.continew</groupId>
<artifactId>continew-starter-file</artifactId>
<artifactId>continew-starter-excel</artifactId>
<version>${revision}</version>
</parent>
<artifactId>continew-starter-file-poi</artifactId>
<description>ContiNew Starter 文件处理模块 - POI</description>
<artifactId>continew-starter-excel-poi</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter Excel 文件处理模块 - POI</description>
<dependencies>
<!-- Excel 文件处理模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-excel-core</artifactId>
</dependency>
<!-- Apache POI适用于 Microsoft 文档的 Java API -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<!-- 文件上传 -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
<!-- JSON -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<!-- POI -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.4.1</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,9 +1,28 @@
package top.continew.starter.file.poi.model;
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package top.continew.starter.excel.model;
import java.util.LinkedHashMap;
/**
* Excel 字段信息
*
* @author jiang4yu
* @since 2.13.0
*/
public class ExcelClassField {

View File

@@ -1,7 +1,23 @@
package top.continew.starter.file.poi.util;
/*
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
* <p>
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
package top.continew.starter.excel.util;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import jakarta.servlet.ServletOutputStream;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.poi.hssf.usermodel.HSSFDataValidation;
@@ -15,9 +31,9 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.web.multipart.MultipartFile;
import top.continew.starter.file.poi.annotation.ExcelExport;
import top.continew.starter.file.poi.annotation.ExcelImport;
import top.continew.starter.file.poi.model.ExcelClassField;
import top.continew.excel.annotation.ExcelExport;
import top.continew.excel.annotation.ExcelImport;
import top.continew.starter.excel.model.ExcelClassField;
import java.io.*;
import java.lang.reflect.Field;
@@ -30,11 +46,11 @@ import java.util.*;
import java.util.Map.Entry;
import java.util.regex.Pattern;
/**
* Excel导入导出工具类
*
* @author jiang4yu
* @since 2.13.0
*/
@SuppressWarnings("unused")
public class ExcelUtils {
@@ -56,7 +72,6 @@ public class ExcelUtils {
private static final int BYTES_DEFAULT_LENGTH = 10240;
private static final NumberFormat NUMBER_FORMAT = NumberFormat.getNumberInstance();
public static <T> List<T> readFile(File file, Class<T> clazz) throws Exception {
JSONArray array = readFile(file);
return getBeanList(array, clazz);
@@ -105,7 +120,7 @@ public class ExcelUtils {
for (Field field : fields) {
// 行号
if (field.getName().equals(ROW_NUM)) {
rowNum = obj.getInteger(ROW_NUM);
rowNum = obj.getInt(ROW_NUM);
field.setAccessible(true);
field.set(t, rowNum);
continue;
@@ -125,11 +140,11 @@ public class ExcelUtils {
setFieldValue(t, field, obj, uniqueBuilder, errMsgList);
}
// 数据唯一性校验
if (uniqueBuilder.length() > 0) {
if (!uniqueBuilder.isEmpty()) {
if (uniqueMap.containsValue(uniqueBuilder.toString())) {
Set<Integer> rowNumKeys = uniqueMap.keySet();
for (Integer num : rowNumKeys) {
if (uniqueMap.get(num).equals(uniqueBuilder.toString())) {
if (uniqueMap.get(num).contentEquals(uniqueBuilder)) {
errMsgList.add(String.format("数据唯一性校验失败,(%s)与第%s行重复)", uniqueBuilder, num));
}
}
@@ -160,20 +175,24 @@ public class ExcelUtils {
return t;
}
private static <T> void setFieldValue(T t, Field field, JSONObject obj, StringBuilder uniqueBuilder, List<String> errMsgList) {
private static <T> void setFieldValue(T t,
Field field,
JSONObject obj,
StringBuilder uniqueBuilder,
List<String> errMsgList) {
// 获取 ExcelImport 注解属性
ExcelImport annotation = field.getAnnotation(ExcelImport.class);
if (annotation == null) {
return;
}
String cname = annotation.value();
if (cname.trim().length() == 0) {
if (cname.trim().isEmpty()) {
return;
}
// 获取具体值
String val = null;
if (obj.containsKey(cname)) {
val = getString(obj.getString(cname));
val = getString(obj.getStr(cname));
}
if (val == null) {
return;
@@ -188,7 +207,7 @@ public class ExcelUtils {
// 数据唯一性获取
boolean unique = annotation.unique();
if (unique) {
if (uniqueBuilder.length() > 0) {
if (!uniqueBuilder.isEmpty()) {
uniqueBuilder.append("--").append(val);
} else {
uniqueBuilder.append(val);
@@ -323,7 +342,7 @@ public class ExcelUtils {
}
// 如果表头没有数据则不进行解析
if (keyMap.isEmpty()) {
return (JSONArray) Collections.emptyList();
return (JSONArray)Collections.emptyList();
}
// 获取每行JSON对象的值
JSONArray array = new JSONArray();
@@ -331,9 +350,9 @@ public class ExcelUtils {
if (rowStart == rowEnd) {
JSONObject obj = new JSONObject();
// 添加行号
obj.put(ROW_NUM, 1);
obj.putOnce(ROW_NUM, 1);
for (int i : keyMap.keySet()) {
obj.put(keyMap.get(i), "");
obj.set(keyMap.get(i), "");
}
array.add(obj);
return array;
@@ -342,14 +361,14 @@ public class ExcelUtils {
Row eachRow = sheet.getRow(i);
JSONObject obj = new JSONObject();
// 添加行号
obj.put(ROW_NUM, i + 1);
obj.set(ROW_NUM, i + 1);
StringBuilder sb = new StringBuilder();
for (int k = cellStart; k < cellEnd; k++) {
if (eachRow != null) {
String val = getCellValue(eachRow.getCell(k));
// 所有数据添加到里面用于判断该行是否为空
sb.append(val);
obj.put(keyMap.get(k), val);
obj.set(keyMap.get(k), val);
}
}
if (!sb.isEmpty()) {
@@ -394,18 +413,25 @@ public class ExcelUtils {
exportTemplate(response, fileName, fileName, clazz, false);
}
public static <T> void exportTemplate(HttpServletResponse response, String fileName, String sheetName,
public static <T> void exportTemplate(HttpServletResponse response,
String fileName,
String sheetName,
Class<T> clazz) {
exportTemplate(response, fileName, sheetName, clazz, false);
}
public static <T> void exportTemplate(HttpServletResponse response, String fileName, Class<T> clazz,
public static <T> void exportTemplate(HttpServletResponse response,
String fileName,
Class<T> clazz,
boolean isContainExample) {
exportTemplate(response, fileName, fileName, clazz, isContainExample);
}
public static <T> void exportTemplate(HttpServletResponse response, String fileName, String sheetName,
Class<T> clazz, boolean isContainExample) {
public static <T> void exportTemplate(HttpServletResponse response,
String fileName,
String sheetName,
Class<T> clazz,
boolean isContainExample) {
// 获取表头字段
List<ExcelClassField> headFieldList = getExcelClassFieldList(clazz);
// 获取表头数据和示例数据
@@ -671,18 +697,24 @@ public class ExcelUtils {
export(response, fileName, fileName, sheetDataList, null);
}
public static void exportManySheet(HttpServletResponse response, String fileName, Map<String, List<List<Object>>> sheetMap) {
public static void exportManySheet(HttpServletResponse response,
String fileName,
Map<String, List<List<Object>>> sheetMap) {
export(response, null, fileName, sheetMap, null);
}
public static void export(HttpServletResponse response, String fileName, String sheetName,
public static void export(HttpServletResponse response,
String fileName,
String sheetName,
List<List<Object>> sheetDataList) {
export(response, fileName, sheetName, sheetDataList, null);
}
public static void export(HttpServletResponse response, String fileName, String sheetName,
List<List<Object>> sheetDataList, Map<Integer, List<String>> selectMap) {
public static void export(HttpServletResponse response,
String fileName,
String sheetName,
List<List<Object>> sheetDataList,
Map<Integer, List<String>> selectMap) {
Map<String, List<List<Object>>> map = new HashMap<>();
map.put(sheetName, sheetDataList);
@@ -707,12 +739,18 @@ public class ExcelUtils {
export(response, fileName, sheetDataList);
}
public static void export(HttpServletResponse response, String fileName, List<List<Object>> sheetDataList, Map<Integer, List<String>> selectMap) {
public static void export(HttpServletResponse response,
String fileName,
List<List<Object>> sheetDataList,
Map<Integer, List<String>> selectMap) {
export(response, fileName, fileName, sheetDataList, selectMap);
}
private static void export(HttpServletResponse response, File file, String fileName,
Map<String, List<List<Object>>> sheetMap, Map<Integer, List<String>> selectMap) {
private static void export(HttpServletResponse response,
File file,
String fileName,
Map<String, List<List<Object>>> sheetMap,
Map<Integer, List<String>> selectMap) {
// 整个 Excel 表格 book 对象
SXSSFWorkbook book = new SXSSFWorkbook();
// 每个 Sheet
@@ -747,7 +785,7 @@ public class ExcelUtils {
int v = 0;
if (o instanceof URL) {
// 如果要导出图片的话, 链接需要传递 URL 对象
setCellPicture(book, row, patriarch, i, j, (URL) o);
setCellPicture(book, row, patriarch, i, j, (URL)o);
} else {
Cell cell = row.createCell(j);
if (i == 0) {
@@ -902,19 +940,19 @@ public class ExcelUtils {
// 是否为Boolean
if (o instanceof Boolean) {
cell.setCellType(CellType.BOOLEAN);
cell.setCellValue((Boolean) o);
cell.setCellValue((Boolean)o);
return CELL_OTHER;
}
// 如果是BigDecimal则默认3位小数
if (o instanceof BigDecimal) {
cell.setCellType(CellType.NUMERIC);
cell.setCellValue(((BigDecimal) o).setScale(3, RoundingMode.HALF_UP).doubleValue());
cell.setCellValue(((BigDecimal)o).setScale(3, RoundingMode.HALF_UP).doubleValue());
return CELL_OTHER;
}
// 如果是Date数据则显示格式化数据
if (o instanceof Date) {
cell.setCellType(CellType.STRING);
cell.setCellValue(formatDate((Date) o));
cell.setCellValue(formatDate((Date)o));
return CELL_OTHER;
}
// 如果是其他则默认字符串类型
@@ -925,7 +963,7 @@ public class ExcelUtils {
private static void setCellPicture(SXSSFWorkbook wb, Row sr, Drawing<?> patriarch, int x, int y, URL url) {
// 设置图片宽高
sr.setHeight((short) (IMG_WIDTH * IMG_HEIGHT));
sr.setHeight((short)(IMG_WIDTH * IMG_HEIGHT));
// jdk1.7版本try中定义流可自动关闭
try (InputStream is = url.openStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
byte[] buff = new byte[BYTES_DEFAULT_LENGTH];
@@ -984,7 +1022,7 @@ public class ExcelUtils {
if (Objects.nonNull(str) && "0.0".equals(str)) {
return true;
}
for (int i = str.length(); --i >= 0; ) {
for (int i = str.length(); --i >= 0;) {
if (!Character.isDigit(str.charAt(i))) {
return false;
}

View File

@@ -9,15 +9,16 @@
<version>${revision}</version>
</parent>
<artifactId>continew-starter-file</artifactId>
<artifactId>continew-starter-excel</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>ContiNew Starter 文件处理模块</description>
<description>ContiNew Starter Excel 文件处理模块</description>
<modules>
<module>continew-starter-file-excel</module>
<module>continew-starter-file-poi</module>
<module>continew-starter-excel-core</module>
<module>continew-starter-excel-fastexcel</module>
<module>continew-starter-excel-poi</module>
</modules>
<dependencies>

View File

@@ -34,10 +34,10 @@
<artifactId>continew-starter-data-core</artifactId>
</dependency>
<!-- 文件处理模块 - Excel -->
<!-- Excel 文件处理模块 - FastExcel -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-file-excel</artifactId>
<artifactId>continew-starter-excel-fastexcel</artifactId>
</dependency>
<!-- Crane4j基于注解的用于完成一切 “根据 A 的 key 值拿到 B再把 B 的属性映射到 A” 这类需求的字段填充框架) -->

View File

@@ -44,7 +44,7 @@ import top.continew.starter.extension.crud.model.entity.BaseIdDO;
import top.continew.starter.extension.crud.model.query.PageQuery;
import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.resp.PageResp;
import top.continew.starter.file.excel.util.ExcelUtils;
import top.continew.starter.excel.util.ExcelUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;

View File

@@ -51,7 +51,7 @@ import top.continew.starter.extension.crud.model.query.PageQuery;
import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
import top.continew.starter.extension.crud.model.resp.PageResp;
import top.continew.starter.file.excel.util.ExcelUtils;
import top.continew.starter.excel.util.ExcelUtils;
import java.lang.reflect.Field;
import java.util.*;

View File

@@ -1,35 +0,0 @@
package top.continew.starter.file.poi.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author jiang4yu
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcelExport {
/**
* 字段名称
*/
String value();
/**
* 导出排序先后: 数字越小越靠前默认按Java类字段顺序导出
*/
int sort() default 0;
/**
* 导出映射格式如0-未知;1-男;2-女
*/
String kv() default "";
/**
* 导出模板示例值(有值的话,直接取该值,不做映射)
*/
String example() default "";
}

View File

@@ -49,7 +49,7 @@
<module>continew-starter-captcha</module>
<module>continew-starter-messaging</module>
<module>continew-starter-log</module>
<module>continew-starter-file</module>
<module>continew-starter-excel</module>
<module>continew-starter-storage</module>
<module>continew-starter-license</module>
<module>continew-starter-extension</module>