3.30接口地址统一到192.168.1.196:5001
parent
d7551eb9f6
commit
55a3ac7e5a
|
@ -20,14 +20,14 @@ public enum ApiUrlEnum {
|
|||
//口罩人脸识别项目所用的接口地址重新定义
|
||||
FACE_SEARCH("message/mask", "人脸检测"),
|
||||
FACE_COMPARISON("compare", "一比一比对"),
|
||||
FACELIB_POSTURL("dkha/faceLib", "添加人脸"),
|
||||
FACELIST_POSTURL("dkha/face", "添加人像"),
|
||||
|
||||
|
||||
ALARM_POSTURL("alarm", "查看单个报警任务(业务场景卡口)post"),
|
||||
ALARMS_POSTURL("alarms", "查看批量报警post"),
|
||||
ALARMS_STATUS("taskStatus", "视频任务状态查询"),
|
||||
FACELIBS_POSTURL("faceLibs", "查看人脸"),
|
||||
FACELIB_POSTURL("faceLib", "添加人脸"),
|
||||
FACELIST_POSTURL("face", "添加人像"),
|
||||
FACE_POSTURL("face", "添加人像"),
|
||||
TASK_POSTURL("control", "任务操作"),
|
||||
TASK_VEDIO_POSTURL("controlVedio", "视频比对任务操作"),
|
||||
|
|
|
@ -108,13 +108,13 @@ public class CompareServiceImpl implements ICompareService {
|
|||
throw new DkException("请上传1:1比对的两张图片");
|
||||
}
|
||||
|
||||
//String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl();
|
||||
String apiUrltest = "http://192.168.1.196:5001/compare";
|
||||
String apiUrl = apiServerPrefix + ApiUrlEnum.FACE_COMPARISON.getUrl();
|
||||
// String apiUrltest = "http://192.168.1.196:5001/compare";
|
||||
FaceCompareVO faceCompareVO = new FaceCompareVO();
|
||||
faceCompareVO.setImage1(compareRequestVo.getUrlList().get(0));
|
||||
faceCompareVO.setImage2(compareRequestVo.getUrlList().get(1));
|
||||
System.out.println();
|
||||
ReturnVO returnVO = (ReturnVO)httpUtil.post(apiUrltest, faceCompareVO, ReturnVO.class);
|
||||
ReturnVO returnVO = (ReturnVO)httpUtil.post(apiUrl, faceCompareVO, ReturnVO.class);
|
||||
ApiFaceOneSearchReturnFaceVO apiFaceOneSearchReturnFaceVO = JsonUtil.string2Obj(JsonUtil.obj2String(returnVO.getData()), new TypeReference<ApiFaceOneSearchReturnFaceVO>() {});
|
||||
//返回结果集
|
||||
OneToOneResultVo oneToOneResultVo = new OneToOneResultVo();
|
||||
|
@ -168,10 +168,10 @@ public class CompareServiceImpl implements ICompareService {
|
|||
*/
|
||||
private void validateSingleFaceImage(String image) {
|
||||
//人脸检测url
|
||||
//String faceSearchUrl = apiRequestPrefix + ApiUrlEnum.FACE_SEARCH.getUrl();
|
||||
String faceSearchUrltest ="http://192.168.3.135:5000/message/mask";
|
||||
String faceSearchUrl = apiRequestPrefix + ApiUrlEnum.FACE_SEARCH.getUrl();
|
||||
//String faceSearchUrltest ="http://192.168.3.135:5000/message/mask";
|
||||
//组装api请求数据
|
||||
ReturnVO returnVO = (ReturnVO) httpUtil.post(faceSearchUrltest + "?url=" + image, null, ReturnVO.class);
|
||||
ReturnVO returnVO = (ReturnVO) httpUtil.post(faceSearchUrl + "?url=" + image, null, ReturnVO.class);
|
||||
System.out.println(returnVO.getCode()+returnVO.getMessage());
|
||||
if (returnVO.getCode() != 200) {
|
||||
throw new DkException(returnVO.getMessage());
|
||||
|
|
Loading…
Reference in New Issue