收货重复记录订单状态修复

This commit is contained in:
吴昊天 2023-02-18 14:10:54 +08:00
parent 3a12ad7b61
commit 2e0326b5d9

View File

@ -65,15 +65,7 @@ class StoreOrderTakeServices extends BaseServices
throw new ApiException(410266);
}
$order->status = 2;
/** @var StoreOrderStatusServices $statusService */
$statusService = app()->make(StoreOrderStatusServices::class);
$res = $order->save() && $statusService->save([
'oid' => $order['id'],
'change_type' => 'user_take_delivery',
'change_message' => '用户已收货',
'change_time' => time()
]);
$res = $res && $this->storeProductOrderUserTakeDelivery($order);
$res = $order->save() && $this->storeProductOrderUserTakeDelivery($order);
if (!$res) {
throw new ApiException(410205);
}