diff --git a/app/Cache/Redis/Admin/PrinterCache.php b/app/Cache/Redis/Admin/PrinterCache.php index 8f14412..2517923 100644 --- a/app/Cache/Redis/Admin/PrinterCache.php +++ b/app/Cache/Redis/Admin/PrinterCache.php @@ -53,7 +53,7 @@ class PrinterCache private function __initPrinterListData(): void { $printerList = $this->printerModel->get(); -var_dump($printerList->isEmpty()); + if ($printerList->isEmpty()) return; $ylyPrinterList = []; diff --git a/app/Service/Admin/Catering/Option/CateringService.php b/app/Service/Admin/Catering/Option/CateringService.php index 0a542a3..f13e431 100644 --- a/app/Service/Admin/Catering/Option/CateringService.php +++ b/app/Service/Admin/Catering/Option/CateringService.php @@ -347,7 +347,7 @@ class CateringService extends CateringBaseService $orderGoodArr = $orderGoodArr->toArray(); $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('用户数据丢失,请联系管理员'); $userInfos = array_column($userInfos->toArray(),null,'id');