BatchExamStudentController.java 1.78 KB
package com.meishu.controller;


import com.meishu.common.ResponseData;
import com.meishu.common.ResponseVO;
import com.meishu.model.BatchExamStudentsDO;
import com.meishu.service.BatchExamStudentsService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 * 学生考试映射表 前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2023-07-11
 */
@RestController
@Api(tags = "学生考试映射表")
@RequestMapping("/studentExams")
public class BatchExamStudentController {

    @Autowired
    private BatchExamStudentsService studentExamsService;

    @PostMapping("exams")
    @ApiOperation("学生可以参加的考试  studentId  学生id batchId")
    public ResponseVO exams(@RequestBody BatchExamStudentsDO studentExamsDO)throws Exception {
        return ResponseData.generateCreatedResponse(0,studentExamsService.exams(studentExamsDO));
    }

    @PostMapping("studentExams")
    @ApiOperation("学生考试记录 studentId")
    public ResponseVO studentExams(@RequestBody BatchExamStudentsDO studentExamsDO){
        return ResponseData.generateCreatedResponse(0,studentExamsService.studentExams(studentExamsDO));
    }

    @PostMapping("batchExamStudentScore")
    @ApiOperation("某个批次考试情况  batchExamId ")
    public ResponseVO batchExamStudentScore(@RequestBody BatchExamStudentsDO batchExamStudentsDO ){
        return ResponseData.generateCreatedResponse(0,studentExamsService.batchExamStudentScore(batchExamStudentsDO));
    }


}