Pre Merge pull request !523 from AbelKeith/4.X

This commit is contained in:
AbelKeith 2024-04-24 09:11:24 +00:00 committed by Gitee
commit bad5cf0fec
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 2 deletions

View File

@ -107,7 +107,11 @@ public class ExcelDownHandler implements SheetWriteHandler {
options = new ArrayList<>(values); options = new ArrayList<>(values);
} else if (StrUtil.isNotBlank(converterExp)) { } else if (StrUtil.isNotBlank(converterExp)) {
// 如果指定了确切的值则直接解析确切的值 // 如果指定了确切的值则直接解析确切的值
options = StrUtil.split(converterExp, format.separator(), true, true); List<String> rawOptions = StrUtil.split(converterExp, format.separator(), true, true);
for (String s : rawOptions) {
List<String> split = StrUtil.split(s, "=", true, true);
options.add(split.get(1));
}
} }
} else if (field.isAnnotationPresent(ExcelEnumFormat.class)) { } else if (field.isAnnotationPresent(ExcelEnumFormat.class)) {
// 否则如果指定了@ExcelEnumFormat则使用枚举的逻辑 // 否则如果指定了@ExcelEnumFormat则使用枚举的逻辑

View File

@ -362,7 +362,7 @@ public class ExcelUtil {
} }
} }
} else { } else {
if (itemArray[1].equals(propertyValue)) { if (propertyValue.contains(itemArray[1])) {
return itemArray[0]; return itemArray[0];
} }
} }