Commit 698dcf6d by 李传峰

Merge branch 'feature/1006939' into 'master'

feat:[1006939]APP流程

See merge request rays/pcloud-book!1548
parents dfaa584b fed23e63
......@@ -94,7 +94,7 @@ public interface ResourcePageBiz {
* @date:2021/3/31 19:06
* * @param null
*/
PageBeanNew<ResourcePageItemVO> listPageResourcePageItem(Integer currentPage, Integer numPerPage, Long resourcePageColumnId, Long wechatUserId);
PageBeanNew<ResourcePageItemVO> listPageResourcePageItem(Integer currentPage, Integer numPerPage, Long resourcePageColumnId, Long wechatUserId,Long officialAccountsId);
/**
* 根据社群码id查询
......
......@@ -1610,7 +1610,12 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
itemVO.setTypeCode(appDto.getTypeCode());
itemVO.setTypeName(appDto.getTypeName());
itemVO.setTransverseImg(appDto.getTransverseImg());
itemVO.setPrice(null ==appDto.getRetailPrice() ? Double.valueOf(0d) : appDto.getRetailPrice().doubleValue());
//这两个价格不统一,不确定取哪个字段
Double price = null == appDto.getPrice() ? Double.valueOf(0d) : appDto.getPrice().doubleValue();
if (price.equals(0d)) {
price = null == appDto.getRetailPrice() ? Double.valueOf(0d) : appDto.getRetailPrice().doubleValue();
}
itemVO.setPrice(price);
itemVO.setHasThirdLink(!StringUtil.isEmpty(appDto.getTurnUrl())?true:false);
/* if (!MapUtils.isEmpty(appPriceMap) && appPriceMap.containsKey(serveId)) {
BigDecimal price = appPriceMap.get(serveId).getRetailPrice();
......@@ -1833,7 +1838,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
@Override
public PageBeanNew<ResourcePageItemVO> listPageResourcePageItem(Integer currentPage, Integer numPerPage, Long resourcePageColumnId,
Long wechatUserId) {
Long wechatUserId, Long officialAccountsId) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("resourcePageColumnId", resourcePageColumnId);
ResourcePageColumn resourcePageColumn = resourcePageColumnDao.getById(resourcePageColumnId);
......@@ -1852,6 +1857,12 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
//填充自定义图片
fillSelfPic(pageBeanNew.getRecordList());
ResourcePage byId = resourcePageDao.getById(resourcePageColumn.getResourcePageId());
try {
fillJumpUrl(pageBeanNew.getRecordList(), wechatUserId, resourcePageColumn.getResourcePageId(), officialAccountsId, byId.getBookId(), byId.getCreateUser(), byId.getChannelId());
} catch (Exception e) {
log.error("fillJumpUrl失败:{}",e.getMessage());
}
return pageBeanNew;
}
......@@ -3909,6 +3920,14 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
}
//填充版权保护状态
if (MessageFromTypeEnum.APP.value.equals(e.getServeType())) {
if (!MapUtils.isEmpty(finalBookAuthMap) && finalBookAuthMap.containsKey(MessageFromTypeEnum.APP.value + e.getServeId())) {
e.setBookAuthState(finalBookAuthMap.get(MessageFromTypeEnum.APP.value + e.getServeId()));
} else {
e.setBookAuthState(false);
}
}
});
}
if(CollUtil.isNotEmpty(productIds)) {
......@@ -3937,6 +3956,14 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
}
//填充版权保护状态
if (MessageFromTypeEnum.PRODUCT.value.equals(e.getServeType())) {
if (!MapUtils.isEmpty(finalBookAuthMap1) && finalBookAuthMap1.containsKey(MessageFromTypeEnum.PRODUCT.value + e.getServeId())) {
e.setBookAuthState(finalBookAuthMap1.get(MessageFromTypeEnum.PRODUCT.value + e.getServeId()));
} else {
e.setBookAuthState(false);
}
}
});
}
}
......
......@@ -151,7 +151,8 @@ public class ResourcePageFacade {
@RequestParam("numPerPage") Integer numPerPage,
@RequestParam("resourcePageColumnId") Long resourcePageColumnId) {
Long wechatUserId = Cookie.getId(userInfo,Cookie._WECHAT_USER_ID);
return new ResponseDto<>(resourcePageBiz.listPageResourcePageItem(currentPage, numPerPage, resourcePageColumnId, wechatUserId));
Long officialAccountsId = Cookie.getId(userInfo, Cookie._OFFICIAL_ACCOUNTS_ID);
return new ResponseDto<>(resourcePageBiz.listPageResourcePageItem(currentPage, numPerPage, resourcePageColumnId, wechatUserId, officialAccountsId));
}
@ApiOperation("获取栏目及资源类型")
......
......@@ -141,4 +141,7 @@ public class ResourcePageItemVO extends BaseDto{
@ApiModelProperty("任务类型")
private Integer taskType;
@ApiModelProperty("版权保护状态")
private Boolean bookAuthState;
}
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