package com.yida.data.user.feign;

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

import com.yida.data.user.fallback.RemoteCourseServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = FebsServerConstant.EDU_USER, contextId = "courseServiceClient",
        fallbackFactory = RemoteCourseServiceFallback.class)
public interface RemoteCourseService {

    /**
     * 调用通知接口
     */
    @GetMapping("/course/initCourse")
    ResultBean initCourse(@RequestParam("schoolId") Long schoolId);

    /**
     * 根据名称查询科目
     */
    @GetMapping("/course/getCourseByName")
    ResultBean<EduCourse> getCourseByName(@RequestParam("courseName") String courseName, @RequestParam("schoolId") Long schoolId);
}
