Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
PaoPao
/
serviceWork
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
326d99ba
...
326d99bacbe60362b813a69fa6a2ef91ce0f5a58
authored
2024-05-27 16:12:38 +0800
by
杨俊
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(develop): 修复报错
1 parent
74c0cec8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
app/Http/Container/AppSection/Controllers/IndexController.php
app/Http/Container/AppSection/Controllers/IndexController.php
View file @
326d99b
...
...
@@ -49,9 +49,11 @@ public function publicAudition(Request $request)
//查询符合条件活动
$data
=
$query
->
get
([
'id'
]);
//插入有序集合中
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
);
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
);
...
...
Please
register
or
sign in
to post a comment