|
@@ -3,6 +3,8 @@ package com.usoftchina.qywx.sdk;
|
|
|
import com.usoftchina.qywx.sdk.config.QywxProperties;
|
|
|
import com.usoftchina.qywx.sdk.dto.GetOpenCorpIDResp;
|
|
|
import com.usoftchina.qywx.sdk.dto.GetProviderTokenResp;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
@@ -10,7 +12,7 @@ import org.springframework.ui.ModelMap;
|
|
|
* 代开发应用相关应用功能
|
|
|
* */
|
|
|
public class DevSDK extends BaseSdk {
|
|
|
-
|
|
|
+ private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
private String providerCropId;
|
|
|
|
|
|
private String providerSecret;
|
|
@@ -51,11 +53,12 @@ public class DevSDK extends BaseSdk {
|
|
|
|
|
|
//获取企业主体的明文corpid转换为服务商主体的密文corpid
|
|
|
public GetOpenCorpIDResp getCorpid_to_openCorpid(String cropId, String providerToken) {
|
|
|
+ logger.info("corpid_to_opencorpid : provider_access_token{} corpid{}", providerToken ,cropId);
|
|
|
ResponseEntity<GetOpenCorpIDResp> resp = restTemplate.postForEntity(
|
|
|
- baseUrl + "/cgi-bin/service/corpid_to_opencorpid?provider_access_token={access_token}",
|
|
|
+ baseUrl + "/cgi-bin/service/corpid_to_opencorpid?provider_access_token={provider_access_token}",
|
|
|
new ModelMap("corpid", cropId),
|
|
|
GetOpenCorpIDResp.class,
|
|
|
- new ModelMap("access_token", providerToken));
|
|
|
+ new ModelMap("provider_access_token", providerToken));
|
|
|
assertOK(resp);
|
|
|
return resp.getBody();
|
|
|
}
|