新增客户标签库:管理员维护、员工选择

租户级标签 CRUD 与颜色预设;客户打标仅能从库中选择,设置页提供管理入口,列表筛选随标签库动态生成。
This commit is contained in:
yml2213
2026-07-17 22:28:16 +08:00
parent c5f28dca1c
commit 7a08f5f729
11 changed files with 723 additions and 23 deletions
+8
View File
@@ -11,6 +11,7 @@ func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.S
auth := NewAuthHandler()
session := NewSessionHandler()
customer := NewCustomerHandler()
customerTag := NewCustomerTagHandler()
knowledge := NewKnowledgeHandler()
quickReply := NewQuickReplyHandler()
stats := NewStatisticsHandler()
@@ -77,6 +78,13 @@ func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.S
customers.PUT("/:id", customer.Update)
customers.DELETE("/:id", customer.Delete)
// 客户标签库(管理员维护,全员可读可选)
ctags := authRequired.Group("/customer-tags")
ctags.GET("", customerTag.List)
ctags.POST("", customerTag.Create)
ctags.PUT("/:id", customerTag.Update)
ctags.DELETE("/:id", customerTag.Delete)
// 知识库
kb := authRequired.Group("/knowledge")
kb.GET("/categories", knowledge.ListCategories)