From 425f3bd6fbfc7e48e6c734fbae5ab38a55f20702 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 21 十一月 2022 21:20:59 +0800
Subject: [PATCH] 11

---
 src/main/java/com/lf/server/config/InitConfig.java |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/lf/server/config/InitConfig.java b/src/main/java/com/lf/server/config/InitConfig.java
index c7e964c..e0be836 100644
--- a/src/main/java/com/lf/server/config/InitConfig.java
+++ b/src/main/java/com/lf/server/config/InitConfig.java
@@ -8,6 +8,7 @@
 import com.lf.server.entity.all.PermsAuthEntity;
 import com.lf.server.entity.all.ResAuthEntity;
 import com.lf.server.entity.bd.DlgAgnpEntity;
+import com.lf.server.entity.md.*;
 import com.lf.server.helper.*;
 import com.lf.server.mapper.bd.DlgAgnpMapper;
 import com.lf.server.service.all.BaseQueryService;
@@ -32,6 +33,7 @@
  * @author WWW
  */
 @Component
+@SuppressWarnings("AlibabaRemoveCommentedCode")
 public class InitConfig implements ApplicationRunner {
     private final static Log log = LogFactory.getLog(InitConfig.class);
 
@@ -71,6 +73,8 @@
             //testAes();
             //testPerms();
             //testBlacklist();
+            //FloatServerController.test();
+            //testReadExcel();
 
             //boolean f1 = ZipHelper.unzip("D:\\LF\\data\\resources.zip", "D:\\LF\\data\\unzip");
             //boolean f2 = ZipHelper.zip("D:\\LF\\data\\res.zip", "D:\\LF\\data\\unzip\\resources");
@@ -91,7 +95,7 @@
     private void testMybatisPlus() {
         String s1 = locateService.selectWktById(1);
 
-        String tabName = baseQueryService.getTabName(dlgAgnpMapper);
+        String tabName = BaseQueryService.getTabName(dlgAgnpMapper);
         List<String> list0 = dlgAgnpMapper.selectFieldFuzzy(tabName, "name", "%鍘�%");
 
         DlgAgnpEntity dlg = dlgAgnpMapper.selectById(1);
@@ -182,4 +186,21 @@
         blacklistService.clearCache();
         List<String> list5 = blacklistService.selectIpList(1);
     }
+
+    private void testReadExcel() {
+        List<MdZxcgEntity> listMdZxcg = ExcelHelper.readExcel(MdZxcgEntity.class, "D:\\LF\\data\\xls\\娴嬬粯\\1-椤圭洰鎴愭灉-瑗夸笁涓璡\1-1涓嚎鎴愭灉琛╘\娴峰師鍘夸腑绾挎垚鏋滆〃.xlsx");
+        int r1 = listMdZxcg.size();
+
+        //List<MdGdcgEntity> listGdcg = ExcelHelper.readExcel(MdGdcgEntity.class, "D:\\LF\\data\\xls\\娴嬬粯\\2-鍦颁笅绠$嚎鎺㈡祴鎴愭灉\\2-2 绠$嚎鎴愭灉琛�.xlsx");
+        //int r2 = listGdcg.size();
+
+        String entityName = "Gxcg";
+        String xls = "D:\\LF\\data\\xls\\娴嬬粯\\2-鍦颁笅绠$嚎鎺㈡祴鎴愭灉\\2-2 绠$嚎鎴愭灉琛�.xlsx";
+
+        String className = "com.lf.server.entity.bs." + entityName;
+        Object obj = ClassHelper.createInstance(className);
+
+        List<?> list = ExcelHelper.readExcel(obj.getClass(), xls);
+        int r3 = list.size();
+    }
 }

--
Gitblit v1.9.3