|
|
|
@ -179,6 +179,7 @@ class OrderOnlineService implements OrderOnlineServiceInterface |
|
|
|
$dataOrderGoods = []; # 订单商品
|
|
|
|
$storeTypeIds = []; # 订单中的商户类型,用于校验红包
|
|
|
|
$activityGoodsIds = []; # 活动商品IDs
|
|
|
|
$shopcartIds = []; |
|
|
|
|
|
|
|
foreach ($storeList as $key => &$storeItem) { |
|
|
|
|
|
|
|
@ -199,6 +200,7 @@ class OrderOnlineService implements OrderOnlineServiceInterface |
|
|
|
|
|
|
|
// 用户购物车数据
|
|
|
|
$cartIds = explode(',', $storeItem->cart_ids); |
|
|
|
$shopcartIds = array_merge($shopcartIds, $cartIds); |
|
|
|
$carts = ShoppingCart::query()->whereIn('id', $cartIds)->where(['market_id' => $marketId, 'user_id' => $userId])->get(); |
|
|
|
foreach ($carts as $k => &$cart) { |
|
|
|
// 查个商品,做商品有效的判断检查
|
|
|
|
@ -393,7 +395,7 @@ class OrderOnlineService implements OrderOnlineServiceInterface |
|
|
|
} |
|
|
|
|
|
|
|
// 清除购物车
|
|
|
|
$this->shopCartUpdateService->doClear($userId, $marketId); |
|
|
|
$this->shopCartUpdateService->doClear($userId, $marketId, $shopcartIds); |
|
|
|
|
|
|
|
// 记录badge
|
|
|
|
$this->badgeService->doByOrder($userId, array_values(array_column($dataChildren, 'store_id')), $orderMain->global_order_id, OrderState::UNPAID); |
|
|
|
|