基于微信小程序的食堂窗口自助点餐系统

文末获取源码

开发语言:Java

框架:ssm

JDK版本:JDK1.8

服务器:tomcat7

数据库:mysql 5.7/8.0

数据库工具:Navicat11

开发软件:eclipse/myeclipse/idea

Maven包:Maven3.3.9

浏览器:谷歌浏览器

小程序框架:uniapp

小程序开发软件:HBuilder X

小程序运行软件:微信开发者

一、前言介绍

随着信息化时代的到来,管理系统都趋向于智能化、系统化,自助点餐小程序也不例外,但目前国内的市场仍都使用人工管理,市场规模越来越大,同时信息量也越来越庞大,人工管理显然已无法应对时代的变化,而电影交流平台小程序能很好地解决这一问题,轻松应对电影交流平时的工作,既能提高人力物力财力,又能加快工作的效率,取代人工管理是必然趋势。

本自助点餐小程序以ssm作为框架,b/s模式以及MySql作为后台运行的数据库,同时使用Tomcat用为系统的服务器。本系统主要包括首页、个人中心、用户管理、商家管理、店铺信息管理、菜品分类管理、菜品信息管理、系统管理、订单管理​​​​​等功能,通过这些功能的实现能够基本满足日常自助点餐管理的操作。

二、小程序端

2.1登录

2.2小程序首页

2.3店铺信息

2.4菜品信息

2.5菜品页面

2.6我的页面

三、后台管理员功能模块

3.1用户管理

3.2系统管理

四、商家功能模块

4.1店铺信息管理

4.2菜品信息管理 

4.3订单管理 

五、部分核心代码

5.1登录系统主要代码

/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuzhanghao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		
		String token = tokenService.generateToken(user.getId(), username,"yonghu",  "用户" );
		return R.ok().put("token", token);
	}

5.2上传文件关键代码

@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);
		/**
  		 * 如果使用idea或者eclipse重启项目,发现之前上传的图片或者文件丢失,将下面一行代码注释打开
   		 * 请将以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替换成你本地项目的upload路径,
 		 * 并且项目路径不能存在中文、空格等特殊字符
 		 */
//		FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
		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);
	}

猜你喜欢

转载自blog.csdn.net/qq_61827376/article/details/128570066