Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
d88bfd4c
Commit
d88bfd4c
authored
Sep 03, 2024
by
18310373984@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
parent
f6b5f9c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
FaceAuthUtil.java
...java/com/hungraim/ltc/facelocation/util/FaceAuthUtil.java
+6
-0
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/facelocation/util/FaceAuthUtil.java
View file @
d88bfd4c
...
@@ -31,6 +31,7 @@ public class FaceAuthUtil {
...
@@ -31,6 +31,7 @@ public class FaceAuthUtil {
public
Result
<
String
>
addFace
(
ChSrvOrganEmp
faceAuthParam
,
String
filePath
){
public
Result
<
String
>
addFace
(
ChSrvOrganEmp
faceAuthParam
,
String
filePath
){
try
{
try
{
//设置文件路径
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey
Credential
cred
=
new
Credential
(
faceAuthProperties
.
getSecretId
(),
faceAuthProperties
.
getSecretKey
());
Credential
cred
=
new
Credential
(
faceAuthProperties
.
getSecretId
(),
faceAuthProperties
.
getSecretKey
());
// 实例化一个http选项,可选的,没有特殊需求可以跳过
// 实例化一个http选项,可选的,没有特殊需求可以跳过
...
@@ -53,8 +54,13 @@ public class FaceAuthUtil {
...
@@ -53,8 +54,13 @@ public class FaceAuthUtil {
}
else
{
}
else
{
req
.
setGender
(
0
l
);
req
.
setGender
(
0
l
);
}
}
log
.
info
(
"personName:::::"
+
faceAuthParam
.
getEmpName
());
log
.
info
(
"personId:::::"
+
faceAuthParam
.
getCertifNum
());
log
.
info
(
"gender:::::"
+
req
.
getGender
());
log
.
info
(
"照片base:::::"
+
imageToBase64
(
filePath
));
req
.
setImage
(
imageToBase64
(
filePath
));
req
.
setImage
(
imageToBase64
(
filePath
));
CreatePersonResponse
resp
=
client
.
CreatePerson
(
req
);
CreatePersonResponse
resp
=
client
.
CreatePerson
(
req
);
log
.
info
(
"腾讯云返回:"
+
AbstractModel
.
toJsonString
(
resp
));
return
Result
.
success
(
resp
.
getFaceId
());
return
Result
.
success
(
resp
.
getFaceId
());
}
catch
(
}
catch
(
Exception
e
)
{
Exception
e
)
{
...
...
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