package com.zhongzheng.controller.bank;

import com.zhongzheng.common.annotation.Log;
import com.zhongzheng.common.core.controller.BaseController;
import com.zhongzheng.common.core.domain.AjaxResult;
import com.zhongzheng.common.core.page.TableDataInfo;
import com.zhongzheng.common.enums.BusinessType;
import com.zhongzheng.modules.bank.bo.*;
import com.zhongzheng.modules.bank.domain.QuestionBusiness;
import com.zhongzheng.modules.bank.service.IExamQuestionService;
import com.zhongzheng.modules.bank.service.IExamService;
import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
import com.zhongzheng.modules.bank.vo.ExamQuestionVo;
import com.zhongzheng.modules.bank.vo.ExamVo;
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.*;

import java.util.List;

/**
 * 试卷Controller
 *
 * @author hjl
 * @date 2021-10-22
 */
@Api(value = "试卷控制器", tags = {"试卷管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/bank/exam")
public class ExamController extends BaseController {

    private final IExamService iExamService;

    private final IQuestionBusinessService iQuestionBusinessService;

    private final IExamQuestionService iExamQuestionService;



    /**
     * 获取试卷详细信息
     */
    @ApiOperation("获取试卷详细信息")
    @GetMapping("/{examId}")
    public AjaxResult<ExamVo> getInfo(@PathVariable("examId" ) Long examId) {
        return AjaxResult.success(iExamService.queryById(examId));
    }



}
