|
@@ -1,5 +1,6 @@
|
|
package com.pj.face.handler.impl;
|
|
package com.pj.face.handler.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.log.StaticLog;
|
|
import com.pj.face.brand.FaceBrand;
|
|
import com.pj.face.brand.FaceBrand;
|
|
import com.pj.face.handler.IFaceHandler;
|
|
import com.pj.face.handler.IFaceHandler;
|
|
import com.pj.face.properties.TencenProperties;
|
|
import com.pj.face.properties.TencenProperties;
|
|
@@ -53,6 +54,7 @@ public class TencenFaceHandlerImpl implements IFaceHandler {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<String> faceSearch(String baseImg) {
|
|
public List<String> faceSearch(String baseImg) {
|
|
|
|
+ StaticLog.info("face:{}",baseImg);
|
|
IaiClient client = this.createClient();
|
|
IaiClient client = this.createClient();
|
|
SearchFacesRequest request = new SearchFacesRequest();
|
|
SearchFacesRequest request = new SearchFacesRequest();
|
|
request.setImage(baseImg);
|
|
request.setImage(baseImg);
|
|
@@ -65,6 +67,8 @@ public class TencenFaceHandlerImpl implements IFaceHandler {
|
|
try {
|
|
try {
|
|
response = client.SearchFaces(request);
|
|
response = client.SearchFaces(request);
|
|
} catch (TencentCloudSDKException e) {
|
|
} catch (TencentCloudSDKException e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ StaticLog.error("face error: " + e.getMessage());
|
|
throw new AjaxError("无人脸信息");
|
|
throw new AjaxError("无人脸信息");
|
|
}
|
|
}
|
|
Arrays.stream(response.getResults())
|
|
Arrays.stream(response.getResults())
|