实现租户坐席账号管理

新增 /api/staff 列表/创建/更新/禁用,按租户坐席配额校验;系统设置增加坐席账号页支持增改禁与配额展示。
This commit is contained in:
yml2213
2026-07-15 14:07:06 +08:00
parent 34d3866520
commit ea3901d8b0
4 changed files with 696 additions and 16 deletions
+8
View File
@@ -16,6 +16,7 @@ func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.S
admin := NewAdminHandler()
channel := NewChannelHandler()
settings := NewSettingsHandler()
staff := NewStaffHandler()
ws := NewWsHandler()
widget := NewWidgetHandler()
upload := NewUploadHandler(store, storageCfg)
@@ -94,6 +95,13 @@ func SetupRoutes(r *gin.Engine, store storage.ObjectStorage, storageCfg config.S
settingsGroup.GET("", settings.Get)
settingsGroup.PUT("", settings.Update)
// 坐席账号(租户内)
staffGroup := authRequired.Group("/staff")
staffGroup.GET("", staff.List)
staffGroup.POST("", staff.Create)
staffGroup.PUT("/:id", staff.Update)
staffGroup.DELETE("/:id", staff.Delete)
// 统计
statistics := authRequired.Group("/statistics")
statistics.GET("/kpi", stats.KPIs)