package models import ( "server/common" "server/db" "github.com/olivere/elastic/v7" ) // 获取玩了游戏的用户数 Gt func GetPlayGameUserCounts(start, end *int64, isNew *bool, channel ...*int) int64 { q := NewQ(start, end, channel...) if isNew != nil { q.Filter(elastic.NewTermQuery("IsNew", *isNew)) } // q.Filter(elastic.NewRangeQuery("PlayCount").Gt(0)) return db.ES().CountCard(common.ESIndexGameData, "UID", q) }