feat: 迁移渠道画像累计指标和玩家付费分层
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user