1、API升级

Former-commit-id: fe79510ffcf7f07ee37e450cdde927220f36de63
master
wangbing 5 years ago
parent 28d7d1b50a
commit 5f2a4ba9b3

@ -123,7 +123,7 @@ public class SpringBootCallable implements Callable {
// System.out.println("生成模块:Manager"); // System.out.println("生成模块:Manager");
// generateManager(new File(api.getAbsolutePath(), "mgr"), module, dataBase, option); // generateManager(new File(api.getAbsolutePath(), "mgr"), module, dataBase, option);
// System.out.println("生成模块:Requset"); // 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"); // System.out.println("生成模块:Response");
// generateResponse(new File(api.getAbsolutePath(), "rsp"), module, dataBase, option); // generateResponse(new File(api.getAbsolutePath(), "rsp"), module, dataBase, option);
// } // }
@ -142,7 +142,7 @@ public class SpringBootCallable implements Callable {
System.out.println("生成模块:Manager"); System.out.println("生成模块:Manager");
generateManager(new File(modulePath.getAbsolutePath(), "mgr"), module, dataBase, option); generateManager(new File(modulePath.getAbsolutePath(), "mgr"), module, dataBase, option);
System.out.println("生成模块:Requset"); 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"); System.out.println("生成模块:Response");
generateResponse(new File(modulePath.getAbsolutePath(), "rsp"), module, dataBase, option); generateResponse(new File(modulePath.getAbsolutePath(), "rsp"), module, dataBase, option);
} }
@ -396,12 +396,12 @@ public class SpringBootCallable implements Callable {
} }
/** /**
* Requset * Request
* *
* @param root * @param root
* @param md * @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()) { if (!root.exists()) {
root.mkdirs(); root.mkdirs();
} else { } else {

@ -2,8 +2,12 @@ package ${basePackage}.action.api.system;
import ${basePackage}.frame.auth.LocalData; import ${basePackage}.frame.auth.LocalData;
import ${basePackage}.module.system.mgr.DictManager; import ${basePackage}.module.system.mgr.DictManager;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.DictFindRequest;
import ${basePackage}.module.system.rsp.*; 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; import org.springframework.beans.factory.annotation.Autowired;
public class DictApi { public class DictApi {
@ -11,18 +15,6 @@ public class DictApi {
@Autowired @Autowired
private DictManager dictManager; 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) { public DictFindResponse find(DictFindRequest request) {
return dictManager.find(request, LocalData.getToken()); return dictManager.find(request, LocalData.getToken());
} }

@ -2,8 +2,10 @@ package ${basePackage}.action.api.system;
import ${basePackage}.frame.auth.LocalData; import ${basePackage}.frame.auth.LocalData;
import ${basePackage}.module.system.mgr.DictItemManager; import ${basePackage}.module.system.mgr.DictItemManager;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.DictItemFindRequest;
import ${basePackage}.module.system.rsp.*; 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; import org.springframework.beans.factory.annotation.Autowired;
public class DictItemApi { public class DictItemApi {
@ -11,18 +13,6 @@ public class DictItemApi {
@Autowired @Autowired
private DictItemManager dictItemManager; 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) { public DictItemFindResponse find(DictItemFindRequest request) {
return dictItemManager.find(request, LocalData.getToken()); return dictItemManager.find(request, LocalData.getToken());
} }

@ -5,8 +5,14 @@ import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.utils.MapperUtil; import ${basePackage}.frame.utils.MapperUtil;
import ${basePackage}.frame.utils.Base64Util; import ${basePackage}.frame.utils.Base64Util;
import ${basePackage}.module.system.mgr.FileManager; import ${basePackage}.module.system.mgr.FileManager;
import ${basePackage}.module.system.req.*; import ${basePackage}.module.system.req.FileCreateRequest;
import ${basePackage}.module.system.rsp.*; 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; import org.springframework.beans.factory.annotation.Autowired;
public class FileApi { public class FileApi {
@ -18,14 +24,6 @@ public class FileApi {
return fileManager.create(request, LocalData.getToken()); 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) { public FileGetResponse get(FileGetRequest request) {
return fileManager.get(request, LocalData.getToken()); return fileManager.get(request, LocalData.getToken());
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.