develop basic APIs / override reverse geolocation

This commit is contained in:
2025-02-12 01:12:13 +08:00
parent 1d27c6ee8a
commit 3e51ab8e3f
38 changed files with 1737 additions and 118 deletions

View File

@@ -197,6 +197,8 @@ func (l *FaceRecognitionLogic) loadExistingFaces(userId string) ([]face.Descript
const (
minFaceWidth = 50 // 最小允许的人脸宽度
minFaceHeight = 50 // 最小允许的人脸高度
FaceShow = 0 // 人脸展示状态
FaceHide = 1
)
// 判断人脸是否有效
@@ -216,6 +218,7 @@ func (l *FaceRecognitionLogic) saveFaceToDatabase(userId string, descriptor face
FaceVector: string(jsonBytes),
FaceImagePath: faceImagePath,
UserID: userId,
FaceShow: FaceShow,
}
err = l.svcCtx.DB.ScaStorageFace.Create(&storageFace)
if err != nil {