feat: tag add user id

This commit is contained in:
LinkinStar 2022-11-25 15:34:36 +08:00
parent d5b2ab1557
commit b09e693d8b
3 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,7 @@ type Tag struct {
Recommend bool `xorm:"not null default false BOOL recommend"`
Reserved bool `xorm:"not null default false BOOL reserved"`
RevisionID string `xorm:"not null default 0 BIGINT(20) revision_id"`
UserID string `xorm:"not null default 0 BIGINT(20) user_id"`
}
// TableName tag table name

View File

@ -233,6 +233,7 @@ func (ts *TagService) UpdateTagSynonym(ctx context.Context, req *schema.UpdateTa
item.OriginalText = tag.OriginalText
item.ParsedText = tag.ParsedText
item.Status = entity.TagStatusAvailable
item.UserID = req.UserID
needAddTagList = append(needAddTagList, item)
}

View File

@ -404,6 +404,7 @@ func (ts *TagCommonService) CheckTag(ctx context.Context, tags []string, userID
item.OriginalText = ""
item.ParsedText = ""
item.Status = entity.TagStatusAvailable
item.UserID = userID
addTagList = append(addTagList, item)
addTagMsgList = append(addTagMsgList, tag)
}
@ -478,6 +479,7 @@ func (ts *TagCommonService) ObjectChangeTag(ctx context.Context, objectTagData *
item.OriginalText = tag.OriginalText
item.ParsedText = tag.ParsedText
item.Status = entity.TagStatusAvailable
item.UserID = objectTagData.UserID
addTagList = append(addTagList, item)
}