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<String> getCourseCount();
|
/**
|
* 根据课程id 查询学习人数
|
* @param id
|
* @return
|
*/
|
@GetMapping("/client/course/course/getCountByCourseId/{id}")
|
public R<Integer> getCountByCourseId(
|
@PathVariable("id")String id);
|
/**
|
* 根据课程id 查询章节列表
|
* @param id
|
* @return
|
*/
|
@GetMapping("/client/course/course/getChapterByCourseId/{id}")
|
public R<List<CourseChapter>> getChapterByCourseId(
|
@PathVariable("id")String id);
|
@GetMapping("/client/course/course/getCourseByIds/{pageCurr}/{pageSize}/{ids}")
|
R<Page<Course>> getCourseByIds(@PathVariable("pageCurr") Integer pageCurr,
|
@PathVariable("pageSize") Integer pageSize,
|
@PathVariable("ids")String ids
|
);
|
@PostMapping("/client/course/course/getCourseIdsByName/{name}")
|
public R<List<Long>> getCourseIdsByName(@PathVariable("name") String name);
|
/**
|
* 根据id获取课程信息
|
*
|
* @param targetId 课程id
|
* @param source 请求来源
|
* @return
|
*/
|
@GetMapping("/inner/course/course/getCourseById/{targetId}")
|
R<Course> getCourseById(@PathVariable("targetId") Long targetId
|
);
|
@PostMapping("/client/course/course/getCourseByIdAny")
|
public R<OrderCourseVO> getCourseByIdAny(@RequestBody OrderCourseVO req);
|
@GetMapping("/client/course/course/getCategoryById/{id}")
|
R<CourseCategory> getCategoryById(@PathVariable("id") String id);
|
@GetMapping("/client/course/course/cateList")
|
R<List<CourseCategory>> cateList();
|
@PostMapping("/client/course/course/courseList")
|
R<PageDTO<Course>> courseList(@RequestBody CourseDTO courseDTO);
|
}
|