feat : check

This commit is contained in:
2025-04-02 10:28:11 +08:00
parent 4276021041
commit 63dbcf5d67
2 changed files with 2 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ class PrinterCache
private function __initPrinterListData(): void private function __initPrinterListData(): void
{ {
$printerList = $this->printerModel->get(); $printerList = $this->printerModel->get();
var_dump($printerList->isEmpty());
if ($printerList->isEmpty()) return; if ($printerList->isEmpty()) return;
$ylyPrinterList = []; $ylyPrinterList = [];

View File

@@ -347,7 +347,7 @@ class CateringService extends CateringBaseService
$orderGoodArr = $orderGoodArr->toArray(); $orderGoodArr = $orderGoodArr->toArray();
$userIds = array_column($orderList,'user_id'); $userIds = array_column($orderList,'user_id');
$userInfos = $this->userModel->whereIn('id',$userIds)->select(['username', 'nickname', 'mobile', 'id'])->get(); $userInfos = $this->userModel->whereIn('id',$userIds)->select(['nickname', 'mobile', 'id'])->get();
if ($userInfos->isEmpty()) throw new ErrException('用户数据丢失,请联系管理员'); if ($userInfos->isEmpty()) throw new ErrException('用户数据丢失,请联系管理员');
$userInfos = array_column($userInfos->toArray(),null,'id'); $userInfos = array_column($userInfos->toArray(),null,'id');