|
@@ -11,9 +11,11 @@ import cn.rankin.data.api.product.vo.CourseItemVo;
|
|
|
import cn.rankin.data.api.product.vo.SupportItemVo;
|
|
|
import cn.rankin.data.api.product.vo.TrainingItemVo;
|
|
|
import org.springframework.cloud.netflix.feign.FeignClient;
|
|
|
+import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
@FeignClient(name = "${service.product.name}")
|
|
@@ -55,6 +57,12 @@ public interface ProductClient {
|
|
|
@RequestMapping(value = "/goods/{goodsId}", method = RequestMethod.GET)
|
|
|
APIResult<Goods> findGoods(@PathVariable("goodsId") String goodsId);
|
|
|
|
|
|
+ @RequestMapping(value = "/{merchantId}/posters", method = RequestMethod.GET)
|
|
|
+ List<Poster> getPosters(@PathVariable("merchantId") String merchantId, @RequestParam("start") Long start,
|
|
|
+ @RequestParam("offset") Integer offset, @RequestParam("sortKey") String sortKey,
|
|
|
+ @RequestParam("direction") Sort.Direction direction);
|
|
|
+
|
|
|
+
|
|
|
@Component
|
|
|
class ProductClientHystrix implements ProductClient {
|
|
|
|
|
@@ -117,5 +125,12 @@ public interface ProductClient {
|
|
|
public APIResult<Goods> findGoods(String goodsId) {
|
|
|
return APIResult.error(ApiWebCode.SERVER_ERROR);
|
|
|
}
|
|
|
+
|
|
|
+ public List<Poster> getPosters(String merchantId, Long start,
|
|
|
+ Integer offset, String sortKey, Sort.Direction direction){
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|