package com.yida.data.school.feign.leave;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.school.dto.leave.ListStudentRequestDetailDTO;
import com.yida.data.school.dto.userLeave.ListUserRequestDTO;
import com.yida.data.school.fallback.leave.RemoteLeaveRequestServiceFallback;
import com.yida.data.school.vo.userLeave.EduLeaveRequestUserVO;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author ccl
 */
@FeignClient(value = FebsServerConstant.EDU_SCHOOL, contextId = "leaveRequestServiceClient",
    fallbackFactory = RemoteLeaveRequestServiceFallback.class)
public interface RemoteLeaveRequestService {

    /**
     * 是否存在通过的请假条
     *
     * @param dto
     * @return
     */
    @PostMapping("/in/request/leaveRequest/existRequest")
    ResultBean<Boolean> existRequest(ListStudentRequestDetailDTO dto);

    /**
     * @param dto
     * @return
     */
    @PostMapping("/in/eduLeaveRequestUser/findList")
    ResultBean<List<EduLeaveRequestUserVO>> findList(ListUserRequestDTO dto);

}
