ssm+vue餐饮掌上设备点餐系统源码和论文

ssm+vue餐饮掌上设备点餐系统源码和论文260

开发工具:idea 或eclipse
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm

餐饮掌上设备点餐系统

摘要

随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了餐饮掌上设备点餐系统的开发全过程。通过分析餐饮掌上设备点餐系统管理的不足,创建了一个计算机管理餐饮掌上设备点餐系统的方案。文章介绍了餐饮掌上设备点餐系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。

本餐饮掌上设备点餐系统有管理员,用户,餐饮店,员工四个角色。管理员可以管理员工,菜系,餐桌,菜品,订单,加盟申请等信息。用户可以查看并且下单,员工可以查看用户的下单信息,餐饮店可以管理相关的菜品和下单信息,并且可以申请加盟等操作。因而具有一定的实用性。

本站后台采用Java的SSM框架进行后台管理开发,前端采用VUE框架,可以在浏览器上登录进行后台数据方面的管理,MySQL作为本地数据库,用到了微信开发者工具,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得餐饮掌上设备点餐系统管理工作系统化、规范化。

关键词:餐饮掌上设备点餐系统;SSM框架;MYSQL数据库;VUE框架

Abstract

With the more and more extensive application of information technology in management, the implementation of management information system has been mature in technology. This paper introduces the whole development process of catering handheld device ordering system. By analyzing the deficiency of the catering handheld device ordering system management, a scheme of computer management catering handheld device ordering system is created. This paper introduces the system analysis part of catering handheld device ordering system, including feasibility analysis, system design part mainly introduces the system function design and database design.

The catering handheld device ordering system has administrator, user, restaurant, staff four roles. Administrators can manage staff, cuisines, tables, dishes, orders, franchise applications and other information. Users can view and place orders, employees can view users' order information, restaurants can manage relevant dishes and order information, and can apply for franchise and other operations. Therefore, it has certain practicability.

This site uses Java SSM framework for background management and development, and uses VUE framework for front end. You can log in the browser for background data management. MySQL, as a local database, uses wechat developer tools to fully ensure the stability of the system. The system has the features of clear interface, simple operation and complete functions, which makes the catering handheld device ordering system management systematic and standardized.

Keywords: Catering handheld device ordering system; SSM framework; MYSQL database; VUE framework

 

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 org.apache.commons.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.CanyindianEntity;
import com.entity.view.CanyindianView;

import com.service.CanyindianService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 餐饮店
 * 后端接口
 * @author 
 * @email 
 * @date 2021-04-19 16:17:04
 */
@RestController
@RequestMapping("/canyindian")
public class CanyindianController {
    @Autowired
    private CanyindianService canyindianService;
    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		CanyindianEntity user = canyindianService.selectOne(new EntityWrapper<CanyindianEntity>().eq("canyindianzhanghao", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(), username,"canyindian",  "餐饮店" );
		return R.ok().put("token", token);
	}
	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody CanyindianEntity canyindian){
    	//ValidatorUtils.validateEntity(canyindian);
    	CanyindianEntity user = canyindianService.selectOne(new EntityWrapper<CanyindianEntity>().eq("canyindianzhanghao", canyindian.getCanyindianzhanghao()));
		if(user!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		canyindian.setId(uId);
        canyindianService.insert(canyindian);
        return R.ok();
    }
	
	/**
	 * 退出
	 */
	@RequestMapping("/logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        CanyindianEntity user = canyindianService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	CanyindianEntity user = canyindianService.selectOne(new EntityWrapper<CanyindianEntity>().eq("canyindianzhanghao", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
    	user.setMima("123456");
        canyindianService.updateById(user);
        return R.ok("密码已重置为:123456");
    }


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,CanyindianEntity canyindian, 
		HttpServletRequest request){

        EntityWrapper<CanyindianEntity> ew = new EntityWrapper<CanyindianEntity>();
		PageUtils page = canyindianService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, canyindian), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,CanyindianEntity canyindian, HttpServletRequest request){
        EntityWrapper<CanyindianEntity> ew = new EntityWrapper<CanyindianEntity>();
		PageUtils page = canyindianService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, canyindian), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( CanyindianEntity canyindian){
       	EntityWrapper<CanyindianEntity> ew = new EntityWrapper<CanyindianEntity>();
      	ew.allEq(MPUtil.allEQMapPre( canyindian, "canyindian")); 
        return R.ok().put("data", canyindianService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(CanyindianEntity canyindian){
        EntityWrapper< CanyindianEntity> ew = new EntityWrapper< CanyindianEntity>();
 		ew.allEq(MPUtil.allEQMapPre( canyindian, "canyindian")); 
		CanyindianView canyindianView =  canyindianService.selectView(ew);
		return R.ok("查询餐饮店成功").put("data", canyindianView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        CanyindianEntity canyindian = canyindianService.selectById(id);
        return R.ok().put("data", canyindian);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        CanyindianEntity canyindian = canyindianService.selectById(id);
        return R.ok().put("data", canyindian);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody CanyindianEntity canyindian, HttpServletRequest request){
    	canyindian.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(canyindian);
    	CanyindianEntity user = canyindianService.selectOne(new EntityWrapper<CanyindianEntity>().eq("canyindianzhanghao", canyindian.getCanyindianzhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		canyindian.setId(new Date().getTime());
        canyindianService.insert(canyindian);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody CanyindianEntity canyindian, HttpServletRequest request){
    	canyindian.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(canyindian);
    	CanyindianEntity user = canyindianService.selectOne(new EntityWrapper<CanyindianEntity>().eq("canyindianzhanghao", canyindian.getCanyindianzhanghao()));
		if(user!=null) {
			return R.error("用户已存在");
		}

		canyindian.setId(new Date().getTime());
        canyindianService.insert(canyindian);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody CanyindianEntity canyindian, HttpServletRequest request){
        //ValidatorUtils.validateEntity(canyindian);
        canyindianService.updateById(canyindian);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        canyindianService.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<CanyindianEntity> wrapper = new EntityWrapper<CanyindianEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = canyindianService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}
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 org.apache.commons.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.JiamengshenqingEntity;
import com.entity.view.JiamengshenqingView;

import com.service.JiamengshenqingService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 加盟申请
 * 后端接口
 * @author 
 * @email 
 * @date 2021-04-19 16:17:04
 */
@RestController
@RequestMapping("/jiamengshenqing")
public class JiamengshenqingController {
    @Autowired
    private JiamengshenqingService jiamengshenqingService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,JiamengshenqingEntity jiamengshenqing, 
		HttpServletRequest request){

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("canyindian")) {
			jiamengshenqing.setCanyindianzhanghao((String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("yonghu")) {
			jiamengshenqing.setZhanghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<JiamengshenqingEntity> ew = new EntityWrapper<JiamengshenqingEntity>();
		PageUtils page = jiamengshenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiamengshenqing), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,JiamengshenqingEntity jiamengshenqing, HttpServletRequest request){
        EntityWrapper<JiamengshenqingEntity> ew = new EntityWrapper<JiamengshenqingEntity>();
		PageUtils page = jiamengshenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiamengshenqing), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( JiamengshenqingEntity jiamengshenqing){
       	EntityWrapper<JiamengshenqingEntity> ew = new EntityWrapper<JiamengshenqingEntity>();
      	ew.allEq(MPUtil.allEQMapPre( jiamengshenqing, "jiamengshenqing")); 
        return R.ok().put("data", jiamengshenqingService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(JiamengshenqingEntity jiamengshenqing){
        EntityWrapper< JiamengshenqingEntity> ew = new EntityWrapper< JiamengshenqingEntity>();
 		ew.allEq(MPUtil.allEQMapPre( jiamengshenqing, "jiamengshenqing")); 
		JiamengshenqingView jiamengshenqingView =  jiamengshenqingService.selectView(ew);
		return R.ok("查询加盟申请成功").put("data", jiamengshenqingView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        JiamengshenqingEntity jiamengshenqing = jiamengshenqingService.selectById(id);
        return R.ok().put("data", jiamengshenqing);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        JiamengshenqingEntity jiamengshenqing = jiamengshenqingService.selectById(id);
        return R.ok().put("data", jiamengshenqing);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody JiamengshenqingEntity jiamengshenqing, HttpServletRequest request){
    	jiamengshenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiamengshenqing);

        jiamengshenqingService.insert(jiamengshenqing);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody JiamengshenqingEntity jiamengshenqing, HttpServletRequest request){
    	jiamengshenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiamengshenqing);

        jiamengshenqingService.insert(jiamengshenqing);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody JiamengshenqingEntity jiamengshenqing, HttpServletRequest request){
        //ValidatorUtils.validateEntity(jiamengshenqing);
        jiamengshenqingService.updateById(jiamengshenqing);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        jiamengshenqingService.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<JiamengshenqingEntity> wrapper = new EntityWrapper<JiamengshenqingEntity>();
		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("canyindian")) {
			wrapper.eq("canyindianzhanghao", (String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("yonghu")) {
			wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
		}

		int count = jiamengshenqingService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

程序猿毕业分享网

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

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

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

打赏作者

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

抵扣说明:

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

余额充值