基于javaweb+jsp的在线点餐系统(java+SSM+jsp+mysql+maven+layui)

基于javaweb+jsp的在线点餐系统(java+SSM+jsp+mysql+maven+layui)

一、项目简述
功能包括: 前台实现:用户浏览菜单、菜品分类筛选、查看菜单详 情、添加购物车、购物车结算、会员券、个人订单查询等 等。 后台实现:餐系管理、菜品管理、订单管理、系统管理、 酉己备员管理等。 系统分为:高或管理员、顾客、厨师、配送员等等。

二、项目运行
环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)

项目技术: JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等。

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

     * @param vo
     * @param session
     * @return
     */
    @RequestMapping("/add")
    public String addComment(CommentVo vo, HttpSession session){
        Map<String, Object> map = commentService.addComment(vo, session);
        return JSON.toJSONString(map);
    }
    /**
     * 查询该菜品下的所有评论
     * @param foodId
     * @return
     */
        Map<String, Object> map = foodService.findRecommendAndHotSaleFood();
        return JSON.toJSONString(map);
    }
评论控制器:
/**
 * 评论控制器
 */
@RestController
@RequestMapping("/reception/comment")
public class CommentController {
    @Autowired
    private CommentService commentService;
    /**
     * 用户发表评论
     * @param vo
     * @param session
     * @return
     */
    @RequestMapping("/add")
    public String addComment(CommentVo vo, HttpSession session){
        Map<String, Object> map = commentService.addComment(vo, session);
        return JSON.toJSONString(map);
    }
    /**
     * 查询该菜品下的所有评论
     * @param foodId
     * @return
     */
    @RequestMapping("/findByFood")
    public String findByFood(Long foodId){
        Map<String, Object> map = commentService.findByFood(foodId);
        return JSON.toJSONString(map);
    }
    /**
     * 查询该用户的所有评论
    @RequestMapping(value = "/findFood", produces = "application/json;charset=utf-8")
    public String findOnshelfFoodByType(Long typeId){
        List<FoodEntity> onshelfFoodByType = foodService.findOnshelfFoodByType(typeId);
        return JSON.toJSONString(onshelfFoodByType);
    }
    /**
     * 根据菜品编号查询所有菜品信息
     * @param foodId
     * @return
     */
    @RequestMapping(value = "/findFoodInfo", produces = "application/json;charset=utf-8")
    public String findFoodInfoById(Long foodId){
        Map<String, Object> foodInfo = foodService.findFoodInfoById(foodId);
        return JSON.toJSONString(foodInfo);
public class FoodController {
    @Autowired
    private FoodService foodService;
    /**
     * 查找所有上架类别的所有上架菜品
     * @return
     */
    @RequestMapping(value = "/findFoodType", produces = "application/json;charset=utf-8")
    public String findFood(){
        List<FoodTypeEntity> foodTypeList = foodService.findFoodType();
        return JSON.toJSONString(foodTypeList);
    }
    /**
     * 根据类别ID查询上架菜品
    public String findFood(){
        List<FoodTypeEntity> foodTypeList = foodService.findFoodType();
        return JSON.toJSONString(foodTypeList);
    }
    /**
     * 根据类别ID查询上架菜品
     * @param typeId
     * @return
     */
    @RequestMapping(value = "/findFood", produces = "application/json;charset=utf-8")
    public String findOnshelfFoodByType(Long typeId){
        List<FoodEntity> onshelfFoodByType = foodService.findOnshelfFoodByType(typeId);
        return JSON.toJSONString(onshelfFoodByType);
    }
    /**
     * 根据菜品编号查询所有菜品信息
     * @param foodId
     * @return
     */
        Map<String, Object> map = commentService.addComment(vo, session);
        return JSON.toJSONString(map);
    }
    /**
     * 查询该菜品下的所有评论
     * @param foodId
     * @return
     */
    @RequestMapping("/findByFood")
    public String findByFood(Long foodId){
        Map<String, Object> map = commentService.findByFood(foodId);
        return JSON.toJSONString(map);
    }
    /**
     * 查询该用户的所有评论
     * @param session
     * @return
     * @param session
     * @return
     */
    @RequestMapping("/add")
    public String addComment(CommentVo vo, HttpSession session){
        Map<String, Object> map = commentService.addComment(vo, session);
        return JSON.toJSONString(map);
    }
    /**
     * 查询该菜品下的所有评论
     * @param foodId
     * @return
     */
    @RequestMapping("/findByFood")
    public String findByFood(Long foodId){
        Map<String, Object> map = commentService.findByFood(foodId);
    public String findUserListNotDeliver(){
        Map<String, Object> map = deliverService.findUserListNotDeliver();
        return JSON.toJSONString(map);
    }
    /**
     * 添加配送员
     * @param vo
     * @return
     */
    @RequestMapping("/add")
    @RequestMapping("/findMax")
    public String findMax(){
        Map<String, Object> max = deliverService.findMax();
        return JSON.toJSONString(max);
    }
    /**
     * 查询正式的配送员信息(未离职且已实名)
     * @return
     */
    @RequestMapping("/findFormalDeliver")
    public String findFormalDeliver(){
        List<DeliverEntity> formalDeliver = deliverService.findFormalDeliver();
        return JSON.toJSONString(formalDeliver);
    }
}
前台点餐中心控制器:
/**
 * 前台点餐中心控制器
 */
@RestController
@RequestMapping("/reception/food")
public class FoodController {
    @Autowired
        List<FoodTypeEntity> foodTypeList = foodService.findFoodType();
        return JSON.toJSONString(foodTypeList);
    }
    /**
     * 根据类别ID查询上架菜品
     * @param typeId
     * @return
     */
    @RequestMapping(value = "/findFood", produces = "application/json;charset=utf-8")
    public String findOnshelfFoodByType(Long typeId){
        List<FoodEntity> onshelfFoodByType = foodService.findOnshelfFoodByType(typeId);
        return JSON.toJSONString(onshelfFoodByType);
    }
    /**
     * 根据菜品编号查询所有菜品信息
     * @param foodId
     * 查询正式的配送员信息(未离职且已实名)
     * @return
     */
    @RequestMapping("/findFormalDeliver")
    public String findFormalDeliver(){
        List<DeliverEntity> formalDeliver = deliverService.findFormalDeliver();
        return JSON.toJSONString(formalDeliver);
    }
}
前台点餐中心控制器:
/**
 * 前台点餐中心控制器
    public String leaveDeliver(String deliverId, Long userId){
        Map<String, Object> map = deliverService.leaveDeliver(deliverId, userId);
        return JSON.toJSONString(map);
    }
    /**
     * 配送员复职
     * @return
     */
    @RequestMapping("/reJoin")
    public String reJoinDeliver(String deliverId, Long userId){
        Map<String, Object> map = deliverService.reJoinDeliver(deliverId, userId);
        return JSON.toJSONString(map);
    }
    /**
     * 查找接单数、差评数、结单数的最大值
     * @return
     */
    @RequestMapping("/findMax")
    public String findMax(){
        Map<String, Object> max = deliverService.findMax();
     * @return
     */
    @RequestMapping("/uploadFile")
    public String uploadFile(MultipartFile deliverImage){
        Map<String, Object> map = deliverService.uploadFile(deliverImage);
        return JSON.toJSONString(map);
    }
    /**
     * 查找不是配送员的用户
     * @return
     */
    @RequestMapping("/findUser")
    public String findUserListNotDeliver(){
        Map<String, Object> map = deliverService.findUserListNotDeliver();
        return JSON.toJSONString(map);
    }
    /**
     * 添加配送员
     * @param vo
     * @return
     */
    /**
     * 配送员复职
     * @return
     */
    @RequestMapping("/reJoin")
    public String reJoinDeliver(String deliverId, Long userId){
        Map<String, Object> map = deliverService.reJoinDeliver(deliverId, userId);
        return JSON.toJSONString(map);
    }
    /**
     * 查找接单数、差评数、结单数的最大值
     * @return
     */
    @RequestMapping("/findMax")
    public String findMax(){
    /**
     * 查询该菜品下的所有评论
     * @param foodId
     * @return
     */
    @RequestMapping("/findByFood")
    public String findByFood(Long foodId){
        Map<String, Object> map = commentService.findByFood(foodId);
        return JSON.toJSONString(map);
    }
    /**
     * 查询该用户的所有评论
     * @param session
     * @return
     */
    @RequestMapping("/findByUser")
    public String findByUser(HttpSession session){
        Map<String, Object> map = commentService.findByUser(session);
        return JSON.toJSONString(map);
    }
}
配送员管理控制器:
    public String findFood(){
        List<FoodTypeEntity> foodTypeList = foodService.findFoodType();
        return JSON.toJSONString(foodTypeList);
    }
    /**
     * 根据类别ID查询上架菜品
     * @param typeId
     * @return
     */
    @RequestMapping(value = "/findFood", produces = "application/json;charset=utf-8")
    public String findOnshelfFoodByType(Long typeId){
        List<FoodEntity> onshelfFoodByType = foodService.findOnshelfFoodByType(typeId);
        return JSON.toJSONString(onshelfFoodByType);
    }
    /**
     * 根据菜品编号查询所有菜品信息
     * @param foodId
     * @return
     */
    @RequestMapping(value = "/findFoodInfo", produces = "application/json;charset=utf-8")
    public String findFoodInfoById(Long foodId){
        Map<String, Object> foodInfo = foodService.findFoodInfoById(foodId);
        return JSON.toJSONString(foodInfo);
    }
        List<FoodEntity> onshelfFoodByType = foodService.findOnshelfFoodByType(typeId);
        return JSON.toJSONString(onshelfFoodByType);
    }
    /**
     * 根据菜品编号查询所有菜品信息
     * @param foodId
     * @return
     */
    @RequestMapping(value = "/findFoodInfo", produces = "application/json;charset=utf-8")
    public String findFoodInfoById(Long foodId){
        Map<String, Object> foodInfo = foodService.findFoodInfoById(foodId);
        return JSON.toJSONString(foodInfo);
    }
    /**
     * 查询所有上架的推荐和热销菜品
     * @return
     */
    @RequestMapping(value = "/findRecommendAndHotSaleFood", produces = "application/json;charset=utf-8")
    public String findRecommendAndHotSaleFood(){
        Map<String, Object> map = foodService.findRecommendAndHotSaleFood();
        return JSON.toJSONString(map);
    }
     */
    @RequestMapping(value = "/findFoodInfo", produces = "application/json;charset=utf-8")
    public String findFoodInfoById(Long foodId){
        Map<String, Object> foodInfo = foodService.findFoodInfoById(foodId);
        return JSON.toJSONString(foodInfo);
    }
    /**
     * 查询所有上架的推荐和热销菜品
     * @return
     */
    @RequestMapping(value = "/findRecommendAndHotSaleFood", produces = "application/json;charset=utf-8")
    public String findRecommendAndHotSaleFood(){
        return JSON.toJSONString(map);
    }
    /**
     * 查找接单数、差评数、结单数的最大值
     * @return
     */
    @RequestMapping("/findMax")
    public String findMax(){
        Map<String, Object> max = deliverService.findMax();
        return JSON.toJSONString(max);
    }
    /**
     * 查询正式的配送员信息(未离职且已实名)
     * @return
     */
    @RequestMapping("/findFormalDeliver")
    public String findFormalDeliver(){
        List<DeliverEntity> formalDeliver = deliverService.findFormalDeliver();
        return JSON.toJSONString(formalDeliver);
    /**
     * 根据类别ID查询上架菜品
     * @param typeId
     * @return
     */
    @RequestMapping(value = "/findFood", produces = "application/json;charset=utf-8")
    public String findOnshelfFoodByType(Long typeId){
        List<FoodEntity> onshelfFoodByType = foodService.findOnshelfFoodByType(typeId);
        return JSON.toJSONString(onshelfFoodByType);
    }
    /**
     * 根据菜品编号查询所有菜品信息
     * @param foodId
     * @return
     */
    @RequestMapping(value = "/findFoodInfo", produces = "application/json;charset=utf-8")
    public String findFoodInfoById(Long foodId){
        Map<String, Object> foodInfo = foodService.findFoodInfoById(foodId);
        return JSON.toJSONString(foodInfo);
     * 查找不是配送员的用户
     * @return
     */
    @RequestMapping("/findUser")
    public String findUserListNotDeliver(){
        Map<String, Object> map = deliverService.findUserListNotDeliver();
        return JSON.toJSONString(map);
    }
    /**
     * 添加配送员
     * @param vo
     * @return
     */
    @RequestMapping("/add")
    public String addDeliver(DeliverVo vo){
        Map<String, Object> map = deliverService.addDeliver(vo);
        return JSON.toJSONString(map);
    }
    /**
    }
    /**
     * 查询所有上架的推荐和热销菜品
     * @return
     */
    @RequestMapping(value = "/findRecommendAndHotSaleFood", produces = "application/json;charset=utf-8")
    public String findRecommendAndHotSaleFood(){
        Map<String, Object> map = foodService.findRecommendAndHotSaleFood();
        return JSON.toJSONString(map);
    }
评论控制器:
/**
 * 评论控制器
 */
@RestController
@RequestMapping("/reception/comment")
public class CommentController {
    @Autowired
    private CommentService commentService;
    /**
     * 用户发表评论
     * @param vo
     * @param session
     * @return
     * @return
     */
    @RequestMapping("/leave")
    public String leaveDeliver(String deliverId, Long userId){
        Map<String, Object> map = deliverService.leaveDeliver(deliverId, userId);
        return JSON.toJSONString(map);
    }
    /**
     * 配送员复职
     * @return
     */
    @RequestMapping("/reJoin")
    public String reJoinDeliver(String deliverId, Long userId){
        Map<String, Object> map = deliverService.reJoinDeliver(deliverId, userId);
 */
@RestController
@RequestMapping("/reception/food")
public class FoodController {
    @Autowired
    private FoodService foodService;
    /**
     * 查找所有上架类别的所有上架菜品
     * @return
     */
    @RequestMapping(value = "/findFoodType", produces = "application/json;charset=utf-8")
    public String findFood(){
        List<FoodTypeEntity> foodTypeList = foodService.findFoodType();
        return JSON.toJSONString(foodTypeList);
    }
    /**
     * 根据类别ID查询上架菜品
     * @param typeId
     * @return
     */
    @RequestMapping(value = "/findFood", produces = "application/json;charset=utf-8")
    public String addDeliver(DeliverVo vo){
        Map<String, Object> map = deliverService.addDeliver(vo);
        return JSON.toJSONString(map);
    }
    /**
     * 修改配送员
     * @param vo
     * @return
     */
    @RequestMapping("/modify")
    public String modifyDeliver(DeliverVo vo){
        Map<String, Object> map = deliverService.modifyDeliver(vo);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值