基于SpringBoot+Vue超市管理系统的设计与实现

本文介绍了使用Java和SpringBoot开发的网上超市管理系统,涵盖了前端技术Vue、数据库MySQL及管理工具的使用,详细描述了系统功能如商品信息管理、订单处理和文件上传下载功能的代码示例。
摘要由CSDN通过智能技术生成

文末获取联系

开发语言: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

项目介绍: 

随着经济飞速发展,网络的普及应用,人们生活水平的提高以及对生活品质的要求,人们对网络的要求已不单单是浏览网页,收发邮件,日益忙碌的人们开始追求足不出户地利用互联网这一强大的平台来实现网上购物,这种利用信息网络等电子化手段进行的商务活动的交易方式也迅速被广大商家所采纳,鲜花销售行业发展的前景也越来越好。

本系统实现了一般网上超市管理系统所具备的功能,如商品浏览、用户登录注册、网上与购物、结算、后台数据库管理等,利用这些功能可以对超市管理系统信息进行较好的管理。

功能介绍: 

1、系统数据:商品信息、顾客信息、员工信息、供应商信息、订单信息、业务信息、统计数据

2、业务过程:商品管理、人事管理(顾客信息管理、员工信息管理、供应商信息管理)、订单信息管理、进货管理、销售管理、库存管理

超市管理系统基本功能:

  1. 商品各种信息的输入、查询、修改和删除等,包括商品基本信息,详细信息和简历等。
  2. 顾客信息的输入、查询、修改和删除。
  3. 员工信息的输入、查询、修改和删除。

4、商品库的输入,查询和关系性修改等。

5、商品供应商的输入,查询、修改和删除等。

6、订单信息的管理、输入和执行等。

6、系统管理的管理员的登入。

7、计算收入,打印报表等。

部分截图说明: 

 

 

部分代码: 

/**
 * 上传文件映射表
 */
@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);
	}
	
}

  • 12
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一季春秋

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值