|
|
|
@ -87,22 +87,24 @@ public class SpringBootCallable implements Callable {
|
|
|
|
|
|
|
|
|
|
{// 模块
|
|
|
|
|
for (Module module : project.getModules()) {// 业务模块
|
|
|
|
|
module.setProjectAuthor(project.getProjectAuthor());
|
|
|
|
|
module.setProjectBasePackage(project.getProjectBasePackage());
|
|
|
|
|
module.setProjectName(project.getProjectName());
|
|
|
|
|
|
|
|
|
|
File moduleDir = Tool.createPath(domainDir.getAbsolutePath(), "module", module.getModuleName());
|
|
|
|
|
|
|
|
|
|
System.out.println("生成模块:Entity");
|
|
|
|
|
generateEntity(Tool.createPath(moduleDir.getAbsolutePath(), "ent"), module);
|
|
|
|
|
System.out.println("生成模块:Mapper");
|
|
|
|
|
generateMapper(Tool.createPath(moduleDir.getAbsolutePath(), "mpr"), module);
|
|
|
|
|
System.out.println("生成模块:Manager");
|
|
|
|
|
generateManager(Tool.createPath(moduleDir.getAbsolutePath(), "mgr"), module);
|
|
|
|
|
System.out.println("生成模块:Request");
|
|
|
|
|
generateRequest(Tool.createPath(moduleDir.getAbsolutePath(), "req"), module);
|
|
|
|
|
System.out.println("生成模块:Response");
|
|
|
|
|
generateResponse(Tool.createPath(moduleDir.getAbsolutePath(), "rsp"), module);
|
|
|
|
|
if (module.getNeedGenerate()) {
|
|
|
|
|
module.setProjectAuthor(project.getProjectAuthor());
|
|
|
|
|
module.setProjectBasePackage(project.getProjectBasePackage());
|
|
|
|
|
module.setProjectName(project.getProjectName());
|
|
|
|
|
|
|
|
|
|
File moduleDir = Tool.createPath(domainDir.getAbsolutePath(), "module", module.getModuleName());
|
|
|
|
|
|
|
|
|
|
System.out.println("生成模块:Entity");
|
|
|
|
|
generateEntity(Tool.createPath(moduleDir.getAbsolutePath(), "ent"), module);
|
|
|
|
|
System.out.println("生成模块:Mapper");
|
|
|
|
|
generateMapper(Tool.createPath(moduleDir.getAbsolutePath(), "mpr"), module);
|
|
|
|
|
System.out.println("生成模块:Manager");
|
|
|
|
|
generateManager(Tool.createPath(moduleDir.getAbsolutePath(), "mgr"), module);
|
|
|
|
|
System.out.println("生成模块:Request");
|
|
|
|
|
generateRequest(Tool.createPath(moduleDir.getAbsolutePath(), "req"), module);
|
|
|
|
|
System.out.println("生成模块:Response");
|
|
|
|
|
generateResponse(Tool.createPath(moduleDir.getAbsolutePath(), "rsp"), module);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (project.isNeedSys()) {//生成系统模块
|
|
|
|
@ -197,7 +199,7 @@ public class SpringBootCallable implements Callable {
|
|
|
|
|
ctxss.put("moduleName", module.getModuleName());
|
|
|
|
|
|
|
|
|
|
for (Table table : module.getTables()) {
|
|
|
|
|
if (table.getHtml()){
|
|
|
|
|
if (table.getHtml()) {
|
|
|
|
|
ctxss.put("table", table);
|
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(m.getAbsolutePath(), table.getCName() + "Ajax.java"), "SpringBoot/java/action/ajax/Ajax.java", ctxss);
|
|
|
|
|
}
|
|
|
|
@ -213,7 +215,7 @@ public class SpringBootCallable implements Callable {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (project.isNeedApi()){
|
|
|
|
|
if (project.isNeedApi()) {
|
|
|
|
|
File api = Tool.createPath(root.getAbsolutePath(), "api");
|
|
|
|
|
|
|
|
|
|
for (Module module : project.getModules()) {
|
|
|
|
@ -326,7 +328,7 @@ public class SpringBootCallable implements Callable {
|
|
|
|
|
ctx.put("table", table);
|
|
|
|
|
if (table.getSys()) {
|
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "Mapper" + ".java"), "SpringBoot/java/module/mpr/Mapper.java", ctx);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "Mapper" + ".java"), "SpringBoot/java/module/mpr/Mapper_NSYS.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|