文末获取源码
开发语言:Java
开发工具:IDEA /Eclipse
数据库:MYSQL5.7
应用服务:Tomcat7/Tomcat8
使用框架:springboot+vue
JDK版本:jdk1.8
21世纪的今天,随着社会的不断发展与进步,人们对于信息科学化的认识,已由低层次向高层次发展,由原来的感性认识向理性认识提高,管理工作的重要性已逐渐被人们所认识,科学化的管理,使信息存储达到准确、快速、完善,并能提高工作管理效率,促进其发展。
论文主要是对餐厅点餐系统进行了介绍,包括研究的现状,还有涉及的开发背景,然后还对系统的设计目标进行了论述,还有系统的需求,以及整个的设计方案,对系统的设计以及实现,也都论述的比较细致,最后对餐厅点餐系统进行了一些具体测试。
本文以Java为开发技术,实现了一个餐厅点餐系统。餐厅点餐系统的主要使用者分为管理员;个人中心、用户管理、菜品分类管理、菜品信息管理、餐桌管理、菜品订单管理、菜品评价管理、系统管理,用户;个人中心、菜品订单管理、菜品评价管理、我的收藏管理,前台页面;首页、菜品信息、菜品资讯、个人中心、跳转到后台等功能。通过这些功能模块的设计,基本上实现了整个餐厅点餐系统的过程。
具体在系统设计上,采用了SpringBoot框架作为后端,vue作为前端的设计,同时,也使用Java技术在动态页面上进行了设计,后台上采用Mysql数据库,是一个非常优秀的餐厅点餐系统。
系统实现
前台首页功能模块
菜品信息
菜品资讯
个人中心
管理员功能模块
首页
用户管理
菜品分类管理
菜品信息管理
餐桌管理
菜品订单管理
菜品评价管理
系统管理
用户功能模块
个人中心
菜品订单管理
菜品评价管理
我的收藏管理
package com.controller;import java.text.SimpleDateFormat;import java.util.ArrayList;import java.util.Arrays;import java.util.Calendar;import java.util.Map;import java.util.HashMap;import java.util.Iterator;import java.util.Date;import java.util.List;import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;import mons.lang3.StringUtils;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.format.annotation.DateTimeFormat;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestParam;import org.springframework.web.bind.annotation.RestController;import com.baomidou.mybatisplus.mapper.EntityWrapper;import com.baomidou.mybatisplus.mapper.Wrapper;import com.annotation.IgnoreAuth;import com.entity.CaipindingdanEntity;import com.entity.view.CaipindingdanView;import com.service.CaipindingdanService;import com.service.TokenService;import com.utils.PageUtils;import com.utils.R;import com.utils.MD5Util;import com.utils.MPUtil;import monUtil;/*** 菜品订单* 后端接口* @author * @email * @date -03-20 21:35:40*/@RestController@RequestMapping("/caipindingdan")public class CaipindingdanController {@Autowiredprivate CaipindingdanService caipindingdanService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,CaipindingdanEntity caipindingdan,HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("yonghu")) {caipindingdan.setYonghuming((String)request.getSession().getAttribute("username"));}EntityWrapper<CaipindingdanEntity> ew = new EntityWrapper<CaipindingdanEntity>();PageUtils page = caipindingdanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, caipindingdan), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,CaipindingdanEntity caipindingdan, HttpServletRequest request){EntityWrapper<CaipindingdanEntity> ew = new EntityWrapper<CaipindingdanEntity>();PageUtils page = caipindingdanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, caipindingdan), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( CaipindingdanEntity caipindingdan){EntityWrapper<CaipindingdanEntity> ew = new EntityWrapper<CaipindingdanEntity>();ew.allEq(MPUtil.allEQMapPre( caipindingdan, "caipindingdan")); return R.ok().put("data", caipindingdanService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(CaipindingdanEntity caipindingdan){EntityWrapper< CaipindingdanEntity> ew = new EntityWrapper< CaipindingdanEntity>();ew.allEq(MPUtil.allEQMapPre( caipindingdan, "caipindingdan")); CaipindingdanView caipindingdanView = caipindingdanService.selectView(ew);return R.ok("查询菜品订单成功").put("data", caipindingdanView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){CaipindingdanEntity caipindingdan = caipindingdanService.selectById(id);return R.ok().put("data", caipindingdan);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){CaipindingdanEntity caipindingdan = caipindingdanService.selectById(id);return R.ok().put("data", caipindingdan);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody CaipindingdanEntity caipindingdan, HttpServletRequest request){caipindingdan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(caipindingdan);caipindingdanService.insert(caipindingdan);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody CaipindingdanEntity caipindingdan, HttpServletRequest request){caipindingdan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(caipindingdan);caipindingdanService.insert(caipindingdan);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody CaipindingdanEntity caipindingdan, HttpServletRequest request){//ValidatorUtils.validateEntity(caipindingdan);caipindingdanService.updateById(caipindingdan);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){caipindingdanService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<CaipindingdanEntity> wrapper = new EntityWrapper<CaipindingdanEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("yonghu")) {wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));}int count = caipindingdanService.selectCount(wrapper);return R.ok().put("count", count);}}
如果觉得《SpringBoot+vue实现前后端分离的餐厅点餐系统》对你有帮助,请点赞、收藏,并留下你的观点哦!