-
Notifications
You must be signed in to change notification settings - Fork 6.9k
解决导出带有字典选择列的数据时字典列错位的问题 #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,14 +57,16 @@ public SelectSheetWriteHandler(Class<?> head) { | |
// 解析下拉数据 | ||
int colIndex = 0; | ||
for (Field field : head.getDeclaredFields()) { | ||
if (field.isAnnotationPresent(ExcelColumnSelect.class)) { | ||
ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class); | ||
if (excelProperty != null && excelProperty.index() != -1) { | ||
colIndex = excelProperty.index(); | ||
if(field.isAnnotationPresent(ExcelProperty.class)){ | ||
if (field.isAnnotationPresent(ExcelColumnSelect.class)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 代码排版,有一些缩进的问题,可以优化下哈 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我怎么把代码格式化成满足要求的呢? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 要不基于 master-jdk17 改了。 代码格式,我来处理? |
||
ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class); | ||
if (excelProperty != null && excelProperty.index() != -1) { | ||
colIndex = excelProperty.index(); | ||
} | ||
getSelectDataList(colIndex, field); | ||
} | ||
getSelectDataList(colIndex, field); | ||
colIndex++; | ||
} | ||
colIndex++; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以基于 master-jdk17 pull request 哇?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok