新增创建订单 切换就餐模式接口
This commit is contained in:
@@ -2,12 +2,16 @@ package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.annotation.LimitSubmit;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopTable;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.OrderDto;
|
||||
import com.chaozhanggui.system.cashierservice.service.CartService;
|
||||
import com.chaozhanggui.system.cashierservice.service.OrderService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.Utils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -24,6 +28,8 @@ public class OrderController {
|
||||
@Resource
|
||||
private OrderService orderService;
|
||||
private final CartService cartService;
|
||||
@Autowired
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
public OrderController(CartService cartService) {
|
||||
this.cartService = cartService;
|
||||
@@ -33,6 +39,7 @@ public class OrderController {
|
||||
* 添加订单
|
||||
* @return
|
||||
*/
|
||||
@LimitSubmit(key = "memeberIn:%s")
|
||||
@PostMapping("/creatOrder")
|
||||
public Result createOrder(@RequestBody JSONObject jsonObject){
|
||||
return cartService.createOrder(jsonObject);
|
||||
|
||||
Reference in New Issue
Block a user