You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
440 B
21 lines
440 B
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) |
|
}
|
|
|