“djh”
4 天以前 a0469a082320c33fc19d4e7239b7ddde67945227
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
package com.gkhy.exam.admin.controller.app;
 
 
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.system.service.ExCourseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
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 kzy
 * @since 2024-06-05 15:07:36
 */
@Api(tags = "APP课程前端控制器")
@RestController
@RequestMapping("/app/course")
public class AppCourseController {
    @Autowired
    private ExCourseService courseService;
 
    @PreAuthorize("hasAnyAuthority('train:exam:student')")
    @ApiOperation(value = "根据id获取课程信息")
    @GetMapping(value = { "/{courseId}" })
    public CommonResult getCompanyInfo(@PathVariable(value = "courseId", required = true) Long courseId)
    {
        return CommonResult.success(courseService.selectCourseById(courseId));
    }
}