Files
hyperf_service/app/Service/Amqp/Refund/GoodOrderAllRefundService.php
2025-02-21 19:10:58 +08:00

41 lines
732 B
PHP

<?php
/**
* This service file is part of item.
*
* @author ctexthuang
* @contact ctexthuang@qq.com
*/
declare(strict_types=1);
namespace App\Service\Amqp\Refund;
use App\Constants\Common\OrderCode;
use App\Model\Order;
use App\Model\PayOrder;
use Exception;
use Hyperf\Di\Annotation\Inject;
class GoodOrderAllRefundService extends RefundBaseService
{
/**
* @return void
*/
public function __construct()
{
$this->type = OrderCode::ORDER_TYPE_GOOD;
}
public function handle()
{
$this->getOrderInfo();
$this->getPayOrder();
$this->getRefundAmount();
if ($this->refundAmount <= 0) throw new Exception('退款金额不能小于等于0');
}
}