功能:用户的注册登录,美食浏览,美食文化,收藏百 科,趣味问答,食谱等等功能等等。
环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: JSP +Springboot+ SpringMVC + MyBatis + ThymeLeaf + FTP+ JavaScript + JQuery + Ajax + maven等等。
/**
* 评论控制器
*/
@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 map = commentService.addComment(vo, session);
return JSON.toJSONString(map);
}
/**
* 查询该菜品下的所有评论
* @param foodId
* @return
*/
@RequestMapping("/findByFood")
public String findByFood(Long foodId){
Map map = commentService.findByFood(foodId);
return JSON.toJSONString(map);
}
/**
* 查询该用户的所有评论
* @param session
* @return
*/
@RequestMapping("/findByUser")
public String findByUser(HttpSession session){
Map map = commentService.findByUser(session);
return JSON.toJSONString(map);
}
}
/**
* 投诉 控制器
*/
@RestController
@RequestMapping("/reception/complaint")
public class ComplaintController {
@Autowired
private ComplaintService complaintService;
/**
* 用户发表投诉
* @param session
* @param vo
* @return
*/
@RequestMapping("/add")
public String addComplaint(ComplaintVo vo, HttpSession session){
Map map = complaintService.addComplaint(vo, session);
return JSON.toJSONString(map);
}
/**
* 根据页面传递的条件查询对应的投诉信息
* @param vo
* @return
*/
@RequestMapping("/list")
public String findComplaintListByPage(ComplaintVo vo){
LayuiTableDataResult complaintListByPage = complaintService.findComplaintListByPage(vo);
return JSON.toJSONString(complaintListByPage);
}
/**
* 查询该用户的所有投诉
* @param session
* @return
*/
@RequestMapping("/findByUser")
public String findByUser(HttpSession session){
Map map = complaintService.findByUser(session);
return JSON.toJSONString(map);
}
}
/**
* 配送员管理控制器
*/
@RestController
@RequestMapping("/backstage/deliver")
public class DeliverManageController {
@Autowired
private DeliverService deliverService;
/**
* 根据页面的条件查询配送员列表
* @param vo
* @return
*/
@RequestMapping("/list")
public String findDeliverListByPage(DeliverVo vo){
LayuiTableDataResult deliverListByPage = deliverService.findDeliverListByPage(vo);
return JSON.toJSONString(deliverListByPage);
}
/**
* 配送员证件照文件上传
* @return
*/
@RequestMapping("/uploadFile")
public String uploadFile(MultipartFile deliverImage){
Map map = deliverService.uploadFile(deliverImage);
return JSON.toJSONString(map);
}
/**
* 查找不是配送员的用户
* @return
*/
@RequestMapping("/findUser")
public String findUserListNotDeliver(){
Map map = deliverService.findUserListNotDeliver();
return JSON.toJSONString(map);
}
/**
* 添加配送员
* @param vo
* @return
*/
@RequestMapping("/add")
public String addDeliver(DeliverVo vo){
Map map = deliverService.addDeliver(vo);
return JSON.toJSONString(map);
}
/**
* 修改配送员
* @param vo
* @return
*/
@RequestMapping("/modify")
public String modifyDeliver(DeliverVo vo){
Map map = deliverService.modifyDeliver(vo);
return JSON.toJSONString(map);
}
/**
* 配送员离职
* @return
*/
@RequestMapping("/leave")
public String leaveDeliver(String deliverId, Long userId){
Map map = deliverService.leaveDeliver(deliverId, userId);
return JSON.toJSONString(map);
}
/**
* 配送员复职
* @return
*/
@RequestMapping("/reJoin")
public String reJoinDeliver(String deliverId, Long userId){
Map map = deliverService.reJoinDeliver(deliverId, userId);
return JSON.toJSONString(map);
}
/**
* 查找接单数、差评数、结单数的最大值
* @return
*/
@RequestMapping("/findMax")
public String findMax(){
Map max = deliverService.findMax();
return JSON.toJSONString(max);
}
/**
* 查询正式的配送员信息(未离职且已实名)
* @return
*/
@RequestMapping("/findFormalDeliver")
public String findFormalDeliver(){
List formalDeliver = deliverService.findFormalDeliver();
return JSON.toJSONString(formalDeliver);
}
}
/**
* 菜品SKU属性集管理控制器
*/
@RestController
@RequestMapping("/backstage/foodattr")
public class FoodattrManageController {
@Autowired
private FoodattrService foodattrService;
/**
* 根据页面返回信息查找符合条件的菜品规格组集合
* @param vo
* @return
*/
@RequestMapping("/list")
public String findFoodattrListByPage(FoodattrVo vo){
LayuiTableDataResult foodattrListByPage = foodattrService.findFoodattrListByPage(vo);
return JSON.toJSONString(foodattrListByPage);
}
/**
* 添加菜品规格组
* @param vo
* @return
*/
@RequestMapping("/add")
public String addFoodattr(FoodattrVo vo){
Map map = foodattrService.addFoodattr(vo);
return JSON.toJSONString(map);
}
/**
* 修改菜品规格组
* @param vo
* @return
*/
@RequestMapping("/modify")
public String modifyFoodattr(FoodattrVo vo){
Map map = foodattrService.modifyFoodattr(vo);
return JSON.toJSONString(map);
}
/**
* 删除菜品规格组
* @param vo
* @return
*/
@RequestMapping("/delete")
public String deleteFoodattr(FoodattrVo vo){
Map map = foodattrService.deleteFoodattr(vo);
return JSON.toJSONString(map);
}
/**
* 查询所有的菜品类别
* @return
*/
@RequestMapping("/findAllFoodattr")
public String findAllFoodattr(){
Map allFoodattr = foodattrService.findAllFoodattr();
return JSON.toJSONString(allFoodattr);
}
}
/**
* 前台点餐中心控制器
*/
@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 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 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 foodInfo = foodService.findFoodInfoById(foodId);
return JSON.toJSONString(foodInfo);
}
/**
* 查询所有上架的推荐和热销菜品
* @return
*/
@RequestMapping(value = "/findRecommendAndHotSaleFood", produces = "application/json;charset=utf-8")
public String findRecommendAndHotSaleFood(){
Map map = foodService.findRecommendAndHotSaleFood();
return JSON.toJSONString(map);
}
}
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
我的评论
闽ICP备201721086021号 Copyright 宿递By LiangJ,All Rights Reserved