feat : refund and catering
This commit is contained in:
@@ -9,6 +9,8 @@ use App\Service\ServiceTrait\Api\GoodOrderTrait;
|
||||
use App\Service\ServiceTrait\Api\OrderTrait;
|
||||
use App\Service\ServiceTrait\Api\PayFinishTrait;
|
||||
use App\Service\ServiceTrait\Api\RefundOrderTrait;
|
||||
use App\Service\ServiceTrait\CateringTrait;
|
||||
use App\Service\ServiceTrait\Common\OrderChangeStatusTrait;
|
||||
use Hyperf\DbConnection\Db;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
@@ -22,7 +24,9 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService
|
||||
GoodOrderTrait,
|
||||
PayFinishTrait,
|
||||
RefundOrderTrait,
|
||||
OrderTrait;
|
||||
OrderTrait,
|
||||
OrderChangeStatusTrait,
|
||||
CateringTrait;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -55,6 +59,11 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService
|
||||
*/
|
||||
protected mixed $refundInfo;
|
||||
|
||||
/**
|
||||
* @var bool 是否加入配餐数据
|
||||
*/
|
||||
protected bool $isCatering = true;
|
||||
|
||||
/**
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
@@ -73,8 +82,13 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService
|
||||
$this->manageOrder();
|
||||
|
||||
$this->manageWxOrder();
|
||||
//
|
||||
$this->isCatering = $this->manageAddCateringLog();
|
||||
});
|
||||
|
||||
//已经截单 自动退款
|
||||
if (!$this->isCatering) $this->joinRefundQueue($this->orderId,OrderCode::ORDER_TYPE_GOOD,$this->orderInfo->actual_price,'已截单,系统自动退款');
|
||||
|
||||
//todo 发送订阅通知
|
||||
// $this->sendGainCoinMsg();
|
||||
|
||||
@@ -105,6 +119,8 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService
|
||||
$this->manageRefundOrder();
|
||||
|
||||
$this->manageOrderByRefund();
|
||||
|
||||
$this->manageSubCateringLog();
|
||||
});
|
||||
|
||||
$this->sendStockMq($this->orderInfo->id,$this->orderInfo->status);
|
||||
|
||||
Reference in New Issue
Block a user