This commit is contained in:
2025-01-23 09:31:56 +08:00
parent 38c4b553bc
commit 1aa1ae5e2b
18 changed files with 171 additions and 76 deletions

View File

@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* @Author:longbinbin
* @Date:2024/12/4 17:03
@@ -39,8 +41,22 @@ AppFaceController {
return faceService.faceUpload(file,scenicId);
}
@GetMapping("/scenic/{scenicId}/list")
public ApiResponse<List<FaceRespVO>> list(@PathVariable("scenicId") String scenicId) {
JwtInfo worker = JwtTokenUtil.getWorker();
Long userId = worker.getUserId();
List<FaceRespVO> list = faceService.listByUser(userId, scenicId);
return ApiResponse.success(list);
}
@GetMapping("/{faceId}")
public ApiResponse<FaceRespVO> getById(@PathVariable("faceId") Long faceId) {
return faceService.getById(faceId);
}
@PostMapping("/{faceId}/match")
public ApiResponse match(@PathVariable("faceId") Long faceId) {
faceService.matchFaceId(faceId);
return ApiResponse.success("");
}
}