Browse Source

Merge branch 'phoenix' of http://120.24.33.109:11081/hyzjshwo/lanzu_api_hyperf into phoenix

master
Lemon 6 years ago
parent
commit
7c3810f974
  1. 2
      app/Service/v3/Implementations/OrderListService.php
  2. 8
      app/Service/v3/Implementations/OrderOnlineService.php
  3. 2
      app/Service/v3/Implementations/PaymentService.php

2
app/Service/v3/Implementations/OrderListService.php

@ -197,7 +197,7 @@ class OrderListService implements OrderListServiceInterface
public function autoCancel($userId)
{
return OrderMain::query()
->where(['user_id' => $userId])
->where(['user_id' => $userId, 'state' => OrderState::UNPAID])
->where('created_at', '<', time()-900)
->update(['state' => OrderState::CANCELED]);
}

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

@ -209,9 +209,9 @@ class OrderOnlineService implements OrderOnlineServiceInterface
'price' => $goods->price,
'original_price' => $goods->original_price,
'vip_price' => $goods->vip_price,
'name' => $goods->name,
'goods_unit' => $goods->goods_unit,
'cover_img' => $goods->cover_img,
'name' => $goods->name ?: '',
'goods_unit' => $goods->goods_unit ?: '',
'cover_img' => $goods->cover_img ?: '',
'spec' => json_encode($goods->spec),
];
}
@ -346,7 +346,7 @@ class OrderOnlineService implements OrderOnlineServiceInterface
} catch (Exception $e) {
Db::rollBack();
$this->log->event(LogLabel::ORDER_ONLINE_LOG, ['msg' => $e->getMessage()]);
throw new ErrorCodeException(ErrorCode::ORDER_ONLINE_FAIL, $e->getMessage());
throw new ErrorCodeException(ErrorCode::ORDER_ONLINE_FAIL);
}
}

2
app/Service/v3/Implementations/PaymentService.php

@ -142,7 +142,7 @@ class PaymentService implements PaymentServiceInterface
throw new ErrorCodeException(ErrorCode::REFUND_PAYMENT_FAIL,$result['err_code_des']);
}
} catch (\Exception $e) {
$this->log->event(LogLabel::ORDER_PAYMENT_LOG, ['payment_do_exception_msg' => $e->getMessage()]);
$this->log->event(LogLabel::ORDER_REFUND_LOG, ['payment_do_exception_msg' => $e->getMessage()]);
throw new ErrorCodeException(ErrorCode::REFUND_PAYMENT_FAIL, '[退款失败]'.$e->getMessage());
}

Loading…
Cancel
Save