|
|
|
@ -27,6 +27,7 @@ public class ApiCallable implements Callable {
|
|
|
|
|
private List<String> domainList;
|
|
|
|
|
private Tool tool = new Tool();
|
|
|
|
|
File domain;
|
|
|
|
|
File frame;
|
|
|
|
|
File testdomain;
|
|
|
|
|
private FreeMarkerManager freeMarkerManager;
|
|
|
|
|
|
|
|
|
@ -65,8 +66,8 @@ public class ApiCallable implements Callable {
|
|
|
|
|
sbtest.append(s1 + File.separator);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
domain = new File(sbmain.toString());
|
|
|
|
|
domain.mkdirs();
|
|
|
|
|
domain = Tool.createPath(sbmain.toString(),"module");
|
|
|
|
|
frame = Tool.createPath(sbmain.toString(),"frame");
|
|
|
|
|
testdomain = new File(sbtest.toString());
|
|
|
|
|
testdomain.mkdirs();
|
|
|
|
|
|
|
|
|
@ -102,77 +103,77 @@ public class ApiCallable implements Callable {
|
|
|
|
|
HashMap<String, Object> ctx = new HashMap<String, Object>();
|
|
|
|
|
ctx.put("domain", String.join(".", domainList));
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ApiEntity.java");
|
|
|
|
|
File file = new File(frame, "ApiEntity.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ApiEntity.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "AESUtil.java");
|
|
|
|
|
File file = new File(frame, "AESUtil.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/AESUtil.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ApiClient.java");
|
|
|
|
|
File file = new File(frame, "ApiClient.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ApiClient.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ApiRequest.java");
|
|
|
|
|
File file = new File(frame, "ApiRequest.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ApiRequest.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ApiFindRequest.java");
|
|
|
|
|
File file = new File(frame, "ApiFindRequest.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ApiFindRequest.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ApiSearchRequest.java");
|
|
|
|
|
File file = new File(frame, "ApiSearchRequest.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ApiSearchRequest.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ApiResponse.java");
|
|
|
|
|
File file = new File(frame, "ApiResponse.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ApiResponse.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ApiFindResponse.java");
|
|
|
|
|
File file = new File(frame, "ApiFindResponse.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ApiFindResponse.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "Base64Util.java");
|
|
|
|
|
File file = new File(frame, "Base64Util.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/Base64Util.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "DownloadUtil.java");
|
|
|
|
|
File file = new File(frame, "DownloadUtil.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/DownloadUtil.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "Error.java");
|
|
|
|
|
File file = new File(frame, "Error.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/Error.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ErrorType.java");
|
|
|
|
|
File file = new File(frame, "ErrorType.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ErrorType.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "MapperUtil.java");
|
|
|
|
|
File file = new File(frame, "MapperUtil.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/MapperUtil.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "MD5Util.java");
|
|
|
|
|
File file = new File(frame, "MD5Util.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/MD5Util.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "RSAUtil.java");
|
|
|
|
|
File file = new File(frame, "RSAUtil.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/RSAUtil.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "ProgressRequestBody.java");
|
|
|
|
|
File file = new File(frame, "ProgressRequestBody.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/ProgressRequestBody.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "SortType.java");
|
|
|
|
|
File file = new File(frame, "SortType.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/SortType.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
File file = new File(domain, "StringUtils.java");
|
|
|
|
|
File file = new File(frame, "StringUtils.java");
|
|
|
|
|
freeMarkerManager.outputTemp(file, "/Java_api/StringUtils.java", ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -215,20 +216,29 @@ public class ApiCallable implements Callable {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<String> entNames = new ArrayList<>();
|
|
|
|
|
for (String s : reader.getDeptEntList()) {
|
|
|
|
|
Pattern compile = Pattern.compile("(.*\\.ent)\\.(.*)");
|
|
|
|
|
Matcher matcher = compile.matcher(s);
|
|
|
|
|
for (String entName : reader.getDeptEntList()) {
|
|
|
|
|
if (entName.matches("(.*\\.ent)\\.(.*)")){
|
|
|
|
|
Pattern compile = Pattern.compile("(.*\\.ent)\\.(.*)");
|
|
|
|
|
Matcher matcher = compile.matcher(entName);
|
|
|
|
|
|
|
|
|
|
if (matcher.find()) {
|
|
|
|
|
String EntName = matcher.group(2);
|
|
|
|
|
entNames.add(EntName);
|
|
|
|
|
if (matcher.find()) {
|
|
|
|
|
String EntName = matcher.group(2);
|
|
|
|
|
entNames.add(EntName);
|
|
|
|
|
|
|
|
|
|
List<File> files = Tool.findEntity(this.module, EntName + ".java");
|
|
|
|
|
List<File> files = Tool.findEntity(this.module, EntName + ".java");
|
|
|
|
|
for (File file : files) {
|
|
|
|
|
EntityReader entReader = new EntityReader(file);
|
|
|
|
|
generateEntity(entReader);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
List<File> files = Tool.findEntity(this.module, entName + ".java");
|
|
|
|
|
for (File file : files) {
|
|
|
|
|
EntityReader entReader = new EntityReader(file);
|
|
|
|
|
generateEntity(entReader);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<String> reqNames = new ArrayList<>();
|
|
|
|
|