资源简介
分层实现从前台点单模糊分页查询,加入购物车提交订单,到后端的菜品管理、菜系管理、新菜品的上传,退桌订桌状态的查看,是一套完整的餐馆服务项目。
代码片段和文件信息
/**
*
*/
package com.hotel.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.hotel.pojo.DinnerTable;
import com.hotel.service.DinnerTableServiceI;
import com.hotel.service.impl.DinnerTableServiceImpl;
/**
*
*title: DinnerTableServlet
*Description:TODO
*@author ghb
*@date 2016-10-24下午7:12:14
*
*/
public class DinnerTableServlet extends HttpServlet {
private DinnerTableServiceI dinnerTableService= new DinnerTableServiceImpl();
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doPost(requestresponse);
}
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
String method= request.getParameter(“method“);
if(“getDinnerTableList“.equals(method)){
getDinnerTableList(requestresponse);
}else if(“del“.equals(method)){
del(requestresponse);
}else if(“search“.equals(method)){
search(requestresponse);
}else if(“add“.equals(method)){
add(requestresponse);
}else if (“update“.equals(method)){
update(requestresponse);
}
}
//更新
private void update(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
String id=request.getParameter(“id“);
dinnerTableService.updateDinnerTable(Integer.parseInt(id));
getDinnerTableList(requestresponse);
}
//添加
private void add(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
String tableName = request.getParameter(“tableName“);
System.out.println(tableName);
DinnerTable dinnerTable = new DinnerTable(0tableName0 new Timestamp(new Date().getTime()));
dinnerTableService.addDinnerTable(dinnerTable);
getDinnerTableList(requestresponse);
}
//搜索
private void search(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
String tableName=request.getParameter(“keyword“);
List dinnerTableList=dinnerTableService.SearchDinnerTable(tableName);
request.setAttribute(“dinnerTableList“ dinnerTableList);
request.getRequestDispatcher(“/sys/boardList.jsp“).forward(request response);
}
//删除
private void del(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stubre
String id=request.getParameter(“id“);
dinnerTableService.delDinnerTable(Integer.parseInt(id));
getDinnerTableList(requestresponse);
}
//餐桌列表
private void getDinnerTableList(HttpServletRequest reque
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-07-14 22:06 day1024hotel\
文件 1730 2016-10-27 18:58 day1024hotel\.classpath
目录 0 2016-10-24 17:33 day1024hotel\.myeclipse\
文件 309 2016-11-05 08:54 day1024hotel\.myme
文件 1755 2016-10-24 17:56 day1024hotel\.project
目录 0 2018-07-14 22:06 day1024hotel\.settings\
文件 500 2016-10-24 17:33 day1024hotel\.settings\.jsdtscope
文件 364 2016-10-24 17:33 day1024hotel\.settings\org.eclipse.jdt.core.prefs
文件 474 2016-10-24 17:33 day1024hotel\.settings\org.eclipse.wst.common.component
文件 252 2016-10-24 17:33 day1024hotel\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2016-10-24 17:33 day1024hotel\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2016-10-24 17:33 day1024hotel\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2018-07-14 22:06 day1024hotel\src\
文件 529 2016-10-26 16:09 day1024hotel\src\c3p0-config.xm
目录 0 2018-07-14 22:06 day1024hotel\src\com\
目录 0 2018-07-14 22:06 day1024hotel\src\com\hotel\
目录 0 2018-07-14 22:06 day1024hotel\src\com\hotel\controller\
文件 3366 2016-10-25 19:44 day1024hotel\src\com\hotel\controller\DinnerTableServlet.java
文件 7269 2016-10-29 16:08 day1024hotel\src\com\hotel\controller\FoodServlet.java
文件 3713 2016-10-25 21:50 day1024hotel\src\com\hotel\controller\FoodTypeServlet.java
文件 1653 2016-10-28 10:53 day1024hotel\src\com\hotel\controller\OrderDetailServlet.java
文件 1419 2016-10-26 11:11 day1024hotel\src\com\hotel\controller\OrdersServlet.java
文件 1468 2016-10-26 15:58 day1024hotel\src\com\hotel\controller\pDinnerTableServlet.java
文件 4289 2016-10-28 19:31 day1024hotel\src\com\hotel\controller\pFoodServlet.java
文件 3682 2016-10-28 19:36 day1024hotel\src\com\hotel\controller\pOrderDetailServlet.java
文件 3839 2016-10-28 09:19 day1024hotel\src\com\hotel\controller\pOrderServlet.java
目录 0 2018-07-14 22:06 day1024hotel\src\com\hotel\dao\
文件 497 2016-10-24 21:07 day1024hotel\src\com\hotel\dao\DinnerTableDaoI.java
文件 479 2016-10-28 14:57 day1024hotel\src\com\hotel\dao\FoodDaoI.java
文件 561 2016-10-25 21:43 day1024hotel\src\com\hotel\dao\FoodTypeDaoI.java
目录 0 2018-07-14 22:06 day1024hotel\src\com\hotel\dao\impl\
............此处省略285个文件信息
相关资源
- 网页订餐系统
- Eclipse SVN插件中文版本及安装教程si
- MyEclipseCI2019.4.0破解文件-附破解步骤
- Eclipse使用详细教程
- 团购网站—吉利团购
- 简单的struts2增删改查
- 设计一个简单的网上名片管理系统,
- Go语言 guru.exe、godef.exe、gocode.exe
- jetty.rarclipse/myeclipse/STS等开发工具的
- svn1.1.9集合eclipse插件包
- myeclipse 2017 stable 2.0 破解—新的功能和
- 基于LDAP的单点登录方案的设计与实现
- eclipse-color-theme
- ShoeStore穿美在线鞋城
- org.eclipse.swt包
- web登录页面数据库验证
- eclipse 开发桌面程序
- struts2(包括增删改查的实现,及登录
- struts2实现用户和日记本的增删改查
- The Art of Debugging with GDB DDD and Eclipse.
- Eclipse插件之randoop
- nodejs+mongoose简单关联+增删改查
- MyBatis_Generator MyEclipse插件离线安装包
- eclipse_mars_zh汉化包
- eclipse安装extjs插件
- 新闻管理系统.rar
- MyEclipse2017 2018通用汉化包
- Navicat_Keygen_Patch_By_DFoX.zip
- 简单ssm框架实现增删改查
- 使用MyEclipse实现MapReduce
评论
共有 条评论