package com.tashow.cloud.productapi.api.product;

import com.tashow.cloud.productapi.api.product.dto.CategoryDO;
import com.tashow.cloud.productapi.api.product.dto.CategoryDto;
import com.tashow.cloud.productapi.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
/** RPC 服务 - 参数配置 */
public interface CategoryApi {

  String PREFIX = ApiConstants.PREFIX + "/category";

  /** 根据参数键查询参数值 */
  @GetMapping(PREFIX + "/categoryList")
  List<CategoryDO> categoryList(@RequestParam(value = "grade", required = false) Integer grade,
                                @RequestParam(value = "categoryId", required = false) Long categoryId,
                                @RequestParam(value = "categoryName", required = false) String categoryName,
                                @RequestParam(value = "status", required = false) Integer status);
}
