Commit 67c43053 by 吴博

Merge branch 'feature/1003186' into 'master'

feat: [1003186] 本书立享权益客户端样式问题

See merge request rays/pcloud-book!824
parents 791a5f69 78850a4c
......@@ -1000,12 +1000,14 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
List<RightsNowItem> items = Lists.newArrayList();
if (CollectionUtils.isEmpty(nowItems)) {
// 填充咨询
supplementNews(rightsSettingId, wechatUserId, rightsClassifyId, top, items,bookId);
supplementNews(rightsSettingId, wechatUserId, rightsClassifyId, top, items,bookId, itemType.value);
// 处理权益中的应用/作品
fillProductAndApp(items);
rightsSettingTitle.setRightsSettingItemList(items);
return;
}
// 处理权益中的应用/作品
fillProductAndApp(nowItems);
// // 处理权益中的应用/作品
// fillProductAndApp(nowItems);
//移除不能购买的应用或作品
removeCanNotBuy(nowItems);
for (RightsNowItem nowItem : nowItems) {
......@@ -1017,10 +1019,11 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if (RightsServeTypeEnum.NEWS.name().equalsIgnoreCase(rightsSettingTitle.getServeType())){
if (items.size() < top) {
// 填充咨询
supplementNews(rightsSettingId, wechatUserId, rightsClassifyId, top - items.size(), items, bookId);
supplementNews(rightsSettingId, wechatUserId, rightsClassifyId, top - items.size(), items, bookId, itemType.value);
}
}
// 处理权益中的应用/作品
fillProductAndApp(items);
rightsSettingTitle.setRightsSettingItemList(items);
}
......@@ -1032,13 +1035,13 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
* @Param [rightsSettingId, wechatUserId, rightsClassifyId, top, items]
**/
private void supplementNews(Long rightsSettingId, Long wechatUserId, Long rightsClassifyId, Integer top, List<RightsNowItem> items,
Long bookId) {
Long bookId, Integer type) {
FillRightsSettingAppletsDTO applets = getFillRightsSettingApplets(rightsSettingId, wechatUserId, rightsClassifyId, top, bookId);
List<AppletNews> news = applets.getDesignatedNews();
for (AppletNews appletNews : news) {
items.add(RightsNowItem.builder().serveId(appletNews.getId()).serveName(appletNews.getNewsName())
.serveTypeName("资讯").servePic(appletNews.getPic1()).type(0).jumpType(appletNews.getJumpType())
.jumpUrl(appletNews.getJumpUrl()).build());
items.add(RightsNowItem.builder().serveId(appletNews.getId()).serveName(appletNews.getNewsName()).serveType(RightsServeTypeEnum.NEWS.name())
.serveTypeName("资讯").servePic(appletNews.getPic1()).type(type).jumpType(appletNews.getJumpType())
.jumpUrl(appletNews.getJumpUrl()).newsType(appletNews.getType()).build());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment