diff --git a/test/src/main/java/ExcelUtils.java b/test/src/main/java/ExcelUtils.java index 13b6eeccb..511f22f23 100644 --- a/test/src/main/java/ExcelUtils.java +++ b/test/src/main/java/ExcelUtils.java @@ -1,51 +1,38 @@ -import com.ljsd.common.mogodb.LjsdMongoTemplate; -import com.ljsd.jieling.config.SEquipConfig; -import com.ljsd.jieling.logic.STableManager; -import com.ljsd.jieling.logic.dao.Equip; -import com.ljsd.jieling.logic.dao.root.User; -import com.mongodb.MongoClientURI; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.springframework.data.mongodb.core.MongoTemplate; -import org.springframework.data.mongodb.core.SimpleMongoDbFactory; -import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver; -import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper; -import org.springframework.data.mongodb.core.convert.MappingMongoConverter; -import org.springframework.data.mongodb.core.mapping.MongoMappingContext; import java.io.*; -import java.net.UnknownHostException; import java.util.*; public class ExcelUtils { private static boolean isWrite = true; - //private static String excelPath ="E:/work2/data_execl/base_data/"; //excel 文件 - private static String excelPath ="E:/work2/data_execl/Map_data/"; //excel 文件 + private static String excelPath ="D:/excel/0.94/data_execl/base_data/"; //excel 文件 + // private static String excelPath ="D:/excel/0.94/data_execl/Map_data/"; //excel 文件 private static String path = "conf/server/"; private static Set oldFileNames = new HashSet<>(); - private static String javaFilePath = "serverlogic/src/main/java/com/ljsd/jieling/config/"; + private static String javaFilePath = "tablemanager/src/main/java/config/"; public static void main(String[] args) throws IOException { File oldfile = new File(path); String[] list = oldfile.list(); oldFileNames.addAll(Arrays.asList(list)); readExcelData(); - //只加载新文件 -// Set newFileNames = new HashSet<>(); -// File newfile = new File(path); -// String[] newList = newfile.list(); -// newFileNames.addAll(Arrays.asList(newList)); -// newFileNames.removeAll(oldFileNames); -// if(!newFileNames.isEmpty()){ -// for(String newFileName : newFileNames){ -// String finalNewFileName = newFileName.replaceAll(".txt", ""); -// genJavaFile(finalNewFileName); -// } -// -// } - +// //只加载新文件 +//// Set newFileNames = new HashSet<>(); +//// File newfile = new File(path); +//// String[] newList = newfile.list(); +//// newFileNames.addAll(Arrays.asList(newList)); +//// newFileNames.removeAll(oldFileNames); +//// if(!newFileNames.isEmpty()){ +//// for(String newFileName : newFileNames){ +//// String finalNewFileName = newFileName.replaceAll(".txt", ""); +//// genJavaFile(finalNewFileName); +//// } +//// +//// } +// genJavaFile("DialRewardSetting"); } public static void genJavaFile(String fileName){ @@ -54,7 +41,7 @@ public class ExcelUtils { File file = new File("conf/server/"+fileName +".txt"); StringBuffer stringBuffer = new StringBuffer("package com.ljsd.jieling.config;\n" + "\n" + - "import com.ljsd.jieling.logic.STableManager;\n" + + "import manager.STableManager;\n" + "import com.ljsd.jieling.logic.Table;\n" + "\n" + "import java.util.Map;\n" +