Просмотр исходного кода

fix(字典):
修改字典存储方式

18339543638 2 лет назад
Родитель
Сommit
28874827c8

+ 2 - 1
tr-modules/tr-module-export/src/main/java/cn/tr/module/excel/core/handler/read/CustomerReadListener.java

@@ -1,6 +1,7 @@
 package cn.tr.module.excel.core.handler.read;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.StrUtil;
 import cn.tr.module.excel.core.constant.ExcelConstant;
 import cn.tr.module.excel.core.dto.ExcelRowDataDTO;
 import cn.tr.module.excel.core.dto.ExcelSheetCallBackDTO;
@@ -42,7 +43,7 @@ public class CustomerReadListener<T> implements ReadListener<T> {
         //对sheet的表头进行校验
         headMap.forEach((k,value)->{
             String cellValue = value.getStringValue();
-            value.setStringValue(cellValue.replace("*","").trim());
+            value.setStringValue(StrUtil.trim(StrUtil.replace(cellValue,"*","")));
         });
         validateExcelHead(fieldMap,headMap);
         headIndex = context.readRowHolder().getRowIndex();