Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
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
常超
map-parent
Commits
feeea077
Commit
feeea077
authored
Mar 22, 2021
by
Guojunfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接云天励飞接口-根据小图获取大图,返回人脸小图在大图中的位置、根据大图获取小图
parent
a874a731
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
serviceapi/imageapi/src/main/java/com/founder/ytlf/controller/YtlfController.java
+48
-0
No files found.
serviceapi/imageapi/src/main/java/com/founder/ytlf/controller/YtlfController.java
View file @
feeea077
...
...
@@ -112,5 +112,53 @@ public class YtlfController {
}
return
MapRestResult
.
build
(
500
,
"请求失败"
,
null
);
}
@OperLog
(
message
=
"根据小图获取大图信息,返回人脸小图在大图中的位置"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"根据小图获取大图信息,返回人脸小图在大图中的位置"
)
@GetMapping
(
"/getImageAndLocationByFaceId/{FaceId}"
)
public
MapRestResult
getImageAndLocationByFaceId
(
@PathVariable
Long
FaceId
){
try
{
String
accessToken
=
TokenUtils
.
getYtgsToken
();
String
url
=
"http://26.3.12.56:8083/api/intellif/image/face/json/"
+
FaceId
;
String
Authorization
=
"Bearer "
+
accessToken
;
Map
header
=
new
HashMap
<
String
,
String
>();
header
.
put
(
"Authorization"
,
Authorization
);
String
result
=
null
;
try
{
result
=
HttpClient
.
doGet
(
url
,
header
,
null
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
JSONObject
jsonObject
=
JSONArray
.
parseObject
(
result
);
return
MapRestResult
.
build
(
200
,
"成功根据小图获取大图信息,返回人脸小图在大图中的位置"
,
jsonObject
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
MapRestResult
.
build
(
500
,
"请求失败"
,
null
);
}
@OperLog
(
message
=
"根据大图id获取所有小图信息,这里的id来自上传图片接口返回的id"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"根据大图id获取所有小图信息,这里的id来自上传图片接口返回的id"
)
@GetMapping
(
"/getImageByBigImageId/{BigImageId}"
)
public
MapRestResult
getImageByBigImageId
(
@PathVariable
Long
BigImageId
){
try
{
String
accessToken
=
TokenUtils
.
getYtgsToken
();
String
url
=
"http://26.3.12.56:8083/api/intellif/face/image/"
+
BigImageId
;
String
Authorization
=
"Bearer "
+
accessToken
;
Map
header
=
new
HashMap
<
String
,
String
>();
header
.
put
(
"Authorization"
,
Authorization
);
String
result
=
null
;
try
{
result
=
HttpClient
.
doGet
(
url
,
header
,
null
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
JSONObject
jsonObject
=
JSONArray
.
parseObject
(
result
);
return
MapRestResult
.
build
(
200
,
"成功根据大图id获取所有小图信息,这里的id来自上传图片接口返回的id"
,
jsonObject
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
MapRestResult
.
build
(
500
,
"请求失败"
,
null
);
}
}
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