基于微信小程序的点餐与预约餐桌的管理系统+后台管理

编程入门 行业动态 更新时间:2024-10-20 16:44:42

基于微信小程序的点餐与预约餐桌的<a href=https://www.elefans.com/category/jswz/34/1769858.html style=管理系统+后台管理"/>

基于微信小程序的点餐与预约餐桌的管理系统+后台管理

项目背景

社会的发展和科学技术的进步,互联网技术越来越受欢迎。手机也逐渐受到广大人民群众的喜爱,也逐渐进入了每个用户的使用。手机具有便利性,速度快,效率高,成本低等优点。 因此,构建符合自己要求的操作系统是非常有意义的。
本文从管理员、用户的功能要求出发,微信点餐小程序中的功能模块主要是实现管理员服务端;首页、个人中心、用户管理、美食管理、美食类型管理、餐桌管理、预定餐桌管理、美食定制管理、定制信息管理、系统管理、订单管理,用户客户端;首页、美食、我的等功能。经过认真细致的研究,精心准备和规划,最后测试成功,系统可以正常使用。分析功能调整与微信点餐小程序实现的实际需求相结合,讨论了Java技术开发微信点餐小程序的使用。

关键字: 微信点餐小程序 Java技术

功能设计

功能模块图

本微信点餐小程序结构

用户管理实体属性图

美食管理实体属性图

餐桌管理实体属性图

预定餐桌管理实体属性图

功能截图

管理员服务端功能模块

管理员通过点击后台管理,进入页面可以输入用户名、密码、角色进行登录

管理员通过点击后台管理,进入页面可以查看首页、个人中心、用户管理、美食管理、美食类型管理、餐桌管理、预定餐桌管理、美食定制管理、定制信息管理、系统管理、订单管理等功能模块,进行相对应操作

用户管理:通过用户管理页面可以获取个人账号、姓名、性别、年龄、身份证号码、手机号码、相片等并进行详情、删除、修改等操作
美食管理:通过美食管理页面可以获取美食编号、美食名称、美食类型、原材料、简介、美食图片、上架日期、价格等信息,并进行详情、删除、查看评论、修改等操作

美食类型管理:通过美食类型管理页面可以获取美食类型等信息,并进行详情、删除、修改等操作

餐桌管理:通过餐桌管理页面可以获取餐桌编号、餐桌名称、位置、地址、相关图片、座位、上架日期等信息,并进行详情、删除、查看评论、修改等操作

预定餐桌管理:通过预定餐桌管理页面可以获取餐桌编号、餐桌名称、位置、地址、相关图片、座位、个人账号、姓名、申请日期、预计时间、审核回复、审核状态、审核等信息,并进行详情操作

定制信息管理:通过定制信息管理页面可以获取定制编号、定制名称、相关图片、发布日期、定制菜品、美食类型、忌口、备注、个人账号、姓名、申请日期、审核回复、审核状态、审核等信息,并进行详情操作

轮播图;该页面为轮播图管理界面。管理员可以在此页面进行首页轮播图的管理,通过新建操作可在轮播图中加入新的图片,还可以对以上传的图片进行修改操作,以及图片的删除操作

订单管理:通过订单管理页面可以获取订单编号、商品名称、商品图片、购买数量、价格/积分、折扣价格、总价格/总积分、折扣总价格、支付类型、状态、地址等信息,并进行详情、发货等操作

用户客户端功能模块

用户注册,在注册页面填写个人账号、密码、姓名、性别、年龄、身份证号码、手机号码进行注册

用户登录,在登录页面填写账号、密码进行登录

用户登录到首页可以查看首页、美食、我的等内容

在用户信息页面可以填写个人账号、密码、姓名、性别、年龄、身份证号码、手机号码、相片等信息进行保存、退出登录操作

在美食页面可以查看美食编号、美食名称、美食类型、原材料、简介、美食图片、上架日期、价格等信息,并可根据需要进行加入购物车、立即订购或点我收藏等操作

在餐桌页面可以查看餐桌编号、餐桌名称、位置、地址、相关图片、座位、上架日期等信息,并可根据需要对餐桌进行预约或点我收藏操作

相关代码

数据库配置

validationQuery=SELECT 1jdbc_url=jdbc:mysql://127.0.0.1:3306/ssmd01f1?useUnicode=true&characterEncoding=UTF-8&tinyInt1isBit=false
jdbc_username=root
jdbc_password=123456#jdbc_url=jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ssmd01f1
#jdbc_username=sa
#jdbc_password=123456

控制层(controller)

package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
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.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("用户名已存在。");}userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

业务层(Service)

package com.service;import java.util.List;
import java.util.Map;import org.apache.ibatis.annotations.Param;import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.UserEntity;
import com.utils.PageUtils;/*** 系统用户*/
public interface UserService extends IService<UserEntity> {PageUtils queryPage(Map<String, Object> params);List<UserEntity> selectListView(Wrapper<UserEntity> wrapper);PageUtils queryPage(Map<String, Object> params,Wrapper<UserEntity> wrapper);}

数据访问层(Dao)


package com.dao;import java.util.List;import org.apache.ibatis.annotations.Param;import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.UserEntity;/*** 用户*/
public interface UserDao extends BaseMapper<UserEntity> {List<UserEntity> selectListView(@Param("ew") Wrapper<UserEntity> wrapper);List<UserEntity> selectListView(Pagination page,@Param("ew") Wrapper<UserEntity> wrapper);}

更多推荐

基于微信小程序的点餐与预约餐桌的管理系统+后台管理

本文发布于:2023-07-03 20:10:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1011317.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:管理系统   餐桌   后台管理   程序   微信小

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!