feat : coupon

This commit is contained in:
2025-03-21 16:15:28 +08:00
parent 11a36ece80
commit 8a4674b1dc
11 changed files with 190 additions and 11 deletions

View File

@@ -81,7 +81,11 @@ trait GoodOrderTrait
$this->orderInfo->status = OrderCode::PAYED;
$this->orderInfo->pay_time = date('Y-m-d H:i:s');
if (!$this->orderInfo->save()) {
$updateGoods = $this->orderGoodModel->where('order_id',$this->orderInfo->id)->update([
'status' => OrderCode::PAYED,
]);
if (!$this->orderInfo->save() || !$updateGoods) {
$this->log->debug(__CLASS__.':Function:manageOrder:更新充值订单的状态失败:'.$this->orderInfo->id);
throw new ErrException('更新充值订单的状态失败');
}