feat : spu
This commit is contained in:
63
app/Service/Amqp/Refund/RefundGoodOrderFinishService.php
Normal file
63
app/Service/Amqp/Refund/RefundGoodOrderFinishService.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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\Service\ServiceTrait\Api\CateringTrait;
|
||||
use App\Service\ServiceTrait\Api\CouponTrait;
|
||||
use App\Service\ServiceTrait\Api\OrderTrait;
|
||||
use App\Service\ServiceTrait\Api\RefundOrderTrait;
|
||||
use Hyperf\DbConnection\Db;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
class RefundGoodOrderFinishService
|
||||
{
|
||||
use RefundOrderTrait;
|
||||
use CateringTrait;
|
||||
use CouponTrait;
|
||||
use OrderTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public string $orderSno;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public int $payType;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public int $orderType;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
$this->checkRefundOrder();
|
||||
|
||||
Db::transaction(function (){
|
||||
$this->manageRefundOrder();
|
||||
|
||||
$this->manageOrderByRefund();
|
||||
|
||||
$this->manageSubCateringLog();
|
||||
|
||||
if ($this->orderInfo->coupin_id > 0) $this->rollbackCoupon(OrderCode::ORDER_TYPE_GOOD,$this->orderInfo);
|
||||
});
|
||||
|
||||
// $this->sendStockMq($this->orderInfo->id,$this->orderInfo->status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user