基于微信小程序校园餐饮配送系统
校园餐饮配送系统是基于微信小程序,java编程语言,mysql数据库,idea工具,ssm框架开发,本系统分为学生,配送员,商家,管理员四个角色,学生可以在线登陆点餐,提交订单,查看接单配送信息。配送员可以查看学生的点单信息,在线接单。商家可以在线管理上传菜品信息,查看管理配送订单信息。管理员可以对学生信息,商家信息,配送信息,美食信息,美食类型和订单信息等进行管理。本系统功能齐全,文档有答辩ppt和论文,适合作为微信小程序毕业设计和课程设计参考与学习。
一.技术环境
jdk版本:1.8 及以上
ide工具:IDEA ,微信小程序开发工具
数据库: mysql5.7 (必须5.7)
编程语言: Java
tomcat: 8.0 及以上
java框架:ssm
maven: 3.6.1
前端:layui ,微信,vue
详细技术:HTML+CSS+JS+vue+JAVA+ssm+MYSQL+JQUERY+MAVEN+微信开发工具
二.系统功能
三系统功能
基于微信小程序校园餐饮配送系统
系统分为学生和商家,配送员,管理员四个角色
学生微信小程序端的主要功能有
1.学生可以注册登陆微信小程序
2.学生查看美食列表,在线搜索美食信息
3.学生查看美食详情,在线购买美食,提交购买订单
4.学生查看购买的美食订单,删除订单
5.学生查看配送员的接单配送信息,如果收到美食,在线确定收货
6.学生个人中心修改个人资料,修改密码,修改头像信息
7.学生查看美食收藏信息
8.退出登陆
配送员微信小程序端的主要功能有
1.配送员注册和登陆微信小程序
2.配送员查看学生提交的订单,在线接单配送
3.配送员查看配送的订单,对订单用户留言进行回复
商家微信小程序端的主要功能有
1.商家注册和登陆微信小程序
2.商家可以在线添加上传美食,对上传的美食添加,修改,删除
3.商家查看用户购买的美食订单配送信息
4.商家个人中心修改资料,修改密码,修改头像
5.商家查看管理美食订单
6.商家查看管理配送订单
7.商家查看管理配送信息
8.退出登陆
管理员的主要功能有:
1.管理员输入账户登陆后台
2.个人中心: 管理员修改密码和账户信息
3.学生管理·对注册的学生信息进行添加,修改,删除,查询
4.商家管理:对注册的商家信息进行添加,修改,删除,查询
5.配送员管理:对配送员信息进行添加,修改,查询,删除
6.美食管理:对商家发布的美食信息进行查询,修改,删除
7.美食类型管理: 对美食类型信息进行添加,修改,删除,查询对系统的美食订单信息进行查询,删除
8.美食订单管理:
9.配送订单管理:对配送员的配送订单进行查看,删除
10.配送信息管理:对配送员的配送信息进行审核,删除,查询
11.轮播图管理:对网站轮播图进行添加,修改,查询,删除
12.退出系统
三.代码示例
package com.lmu.controller;
/**
* 和登陆有关的都在这里
*/
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.UserUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@Controller("loginController")
@Scope("prototype")
public class LoginController extends ActionSupport {
@Autowired
private UserService userService;
@Autowired
private RoleService roleService;
private User user;
private Map<String, Object> map = new HashMap();
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public UserService getUserService() {
return userService;
}
public void setUserService(UserService userService) {
this.userService = userService;
}
/**
* 用户登陆
* @return
*/
public void index() throws IOException {
User user1 = userService.getUser(user);
if (user1 != null){
if (user1.getIsSh() == 1){
if (user1.getRole().getEnName().equals("admin")){
ActionContext.getContext().getSession().put("user", user1);
}
if (user1.getRole().getEnName().equals("js")){
ActionContext.getContext().getSession().put("user1", user1);
}
if (user1.getRole().getEnName().equals("xs")){
ActionContext.getContext().getSession().put("user2", user1);
}
map.put("flag", 1);
map.put("url", "login_indexs.do");
map.put("id", user1.getId());
JsonUtils.toJson(map);
} else {
map.put("flag", 2);
JsonUtils.toJson(map);
}
} else {
map.put("flag", 3);
JsonUtils.toJson(map);
}
}
public String indexs() throws IOException {
User u = UserUtils.getUser();
if (u != null){
ActionContext.getContext().put("user", u);
String ss = u.getRole().getEnName();
ActionContext.getContext().put("role", u.getRole().getEnName());
}
return SUCCESS;
}
//登陆页面
public String login() {
return SUCCESS;
}
//退出
public String tuichu() {
ActionContext ac = ActionContext.getContext();
Map session = ac.getSession();
session.remove("userName");
session.remove("userId");
ServletActionContext.getRequest().getSession().invalidate();
return "login";
}
}
package com.lmu.controller;
/**
* 用户新增
*/
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.Pager;
import com.lmu.utils.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.awt.event.FocusEvent;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Controller("userController")
@Scope("prototype")
public class UserController extends ActionSupport implements ModelDriven<User> {
@Autowired
private UserService userService;
@Autowired
private RoleService roleService;
private User user;
private Integer userId;
private Map<String, Object> map = new HashMap();
/**
* list
*
* @return
*/
public String list() throws IOException {
User user1 = UserUtils.getUser();
if (user1 == null || user1.getId() == null){
ActionContext.getContext().put("login", 1);
return SUCCESS;
}
Pager<User> pagers = null;
Role role = user1.getRole();
if (role.getEnName().equals("admin")) {
pagers = userService.getList(user);
ActionContext.getContext().put("pagers", pagers);
ActionContext.getContext().put("user", user1);
ActionContext.getContext().put("role", role);
ActionContext.getContext().put("bean", user);
return SUCCESS;
} else if (role.getEnName().equals("xs") || role.getEnName().equals("js")) {
pagers = userService.getList(user1);
ActionContext.getContext().put("pagers", pagers);
ActionContext.getContext().put("bean", user);
return SUCCESS;
}
return null;
}
/**
* 跳转add
*
* @return
*/
public String add() {
Pager<Role> pagers = roleService.pagers();
ActionContext.getContext().put("pagers", pagers);
return SUCCESS;
}
/**
* 查询修改
*
* @return
*/
public String edit() {
User bean = userService.findById(userId);
Pager<Role> pagers = roleService.pagers();
ActionContext.getContext().put("bean", bean);
ActionContext.getContext().put("pagers", pagers);
return SUCCESS;
}
/**
* 审核
*
* @return
*/
public void updateSh() throws IOException {
user.setIsSh(1);
userService.updates(user);
map.put("flag", true);
map.put("url", "user_list.do");
JsonUtils.toJson(map);
}
/**
* 更新
*
* @return
*/
public String update() throws IOException {
if (user.getPass().equals("")){
user.setPass(null);
}
userService.updates(user);
map.put("flag", true);
map.put("url", "user_list.do");
JsonUtils.toJson(map);
return SUCCESS;
}
/**
* 保存
*
* @return
*/
public void save() throws IOException {
if (userService.getUser(user) != null){
map.put("flag", false);
map.put("url", "login_login.do");
JsonUtils.toJson(map);
} else {
user.setTime(new Date());
userService.save(user);
map.put("flag", true);
map.put("url", "login_login.do");
JsonUtils.toJson(map);
}
}
public void delete() throws IOException {
User user1 = userService.findById(userId);
user1.setIsDelete(1);
userService.update(user1);
map.put("flag", true);
map.put("url", "user_list.do");
JsonUtils.toJson(map);
}
@Override
public User getModel() {
if (user == null) {
user = new User();
}
return user;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
}
四.功能截图