package com.chushang.common.dict.feign;

import com.chushang.common.core.constant.SecurityConstants;
import com.chushang.common.core.web.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @auther: zhao
 * @date: 2024/6/7 14:38
 */
@FeignClient(contextId = "remoteDictDataService",
        value = "system-service",
        path = "/system/dict/data/remote"
)
public interface RemoteDictDataService {

    @GetMapping(value = "/type/{dictType}")
    Result<Map<String, String>> getInfo(@PathVariable(value = "dictType") String dictType, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
