package jnpf.cultivate;

import io.swagger.v3.oas.annotations.Operation;
import jnpf.base.ActionResult;
import jnpf.cultivate.fallback.FtbCultivatePromotionFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Title:FtbCultivatePromotionMemberApi
 * @Author:peng.hao
 * @create: 2024/1/1815:58
 */
@FeignClient(name = "jnpf-ftb", fallbackFactory = FtbCultivatePromotionFallback.class )
public interface FtbCultivatePromotionApi {

    /**
     * 拖动删除成员启用对应晋升通道
     * @param userIds 用户id
     * @return
     */
    @PutMapping("/cul_pro_member/deleteMembersToProChannel")
    ActionResult<Boolean> deleteMembersToProChannel(@RequestBody List<String> userIds);

    /**
     * 获取是否有人岗位职等的晋升申请
     * @param postId 公司岗位ID
     * @param grandId 职等ID
     * @param userId 用户ID
     * @return 成功结果
     */
    @GetMapping("/cul-post-apply/userIsHasApply")
    @Operation(summary = "查看当前的人岗位职等是否存在晋升申请")
    ActionResult<Boolean> isThereAnAppForThePosLevel(@RequestParam("postId") String postId,
                                                            @RequestParam("grandId") String grandId,
                                                            @RequestParam("userId") String userId);
}
