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

清理代码

parent 19d0d972
......@@ -876,26 +876,26 @@ public class CommandController extends BaseController {
@TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/testPostApi")
@ApiOperation(httpMethod = "GET", value = "视频地址", notes = "视频地址")
public Object testPost(Integer pageNum, Integer pageSize) throws URISyntaxException {
RestTemplate restTemplate = new RestTemplate();
URI uri = new URI(videoUrl+"artemis/api/resource/v1/camera/advance/cameraList");
HttpHeaders headers = new HttpHeaders();
// headers.add("Authorization", "APPCODE " + appCode);
//添加参数,因为HttpEntity里面的参数是MultiValueMap类型的,所以使用这个map集合
MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
map.add("pageSize", 100);
map.add("pageNo", 1);
//添加请求的实体类,这里第一个参数是要发送的参数,第二个参数是请求头里的数据
HttpEntity<Object> requestEntity = new HttpEntity<Object>(map, headers);
ResponseEntity<String> exchange = restTemplate.exchange(uri, HttpMethod.POST, requestEntity, String.class);
JSONObject jsonObject = JSON.parseObject(exchange.getBody());
System.out.println(jsonObject);
return jsonObject;
}
// @TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/testPostApi")
// @ApiOperation(httpMethod = "GET", value = "视频地址", notes = "视频地址")
// public Object testPost(Integer pageNum, Integer pageSize) throws URISyntaxException {
// RestTemplate restTemplate = new RestTemplate();
// URI uri = new URI(videoUrl+"artemis/api/resource/v1/camera/advance/cameraList");
// HttpHeaders headers = new HttpHeaders();
//// headers.add("Authorization", "APPCODE " + appCode);
// //添加参数,因为HttpEntity里面的参数是MultiValueMap类型的,所以使用这个map集合
// MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
// map.add("pageSize", 100);
// map.add("pageNo", 1);
// //添加请求的实体类,这里第一个参数是要发送的参数,第二个参数是请求头里的数据
// HttpEntity<Object> requestEntity = new HttpEntity<Object>(map, headers);
// ResponseEntity<String> exchange = restTemplate.exchange(uri, HttpMethod.POST, requestEntity, String.class);
// JSONObject jsonObject = JSON.parseObject(exchange.getBody());
// System.out.println(jsonObject);
// return jsonObject;
//
// }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@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