feat : catering
This commit is contained in:
@@ -12,6 +12,7 @@ namespace App\Service\Admin\Catering\Print;
|
||||
|
||||
use App\Exception\ErrException;
|
||||
use App\Lib\Print\YlyBasicsLib;
|
||||
use App\Model\Printer;
|
||||
use Hyperf\Di\Annotation\Inject;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
@@ -45,13 +46,18 @@ class YlyPrintService implements PrintOrderInterface
|
||||
*/
|
||||
private string $content;
|
||||
|
||||
|
||||
/**
|
||||
* @var YlyBasicsLib
|
||||
*/
|
||||
#[Inject]
|
||||
protected YlyBasicsLib $ylyBasicsLib;
|
||||
|
||||
/**
|
||||
* @var Printer
|
||||
*/
|
||||
#[Inject]
|
||||
protected Printer $printerModel;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws ContainerExceptionInterface
|
||||
@@ -60,7 +66,7 @@ class YlyPrintService implements PrintOrderInterface
|
||||
public function handle(): void
|
||||
{
|
||||
//todo 加入打印机验证 orderOptionCateringLogModel
|
||||
$printInfo = $this->orderOptionCateringLogModel->where('id',$this->printId)->first();
|
||||
$printInfo = $this->printerModel->where('id',$this->printId)->first();
|
||||
|
||||
if (empty($printInfo)) throw new ErrException('打印机不存在-1');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user