|
|
@@ -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 + |
|
|
|
"×tamp=" + timeStamp + "&sign=" + sign + |
|
|
|
"×tamp=" + 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(); |
|
|
|