feat : refund
This commit is contained in:
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Amqp\Refund;
|
||||
|
||||
use App\Constants\Common\RefundCode;
|
||||
use App\Event\RefundGoodOrderFinishEvent;
|
||||
use App\Lib\Log;
|
||||
use App\Model\Order;
|
||||
@@ -103,11 +104,23 @@ class RefundGoodOrderFinishService
|
||||
$this->manageSubCateringLog();
|
||||
});
|
||||
|
||||
if ($this->rollBackStockFlag) {
|
||||
$this->sendStockMq($this->orderInfo->id,$this->orderInfo->status);
|
||||
}
|
||||
|
||||
$this->eventDispatcher->dispatch(new RefundGoodOrderFinishEvent($this->orderInfo->id, $this->payInfo->id, $this->refundInfo->id));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
private function rollBackStock(): void
|
||||
{
|
||||
if (!$this->rollBackStockFlag) return;
|
||||
|
||||
//判断是不是用户行为才退库存
|
||||
if ($this->refundInfo->action_admin_id != 0) return;
|
||||
|
||||
$this->sendStockMq($this->orderInfo->id,$this->orderInfo->status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user