package com.hx.phip; import com.hx.auto.GeneratorUtil; import com.hx.auto.common.UrlData; import com.hx.phiappt.model.ComparePhotoRecord; import com.hx.phiappt.model.ComparePhotoRecordPictures; import com.hx.phiappt.model.appeal.AppealType; import com.hx.phiappt.model.appeal.AppealTypeRelate; import com.hx.phiappt.model.cardItem.CardEquity; import com.hx.phiappt.model.consume.ConsumeNotify; import com.hx.phiappt.model.consume.PayNo; import com.hx.phiappt.model.market.system.MarketSystem; import com.hx.phiappt.model.market.system.MarketSystemProject; import com.hx.phiappt.model.order.*; import com.hx.phiappt.model.project.ProjectShopPrice; import com.hx.phiappt.model.refund.*; import com.hx.phiappt.model.user.*; import com.hx.phiappt.model.user.club.UserClubMember; /** * 自动生成工具 * 2019-08-29 * @author cjh * */ public class AutoDomeUtil { public static void main(String[] args) throws Exception { System.out.println("开始"); String packageName = AutoDomeUtil.class.getPackage().getName(); String commonPackRoot = "phi_platform_common.src.main.java"; String commonPackRootResourse = "phi_platform_common.src.main.resources"; String controllerPackRoot = "phi_platform_common.src.main.java"; String controllerPackRootResourse = "phi_platform_common.src.main.resources"; UrlData urlData = new UrlData(); urlData.setTotalUrl(packageName); urlData.actionUrlData(controllerPackRoot,packageName + ".controller"); urlData.daoUrlData(commonPackRoot,packageName + ".dao.mapper"); urlData.serviceUrlData(controllerPackRoot,packageName + ".service"); urlData.serviceImplUrlData(controllerPackRoot,packageName + ".service.impl"); urlData.mapperUrlData(commonPackRootResourse, "mapper.platform"); Class clas = UserClubMember.class; //dao GeneratorUtil.generatorDao(clas,urlData); //mapper GeneratorUtil.generatorMapper(clas, urlData); // 生成service //GeneratorUtil.generatorService(clas,urlData); //通过实体类的包获取所有的表,直接全部生成 //GeneratorUtil.generatorTableByPackUrl("com.hx.model", urlData); //generatorTableByPackUrl(packPath, urlData); /*Class cl = TestM2.class; Field[] fields = cl.getDeclaredFields(); for(Field field:fields) { System.out.println("field.getName():"+field.getName()); System.out.println("field.getType():"+field.getType()); System.out.println("field.getGenericType():"+field.getGenericType()); System.out.println("field.getModifiers():"+field.getModifiers()); }*/ //StringBuffer stringBuffer = SimpleToolUtil.getFileContent("com/cjh/auto/file/test.txt"); //System.out.println("stringBuffer:"+stringBuffer); //System.out.println(AesUtil.aesEncryp("88.88")); } }