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

import com.crunii.micro.common.dto.Result;
import com.crunii.micro.service.sysmgr.api.domain.dto.OrgSimpleVO;
import com.crunii.micro.service.sysmgr.api.factory.OrgFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "service-sysmgr", fallbackFactory = OrgFallbackFactory.class)
public interface OrgClient {
    @ApiOperation(value = "通过父组织Ids获取子组织")
    @RequestMapping(path = "/auth/OrgController/getChildrenByParentOrgIds", method = RequestMethod.POST)
    @ResponseBody
    Result<List<OrgSimpleVO>> getChildrenByParentOrgIds(@RequestParam("parentOrgIds") List<Long> parentOrgIds);
}
