Commit d1df3493 by 朱亚洁

feat:[1006834]getResourcePageByBookGroupId4Wechat

parent ed727ef5
......@@ -882,18 +882,18 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
throw new BookBizException(BookBizException.PARAM_IS_NULL,"参数缺失");
}
ResourcePageVO resourcePageVO = new ResourcePageVO();
ResourcePage bySceneId = null;
Long bookId = null;
if (null != bookGroupId) {
bySceneId = resourcePageDao.getByBookGroupId(bookGroupId);
bookId = resourcePageDao.getBookIdByBookGroupId(bookGroupId);
} else if (null != sceneId) {
bySceneId = resourcePageDao.getBySceneId(sceneId);
bookId = resourcePageDao.getBookIdBySceneId(sceneId);
}
//上邮临时处理方案
if (null != bySceneId && null != bySceneId.getBookId() && null != JedisClusterUtils.hget(nftReleaseLockKey, bySceneId.getBookId().toString())) {
if (null != bookId && null != JedisClusterUtils.hget(nftReleaseLockKey, bookId.toString())) {
if (null != bookGroupId) {
bookGroupId = JedisClusterUtils.hgetJson2Class(nftReleaseLockKey, bySceneId.getBookId().toString(), NftBookState.class).getNftBookGroupId();
bookGroupId = JedisClusterUtils.hgetJson2Class(nftReleaseLockKey, bookId.toString(), NftBookState.class).getNftBookGroupId();
} else if (null != sceneId) {
sceneId = JedisClusterUtils.hgetJson2Class(nftReleaseLockKey, bySceneId.getBookId().toString(), NftBookState.class).getNftSceneId();;
sceneId = JedisClusterUtils.hgetJson2Class(nftReleaseLockKey, bookId.toString(), NftBookState.class).getNftSceneId();;
}
}
if (null != bookGroupId) {
......@@ -1018,8 +1018,11 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
this.addDefaultBookServeNavigation(resourcePageId);
navigations = resourcePageNavigationDao.getByPageId(resourcePageId);
}
//pc端数据展示,客户端功能跳转
if (null == wechatUserId || ResourcePageConstants.NavigationJumpType.FUNCTION.getCode().equals(resourcePageVO.getNavigationJumpType())) {
// 加载跳转数据
this.fillCustomServe(navigations, wechatUserId);
}
resourcePageVO.setNavigationList(navigations);
}
}
......@@ -1797,7 +1800,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
//查收藏状态
Integer collectState = 0;
if (null != resourcePageVO && null != resourcePageVO.getId()) {
ResourcePageCollect collect = resourcePageCollectDao.getCollectRecordByUser(wechatUserId, resourcePageVO.getId());
Integer collect = resourcePageCollectDao.getCollectStateByUser(wechatUserId, resourcePageVO.getId());
collectState = null == collect ? 0 : 1;
}
resourcePageVO.setCollectState(collectState);
......
......@@ -473,4 +473,20 @@ public class ResourcePageConstants {
*/
public static final String DL_BOOK_SERVES_CACHE = "BOOK:DL:SERVES:";
/**
* 导航使用场景;1:菜单切换;2:功能跳转
*/
public enum NavigationJumpType{
MENU(1), FUNCTION(2);
private Integer code;
public Integer getCode() {
return code;
}
NavigationJumpType(Integer code) {
this.code = code;
}
}
}
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