修改人:邹江涛

修改内容:测试表单插件
修改时间:2024/11/14
This commit is contained in:
zoujiangtao 2024-11-14 15:07:48 +08:00
parent cfb429d699
commit 268063abab
1 changed files with 4 additions and 2 deletions

View File

@ -48,10 +48,12 @@ public class BIPService {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders httpHeaders = new HttpHeaders();
HttpEntity<Object> 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<String> 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;
}