package org.springblade.manager.feign;

import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;

@FeignClient(value = APPLICATION_NAME_PREFIX +  "manager")
public interface ProjectAssignmentUserClient {

    /**
     * 接口前缀
     */
    String API_PREFIX = "/api/manager/projectAssignmentUser";

    @GetMapping(API_PREFIX + "/queryCurrentUserDownAllContractAndProjectId")
    List<SaveUserInfoByProjectDTO> queryCurrentUserDownAllContractAndProjectId(@RequestParam Long userId);

    /**
     * 根据项目ID及合同段ID获取当前绑定的维护人员
     * @param projectId 项目ID
     * @param contractId 合同段ID
     * @return 结果
     */
    @GetMapping(API_PREFIX + "/queryCurrentProjectContractAssignmentUserList")
    List<SaveUserInfoByProjectDTO> queryCurrentProjectContractAssignmentUserList(@RequestParam Long projectId, @RequestParam Long contractId);

}
