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

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;

import com.yida.data.school.fallback.transaction.RemoteStudentApplyServiceFallback;
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 java.util.Map;

@FeignClient(value = FebsServerConstant.EDU_SCHOOL, contextId = "studentApplyServiceClient",
        fallbackFactory = RemoteStudentApplyServiceFallback.class)
public interface RemoteStudentApplyService {

    @GetMapping("/in/transaction/studentApply/listApply")
    ResultBean<Map<Long, List<String>>> listApplyCode(@RequestParam("studentIds") Long[] studentIds);

    @GetMapping("/transaction/studentApply/hasApply")
    ResultBean<Boolean> hasApply(@RequestParam("studentId") Long studentId,
                                 @RequestParam("applyCode") String applyCode);
}
