You've already forked FrameTour-BE
47 lines
1.4 KiB
Java
47 lines
1.4 KiB
Java
package com.ycwl.basic.controller.mobile;
|
|
|
|
import com.ycwl.basic.model.jwt.JwtInfo;
|
|
import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
|
import com.ycwl.basic.service.pc.FaceService;
|
|
import com.ycwl.basic.utils.ApiResponse;
|
|
import com.ycwl.basic.utils.JwtTokenUtil;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
/**
|
|
* @Author:longbinbin
|
|
* @Date:2024/12/4 17:03
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/api/mobile/face/v1")
|
|
@Api(tags = "用户人脸相关接口")
|
|
public class
|
|
AppFaceController {
|
|
|
|
@Autowired
|
|
private FaceService faceService;
|
|
|
|
/**
|
|
* 1、上传人脸照片
|
|
* 2、人脸照片有效性校验
|
|
* 3、校验失败,删除,提示重新上传
|
|
* 4、校验成功,保存用户人脸信息,将访问人脸照片访问地址响应给前端
|
|
* @param file
|
|
* @param scenicId
|
|
* @return
|
|
*/
|
|
@ApiOperation("人脸照片上传")
|
|
@PostMapping("/faceUPload")
|
|
public ApiResponse faceUpload(@RequestParam("file")MultipartFile file, @RequestParam("scenicId") Long scenicId) {
|
|
return faceService.faceUpload(file,scenicId);
|
|
}
|
|
|
|
@GetMapping("/{faceId}")
|
|
public ApiResponse<FaceRespVO> getById(@PathVariable("faceId") Long faceId) {
|
|
return faceService.getById(faceId);
|
|
}
|
|
}
|