新功能(#89): 增强邀请列表接口 + 新增全局邀请管理接口
P01: GET /v1/admin/user/invite/list 增加 search/enable/user_id_search 筛选参数,响应新增 order_count/has_purchased/inviter_commission/ inviter_gift_days/invitee_gift_days 权益字段。 P02: 新增 GET /v1/admin/invite/list 全局邀请管理接口,支持按 邀请人/被邀请人筛选和搜索,返回邀请关系及权益聚合数据。 共用 QueryBenefits 批量查询防 N+1,分页上限 100。 Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
+44
-8
@@ -3800,17 +3800,25 @@ type GetAdminUserInviteStatsResponse struct {
|
||||
}
|
||||
|
||||
type GetAdminUserInviteListRequest struct {
|
||||
UserId int64 `form:"user_id" validate:"required"`
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
UserId int64 `form:"user_id" validate:"required"`
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
Search string `form:"search"`
|
||||
Enable *int `form:"enable"`
|
||||
UserIdSearch int64 `form:"user_id_search"`
|
||||
}
|
||||
|
||||
type AdminInvitedUser struct {
|
||||
Id int64 `json:"id"`
|
||||
Avatar string `json:"avatar"`
|
||||
Identifier string `json:"identifier"`
|
||||
Enable bool `json:"enable"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
Id int64 `json:"id"`
|
||||
Avatar string `json:"avatar"`
|
||||
Identifier string `json:"identifier"`
|
||||
Enable bool `json:"enable"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
OrderCount int64 `json:"order_count"`
|
||||
HasPurchased bool `json:"has_purchased"`
|
||||
InviterCommission int64 `json:"inviter_commission"`
|
||||
InviterGiftDays int64 `json:"inviter_gift_days"`
|
||||
InviteeGiftDays int64 `json:"invitee_gift_days"`
|
||||
}
|
||||
|
||||
type GetAdminUserInviteListResponse struct {
|
||||
@@ -3818,6 +3826,34 @@ type GetAdminUserInviteListResponse struct {
|
||||
List []AdminInvitedUser `json:"list"`
|
||||
}
|
||||
|
||||
type GetInviteManageListRequest struct {
|
||||
Page int `form:"page"`
|
||||
Size int `form:"size"`
|
||||
Search string `form:"search"`
|
||||
InviterId int64 `form:"inviter_id"`
|
||||
InviteeId int64 `form:"invitee_id"`
|
||||
}
|
||||
|
||||
type InviteManageRecord struct {
|
||||
InviterId int64 `json:"inviter_id"`
|
||||
InviterIdentifier string `json:"inviter_identifier"`
|
||||
InviteeId int64 `json:"invitee_id"`
|
||||
InviteeIdentifier string `json:"invitee_identifier"`
|
||||
InviteeAvatar string `json:"invitee_avatar"`
|
||||
InviteeEnable bool `json:"invitee_enable"`
|
||||
InvitedAt int64 `json:"invited_at"`
|
||||
OrderCount int64 `json:"order_count"`
|
||||
HasPurchased bool `json:"has_purchased"`
|
||||
InviterCommission int64 `json:"inviter_commission"`
|
||||
InviterGiftDays int64 `json:"inviter_gift_days"`
|
||||
InviteeGiftDays int64 `json:"invitee_gift_days"`
|
||||
}
|
||||
|
||||
type GetInviteManageListResponse struct {
|
||||
Total int64 `json:"total"`
|
||||
List []InviteManageRecord `json:"list"`
|
||||
}
|
||||
|
||||
type GetLogMessageRawRequest struct {
|
||||
Id int64 `form:"id" validate:"required"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user