feat : check

This commit is contained in:
2025-04-01 16:41:34 +08:00
parent 4eda8d4273
commit c6e9296bb5

View File

@@ -110,7 +110,7 @@ trait PrintTrait
*/ */
protected function closePrint(): void 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); $this->redis->hSet($this->printKey, $this->logInfo->id, CateringCode::REDIS_FINISH_VALUE);
} }
@@ -122,7 +122,7 @@ trait PrintTrait
*/ */
protected function checkIsPrint(): bool 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 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); $this->redis->hSet($this->stopOrderKey, $this->logInfo->site_id, CateringCode::REDIS_FINISH_VALUE);
} }
@@ -235,7 +235,7 @@ trait PrintTrait
*/ */
protected function isBuildPickupCode(): bool 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; return false;
} }
@@ -247,7 +247,7 @@ trait PrintTrait
*/ */
protected function buildPickupCodeCache(): void 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); $this->redis->hSet($this->pickupCodeKey, $this->logInfo->id, CateringCode::REDIS_FINISH_VALUE);
} }
@@ -269,7 +269,7 @@ trait PrintTrait
*/ */
protected function isCateringByCache(): bool 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; return false;
} }
@@ -281,7 +281,7 @@ trait PrintTrait
*/ */
protected function joinCateringCache(): void 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); $this->redis->hSet($this->isCateringKey, $this->logInfo->id, CateringCode::REDIS_FINISH_VALUE);
} }
@@ -323,7 +323,7 @@ trait PrintTrait
*/ */
protected function closeMealSite(): void 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); $this->redis->hSet($this->stopMealOrderKey, $this->logInfo->site_id, CateringCode::REDIS_FINISH_VALUE);
} }