1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- package com.atguigu.tingshu.album;
- import com.atguigu.tingshu.album.impl.AlbumDegradeFeignClient;
- import com.atguigu.tingshu.common.result.Result;
- import com.atguigu.tingshu.model.album.AlbumInfo;
- import com.atguigu.tingshu.model.album.BaseCategory1;
- import com.atguigu.tingshu.model.album.BaseCategory3;
- import com.atguigu.tingshu.model.album.BaseCategoryView;
- import com.atguigu.tingshu.vo.album.AlbumStatVo;
- import org.springframework.cloud.openfeign.FeignClient;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PathVariable;
- import java.util.List;
- /**
- * <p>
- * 专辑模块远程调用Feign接口
- * </p>
- *
- * @author atguigu
- */
- @FeignClient(value = "service-album",path = "api/album",fallback = AlbumDegradeFeignClient.class)
- public interface AlbumFeignClient {
- /**
- * 查询所有一级分类列表
- *
- * @return
- */
- @GetMapping("/category/findAllCategory1")
- public Result<List<BaseCategory1>> getAllCategory1();
- @GetMapping("/albumInfo/getAlbumInfo/{id}")
- public Result<AlbumInfo> getAlbumInfo(@PathVariable("id") Long id);
- /**
- * 根据三级分类ID查询分类信息
- * @param category3Id
- * @return
- */
- @GetMapping("/category/getCategoryView/{category3Id}")
- public Result<BaseCategoryView> getCategoryView(@PathVariable("category3Id") Long category3Id);
- @GetMapping("/category/findTopBaseCategory3/{category1Id}")
- public Result<List<BaseCategory3>> findTopBaseCategory3(@PathVariable("category1Id") Long category1Id);
- /**
- * 根据专辑ID查询专辑统计信息
- * @param albumId
- * @return
- */
- @GetMapping("/albumInfo/getAlbumStatVo/{albumId}")
- public Result<AlbumStatVo> getAlbumStatVo(@PathVariable("albumId") Long albumId);
- }
|