@ -50,7 +50,7 @@ class ShopCartUpdateService implements ShopCartUpdateServiceInterface
throw new ErrorCodeException($goodsCheck);
}
return ShoppingCart::query()->updateOrCreate(
return ShoppingCart::query()->lockForUpdate()->updateOrCreate(
[
'user_id' => $userId,
'goods_id' => $goodsId,