|
@@ -35,7 +35,7 @@ func (s *Synthesis) FindMDBUserLogDaily(req entity.UserLogDailyReq) (*entity.Use
|
|
|
defer cancel()
|
|
|
|
|
|
// 指定集合
|
|
|
- collection := mdb.MDB.Collection("playerDailyRecord")
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayerDailyRecord)
|
|
|
|
|
|
// 构建查询条件 - 如果查询值为空那就不添加查询条件
|
|
|
filter := bson.M{}
|
|
@@ -265,7 +265,7 @@ func (s *Synthesis) WithdrawalStatusBatch(req entity.UserWithdrawalStatusBatch)
|
|
|
// 返回值为 UserCountryResp 的切片和错误。
|
|
|
func (s *Synthesis) FindUserCountryCount() (*entity.UserCountryResp, *code.Result) {
|
|
|
// 选择数据库和集合
|
|
|
- collection := mdb.MDB.Collection("playerCountryStat")
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayerCountryByIPStat)
|
|
|
|
|
|
// 定义聚合管道
|
|
|
// 定义聚合管道
|
|
@@ -414,7 +414,7 @@ func (s *Synthesis) FindUserRetention(req entity.UserRetentionReq) (*entity.User
|
|
|
func (s *Synthesis) FindUserLevel() (*entity.UserLevelCountResp, *code.Result) {
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
defer cancel()
|
|
|
- collection := mdb.MDB.Collection("playerLevelStat")
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayerLevelStat)
|
|
|
|
|
|
// 查询所有文档
|
|
|
cursor, err := collection.Find(ctx, bson.M{})
|