SpringBoot+Vue实现在线考试系统

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值