From f23f7f09d6b90bed06275bcb1530842d866bd6b9 Mon Sep 17 00:00:00 2001 From: fangjiakai <450850793@qq.com> Date: Thu, 25 Jan 2024 15:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=AE=9A=E4=BD=8D=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB=20=E4=BC=81=E4=B8=9AID=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../risk/IdentificationPartsController.java | 2 +- src/main/java/com/zcloud/util/PLSUtil.java | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java b/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java index 61774dc..7748b42 100644 --- a/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java +++ b/src/main/java/com/zcloud/controller/risk/IdentificationPartsController.java @@ -237,7 +237,7 @@ public class IdentificationPartsController extends BaseController { PageData pageData = this.getPageData(); String KEYWORDS = (String) pageData.getOrDefault("KEYWORDS", ""); - JSONObject body = PLSUtil.getRyRegionList(KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount"))); + JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount"))); if (body != null) { List list = body.getJSONArray("rows").toJavaList(JSONObject.class); diff --git a/src/main/java/com/zcloud/util/PLSUtil.java b/src/main/java/com/zcloud/util/PLSUtil.java index f114d11..095b4a2 100644 --- a/src/main/java/com/zcloud/util/PLSUtil.java +++ b/src/main/java/com/zcloud/util/PLSUtil.java @@ -47,12 +47,12 @@ public class PLSUtil { * @Param: [java.lang.String, java.lang.Integer, java.lang.Integer] [keywords, currentPage, showCount] * @Return: com.alibaba.fastjson.JSONObject */ - public static JSONObject getRyRegionList(String keywords,Integer currentPage,Integer showCount) throws Exception { + public static JSONObject getRyRegionList(String CORPINFO_ID, String keywords,Integer currentPage,Integer showCount) throws Exception { HttpHeaders headers = new HttpHeaders(); - headers.set("Authorization", getToken()); + headers.set("Authorization", getToken(CORPINFO_ID)); HttpEntity httpEntity = new HttpEntity<>(headers); - ResponseEntity exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/region/region/list?pageNum=" + + ResponseEntity exchange = restTemplate.exchange(PLSUtil.BAKEADDR.get(CORPINFO_ID) + "/region/region/list?pageNum=" + currentPage + "&pageSize=" + showCount + "&str=" + keywords + "&type=0", HttpMethod.GET, httpEntity, JSONObject.class); @@ -77,9 +77,9 @@ public class PLSUtil { * @Param: [] [] * @Return: java.lang.String */ - public static String getToken() throws Exception { + public static String getToken(String CORPINFO_ID) throws Exception { PageData pd = new PageData(); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("CORPINFO_ID", CORPINFO_ID); pd = corpplsinfoService.findById(pd); String token = pd.getString("TOKEN"); String backAddr = pd.getString("POST_URL"); @@ -119,7 +119,7 @@ public class PLSUtil { public static boolean hasCardNumber(PageData user) throws Exception { // 根据 定位卡号获取对应的人 String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/card/peopleDisplay/" + user.getString("CARDNO"); - PageData response = sendGetHttpRequest(url, null, getToken()); + PageData response = sendGetHttpRequest(url, null, getToken(Jurisdiction.getCORPINFO_ID())); if (response != null) { if (!"200".equals(response.getString("code"))) { return false; @@ -140,7 +140,7 @@ public class PLSUtil { public static PageData getCardNumberPeople(PageData user) throws Exception { // 根据 定位卡号获取对应的人 String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/card/peopleDisplay/" + user.getString("CARDNO"); - PageData response = sendGetHttpRequest(url, null, getToken()); + PageData response = sendGetHttpRequest(url, null, getToken(Jurisdiction.getCORPINFO_ID())); if (response != null) { if (!"200".equals(response.getString("code"))) { return null; @@ -180,7 +180,7 @@ public class PLSUtil { loginPayload.put("deptName", ""); loginPayload.put("deptId", ""); loginPayload.put("avatar", ""); - PageData response = sendPostHttpRequest(url, loginPayload.toJSONString(), getToken()); + PageData response = sendPostHttpRequest(url, loginPayload.toJSONString(), getToken(Jurisdiction.getCORPINFO_ID())); return "200".equals(response.getString("code")); } @@ -214,13 +214,13 @@ public class PLSUtil { loginPayload.put("deptName", ""); loginPayload.put("deptId", ""); loginPayload.put("avatar", ""); - PageData response = sendPostHttpRequest(url, loginPayload.toJSONString(), getToken()); + PageData response = sendPostHttpRequest(url, loginPayload.toJSONString(), getToken(Jurisdiction.getCORPINFO_ID())); return "200".equals(response.getString("code")); } public static boolean removeUser(PageData user) throws Exception { String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/psnmgt"; PageData removeUser = usersService.findById(user); - PageData response = sendDeleteHttpRequest(url, Long.parseLong(removeUser.getString("PLS_ID")), getToken()); + PageData response = sendDeleteHttpRequest(url, Long.parseLong(removeUser.getString("PLS_ID")), getToken(Jurisdiction.getCORPINFO_ID())); return "200".equals(response.getString("code")); }