feat : refund
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user