|
|
@ -294,7 +294,7 @@ public class SpringBootCallable implements Callable {
|
|
|
|
ctx.put("author", md.getProjectAuthor());
|
|
|
|
ctx.put("author", md.getProjectAuthor());
|
|
|
|
ctx.put("date", new Date());
|
|
|
|
ctx.put("date", new Date());
|
|
|
|
|
|
|
|
|
|
|
|
File file = Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + ".java");
|
|
|
|
File file = Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + ".java");
|
|
|
|
freeMarkerManager.outputTemp(file, "SpringBoot/java/module/ent/entity.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(file, "SpringBoot/java/module/ent/entity.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -323,12 +323,12 @@ public class SpringBootCallable implements Callable {
|
|
|
|
|
|
|
|
|
|
|
|
for (Table table : md.getTables()) {
|
|
|
|
for (Table table : md.getTables()) {
|
|
|
|
ctx.put("table", table);
|
|
|
|
ctx.put("table", table);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".java"), "SpringBoot/java/module/mpr/mapper.java", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "Mapper" + ".java"), "SpringBoot/java/module/mpr/mapper.java", ctx);
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getSys()) {
|
|
|
|
if (table.getSys()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".xml"), "SpringBoot/java/module/mpr/" + project.getDatabase().name() + "_mapper.xml", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "Mapper" + ".xml"), "SpringBoot/java/module/mpr/" + project.getDatabase().name() + "_mapper.xml", ctx);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Mapper" + ".xml"), "SpringBoot/java/module/mpr/" + project.getDatabase().name() + "_NSYS_mapper.xml", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "Mapper" + ".xml"), "SpringBoot/java/module/mpr/" + project.getDatabase().name() + "_NSYS_mapper.xml", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -350,8 +350,8 @@ public class SpringBootCallable implements Callable {
|
|
|
|
|
|
|
|
|
|
|
|
for (Table table : md.getTables()) {
|
|
|
|
for (Table table : md.getTables()) {
|
|
|
|
ctx.put("table", table);
|
|
|
|
ctx.put("table", table);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Manager" + ".java"), "SpringBoot/java/module/mgr/manager.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "Manager" + ".java"), "SpringBoot/java/module/mgr/manager.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "ManagerImpl" + ".java"), "SpringBoot/java/module/mgr/managerImpl.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "ManagerImpl" + ".java"), "SpringBoot/java/module/mgr/managerImpl.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -384,27 +384,27 @@ public class SpringBootCallable implements Callable {
|
|
|
|
ctx.put("table", table);
|
|
|
|
ctx.put("table", table);
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getCreate()) {
|
|
|
|
if (table.getCreate()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "CreateRequest" + ".java"), "SpringBoot/java/module/req/createRequestClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "CreateRequest" + ".java"), "SpringBoot/java/module/req/createRequestClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getDelete()) {
|
|
|
|
if (table.getDelete()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "DeleteRequest" + ".java"), "SpringBoot/java/module/req/deleteRequestClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "DeleteRequest" + ".java"), "SpringBoot/java/module/req/deleteRequestClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getUpdate()) {
|
|
|
|
if (table.getUpdate()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "UpdateRequest" + ".java"), "SpringBoot/java/module/req/updateRequestClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "UpdateRequest" + ".java"), "SpringBoot/java/module/req/updateRequestClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getFind()) {
|
|
|
|
if (table.getFind()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "FindRequest" + ".java"), "SpringBoot/java/module/req/findRequestClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "FindRequest" + ".java"), "SpringBoot/java/module/req/findRequestClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getGet()) {
|
|
|
|
if (table.getGet()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "GetRequest" + ".java"), "SpringBoot/java/module/req/getRequestClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "GetRequest" + ".java"), "SpringBoot/java/module/req/getRequestClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getSearch()) {
|
|
|
|
if (table.getSearch()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "SearchRequest" + ".java"), "SpringBoot/java/module/req/searchRequestClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "SearchRequest" + ".java"), "SpringBoot/java/module/req/searchRequestClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -438,27 +438,27 @@ public class SpringBootCallable implements Callable {
|
|
|
|
ctx.put("table", table);
|
|
|
|
ctx.put("table", table);
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getCreate()) {
|
|
|
|
if (table.getCreate()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "CreateResponse" + ".java"), "SpringBoot/java/module/rsp/createResponseClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "CreateResponse" + ".java"), "SpringBoot/java/module/rsp/createResponseClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getDelete()) {
|
|
|
|
if (table.getDelete()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "DeleteResponse" + ".java"), "SpringBoot/java/module/rsp/deleteResponseClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "DeleteResponse" + ".java"), "SpringBoot/java/module/rsp/deleteResponseClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getUpdate()) {
|
|
|
|
if (table.getUpdate()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "UpdateResponse" + ".java"), "SpringBoot/java/module/rsp/updateResponseClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "UpdateResponse" + ".java"), "SpringBoot/java/module/rsp/updateResponseClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getFind()) {
|
|
|
|
if (table.getFind()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "FindResponse" + ".java"), "SpringBoot/java/module/rsp/findResponseClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "FindResponse" + ".java"), "SpringBoot/java/module/rsp/findResponseClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getGet()) {
|
|
|
|
if (table.getGet()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "GetResponse" + ".java"), "SpringBoot/java/module/rsp/getResponseClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "GetResponse" + ".java"), "SpringBoot/java/module/rsp/getResponseClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (table.getSearch()) {
|
|
|
|
if (table.getSearch()) {
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "SearchResponse" + ".java"), "SpringBoot/java/module/rsp/searchResponseClass.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(Tool.createFile(root.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "SearchResponse" + ".java"), "SpringBoot/java/module/rsp/searchResponseClass.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -875,7 +875,7 @@ public class SpringBootCallable implements Callable {
|
|
|
|
ctx.put("author", md.getProjectAuthor());
|
|
|
|
ctx.put("author", md.getProjectAuthor());
|
|
|
|
ctx.put("date", new Date());
|
|
|
|
ctx.put("date", new Date());
|
|
|
|
|
|
|
|
|
|
|
|
File file = Tool.createFile(module.getAbsolutePath(), Tool.lineToClassName(table.getTableName()) + "Test" + ".java");
|
|
|
|
File file = Tool.createFile(module.getAbsolutePath(), Tool.ABB2Abb(table.getTableName()) + "Test" + ".java");
|
|
|
|
freeMarkerManager.outputTemp(file, "SpringBoot/test/test.ftl", ctx);
|
|
|
|
freeMarkerManager.outputTemp(file, "SpringBoot/test/test.ftl", ctx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -901,6 +901,7 @@ public class SpringBootCallable implements Callable {
|
|
|
|
ctx.put("moduleName", project.getProjectName());
|
|
|
|
ctx.put("moduleName", project.getProjectName());
|
|
|
|
ctx.put("author", project.getProjectAuthor());
|
|
|
|
ctx.put("author", project.getProjectAuthor());
|
|
|
|
ctx.put("date", new Date());
|
|
|
|
ctx.put("date", new Date());
|
|
|
|
|
|
|
|
ctx.put("project", project);
|
|
|
|
File system = Tool.createPath(root.getAbsolutePath(), "datainit");
|
|
|
|
File system = Tool.createPath(root.getAbsolutePath(), "datainit");
|
|
|
|
|
|
|
|
|
|
|
|
for (String apiFile : ResourceUtil.getResourceFiles("/modules/SpringBoot/test/datainit/")) {
|
|
|
|
for (String apiFile : ResourceUtil.getResourceFiles("/modules/SpringBoot/test/datainit/")) {
|
|
|
|