Commit 75da9071 authored by 李成龙's avatar 李成龙

清理代码

parent 19d0d972
...@@ -876,26 +876,26 @@ public class CommandController extends BaseController { ...@@ -876,26 +876,26 @@ public class CommandController extends BaseController {
@TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY) // @TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/testPostApi") // @GetMapping(value = "/testPostApi")
@ApiOperation(httpMethod = "GET", value = "视频地址", notes = "视频地址") // @ApiOperation(httpMethod = "GET", value = "视频地址", notes = "视频地址")
public Object testPost(Integer pageNum, Integer pageSize) throws URISyntaxException { // public Object testPost(Integer pageNum, Integer pageSize) throws URISyntaxException {
RestTemplate restTemplate = new RestTemplate(); // RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(videoUrl+"artemis/api/resource/v1/camera/advance/cameraList"); // URI uri = new URI(videoUrl+"artemis/api/resource/v1/camera/advance/cameraList");
HttpHeaders headers = new HttpHeaders(); // HttpHeaders headers = new HttpHeaders();
// headers.add("Authorization", "APPCODE " + appCode); //// headers.add("Authorization", "APPCODE " + appCode);
//添加参数,因为HttpEntity里面的参数是MultiValueMap类型的,所以使用这个map集合 // //添加参数,因为HttpEntity里面的参数是MultiValueMap类型的,所以使用这个map集合
MultiValueMap<String, Object> map = new LinkedMultiValueMap<>(); // MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
map.add("pageSize", 100); // map.add("pageSize", 100);
map.add("pageNo", 1); // map.add("pageNo", 1);
//添加请求的实体类,这里第一个参数是要发送的参数,第二个参数是请求头里的数据 // //添加请求的实体类,这里第一个参数是要发送的参数,第二个参数是请求头里的数据
HttpEntity<Object> requestEntity = new HttpEntity<Object>(map, headers); // HttpEntity<Object> requestEntity = new HttpEntity<Object>(map, headers);
ResponseEntity<String> exchange = restTemplate.exchange(uri, HttpMethod.POST, requestEntity, String.class); // ResponseEntity<String> exchange = restTemplate.exchange(uri, HttpMethod.POST, requestEntity, String.class);
JSONObject jsonObject = JSON.parseObject(exchange.getBody()); // JSONObject jsonObject = JSON.parseObject(exchange.getBody());
System.out.println(jsonObject); // System.out.println(jsonObject);
return jsonObject; // return jsonObject;
//
} // }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "根据灾情id建筑部位树", notes = "根据灾情id建筑部位树") @ApiOperation(httpMethod = "GET",value = "根据灾情id建筑部位树", notes = "根据灾情id建筑部位树")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment