一、摘要
1.1 項目介紹
基于JAVA+Vue+SpringBoot+MySQL的農家樂訂餐系統(tǒng),包含了菜品類型模塊、菜品檔案模塊、菜品收藏模塊、菜品訂餐模塊、菜品資訊模塊,還包含系統(tǒng)自帶的用戶管理、部門管理、角色管理、菜單管理、日志管理、數(shù)據(jù)字典管理、文件管理、圖表展示等基礎模塊,農家樂訂餐系統(tǒng)基于角色的訪問控制,給訂餐管理員、配送人員使用,可將權限精確到按鈕級別,您可以自定義角色并分配權限,系統(tǒng)適合設計精確的權限約束需求。
1.2 項目錄屏
二、功能模塊
2.1 用戶
- 用戶登錄和注冊功能。
- 資訊功能:用戶可以任意瀏覽資訊列表和詳細信息菜品庫:支持通過查詢來查找所需要菜品。
- 菜品信息:擊到菜品詳情頁面,可以查看菜品介紹、圖片、價格、銷售、已購買戶評論。
- 菜品收藏:在操作信息.詳情,下方點擊“收藏",進行收藏。
- 菜品選購:在菜品的詳情頁面,點擊“加入購物車”,也可以直接點擊“立即購買”菜品購物車:列出打算下單的菜品列表,支持數(shù)量增加和減小。
- 取消訂單:在“我的訂單”列表中,針對沒有付款的訂單,點擊“取消申請",刪除訂單去付款::在“我的訂單”咧表中,點擊“去付款”,模擬付款。
- 留言:填寫留言的內容,提交到網站管理后臺。
2.2 管理員
- 會員列表:查看所有注冊會員信息,支持冊除錄入資訊:錄入資訊標題、內容等信息。
- 管理資訊:查看已錄入資訊列表,支持刪除和修改留言列表:所有用戶留言信息列表,支持冊除。
- 菜品分類管理:支持錄入、查看、修改和冊除已有分類。
- 菜品錄入:選擇菜品分類、錄入菜品名稱、庫存、已銷售、價格、上傳菜品圖片、填寫菜品介紹。
- 菜品管理:查看所有已經錄入的菜品信息、支持修改和冊除。
- 菜品訂單:查看所有用戶下單的訂單信息,包括下單時間、費用、用戶信息、訂單菜品信息和備注等。
- 訂單處理:處理菜品信息等。
三、系統(tǒng)展示
四、核心代碼
4.1 查詢菜品類型
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查詢菜品類型")
public Result<IPage<DishType>> getByPage(@ModelAttribute DishType dishType ,@ModelAttribute PageVo page){
QueryWrapper<DishType> qw = new QueryWrapper<>();
if(!ZwzNullUtils.isNull(dishType.getTitle())) {
qw.like("title",dishType.getTitle());
}
if(!ZwzNullUtils.isNull(dishType.getStatus())) {
qw.eq("status",dishType.getStatus());
}
IPage<DishType> data = iDishTypeService.page(PageUtil.initMpPage(page),qw);
return new ResultUtil<IPage<DishType>>().setData(data);
}
4.2 查詢菜品
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查詢菜品")
public Result<IPage<DishVariety>> getByPage(@ModelAttribute DishVariety dishVariety ,@ModelAttribute PageVo page){
QueryWrapper<DishVariety> qw = new QueryWrapper<>();
if(!ZwzNullUtils.isNull(dishVariety.getTitle())) {
qw.like("title",dishVariety.getTitle());
}
if(!ZwzNullUtils.isNull(dishVariety.getType())) {
qw.eq("type",dishVariety.getType());
}
if(!ZwzNullUtils.isNull(dishVariety.getContent())) {
qw.like("content",dishVariety.getContent());
}
IPage<DishVariety> data = iDishVarietyService.page(PageUtil.initMpPage(page),qw);
User currUser = securityUtil.getCurrUser();
for (DishVariety vo : data.getRecords()) {
QueryWrapper<DishCollect> collQw = new QueryWrapper<>();
collQw.eq("collect_id",currUser.getId());
collQw.eq("dish_id",vo.getId());
vo.setCollectFlag(iDishCollectService.count(collQw));
QueryWrapper<DishOrder> orderQw = new QueryWrapper<>();
orderQw.eq("dish_id",vo.getId());
orderQw.eq("status","已加購");
orderQw.last("limit 1");
DishOrder order = iDishOrderService.getOne(orderQw);
vo.setBuyNumber(order == null ? BigDecimal.ZERO : order.getNumber());
}
return new ResultUtil<IPage<DishVariety>>().setData(data);
}
4.3 加購菜品
@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "加購")
public Result<DishOrder> addOne(@RequestParam String id, @RequestParam BigDecimal number){
DishVariety dish = iDishVarietyService.getById(id);
if(dish == null) {
return ResultUtil.error("菜品不存在");
}
User currUser = securityUtil.getCurrUser();
QueryWrapper<DishOrder> qw = new QueryWrapper<>();
qw.eq("dish_id",dish.getId());
qw.eq("status","已加購");
qw.eq("order_id",currUser.getId());
qw.last("limit 1");
DishOrder order = iDishOrderService.getOne(qw);
if(order != null) {
order.setNumber(order.getNumber().add(number));
iDishOrderService.saveOrUpdate(order);
return ResultUtil.success();
}
DishOrder o = new DishOrder();
o.setDishId(dish.getId());
o.setTitle(dish.getTitle());
o.setType(dish.getType());
o.setContent(dish.getContent());
o.setImage(dish.getImage());
o.setPrice(dish.getPrice());
o.setStatus("已加購");
o.setNumber(number);
o.setOrderId(currUser.getId());
o.setOrderName(currUser.getNickname());
o.setOrderTime(DateUtil.now());
iDishOrderService.saveOrUpdate(o);
return ResultUtil.success();
}
4.4 新增菜品收藏
@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "新增收藏")
public Result<DishCollect> addOne(@RequestParam String id){
DishVariety dish = iDishVarietyService.getById(id);
if(dish == null) {
return ResultUtil.error("菜品不存在");
}
User currUser = securityUtil.getCurrUser();
QueryWrapper<DishCollect> qw = new QueryWrapper<>();
qw.eq("dish_id",id);
qw.eq("collect_id",currUser.getId());
if(iDishCollectService.count(qw) > 0L) {
return ResultUtil.success();
}
DishCollect dishCollect = new DishCollect();
dishCollect.setDishId(dish.getId());
dishCollect.setTitle(dish.getTitle());
dishCollect.setType(dish.getType());
dishCollect.setContent(dish.getContent());
dishCollect.setImage(dish.getImage());
dishCollect.setPrice(dish.getPrice());
dishCollect.setCollectId(currUser.getId());
dishCollect.setCollectName(currUser.getNickname());
dishCollect.setCollectTime(DateUtil.now());
iDishCollectService.saveOrUpdate(dishCollect);
return ResultUtil.success();
}
4.5 新增菜品留言
@RequestMapping(value = "/insert", method = RequestMethod.POST)
@ApiOperation(value = "新增菜品留言")
public Result<Message> insert(Message message){
User currUser = securityUtil.getCurrUser();
message.setUserId(currUser.getId());
message.setUserName(currUser.getNickname());
message.setUserTime(DateUtil.now());
message.setReplyContent("");
message.setReplyName("");
message.setReplyTime("");
message.setReplyId("");
iMessageService.saveOrUpdate(message);
return new ResultUtil<Message>().setData(message);
}
五、免責說明
- 本項目僅供個人學習使用,商用授權請聯(lián)系博主,否則后果自負。
- 博主擁有本軟件構建后的應用系統(tǒng)全部內容所有權及獨立的知識產權,擁有最終解釋權。
- 如有問題,歡迎在倉庫 Issue 留言,看到后會第一時間回復,相關意見會酌情考慮,但沒有一定被采納的承諾或保證。
下載本系統(tǒng)代碼或使用本系統(tǒng)的用戶,必須同意以下內容,否則請勿下載!文章來源:http://www.zghlxwxcb.cn/news/detail-821143.html
- 出于自愿而使用/開發(fā)本軟件,了解使用本軟件的風險,且同意自己承擔使用本軟件的風險。
- 利用本軟件構建的網站的任何信息內容以及導致的任何版權糾紛和法律爭議及后果和博主無關,博主對此不承擔任何責任。
- 在任何情況下,對于因使用或無法使用本軟件而導致的任何難以合理預估的損失(包括但不僅限于商業(yè)利潤損失、業(yè)務中斷與業(yè)務信息丟失),博主概不承擔任何責任。
- 必須了解使用本軟件的風險,博主不承諾提供一對一的技術支持、使用擔保,也不承擔任何因本軟件而產生的難以預料的問題的相關責任。
文章來源地址http://www.zghlxwxcb.cn/news/detail-821143.html
到了這里,關于【開源】基于JAVA+Vue+SpringBoot的農家樂訂餐系統(tǒng)的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!