You've already forked FrameTour-BE
feat(printer): 修改用户照片上传接口返回照片ID
- 将 addUserPhoto 接口的返回值从布尔值改为照片ID - 更新 AppPrinterController 中上传接口的返回值为照片ID - 调整 PrinterServiceImpl 实现类中 addUserPhoto 方法返回实体ID- 修改 PrinterService 接口定义,统一返回类型为 Integer
This commit is contained in:
@@ -62,8 +62,8 @@ public class AppPrinterController {
|
||||
String[] split = file.getOriginalFilename().split("\\.");
|
||||
String ext = split[split.length - 1];
|
||||
String url = StorageFactory.use().uploadFile(file, "printer", UUID.randomUUID() + "." + ext);
|
||||
printerService.addUserPhoto(JwtTokenUtil.getWorker().getUserId(), scenicId, url);
|
||||
return ApiResponse.success(url);
|
||||
Integer id = printerService.addUserPhoto(JwtTokenUtil.getWorker().getUserId(), scenicId, url);
|
||||
return ApiResponse.success(id);
|
||||
}
|
||||
@PostMapping("/uploadTo/{scenicId}/cropped/{id}")
|
||||
public ApiResponse<?> uploadReplace(@PathVariable("scenicId") Long scenicId, @PathVariable("id") Long id, @RequestParam(value = "file") MultipartFile file) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user