package com.yida.data.system.feign;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.common.core.entity.system.EduDeptFunction;
import com.yida.data.system.fallback.RemoteDeptFunctionServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "deptFunctionServiceClient", fallbackFactory =
        RemoteDeptFunctionServiceFallback.class)
public interface RemoteDeptFunctionService {

    /**
     * 获取部门是否开通当前功能
     *
     * @param functionName 功能名称
     * @param deptId       部门id
     * @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.EduDeptFunction>
     * @author ZYJ
     * @date 2023/2/21 15:06
     */
    @GetMapping("/in/function/getDeptFunction")
    ResultBean<EduDeptFunction> getDeptFunction(@RequestParam("functionName") String functionName,
                                                @RequestParam("deptId") Long deptId);
}
