基于javaweb+mysql的springboot在线考试系统(单选,多选,判断,填空,简答题)(java+springboot+ssm+mysql+html+maven)
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
有三种角色:老师、学生、管理员
基于javaweb的SpringBoot在线考试系统(单选,多选,判断,填空,简答题)(java+springboot+ssm+mysql+html+maven)
功能:
学生信息 班级 专业 学号 姓名 在线考试 成绩查询 个人信息 密码修改 教师管理 教师编号 姓名 所教科目 题库管理 单选题 多选题 填空题 判断题,简答题(人工阅卷) 试卷管理 新建试卷 在试库中选择试题 试卷设置 发布试卷 考试管理 发布考试计划 学生考试 自动阅卷 人工阅卷 个人信息 密码修改 管理员 学生管理 教师管理 管理员管理 院系管理 班级管理 个人信息 密码修改。
}
/**
* 管理员 删除班级信息
*/
@RequestMapping(value = "/classinfo/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<ClassInfo> del(HttpRequest request) {
List<String> classIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("class_id_list");
for (int i = 0; i < array.size(); i++) {
classIdList.add(array.getString(i));
}
return classInfoService.del(classIdList);
}
}
/**
* 科目控制器
*/
@RestController
public class AcademicsController {
@Resource(name = "academicsService")
private IAcademicsService academicsService;
/**
* 学生考试记录控制器
*/
@RestController
public class StudentExamRecordController {
@Resource(name = "studentExamRecordService")
private IStudentExamRecordService studentExamRecordService;
/**学生 查询考试信息列表*/
@RequestMapping(value = "/studentexamrecord/qryExamPage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.student})
public Result<StudentExamRecord> qryExamPage(HttpRequest request) {
Map<String, Object> param = new HashMap<>();
int pageNo = request.containsKey("page_no") ? request.getInteger("page_no") : 1;
int pageSize = request.containsKey("page_size") ? request.getInteger("page_size") : 20;
param.put("student_id", SessionContext.get("student_id"));
param.put("now_time", DateUtils.parseDateToStr(new Date(), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI_SS));
List<Integer> list = new ArrayList<>();
list.add(1);
list.add(2);
list.add(3);
param.put("state",list);
return studentExamRecordService.qryPage(param, pageNo, pageSize);
}
/**学生 查询考试成绩列表*/
@RequestMapping(value = "/studentexamrecord/qryScorePage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.student})
/**
* 管理员 院系管理界面
*/
@RequestMapping(value = "/admin/departmentmanage/{url_id}")
public String departmentmanage(@PathVariable(value = "url_id") String urlId, Model model) {
if (!ValidateUrlIdUtil.validate(urlId, model)) {
return "error/error";
}
return "admin/departmentmanage/departmentmanage";
}
/**
* 管理员 班级管理界面
*/
@RequestMapping(value = "/admin/classinfomanage/{url_id}")
public String classinfomanage(@PathVariable(value = "url_id") String urlId, Model model) {
if (!ValidateUrlIdUtil.validate(urlId, model)) {
return "error/error";
}
return "admin/classinfomanage/classinfomanage";
}
/**
* 管理员 班级管理界面
*/
@RequestMapping(value = "/admin/academicsmanage/{url_id}")
public String academicsmanage(@PathVariable(value = "url_id") String urlId, Model model) {
if (!ValidateUrlIdUtil.validate(urlId, model)) {
return "error/error";
}
return "admin/academicsmanage/academicsmanage";
}
}
/**
@RequestMapping(value = "/student/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Student> del(HttpRequest request) {
List<String> studentIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("student_id_list");
for (int i = 0; i < array.size(); i++) {
studentIdList.add(array.getString(i));
}
return studentService.del(studentIdList);
}
}
@RestController
public class LoginController {
@Resource(name = "loginService")
private ILoginService loginService;
/**
* 用户登录调用 在登陆成功生成两个token 同时返回各自首页
* * 学生 student/student
* * 老师 teacher/teacher
* * 管理员 admin/admin
*/
@RequestMapping(value = "/login/login", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public Result<Token> login(HttpRequest request) {
return loginService.login(request.getString("login_name"), request.getString("pwd"));
}
/**
* 教师 查询教师所教科目
*/
@RequestMapping(value = "/teacherclassref/qryByTeacherId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public ListResult<Academics> qryByTeacherId() {
if (SessionContext.containsKey("teacher_id")) {
return teacherClassRefService.qryByTeacherId(SessionContext.get("teacher_id"));
}
ExceptionHelper.error(ErrorCode.ERROR_CODE_0021);
return new ListResult<>();
}
/**
* 教师 查询教师所教班级和科目
*/
@RequestMapping(value = "/teacherclassref/qryRefByTeacherId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<TeacherClassRef> qryRefByTeacherId() {
return teacherClassRefService.qryRefByTeacherId();
}
}
/**
* 学生控制器
*/
@RestController
public class StudentController {
@Resource(name = "studentService")
private IStudentService studentService;
/**
* 教师 相关界面
*/
@Controller
public class TeacherHtmlController {
@Resource(name = "testPaperService")
private ITestPaperService testPaperService;
@Resource(name = "studentExamRecordService")
private IStudentExamRecordService studentExamRecordService;
/**
* 教师界面 teacher/teacher.html
*/
@RequestMapping(value = "/teacher/teacher/{url_id}")
public String teacher(@PathVariable(value = "url_id") String urlId, Model model) {
if (!ValidateUrlIdUtil.validate(urlId, model)) {
return "error/error";
}
return "teacher/teacher";
}
/**
* 教师 首页
*/
@RequestMapping(value = "/teacher/index/{url_id}")
public String index(@PathVariable(value = "url_id") String urlId, Model model) {
if (!ValidateUrlIdUtil.validate(urlId, model)) {
return "error/error";
}
return "teacher/index";
}
private IImageService imageService;
/**
* 根据图片标识查询图片
*/
@RequestMapping(value = "/image/image/{image_id}.png", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public void qryImage(@PathVariable(value = "image_id") String imageId, HttpServletResponse response) {
try {
ServletOutputStream out = response.getOutputStream();
response.setContentType("image/png");
if ("default_image".equals(imageId)) {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.default_image)));
} else if ("student_image".equals(imageId)) {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.student_image)));
} else if ("teacher_image".equals(imageId)) {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.teacher_image)));
} else if ("admin_image".equals(imageId)) {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.admin_image)));
} else {
Image image = imageService.qryByImageId(imageId);
if (image != null) {
if (image.getImage() != null) {
out.write(image.getImage());
} else {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.student_image)));
}
} else {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.default_image)));
}
}
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* 班级信息控制器
*/
@RestController
public class ClassInfoController {
@Resource(name = "classInfoService")
private IClassInfoService classInfoService;
/**
* 查询院系的班级列表
*/
@RequestMapping(value = "/classinfo/qryByDepartmentId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public ListResult<ClassInfo> qryByDepartmentId(HttpRequest request) {
return classInfoService.qryByDepartmentId(request.getString("department_id"));
}
/**
* 管理员 查询班级信息列表
*/
@RequestMapping(value = "/classinfo/qryPage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public ListResult<ClassInfo> qryPage(HttpRequest request) {
Map<String, Object> param = new HashMap<>();
int pageNo = request.containsKey("page_no") ? request.getInteger("page_no") : 1;
int pageSize = request.containsKey("page_size") ? request.getInteger("page_size") : 20;
if (request.containsKey("class_id")) {
param.put("class_id", request.getString("class_id"));
}
if (request.containsKey("class_name")) {
param.put("class_name", request.getString("class_name"));
}
return classInfoService.qryPage(param, pageNo, pageSize);
}
Student student = new Student();
student.setStudentId(request.getString("student_id"));
student.setName(request.getString("student_name"));
student.setPwd(request.getString("student_id"));
student.setSex(request.getInteger("sex"));
student.setClassId(request.getString("class_id"));
student.setUpdateTime(new Date());
return studentService.update(student, ImageUtil.stringToBytes(request.getString("student_image")));
}
@RequestMapping(value = "/student/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Student> del(HttpRequest request) {
List<String> studentIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("student_id_list");
for (int i = 0; i < array.size(); i++) {
studentIdList.add(array.getString(i));
}
return studentService.del(studentIdList);
}
}
@RestController
public class LoginController {
@Resource(name = "loginService")
private ILoginService loginService;
/**
* 用户登录调用 在登陆成功生成两个token 同时返回各自首页
* * 学生 student/student
* * 老师 teacher/teacher
* * 管理员 admin/admin
*/
if (image != null) {
if (image.getImage() != null) {
out.write(image.getImage());
} else {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.student_image)));
}
} else {
out.write(Objects.requireNonNull(ImageUtil.stringToBytes(Image.default_image)));
}
}
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* 统一管理学生 教师 管理员信息
*/
@RestController
public class UserController {
@Resource(name = "userService")
private IUserService userService;
/**
* 教师 添加新的考试信息
*/
@RequestMapping(value = "/examinfo/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> insert(HttpRequest request) {
ExamInfo exam = new ExamInfo();
exam.setTestPaperId(request.getInteger("test_paper_id"));
exam.setClassId(request.getString("class_id"));
exam.setState(1);
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
return examInfoService.insert(exam);
}
/**
* 教师 更新考试信息
*/
@RequestMapping(value = "/examinfo/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> update(HttpRequest request) {
ExamInfo exam = new ExamInfo();
exam.setExamId(request.getInteger("exam_id"));
exam.setTestPaperId(request.getInteger("test_paper_id"));
exam.setClassId(request.getString("class_id"));
exam.setState(1);
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
exam.setUpdateTime(new Date());
return examInfoService.update(exam);
}
/**
* 教师 新建状态的考试信息可以删除
*/
@RequestMapping(value = "/examinfo/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> del(HttpRequest request) {
List<Integer> examIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("exam_id_list");
// 学生相关界面
unFilter.add("/student/student/");
unFilter.add("/student/index/");
unFilter.add("/student/onlineexam/");
unFilter.add("/student/scoreinquiry/");
//公共界面
unFilter.add("/common/userinfomanage");// 个人资料修改
unFilter.add("/common/pwdmanage");// 密码修改
// 不升级请求
unUpgradeRequest = new HashSet<>(100);
unUpgradeRequest.add("upload");
//升级请求不验证请求
upgradeRequest = new HashSet<>(100);
upgradeRequest.add("/login/login");
}
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException {
if (req instanceof HttpServletRequest) {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) resp;
String url = request.getRequestURI();
String suffix = getSuffix(url);
//过滤请求
if (suffixs.contains(suffix)) {
chain.doFilter(request, response);
return;
}
//过滤请求
if (unFilter.contains(url)) {
chain.doFilter(request, response);
SessionContext.clean();
return;
}
//升级请求不验证请求
if (upgradeRequest.contains(url)) {
chain.doFilter(new HttpRequest(request), response);
SessionContext.clean();
return;
}
if (url.startsWith("/student/") || url.startsWith("/teacher/") || url.startsWith("/admin/")) {
String uuu = url.substring(0, url.lastIndexOf("/") + 1);
if (unFilter.contains(uuu)
|| url.startsWith("/teacher/testpaperedit")
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
return examInfoService.insert(exam);
}
/**
* 教师 更新考试信息
*/
@RequestMapping(value = "/examinfo/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> update(HttpRequest request) {
ExamInfo exam = new ExamInfo();
exam.setExamId(request.getInteger("exam_id"));
exam.setTestPaperId(request.getInteger("test_paper_id"));
exam.setClassId(request.getString("class_id"));
exam.setState(1);
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
exam.setUpdateTime(new Date());
return examInfoService.update(exam);
}
/**
* 教师 新建状态的考试信息可以删除
*/
@RequestMapping(value = "/examinfo/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> del(HttpRequest request) {
List<Integer> examIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("exam_id_list");
for (int i = 0; i < array.size(); i++) {
examIdList.add(array.getInteger(i));
}
return examInfoService.del(examIdList);
}
/**
* 教师 发布考试信息
*/
@RequestMapping(value = "/examinfo/release", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> updateState(HttpRequest request) {
/**
* 试卷控制器
*/
@RestController
public class TestPaperController {
@Resource(name = "testPaperService")
private ITestPaperService testPaperService;
/**
* 分页查询试卷信息
*/
@RequestMapping(value = "/testpaper/qryPage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public ListResult<TestPaper> qryPage(HttpRequest request) {
int pageNo = request.containsKey("page_no") ? request.getInteger("page_no") : 1;
int pageSize = request.containsKey("page_size") ? request.getInteger("page_size") : 20;
String testPaperName = request.getString("test_paper_name");
String academicsId = request.getString("academics_id");
return testPaperService.qryPage(testPaperName, academicsId, pageNo, pageSize);
}
/**
* 教师 更新新试卷
*/
@RequestMapping(value = "/testpaper/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<TestPaper> insert(HttpRequest request) {
@RoleAnnotation(types = {RoleEnum.teacher})
public ListResult<ExamInfo> exam(HttpRequest request) {
Map<String, Object> param = new HashMap<>();
int pageNo = request.containsKey("page_no") ? request.getInteger("page_no") : 1;
int pageSize = request.containsKey("page_size") ? request.getInteger("page_size") : 20;
return examInfoService.qryPage(param, pageNo, pageSize);
}
/**
* 教师 添加新的考试信息
*/
@RequestMapping(value = "/examinfo/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> insert(HttpRequest request) {
ExamInfo exam = new ExamInfo();
exam.setTestPaperId(request.getInteger("test_paper_id"));
exam.setClassId(request.getString("class_id"));
exam.setState(1);
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
return examInfoService.insert(exam);
}
/**
* 教师 更新考试信息
*/
@RequestMapping(value = "/examinfo/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> update(HttpRequest request) {
ExamInfo exam = new ExamInfo();
exam.setExamId(request.getInteger("exam_id"));
exam.setTestPaperId(request.getInteger("test_paper_id"));
exam.setClassId(request.getString("class_id"));
exam.setState(1);
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
exam.setUpdateTime(new Date());
return examInfoService.update(exam);
}
/**
* 教师 新建状态的考试信息可以删除
*/
@RequestMapping(value = "/department/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Department> insert(HttpRequest request) {
Department department = new Department();
department.setDepartmentId(request.getString("department_id"));
department.setDepartmentName(request.getString("department_name"));
department.setUpdateTime(new Date());
return departmentService.insert(department);
}
/**
* 管理员 更新院系
*/
@RequestMapping(value = "/department/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Department> update(HttpRequest request) {
Department department = new Department();
department.setDepartmentId(request.getString("department_id"));
department.setDepartmentName(request.getString("department_name"));
department.setUpdateTime(new Date());
return departmentService.update(department);
}
/**
* 管理员 删除院系
*/
@RequestMapping(value = "/department/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.admin})
public Result<Department> del(HttpRequest request) {
List<String> departmentIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("department_id_list");
for (int i = 0; i < array.size(); i++) {
departmentIdList.add(array.getString(i));
}
return departmentService.del(departmentIdList);
}
}
}
return "admin/academicsmanage/academicsmanage";
}
}
/**
* 学生 相关界面
*/
@Controller
public class StudentHtmlController {
@Resource(name = "studentService")
private IStudentService studentService;
/**
* 学生界面 student/student.html
*/
@RequestMapping(value = "/student/student/{url_id}")
public String student(@PathVariable(value = "url_id") String urlId, Model model) {
if (!ValidateUrlIdUtil.validate(urlId, model)) {
return "error/error";
}
return "student/student";
}
/**
* 学生界面 首页
*/
@RequestMapping(value = "/student/index/{url_id}")
public String index(@PathVariable(value = "url_id") String urlId, Model model) {
if (!ValidateUrlIdUtil.validate(urlId, model)) {
return "error/error";
}
studentService.index(model);
return "student/index";
}
/**
* 学生界面 在线考试
*/
@RequestMapping(value = "/student/onlineexam/{url_id}")
exam.setTestPaperId(request.getInteger("test_paper_id"));
exam.setClassId(request.getString("class_id"));
exam.setState(1);
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
return examInfoService.insert(exam);
}
/**
* 教师 更新考试信息
*/
@RequestMapping(value = "/examinfo/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> update(HttpRequest request) {
ExamInfo exam = new ExamInfo();
exam.setExamId(request.getInteger("exam_id"));
exam.setTestPaperId(request.getInteger("test_paper_id"));
exam.setClassId(request.getString("class_id"));
exam.setState(1);
exam.setTime(request.getInteger("time"));
exam.setEffTime(DateUtils.toDate(request.getString("eff_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setExpTime(DateUtils.toDate(request.getString("exp_time"), DateConst.DATE_TIME_FORMAT_YYYY_MM_DD_HH_MI));
exam.setUpdateTime(new Date());
exam.setUpdateTime(new Date());
return examInfoService.update(exam);
}
/**
* 教师 新建状态的考试信息可以删除
*/
@RequestMapping(value = "/examinfo/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
@RoleAnnotation(types = {RoleEnum.teacher})
public Result<ExamInfo> del(HttpRequest request) {
List<Integer> examIdList = new ArrayList<>();
JSONArray array = request.getJSONArray("exam_id_list");
for (int i = 0; i < array.size(); i++) {
examIdList.add(array.getInteger(i));
}
return examInfoService.del(examIdList);
}