feat: 新增FAQ条目获取接口,支持按ID查询单个FAQ条目;增强标签删除功能,支持content_only模式仅删除标签下内容

This commit is contained in:
wizardchen
2025-12-23 11:25:39 +08:00
parent 4159c9d3a5
commit 529b31da23
9 changed files with 126 additions and 11 deletions
+2
View File
@@ -86,6 +86,8 @@ type KnowledgeService interface {
UpsertFAQEntries(ctx context.Context, kbID string, payload *types.FAQBatchUpsertPayload) (string, error)
// CreateFAQEntry creates a single FAQ entry synchronously.
CreateFAQEntry(ctx context.Context, kbID string, payload *types.FAQEntryPayload) (*types.FAQEntry, error)
// GetFAQEntry retrieves a single FAQ entry by ID.
GetFAQEntry(ctx context.Context, kbID string, entryID string) (*types.FAQEntry, error)
// UpdateFAQEntry updates a single FAQ entry.
UpdateFAQEntry(ctx context.Context, kbID string, entryID string, payload *types.FAQEntryPayload) error
// UpdateFAQEntryFieldsBatch updates multiple fields for FAQ entries in batch.
+2 -1
View File
@@ -15,7 +15,8 @@ type KnowledgeTagService interface {
// UpdateTag updates tag basic information.
UpdateTag(ctx context.Context, id string, name *string, color *string, sortOrder *int) (*types.KnowledgeTag, error)
// DeleteTag deletes a tag.
DeleteTag(ctx context.Context, id string, force bool) error
// When contentOnly=true, only deletes the content under the tag but keeps the tag itself.
DeleteTag(ctx context.Context, id string, force bool, contentOnly bool) error
// FindOrCreateTagByName finds a tag by name or creates it if not exists.
FindOrCreateTagByName(ctx context.Context, kbID string, name string) (*types.KnowledgeTag, error)
}