资讯 小学 初中 高中 语言 会计职称 学历提升 法考 计算机考试 医护考试 建工考试 教育百科
栏目分类:
子分类:
返回
空麓网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
空麓网 > 计算机考试 > 软件开发 > 后端开发 > Java

基于java(springboot)餐厅点餐系统源码成品(java毕业设计)

Java 更新时间: 发布时间: 计算机考试归档 最新发布

基于java(springboot)餐厅点餐系统源码成品(java毕业设计)

基于java足球赛会管理系统

餐厅点餐系统是基于java编程语言,mysql数据库,springboot框架,idea开发工具进行开发,本项目分为用户和管理员两个角色,其中用户的主要功能是注册,登陆,查看菜品,在线预定菜品,生成预定订单,查看菜品资讯,菜品评价;管理员可以对用户信息,菜品分类,菜品信息,用户订单,用户评价等信息进行管理。本项目功能齐全,页面简洁,适合作为java毕业设计来参考和学习。


一.技术环境

jdk版本:1.8 及以上
ide工具:IDEA
数据库: mysql5.7
编程语言: Java
tomcat: 8.0 及以上
java框架:springboot
maven: 3.6.1
前端:layui ,vue
详细技术:HTML+CSS+JS+JAVA+SpringBoot+MYSQL+Vue+MAVEN


二.项目文件(项目获取请看文末官网)


三.系统功能


四.代码示例

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 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;    }    	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 {    @Autowired    private UserService userService;    @Autowired    private RoleService roleService;    private User user;    private Integer userId;    private Map map = new HashMap();        public String list() throws IOException {        User user1 = UserUtils.getUser();        if (user1 == null || user1.getId() == null){            ActionContext.getContext().put("login", 1);            return SUCCESS;        }        Pager 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;    }        public String add() {        Pager pagers = roleService.pagers();        ActionContext.getContext().put("pagers", pagers);        return SUCCESS;    }        public String edit() {        User bean = userService.findById(userId);        Pager pagers = roleService.pagers();        ActionContext.getContext().put("bean", bean);        ActionContext.getContext().put("pagers", pagers);        return SUCCESS;    }        public void updateSh() throws IOException {        user.setIsSh(1);        userService.updates(user);        map.put("flag", true);        map.put("url", "user_list.do");        JsonUtils.toJson(map);    }        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;    }        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;    }}

五.项目截图












项目获取

转载请注明:文章转载自 http://www.konglu.com/
本文地址:http://www.konglu.com/it/1098490.html
免责声明:

我们致力于保护作者版权,注重分享,被刊用文章【基于java(springboot)餐厅点餐系统源码成品(java毕业设计)】因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理,本文部分文字与图片资源来自于网络,转载此文是出于传递更多信息之目的,若有来源标注错误或侵犯了您的合法权益,请立即通知我们,情况属实,我们会第一时间予以删除,并同时向您表示歉意,谢谢!

我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2023 成都空麓科技有限公司

ICP备案号:蜀ICP备2023000828号-2