feat : kitchen

This commit is contained in:
2024-11-08 16:27:25 +08:00
parent 79782dbb4e
commit c491fb79d8
15 changed files with 727 additions and 25 deletions

View File

@@ -30,4 +30,13 @@ class CommonRedisKey
{
return '__system:deleteOssImgList:oss_id';
}
/**
* 获取激活的站点列表
* @return string
*/
public static function getActivateSiteList(): string
{
return '__system:activate:site:list';
}
}

View File

@@ -492,17 +492,63 @@ class RedisCache
* 加入有序集合
* @param $key
* @param $score
* @param $value
* @param string $poolName
* @param ...$value
* @return false|int|Redis
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws RedisException
*/
public function zAdd($key, $score, string $poolName = 'default', ...$value)
public function zAdd($key, $score, $value, string $poolName = 'default'): false|int|Redis
{
return $this->getRedis($poolName)->zAdd($key, $score, ...$value);
return $this->getRedis($poolName)->zAdd($key, $score, $value);
}
/**
* @param $key
* @param $value
* @param string $poolName
* @return false|int|Redis
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws RedisException
*/
public function zRem($key, $value, string $poolName = 'default'): false|int|Redis
{
return $this->getRedis($poolName)->zRem($key, $value);
}
// +--------------------------------------------------------------------------------------------------------------------------------------------
// | geo
// +--------------------------------------------------------------------------------------------------------------------------------------------
/**
* @param $key
* @param $lng
* @param $lat
* @param $value
* @param string $poolName
* @return false|int|Redis
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws RedisException
*/
public function geoAdd($key, $lng, $lat, $value, string $poolName = 'default'): false|int|Redis
{
return $this->getRedis($poolName)->geoAdd($key, $lng, $lat, $value);
}
/**
* @param $key
* @param $value1
* @param $value2
* @param string $unit [m|km|ft|mi]
* @param string $poolName
* @return false|int|Redis
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws RedisException
*/
public function geoDist($key, $value1, $value2, string $unit = 'km', string $poolName = 'default'): false|int|Redis
{
return $this->getRedis($poolName)->geoDist($key, $value1, $value2, $unit);
}
}