订单号命名修改

This commit is contained in:
谭凯凯
2024-10-14 18:28:18 +08:00
committed by Tankaikai
parent a968950295
commit b9a2c3db5c
3 changed files with 25 additions and 21 deletions

View File

@@ -2,7 +2,6 @@ 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.redis.RedisCst;
import com.chaozhanggui.system.cashierservice.service.CartService;
import com.chaozhanggui.system.cashierservice.service.OrderService;
@@ -37,7 +36,8 @@ public class OrderController {
* @return
*/
@PostMapping("/creatOrder")
public Result createOrder(@RequestBody JSONObject jsonObject){
public Result createOrder(@RequestHeader String environment, @RequestBody JSONObject jsonObject){
jsonObject.put("environment",environment);
return Utils.runFunAndCheckKey(() -> cartService.createOrder(jsonObject), stringRedisTemplate, RedisCst.getLockKey("CREATE_ORDER_KEY"));
// return orderService.createOrder(shopTable.getTableId(),shopTable.getShopId(),shopTable.getUserId());
}