package com.chushang.system.feign;

import com.chushang.common.core.constant.SecurityConstants;
import com.chushang.datascope.entity.DataScopeEntity;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 用于数据权限 判断远程调用
 */
@FeignClient(contextId = "remoteDataScopeService",
        value = SystemConstants.SYSTEM_SERVICE,
        path = SystemConstants.APPLICATION_NAME + "/data/scope"
)
public interface RemoteDataScopeService {

    @GetMapping(value = "/dept/list")
    public List<String> listDeptIds(@RequestParam(value = "dataScope") DataScopeEntity dataScope,
                                    @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
