优化代码

This commit is contained in:
RuoYi
2022-02-12 21:23:07 +08:00
parent 2f4c975615
commit 0086cc9f53
26 changed files with 44 additions and 65 deletions

View File

@ -1119,7 +1119,7 @@ public class ExcelUtil<T>
if (StringUtils.isNotEmpty(excel.targetAttr()))
{
String target = excel.targetAttr();
if (target.indexOf(".") > -1)
if (target.contains("."))
{
String[] targets = target.split("[.]");
for (String name : targets)
@ -1214,7 +1214,7 @@ public class ExcelUtil<T>
for (Object[] os : this.fields)
{
Excel excel = (Excel) os[1];
maxHeight = maxHeight > excel.height() ? maxHeight : excel.height();
maxHeight = Math.max(maxHeight, excel.height());
}
return (short) (maxHeight * 20);
}