|
|
@ -13,11 +13,13 @@ import java.util.Map; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.TreeMap; |
|
|
|
import java.util.TreeMap; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.excel.annotation.ExcelIgnore; |
|
|
|
import com.alibaba.excel.annotation.ExcelIgnore; |
|
|
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|
|
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|
|
|
import com.alibaba.excel.annotation.ExcelProperty; |
|
|
|
import com.alibaba.excel.annotation.ExcelProperty; |
|
|
|
|
|
|
|
import com.alibaba.excel.annotation.ExcelUnInheritable; |
|
|
|
import com.alibaba.excel.annotation.format.DateTimeFormat; |
|
|
|
import com.alibaba.excel.annotation.format.DateTimeFormat; |
|
|
|
import com.alibaba.excel.annotation.format.NumberFormat; |
|
|
|
import com.alibaba.excel.annotation.format.NumberFormat; |
|
|
|
import com.alibaba.excel.annotation.write.style.ContentFontStyle; |
|
|
|
import com.alibaba.excel.annotation.write.style.ContentFontStyle; |
|
|
@ -306,8 +308,14 @@ public class ClassUtils { |
|
|
|
// level.
|
|
|
|
// level.
|
|
|
|
while (tempClass != null) { |
|
|
|
while (tempClass != null) { |
|
|
|
Collections.addAll(tempFieldList, tempClass.getDeclaredFields()); |
|
|
|
Collections.addAll(tempFieldList, tempClass.getDeclaredFields()); |
|
|
|
|
|
|
|
|
|
|
|
// Get the parent class and give it to yourself
|
|
|
|
// Get the parent class and give it to yourself
|
|
|
|
tempClass = tempClass.getSuperclass(); |
|
|
|
tempClass = tempClass.getSuperclass(); |
|
|
|
|
|
|
|
ExcelUnInheritable excelUnInheritable = Optional.ofNullable(tempClass) |
|
|
|
|
|
|
|
.map(item -> item.getAnnotation(ExcelUnInheritable.class)).orElse(null); |
|
|
|
|
|
|
|
if (Objects.nonNull(excelUnInheritable)){ |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// Screening of field
|
|
|
|
// Screening of field
|
|
|
|
Map<Integer, List<FieldWrapper>> orderFieldMap = new TreeMap<>(); |
|
|
|
Map<Integer, List<FieldWrapper>> orderFieldMap = new TreeMap<>(); |
|
|
@ -580,4 +588,3 @@ public class ClassUtils { |
|
|
|
CONTENT_THREAD_LOCAL.remove(); |
|
|
|
CONTENT_THREAD_LOCAL.remove(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|