feat : spu
This commit is contained in:
@@ -15,6 +15,7 @@ use App\Constants\Admin\CateringCode;
|
||||
use App\Exception\ErrException;
|
||||
use App\Model\OrderOptionCateringLog;
|
||||
use App\Service\Admin\Catering\CateringBaseService;
|
||||
use App\Service\Admin\Catering\Print\PrintOrderFactory;
|
||||
use App\Service\ServiceTrait\Admin\Catering\PrintTrait;
|
||||
use Hyperf\Di\Annotation\Inject;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
@@ -77,4 +78,25 @@ class PrintService extends CateringBaseService
|
||||
|
||||
return $this->return->success('success', ['status' => $res]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @var PrintOrderFactory
|
||||
*/
|
||||
#[Inject]
|
||||
protected PrintOrderFactory $printOrderFactory;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function cancel(): array
|
||||
{
|
||||
$service = $this->printOrderFactory->handle($this->request->input('type'));
|
||||
$service->printId = (int)$this->request->input('print_id');
|
||||
$service->handle();
|
||||
$service->printCancel();
|
||||
|
||||
return $this->return->success('success');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user