源码获取:关注文末gongzhonghao,输入011领取下载链接
开发工具IDEA ,数据库mysql5.7 ,前后端分离
系统分学生、教师、管理员三个角色
1.学生截图
2.教师截图:
3.管理员截图:
- package com.cx.controller;
-
-
- import cn.dev33.satoken.annotation.SaCheckLogin;
- import com.cx.common.Result;
- import com.cx.common.ResultCode;
- import com.cx.fluentmybatis.entity.KtbgEntity;
- import com.cx.service.KtbgService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
-
- @Slf4j
- @Api(tags = "KtbgController", description = "开题报告接口")
- @RequestMapping("/ktbg")
- @RestController
- public class KtbgController {
- @Autowired
- KtbgService ktbgService;
-
-
-
- @SaCheckLogin
- @ApiOperation(value = "添加开题报告")
- @PostMapping("/addktbg")
- public Result addKtbg(@RequestBody KtbgEntity ktbg){
- if (ktbgService.addKtbg(ktbg)>0){
- return Result.success();
- }else {
- return Result.failure(ResultCode.INSERT_ERROR);
- }
- }
-
- @SaCheckLogin
- @ApiOperation("根据id删除ktbg")
- @GetMapping("/remove")
- public Result removeKtbg(@RequestParam Integer id){
- if (ktbgService.removeKtbg(id)>0){
- return Result.success();
- }else {
- return Result.failure(ResultCode.DELETE_ERROR);
- }
- }
-
- @SaCheckLogin
- @ApiOperation("更新开题报告")
- @PostMapping("/update")
- public Result updateKtbg(@RequestBody KtbgEntity ktbg){
- if (ktbgService.updateKtbg(ktbg)>0) return Result.success();
- else return Result.failure(ResultCode.UPDATE_ERROR);
- }
-
- @SaCheckLogin
- @ApiOperation("通过id获取开题报告")
- @GetMapping("/getById")
- public Result
getKtbgById(@RequestParam Integer id){ - return Result.success(ktbgService.getKtbg(id));
- }
-
-
- @SaCheckLogin
- @ApiOperation("通过studentId获取开题报告")
- @GetMapping("/getByStudentId")
- public Result
getKtbgByStudentId(@RequestParam String studentId){ - return Result.success(ktbgService.getKtbgByStudentId(studentId));
- }
- }
package com.cx.controller; import com.cx.common.Result; import com.cx.common.ResultCode; import com.cx.fluentmybatis.entity.LunwenEntity; import com.cx.service.LunwenService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @Slf4j @Api(tags = "LunwenController", description = "论文接口") @RequestMapping("/lunwen") @RestController public class LunwenController { @Autowired LunwenService lunwenService; @ApiOperation("新增论文") @PostMapping("/add") public Result addLunwen(@RequestBody LunwenEntity lunwen) { if (lunwenService.addLunwen(lunwen) > 0) return Result.success(); else return Result.failure(ResultCode.INSERT_ERROR); } @ApiOperation("删除论文") @GetMapping("/remove") public Result removeLunwen(@RequestParam Integer id) { if (lunwenService.removeLunwen(id) > 0) return Result.success(); else return Result.failure(ResultCode.DELETE_ERROR); } @ApiOperation("更新论文") @PostMapping("/update") public Result updateLunwen(@RequestBody LunwenEntity lunwen){ if (lunwenService.updateLunwen(lunwen)>0) return Result.success(); else return Result.failure(ResultCode.UPDATE_ERROR); } @ApiOperation("通过id获取论文") @GetMapping("/getById") public ResultgetLunwenById(@RequestParam Integer id) { return Result.success(lunwenService.getLunwen(id)); } @ApiOperation("通过studentid获取论文") @GetMapping("/getByStudentId") public Result getLunwenById(@RequestParam String studentId) { return Result.success(lunwenService.getLunwenByStudentId(studentId)); } }