Inheritance: QueryComplete
Beispiel #1
0
        /// <summary>
        /// 按指定条数和查询对象随机数升序获取多条用户皮肤
        /// </summary>
        /// <param name="count">指定条数</param>
        /// <param name="qc">查询对象</param>
        /// <returns>用户皮肤列表</returns>
        private static List<MemberSkin> GetMemberSkins(int count, QueryConditionList qc)
        {
            MongoCursor<MemberSkin> mc = MongoDBHelper.GetCursor<MemberSkin>(
                MemberSkin.GetCollectionName(),
                qc,
                new SortByDocument("Random", 1),
                1,
                count);

            List<MemberSkin> objs = new List<MemberSkin>();
            objs.AddRange(mc);
            return objs;
        }
Beispiel #2
0
        private static List<SystemInterView> getinterview(InterViewType type, int count, String[] exceptobjs, double random, QueryConditionList qc)
        {
            BsonArray bv = new BsonArray();
            foreach(string s in exceptobjs)
            {
                bv.Add(ObjectId.Parse(s));
            }

            MongoCursor<SystemInterView> mc = MongoDBHelper.GetCursor<SystemInterView>(
                    "SystemInterview",
                    Query.And(Query.EQ("type", type), qc, Query.NotIn("_id", bv)),
                    new SortByDocument("Random", 1),
                    1,
                    count);

            List<SystemInterView> objs = new List<SystemInterView>();
            objs.AddRange(mc);
            return objs;
        }
Beispiel #3
0
        private static List<SystemWants> getwants(WantType type, int count, double random, QueryConditionList qc)
        {
            MongoCursor<SystemWants> mc = MongoDBHelper.GetCursor<SystemWants>(
                    "SystemWants",
                    Query.And(Query.EQ("type", type), qc),
                    new SortByDocument("Random", 1),
                    1,
                    count);

            List<SystemWants> objs = new List<SystemWants>();
            objs.AddRange(mc);
            return objs;
        }
Beispiel #4
0
        private static List<SystemManager> GetSystemManagers(int level, QueryConditionList qc)
        {
            MongoCursor<SystemManager> mc = MongoDBHelper.GetCursor<SystemManager>(
                    "SystemManager",
                    Query.EQ("Level", level),
                    new SortByDocument("_id", 1),
                    0,
                    0);

            List<SystemManager> objs = new List<SystemManager>();
            objs.AddRange(mc);
            return objs;
        }