记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
ee1181e7
Commit
ee1181e7
authored
Jun 19, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
本地演出双循环判断导致演出重复
parent
8d9bf58a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
KylinPerformancesServiceImpl.java
...vice/kylin/service/impl/KylinPerformancesServiceImpl.java
+8
-10
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinPerformancesServiceImpl.java
View file @
ee1181e7
...
@@ -65,6 +65,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -65,6 +65,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
// 判断搜索 处理新数据
// 判断搜索 处理新数据
List
<
KylinPerformanceVo
>
performancesListNew
=
new
ArrayList
<>();
List
<
KylinPerformanceVo
>
performancesListNew
=
new
ArrayList
<>();
List
<
String
>
performancesIds
=
new
ArrayList
<>();
for
(
KylinPerformanceVo
info
:
performancesList
)
{
for
(
KylinPerformanceVo
info
:
performancesList
)
{
boolean
isShow
=
true
;
boolean
isShow
=
true
;
if
(
type
>
0
)
{
if
(
type
>
0
)
{
...
@@ -78,35 +79,32 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -78,35 +79,32 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
}
}
}
}
if
(
isShow
)
{
if
(
isShow
)
{
performancesIds
.
add
(
info
.
getPerformancesId
());
performancesListNew
.
add
(
info
);
performancesListNew
.
add
(
info
);
}
}
}
}
// List<String> ids = Arrays.asList("");
// 推荐
// 推荐
int
is_native
=
1
;
int
is_native
=
1
;
int
recommend
=
performancesListNew
.
size
();
int
recommend
=
performancesListNew
.
size
();
List
<
KylinPerformanceVo
>
performancesListNewUnqui
=
new
ArrayList
<>();
performancesListNewUnqui
.
addAll
(
performancesListNew
);
if
(
recommend
<=
2
)
{
if
(
recommend
<=
2
)
{
List
<
KylinPerformanceVo
>
performancesListRecommend
=
dataUtils
.
getPerformancesListIsSystemRecommend
();
List
<
KylinPerformanceVo
>
performancesListRecommend
=
dataUtils
.
getPerformancesListIsSystemRecommend
();
/*List<KylinPerformanceVo> collect = performancesListRecommend.stream().filter(r -> !ids.contains(r.getPerformancesId())).collect(Collectors.toList());
performancesListNew.addAll(collect);*/
if
(!
CollectionUtils
.
isEmpty
(
performancesListRecommend
))
{
if
(!
CollectionUtils
.
isEmpty
(
performancesListRecommend
))
{
is_native
=
0
;
is_native
=
0
;
if
(
recommend
>
0
)
{
// 去重
if
(
recommend
>
0
)
{
// 去重
for
(
KylinPerformanceVo
recommendInfo
:
performancesListRecommend
)
{
List
<
KylinPerformanceVo
>
collect
=
performancesListRecommend
.
stream
().
filter
(
r
->
!
performancesIds
.
contains
(
r
.
getPerformancesId
())).
collect
(
Collectors
.
toList
());
performancesListNew
.
addAll
(
collect
);
/*for(KylinPerformanceVo recommendInfo : performancesListRecommend) {
for(KylinPerformanceVo info : performancesListNew) {
for(KylinPerformanceVo info : performancesListNew) {
if (!recommendInfo.getPerformancesId().equals(info.getPerformancesId())) {
if (!recommendInfo.getPerformancesId().equals(info.getPerformancesId())) {
performancesListNewUnqui.add(recommendInfo);
performancesListNewUnqui.add(recommendInfo);
}
}
}
}
}
}
*/
}
else
{
}
else
{
performancesListNew
Unqui
.
addAll
(
performancesListRecommend
);
performancesListNew
.
addAll
(
performancesListRecommend
);
}
}
}
}
}
}
...
@@ -116,7 +114,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -116,7 +114,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
info
.
put
(
"is_native"
,
is_native
);
// 本地演出少是否推荐了其他演出 0有推荐 1没有
info
.
put
(
"is_native"
,
is_native
);
// 本地演出少是否推荐了其他演出 0有推荐 1没有
info
.
put
(
"recommend"
,
recommend
);
// 从第几个开始是其他推荐演出 后台设置的那个推荐
info
.
put
(
"recommend"
,
recommend
);
// 从第几个开始是其他推荐演出 后台设置的那个推荐
info
.
put
(
"total"
,
0
);
info
.
put
(
"total"
,
0
);
info
.
put
(
"list"
,
performancesListNew
Unqui
);
info
.
put
(
"list"
,
performancesListNew
);
return
info
;
return
info
;
}
}
...
...
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