feat : check
This commit is contained in:
@@ -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 = [];
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user