当前位置:   article > 正文

基于SpringBoot+Vue高校竞赛管理系统的设计与实现_基于springboot+vue的高校专业学科竞赛管理系统设计与实现系统性能分析

基于springboot+vue的高校专业学科竞赛管理系统设计与实现系统性能分析

文末获取联系

开发语言:Java

使用框架:spring boot

前端技术:Vue 、css、element-ui、js

开发工具:IDEA/MyEclipse/Eclipse、Visual Studio Code

数据库:MySQL 5.7/8.0

数据库管理工具:phpstudy/Navicat

JDK版本:jdk1.8

Maven:apache-maven 3.8.1-bin

项目介绍: 

高校竞赛管理系统管理系统按照操作主体分为管理员和用户。管理员的功能包括字典管理、论坛管理、竞赛公告管理、获奖管理、老师管理、评审管理、评审分配管理、评审打分管理、赛事管理、赛事提交管理、赛事报名管理、用户管理、专家管理、管理员管理。用户的功能等。该系统采用了Mysql数据库,Java语言,Spring Boot框架等技术进行编程实现。

高校竞赛管理系统管理系统可以提高高校竞赛管理系统信息管理问题的解决效率,优化高校竞赛管理系统信息处理流程,保证高校竞赛管理系统信息数据的安全,它是一个非常可靠,非常安全的应用程序。

功能介绍: 

部分截图说明: 

首页

获奖

赛事

个人中心

登录界面

评审管理

赛事管理

评审打分管理

部分代码: 

  1. /**
  2. * 上传文件映射表
  3. */
  4. @RestController
  5. @RequestMapping("file")
  6. @SuppressWarnings({"unchecked","rawtypes"})
  7. public class FileController{
  8. @Autowired
  9. private ConfigService configService;
  10. /**
  11. * 上传文件
  12. */
  13. @RequestMapping("/upload")
  14. public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
  15. if (file.isEmpty()) {
  16. throw new EIException("上传文件不能为空");
  17. }
  18. String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
  19. File path = new File(ResourceUtils.getURL("classpath:static").getPath());
  20. if(!path.exists()) {
  21. path = new File("");
  22. }
  23. File upload = new File(path.getAbsolutePath(),"/upload/");
  24. if(!upload.exists()) {
  25. upload.mkdirs();
  26. }
  27. String fileName = new Date().getTime()+"."+fileExt;
  28. File dest = new File(upload.getAbsolutePath()+"/"+fileName);
  29. file.transferTo(dest);
  30. if(StringUtils.isNotBlank(type) && type.equals("1")) {
  31. ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
  32. if(configEntity==null) {
  33. configEntity = new ConfigEntity();
  34. configEntity.setName("faceFile");
  35. configEntity.setValue(fileName);
  36. } else {
  37. configEntity.setValue(fileName);
  38. }
  39. configService.insertOrUpdate(configEntity);
  40. }
  41. return R.ok().put("file", fileName);
  42. }
  43. /**
  44. * 下载文件
  45. */
  46. @IgnoreAuth
  47. @RequestMapping("/download")
  48. public ResponseEntity<byte[]> download(@RequestParam String fileName) {
  49. try {
  50. File path = new File(ResourceUtils.getURL("classpath:static").getPath());
  51. if(!path.exists()) {
  52. path = new File("");
  53. }
  54. File upload = new File(path.getAbsolutePath(),"/upload/");
  55. if(!upload.exists()) {
  56. upload.mkdirs();
  57. }
  58. File file = new File(upload.getAbsolutePath()+"/"+fileName);
  59. if(file.exists()){
  60. /*if(!fileService.canRead(file, SessionManager.getSessionUser())){
  61. getResponse().sendError(403);
  62. }*/
  63. HttpHeaders headers = new HttpHeaders();
  64. headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
  65. headers.setContentDispositionFormData("attachment", fileName);
  66. return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
  67. }
  68. } catch (IOException e) {
  69. e.printStackTrace();
  70. }
  71. return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
  72. }
  73. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/411033
推荐阅读
相关标签
  

闽ICP备14008679号