From 81630a096f9c46b20138c609770575e5491bd623 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期日, 13 二月 2022 21:06:28 +0800
Subject: [PATCH] 代码生成同步保留必填/类型选项

---
 ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
index 22b6b57..f852f95 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
@@ -88,7 +88,6 @@
 
     public static final String[] FORMULA_STR = { "=", "-", "+", "@" };
 
-
     /**
      * Excel sheet最大行数,默认65536
      */
@@ -1122,7 +1121,7 @@
         if (StringUtils.isNotEmpty(excel.targetAttr()))
         {
             String target = excel.targetAttr();
-            if (target.indexOf(".") > -1)
+            if (target.contains("."))
             {
                 String[] targets = target.split("[.]");
                 for (String name : targets)
@@ -1217,7 +1216,7 @@
         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);
     }

--
Gitblit v1.9.2