update: springboot 2.6.8 ==> 2.6.9
parent
f4217fe4d7
commit
14594e492e
|
@ -16,7 +16,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<revision>1.6.2-snapshot</revision>
|
<revision>1.6.2-snapshot</revision>
|
||||||
<!-- 统一依赖管理 -->
|
<!-- 统一依赖管理 -->
|
||||||
<spring.boot.version>2.6.8</spring.boot.version>
|
<spring.boot.version>2.6.9</spring.boot.version>
|
||||||
<!-- Web 相关 -->
|
<!-- Web 相关 -->
|
||||||
<knife4j.version>3.0.3</knife4j.version>
|
<knife4j.version>3.0.3</knife4j.version>
|
||||||
<swagger-annotations.version>1.6.6</swagger-annotations.version>
|
<swagger-annotations.version>1.6.6</swagger-annotations.version>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
||||||
<mybatis-plus-generator.version>3.5.2</mybatis-plus-generator.version>
|
<mybatis-plus-generator.version>3.5.2</mybatis-plus-generator.version>
|
||||||
<dynamic-datasource.version>3.5.0</dynamic-datasource.version>
|
<dynamic-datasource.version>3.5.0</dynamic-datasource.version>
|
||||||
<redisson.version>3.17.3</redisson.version>
|
<redisson.version>3.17.4</redisson.version>
|
||||||
<!-- Config 配置中心相关 -->
|
<!-- Config 配置中心相关 -->
|
||||||
<apollo.version>1.9.2</apollo.version>
|
<apollo.version>1.9.2</apollo.version>
|
||||||
<!-- Job 定时任务相关 -->
|
<!-- Job 定时任务相关 -->
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<lombok.version>1.18.20</lombok.version>
|
<lombok.version>1.18.20</lombok.version>
|
||||||
<mapstruct.version>1.4.1.Final</mapstruct.version>
|
<mapstruct.version>1.4.1.Final</mapstruct.version>
|
||||||
<hutool.version>5.6.1</hutool.version>
|
<hutool.version>5.6.1</hutool.version>
|
||||||
<easyexcel.verion>2.2.7</easyexcel.verion>
|
<easyexcel.verion>3.1.1</easyexcel.verion>
|
||||||
<velocity.version>2.2</velocity.version>
|
<velocity.version>2.2</velocity.version>
|
||||||
<screw.version>1.0.5</screw.version>
|
<screw.version>1.0.5</screw.version>
|
||||||
<fastjson.version>2.0.5</fastjson.version>
|
<fastjson.version>2.0.5</fastjson.version>
|
||||||
|
|
|
@ -5,8 +5,9 @@ import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||||
import com.alibaba.excel.converters.Converter;
|
import com.alibaba.excel.converters.Converter;
|
||||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||||
import com.alibaba.excel.metadata.CellData;
|
|
||||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||||
|
import com.alibaba.excel.metadata.data.ReadCellData;
|
||||||
|
import com.alibaba.excel.metadata.data.WriteCellData;
|
||||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@ -29,11 +30,11 @@ public class DictConvert implements Converter<Object> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
|
public Object convertToJavaData(ReadCellData readCellData, ExcelContentProperty contentProperty,
|
||||||
GlobalConfiguration globalConfiguration) {
|
GlobalConfiguration globalConfiguration) {
|
||||||
// 使用字典解析
|
// 使用字典解析
|
||||||
String type = getType(contentProperty);
|
String type = getType(contentProperty);
|
||||||
String label = cellData.getStringValue();
|
String label = readCellData.getStringValue();
|
||||||
String value = DictFrameworkUtils.parseDictDataValue(type, label);
|
String value = DictFrameworkUtils.parseDictDataValue(type, label);
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
log.error("[convertToJavaData][type({}) 解析不掉 label({})]", type, label);
|
log.error("[convertToJavaData][type({}) 解析不掉 label({})]", type, label);
|
||||||
|
@ -45,11 +46,11 @@ public class DictConvert implements Converter<Object> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty,
|
public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty,
|
||||||
GlobalConfiguration globalConfiguration) {
|
GlobalConfiguration globalConfiguration) {
|
||||||
// 空时,返回空
|
// 空时,返回空
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return new CellData<>("");
|
return new WriteCellData<>("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 使用字典格式化
|
// 使用字典格式化
|
||||||
|
@ -58,10 +59,10 @@ public class DictConvert implements Converter<Object> {
|
||||||
String label = DictFrameworkUtils.getDictDataLabel(type, value);
|
String label = DictFrameworkUtils.getDictDataLabel(type, value);
|
||||||
if (label == null) {
|
if (label == null) {
|
||||||
log.error("[convertToExcelData][type({}) 转换不了 label({})]", type, value);
|
log.error("[convertToExcelData][type({}) 转换不了 label({})]", type, value);
|
||||||
return new CellData<>("");
|
return new WriteCellData<>("");
|
||||||
}
|
}
|
||||||
// 生成 Excel 小表格
|
// 生成 Excel 小表格
|
||||||
return new CellData<>(label);
|
return new WriteCellData<>(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getType(ExcelContentProperty contentProperty) {
|
private static String getType(ExcelContentProperty contentProperty) {
|
||||||
|
|
|
@ -3,8 +3,8 @@ package cn.iocoder.yudao.framework.excel.core.convert;
|
||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import com.alibaba.excel.converters.Converter;
|
import com.alibaba.excel.converters.Converter;
|
||||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||||
import com.alibaba.excel.metadata.CellData;
|
|
||||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||||
|
import com.alibaba.excel.metadata.data.WriteCellData;
|
||||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,15 +25,10 @@ public class JsonConvert implements Converter<Object> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
|
public WriteCellData<String> convertToExcelData(Object value, ExcelContentProperty contentProperty,
|
||||||
throw new UnsupportedOperationException("暂不支持,也不需要");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CellData<String> convertToExcelData(Object value, ExcelContentProperty contentProperty,
|
|
||||||
GlobalConfiguration globalConfiguration) {
|
GlobalConfiguration globalConfiguration) {
|
||||||
// 生成 Excel 小表格
|
// 生成 Excel 小表格
|
||||||
return new CellData<>(JsonUtils.toJsonString(value));
|
return new WriteCellData<>(JsonUtils.toJsonString(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue