基于ssm+vue的线上点餐系统源码和论文
通过分析线上点餐系统管理的不足,创建了一个计算机管理线上点餐系统的方案。文章介绍了线上点餐系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。本站后台采用Java的SSM框架进行后台管理开发,前端采用VUE框架,可以在浏览器上登录进行后台数据方面的管理,MySQL作为本地数据库,用到了微信开发者工具,充分保证系统的稳定性。管理员功能有,个人中心,用户管理,菜品信息
基于ssm+vue的线上点餐系统源码和论文203
开发工具:idea 或eclipse
数据库mysql5.7+
数据库链接工具:navcat,小海豚等
技术:ssm
基于vue的线上点餐系统
摘要
随着信息技术在管理上越来越深入而广泛的应用,管理信息系统的实施在技术上已逐步成熟。本文介绍了线上点餐系统的开发全过程。通过分析线上点餐系统管理的不足,创建了一个计算机管理线上点餐系统的方案。文章介绍了线上点餐系统的系统分析部分,包括可行性分析等,系统设计部分主要介绍了系统功能设计和数据库设计。
本线上点餐系统管理员和用户两个角色。管理员功能有,个人中心,用户管理,菜品信息管理,菜品类别管理,订单管理,系统管理等。用户功能有,个人中心,菜品信息管理,订单管理,我的收藏管理等。因而具有一定的实用性。
本站后台采用Java的SSM框架进行后台管理开发,前端采用VUE框架,可以在浏览器上登录进行后台数据方面的管理,MySQL作为本地数据库,用到了微信开发者工具,充分保证系统的稳定性。系统具有界面清晰、操作简单,功能齐全的特点,使得线上点餐系统管理工作系统化、规范化。
关键词:线上点餐系统;SSM框架;MYSQL数据库;VUE框架
Abstract
With the deepening and extensive application of information technology in management, the implementation of management information systems has gradually matured in technology. This article introduces the entire development process of the online ordering system. By analyzing the deficiencies of the online ordering system management, a computer-managed online ordering system program was created. The article introduces the system analysis part of the online ordering system, including feasibility analysis, etc. The system design part mainly introduces the system function design and database design.
This online ordering system has two roles: administrator and user. Administrator functions include personal center, user management, dish information management, dish category management, order management, system management, etc. User functions include personal center, dish information management, order management, my collection management, etc. So it has a certain practicability.
The back-end of this site uses the Java SSM framework for back-end management and development, and the front-end uses the VUE framework. You can log in on the browser to manage the back-end data. MySQL is used as a local database and the WeChat developer tools are used to fully ensure the stability of the system. The system has the characteristics of clear interface, simple operation and complete functions, which makes the management of the online ordering system systematic and standardized.
Keywords: Online 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.CaipinxinxiEntity;
import com.entity.view.CaipinxinxiView;
import com.service.CaipinxinxiService;
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-18 01:00:26
*/
@RestController
@RequestMapping("/caipinxinxi")
public class CaipinxinxiController {
@Autowired
private CaipinxinxiService caipinxinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,CaipinxinxiEntity caipinxinxi,
HttpServletRequest request){
EntityWrapper<CaipinxinxiEntity> ew = new EntityWrapper<CaipinxinxiEntity>();
PageUtils page = caipinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, caipinxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,CaipinxinxiEntity caipinxinxi, HttpServletRequest request){
EntityWrapper<CaipinxinxiEntity> ew = new EntityWrapper<CaipinxinxiEntity>();
PageUtils page = caipinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, caipinxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( CaipinxinxiEntity caipinxinxi){
EntityWrapper<CaipinxinxiEntity> ew = new EntityWrapper<CaipinxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( caipinxinxi, "caipinxinxi"));
return R.ok().put("data", caipinxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(CaipinxinxiEntity caipinxinxi){
EntityWrapper< CaipinxinxiEntity> ew = new EntityWrapper< CaipinxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( caipinxinxi, "caipinxinxi"));
CaipinxinxiView caipinxinxiView = caipinxinxiService.selectView(ew);
return R.ok("查询菜品信息成功").put("data", caipinxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
CaipinxinxiEntity caipinxinxi = caipinxinxiService.selectById(id);
caipinxinxi.setClicknum(caipinxinxi.getClicknum()+1);
caipinxinxi.setClicktime(new Date());
caipinxinxiService.updateById(caipinxinxi);
return R.ok().put("data", caipinxinxi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
CaipinxinxiEntity caipinxinxi = caipinxinxiService.selectById(id);
caipinxinxi.setClicknum(caipinxinxi.getClicknum()+1);
caipinxinxi.setClicktime(new Date());
caipinxinxiService.updateById(caipinxinxi);
return R.ok().put("data", caipinxinxi);
}
/**
* 赞或踩
*/
@RequestMapping("/thumbsup/{id}")
public R thumbsup(@PathVariable("id") String id,String type){
CaipinxinxiEntity caipinxinxi = caipinxinxiService.selectById(id);
if(type.equals("1")) {
caipinxinxi.setThumbsupnum(caipinxinxi.getThumbsupnum()+1);
} else {
caipinxinxi.setCrazilynum(caipinxinxi.getCrazilynum()+1);
}
caipinxinxiService.updateById(caipinxinxi);
return R.ok();
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody CaipinxinxiEntity caipinxinxi, HttpServletRequest request){
caipinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(caipinxinxi);
caipinxinxiService.insert(caipinxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody CaipinxinxiEntity caipinxinxi, HttpServletRequest request){
caipinxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(caipinxinxi);
caipinxinxiService.insert(caipinxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody CaipinxinxiEntity caipinxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(caipinxinxi);
caipinxinxiService.updateById(caipinxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
caipinxinxiService.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<CaipinxinxiEntity> wrapper = new EntityWrapper<CaipinxinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = caipinxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,CaipinxinxiEntity caipinxinxi, HttpServletRequest request,String pre){
EntityWrapper<CaipinxinxiEntity> ew = new EntityWrapper<CaipinxinxiEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicknum");
params.put("order", "desc");
PageUtils page = caipinxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, caipinxinxi), params), params));
return R.ok().put("data", page);
}
}
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.DingdanEntity;
import com.entity.view.DingdanView;
import com.service.DingdanService;
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-18 01:00:26
*/
@RestController
@RequestMapping("/dingdan")
public class DingdanController {
@Autowired
private DingdanService dingdanService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,DingdanEntity dingdan,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
dingdan.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<DingdanEntity> ew = new EntityWrapper<DingdanEntity>();
PageUtils page = dingdanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dingdan), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,DingdanEntity dingdan, HttpServletRequest request){
EntityWrapper<DingdanEntity> ew = new EntityWrapper<DingdanEntity>();
PageUtils page = dingdanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dingdan), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( DingdanEntity dingdan){
EntityWrapper<DingdanEntity> ew = new EntityWrapper<DingdanEntity>();
ew.allEq(MPUtil.allEQMapPre( dingdan, "dingdan"));
return R.ok().put("data", dingdanService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(DingdanEntity dingdan){
EntityWrapper< DingdanEntity> ew = new EntityWrapper< DingdanEntity>();
ew.allEq(MPUtil.allEQMapPre( dingdan, "dingdan"));
DingdanView dingdanView = dingdanService.selectView(ew);
return R.ok("查询订单成功").put("data", dingdanView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DingdanEntity dingdan = dingdanService.selectById(id);
return R.ok().put("data", dingdan);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DingdanEntity dingdan = dingdanService.selectById(id);
return R.ok().put("data", dingdan);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DingdanEntity dingdan, HttpServletRequest request){
dingdan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(dingdan);
dingdanService.insert(dingdan);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody DingdanEntity dingdan, HttpServletRequest request){
dingdan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(dingdan);
dingdanService.insert(dingdan);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody DingdanEntity dingdan, HttpServletRequest request){
//ValidatorUtils.validateEntity(dingdan);
dingdanService.updateById(dingdan);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
dingdanService.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<DingdanEntity> wrapper = new EntityWrapper<DingdanEntity>();
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("zhanghao", (String)request.getSession().getAttribute("username"));
}
int count = dingdanService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
更多推荐
所有评论(0)