feat : check

This commit is contained in:
2025-04-01 18:06:14 +08:00
parent 8f519262fd
commit e39d7a724b
3 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
<?php
/**
* This service file is part of item.
*
* @author ctexthuang
* @contact ctexthuang@qq.com
*/
declare(strict_types=1);
namespace App\Service\Amqp\Order;
use App\Constants\Common\OrderCode;
use App\Model\Order;
use Exception;
use Hyperf\Di\Annotation\Inject;
class GoodOrderFinishSuccessorService
{
/**
* @var int
*/
public int $orderId;
/**
* @var Order
*/
#[Inject]
protected Order $orderModel;
/**
* @var Order
*/
protected Order $orderInfo;
public function handle()
{
$this->orderInfo = $this->orderModel->find($this->orderId);
if (empty($this->orderInfo)) throw new Exception('订单不存在');
if ($this->orderInfo->status != OrderCode::FINISH) throw new Exception('订单状态错误');
$this->addOrderPoint();
$this->addInvite();
}
private function addOrderPoint()
{
}
private function addInvite()
{
}
}