排行榜
This commit is contained in:
@@ -152,15 +152,7 @@ class GiveGiftBases extends Model
|
||||
$endTime = $params['end_time'];
|
||||
|
||||
if (!$userId) {
|
||||
$this->error('用户ID不能为空');
|
||||
}
|
||||
|
||||
$cacheKey = "gift:user:stats:{$userId}:" . date('Ymd', $startTime) . '-' . date('Ymd', $endTime);
|
||||
$cachedData = Cache::get($cacheKey);
|
||||
|
||||
if ($cachedData !== false) {
|
||||
Log::info("从缓存获取用户统计: {$cacheKey}");
|
||||
$this->success('获取成功', $cachedData);
|
||||
return ['code'=>0,'msg'=>'用户ID不能为空','data'=>null];
|
||||
}
|
||||
|
||||
$where = ['user_id' => $userId];
|
||||
|
||||
Reference in New Issue
Block a user