redis->exists($key,RedisCode::SYSTEM_DB)) return; $allData = $this->cycleModel->get(); if (empty($allData)) return; $allData = $allData->toArray(); foreach ($allData as $item) { $this->redis->zAdd($key, $item['id'],$item['dates'],RedisCode::SYSTEM_DB); } } /** * @param string $date * @return bool|float|\Redis * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function getCycleCache(string $date): float|bool|\Redis { $key = CommonRedisKey::getCycleList(); return $this->redis->zScore($key,$date,RedisCode::SYSTEM_DB); } }