feat: add object storage and points leaderboard
This commit is contained in:
@@ -110,11 +110,11 @@ type MemberLevel struct {
|
||||
}
|
||||
|
||||
type LeaderboardEntry struct {
|
||||
Rank int `json:"rank"`
|
||||
Username string `json:"username"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
CompletedCount int64 `json:"completed_count"`
|
||||
Status string `json:"status"`
|
||||
Rank int `json:"rank"`
|
||||
Username string `json:"username"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
ClaimedPoints int64 `json:"claimed_points"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type CustomerService struct {
|
||||
@@ -287,7 +287,7 @@ func (s *Service) Leaderboard(ctx context.Context, tenantID int64) ([]Leaderboar
|
||||
items := make([]LeaderboardEntry, 0, len(rows))
|
||||
for index, row := range rows {
|
||||
items = append(items, LeaderboardEntry{Rank: index + 1, Username: maskedUsername(row.Username),
|
||||
AvatarURL: row.AvatarURL, CompletedCount: row.CompletedCount, Status: "领取成功"})
|
||||
AvatarURL: row.AvatarURL, ClaimedPoints: row.ClaimedPoints, Status: "领取成功"})
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user