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));
|
}
|
}
|