无关风月
2024-11-04 64f7ccb9ef8b5a0618e65cddc14b981c1f108ba3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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));
    }
 
 
}