|
@@ -24,20 +24,22 @@ public class WstRestClient extends ApacheHttpClient {
|
|
|
|
|
|
// TODO 下面的参数,需要改为从配置文件读取
|
|
// TODO 下面的参数,需要改为从配置文件读取
|
|
// 测试环境
|
|
// 测试环境
|
|
- @Value("${wst.appKey}")
|
|
|
|
|
|
+ /* @Value("${wst.appKey}")
|
|
private String appKey = "8a4ff1954caf4cab82c18f5886e7834e"; //根据实际情况填写
|
|
private String appKey = "8a4ff1954caf4cab82c18f5886e7834e"; //根据实际情况填写
|
|
@Value("${wst.appSecret}")
|
|
@Value("${wst.appSecret}")
|
|
private String appSecret = "e102667914bb407cb8aa79b82c0b8a0c"; //根据实际情况填写
|
|
private String appSecret = "e102667914bb407cb8aa79b82c0b8a0c"; //根据实际情况填写
|
|
private Scheme scheme = Scheme.HTTP;
|
|
private Scheme scheme = Scheme.HTTP;
|
|
private String host = "61.190.70.197:8800";
|
|
private String host = "61.190.70.197:8800";
|
|
private String contextPath = "/wst-gateway";
|
|
private String contextPath = "/wst-gateway";
|
|
|
|
+ private String serviceId = "";*/
|
|
|
|
|
|
// 生产环境
|
|
// 生产环境
|
|
- /*private String appKey = "8a4ff1954caf4cab82c18f5886e7834e"; //根据实际情况填写
|
|
|
|
- private String appSecret = "e102667914bb407cb8aa79b82c0b8a0c"; //根据实际情况填写
|
|
|
|
|
|
+ private String appKey = "00fdf311578e4676bb32d25d3f66687b"; //根据实际情况填写
|
|
|
|
+ private String appSecret = "f8c4dd7661e447289140d7e51cd5ff4e"; //根据实际情况填写
|
|
private Scheme scheme = Scheme.HTTPS;
|
|
private Scheme scheme = Scheme.HTTPS;
|
|
private String host = "www.ahzwfw.gov.cn";
|
|
private String host = "www.ahzwfw.gov.cn";
|
|
- private String contextPath = "/wst-gateway";*/
|
|
|
|
|
|
+ private String contextPath = "/wst-gateway";
|
|
|
|
+ private String serviceId = "05e28566cd8d4737b491fc2c2c2cb2c0";
|
|
|
|
|
|
|
|
|
|
private WstRestClient() {
|
|
private WstRestClient() {
|
|
@@ -102,7 +104,7 @@ public class WstRestClient extends ApacheHttpClient {
|
|
public ApiResponse getUserInfoByToken(String token){
|
|
public ApiResponse getUserInfoByToken(String token){
|
|
ApiRequest request = new ApiRequest(HttpMethod.GET, "/user/getUserInfoByToken");
|
|
ApiRequest request = new ApiRequest(HttpMethod.GET, "/user/getUserInfoByToken");
|
|
request.addParam("token", token, ParamPosition.QUERY, true);
|
|
request.addParam("token", token, ParamPosition.QUERY, true);
|
|
- request.addParam("serviceId", "服务id 可以不填", ParamPosition.QUERY, true);
|
|
|
|
|
|
+ request.addParam("serviceId", serviceId, ParamPosition.QUERY, true);
|
|
request.addParam("roleCode", "", ParamPosition.QUERY, true);
|
|
request.addParam("roleCode", "", ParamPosition.QUERY, true);
|
|
return sendSyncRequest(request);
|
|
return sendSyncRequest(request);
|
|
}
|
|
}
|