package com.xinquan.course.api.feign; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.xinquan.common.core.constant.SecurityConstants; import com.xinquan.common.core.constant.ServiceNameConstants; import com.xinquan.common.core.domain.R; import com.xinquan.common.core.utils.page.PageDTO; import com.xinquan.course.api.domain.*; import com.xinquan.course.api.factory.RemoteCourseFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @author mitao * @date 2024/8/21 */ @FeignClient(contextId = "remoteCourseService", value = ServiceNameConstants.COURSE_SERVICE, fallbackFactory = RemoteCourseFallbackFactory.class) public interface RemoteCourseService { @GetMapping("/client/course/course/getCourseCount") public R getCourseCount(); /** * 根据课程id 查询学习人数 * @param id * @return */ @GetMapping("/client/course/course/getCountByCourseId/{id}") public R getCountByCourseId( @PathVariable("id")String id); /** * 根据课程id 查询章节列表 * @param id * @return */ @GetMapping("/client/course/course/getChapterByCourseId/{id}") public R> getChapterByCourseId( @PathVariable("id")String id); @GetMapping("/client/course/course/getCourseByIds/{pageCurr}/{pageSize}/{ids}") R> getCourseByIds(@PathVariable("pageCurr") Integer pageCurr, @PathVariable("pageSize") Integer pageSize, @PathVariable("ids")String ids ); @PostMapping("/client/course/course/getCourseIdsByName/{name}") public R> getCourseIdsByName(@PathVariable("name") String name); /** * 根据id获取课程信息 * * @param targetId 课程id * @param source 请求来源 * @return */ @GetMapping("/inner/course/course/getCourseById/{targetId}") R getCourseById(@PathVariable("targetId") Long targetId ); @PostMapping("/client/course/course/getCourseByIdAny") public R getCourseByIdAny(@RequestBody OrderCourseVO req); @GetMapping("/client/course/course/getCategoryById/{id}") R getCategoryById(@PathVariable("id") String id); @GetMapping("/client/course/course/cateList") R> cateList(); @PostMapping("/client/course/course/courseList") R> courseList(@RequestBody CourseDTO courseDTO); }