Commit e9a23a78 by 朱亚洁

bug:[1026053] 精品文章里配置的小睿的链接不能在小程序里显示

parent 89f3d60c
......@@ -974,4 +974,11 @@ public interface BookGroupBiz {
BookGroupDTO getRayBookByBookGroupId(Long bookGroupId);
List<BookGroupDTO> getBookGroupsByBookIds(List<Long> bookIds, List<Long> adviserIds, List<Long> channelIds);
/**
* 判断是否是小睿链接
* @author:zhuyajie
* @date:2020/10/21 17:20
* * @param null
*/
Boolean checkRayUrl(String url);
}
......@@ -5189,6 +5189,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
if (!ListUtils.isEmpty(appIds)) {
appDtoMap = appConsr.mapByIds(appIds);
}
List<BookServeDTO> removeList = new ArrayList<>();
for (BookServeDTO bookServeDTO : serveDTOList) {
if (!MapUtils.isEmpty(productDtoMap) && AppAndProductTypeEnum.PRODUCT.value.equals(bookServeDTO.getServeType())) {
ProductDto productDto = productDtoMap.get(bookServeDTO.getServeId());
......@@ -5205,6 +5206,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
} else {
bookServeDTO.setHasThirdLink(false);
}
} else {
removeList.add(bookServeDTO);
}
}
if (!MapUtils.isEmpty(appDtoMap) && AppAndProductTypeEnum.APP.value.equals(bookServeDTO.getServeType())) {
......@@ -5219,9 +5222,15 @@ public class BookGroupBizImpl implements BookGroupBiz {
} else {
bookServeDTO.setHasThirdLink(false);
}
if (checkRayUrl(appDto.getTurnUrl()) && AppTypeEnum.ARTICLE.value.equals(appDto.getTypeCode())){
removeList.add(bookServeDTO);
}
} else {
removeList.add(bookServeDTO);
}
}
}
serveDTOList.removeAll(removeList);
}
@Override
......@@ -5865,4 +5874,14 @@ public class BookGroupBizImpl implements BookGroupBiz {
}
return bookGroupDTOList;
}
@Override
public Boolean checkRayUrl(String url) {
// https://qrcode.raysgo.com/2233
// https://qrcode.raysgo.com/t-2/1404/2280
if (!StringUtil.isEmpty(url) && url.startsWith(bookGroupQrcodeDomain)){
return true;
}
return false;
}
}
......@@ -1519,7 +1519,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if (AppAndProductTypeEnum.APP.value.equals(item.getServeType())) {
AppDto appDto = appDtoMap.get(item.getServeId());
if (appDto != null) {
if (!StringUtil.isEmpty(appDto.getTurnUrl()) && appDto.getTurnUrl().contains("qrcode.5rs.me") && "ARTICLE".equals(appDto.getTypeCode())){
if (bookGroupBiz.checkRayUrl(appDto.getTurnUrl()) && AppTypeEnum.ARTICLE.value.equals(appDto.getTypeCode())){
list_remove.add(item);
}
item.setServeName(appDto.getTitle());
......
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