feat : spu
This commit is contained in:
@@ -165,7 +165,7 @@ abstract class BaseRefundOrderService
|
|||||||
|
|
||||||
private function getBalanceRefundAmount(): float
|
private function getBalanceRefundAmount(): float
|
||||||
{
|
{
|
||||||
$isRefundMoney = $this->refundOrderModel->getAllMoneyByOrderId($this->refundInfo->order_id,$this->refundInfo->order_type);
|
$isRefundMoney = $this->refundOrderModel->getAllMoneyByOrderId($this->orderInfo->id,OrderCode::ORDER_TYPE_GOOD);
|
||||||
|
|
||||||
return $this->payInfo->pay_money - $isRefundMoney;
|
return $this->payInfo->pay_money - $isRefundMoney;
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ abstract class BaseRefundOrderService
|
|||||||
*/
|
*/
|
||||||
private function getFullGoodRefundAmount(): float
|
private function getFullGoodRefundAmount(): float
|
||||||
{
|
{
|
||||||
$isRefundMoney = $this->refundOrderModel->getAllMoneyByOrderId($this->refundInfo->order_id,$this->refundInfo->order_type);
|
$isRefundMoney = $this->refundOrderModel->getAllMoneyByOrderId($this->orderInfo->id,OrderCode::ORDER_TYPE_GOOD);
|
||||||
|
|
||||||
// 部分退款会验证 pay_money != order_money throw error 所以不需要判断
|
// 部分退款会验证 pay_money != order_money throw error 所以不需要判断
|
||||||
return $this->payInfo->pay_money - $isRefundMoney;
|
return $this->payInfo->pay_money - $isRefundMoney;
|
||||||
@@ -194,7 +194,7 @@ abstract class BaseRefundOrderService
|
|||||||
// 部分退款 不支持 价格不一致
|
// 部分退款 不支持 价格不一致
|
||||||
if ($this->payInfo->pay_money != $this->orderInfo->actual_price) throw new Exception('价格不一致的订单无法部分退款');
|
if ($this->payInfo->pay_money != $this->orderInfo->actual_price) throw new Exception('价格不一致的订单无法部分退款');
|
||||||
|
|
||||||
$isRefundMoney = $this->refundOrderModel->getSuccessMoneyByOrderId($this->refundInfo->order_id,$this->refundInfo->order_type);
|
$isRefundMoney = $this->refundOrderModel->getSuccessMoneyByOrderId($this->orderInfo->id,OrderCode::ORDER_TYPE_GOOD);
|
||||||
|
|
||||||
return floatval(min($this->payInfo->pay_money - $isRefundMoney,$this->totalGoodsPrice));
|
return floatval(min($this->payInfo->pay_money - $isRefundMoney,$this->totalGoodsPrice));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user