使用spring-data-mongo查詢-使用條件過濾數據


  • cid:1:privileges:groups:find


    本帖下載内容已隐藏,请登入以查看隐藏内容!
     ,得到返回的結果如下:

    "年齡6 的資料": [{
        "id": "58e70ebd1db1d94118453849",
        "age": 6,
        "firstName": "ken6",
        "lastName": "chen6",
        "email": "6123@163.com",
        "mobilePhone": "130012312346",
        "birthday": 1491537597006,
        "createDateTime": 1491537597006,
        "status": 0
    }]
    
    "年齡6,12 的資料": [{
        "id": "58e70ebd1db1d94118453849",
        "age": 6,
        "firstName": "ken6",
        "lastName": "chen6",
        "email": "6123@163.com",
        "mobilePhone": "130012312346",
        "birthday": 1491537597006,
        "createDateTime": 1491537597006,
        "status": 0
    },
    {
        "id": "58e70ebd1db1d9411845384f",
        "age": 12,
        "firstName": "ken12",
        "lastName": "chen12",
        "email": "12123@163.com",
        "mobilePhone": "1300123123412",
        "birthday": 1491537597006,
        "createDateTime": 1491537597006,
        "status": 0
    }
    
    "年齡6的且firstName是ken6 的資料": [{
        "id": "58e70ebd1db1d94118453849",
        "age": 6,
        "firstName": "ken6",
        "lastName": "chen6",
        "email": "6123@163.com",
        "mobilePhone": "130012312346",
        "birthday": 1491537597006,
        "createDateTime": 1491537597006,
        "status": 0
    }]
    "找出年齡大於12 的資料": [{
            "id": "58e70ebd1db1d94118453850",
            "age": 13,
            "firstName": "ken13",
            "lastName": "chen13",
            "email": "13123@163.com",
            "mobilePhone": "1300123123413",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453851",
            "age": 14,
            "firstName": "ken14",
            "lastName": "chen14",
            "email": "14123@163.com",
            "mobilePhone": "1300123123414",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453852",
            "age": 15,
            "firstName": "ken15",
            "lastName": "chen15",
            "email": "15123@163.com",
            "mobilePhone": "1300123123415",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453853",
            "age": 16,
            "firstName": "ken16",
            "lastName": "chen16",
            "email": "16123@163.com",
            "mobilePhone": "1300123123416",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453854",
            "age": 17,
            "firstName": "ken17",
            "lastName": "chen17",
            "email": "17123@163.com",
            "mobilePhone": "1300123123417",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453855",
            "age": 18,
            "firstName": "ken18",
            "lastName": "chen18",
            "email": "18123@163.com",
            "mobilePhone": "1300123123418",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453856",
            "age": 19,
            "firstName": "ken19",
            "lastName": "chen19",
            "email": "19123@163.com",
            "mobilePhone": "1300123123419",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        }]
    
    "年齡大於等於12 的資料": [{
            "id": "58e70ebd1db1d9411845384f",
            "age": 12,
            "firstName": "ken12",
            "lastName": "chen12",
            "email": "12123@163.com",
            "mobilePhone": "1300123123412",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453850",
            "age": 13,
            "firstName": "ken13",
            "lastName": "chen13",
            "email": "13123@163.com",
            "mobilePhone": "1300123123413",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453851",
            "age": 14,
            "firstName": "ken14",
            "lastName": "chen14",
            "email": "14123@163.com",
            "mobilePhone": "1300123123414",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453852",
            "age": 15,
            "firstName": "ken15",
            "lastName": "chen15",
            "email": "15123@163.com",
            "mobilePhone": "1300123123415",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453853",
            "age": 16,
            "firstName": "ken16",
            "lastName": "chen16",
            "email": "16123@163.com",
            "mobilePhone": "1300123123416",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453854",
            "age": 17,
            "firstName": "ken17",
            "lastName": "chen17",
            "email": "17123@163.com",
            "mobilePhone": "1300123123417",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453855",
            "age": 18,
            "firstName": "ken18",
            "lastName": "chen18",
            "email": "18123@163.com",
            "mobilePhone": "1300123123418",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453856",
            "age": 19,
            "firstName": "ken19",
            "lastName": "chen19",
            "email": "19123@163.com",
            "mobilePhone": "1300123123419",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        }]
    
    "找出年齡小於6 的資料": [{
            "id": "58e70ebd1db1d94118453844",
            "age": 1,
            "firstName": "ken1",
            "lastName": "chen1",
            "email": "1123@163.com",
            "mobilePhone": "130012312341",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453845",
            "age": 2,
            "firstName": "ken2",
            "lastName": "chen2",
            "email": "2123@163.com",
            "mobilePhone": "130012312342",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453846",
            "age": 3,
            "firstName": "ken3",
            "lastName": "chen3",
            "email": "3123@163.com",
            "mobilePhone": "130012312343",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453847",
            "age": 4,
            "firstName": "ken4",
            "lastName": "chen4",
            "email": "4123@163.com",
            "mobilePhone": "130012312344",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453848",
            "age": 5,
            "firstName": "ken5",
            "lastName": "chen5",
            "email": "5123@163.com",
            "mobilePhone": "130012312345",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        }]
    
    "找出年齡小於等於6 的資料": [{
            "id": "58e70ebd1db1d94118453844",
            "age": 1,
            "firstName": "ken1",
            "lastName": "chen1",
            "email": "1123@163.com",
            "mobilePhone": "130012312341",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453845",
            "age": 2,
            "firstName": "ken2",
            "lastName": "chen2",
            "email": "2123@163.com",
            "mobilePhone": "130012312342",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453846",
            "age": 3,
            "firstName": "ken3",
            "lastName": "chen3",
            "email": "3123@163.com",
            "mobilePhone": "130012312343",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453847",
            "age": 4,
            "firstName": "ken4",
            "lastName": "chen4",
            "email": "4123@163.com",
            "mobilePhone": "130012312344",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453848",
            "age": 5,
            "firstName": "ken5",
            "lastName": "chen5",
            "email": "5123@163.com",
            "mobilePhone": "130012312345",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d94118453849",
            "age": 6,
            "firstName": "ken6",
            "lastName": "chen6",
            "email": "6123@163.com",
            "mobilePhone": "130012312346",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        }]
    
    "找出年齡大於等於6小於12 的資料": [{
            "id": "58e70ebd1db1d94118453849",
            "age": 6,
            "firstName": "ken6",
            "lastName": "chen6",
            "email": "6123@163.com",
            "mobilePhone": "130012312346",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d9411845384a",
            "age": 7,
            "firstName": "ken7",
            "lastName": "chen7",
            "email": "7123@163.com",
            "mobilePhone": "130012312347",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d9411845384b",
            "age": 8,
            "firstName": "ken8",
            "lastName": "chen8",
            "email": "8123@163.com",
            "mobilePhone": "130012312348",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d9411845384c",
            "age": 9,
            "firstName": "ken9",
            "lastName": "chen9",
            "email": "9123@163.com",
            "mobilePhone": "130012312349",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d9411845384d",
            "age": 10,
            "firstName": "ken10",
            "lastName": "chen10",
            "email": "10123@163.com",
            "mobilePhone": "1300123123410",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        },
        {
            "id": "58e70ebd1db1d9411845384e",
            "age": 11,
            "firstName": "ken11",
            "lastName": "chen11",
            "email": "11123@163.com",
            "mobilePhone": "1300123123411",
            "birthday": 1491537597006,
            "createDateTime": 1491537597006,
            "status": 0
        }]
    

  • 註冊用戶

    想看~快給我看~芝麻開門


  • 註冊用戶

    芝麻開門,快給我看吧


  • Lv 1

    開啟重要的片段吧....


  • 註冊用戶

    芝麻開門,快給我看吧


  • Lv 1

    看到重要部分竟然發現被隱藏,  重現光明吧


  • 註冊用戶

    想看~快給我看~芝麻開門


  • 註冊用戶

    想看~快給我看~芝麻開門


  • 註冊用戶

    芝麻開門,快給我看吧


  • 註冊用戶

    感谢分享,学习一下


  • 註冊用戶

    芝麻开门!!!!!!!!!!!!!


  • 註冊用戶

    芝麻开门~芝麻开门


  • 註冊用戶

    芝麻开门开门快开门


  • 註冊用戶

    想看~快給我看~芝麻開門


  • 註冊用戶

    想看~快給我看~芝麻開門


  • 註冊用戶

    本帖下載内容已隐藏,请登入以查看隐藏内容!
    4月之前

    想看~快給我看~芝麻開門


  • 註冊用戶

    值得学习借鉴一下~~~


  • 註冊用戶

    hshades的方式分都是奋斗史肌肤的水分


  • 註冊用戶

    很好的分享内容。。。。


  • 註冊用戶

    内容很好,我要看全部


登录后回复
 

与 萌阔论坛 的连接断开,我们正在尝试重连,请耐心等待