Exemplo n.º 1
0
    public override OpRes doQuery(object param, GMUser user)
    {
        m_result.Clear();
        m_cond.startQuery();
        OpRes res = makeQuery(param, user, m_cond);
        if (res != OpRes.opres_success)
            return res;

        IMongoQuery imq = m_cond.getImq();
        ParamQueryRecharge p = (ParamQueryRecharge)param;
        return query(p, imq, m_rbase, user);
    }
    public override OpRes doQuery(object param, GMUser user)
    {
        m_result.Clear();
        m_cond.startQuery();
        OpRes res = makeQuery(param, user, m_cond);

        if (res != OpRes.opres_success)
        {
            return(res);
        }

        IMongoQuery imq = m_cond.getImq();

        ParamSearch p = (ParamSearch)param;

        return(query(p, imq, user, TableName.DAILY_ACCOUNT_CREATE, DbName.DB_ACCOUNT));
    }
Exemplo n.º 3
0
    // 开始统计
    public override OpRes doStat(object param, GMUser user)
    {
        m_result.Clear();
        m_cond.startQuery();
        OpRes res = makeQuery(param, user, m_cond);

        if (res != OpRes.opres_success)
        {
            return(res);
        }

        ParamQuery p = (ParamQuery)param;

        if (isSame(p, user))
        {
            return(query(p, null, user));
        }
        else
        {
            m_lastSearchTime = p.m_time;
            m_dbId           = user.getDbServerID();
        }

        IMongoQuery imqTime = m_cond.getImq();

        MapReduceResult map_result = DBMgr.getInstance().executeMapReduce(TableName.STAT_PLAYER_DRAGON,
                                                                          user.getDbServerID(),
                                                                          DbName.DB_PUMP,
                                                                          imqTime,
                                                                          MapReduceTable.getMap("playerDragonBall"),
                                                                          MapReduceTable.getReduce("playerDragonBall"),
                                                                          MapTable);

        if (map_result != null)
        {
            return(query(p, null, user));
        }
        return(OpRes.opres_success);
    }
Exemplo n.º 4
0
    // 开始统计
    public override OpRes doStat(object param, GMUser user)
    {
        m_result.Clear();
        m_cond.startQuery();
        OpRes res = makeQuery(param, user, m_cond);

        if (res != OpRes.opres_success)
        {
            return(res);
        }

        ParamIncomeExpenses p = (ParamIncomeExpenses)param;

        if (isSame(p, user))
        {
            return(query(p, null, user));
        }
        else
        {
            m_lastParam.assign(p, user.getDbServerID());
        }

        IMongoQuery imqTime = m_cond.getImq();

        MapReduceResult map_result = DBMgr.getInstance().executeMapReduce(TableName.STAT_INCOME_EXPENSES,
                                                                          user.getDbServerID(),
                                                                          DbName.DB_PUMP,
                                                                          imqTime,
                                                                          MapReduceTable.getMap("playerIncomeExpenses"),
                                                                          MapReduceTable.getReduce("playerIncomeExpenses"),
                                                                          MapTable);

        if (map_result != null)
        {
            return(query(p, null, user));
        }
        return(OpRes.opres_success);
    }