feat : refund

This commit is contained in:
2025-03-27 10:11:27 +08:00
parent 24d9630f51
commit 1265bdcce9

View File

@@ -98,8 +98,8 @@ trait RefundOrderTrait
if (!$this->orderInfo->save()) throw new Exception('更新退款订单失败');
match ($this->refundInfo->type) {
RefundCode::FULL_GOOD_REFUND => $this->orderGoodModel->where('order_id',$this->refundInfo->order_id)->update(['refund_status' => OrderCode::FINISH_REFUND]),
RefundCode::PARTIAL_GOOD_REFUND => $this->orderGoodModel->whereIn('id',json_decode($this->refundInfo->good_ids,true))->update(['refund_status' => OrderCode::FINISH_REFUND]),
RefundCode::FULL_GOOD_REFUND => $this->orderGoodModel->where('order_id',$this->refundInfo->order_id)->update(['status' => OrderCode::FINISH_REFUND]),
RefundCode::PARTIAL_GOOD_REFUND => $this->orderGoodModel->whereIn('id',json_decode($this->refundInfo->good_ids,true))->update(['status' => OrderCode::FINISH_REFUND]),
};
}catch (Exception $e) {