Explorar el Código

采购 debug

tags/24080901
PoffyZhang hace 1 año
padre
commit
0dc3cef8b0
Se han modificado 1 ficheros con 5 adiciones y 5 borrados
  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 Ver fichero

@@ -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();


Cargando…
Cancelar
Guardar