fix:已发布标签组添加标签时也显示已发布

This commit is contained in:
s2042968 2025-04-11 17:01:40 +08:00
parent 83abbd18f1
commit 346b971481
1 changed files with 5 additions and 1 deletions

View File

@ -79,7 +79,11 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
tag.setType(TagTypeEnum.TAG.getCode()); // 标签
tag.setTagName(tagName);
tag.setOrderBy(maxOrder + 1); // 默认排序
tag.setIsPublished(PublishEnum.UNPUBLISHED.getCode()); // 默认未发布
// 判断标签组有无发布若发布则标签已发布若未发布则标签未发布
int isPublished = this.getById(parentId).getIsPublished();
tag.setIsPublished(isPublished);
tag.setCreatedBy(createdBy);
boolean isSuccess = this.save(tag);
if (isSuccess) {