基于javaweb+mysql的springboot餐厅点餐系统(java+springboot+maven+html+layui+echarts+mysql)
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot餐厅点餐系统(java+springboot+maven+html+layui+echarts+mysql)
项目介绍
Springboot餐厅点餐系统分为前后台,前台顾客可以进行点餐,后台可以由经理、收银员、厨师、服务员等角色登录; 前台主要功能如下: 桌位选择、菜品选择、提交菜单等功能;
后台主要功能如下: 主页控制台 员工列表:员工查询、新增、编辑、删除; 会员管理:会员列表、会员类型列表; 菜谱管理:菜品列表、种类列表; 订单管理:订单列表; 销售管理:销售统计、销量统计、交易记录; 制菜上菜管理:制菜任务列表、上菜任务列表、桌位上菜情况列表; 桌位管理:桌位列表;
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7/8.0版本均可; 5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:HTML+css+js+layui+Echarts
使用说明
项目运行: 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 控制台提示运行成功后再运行前端项目; 5. 运行项目,在浏览器中输入地址 后台登录地址:http://localhost:8181/restaurant/sysuser/login.html 前台点餐登录地址:http://localhost:8181/restaurant/guest/desklist.html 经理测试号 账号 18384623911 密码123456 收银员测试号 账号 18384623912 密码 123456 厨师测试号 账号 18384623913 密码 123456 服务员 账号 18384623914 密码 123456
注意事项:
为防止项目运行后图片找不到,请将“images”文件夹中的“restaurant”文件夹放到D盘根目录。如果想放到其他盘,请修改application.yml配置文件中对应路径
角色介绍:
功能介绍:
前后台展示图例:
订桌页面:
菜品管理:
点餐管理:
提交菜单列表:
后台统计展示:
后台销售展示:
* 查询近几天的营业情况数据
* @return
*/
@GetMapping("/ssByDays.do")
@ResponseBody
public Result<SalesStatisticsChart> salesStatisticsByDay(SalesStatisticsChart ssChart){
List<SalesStatisticsChart> result = dataAnalysisService.findSalesStatisticsByDays(ssChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天会员增长数接口
* @param memberChart
* @return
*/
@GetMapping("/mAddByDays.do")
@ResponseBody
public Result<MemberChart> memberAddByDays(MemberChart memberChart){
List<MemberChart> result = dataAnalysisService.findMemberAddByDays(memberChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询各类型会员数量
* @return
*/
@GetMapping("/mcRate.do")
@ResponseBody
public Result<MemberChart> memberCategoryRate(){
List<MemberChart> result = dataAnalysisService.findMemberCategoryRate();
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询每天(8-24)点中每小时的顾客数量接口
* @return
*/
@GetMapping("/peopleByHour.do")
@ResponseBody
public Result<PeopleChart> peopleByHours(){
List<PeopleChart> result = dataAnalysisService.findPeopleByHours();
return ResultUtil.success(result,new Long(result.size()));
}
}
}
}
@Controller
@RequestMapping("/membercategory")
public class MemberCategoryController {
@Autowired
private MemberCategoryService memberCategoryService;
@GetMapping("/list.html")
@RequiresPermissions("memberTypes:view")
public String memberList(){
return "membercategory/list";
}
@GetMapping("/add.html")
@RequiresPermissions("memberTypes:edit")
public String addMember(){
return "membercategory/add";
}
@PostMapping("/add.do")
@RequiresPermissions("memberTypes:edit")
@ResponseBody
public Result<Member> addMember(MemberCategory memberCategory){
memberCategoryService.insert(memberCategory);
return ResultUtil.success();
}
* @param pageInfo
* @return
*/
@GetMapping("/cookTask.do")
@RequiresPermissions("cooking:view")
@ResponseBody
public Result<OrderDetail> cookTaskList(CustomPageInfo<OrderDetail> pageInfo){
List<OrderDetail> resultList = cookAndServingService.cookTaskFindPage(pageInfo);
return ResultUtil.success(resultList,new Long((resultList.size())));
}
/**
* 开始制菜修改状态接口
* 获取前台传的数组,保存到List集合,必须添加value = "odIdList[]
* @param odIdList
* @return
*/
@PostMapping("/startCook.do")
@RequiresPermissions("cooking:edit")
@ResponseBody
public Result<OrderDetail> startCook(@RequestParam(value = "odIdList[]") List<Long> odIdList){
OrderDetail orderDetail = new OrderDetail();
orderDetail.setStatus(1);
orderDetail.setOdIdList(odIdList);
cookAndServingService.updateStatusByOdIds(orderDetail);
return ResultUtil.success();
}
/**
* 完成制菜修改状态接口
* 获取前台传的数组,保存到List集合,必须添加value = "odIdList[]
* @param odIdList
* @return
*/
@PostMapping("/finishCook.do")
@RequiresPermissions("cooking:edit")
@ResponseBody
public Result<OrderDetail> finishCook(@RequestParam(value = "odIdList[]") List<Long> odIdList){
OrderDetail orderDetail = new OrderDetail();
orderDetail.setStatus(2);
orderDetail.setOdIdList(odIdList);
cookAndServingService.updateStatusByOdIds(orderDetail);
return ResultUtil.success();
}
/**
* 上菜任务列表HTML界面
* @return
*/
@GetMapping("/servingTask.html")
@RequiresPermissions("serving:view")
//默认查询top12
goodsSalesChart.setNumber(12);
List<GoodsSalesChart> result = dataAnalysisService.findSalesSortByDays(goodsSalesChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天的菜品销量排行词云数据接口
* @return
*/
@GetMapping("/gwcByDays.do")
@ResponseBody
public Result<GoodsSalesChart> goodsWordCloudBynDays(GoodsSalesChart goodsSalesChart){
//默认查询top12
goodsSalesChart.setNumber(20);
List<GoodsSalesChart> result = dataAnalysisService.findSalesSortByDays(goodsSalesChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天的菜系销量数据
* @return
*/
@GetMapping("/gcsByDays.do")
@ResponseBody
public Result<GoodsCategorySalesChart> goodsCategorySalesByDays(GoodsCategorySalesChart gcsChart){
List<GoodsCategorySalesChart> result = dataAnalysisService.findGoodsCategorySalesByDays(gcsChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天的营业情况数据
* @return
*/
@GetMapping("/ssByDays.do")
@ResponseBody
public Result<SalesStatisticsChart> salesStatisticsByDay(SalesStatisticsChart ssChart){
List<SalesStatisticsChart> result = dataAnalysisService.findSalesStatisticsByDays(ssChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天会员增长数接口
* @param memberChart
* @return
*/
@GetMapping("/mAddByDays.do")
}
/**
* 查询近几天的菜品销量排行top10数据接口
* @return
*/
@GetMapping("/gssByDays.do")
@ResponseBody
public Result<GoodsSalesChart> goodsSalesSortByDays(GoodsSalesChart goodsSalesChart){
//默认查询top12
goodsSalesChart.setNumber(12);
List<GoodsSalesChart> result = dataAnalysisService.findSalesSortByDays(goodsSalesChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天的菜品销量排行词云数据接口
* @return
*/
@GetMapping("/gwcByDays.do")
@ResponseBody
public Result<GoodsSalesChart> goodsWordCloudBynDays(GoodsSalesChart goodsSalesChart){
//默认查询top12
goodsSalesChart.setNumber(20);
List<GoodsSalesChart> result = dataAnalysisService.findSalesSortByDays(goodsSalesChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天的菜系销量数据
* @return
*/
@GetMapping("/gcsByDays.do")
@ResponseBody
public Result<GoodsCategorySalesChart> goodsCategorySalesByDays(GoodsCategorySalesChart gcsChart){
List<GoodsCategorySalesChart> result = dataAnalysisService.findGoodsCategorySalesByDays(gcsChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天的营业情况数据
* @return
*/
@GetMapping("/ssByDays.do")
@ResponseBody
public Result<SalesStatisticsChart> salesStatisticsByDay(SalesStatisticsChart ssChart){
}
@PostMapping("/del.do")
@RequiresPermissions("userManage:edit")
@ResponseBody
public Result<SysUser> delete(@RequestParam String ids){
sysUserService.deleteByIds(ids);
return ResultUtil.success("删除成功!");
}
@GetMapping("/resetpwd/{userId}")
@RequiresPermissions("userManage:edit")
@ResponseBody
public Result<SysUser> resetPwd(@PathVariable("userId") Long userId){
SysUser user = new SysUser();
user.setPassword("123456");
user.setUserId(userId);
sysUserService.resetPwd(user);
return ResultUtil.success();
}
/**
* 个人信息页面
* @param session
* @param model
* @return
*/
@GetMapping("/curuserinfo.html")
public String currentUserInfo(HttpSession session,Model model){
SysUser currentUser = (SysUser) session.getAttribute("user");
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
model.addAttribute("currentUser", currentUser);
String birthday = sf.format(currentUser.getBirthday());
model.addAttribute("birthday",birthday);
model.addAttribute("roleList",sysUserService.findRoleList());
return "user/userInfo";
}
/**
* 会员列表数据接口
* @param pageInfo 接收pageNum、pageSize
* @param member 接收条件信息
* @param memberCategory 接收类型条件的id
* @return
*/
@PostMapping("/list.do")
@RequiresPermissions("memberManage:view")
@ResponseBody
public Result<List<Member>> memberList(CustomPageInfo<Member> pageInfo,Member member,
MemberCategory memberCategory){
member.setMemberCategory(memberCategory);
pageInfo.setT(member);
CustomPageInfo<Member> resultPageInfo = memberService.findPage(pageInfo);
Result<List<Member>> result = new Result<>();
result.setCode(ResultEnum.SUCCESS.getCode());
result.setMsg(ResultEnum.SUCCESS.getMsg());
result.setCount(resultPageInfo.getTotal());
result.setData(resultPageInfo.getList());
return result;
}
/**
* 根据会员号查询会员接口
* @param member
* @return
*/
@GetMapping("/findMemberByMemberCode.do")
@ResponseBody
public Result<Member> findMemberByMemberCode(Member member){
Member resultMember = memberService.findMemberByMemberCode(member);
return ResultUtil.success(resultMember);
}
}
public String editGoods(Model model, @PathVariable("goodsId") Integer goodsId){
model.addAttribute("goodsCategoryList",goodsCategoryService.findAll());
model.addAttribute("goods",goodsService.findById(goodsId));
return "goods/edit";
}
@PostMapping("/edit.do")
@ResponseBody
public Result<Goods> editGoods(Goods goods,GoodsCategory goodsCategory){
goods.setGoodsCategory(goodsCategory);
goodsService.update(goods);
return ResultUtil.success();
}
@PostMapping("/del.do")
@ResponseBody
public Result<Goods> delGoods(@RequestParam("ids") String ids){
goodsService.deleteByIds(ids);
return ResultUtil.success();
}
}
@ControllerAdvice//注解定义全局异常处理类
public class GlobalExceptionHandler {
//Spring自带的日志框架Logger
private static final Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
//声明要捕获的异常类
@ExceptionHandler(Exception.class)
@ResponseBody
public Result handlerException(Exception e){
if(e instanceof UnauthenticatedException){
UnauthenticatedException exception = new UnauthenticatedException();
return ResultUtil.error(ResultEnum.UNAUTHENTICATED_ERROR.getCode(),ResultEnum.UNAUTHENTICATED_ERROR.getMsg());
* @return
*/
@GetMapping("/ssd.html/{orderId}")
@RequiresPermissions("deskServing:view")
public String servingStatusDetail(@PathVariable(value = "orderId") Long orderId, Model model){
model.addAttribute("orderId",orderId);
return "cook/servingStatusDetail";
}
/**
* 桌位上菜详细情况数据接口
* @param pageInfo
* @param orderId
* @return
*/
@GetMapping("/ssd.do/{orderId}")
@RequiresPermissions("deskServing:view")
@ResponseBody
public Result<OrderDetail> servingStatusDetail(CustomPageInfo pageInfo,@PathVariable(value = "orderId") Long orderId){
OrderDetail detail = new OrderDetail();
Order order = new Order();
order.setOrderId(orderId);
detail.setOrder(order);
pageInfo.setT(detail);
CustomPageInfo<OrderDetail> resultInfo = orderDetailService.findPage(pageInfo);
return ResultUtil.success(resultInfo.getList(),resultInfo.getTotal());
}
}
user.setUserId(userId);
sysUserService.resetPwd(user);
return ResultUtil.success();
}
/**
* 个人信息页面
* @param session
* @param model
* @return
*/
@GetMapping("/curuserinfo.html")
public String currentUserInfo(HttpSession session,Model model){
SysUser currentUser = (SysUser) session.getAttribute("user");
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
model.addAttribute("currentUser", currentUser);
String birthday = sf.format(currentUser.getBirthday());
model.addAttribute("birthday",birthday);
model.addAttribute("roleList",sysUserService.findRoleList());
return "user/userInfo";
}
/**
* 修改密码页面
* @return
*/
@GetMapping("/updatepwd.html")
public String updatePwd(){
return "user/updatePwd";
}
@PostMapping("/updatepwd.do")
@ResponseBody
public Result<SysUser> updatePwd(SysUser user){
sysUserService.updatePwd(user);
return ResultUtil.success();
}
}
@Controller
@RequestMapping("/guest/client")
public class ClientOrderController{
@Autowired
private OrderService orderService;
@Autowired
private OrderDetailService orderDetailService;
/**
* 添加订单
* @return
*/
@PostMapping("/addorder.do")
@ResponseBody
private Result addOrder(@RequestBody Order order){
String orderCode = orderService.addOrder(order);
return ResultUtil.success(orderCode);
}
@GetMapping("/myOrder.do")
@ResponseBody
private Result<OrderDetail> myOrder(CustomPageInfo info,Order order){
OrderDetail orderDetail = new OrderDetail();
orderDetail.setOrder(order);
info.setT(orderDetail);
CustomPageInfo<OrderDetail> resultInfo = orderDetailService.findPage(info);
System.out.println(resultInfo.getList());
return ResultUtil.success(resultInfo.getList(),resultInfo.getTotal());
}
@GetMapping("/myOrder.html")
public String viewOrderDetail(@RequestParam("orderCode") String orderCode, Model model){
result.setCount((long) categoryList.size());
return result;
}
}
@Controller
@RequestMapping("/goods")
public class GoodsController{
@Autowired
private GoodsService goodsService;
@Autowired
private GoodsCategoryService goodsCategoryService;
@GetMapping("/list.html")
public String goodsList(Model model, HttpSession session){
model.addAttribute("goodsCategoryList",goodsCategoryService.findAll());
SysUser user = (SysUser) session.getAttribute("user");
model.addAttribute("role",user.getRole());
return "goods/list";
}
@PostMapping("/list.do")
@ResponseBody
public Result<Goods> goodsList(CustomPageInfo<Goods> pageInfo, Goods goods,GoodsCategory goodsCategory){
goods.setGoodsCategory(goodsCategory);
pageInfo.setT(goods);
CustomPageInfo<Goods> resultPage = goodsService.findPage(pageInfo);
return ResultUtil.success(resultPage.getList(),resultPage.getTotal());
}
@GetMapping("/add.html")
public String addGoods(Model model){
model.addAttribute("goodsCategoryList",goodsCategoryService.findAll());
return "goods/add";
}
@PostMapping("/add.do")
@ResponseBody
public Result<Goods> addGoods(Goods goods,GoodsCategory goodsCategory){
goods.setGoodsCategory(goodsCategory);
goodsService.insert(goods);
return ResultUtil.success();
@ResponseBody
public Result<SysUser> saveEdit(SysUser user,SysRole role,HttpSession session){
user.setRole(role);
sysUserService.update(user);
SysUser curUser = (SysUser) session.getAttribute("user");
//如果果是当前修改当前用户信息,则要将session中的保存的当前用户重新设置
if(curUser.getUserId()==user.getUserId()){
SysUser sysUser = sysUserService.findById(user.getUserId());
session.setAttribute("user",sysUser);
}
return ResultUtil.success();
}
@PostMapping("/del.do")
@RequiresPermissions("userManage:edit")
@ResponseBody
public Result<SysUser> delete(@RequestParam String ids){
sysUserService.deleteByIds(ids);
return ResultUtil.success("删除成功!");
}
@GetMapping("/resetpwd/{userId}")
@RequiresPermissions("userManage:edit")
@ResponseBody
public Result<SysUser> resetPwd(@PathVariable("userId") Long userId){
SysUser user = new SysUser();
user.setPassword("123456");
user.setUserId(userId);
sysUserService.resetPwd(user);
return ResultUtil.success();
}
/**
* 个人信息页面
* @param session
* @param model
* @return
*/
@GetMapping("/curuserinfo.html")
public String currentUserInfo(HttpSession session,Model model){
SysUser currentUser = (SysUser) session.getAttribute("user");
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
model.addAttribute("currentUser", currentUser);
* 编辑用户页面
* @return
*/
@GetMapping("/edituser.html/{userId}")
@RequiresPermissions("userManage:edit")
public String editUser(@PathVariable("userId") Long userId,Model model){
SysUser user = sysUserService.findById(userId);
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
String birthday = sf.format(user.getBirthday());
model.addAttribute("user",user);
model.addAttribute("birthday",birthday);
model.addAttribute("roleList",sysUserService.findRoleList());
return "user/editUser";
}
@PostMapping("/saveEdit.do")
@ResponseBody
public Result<SysUser> saveEdit(SysUser user,SysRole role,HttpSession session){
user.setRole(role);
sysUserService.update(user);
SysUser curUser = (SysUser) session.getAttribute("user");
//如果果是当前修改当前用户信息,则要将session中的保存的当前用户重新设置
if(curUser.getUserId()==user.getUserId()){
SysUser sysUser = sysUserService.findById(user.getUserId());
session.setAttribute("user",sysUser);
}
return ResultUtil.success();
}
@PostMapping("/del.do")
@RequiresPermissions("userManage:edit")
@ResponseBody
public Result<SysUser> delete(@RequestParam String ids){
sysUserService.deleteByIds(ids);
return ResultUtil.success("删除成功!");
}
@GetMapping("/resetpwd/{userId}")
@RequiresPermissions("userManage:edit")
@ResponseBody
public Result<SysUser> resetPwd(@PathVariable("userId") Long userId){
SysUser user = new SysUser();
user.setPassword("123456");
user.setUserId(userId);
sysUserService.resetPwd(user);
return ResultUtil.success();
}
/**
* 个人信息页面
* @param session
@ResponseBody
public Result<GoodsCategorySalesChart> goodsCategorySalesByDays(GoodsCategorySalesChart gcsChart){
List<GoodsCategorySalesChart> result = dataAnalysisService.findGoodsCategorySalesByDays(gcsChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天的营业情况数据
* @return
*/
@GetMapping("/ssByDays.do")
@ResponseBody
public Result<SalesStatisticsChart> salesStatisticsByDay(SalesStatisticsChart ssChart){
List<SalesStatisticsChart> result = dataAnalysisService.findSalesStatisticsByDays(ssChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询近几天会员增长数接口
* @param memberChart
* @return
*/
@GetMapping("/mAddByDays.do")
@ResponseBody
public Result<MemberChart> memberAddByDays(MemberChart memberChart){
List<MemberChart> result = dataAnalysisService.findMemberAddByDays(memberChart);
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询各类型会员数量
* @return
*/
@GetMapping("/mcRate.do")
@ResponseBody
public Result<MemberChart> memberCategoryRate(){
List<MemberChart> result = dataAnalysisService.findMemberCategoryRate();
return ResultUtil.success(result,new Long(result.size()));
}
/**
* 查询每天(8-24)点中每小时的顾客数量接口
* @return
*/
@GetMapping("/peopleByHour.do")
@ResponseBody
public Result<PeopleChart> peopleByHours(){
List<PeopleChart> result = dataAnalysisService.findPeopleByHours();
return ResultUtil.success(result,new Long(result.size()));
}
}
/**
* 制菜任务列表HTML界面
* @return
*/
@GetMapping("/cookTask.html")
@RequiresPermissions("cooking:view")
public String cookTaskList(HttpSession session,Model model){
SysUser user = (SysUser) session.getAttribute("user");
model.addAttribute("role",user.getRole());
return "cook/cookTaskList";
}
/**
* 制菜任务列表数据接口
* @param pageInfo
* @return
*/
@GetMapping("/cookTask.do")
@RequiresPermissions("cooking:view")
@ResponseBody
public Result<OrderDetail> cookTaskList(CustomPageInfo<OrderDetail> pageInfo){
List<OrderDetail> resultList = cookAndServingService.cookTaskFindPage(pageInfo);
return ResultUtil.success(resultList,new Long((resultList.size())));
}
/**
* 开始制菜修改状态接口
* 获取前台传的数组,保存到List集合,必须添加value = "odIdList[]
* @param odIdList
* @return
*/
@PostMapping("/startCook.do")
@RequiresPermissions("cooking:edit")
@ResponseBody
public Result<OrderDetail> startCook(@RequestParam(value = "odIdList[]") List<Long> odIdList){
OrderDetail orderDetail = new OrderDetail();
orderDetail.setStatus(1);
orderDetail.setOdIdList(odIdList);
cookAndServingService.updateStatusByOdIds(orderDetail);
//获取主体
Subject subject = SecurityUtils.getSubject();
UsernamePasswordToken token = new UsernamePasswordToken(user.getLoginCode(),user.getPassword());
System.out.println(session.getMaxInactiveInterval());
//将登录交个shiro
subject.login(token);
//登录成功后
return ResultUtil.success();
}
/**
* 退出登录
* @return
*/
@GetMapping("/logout.do")
public String logout(){
Subject subject = SecurityUtils.getSubject();
subject.logout();
//清除session
subject.getSession().removeAttribute("user");
return "redirect:login.html";
}
/**
* 登录页面
* @return
*/
@GetMapping("/login.html")
public String login(HttpSession session){
return "login/login";
}
/**
* 主页面
* @return
*/
@GetMapping("/admin.html")
public String admin(HttpSession session, Model model){
SysUser sysUser = (SysUser) session.getAttribute("user");
//查询菜单格式后的结构树并返回视图
}
/**
* 完成制菜修改状态接口
* 获取前台传的数组,保存到List集合,必须添加value = "odIdList[]
* @param odIdList
* @return
*/
@PostMapping("/finishCook.do")
@RequiresPermissions("cooking:edit")
@ResponseBody
public Result<OrderDetail> finishCook(@RequestParam(value = "odIdList[]") List<Long> odIdList){
OrderDetail orderDetail = new OrderDetail();
orderDetail.setStatus(2);
orderDetail.setOdIdList(odIdList);
cookAndServingService.updateStatusByOdIds(orderDetail);
return ResultUtil.success();
}
/**
* 上菜任务列表HTML界面
* @return
*/
@GetMapping("/servingTask.html")
@RequiresPermissions("serving:view")
public String servingTaskList(HttpSession session,Model model){
SysUser user = (SysUser) session.getAttribute("user");
model.addAttribute("role",user.getRole());
return "cook/servingTaskList";
}
/**
* 上菜任务列表数据接口
* @param pageInfo
* @return
*/
@GetMapping("/servingTask.do")
@RequiresPermissions("serving:view")
@ResponseBody
public Result<OrderDetail> servingTask(CustomPageInfo<OrderDetail> pageInfo){
CustomPageInfo<OrderDetail> resultInfo = cookAndServingService.servingTaskFindPage(pageInfo);
return ResultUtil.success(resultInfo.getList(),resultInfo.getTotal());