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
ed6f05e4
Commit
ed6f05e4
authored
Apr 30, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-zyq-1002844' into 'master'
解决空异常 See merge request rays/pcloud-book!699
parents
07e5281f
71e17f87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
17 deletions
+26
-17
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+26
-17
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
ed6f05e4
...
@@ -66,6 +66,7 @@ import com.pcloud.common.core.aspect.ParamLog;
...
@@ -66,6 +66,7 @@ import com.pcloud.common.core.aspect.ParamLog;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.page.PageParam
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.NumberUtil
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtilParent
;
import
com.pcloud.common.utils.string.StringUtilParent
;
...
@@ -937,35 +938,43 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
...
@@ -937,35 +938,43 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
}
list
=
setAppletNews4Week
(
rightsSettingId
,
rightsType
,
wechatUserId
,
list
);
list
=
setAppletNews4Week
(
rightsSettingId
,
rightsType
,
wechatUserId
,
list
);
List
<
Long
>
rightsSettingItemIds
=
List
<
Long
>
rightsSettingItemIds
=
list
.
stream
().
filter
(
e
->
YesOrNoEnums
.
YES
.
getValue
().
equals
(
e
.
getIsOpen
())).
map
(
e
->
e
.
getId
()).
collect
(
Collectors
.
toList
());
list
.
stream
().
filter
(
e
->
YesOrNoEnums
.
YES
.
getValue
().
equals
(
e
.
getIsOpen
())
&&
RightsNowItemType
.
ONLINE_REMIND
.
value
.
equals
(
e
.
getRightsClassifyId
().
intValue
()))
.
map
(
e
->
e
.
getId
()).
collect
(
Collectors
.
toList
());
if
(!
ListUtils
.
isEmpty
(
rightsSettingItemIds
))
{
if
(!
ListUtils
.
isEmpty
(
rightsSettingItemIds
))
{
List
<
RightsCustomRelation
>
rightsCustomRelations
=
rightsCustomRelationDao
.
getCustomByItemIds
(
rightsSettingItemIds
);
List
<
RightsCustomRelation
>
rightsCustomRelations
=
rightsCustomRelationDao
.
getCustomByItemIds
(
rightsSettingItemIds
);
list
=
setReadPlan4Week
(
rightsCustomRelations
,
list
);
list
=
setReadPlan4Week
(
rightsCustomRelations
,
list
);
setGroupActivity
(
list
);
}
// 线上读书活动社群
rightsSettingItemIds
=
list
.
stream
().
filter
(
e
->
YesOrNoEnums
.
YES
.
getValue
().
equals
(
e
.
getIsOpen
())
&&
RightsNowItemType
.
ONLINE_READING_ACTIVITY
.
value
.
equals
(
e
.
getRightsClassifyId
().
intValue
()))
.
map
(
e
->
e
.
getId
()).
collect
(
Collectors
.
toList
());
if
(!
ListUtils
.
isEmpty
(
rightsSettingItemIds
))
{
setGroupActivity
(
list
,
rightsSettingItemIds
);
}
}
return
list
;
return
list
;
}
}
private
void
setGroupActivity
(
List
<
RightsSettingItem
>
list
){
private
void
setGroupActivity
(
List
<
RightsSettingItem
>
list
,
List
<
Long
>
rightsSettingItemIds
){
if
(
ListUtils
.
isEmpty
(
list
)){
if
(
ListUtils
.
isEmpty
(
list
)){
return
;
return
;
}
}
List
<
Long
>
rightsSettingItemIds
=
list
.
stream
().
filter
(
e
->
YesOrNoEnums
.
YES
.
getValue
().
equals
(
e
.
getIsOpen
())
GroupActivity4AppletDTO
groupActivity4AppletDTO
=
null
;
&&
RightsNowItemType
.
ONLINE_READING_ACTIVITY
.
value
.
equals
(
e
.
getRightsClassifyId
().
intValue
()))
.
map
(
e
->
e
.
getId
()).
collect
(
Collectors
.
toList
());
if
(
ListUtils
.
isEmpty
(
rightsSettingItemIds
)){
return
;
}
// 书刊分类
// 书刊分类
BookAdviserDto
bookAdviserDto
=
bookAdviserBiz
.
getOneMainBook
(
list
.
get
(
0
).
getBookId
());
BookAdviserDto
bookAdviserDto
=
bookAdviserBiz
.
getOneMainBook
(
list
.
get
(
0
).
getBookId
());
BaseTempletClassify
baseTempletClassify
=
new
BaseTempletClassify
();
if
(
bookAdviserDto
!=
null
&&
NumberUtil
.
isNumber
(
bookAdviserDto
.
getTempletId
())){
baseTempletClassify
.
setFirstClassify
(
bookAdviserDto
.
getTempletId
());
BaseTempletClassify
baseTempletClassify
=
new
BaseTempletClassify
();
baseTempletClassify
.
setSecondClassify
(
bookAdviserDto
.
getSecondTempletId
());
baseTempletClassify
.
setFirstClassify
(
bookAdviserDto
.
getTempletId
());
baseTempletClassify
.
setGradeLabelId
(
bookAdviserDto
.
getGraLabelId
());
baseTempletClassify
.
setSecondClassify
(
bookAdviserDto
.
getSecondTempletId
());
baseTempletClassify
.
setSubjectLabelId
(
bookAdviserDto
.
getSubLabelId
());
baseTempletClassify
.
setGradeLabelId
(
bookAdviserDto
.
getGraLabelId
());
setClassifyAndLabel
(
baseTempletClassify
);
baseTempletClassify
.
setSubjectLabelId
(
bookAdviserDto
.
getSubLabelId
());
// 通过书刊分类拿群
setClassifyAndLabel
(
baseTempletClassify
);
GroupActivity4AppletDTO
groupActivity4AppletDTO
=
pcloudGroupActivityDao
.
getGroupActivity4Applet
(
baseTempletClassify
.
getFirstClassify
(),
baseTempletClassify
.
getSecondClassify
(),
baseTempletClassify
.
getGradeLabelId
(),
baseTempletClassify
.
getSubjectLabelId
());
// 通过书刊分类拿群
groupActivity4AppletDTO
=
pcloudGroupActivityDao
.
getGroupActivity4Applet
(
baseTempletClassify
.
getFirstClassify
(),
baseTempletClassify
.
getSecondClassify
(),
baseTempletClassify
.
getGradeLabelId
(),
baseTempletClassify
.
getSubjectLabelId
());
}
if
(
groupActivity4AppletDTO
==
null
){
if
(
groupActivity4AppletDTO
==
null
){
// 如果书刊没拿到群,则通过权益分类拿群
// 如果书刊没拿到群,则通过权益分类拿群
RightsSetting
rightsSetting
=
rightsSettingDAO
.
selectByPrimaryKey
(
list
.
get
(
0
).
getRightsSettingId
());
RightsSetting
rightsSetting
=
rightsSettingDAO
.
selectByPrimaryKey
(
list
.
get
(
0
).
getRightsSettingId
());
...
...
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