fix: 我分享的仪表板展示空tags

This commit is contained in:
fit2cloud-chenyw 2022-01-20 13:59:47 +08:00
parent 776578a7ad
commit 3989c343b1

View File

@ -315,7 +315,9 @@ public class ShareService {
} }
public List<PanelShareOutDTO> queryTargets(String panelId) { public List<PanelShareOutDTO> queryTargets(String panelId) {
return extPanelShareMapper.queryTargets(panelId); List<PanelShareOutDTO> targets = extPanelShareMapper.queryTargets(panelId);
if (CollectionUtils.isEmpty(targets)) return new ArrayList<>();
return targets.stream().filter(item -> StringUtils.isNotEmpty(item.getTargetName())).collect(Collectors.toList());
} }
public void removeShares(PanelShareRemoveRequest removeRequest) { public void removeShares(PanelShareRemoveRequest removeRequest) {