feat: 迁移渠道画像累计指标和玩家付费分层

This commit is contained in:
Yvan
2026-11-03 23:50:05 +08:00
parent 0de822f121
commit f5b7ce21b9
38 changed files with 1424 additions and 37 deletions
+6
View File
@@ -40,6 +40,7 @@ type Channel struct {
BindingAccount, BindingUserName string
GameCount, PlayerCount *int64
TotalPayAmount *string
CreatedUnix, LastLoginUnix *int64
}
func (c *Channel) BusinessDisplayName() string {
@@ -100,6 +101,7 @@ type ChannelGame struct {
type ChannelGameScope struct {
Root *Channel
IncludeSub, IDCardDedup bool
BeginDate string
EndDate string
}
type ChannelRepo interface {
@@ -327,6 +329,10 @@ func (uc *ChannelUsecase) Games(ctx context.Context, key ChannelKey) ([]*Channel
if err != nil {
return nil, err
}
return normalizeChannelGames(games)
}
func normalizeChannelGames(games []*ChannelGame) ([]*ChannelGame, error) {
amounts := map[uint64]*big.Rat{}
for _, game := range games {
game.RegisterCount = min(game.RegisterCount, int64(2147483647))