后台用户管理新增“人工实名

This commit is contained in:
yml2213
2026-06-28 01:06:35 +08:00
parent 21aabd77f1
commit 18eba36ef9
12 changed files with 453 additions and 16 deletions
+2 -1
View File
@@ -137,7 +137,7 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
adminFinanceHandler := adminfinance.NewHandler(adminFinanceService)
var adminUserRepo *adminuser.Repository
if deps.DB != nil {
adminUserRepo = adminuser.NewRepository(deps.DB)
adminUserRepo = adminuser.NewRepository(deps.DB, fieldEncryptor)
}
adminUserService := adminuser.NewService(adminUserRepo)
adminUserHandler := adminuser.NewHandler(adminUserService)
@@ -511,6 +511,7 @@ func New(cfg config.Config, deps Dependencies, logger *zap.Logger) *gin.Engine {
adminRoutes.POST("/users/:id/freeze", requirePerm("user:freeze"), adminUserHandler.Freeze)
adminRoutes.POST("/users/:id/unfreeze", requirePerm("user:unfreeze"), adminUserHandler.Unfreeze)
adminRoutes.POST("/users/:id/deposit-free-quota", requirePerm("user:deposit_free"), adminUserHandler.SetDepositFreeQuota)
adminRoutes.POST("/users/:id/manual-realname", requirePerm("user:manual_realname"), adminUserHandler.ManualRealname)
adminRoutes.POST("/users/:id/revoke-realname", requirePerm("user:revoke_realname"), adminUserHandler.RevokeRealname)
adminRoutes.GET("/orders", requirePerm("order:view"), orderHandler.AdminList)
adminRoutes.GET("/listing-orders/:id/latest", requirePerm("order:view"), orderHandler.AdminLatestByListing)