package com.jeeplus.sys.feign;

import com.jeeplus.common.constant.AppNameConstants;
import com.jeeplus.sys.domain.Area;
import com.jeeplus.sys.factory.AreaApiFallbackFactory;
import com.jeeplus.sys.service.dto.AreaDTO;
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(contextId = "areaApi", name = AppNameConstants.APP_SYSTEM_SERVICE, fallbackFactory = AreaApiFallbackFactory.class)
public interface IAreaApi {

    /**
     * 获取区域
     *
     * @return
     */
    @GetMapping(value = "/feign/sys/area/getAreaDTOByName")
    List<Area> getAreaDTOByName(@RequestParam(value = "name") String name);
}
