超高压接入生管系统
This commit is contained in:
@@ -105,11 +105,6 @@ public class JudgeThirdToken extends BaseController {
|
|||||||
HttpEntity<MultiValueMap<String, String>> request =
|
HttpEntity<MultiValueMap<String, String>> request =
|
||||||
new HttpEntity<>(map, headers);
|
new HttpEntity<>(map, headers);
|
||||||
|
|
||||||
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
|
||||||
String result = restTemplate.postForObject(url, request, String.class);
|
|
||||||
JSONObject resultJson = new JSONObject(result);
|
|
||||||
// JSONObject resultJson = new JSONObject(token);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 成功
|
* 成功
|
||||||
* {
|
* {
|
||||||
@@ -144,13 +139,26 @@ public class JudgeThirdToken extends BaseController {
|
|||||||
* "timestamp": 1744879150627
|
* "timestamp": 1744879150627
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
||||||
|
try {
|
||||||
|
String result = restTemplate.postForObject(url, request, String.class);
|
||||||
|
JSONObject resultJson = new JSONObject(result);
|
||||||
if (resultJson.containsKey("code")) {
|
if (resultJson.containsKey("code")) {
|
||||||
//成功
|
//失败
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
log.info(e.toString());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user