You've already forked FrameTour-BE
逻辑修改
This commit is contained in:
@ -35,7 +35,7 @@ public class FileController {
|
||||
public ApiResponse<?> upload(@RequestParam(value = "file") MultipartFile file) throws IOException {
|
||||
String[] split = file.getOriginalFilename().split("\\.");
|
||||
String ext = split[split.length - 1];
|
||||
String url = StorageFactory.use("assets").uploadFile(file, "web", UUID.randomUUID() + "." + ext);
|
||||
String url = StorageFactory.use().uploadFile(file, "web", UUID.randomUUID() + "." + ext);
|
||||
return ApiResponse.success(url);
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ public class FileController {
|
||||
@PostMapping("/delete")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> delete(@RequestParam(value = "fileName") String fileName) throws IOException {
|
||||
boolean flag = StorageFactory.use("assets").deleteFile("web", fileName);
|
||||
boolean flag = StorageFactory.use().deleteFile("web", fileName);
|
||||
return flag ? ApiResponse.success(BizCodeEnum.REQUEST_OK) : ApiResponse.fail(BizCodeEnum.FAIL.getMessage());
|
||||
}
|
||||
}
|
||||
|
@ -35,18 +35,7 @@ AppFaceController {
|
||||
*/
|
||||
@ApiOperation("人脸照片上传")
|
||||
@PostMapping("/faceUPload")
|
||||
public ApiResponse faceUPload(@RequestParam("file")MultipartFile file, @RequestParam("scenicId") Long scenicId) {
|
||||
|
||||
public ApiResponse faceUpload(@RequestParam("file")MultipartFile file, @RequestParam("scenicId") Long scenicId) {
|
||||
return faceService.faceUpload(file,scenicId);
|
||||
}
|
||||
|
||||
@ApiOperation("查询人脸照片信息")
|
||||
@GetMapping("/getFaceData")
|
||||
public ApiResponse<FaceRespVO> getFaceData() {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
return faceService.getFaceByMemberId(worker.getUserId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user