|
@@ -106,7 +106,7 @@ public class AttendanceAssessmentSdk {
|
|
|
jsonStr = JSONUtil.toJsonStr(postData, config);
|
|
|
logger.info("入参:{}", jsonStr);
|
|
|
|
|
|
- apiResult = HttpRequest.post(url).body(jsonStr).execute().body();
|
|
|
+ apiResult = HttpRequest.post(url).body(jsonStr).setConnectionTimeout(2000).execute().body();
|
|
|
logger.info("接口返回报文:{}", apiResult);
|
|
|
apiReturnDto = JSONUtil.toBean(apiResult, ApiReturnDto.class);
|
|
|
switch (apiReturnDto.getApsStat()) {
|
|
@@ -178,7 +178,6 @@ public class AttendanceAssessmentSdk {
|
|
|
logger.info("入参:{}", jsonStr);
|
|
|
|
|
|
RestTemplate rest = new RestTemplate();
|
|
|
- url = "http://localhost:9689/synchronization/file";
|
|
|
apiResult = rest.postForObject(url, postData, String.class);
|
|
|
|
|
|
logger.info("接口返回报文:{}", apiResult);
|
|
@@ -212,7 +211,7 @@ public class AttendanceAssessmentSdk {
|
|
|
logger.info("请求url: {}", url);
|
|
|
String body;
|
|
|
try {
|
|
|
- body = HttpRequest.post(url).body(postData.toString()).execute().body();
|
|
|
+ body = HttpRequest.post(url).body(postData.toString()).setConnectionTimeout(2000).execute().body();
|
|
|
} catch (Exception e) {
|
|
|
throw new CustomException("请求token失败");
|
|
|
}
|