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; }