From 5f2a4ba9b3bde4382ebce7830eeb41276c953c6b Mon Sep 17 00:00:00 2001 From: wangbing Date: Fri, 13 Dec 2019 16:20:16 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81API=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: fe79510ffcf7f07ee37e450cdde927220f36de63 --- .../manger/callable/SpringBootCallable.java | 8 ++++---- .../java/action/api/system/DictApi.java | 20 ++++++------------- .../java/action/api/system/DictItemApi.java | 18 ++++------------- .../java/action/api/system/FileApi.java | 18 ++++++++--------- 4 files changed, 22 insertions(+), 42 deletions(-) diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java index 78b138da..027f6d70 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java @@ -123,7 +123,7 @@ public class SpringBootCallable implements Callable { // System.out.println("生成模块:Manager"); // generateManager(new File(api.getAbsolutePath(), "mgr"), module, dataBase, option); // System.out.println("生成模块:Requset"); -// generateRequset(new File(api.getAbsolutePath(), "req"), module, dataBase, option); +// generateRequest(new File(api.getAbsolutePath(), "req"), module, dataBase, option); // System.out.println("生成模块:Response"); // generateResponse(new File(api.getAbsolutePath(), "rsp"), module, dataBase, option); // } @@ -142,7 +142,7 @@ public class SpringBootCallable implements Callable { System.out.println("生成模块:Manager"); generateManager(new File(modulePath.getAbsolutePath(), "mgr"), module, dataBase, option); System.out.println("生成模块:Requset"); - generateRequset(new File(modulePath.getAbsolutePath(), "req"), module, dataBase, option); + generateRequest(new File(modulePath.getAbsolutePath(), "req"), module, dataBase, option); System.out.println("生成模块:Response"); generateResponse(new File(modulePath.getAbsolutePath(), "rsp"), module, dataBase, option); } @@ -396,12 +396,12 @@ public class SpringBootCallable implements Callable { } /** - * 生成Requset + * 生成Request * * @param root * @param md */ - public void generateRequset(File root, Module md, DataBase dataBase, String option) { + public void generateRequest(File root, Module md, DataBase dataBase, String option) { if (!root.exists()) { root.mkdirs(); } else { diff --git a/src/main/resources/modules/SpringBoot/java/action/api/system/DictApi.java b/src/main/resources/modules/SpringBoot/java/action/api/system/DictApi.java index ef515f89..fc25d0ed 100644 --- a/src/main/resources/modules/SpringBoot/java/action/api/system/DictApi.java +++ b/src/main/resources/modules/SpringBoot/java/action/api/system/DictApi.java @@ -2,8 +2,12 @@ package ${basePackage}.action.api.system; import ${basePackage}.frame.auth.LocalData; import ${basePackage}.module.system.mgr.DictManager; -import ${basePackage}.module.system.req.*; -import ${basePackage}.module.system.rsp.*; +import ${basePackage}.module.system.req.DictFindRequest; +import ${basePackage}.module.system.req.DictGetRequest; +import ${basePackage}.module.system.req.DictLoadRequest; +import ${basePackage}.module.system.rsp.DictFindResponse; +import ${basePackage}.module.system.rsp.DictGetResponse; +import ${basePackage}.module.system.rsp.DictLoadResponse; import org.springframework.beans.factory.annotation.Autowired; public class DictApi { @@ -11,18 +15,6 @@ public class DictApi { @Autowired private DictManager dictManager; - public DictCreateResponse create(DictCreateRequest request) { - return dictManager.create(request, LocalData.getToken()); - } - - public DictDeleteResponse delete(DictDeleteRequest request) { - return dictManager.delete(request, LocalData.getToken()); - } - - public DictUpdateResponse update(DictUpdateRequest request) { - return dictManager.update(request, LocalData.getToken()); - } - public DictFindResponse find(DictFindRequest request) { return dictManager.find(request, LocalData.getToken()); } diff --git a/src/main/resources/modules/SpringBoot/java/action/api/system/DictItemApi.java b/src/main/resources/modules/SpringBoot/java/action/api/system/DictItemApi.java index ed35a685..db9dc28d 100644 --- a/src/main/resources/modules/SpringBoot/java/action/api/system/DictItemApi.java +++ b/src/main/resources/modules/SpringBoot/java/action/api/system/DictItemApi.java @@ -2,8 +2,10 @@ package ${basePackage}.action.api.system; import ${basePackage}.frame.auth.LocalData; import ${basePackage}.module.system.mgr.DictItemManager; -import ${basePackage}.module.system.req.*; -import ${basePackage}.module.system.rsp.*; +import ${basePackage}.module.system.req.DictItemFindRequest; +import ${basePackage}.module.system.req.DictItemGetRequest; +import ${basePackage}.module.system.rsp.DictItemFindResponse; +import ${basePackage}.module.system.rsp.DictItemGetResponse; import org.springframework.beans.factory.annotation.Autowired; public class DictItemApi { @@ -11,18 +13,6 @@ public class DictItemApi { @Autowired private DictItemManager dictItemManager; - public DictItemCreateResponse create(DictItemCreateRequest request) { - return dictItemManager.create(request, LocalData.getToken()); - } - - public DictItemDeleteResponse delete(DictItemDeleteRequest request) { - return dictItemManager.delete(request, LocalData.getToken()); - } - - public DictItemUpdateResponse update(DictItemUpdateRequest request) { - return dictItemManager.update(request, LocalData.getToken()); - } - public DictItemFindResponse find(DictItemFindRequest request) { return dictItemManager.find(request, LocalData.getToken()); } diff --git a/src/main/resources/modules/SpringBoot/java/action/api/system/FileApi.java b/src/main/resources/modules/SpringBoot/java/action/api/system/FileApi.java index 6735bc96..e4289caf 100644 --- a/src/main/resources/modules/SpringBoot/java/action/api/system/FileApi.java +++ b/src/main/resources/modules/SpringBoot/java/action/api/system/FileApi.java @@ -5,8 +5,14 @@ import ${basePackage}.frame.base.ErrorType; import ${basePackage}.frame.utils.MapperUtil; import ${basePackage}.frame.utils.Base64Util; import ${basePackage}.module.system.mgr.FileManager; -import ${basePackage}.module.system.req.*; -import ${basePackage}.module.system.rsp.*; +import ${basePackage}.module.system.req.FileCreateRequest; +import ${basePackage}.module.system.req.FileGetRequest; +import ${basePackage}.module.system.req.FileUploadRequest; +import ${basePackage}.module.system.req.FileDownloadRequest; +import ${basePackage}.module.system.rsp.FileCreateResponse; +import ${basePackage}.module.system.rsp.FileGetResponse; +import ${basePackage}.module.system.rsp.FileUploadResponse; +import ${basePackage}.module.system.rsp.FileDownloadResponse; import org.springframework.beans.factory.annotation.Autowired; public class FileApi { @@ -18,14 +24,6 @@ public class FileApi { return fileManager.create(request, LocalData.getToken()); } - public FileDeleteResponse delete(FileDeleteRequest request) { - return fileManager.delete(request, LocalData.getToken()); - } - - public FileFindResponse find(FileFindRequest request) { - return fileManager.find(request, LocalData.getToken()); - } - public FileGetResponse get(FileGetRequest request) { return fileManager.get(request, LocalData.getToken()); }