From 97bf4254015d84c49d2c590af2a063447c6af8ad Mon Sep 17 00:00:00 2001 From: sugy Date: Wed, 17 Mar 2021 15:04:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=BB=E9=A1=B9=E7=9B=AE=E4=BF=A1=E6=81=AF=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proxy/controller/ProjectController.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/ProjectController.java b/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/ProjectController.java index d1571e1..03d28e9 100644 --- a/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/ProjectController.java +++ b/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/ProjectController.java @@ -109,4 +109,27 @@ public class ProjectController { } }); } + + /** + * 查询项目信息 + * @param ids + * @return + * @throws Exception + */ + @ResponseBody + @RequestMapping(path = "/queryProjectInfos", method = RequestMethod.GET) + public List queryProjectInfos(@RequestParam List ids) throws Exception { + Long tenantId = MicroServiceContext.getCurrentContext().getTenantId(); + + return ContextUtils.executeBackend(tenantId, new Callable>() { + @Override + public List call() { + ProjectService projectService= ServiceFactory.createService( ProjectService.class ); + List projectInfoList=new ArrayList<>( ); + projectInfoList=projectService.getProjectInfors(ids); + log.info("查询产品开通状态返回值:{}",JSON.toJSONString(projectInfoList)); + return projectInfoList; + } + }); + } } -- Gitee From 2591fb83a6a2614df6bdef863d4142c3a4b5f2ad Mon Sep 17 00:00:00 2001 From: sugy Date: Wed, 17 Mar 2021 15:23:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E4=BF=A1=E6=81=AF=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proxy/controller/VendorController.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/VendorController.java b/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/VendorController.java index 11e0752..e236454 100644 --- a/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/VendorController.java +++ b/proxy-worker/src/main/java/com/glodon/gys/proxy/controller/VendorController.java @@ -229,4 +229,29 @@ public class VendorController { } }); } + + /** + * 保存本项目供应商 + * @param projectId + * @param projectVendor + */ + @ResponseBody + @RequestMapping(path = "/queryProjectVendor", method = RequestMethod.POST) + public void queryProjectVendor(@RequestParam("projectId")Long projectId, + @RequestBody List projectVendor) { + Long tenantId = MicroServiceContext.getCurrentContext().getTenantId(); + + ContextUtils.executeBackend(tenantId, new Callable>() { + @Override + public List call() { + ProjectVendorService projectVendorService = ServiceFactory.createService(ProjectVendorService.class); + try { + projectVendorService.addProjectVendors(projectId, projectVendor); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + }); + } } -- Gitee