package com.crunii.micro.service.sysmgr.api;

import com.crunii.micro.common.dto.Result;
import com.crunii.micro.domain.dto.Worker;
import com.crunii.micro.service.sysmgr.api.domain.dto.OrgTreeAuthorityReqDto;
import com.crunii.micro.service.sysmgr.api.domain.dto.OrgTreeDto;
import com.crunii.micro.service.sysmgr.api.factory.OrgTreeAuthorityFallbackFactory;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;

@FeignClient(value = "service-sysmgr", fallbackFactory = OrgTreeAuthorityFallbackFactory.class)
public interface OrgTreeAuthorityClient {
    @ApiOperation(value = "查询组织树权限")
    @RequestMapping(path = "/auth/OrgController/getOrgTreeAuthority", method = RequestMethod.POST)
    @ResponseBody
    Result<List<OrgTreeDto>> getOrgTreeAuthority(@RequestBody @ApiParam OrgTreeAuthorityReqDto req);
}
