Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
75da9071
Commit
75da9071
authored
Aug 23, 2021
by
李成龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清理代码
parent
19d0d972
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+20
-20
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
75da9071
...
@@ -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建筑部位树"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment