后台用户列表此前仅分页,数据量大时无法定位用户。 - 后端:List 新增 ListQuery(关键词 + 状态),抽出 applyUserFilter 对总数与列表查询统一加筛选;关键词为纯数字时同时按用户 ID 精确匹配, 否则按手机号/昵称模糊匹配 - 前端:AdminUsersView 新增筛选栏(关键词:手机号/昵称/用户ID, 状态:正常/已冻结/已禁用),回车/清空/选择即查,查询重置到第 1 页 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.5 KiB
Go
43 lines
1.5 KiB
Go
package adminuser
|
|
|
|
import "time"
|
|
|
|
type UserDTO struct {
|
|
ID uint64 `json:"id"`
|
|
Phone string `json:"phone"`
|
|
Nickname string `json:"nickname"`
|
|
RealnameStatus string `json:"realname_status"`
|
|
RiskStatus string `json:"risk_status"`
|
|
CreditScore int `json:"credit_score"`
|
|
DepositFreeQuotaCent int64 `json:"deposit_free_quota_cent"`
|
|
DepositFreeUsedCent int64 `json:"deposit_free_used_cent"`
|
|
DepositFreeRemainingCent int64 `json:"deposit_free_remaining_cent"`
|
|
Status string `json:"status"`
|
|
OrderCount int64 `json:"order_count"`
|
|
ListingCount int64 `json:"listing_count"`
|
|
DisputeCount int64 `json:"dispute_count"`
|
|
LastLoginAt *time.Time `json:"last_login_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
type FreezeRequest struct {
|
|
Reason string `json:"reason"`
|
|
}
|
|
|
|
type DepositFreeQuotaRequest struct {
|
|
AmountCent int64 `json:"amount_cent"`
|
|
}
|
|
|
|
// ListQuery 用户列表筛选条件。Keyword 同时匹配手机号/昵称(模糊)与用户 ID(精确)。
|
|
type ListQuery struct {
|
|
Keyword string
|
|
Status string
|
|
}
|
|
|
|
type PaginatedResult struct {
|
|
Items interface{} `json:"items"`
|
|
Total int64 `json:"total"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"page_size"`
|
|
}
|