Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
f41472bc
Commit
f41472bc
authored
Aug 09, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推荐列表 fix
parent
7e0f2f69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+1
-1
RecommendService.java
...in/java/com/tanpu/community/service/RecommendService.java
+1
-1
No files found.
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
f41472bc
...
@@ -408,7 +408,7 @@ public class ThemeManager {
...
@@ -408,7 +408,7 @@ public class ThemeManager {
LocalDateTime
firstThemeTime
=
LocalDateTime
.
now
();
LocalDateTime
firstThemeTime
=
LocalDateTime
.
now
();
if
(
req
.
page
.
pageNumber
>
1
)
{
if
(
req
.
page
.
pageNumber
>
1
)
{
String
l
=
redisCache
.
get
(
"queryThemes_"
+
req
.
ident
);
String
l
=
redisCache
.
get
(
"queryThemes_"
+
req
.
ident
);
if
(
StringUtils
.
isBlank
(
l
))
{
if
(
!
StringUtils
.
isBlank
(
l
))
{
excludeIds
=
JsonUtil
.
toBean
(
l
,
new
TypeReference
<
List
<
String
>>()
{
excludeIds
=
JsonUtil
.
toBean
(
l
,
new
TypeReference
<
List
<
String
>>()
{
});
});
firstThemeTime
=
themeService
.
queryByThemeIdIgnoreDelete
(
excludeIds
.
get
(
0
)).
getCreateTime
();
firstThemeTime
=
themeService
.
queryByThemeIdIgnoreDelete
(
excludeIds
.
get
(
0
)).
getCreateTime
();
...
...
community-service/src/main/java/com/tanpu/community/service/RecommendService.java
View file @
f41472bc
...
@@ -66,7 +66,7 @@ public class RecommendService {
...
@@ -66,7 +66,7 @@ public class RecommendService {
List
<
String
>
newThemeIds
=
getNewestThemes
().
stream
()
List
<
String
>
newThemeIds
=
getNewestThemes
().
stream
()
.
filter
(
theme
->
{
.
filter
(
theme
->
{
// 暂时不过滤用户自己发的 !userId.equals(theme.getAuthorId());
// 暂时不过滤用户自己发的 !userId.equals(theme.getAuthorId());
return
!
excludeIds
.
contains
(
theme
.
getThemeId
())
&&
theme
.
getMinutesTillNow
()
<
margin
;
return
!
excludeIds
.
contains
(
theme
.
getThemeId
())
&&
theme
.
getMinutesTillNow
()
>
margin
;
})
})
.
map
(
ThemeAnalysDO:
:
getThemeId
).
collect
(
Collectors
.
toList
());
.
map
(
ThemeAnalysDO:
:
getThemeId
).
collect
(
Collectors
.
toList
());
newThemeIds
=
BizUtils
.
subList
(
newThemeIds
,
0
,
pageSize
);
newThemeIds
=
BizUtils
.
subList
(
newThemeIds
,
0
,
pageSize
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment