package com.chushang.system.feign;

import com.chushang.common.core.constant.SecurityConstants;
import com.chushang.system.constants.SystemConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 远程获取 部门信息
 * @auther: zhao
 * @date: 2024/7/3 17:50
 */
@FeignClient(contextId = "remoteDeptService",
        value = SystemConstants.SYSTEM_SERVICE,
        path = SystemConstants.APPLICATION_CONTENT_PATH + "/dept/remote"
)
public interface RemoteDeptService {

    @GetMapping(value = "/getDeptNameByIds")
    Map<Long, String> getDeptNameByIds(@RequestParam(value = "deptIds") Set<Long> deptIds,
                                       @RequestHeader(SecurityConstants.FROM_SOURCE) String source);


}
