package com.boman.system.api;

import com.boman.domain.constant.ServiceNameConstants;
import com.boman.domain.SysDictData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author shiqian
 * @date 2021年04月07日 10:31
 **/
@FeignClient(contextId = "remoteDictDataService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteDictDataService {

    /**
     * 功能描述: 根据type查字典值
     *
     * @param dictType dictType
     * @return List<SysDictData>
     */
    @GetMapping(value = "/dict/data/type/data/{dictType}")
    List<SysDictData> listByType(@PathVariable(value = "dictType") String dictType);

    /**
     * 功能描述: 根据type和value查字典值
     *
     * @param dictType  dictType
     * @param dictValue dictValue
     * @return java.lang.String
     */
    @GetMapping(value = "/dict/data/type/data/{dictType}/{dictValue}")
    String selectDictLabel(@PathVariable("dictType") String dictType, @PathVariable("dictValue") String dictValue);
}

