package com.xinquan.course.controller.inner;
|
|
|
import com.xinquan.common.core.domain.R;
|
import com.xinquan.common.security.annotation.InnerAuth;
|
import com.xinquan.course.api.domain.Course;
|
import com.xinquan.course.service.CourseService;
|
import io.swagger.annotations.Api;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* <p>
|
* 线上课程表 前端控制器
|
* </p>
|
*
|
* @author mitao
|
* @since 2024-08-21
|
*/
|
@Api(tags = {"用户端-课程相关接口"})
|
@RestController
|
@RequiredArgsConstructor
|
@RequestMapping("/inner/course/course")
|
public class InnerCourseController {
|
|
private final CourseService courseService;
|
|
/**
|
* 根据课程id获取课程信息
|
*
|
* @return 课程信息
|
*/
|
@GetMapping("/getCourseById/{targetId}")
|
public R<Course> getCourseById(@PathVariable("targetId") Long targetId) {
|
return R.ok(courseService.getById(targetId));
|
}
|
|
|
}
|