fix(develop): 修复报错
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -90,7 +90,7 @@ public function bandList(Request $request) | ... | @@ -90,7 +90,7 @@ public function bandList(Request $request) |
90 | $data = $query->get(['id']); | 90 | $data = $query->get(['id']); |
91 | //插入有序集合中 | 91 | //插入有序集合中 |
92 | Redis::client()->del($key); | 92 | Redis::client()->del($key); |
93 | Redis::client()->zAdd($key, ...$data->map(fn(Project $item) => [random_int(50, 200), $item->getKey()])->flatten()->toArray()); | 93 | Redis::client()->zAdd($key, ...$data->map(fn(Project $item) => [random_int(50, 200), $item->getKey()])->flatten()->toArray() ?? []); |
94 | Redis::client()->expire($key, 2 * 60 * 60); | 94 | Redis::client()->expire($key, 2 * 60 * 60); |
95 | } | 95 | } |
96 | $recommendIds = Redis::client()->zRevRange($key, $startIndex, $endIndex); | 96 | $recommendIds = Redis::client()->zRevRange($key, $startIndex, $endIndex); | ... | ... |
-
Please register or sign in to post a comment