diff --git a/internal/interface/repository/account.go b/internal/interface/repository/account.go index 8386235..75142cb 100644 --- a/internal/interface/repository/account.go +++ b/internal/interface/repository/account.go @@ -431,16 +431,16 @@ func (receiver *AccountRepository) QuizLogoStat(ctx context.Context, req QuizLog {"$match", bson.D{ {"createdAt", bson.D{{"$gte", time.Unix(int64(*req.From), 0)}}}, {"createdAt", bson.D{{"$lte", time.Unix(int64(*req.To), 0)}}}, - {"from", bson.D{{"$exists", true}}}, - {"partner", bson.D{{"$exists", true}}}, + {"from", bson.D{{"$exists", true}, {"$ne", ""}}}, + {"partner", bson.D{{"$exists", true}, {"$ne", ""}}}, }}, } pipeline = append(pipeline, match) } else { match := bson.D{ {"$match", bson.D{ - {"from", bson.D{{"$exists", true}}}, - {"partner", bson.D{{"$exists", true}}}, + {"from", bson.D{{"$exists", true}, {"$ne", ""}}}, + {"partner", bson.D{{"$exists", true}, {"$ne", ""}}}, }}, } pipeline = append(pipeline, match)