fix: 双链内容为空时的返回对象

This commit is contained in:
xiaozzzi 2024-01-27 12:00:13 +08:00
parent 03ee3978b8
commit 1ac36e27cf

View File

@ -134,6 +134,8 @@ public class ArticleReferenceService extends ServiceImpl<ArticleReferenceMapper,
Map<String, Object> result = new HashMap<>();
List<ArticleReferenceEntity> all = baseMapper.listGraph(onlyInner, userId, articleId);
if (CollUtil.isEmpty(all)) {
result.put("nodes",new String[0]);
result.put("links",new String[0]);
return result;
}