feat : spu

This commit is contained in:
2025-03-26 16:05:12 +08:00
parent 0c5ed8b1c5
commit 87808f2c6e
5 changed files with 206 additions and 2 deletions

View File

@@ -104,8 +104,8 @@ class GoodCache
$stockKey = ApiRedisKey::goodStockKey($this->cycleId,$this->kitchenId);
foreach ($this->stockArr as $one) {
$this->redis->zAdd($stockKey,$one['stock'],$one['id']);
$this->redis->expire($stockKey,$this->expireTime);
}
$this->redis->expire($stockKey,$this->expireTime);
}
}
@@ -167,7 +167,7 @@ class GoodCache
}
if (!empty($stockArr)) {
$this->stockArr = $stockArr;
$this->stockArr = array_merge($this->stockArr,$stockArr);
}
foreach ($list as &$item) {