|
@@ -52,7 +52,7 @@ public class FaceRetrievaServer {
|
|
|
@Value("${face.retrieva.userInfo.password}")
|
|
|
private String password;
|
|
|
@Value("${face.retrieva.userInfo.threshold}")
|
|
|
- private Double threshold;
|
|
|
+ private String threshold;
|
|
|
|
|
|
/**
|
|
|
* 创建缓存,默认15分钟过期
|
|
@@ -111,7 +111,7 @@ public class FaceRetrievaServer {
|
|
|
}
|
|
|
|
|
|
List<RepositoryVO> voList = Convert.toList(RepositoryVO.class, repository.getResults());
|
|
|
- RetrievalRepositoryParam param = new RetrievalRepositoryParam().setExtra_fields(Lists.newArrayList("custom_field_1")).setOrder(new OrderDTO().setSimilarity("-1"))
|
|
|
+ RetrievalRepositoryParam param = new RetrievalRepositoryParam().setExtra_fields(Lists.newArrayList("custom_field_1")).setOrder(new OrderDTO().setSimilarity(-1))
|
|
|
.setStart(0).setLimit(1).setRetrieval_query_id("1").setRetrieval(new RetrievalDTO().setPicture_image_content_base64(photo).setFast(true).setThreshold(threshold)
|
|
|
.setRepository_ids(voList.stream().map(RepositoryVO::getId).collect(Collectors.toList())));
|
|
|
log.info("依图调用参数: {}", JSON.toJSONString(param));
|