Commit d88bfd4c authored by 18310373984@163.com's avatar 18310373984@163.com

ceshi

parent f6b5f9c2
......@@ -31,6 +31,7 @@ public class FaceAuthUtil {
public Result<String> addFace(ChSrvOrganEmp faceAuthParam,String filePath){
try {
//设置文件路径
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey
Credential cred = new Credential(faceAuthProperties.getSecretId(), faceAuthProperties.getSecretKey());
// 实例化一个http选项,可选的,没有特殊需求可以跳过
......@@ -53,8 +54,13 @@ public class FaceAuthUtil {
}else{
req.setGender(0l);
}
log.info("personName:::::"+faceAuthParam.getEmpName());
log.info("personId:::::"+faceAuthParam.getCertifNum());
log.info("gender:::::"+req.getGender());
log.info("照片base:::::"+imageToBase64(filePath));
req.setImage(imageToBase64(filePath));
CreatePersonResponse resp = client.CreatePerson(req);
log.info("腾讯云返回:"+AbstractModel.toJsonString(resp));
return Result.success(resp.getFaceId());
} catch (
Exception e) {
......
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