Browse Source

采购 debug

master
PoffyZhang 1 year ago
parent
commit
0dc3cef8b0
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java

+ 5
- 5
pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java View File

@@ -151,12 +151,12 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc

@Override
public List<ProvincialGovBusinessStripVO> searchGovUnits() {
Long timeStamp = System.currentTimeMillis()/1000;
Long timeStamp = System.currentTimeMillis();
String appSecret = govAppSecret;
String appKey = govAppKey;
String method = HttpMethod.POST.name();
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,interfaceName,method);
String sign = MD5.create().digestHex(appKey + secret + timeStamp * 1000);
String sign = MD5.create().digestHex(appKey + secret + timeStamp);
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory();
RestTemplate restTemplate;
if(Objects.nonNull(factory)){
@@ -165,12 +165,12 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc
restTemplate = new RestTemplate();
}

String authSignature = getSha256(timeStamp,provincialProperties.getDomainUrl(), HttpMethod.POST.name(),
String authSignature = getSha256(timeStamp/1000,provincialProperties.getDomainUrl(), HttpMethod.POST.name(),
provincialProperties.getKey(),provincialProperties.getSecret());
String url = govUrl + "?appKey=" + appKey +
"&timestamp=" + timeStamp + "&sign=" + sign +
"&timestamp=" + timeStamp/1000 + "&sign=" + sign +
"&authKey=" + provincialProperties.getKey() + "&authSignature=" + authSignature +
"&requestTime=" + timeStamp*1000;
"&requestTime=" + timeStamp;
log.info("gov search url :{}",url);
ResponseEntity<JSONObject> forEntity = restTemplate.postForEntity(url,null, JSONObject.class, Maps.newHashMap());
JSONObject body = forEntity.getBody();


Loading…
Cancel
Save