package com.zhongzheng.controller.course;

import com.zhongzheng.common.core.controller.BaseController;
import com.zhongzheng.common.core.page.TableDataInfo;
import com.zhongzheng.modules.course.bo.CourseMenuExamQueryBo;
import com.zhongzheng.modules.course.service.ICourseMenuExamService;
import com.zhongzheng.modules.course.vo.CourseMenuExamVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 课程目录关联卷Controller
 *
 * @author hjl
 * @date 2021-11-17
 */
@Api(value = "课程目录关联卷控制器", tags = {"课程目录关联卷管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/course/menu/exam")
public class CourseMenuExamController extends BaseController {

    private final ICourseMenuExamService iCourseMenuExamService;

    /**
     * 查询课程目录关联卷列表
     */
    @ApiOperation("查询课程目录关联卷列表")
    @GetMapping("/list")
    public TableDataInfo<CourseMenuExamVo> list(CourseMenuExamQueryBo bo) {
        startPage();
        List<CourseMenuExamVo> list = iCourseMenuExamService.getList(bo);
        return getDataTable(list);
    }



}
