下单支持堂食外带, 增加餐位费, 多次下单功能

This commit is contained in:
2024-09-25 11:11:27 +08:00
parent 31b92e21c4
commit 0f702ecbe5
19 changed files with 576 additions and 47 deletions

View File

@@ -3,6 +3,7 @@ package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.entity.dto.ChoseCountDTO;
import com.chaozhanggui.system.cashierservice.entity.dto.QuerySpecDTO;
import com.chaozhanggui.system.cashierservice.service.CartService;
import com.chaozhanggui.system.cashierservice.service.ProductService;
@@ -10,6 +11,7 @@ import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@@ -94,6 +96,17 @@ public class ProductController {
return cartService.createCart(jsonObject);
}
/**
* 餐位费选择
* @return 餐位费信息
*/
@PostMapping("/choseCount")
public Result choseCount(
@Validated @RequestBody ChoseCountDTO choseCountDTO
) {
return Result.success(CodeEnum.SUCCESS, productService.choseCount(choseCountDTO));
}
@PostMapping("cleanCart")
public Result cleanCart(@RequestBody JSONObject jsonObject) {
log.info("清空购物车数据:{}", jsonObject);