巡乐会抽奖接口提交.-锁表提示语修改
This commit is contained in:
@@ -805,7 +805,7 @@ function redis_lock_exit($key, $value = 1, $time = 5)
|
||||
$redis = \think\Cache::store('redis')->handler();
|
||||
$is_lock = $redis->setnx($key, $value);
|
||||
if (!$is_lock) {
|
||||
return V(0, '访问频繁,请稍后重试');
|
||||
return V(0, '您的手速太快了!');
|
||||
} else {
|
||||
$redis->setex($key, $time, $value);
|
||||
return true;
|
||||
@@ -827,7 +827,7 @@ function redis_lock_exits($key, $value = 1, $time = 5)
|
||||
// 尝试加锁(设置一个带过期时间的 key,仅当 key 不存在时才设置成功)
|
||||
$is_lock = Cache::has($key);
|
||||
if ($is_lock) {
|
||||
return V(0, '访问频繁,请稍后重试');
|
||||
return V(0, '您的手速太快了!');
|
||||
} else {
|
||||
Cache::set($key, $value, $time);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user