From c6e9296bb56c23fd4e91bddd4c366d9288dab444 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Tue, 1 Apr 2025 16:41:34 +0800 Subject: [PATCH] feat : check --- .../ServiceTrait/Admin/Catering/PrintTrait.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Service/ServiceTrait/Admin/Catering/PrintTrait.php b/app/Service/ServiceTrait/Admin/Catering/PrintTrait.php index b536885..02dbd82 100644 --- a/app/Service/ServiceTrait/Admin/Catering/PrintTrait.php +++ b/app/Service/ServiceTrait/Admin/Catering/PrintTrait.php @@ -110,7 +110,7 @@ trait PrintTrait */ protected function closePrint(): void { - if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->printKey, $this->logInfo->id)) return; + if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->printKey, (string)$this->logInfo->id)) return; $this->redis->hSet($this->printKey, $this->logInfo->id, CateringCode::REDIS_FINISH_VALUE); } @@ -122,7 +122,7 @@ trait PrintTrait */ protected function checkIsPrint(): bool { - return CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->printKey, $this->logInfo->id); + return CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->printKey, (string)$this->logInfo->id); } /** @@ -132,7 +132,7 @@ trait PrintTrait */ protected function closeSite(): void { - if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->stopOrderKey, $this->logInfo->site_id)) return; + if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->stopOrderKey, (string)$this->logInfo->site_id)) return; $this->redis->hSet($this->stopOrderKey, $this->logInfo->site_id, CateringCode::REDIS_FINISH_VALUE); } @@ -235,7 +235,7 @@ trait PrintTrait */ protected function isBuildPickupCode(): bool { - if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->pickupCodeKey, $this->logInfo->id)) return true; + if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->pickupCodeKey, (string)$this->logInfo->id)) return true; return false; } @@ -247,7 +247,7 @@ trait PrintTrait */ protected function buildPickupCodeCache(): void { - if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->pickupCodeKey, $this->logInfo->id)) return; + if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->pickupCodeKey, (string)$this->logInfo->id)) return; $this->redis->hSet($this->pickupCodeKey, $this->logInfo->id, CateringCode::REDIS_FINISH_VALUE); } @@ -269,7 +269,7 @@ trait PrintTrait */ protected function isCateringByCache(): bool { - if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->isCateringKey, $this->logInfo->id)) return true; + if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->isCateringKey, (string)$this->logInfo->id)) return true; return false; } @@ -281,7 +281,7 @@ trait PrintTrait */ protected function joinCateringCache(): void { - if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->isCateringKey, $this->logInfo->id)) return; + if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->isCateringKey, (string)$this->logInfo->id)) return; $this->redis->hSet($this->isCateringKey, $this->logInfo->id, CateringCode::REDIS_FINISH_VALUE); } @@ -323,7 +323,7 @@ trait PrintTrait */ protected function closeMealSite(): void { - if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->stopMealOrderKey, $this->logInfo->site_id)) return; + if (CateringCode::REDIS_FINISH_VALUE == $this->redis->hGet($this->stopMealOrderKey, (string)$this->logInfo->site_id)) return; $this->redis->hSet($this->stopMealOrderKey, $this->logInfo->site_id, CateringCode::REDIS_FINISH_VALUE); }