feat: 用户管理对接真实 API
后端: 新增 /api/v1/users CRUD + 重置密码接口
前端: user model/repository/provider + 设置页用户 tab 改为真实数据,
支持新增、编辑、启停、重置密码
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@ func Setup(r *gin.Engine, db *gorm.DB) {
|
||||
stockOutH := handler.NewStockOutHandler(db, stockSvc)
|
||||
inventoryH := handler.NewInventoryHandler(db)
|
||||
importH := handler.NewImportHandler(db)
|
||||
userH := handler.NewUserHandler(db)
|
||||
|
||||
v1 := r.Group("/api/v1")
|
||||
|
||||
@@ -105,6 +106,15 @@ func Setup(r *gin.Engine, db *gorm.DB) {
|
||||
inventory.GET("/checks/:id", inventoryH.GetCheck)
|
||||
}
|
||||
|
||||
// 用户管理
|
||||
users := api.Group("/users")
|
||||
{
|
||||
users.GET("", userH.List)
|
||||
users.POST("", userH.Create)
|
||||
users.PUT("/:id", userH.Update)
|
||||
users.PUT("/:id/reset-password", userH.ResetPassword)
|
||||
}
|
||||
|
||||
// 导入
|
||||
imp := api.Group("/import")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user