|
|
@@ -1,7 +1,10 @@
|
|
|
package org.dromara.server.consume.controller.v1;
|
|
|
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
import org.dromara.common.core.api.ReturnResult;
|
|
|
-import org.dromara.server.consume.domain.bo.FaceFeatureBo;
|
|
|
+import org.dromara.server.consume.business.ArcFaceBusiness;
|
|
|
+import org.dromara.server.consume.domain.vo.YcFaceFeatureVo;
|
|
|
+import org.dromara.server.consume.service.IFaceEngineService;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -21,13 +24,13 @@ import java.util.List;
|
|
|
* @since JDK 1.8
|
|
|
*/
|
|
|
@RestController
|
|
|
+@RequiredArgsConstructor
|
|
|
@RequestMapping("/v1/faceFeature")
|
|
|
public class FaceCollectController {
|
|
|
+ private final ArcFaceBusiness faceBusiness;
|
|
|
/**
|
|
|
- * 增量下载
|
|
|
- *
|
|
|
+ * 增量下载人脸特征数据
|
|
|
* 建议设备每10分钟,从后台获取一次增量数据
|
|
|
- *
|
|
|
* 后台会根据设备当前的人脸权限版本号,来取出有更新的人脸数据(若人脸版本号不存在,则返回全量人脸数据)
|
|
|
*
|
|
|
* @param termNo 设备机号
|
|
|
@@ -36,8 +39,7 @@ public class FaceCollectController {
|
|
|
*/
|
|
|
@GetMapping(value = "/incrFeature/{termNo}")
|
|
|
public ReturnResult getIncrementFeatureData(@PathVariable("termNo") Integer termNo) {
|
|
|
- //List<FaceFeatureBo> featureData = faceEngineService.getIncrFeatureDataUser(termNo);
|
|
|
- List<FaceFeatureBo> featureData = new ArrayList<>();
|
|
|
+ List<YcFaceFeatureVo> featureData = faceBusiness.getIncrementFeatureDataUser(termNo);
|
|
|
if (featureData == null) {
|
|
|
featureData = new ArrayList<>();
|
|
|
}
|