Browse Source

维护订单完成时间字段

master
Lemon 5 years ago
parent
commit
f706bdd3ea
  1. 1
      app/Service/v3/Implementations/OrderOnlineService.php

1
app/Service/v3/Implementations/OrderOnlineService.php

@ -741,6 +741,7 @@ class OrderOnlineService implements OrderOnlineServiceInterface
{ {
$orderMain = $this->check($globalOrderId, $userId, OrderState::RECEIVING); $orderMain = $this->check($globalOrderId, $userId, OrderState::RECEIVING);
$orderMain->state = OrderState::COMPLETED; $orderMain->state = OrderState::COMPLETED;
$orderMain->complete_time = time();
if (!$orderMain->save()) { if (!$orderMain->save()) {
throw new ErrorCodeException(ErrorCode::ORDER_COMPLETE_FAIL); throw new ErrorCodeException(ErrorCode::ORDER_COMPLETE_FAIL);
} }

Loading…
Cancel
Save