Commit 87394ae4 by 田超

Merge branch 'feature/1003799' into 'master'

feat: [1003799] 第三方资源弹窗换切换式

See merge request rays/pcloud-book!1028
parents 4a705279 a0fa4867
...@@ -3074,20 +3074,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -3074,20 +3074,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
Boolean popState = false; Boolean popState = false;
Integer popupType = RightsNowPopupType.ONLINE_COURSE.value; Integer popupType = RightsNowPopupType.ONLINE_COURSE.value;
List<RightsNowItem> popupList = getPopupCourseList(rightsSettingId, readType); List<RightsNowItem> popupList = getPopupCourseList(rightsSettingId, readType);
//是否点击 Integer courseClickCount = rightsNowPopupDao.getUserPopupClickCount(wechatUserId, bookId, channelId, adviserId, popupType);
Integer courseClickCount = 0;
if (!ListUtils.isEmpty(popupList)){
RightsNowItem rightsNowItem = popupList.get(0);
RightsNowPopup popup = new RightsNowPopup();
popup.setWechatUserId(wechatUserId);
popup.setBookId(bookId);
popup.setAdviserId(adviserId);
popup.setChannelId(channelId);
popup.setPopupType(popupType);
popup.setServeId(rightsNowItem.getServeId());
popup.setServeType(rightsNowItem.getServeType());
courseClickCount = rightsNowPopupDao.getUserPopupClickCountByServe(popup);
}
//有资源且未点击 //有资源且未点击
if (!ListUtils.isEmpty(popupList) && courseClickCount<=0){ if (!ListUtils.isEmpty(popupList) && courseClickCount<=0){
popState = true; popState = true;
...@@ -3116,13 +3103,16 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -3116,13 +3103,16 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
} }
popupList = new ArrayList<>(); popupList = new ArrayList<>();
RightsSetting rightsSetting = rightsSettingDAO.selectByPrimaryKey(rightsSettingId); RightsSetting rightsSetting = rightsSettingDAO.selectByPrimaryKey(rightsSettingId);
if (null == rightsSetting){
return new ArrayList<>();
}
RightsSettingTitle rightsSettingTitle = getRightsSettingTitle(rightsSetting, RightsNowItemTypeNew.ONLINE_COURSE, readType); RightsSettingTitle rightsSettingTitle = getRightsSettingTitle(rightsSetting, RightsNowItemTypeNew.ONLINE_COURSE, readType);
if (null != rightsSettingTitle && null!= rightsSettingTitle.getOpenState() && rightsSettingTitle.getOpenState()) { if (null != rightsSettingTitle && null!= rightsSettingTitle.getOpenState() && rightsSettingTitle.getOpenState()) {
List<RightsNowItem> resourceItems = rightsNowItemDao.getListByRightsSettingTitleId(rightsSettingTitle.getId(), Collections.singletonList(RightsNowItemTypeNew.ONLINE_COURSE.value)); List<RightsNowItem> resourceItems = rightsNowItemDao.getListByRightsSettingTitleId(rightsSettingTitle.getId(), Collections.singletonList(RightsNowItemTypeNew.ONLINE_COURSE.value));
if (!ListUtils.isEmpty(resourceItems)) { if (!ListUtils.isEmpty(resourceItems)) {
fillProductAndApp(resourceItems); fillProductAndApp(resourceItems);
if (!ListUtils.isEmpty(resourceItems)) { if (!ListUtils.isEmpty(resourceItems)) {
popupList.add(resourceItems.get(0)); popupList.addAll(resourceItems);
} }
} }
} }
......
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