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 SaveUserInfoByProjectClient {

    /**
     * URL常量
     */
    String SEARCH_USER_INFO_AND_PROJECT = "/api/manager/searchUserInfoAndProject";
    String SEARCH_USER_INFO_AND_PROJECT2 = "/api/manager/searchUserInfoAndProject2";

    /**
     * 获取用户引用项目合同角色信息
     */
    @GetMapping(SEARCH_USER_INFO_AND_PROJECT)
    List<SaveUserInfoByProjectDTO> searchUserInfoAndProject(@RequestParam("userId") String userId, @RequestParam("roleId") String roleId);

    /**
     * 获取用户引用项目合同角色信息
     */
    @GetMapping(SEARCH_USER_INFO_AND_PROJECT2)
    List<SaveUserInfoByProjectDTO> searchUserInfoAndProject2(@RequestParam("userId") String userId);


}
