package cn.iocoder.yudao.module.bpm.api.oa;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.bpm.api.oa.vo.loan.BpmOALoanSumDTO;
import cn.iocoder.yudao.module.bpm.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 java.util.Collection;
import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 流程实例")
public interface BpmOALoanApi {

    String PREFIX = ApiConstants.PREFIX + "/oa/loan";

    @GetMapping(PREFIX + "/getListByStaffId")
    @Operation(summary = "获取员工当月需抵扣的借支金额")
    @Parameter(name = "staffId", description = "用户编号", required = true)
    @Parameter(name = "month", description = "月份", required = true)
    CommonResult<List<BpmOALoanSumDTO>> getListByStaffId(@RequestParam("staffId") Collection<Long> staffId,
                                                         @RequestParam("month") String month);
}
