Class PhotoHttpImpl

java.lang.Object
io.github.seenings.photo.api.impl.PhotoHttpImpl
All Implemented Interfaces:
io.github.seenings.photo.http.HttpPhotoService

@RestController @RequestMapping("seen/feign-v1/file/photo") public class PhotoHttpImpl extends Object implements io.github.seenings.photo.http.HttpPhotoService
PhotoController
Since:
2022-12-31
Author:
chixuehui
  • Constructor Details

    • PhotoHttpImpl

      public PhotoHttpImpl()
  • Method Details

    • photoIdToPhotoUrl

      @PostMapping("photo-id-to-photo-url") public Map<Integer,String> photoIdToPhotoUrl(@RequestBody Set<Integer> photoIds)
      根据照片ID获取照片路径
      Specified by:
      photoIdToPhotoUrl in interface io.github.seenings.photo.http.HttpPhotoService
      Parameters:
      photoIds - 照片ID
      Returns:
      照片ID对应照片路径
    • photoIdToLongPhotoUrl

      @PostMapping("photo-id-to-long-photo-url") public Map<Integer,String> photoIdToLongPhotoUrl(@RequestBody Set<Integer> photoIds)
      根据照片ID获取长照片路径(含路径头)
      Specified by:
      photoIdToLongPhotoUrl in interface io.github.seenings.photo.http.HttpPhotoService
      Parameters:
      photoIds - 照片ID
      Returns:
      照片ID对应照片路径
      See Also:
      • PublicConstant.PHOTO_VERSION
    • setPath

      @PostMapping("set-path") public Integer setPath(@RequestParam("path") String path, @RequestParam("userId") Long userId)
      设置路径
      Specified by:
      setPath in interface io.github.seenings.photo.http.HttpPhotoService
      Parameters:
      path - 路径
      userId - 用户
      Returns:
      路径ID
    • setPathByMinio

      @PostMapping("set-path-minio") public Integer setPathByMinio(@RequestParam("path") String path, @RequestParam("userId") Long userId)
      设置路径
      Specified by:
      setPathByMinio in interface io.github.seenings.photo.http.HttpPhotoService
      Parameters:
      path - 路径
      userId - 用户
      Returns:
      路径ID
    • photoIdToStorageTypeAndPath

      @PostMapping("photo-id-to-storage-type-and-path") public Map<Integer, io.github.seenings.file.model.StorageTypeAndPath> photoIdToStorageTypeAndPath(@RequestBody Set<Integer> photoIds)
      根据照片ID获取文件
      Specified by:
      photoIdToStorageTypeAndPath in interface io.github.seenings.photo.http.HttpPhotoService
      Parameters:
      photoIds - 照片ID
      Returns:
      照片ID对应文件
    • photoIdToFileName

      @PostMapping("photo-id-to-file-name") public Map<Integer,String> photoIdToFileName(@RequestBody Set<Integer> photoIds)
      根据照片ID获取文件名
      Specified by:
      photoIdToFileName in interface io.github.seenings.photo.http.HttpPhotoService
      Parameters:
      photoIds - 照片ID
      Returns:
      照片ID对应文件名