Commit 14594e492e62e966521650b974e1470f3196119e

Authored by xingyu
1 parent f4217fe4

update: springboot 2.6.8 ==> 2.6.9

yudao-dependencies/pom.xml
... ... @@ -16,7 +16,7 @@
16 16 <properties>
17 17 <revision>1.6.2-snapshot</revision>
18 18 <!-- 统一依赖管理 -->
19   - <spring.boot.version>2.6.8</spring.boot.version>
  19 + <spring.boot.version>2.6.9</spring.boot.version>
20 20 <!-- Web 相关 -->
21 21 <knife4j.version>3.0.3</knife4j.version>
22 22 <swagger-annotations.version>1.6.6</swagger-annotations.version>
... ... @@ -26,7 +26,7 @@
26 26 <mybatis-plus.version>3.5.2</mybatis-plus.version>
27 27 <mybatis-plus-generator.version>3.5.2</mybatis-plus-generator.version>
28 28 <dynamic-datasource.version>3.5.0</dynamic-datasource.version>
29   - <redisson.version>3.17.3</redisson.version>
  29 + <redisson.version>3.17.4</redisson.version>
30 30 <!-- Config 配置中心相关 -->
31 31 <apollo.version>1.9.2</apollo.version>
32 32 <!-- Job 定时任务相关 -->
... ... @@ -49,7 +49,7 @@
49 49 <lombok.version>1.18.20</lombok.version>
50 50 <mapstruct.version>1.4.1.Final</mapstruct.version>
51 51 <hutool.version>5.6.1</hutool.version>
52   - <easyexcel.verion>2.2.7</easyexcel.verion>
  52 + <easyexcel.verion>3.1.1</easyexcel.verion>
53 53 <velocity.version>2.2</velocity.version>
54 54 <screw.version>1.0.5</screw.version>
55 55 <fastjson.version>2.0.5</fastjson.version>
... ...
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/DictConvert.java
... ... @@ -5,8 +5,9 @@ import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
5 5 import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
6 6 import com.alibaba.excel.converters.Converter;
7 7 import com.alibaba.excel.enums.CellDataTypeEnum;
8   -import com.alibaba.excel.metadata.CellData;
9 8 import com.alibaba.excel.metadata.GlobalConfiguration;
  9 +import com.alibaba.excel.metadata.data.ReadCellData;
  10 +import com.alibaba.excel.metadata.data.WriteCellData;
10 11 import com.alibaba.excel.metadata.property.ExcelContentProperty;
11 12 import lombok.extern.slf4j.Slf4j;
12 13  
... ... @@ -29,11 +30,11 @@ public class DictConvert implements Converter&lt;Object&gt; {
29 30 }
30 31  
31 32 @Override
32   - public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
  33 + public Object convertToJavaData(ReadCellData readCellData, ExcelContentProperty contentProperty,
33 34 GlobalConfiguration globalConfiguration) {
34 35 // 使用字典解析
35 36 String type = getType(contentProperty);
36   - String label = cellData.getStringValue();
  37 + String label = readCellData.getStringValue();
37 38 String value = DictFrameworkUtils.parseDictDataValue(type, label);
38 39 if (value == null) {
39 40 log.error("[convertToJavaData][type({}) 解析不掉 label({})]", type, label);
... ... @@ -45,11 +46,11 @@ public class DictConvert implements Converter&lt;Object&gt; {
45 46 }
46 47  
47 48 @Override
48   - public CellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty,
49   - GlobalConfiguration globalConfiguration) {
  49 + public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty,
  50 + GlobalConfiguration globalConfiguration) {
50 51 // 空时,返回空
51 52 if (object == null) {
52   - return new CellData<>("");
  53 + return new WriteCellData<>("");
53 54 }
54 55  
55 56 // 使用字典格式化
... ... @@ -58,10 +59,10 @@ public class DictConvert implements Converter&lt;Object&gt; {
58 59 String label = DictFrameworkUtils.getDictDataLabel(type, value);
59 60 if (label == null) {
60 61 log.error("[convertToExcelData][type({}) 转换不了 label({})]", type, value);
61   - return new CellData<>("");
  62 + return new WriteCellData<>("");
62 63 }
63 64 // 生成 Excel 小表格
64   - return new CellData<>(label);
  65 + return new WriteCellData<>(label);
65 66 }
66 67  
67 68 private static String getType(ExcelContentProperty contentProperty) {
... ...
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/JsonConvert.java
... ... @@ -3,8 +3,8 @@ package cn.iocoder.yudao.framework.excel.core.convert;
3 3 import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
4 4 import com.alibaba.excel.converters.Converter;
5 5 import com.alibaba.excel.enums.CellDataTypeEnum;
6   -import com.alibaba.excel.metadata.CellData;
7 6 import com.alibaba.excel.metadata.GlobalConfiguration;
  7 +import com.alibaba.excel.metadata.data.WriteCellData;
8 8 import com.alibaba.excel.metadata.property.ExcelContentProperty;
9 9  
10 10 /**
... ... @@ -25,15 +25,10 @@ public class JsonConvert implements Converter&lt;Object&gt; {
25 25 }
26 26  
27 27 @Override
28   - public Object convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
29   - throw new UnsupportedOperationException("暂不支持,也不需要");
30   - }
31   -
32   - @Override
33   - public CellData<String> convertToExcelData(Object value, ExcelContentProperty contentProperty,
34   - GlobalConfiguration globalConfiguration) {
  28 + public WriteCellData<String> convertToExcelData(Object value, ExcelContentProperty contentProperty,
  29 + GlobalConfiguration globalConfiguration) {
35 30 // 生成 Excel 小表格
36   - return new CellData<>(JsonUtils.toJsonString(value));
  31 + return new WriteCellData<>(JsonUtils.toJsonString(value));
37 32 }
38 33  
39 34 }
... ...