...
|
...
|
@@ -2233,7 +2233,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService { |
|
|
public List<GrassArticleBlock> handleContentWithAt(List<GrassArticleBlock> blockList){
|
|
|
List<GrassArticleBlock> textBlockList = blockList.stream().filter(articleBlock -> articleBlock.getTemplateKey().equals("text")).collect(Collectors.toList());
|
|
|
List<Integer> uids = Lists.newArrayList();
|
|
|
if(CollectionUtils.isEmpty(blockList)){
|
|
|
if(CollectionUtils.isEmpty(textBlockList)){
|
|
|
return blockList;
|
|
|
}
|
|
|
Pattern p = Pattern.compile("@[0-9]+#");
|
...
|
...
|
@@ -2252,6 +2252,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService { |
|
|
userInfoMap.put(userInfoRspBO.getUid(), userInfoRspBO);
|
|
|
});
|
|
|
blockList.forEach(grassArticleBlock -> {
|
|
|
if(grassArticleBlock.getTemplateKey().equals("text")){
|
|
|
String content = grassArticleBlock.getContentData();
|
|
|
Matcher m = p.matcher(content);
|
|
|
while(m.find()){
|
...
|
...
|
@@ -2263,6 +2264,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService { |
|
|
}
|
|
|
}
|
|
|
grassArticleBlock.setContentData(content);
|
|
|
}
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|