|
|
@ -350,11 +350,11 @@ class NotifyController extends BaseController |
|
|
$orderChildren = Order::query()->where(['order_main_id' => $orderMain->global_order_id])->get()->toArray(); |
|
|
$orderChildren = Order::query()->where(['order_main_id' => $orderMain->global_order_id])->get()->toArray(); |
|
|
$orderGoods = OrderGoods::query() |
|
|
$orderGoods = OrderGoods::query() |
|
|
// ->where(['activity_type' => 2])
|
|
|
// ->where(['activity_type' => 2])
|
|
|
->whereIn('order_id', array_values(array_column($orderChildren, 'id')))->get(); |
|
|
|
|
|
|
|
|
->whereIn('order_id', array_values(array_column($orderChildren, 'id')))->get()->toArray(); |
|
|
foreach ($orderGoods as $key => &$item) { |
|
|
foreach ($orderGoods as $key => &$item) { |
|
|
|
|
|
|
|
|
if ($item['activity_type'] == 2) { # 活动商品
|
|
|
if ($item['activity_type'] == 2) { # 活动商品
|
|
|
$this->goodsActivityService->clearCacheRecord($item['goods_id'], $item['number'], $orderMain->userId); |
|
|
|
|
|
|
|
|
$this->goodsActivityService->clearCacheRecord($item['goods_id'], $item['number'], $orderMain->user_id); |
|
|
$goods = GoodsActivity::find($item['goods_id']); |
|
|
$goods = GoodsActivity::find($item['goods_id']); |
|
|
} else { |
|
|
} else { |
|
|
$goods = Goods::find($item['goods_id']); |
|
|
$goods = Goods::find($item['goods_id']); |
|
|
|