From 268063abab947a984c5b37cb93a56f755f1b39ff Mon Sep 17 00:00:00 2001 From: zoujiangtao Date: Thu, 14 Nov 2024 15:07:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9A=E9=82=B9?= =?UTF-8?q?=E6=B1=9F=E6=B6=9B=20=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=9A=E6=B5=8B=E8=AF=95=E8=A1=A8=E5=8D=95=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=EF=BC=9A2024/11/14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/shkd/sys/sys/mservice/BIPService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/BIPService.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/BIPService.java index 1bf02ff..5c34b8b 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/BIPService.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/BIPService.java @@ -48,10 +48,12 @@ public class BIPService { RestTemplate restTemplate = new RestTemplate(); HttpHeaders httpHeaders = new HttpHeaders(); HttpEntity objectHttpEntity = new HttpEntity<>(httpHeaders); + String signature = generateSignature("appKey22564a240d3140d0b15582aca71a748ctimestamp" + currentTimeMillis); + logger.info("getBIPToken\ntimestamp:{}\nsignature:{}", currentTimeMillis, signature); UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://biptest.ctny.com.cn/iuap-api-auth/open-auth/selfAppAuth/getAccessToken") .queryParam("appKey", "22564a240d3140d0b15582aca71a748c") .queryParam("timestamp", currentTimeMillis) - .queryParam("signature", generateSignature("appKey22564a240d3140d0b15582aca71a748ctimestamp" + currentTimeMillis)); + .queryParam("signature", signature); ResponseEntity exchange = restTemplate.exchange(builder.build().toString(), HttpMethod.GET, objectHttpEntity, String.class); JSONObject jsonObject = JSON.parseObject(exchange.getBody()); if ("00000".equals(jsonObject.getString("code"))){ @@ -61,7 +63,7 @@ public class BIPService { return access_token; } } catch (Exception e) { - e.printStackTrace(); + logger.info("报错信息 error:" + e); } return access_token; }