From 56a0dab87f0682db4f9a5a7d0d938e1c98c2764f Mon Sep 17 00:00:00 2001 From: huangweixiong Date: Fri, 4 Nov 2022 15:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=9A=E5=A8=81=E5=BE=85=E5=8A=9E=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResourceController.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 6b3d82bb..def0c19a 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -439,6 +439,46 @@ public class ResourceController { } } + @GetMapping("ZywMessage/yaweiApproveStatus") + @ApiOperation("资源列表转发") + @LogOperation("资源列表转发") + public Result yaweiApproveStatus(@ApiParam("页数") Integer page, + @ApiParam("页大小") Integer size, + @ApiParam("资源模糊搜索") String title) { + + if (page == null) page = 1; + if (size == null) size = 10; + + String url = "http://15.72.158.81/zyjk/ZywMessage.asmx"; + String parame = "\n" + + "\n" + + " \n" + + " \n" + + " e8d2fb43-f512-4918-ab47-1141b925af10\n" + + " 1\n" + + " 10\n" + + " \n" + + " \n" + + " \n" + + ""; + HttpHeaders requestHeaders = new HttpHeaders(); + requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort"); + requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8"))); + HttpEntity requestEntity = new HttpEntity<>(parame, requestHeaders); + try { + String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody(); + String startTag = ""; + String endTag = ""; + String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag)); + HashMap result = JSON.parseObject(json, HashMap.class); + + return new Result().ok(result); + } catch (Exception e) { + e.printStackTrace(); + return new Result().ok(new ArrayList(0)); + } + } + @GetMapping("qdyjjWeather") @ApiOperation("青岛应急局-查询青岛市地区天气信息") @LogOperation("青岛应急局-查询青岛市地区天气信息")