1.SpringBoot+Vue实现在线考试系统
个人网站:http://xiaocaoshare.com
1.需求分析
用户角色:
管理员:考试管理、题库管理、成绩查询、学生管理、教师管理
教师:考试管理、题库管理、成绩查询、学生管理
学生:登录、我的试卷、我的练习、我的分数、给我留言、开始答题
2.技术架构
springboot+mybatis+mysql+vue
开发工具:
IDEA或eclipse
3.部分功能代码展示
@RestController
public class StudentController {

@Autowired
private StudentServiceImpl studentService;

@GetMapping("/students/{page}/{size}")
public ApiResult findAll(@PathVariable Integer page, @PathVariable Integer size) {
    Page<Student> studentPage = new Page<>(page,size);
    IPage<Student> res = studentService.findAll(studentPage);
    return  ApiResultHandler.buildApiResult(200,"分页查询所有学生",res);
}

@GetMapping("/student/{studentId}")
public ApiResult findById(@PathVariable("studentId") Integer studentId) {
    Student res = studentService.findById(studentId);
    if (res != null) {
    return ApiResultHandler.buildApiResult(200,"请求成功",res);
    } else {
        return ApiResultHandler.buildApiResult(404,"查询的用户不存在",null);
    }
}

@DeleteMapping("/student/{studentId}")
public ApiResult deleteById(@PathVariable("studentId") Integer studentId) {
    return ApiResultHandler.buildApiResult(200,"删除成功",studentService.deleteById(studentId));
}

@PutMapping("/studentPWD")
public ApiResult updatePwd(@RequestBody Student student) {
    studentService.updatePwd(student);
    return ApiResultHandler.buildApiResult(200,"密码更新成功",null);
}
@PutMapping("/student")
public ApiResult update(@RequestBody Student student) {
    int res = studentService.update(student);
    if (res != 0) {
        return ApiResultHandler.buildApiResult(200,"更新成功",res);
    }
    return ApiResultHandler.buildApiResult(400,"更新失败",res);
}

@PostMapping("/student")
public ApiResult add(@RequestBody Student student) {
    int res = studentService.add(student);
    if (res == 1) {
        return ApiResultHandler.buildApiResult(200,"添加成功",null);
    }else {
        return ApiResultHandler.buildApiResult(400,"添加失败",null);
    }
}

}

4.系统演示视频
链接:https://pan.baidu.com/s/1D2n00LeANrsNZaM9Rwc2Eg
提取码:m3td

Logo

前往低代码交流专区

更多推荐