【优化】对于有标题头限定的可空bean,如果所有单元格为空,则取null(之前强制要求填null)
parent
1494bb9cf8
commit
dd582a37ee
|
|
@ -310,11 +310,19 @@ namespace Luban.Job.Cfg.DataCreators
|
|||
if (row.Row != null)
|
||||
{
|
||||
var s = row.AsStream("");
|
||||
if (type.IsNullable && s.TryReadEOF())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return type.Apply(ExcelStreamDataCreator.Ins, s);
|
||||
}
|
||||
else if (row.Rows != null)
|
||||
{
|
||||
var s = row.AsMultiRowConcatStream("");
|
||||
if (type.IsNullable && s.TryReadEOF())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return type.Apply(ExcelStreamDataCreator.Ins, s);
|
||||
}
|
||||
else if (row.Fields != null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue