基于SpringBoot+Vue笔记记录分享网站设计与实现

项目介绍: 

信息数据从传统到当代,是一直在变革当中,突如其来的互联网让传统的信息管理看到了革命性的曙光,因为传统信息管理从时效性,还是安全性,还是可操作性等各个方面来讲,遇到了互联网时代才发现能补上自古以来的短板,有效的提升管理的效率和业务水平。传统的管理模式,时间越久管理的内容越多,也需要更多的人来对数据进行整理,并且数据的汇总查询方面效率也是极其的低下,并且数据安全方面永远不会保证安全性能。结合数据内容管理的种种缺点,在互联网时代都可以得到有效的补充。结合先进的互联网技术,开发符合需求的软件,让数据内容管理不管是从录入的及时性,查看的及时性还是汇总分析的及时性,都能让正确率达到最高,管理更加的科学和便捷。本次开发的笔记记录分享网站实现了收货地址管理、笔记广场管理、笔记收藏管理、笔记留言管理、购物车管理、字典表管理、公告信息管理、我的关注管理、日常任务管理、领取任务管理、商品管理、商品收藏管理、商品评价管理、商品兑换管理、用户管理、管理员管理等功能。系统用到了关系型数据库中王者MySql作为系统的数据库,有效的对数据进行安全的存储,有效的备份,对数据可靠性方面得到了保证。并且程序也具备程序需求的所有功能,使得操作性还是安全性都大大提高,让笔记记录分享网站更能从理念走到现实,确确实实的让人们提升信息处理效率。

功能介绍: 

部分截图说明: 

首页

用户

笔记广场

商品

个人中心

笔记广场管理

公告信息管理

公告类型列表

商品管理页面

部分代码: 

/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public ResponseEntity<byte[]> download(@RequestParam String fileName) {
		try {
			File path = new File(ResourceUtils.getURL("classpath:static").getPath());
			if(!path.exists()) {
			    path = new File("");
			}
			File upload = new File(path.getAbsolutePath(),"/upload/");
			if(!upload.exists()) {
			    upload.mkdirs();
			}
			File file = new File(upload.getAbsolutePath()+"/"+fileName);
			if(file.exists()){
				/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
					getResponse().sendError(403);
				}*/
				HttpHeaders headers = new HttpHeaders();
			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
			    headers.setContentDispositionFormData("attachment", fileName);    
			    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
	}
	
}

 

 此源码非开源,若需要此源码可扫码添加微信或者qq:2214904953进行咨询!

2600多套项目欢迎咨询

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-30 04:58:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-30 04:58:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-30 04:58:03       82 阅读
  4. Python语言-面向对象

    2024-04-30 04:58:03       91 阅读

热门阅读

  1. 【QEMU系统分析之实例篇(三)】

    2024-04-30 04:58:03       27 阅读
  2. Centos7中更改IP为静态地址

    2024-04-30 04:58:03       35 阅读
  3. RK3588 Linux5.10 GT9XX 调试

    2024-04-30 04:58:03       37 阅读
  4. Chrome插件开发

    2024-04-30 04:58:03       31 阅读
  5. 强化学习Upper Confidence Bound策略笔记

    2024-04-30 04:58:03       31 阅读
  6. H5 录音功能

    2024-04-30 04:58:03       32 阅读
  7. db2 export

    2024-04-30 04:58:03       29 阅读
  8. 90天玩转Python—20—Python面向对象编程入门指南

    2024-04-30 04:58:03       32 阅读
  9. 如何拥有自己的私有docker仓库

    2024-04-30 04:58:03       34 阅读