feat : spu

This commit is contained in:
2025-03-26 16:55:31 +08:00
parent 87808f2c6e
commit b1f79620fb
8 changed files with 121 additions and 16 deletions

View File

@@ -213,13 +213,15 @@ abstract class BaseRefundOrderService
$this->refundInfo = new RefundOrder();
$this->refundInfo->user_id = $this->orderInfo->user_id;
$this->refundInfo->order_type = $this->type;
$this->refundInfo->order_type = OrderCode::ORDER_TYPE_GOOD;
$this->refundInfo->order_id = $this->orderId;
$this->refundInfo->pay_id = $this->payInfo->id;
$this->refundInfo->type = $this->type;
if ($this->type == RefundCode::PARTIAL_GOOD_REFUND) $this->refundInfo->good_ids = json_encode($this->orderGoodIds);
$this->refundInfo->refund_status = RefundCode::WAIT_REFUND;
$this->refundInfo->refund_money = $this->refundAmount;
$this->refundInfo->refund_type = $this->payInfo->recharge_type;
$this->refundInfo->refund_order_sno = $this->generateRefundOrderNo($this->type, $this->orderInfo->user_id);
$this->refundInfo->refund_order_sno = $this->generateRefundOrderNo(OrderCode::ORDER_TYPE_GOOD, $this->orderInfo->user_id);
$this->refundInfo->reason = $this->reason;
if (!$this->refundInfo->save()) throw new Exception('退款订单创建失败');