新增访客黑名单:支持拉黑 IP/设备并管理列表

工作台可按 IP 或设备拉黑并填写释放时间与原因;侧栏黑名单页查看与解除;进线自动拦截。
This commit is contained in:
yml2213
2026-07-19 00:43:55 +08:00
parent ada7533ffa
commit 1f92c35963
11 changed files with 838 additions and 5 deletions
+7
View File
@@ -20,6 +20,7 @@ func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.S
channel := NewChannelHandler()
settings := NewSettingsHandler()
staff := NewStaffHandler()
blacklist := NewBlacklistHandler()
wsHandler := NewWsHandler()
widget := NewWidgetHandler()
upload := NewUploadHandler(store, storageCfg)
@@ -87,6 +88,12 @@ func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.S
customers.PUT("/:id", customer.Update)
customers.DELETE("/:id", customer.Delete)
// 黑名单(拉黑 IP / 设备)
bl := authRequired.Group("/blacklist")
bl.GET("", blacklist.List)
bl.POST("", blacklist.Create)
bl.DELETE("/:id", blacklist.Delete)
// 客户标签库(管理员维护,全员可读可选)
ctags := authRequired.Group("/customer-tags")
ctags.GET("", customerTag.List)