|
@@ -271,15 +271,10 @@ public class BeiSenUtils {
|
|
|
System.out.println("--------requestMap请求参数-------"+requestMap);
|
|
|
HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers);
|
|
|
ResponseEntity<String> ResponseEntity = restTemplate.postForEntity(url, entity, String.class);
|
|
|
- if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
|
|
|
- String resp= ResponseEntity.getBody();
|
|
|
- JSONObject respJson = JSONObject.parseObject(resp);
|
|
|
- if(respJson.getIntValue("Code")==200){
|
|
|
- JSONObject data = respJson.getJSONObject("data");
|
|
|
- return data;
|
|
|
- }
|
|
|
- }
|
|
|
- return new JSONObject();
|
|
|
+ String resp= ResponseEntity.getBody();
|
|
|
+ JSONObject respJson = JSONObject.parseObject(resp);
|
|
|
+ JSONObject data = respJson.getJSONObject("data");
|
|
|
+ return data;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -305,16 +300,10 @@ public class BeiSenUtils {
|
|
|
System.out.println("--------requestMap请求参数-------"+requestMap);
|
|
|
HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers);
|
|
|
ResponseEntity<String> ResponseEntity = restTemplate.postForEntity(url, entity, String.class);
|
|
|
- JSONArray lastJSONArray=new JSONArray();
|
|
|
- if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
|
|
|
- String resp= ResponseEntity.getBody();
|
|
|
- JSONObject respJson = JSONObject.parseObject(resp);
|
|
|
- if(respJson.getIntValue("Code")==200){
|
|
|
- JSONArray data = respJson.getJSONArray("data");
|
|
|
- return data;
|
|
|
- }
|
|
|
- }
|
|
|
- return new JSONArray();
|
|
|
+ String resp= ResponseEntity.getBody();
|
|
|
+ JSONObject respJson = JSONObject.parseObject(resp);
|
|
|
+ JSONArray data = respJson.getJSONArray("data");
|
|
|
+ return data;
|
|
|
}
|
|
|
|
|
|
}
|