基于微信小程序的点餐与预约餐桌的管理系统+后台管理
項目背景
社會的發(fā)展和科學(xué)技術(shù)的進步,互聯(lián)網(wǎng)技術(shù)越來越受歡迎。手機也逐漸受到廣大人民群眾的喜愛,也逐漸進入了每個用戶的使用。手機具有便利性,速度快,效率高,成本低等優(yōu)點。 因此,構(gòu)建符合自己要求的操作系統(tǒng)是非常有意義的。
本文從管理員、用戶的功能要求出發(fā),微信點餐小程序中的功能模塊主要是實現(xiàn)管理員服務(wù)端;首頁、個人中心、用戶管理、美食管理、美食類型管理、餐桌管理、預(yù)定餐桌管理、美食定制管理、定制信息管理、系統(tǒng)管理、訂單管理,用戶客戶端;首頁、美食、我的等功能。經(jīng)過認真細致的研究,精心準備和規(guī)劃,最后測試成功,系統(tǒng)可以正常使用。分析功能調(diào)整與微信點餐小程序?qū)崿F(xiàn)的實際需求相結(jié)合,討論了Java技術(shù)開發(fā)微信點餐小程序的使用。
關(guān)鍵字: 微信點餐小程序 Java技術(shù)
功能設(shè)計
功能模塊圖
本微信點餐小程序結(jié)構(gòu)
用戶管理實體屬性圖
美食管理實體屬性圖
餐桌管理實體屬性圖
預(yù)定餐桌管理實體屬性圖
功能截圖
管理員服務(wù)端功能模塊
管理員通過點擊后臺管理,進入頁面可以輸入用戶名、密碼、角色進行登錄
管理員通過點擊后臺管理,進入頁面可以查看首頁、個人中心、用戶管理、美食管理、美食類型管理、餐桌管理、預(yù)定餐桌管理、美食定制管理、定制信息管理、系統(tǒng)管理、訂單管理等功能模塊,進行相對應(yīng)操作
用戶管理:通過用戶管理頁面可以獲取個人賬號、姓名、性別、年齡、身份證號碼、手機號碼、相片等并進行詳情、刪除、修改等操作
美食管理:通過美食管理頁面可以獲取美食編號、美食名稱、美食類型、原材料、簡介、美食圖片、上架日期、價格等信息,并進行詳情、刪除、查看評論、修改等操作
美食類型管理:通過美食類型管理頁面可以獲取美食類型等信息,并進行詳情、刪除、修改等操作
餐桌管理:通過餐桌管理頁面可以獲取餐桌編號、餐桌名稱、位置、地址、相關(guān)圖片、座位、上架日期等信息,并進行詳情、刪除、查看評論、修改等操作
預(yù)定餐桌管理:通過預(yù)定餐桌管理頁面可以獲取餐桌編號、餐桌名稱、位置、地址、相關(guān)圖片、座位、個人賬號、姓名、申請日期、預(yù)計時間、審核回復(fù)、審核狀態(tài)、審核等信息,并進行詳情操作
定制信息管理:通過定制信息管理頁面可以獲取定制編號、定制名稱、相關(guān)圖片、發(fā)布日期、定制菜品、美食類型、忌口、備注、個人賬號、姓名、申請日期、審核回復(fù)、審核狀態(tài)、審核等信息,并進行詳情操作
輪播圖;該頁面為輪播圖管理界面。管理員可以在此頁面進行首頁輪播圖的管理,通過新建操作可在輪播圖中加入新的圖片,還可以對以上傳的圖片進行修改操作,以及圖片的刪除操作
訂單管理:通過訂單管理頁面可以獲取訂單編號、商品名稱、商品圖片、購買數(shù)量、價格/積分、折扣價格、總價格/總積分、折扣總價格、支付類型、狀態(tài)、地址等信息,并進行詳情、發(fā)貨等操作
用戶客戶端功能模塊
用戶注冊,在注冊頁面填寫個人賬號、密碼、姓名、性別、年齡、身份證號碼、手機號碼進行注冊
用戶登錄,在登錄頁面填寫賬號、密碼進行登錄
用戶登錄到首頁可以查看首頁、美食、我的等內(nèi)容
在用戶信息頁面可以填寫個人賬號、密碼、姓名、性別、年齡、身份證號碼、手機號碼、相片等信息進行保存、退出登錄操作
在美食頁面可以查看美食編號、美食名稱、美食類型、原材料、簡介、美食圖片、上架日期、價格等信息,并可根據(jù)需要進行加入購物車、立即訂購或點我收藏等操作
在餐桌頁面可以查看餐桌編號、餐桌名稱、位置、地址、相關(guān)圖片、座位、上架日期等信息,并可根據(jù)需要對餐桌進行預(yù)約或點我收藏操作
相關(guān)代碼
數(shù)據(jù)庫配置
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;/*** 登錄相關(guān)*/ @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();} }業(yè)務(wù)層(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;/*** 系統(tǒng)用戶*/ 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);}數(shù)據(jù)訪問層(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);}總結(jié)
以上是生活随笔為你收集整理的基于微信小程序的点餐与预约餐桌的管理系统+后台管理的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 修改Egg.js端口号
- 下一篇: Python-Django毕业设计基于的