package cn.iocoder.yudao.module.hrm.api.userlivetree;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.hrm.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - CRM用户结构树")
public interface UserLiveTreeApi {

    String PREFIX = ApiConstants.PREFIX + "/crm/userLiveTree";

    @GetMapping(PREFIX + "/get-list")
    @Operation(summary = "通过用户id获取所有子集用户id")
    @Parameter(name = "id", description = "用户编号", required = true, example = "1024")
    CommonResult<List<Long>> getItemIdsByUserId(@RequestParam("id") Long id);
}
