package com.jeeplus.sys.feign;

import com.jeeplus.common.constant.AppNameConstants;
import com.jeeplus.sys.factory.PostApiFallbackFactory;
import com.jeeplus.sys.service.dto.PostDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "postApi", name = AppNameConstants.APP_SYSTEM_SERVICE, fallbackFactory = PostApiFallbackFactory.class)
public interface IPostApi {
    /**
     * 获取角色
     *
     * @return
     */
    @GetMapping(value = "/feign/sys/dict/getPostDTOByName")
    PostDTO getPostDTOByName(@RequestParam(value = "name") String name);

    /**
     * 获取角色
     *
     * @return
     */
    @GetMapping(value = "/feign/sys/dict/getPostDTOByNameJSON")
    String getPostDTOByNameJSON(@RequestParam(value = "name") String name);
    @GetMapping(value = "/feign/sys/dict/getPostDTOById")
    PostDTO getPostDTOById(@RequestParam(value = "id")String id);
}
