feat : spu

This commit is contained in:
2025-03-26 16:55:31 +08:00
parent 87808f2c6e
commit b1f79620fb
8 changed files with 121 additions and 16 deletions

View File

@@ -9,12 +9,15 @@ use App\Model\OrderMealCateringLog;
use App\Model\OrderOptionCateringLog;
use App\Model\Sku;
use App\Model\Spu;
use App\Service\ServiceTrait\Common\CycleTrait;
use Hyperf\Di\Annotation\Inject;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
trait CateringTrait
{
use CycleTrait;
/**
* @var OrderOptionCateringLog
*/
@@ -54,6 +57,8 @@ trait CateringTrait
*/
private function manageSubCateringLog(): void
{
if (!$this->rollBackStockFlag) return;
match ($this->orderInfo->type) {
OrderCode::ORDER_TYPE_MEAL => $this->manageSubMealCateringLog(),
OrderCode::ORDER_TYPE_OPTIONAL => $this->manageSubOptionCateringLog(),