$orderId]); try { $sheets = OrderSheet::where('join_sheet_order_id', $orderId)->select('join_sheet_goods_id', 'order_sheet_num')->get()->toArray(); foreach ($sheets as $sheet) { GoodsRunning::where('join_running_goods_id', $sheet['join_sheet_goods_id'])->increment('goods_running_sale', $sheet['order_sheet_num']); } } catch (\Exception $e) { Log::error("加销售量失败", ['msg' => $e->getMessage(), 'order_id' => $orderId]); } } }