Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
aff5e4c2
Commit
aff5e4c2
authored
Nov 27, 2020
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug/1026670' into 'master'
bug: [1026670] 匹配资讯浏览量为空 See merge request rays/pcloud-book!1060
parents
e5ce699f
efcc51cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+30
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
aff5e4c2
...
@@ -2111,6 +2111,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -2111,6 +2111,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
}
// 将未选择服务的数据补充资讯
// 将未选择服务的数据补充资讯
setAppletNews4Week
(
rightsSettingId
,
rightsType
,
wechatUserId
,
needFillAppletNews
,
bookId
,
cityCode
,
agentId
);
setAppletNews4Week
(
rightsSettingId
,
rightsType
,
wechatUserId
,
needFillAppletNews
,
bookId
,
cityCode
,
agentId
);
//填充资讯的浏览量
fillNewsBrowseCount
(
needFillAppletNews
);
/*
/*
List<Long> rightsSettingItemIds =
List<Long> rightsSettingItemIds =
...
@@ -2135,6 +2137,34 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -2135,6 +2137,34 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
return
list
;
return
list
;
}
}
private
void
fillNewsBrowseCount
(
List
<
RightsSettingItem
>
needFillAppletNews
)
{
log
.
info
(
"填充资讯浏览量:{}"
,
needFillAppletNews
);
List
<
Long
>
appletNewsIds
=
new
ArrayList
<>();
needFillAppletNews
.
stream
().
forEach
(
rightsSettingItem
->
{
if
(!
ListUtils
.
isEmpty
(
rightsSettingItem
.
getAppletNewsDTOS
()))
{
appletNewsIds
.
addAll
(
rightsSettingItem
.
getAppletNewsDTOS
().
stream
().
map
(
e
->
e
.
getId
()).
collect
(
Collectors
.
toList
()));
}
});
if
(
ListUtils
.
isEmpty
(
appletNewsIds
))
{
return
;
}
Map
<
Long
,
AppletNewsDTO
>
appletMap
=
appletNewsBiz
.
getByIds
(
appletNewsIds
);
if
(
MapUtils
.
isEmpty
(
appletMap
))
{
return
;
}
needFillAppletNews
.
stream
().
forEach
(
rightsSettingItem
->
{
List
<
AppletNewsDTO
>
appletNewsDTOS
=
rightsSettingItem
.
getAppletNewsDTOS
();
if
(
ListUtils
.
isEmpty
(
appletNewsDTOS
))
{
return
;
}
appletNewsDTOS
.
stream
().
forEach
(
appletNewsDTO
->
{
if
(
null
==
appletMap
.
get
(
appletNewsDTO
.
getId
()))
{
appletNewsDTO
.
setBrowseCount
(
appletMap
.
get
(
appletNewsDTO
.
getId
()).
getBrowseCount
());
}
});
});
}
private
void
fillPageParam
(
List
<
RightsSettingItem
>
list
,
Integer
currentPage
,
Integer
numPerPage
)
{
private
void
fillPageParam
(
List
<
RightsSettingItem
>
list
,
Integer
currentPage
,
Integer
numPerPage
)
{
if
(
Objects
.
nonNull
(
currentPage
)&&
Objects
.
nonNull
(
numPerPage
)){
if
(
Objects
.
nonNull
(
currentPage
)&&
Objects
.
nonNull
(
numPerPage
)){
for
(
RightsSettingItem
rightsSettingItem
:
list
)
{
for
(
RightsSettingItem
rightsSettingItem
:
list
)
{
...
...
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