血战配置
parent
e009ee3191
commit
36e7bca253
|
@ -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.hssf.usermodel.HSSFWorkbook;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFCell;
|
import org.apache.poi.xssf.usermodel.XSSFCell;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
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.io.*;
|
||||||
import java.net.UnknownHostException;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class ExcelUtils {
|
public class ExcelUtils {
|
||||||
private static boolean isWrite = true;
|
private static boolean isWrite = true;
|
||||||
//private static String excelPath ="E:/work2/data_execl/base_data/"; //excel 文件
|
private static String excelPath ="D:/excel/0.94/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/Map_data/"; //excel 文件
|
||||||
private static String path = "conf/server/";
|
private static String path = "conf/server/";
|
||||||
private static Set<String> oldFileNames = new HashSet<>();
|
private static Set<String> 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 {
|
public static void main(String[] args) throws IOException {
|
||||||
File oldfile = new File(path);
|
File oldfile = new File(path);
|
||||||
String[] list = oldfile.list();
|
String[] list = oldfile.list();
|
||||||
oldFileNames.addAll(Arrays.asList(list));
|
oldFileNames.addAll(Arrays.asList(list));
|
||||||
readExcelData();
|
readExcelData();
|
||||||
//只加载新文件
|
// //只加载新文件
|
||||||
// Set<String> newFileNames = new HashSet<>();
|
//// Set<String> newFileNames = new HashSet<>();
|
||||||
// File newfile = new File(path);
|
//// File newfile = new File(path);
|
||||||
// String[] newList = newfile.list();
|
//// String[] newList = newfile.list();
|
||||||
// newFileNames.addAll(Arrays.asList(newList));
|
//// newFileNames.addAll(Arrays.asList(newList));
|
||||||
// newFileNames.removeAll(oldFileNames);
|
//// newFileNames.removeAll(oldFileNames);
|
||||||
// if(!newFileNames.isEmpty()){
|
//// if(!newFileNames.isEmpty()){
|
||||||
// for(String newFileName : newFileNames){
|
//// for(String newFileName : newFileNames){
|
||||||
// String finalNewFileName = newFileName.replaceAll(".txt", "");
|
//// String finalNewFileName = newFileName.replaceAll(".txt", "");
|
||||||
// genJavaFile(finalNewFileName);
|
//// genJavaFile(finalNewFileName);
|
||||||
// }
|
//// }
|
||||||
//
|
////
|
||||||
// }
|
//// }
|
||||||
|
// genJavaFile("DialRewardSetting");
|
||||||
|
|
||||||
}
|
}
|
||||||
public static void genJavaFile(String fileName){
|
public static void genJavaFile(String fileName){
|
||||||
|
@ -54,7 +41,7 @@ public class ExcelUtils {
|
||||||
File file = new File("conf/server/"+fileName +".txt");
|
File file = new File("conf/server/"+fileName +".txt");
|
||||||
StringBuffer stringBuffer = new StringBuffer("package com.ljsd.jieling.config;\n" +
|
StringBuffer stringBuffer = new StringBuffer("package com.ljsd.jieling.config;\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"import com.ljsd.jieling.logic.STableManager;\n" +
|
"import manager.STableManager;\n" +
|
||||||
"import com.ljsd.jieling.logic.Table;\n" +
|
"import com.ljsd.jieling.logic.Table;\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"import java.util.Map;\n" +
|
"import java.util.Map;\n" +
|
||||||
|
|
Loading…
Reference in New Issue