make(StoreOrderStatusServices::class); $statusData = $statusService->getColumn(['oid' => $oid], '*'); if (!$statusData) { return true; } $ids = []; if ($orderInfo['id'] != $oid) { $ids[] = $orderInfo['id']; } if ($otherOrder['id'] != $oid) { $ids[] = $otherOrder['id']; } if ($ids) { $allData = []; foreach ($ids as $id) { foreach ($statusData as $data) { $data['oid'] = $id; $allData[] = $data; } } if ($allData) { $statusService->saveAll($allData); } } } catch (\Throwable $e) { Log::error('处理拆分订单记录失败,原因:' . $e->getMessage()); } return true; } }