Commit 326d99ba 326d99bacbe60362b813a69fa6a2ef91ce0f5a58 by 杨俊

fix(develop): 修复报错

1 parent 74c0cec8
......@@ -49,10 +49,12 @@ public function publicAudition(Request $request)
//查询符合条件活动
$data = $query->get(['id']);
//插入有序集合中
if ($data->isNotEmpty()){
Redis::client()->del($key);
Redis::client()->zAdd($key, ...$data->map(fn(ActivitySubmitWork $item) => [random_int(50, 200), $item->getKey()])->flatten()->toArray());
Redis::client()->expire($key, 2 * 60 * 60);
}
}
$recommendIds = Redis::client()->zRevRange($key, $startIndex, $endIndex);
$data = $query->with(['activity:id,song_name,sub_title,cover', 'user:id,nick_name,real_name,avatar', 'user.styleTags:id,name'])
......