mirror of https://github.com/elunez/eladmin
fix: ✨️导出excel使用LinkedHashMap替代HashMap以保持插入顺序
parent
429f375f82
commit
6226763f47
|
@ -33,10 +33,7 @@ import java.nio.file.Files;
|
|||
import java.security.MessageDigest;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
@ -217,7 +214,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
|||
BigExcelWriter writer = ExcelUtil.getBigWriter(file);
|
||||
// 处理数据以防止CSV注入
|
||||
List<Map<String, Object>> sanitizedList = list.parallelStream().map(map -> {
|
||||
Map<String, Object> sanitizedMap = new HashMap<>();
|
||||
Map<String, Object> sanitizedMap = new LinkedHashMap<>();
|
||||
map.forEach((key, value) -> {
|
||||
if (value instanceof String) {
|
||||
String strValue = (String) value;
|
||||
|
|
Loading…
Reference in New Issue