|
|
@@ -364,6 +364,7 @@ public class CorpTagServiceImpl implements CorpTagService {
|
|
|
List<CorpTag> corpTags = corpTagMapper.selectList(Wrappers.lambdaQuery(CorpTag.class)
|
|
|
.eq(CorpTag::getTagId, tagId));
|
|
|
tagIds = corpTags.stream().filter(tag -> StrUtil.isNotBlank(tag.getTagId())).map(CorpTag::getTagId).toArray(String[]::new);
|
|
|
+ groupIds = corpTags.stream().filter(tag -> StrUtil.isNotEmpty(tag.getGroupId())).map(CorpTag::getGroupId).toArray(String[]::new);
|
|
|
}
|
|
|
|
|
|
if (StrUtil.isNotEmpty(groupId)) {
|
|
|
@@ -377,6 +378,10 @@ public class CorpTagServiceImpl implements CorpTagService {
|
|
|
}
|
|
|
if (StrUtil.isNotBlank(tagId)) {
|
|
|
corpTagMapper.delete(Wrappers.lambdaQuery(CorpTag.class).eq(CorpTag::getTagId, tagId));
|
|
|
+ Integer count = corpTagMapper.selectCount(Wrappers.lambdaQuery(CorpTag.class).in(CorpTag::getGroupId, groupIds));
|
|
|
+ if (count == 0) {
|
|
|
+ corpTagGroupMapper.delete(Wrappers.lambdaQuery(CorpTagGroup.class).in(CorpTagGroup::getGroupId, groupIds));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (StrUtil.isNotBlank(groupId)) {
|