feat: expand superadmin user detail views

This commit is contained in:
2026-01-15 12:29:52 +08:00
parent 8419ddede7
commit bec984b959
10 changed files with 2874 additions and 12 deletions

View File

@@ -58,6 +58,57 @@ func (c *users) Wallet(ctx fiber.Ctx, id int64) (*dto.SuperWalletResponse, error
return services.Super.GetUserWallet(ctx, id)
}
// List user notifications
//
// @Router /super/v1/users/:id<int>/notifications [get]
// @Summary List user notifications
// @Description List notifications of a user
// @Tags User
// @Accept json
// @Produce json
// @Param id path int64 true "User ID"
// @Param page query int false "Page number"
// @Param limit query int false "Page size"
// @Success 200 {object} requests.Pager{items=[]dto.SuperUserNotificationItem}
// @Bind id path
// @Bind filter query
func (c *users) ListNotifications(ctx fiber.Ctx, id int64, filter *dto.SuperUserNotificationListFilter) (*requests.Pager, error) {
return services.Super.ListUserNotifications(ctx, id, filter)
}
// List user coupons
//
// @Router /super/v1/users/:id<int>/coupons [get]
// @Summary List user coupons
// @Description List coupons of a user
// @Tags User
// @Accept json
// @Produce json
// @Param id path int64 true "User ID"
// @Param page query int false "Page number"
// @Param limit query int false "Page size"
// @Success 200 {object} requests.Pager{items=[]dto.SuperUserCouponItem}
// @Bind id path
// @Bind filter query
func (c *users) ListCoupons(ctx fiber.Ctx, id int64, filter *dto.SuperUserCouponListFilter) (*requests.Pager, error) {
return services.Super.ListUserCoupons(ctx, id, filter)
}
// Get user real-name verification detail
//
// @Router /super/v1/users/:id<int>/realname [get]
// @Summary Get user real-name verification detail
// @Description Get real-name verification detail of a user
// @Tags User
// @Accept json
// @Produce json
// @Param id path int64 true "User ID"
// @Success 200 {object} dto.SuperUserRealNameResponse
// @Bind id path
func (c *users) RealName(ctx fiber.Ctx, id int64) (*dto.SuperUserRealNameResponse, error) {
return services.Super.GetUserRealName(ctx, id)
}
// List user tenants
//
// @Router /super/v1/users/:id<int>/tenants [get]