feat : spu
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user