Commit 5c319c0e by 田超

Merge branch 'fixbug/1026053' into 'master'

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

See merge request rays/pcloud-book!1005
parents 89f3d60c e9a23a78
...@@ -974,4 +974,11 @@ public interface BookGroupBiz { ...@@ -974,4 +974,11 @@ public interface BookGroupBiz {
BookGroupDTO getRayBookByBookGroupId(Long bookGroupId); BookGroupDTO getRayBookByBookGroupId(Long bookGroupId);
List<BookGroupDTO> getBookGroupsByBookIds(List<Long> bookIds, List<Long> adviserIds, List<Long> channelIds); 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 { ...@@ -5189,6 +5189,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
if (!ListUtils.isEmpty(appIds)) { if (!ListUtils.isEmpty(appIds)) {
appDtoMap = appConsr.mapByIds(appIds); appDtoMap = appConsr.mapByIds(appIds);
} }
List<BookServeDTO> removeList = new ArrayList<>();
for (BookServeDTO bookServeDTO : serveDTOList) { for (BookServeDTO bookServeDTO : serveDTOList) {
if (!MapUtils.isEmpty(productDtoMap) && AppAndProductTypeEnum.PRODUCT.value.equals(bookServeDTO.getServeType())) { if (!MapUtils.isEmpty(productDtoMap) && AppAndProductTypeEnum.PRODUCT.value.equals(bookServeDTO.getServeType())) {
ProductDto productDto = productDtoMap.get(bookServeDTO.getServeId()); ProductDto productDto = productDtoMap.get(bookServeDTO.getServeId());
...@@ -5205,6 +5206,8 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -5205,6 +5206,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
} else { } else {
bookServeDTO.setHasThirdLink(false); bookServeDTO.setHasThirdLink(false);
} }
} else {
removeList.add(bookServeDTO);
} }
} }
if (!MapUtils.isEmpty(appDtoMap) && AppAndProductTypeEnum.APP.value.equals(bookServeDTO.getServeType())) { if (!MapUtils.isEmpty(appDtoMap) && AppAndProductTypeEnum.APP.value.equals(bookServeDTO.getServeType())) {
...@@ -5219,9 +5222,15 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -5219,9 +5222,15 @@ public class BookGroupBizImpl implements BookGroupBiz {
} else { } else {
bookServeDTO.setHasThirdLink(false); bookServeDTO.setHasThirdLink(false);
} }
if (checkRayUrl(appDto.getTurnUrl()) && AppTypeEnum.ARTICLE.value.equals(appDto.getTypeCode())){
removeList.add(bookServeDTO);
}
} else {
removeList.add(bookServeDTO);
} }
} }
} }
serveDTOList.removeAll(removeList);
} }
@Override @Override
...@@ -5865,4 +5874,14 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -5865,4 +5874,14 @@ public class BookGroupBizImpl implements BookGroupBiz {
} }
return bookGroupDTOList; 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 { ...@@ -1519,7 +1519,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if (AppAndProductTypeEnum.APP.value.equals(item.getServeType())) { if (AppAndProductTypeEnum.APP.value.equals(item.getServeType())) {
AppDto appDto = appDtoMap.get(item.getServeId()); AppDto appDto = appDtoMap.get(item.getServeId());
if (appDto != null) { 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); list_remove.add(item);
} }
item.setServeName(appDto.getTitle()); 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