下面是Spring模型类,如下所示,我使用Spring数据模块来保存attachment
集合中的文档
@Document(collection = "attachment")
class Attachment {
@Id
private String id
private String fileName, attachment
private Calendar createdAt, updatedAt
}
以下是mongo db(createdAt
)中version 3.4.14
的值
我不确定如何在mongo中查询java日历实例,createdAt
值大于2018-01-01T00:00:00.000Z
,有人可以帮助我吗?
createdAt:{
"_class":"java.util.GregorianCalendar",
"gregorianCutover":NumberLong(-12219292800000),
"gregorianCutoverDate":NumberLong(577736),
"gregorianCutoverYear":1582,
"gregorianCutoverYearJulian":1582,
"gdate":{
"_class":"sun.util.calendar.Gregorian$Date",
"cachedYear":2018,
"cachedFixedDateJan1":NumberLong(736695),
"cachedFixedDateNextJan1":NumberLong(737060),
"year":2018,
"month":3,
"dayOfMonth":12,
"dayOfWeek":2,
"leapYear":false,
"hours":0,
"minutes":0,
"seconds":0,
"millis":0,
"fraction":NumberLong(0),
"normalized":true,
"zoneinfo":{
"_class":"sun.util.calendar.ZoneInfo",
"rawOffset":-28800000,
"rawOffsetDiff":0,
"checksum":-2115702508,
"dstSavings":3600000,
"transitions":[
NumberLong(-9048018124800000),
NumberLong(-6689872281599967),
NumberLong(-6615569203200000),
NumberLong(-6561054719999967),
NumberLong(-6486751641600000),
NumberLong(-3605328691199967),
NumberLong(-3135017779200000),
NumberLong(-2817913651199967),
NumberLong(-2714237337600000),
NumberLong(-2542937702399967),
NumberLong(-2490929971200000),
NumberLong(-2414120140799967),
NumberLong(-2359635148800000),
NumberLong(-2285302579199967),
NumberLong(-2230817587200000),
NumberLong(-2156485017599967),
NumberLong(-2102000025600000),
NumberLong(-2027667455999967),
NumberLong(-1973182464000000),
NumberLong(-1898849894399967),
NumberLong(-1844364902400000),
NumberLong(-1767555071999967),
NumberLong(-1713070080000000),
NumberLong(-1638737510399967),
NumberLong(-1584252518400000),
NumberLong(-1509919948799967),
NumberLong(-1455434956800000),
NumberLong(-1381102387199967),
NumberLong(-1326617395200000),
NumberLong(-1252284825599967),
NumberLong(-1197799833600000),
NumberLong(-1120990003199967),
NumberLong(-1068982272000000),
NumberLong(-992172441599967),
NumberLong(-927778406400000),
NumberLong(-863354879999967),
NumberLong(-798960844800000),
NumberLong(-734537318399967),
NumberLong(-670143283200000),
NumberLong(-605719756799967),
NumberLong(-538848460800000),
NumberLong(-476902195199967),
NumberLong(-410030899200000),
NumberLong(-345607372799967),
NumberLong(-281213337600000),
NumberLong(-216789811199967),
NumberLong(-152395776000000),
NumberLong(-87972249599967),
NumberLong(-23578214400000),
NumberLong(40845312000033),
NumberLong(105239347200000),
NumberLong(169662873600033),
NumberLong(236534169600000),
NumberLong(300957696000033),
NumberLong(365351731200000),
NumberLong(429775257600033),
NumberLong(494169292800000),
NumberLong(518956646400033),
NumberLong(622986854400000),
NumberLong(665115033600033),
NumberLong(751804416000000),
NumberLong(816227942400033),
NumberLong(883099238400000),
NumberLong(945045504000033),
NumberLong(1011916800000000),
NumberLong(1076340326400033),
NumberLong(1140734361600000),
NumberLong(1205157888000033),
NumberLong(1269551923200000),
NumberLong(1333975449600033),
NumberLong(1398369484800000),
NumberLong(1462793011200033),
NumberLong(1527187046400000),
NumberLong(1591610572800033),
NumberLong(1658481868800000),
NumberLong(1720428134400033),
NumberLong(1787299430400000),
NumberLong(1851722956800033),
NumberLong(1916116992000000),
NumberLong(1980540518400033),
NumberLong(2044934553600000),
NumberLong(2109358080000033),
NumberLong(2173752115200000),
NumberLong(2230743859200033),
NumberLong(2302569676800000),
NumberLong(2359561420800033),
NumberLong(2433864499200000),
NumberLong(2488378982400033),
NumberLong(2562682060800000),
NumberLong(2617196544000033),
NumberLong(2691499622400000),
NumberLong(2748491366400033),
NumberLong(2820317184000000),
NumberLong(2877308928000033),
NumberLong(2949134745600000),
NumberLong(3006126489600033),
NumberLong(3080429568000000),
NumberLong(3134944051200033),
NumberLong(3209247129600000),
NumberLong(3263761612800033),
NumberLong(3338064691200000),
NumberLong(3395056435200033),
NumberLong(3466882252800000),
NumberLong(3523873996800033),
NumberLong(3595699814400000),
NumberLong(3652691558400033),
NumberLong(3724517376000000),
NumberLong(3781509120000033),
NumberLong(3855812198400000),
NumberLong(3910326681600033),
NumberLong(3984629760000000),
NumberLong(4039144243200033),
NumberLong(4113447321600000),
NumberLong(4170439065600033),
NumberLong(4242264883200000),
NumberLong(4299256627200033),
NumberLong(4371082444800000),
NumberLong(4428074188800033),
NumberLong(4502377267200000),
NumberLong(4556891750400033),
NumberLong(4631194828800000),
NumberLong(4685709312000033),
NumberLong(4760012390400000),
NumberLong(4807095091200033),
NumberLong(4891307212800000),
NumberLong(4935912652800033),
NumberLong(5020124774400000),
NumberLong(5064730214400033),
NumberLong(5148942336000000),
NumberLong(5196025036800033),
NumberLong(5280237158400000),
NumberLong(5324842598400033),
NumberLong(5409054720000000),
NumberLong(5453660160000033),
NumberLong(5537872281600000),
NumberLong(5582477721600033),
NumberLong(5666689843200000),
NumberLong(5711295283200033),
NumberLong(5795507404800000),
NumberLong(5840112844800033),
NumberLong(5924324966400000),
NumberLong(5971407667200033),
NumberLong(6055619788800000),
NumberLong(6100225228800033),
NumberLong(6184437350400000),
NumberLong(6229042790400033),
NumberLong(6313254912000000),
NumberLong(6357860352000033),
NumberLong(6442072473600000),
NumberLong(6486677913600033),
NumberLong(6570890035200000),
NumberLong(6617972736000033),
NumberLong(6702184857600000),
NumberLong(6746790297600033),
NumberLong(6831002419200000),
NumberLong(6875607859200033),
NumberLong(6959819980800000),
NumberLong(7004425420800033),
NumberLong(7088637542400000),
NumberLong(7133242982400033),
NumberLong(7217455104000000),
NumberLong(7262060544000033),
NumberLong(7346272665600000),
NumberLong(7393355366400033),
NumberLong(7477567488000000),
NumberLong(7522172928000033),
NumberLong(7606385049600000),
NumberLong(7650990489600033),
NumberLong(7735202611200000),
NumberLong(7779808051200033),
NumberLong(7864020172800000),
NumberLong(7908625612800033),
NumberLong(7992837734400000),
NumberLong(8039920435200033),
NumberLong(8124132556800000),
NumberLong(8168737996800033),
NumberLong(8252950118400000),
NumberLong(8297555558400033),
NumberLong(8381767680000000),
NumberLong(8426373120000033),
NumberLong(8510585241600000),
NumberLong(8555190681600033),
NumberLong(8639402803200000),
NumberLong(8684008243200033),
NumberLong(8768220364800000)
],
"offsets":[
-28800000,
-25200000,
3600000
],
"simpleTimeZoneParams":[
2,
8,
-1,
7200000,
0,
10,
1,
-1,
7200000,
0
],
"willGMTOffsetChange":false,
"dirty":false,
"ID":"America/Los_Angeles"
},
"zoneOffset":0,
"daylightSaving":0,
"forceStandardTime":false
},
"cdate":{
"_class":"sun.util.calendar.Gregorian$Date",
"cachedYear":2018,
"cachedFixedDateJan1":NumberLong(736695),
"cachedFixedDateNextJan1":NumberLong(737060),
"year":2018,
"month":3,
"dayOfMonth":12,
"dayOfWeek":2,
"leapYear":false,
"hours":0,
"minutes":0,
"seconds":0,
"millis":0,
"fraction":NumberLong(0),
"normalized":true,
"zoneinfo":{
"_class":"sun.util.calendar.ZoneInfo",
"rawOffset":-28800000,
"rawOffsetDiff":0,
"checksum":-2115702508,
"dstSavings":3600000,
"transitions":[
NumberLong(-9048018124800000),
NumberLong(-6689872281599967),
NumberLong(-6615569203200000),
NumberLong(-6561054719999967),
NumberLong(-6486751641600000),
NumberLong(-3605328691199967),
NumberLong(-3135017779200000),
NumberLong(-2817913651199967),
NumberLong(-2714237337600000),
NumberLong(-2542937702399967),
NumberLong(-2490929971200000),
NumberLong(-2414120140799967),
NumberLong(-2359635148800000),
NumberLong(-2285302579199967),
NumberLong(-2230817587200000),
NumberLong(-2156485017599967),
NumberLong(-2102000025600000),
NumberLong(-2027667455999967),
NumberLong(-1973182464000000),
NumberLong(-1898849894399967),
NumberLong(-1844364902400000),
NumberLong(-1767555071999967),
NumberLong(-1713070080000000),
NumberLong(-1638737510399967),
NumberLong(-1584252518400000),
NumberLong(-1509919948799967),
NumberLong(-1455434956800000),
NumberLong(-1381102387199967),
NumberLong(-1326617395200000),
NumberLong(-1252284825599967),
NumberLong(-1197799833600000),
NumberLong(-1120990003199967),
NumberLong(-1068982272000000),
NumberLong(-992172441599967),
NumberLong(-927778406400000),
NumberLong(-863354879999967),
NumberLong(-798960844800000),
NumberLong(-734537318399967),
NumberLong(-670143283200000),
NumberLong(-605719756799967),
NumberLong(-538848460800000),
NumberLong(-476902195199967),
NumberLong(-410030899200000),
NumberLong(-345607372799967),
NumberLong(-281213337600000),
NumberLong(-216789811199967),
NumberLong(-152395776000000),
NumberLong(-87972249599967),
NumberLong(-23578214400000),
NumberLong(40845312000033),
NumberLong(105239347200000),
NumberLong(169662873600033),
NumberLong(236534169600000),
NumberLong(300957696000033),
NumberLong(365351731200000),
NumberLong(429775257600033),
NumberLong(494169292800000),
NumberLong(518956646400033),
NumberLong(622986854400000),
NumberLong(665115033600033),
NumberLong(751804416000000),
NumberLong(816227942400033),
NumberLong(883099238400000),
NumberLong(945045504000033),
NumberLong(1011916800000000),
NumberLong(1076340326400033),
NumberLong(1140734361600000),
NumberLong(1205157888000033),
NumberLong(1269551923200000),
NumberLong(1333975449600033),
NumberLong(1398369484800000),
NumberLong(1462793011200033),
NumberLong(1527187046400000),
NumberLong(1591610572800033),
NumberLong(1658481868800000),
NumberLong(1720428134400033),
NumberLong(1787299430400000),
NumberLong(1851722956800033),
NumberLong(1916116992000000),
NumberLong(1980540518400033),
NumberLong(2044934553600000),
NumberLong(2109358080000033),
NumberLong(2173752115200000),
NumberLong(2230743859200033),
NumberLong(2302569676800000),
NumberLong(2359561420800033),
NumberLong(2433864499200000),
NumberLong(2488378982400033),
NumberLong(2562682060800000),
NumberLong(2617196544000033),
NumberLong(2691499622400000),
NumberLong(2748491366400033),
NumberLong(2820317184000000),
NumberLong(2877308928000033),
NumberLong(2949134745600000),
NumberLong(3006126489600033),
NumberLong(3080429568000000),
NumberLong(3134944051200033),
NumberLong(3209247129600000),
NumberLong(3263761612800033),
NumberLong(3338064691200000),
NumberLong(3395056435200033),
NumberLong(3466882252800000),
NumberLong(3523873996800033),
NumberLong(3595699814400000),
NumberLong(3652691558400033),
NumberLong(3724517376000000),
NumberLong(3781509120000033),
NumberLong(3855812198400000),
NumberLong(3910326681600033),
NumberLong(3984629760000000),
NumberLong(4039144243200033),
NumberLong(4113447321600000),
NumberLong(4170439065600033),
NumberLong(4242264883200000),
NumberLong(4299256627200033),
NumberLong(4371082444800000),
NumberLong(4428074188800033),
NumberLong(4502377267200000),
NumberLong(4556891750400033),
NumberLong(4631194828800000),
NumberLong(4685709312000033),
NumberLong(4760012390400000),
NumberLong(4807095091200033),
NumberLong(4891307212800000),
NumberLong(4935912652800033),
NumberLong(5020124774400000),
NumberLong(5064730214400033),
NumberLong(5148942336000000),
NumberLong(5196025036800033),
NumberLong(5280237158400000),
NumberLong(5324842598400033),
NumberLong(5409054720000000),
NumberLong(5453660160000033),
NumberLong(5537872281600000),
NumberLong(5582477721600033),
NumberLong(5666689843200000),
NumberLong(5711295283200033),
NumberLong(5795507404800000),
NumberLong(5840112844800033),
NumberLong(5924324966400000),
NumberLong(5971407667200033),
NumberLong(6055619788800000),
NumberLong(6100225228800033),
NumberLong(6184437350400000),
NumberLong(6229042790400033),
NumberLong(6313254912000000),
NumberLong(6357860352000033),
NumberLong(6442072473600000),
NumberLong(6486677913600033),
NumberLong(6570890035200000),
NumberLong(6617972736000033),
NumberLong(6702184857600000),
NumberLong(6746790297600033),
NumberLong(6831002419200000),
NumberLong(6875607859200033),
NumberLong(6959819980800000),
NumberLong(7004425420800033),
NumberLong(7088637542400000),
NumberLong(7133242982400033),
NumberLong(7217455104000000),
NumberLong(7262060544000033),
NumberLong(7346272665600000),
NumberLong(7393355366400033),
NumberLong(7477567488000000),
NumberLong(7522172928000033),
NumberLong(7606385049600000),
NumberLong(7650990489600033),
NumberLong(7735202611200000),
NumberLong(7779808051200033),
NumberLong(7864020172800000),
NumberLong(7908625612800033),
NumberLong(7992837734400000),
NumberLong(8039920435200033),
NumberLong(8124132556800000),
NumberLong(8168737996800033),
NumberLong(8252950118400000),
NumberLong(8297555558400033),
NumberLong(8381767680000000),
NumberLong(8426373120000033),
NumberLong(8510585241600000),
NumberLong(8555190681600033),
NumberLong(8639402803200000),
NumberLong(8684008243200033),
NumberLong(8768220364800000)
],
"offsets":[
-28800000,
-25200000,
3600000
],
"simpleTimeZoneParams":[
2,
8,
-1,
7200000,
0,
10,
1,
-1,
7200000,
0
],
"willGMTOffsetChange":false,
"dirty":false,
"ID":"America/Los_Angeles"
},
"zoneOffset":0,
"daylightSaving":0,
"forceStandardTime":false
},
"calsys":{
"_class":"sun.util.calendar.Gregorian"
},
"zoneOffsets":[
-28800000,
3600000
],
"cachedFixedDate":NumberLong(736765),
"fields":[
1,
2018,
2,
11,
3,
12,
71,
2,
2,
0,
9,
9,
40,
38,
897,
-28800000,
3600000
],
"isSet":[
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true
],
"stamp":[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
"time":NumberLong(1520872838897),
"isTimeSet":true,
"areFieldsSet":true,
"areAllFieldsSet":true,
"lenient":true,
"zone":{
"_class":"sun.util.calendar.ZoneInfo",
"rawOffset":-28800000,
"rawOffsetDiff":0,
"checksum":-2115702508,
"dstSavings":3600000,
"transitions":[
NumberLong(-9048018124800000),
NumberLong(-6689872281599967),
NumberLong(-6615569203200000),
NumberLong(-6561054719999967),
NumberLong(-6486751641600000),
NumberLong(-3605328691199967),
NumberLong(-3135017779200000),
NumberLong(-2817913651199967),
NumberLong(-2714237337600000),
NumberLong(-2542937702399967),
NumberLong(-2490929971200000),
NumberLong(-2414120140799967),
NumberLong(-2359635148800000),
NumberLong(-2285302579199967),
NumberLong(-2230817587200000),
NumberLong(-2156485017599967),
NumberLong(-2102000025600000),
NumberLong(-2027667455999967),
NumberLong(-1973182464000000),
NumberLong(-1898849894399967),
NumberLong(-1844364902400000),
NumberLong(-1767555071999967),
NumberLong(-1713070080000000),
NumberLong(-1638737510399967),
NumberLong(-1584252518400000),
NumberLong(-1509919948799967),
NumberLong(-1455434956800000),
NumberLong(-1381102387199967),
NumberLong(-1326617395200000),
NumberLong(-1252284825599967),
NumberLong(-1197799833600000),
NumberLong(-1120990003199967),
NumberLong(-1068982272000000),
NumberLong(-992172441599967),
NumberLong(-927778406400000),
NumberLong(-863354879999967),
NumberLong(-798960844800000),
NumberLong(-734537318399967),
NumberLong(-670143283200000),
NumberLong(-605719756799967),
NumberLong(-538848460800000),
NumberLong(-476902195199967),
NumberLong(-410030899200000),
NumberLong(-345607372799967),
NumberLong(-281213337600000),
NumberLong(-216789811199967),
NumberLong(-152395776000000),
NumberLong(-87972249599967),
NumberLong(-23578214400000),
NumberLong(40845312000033),
NumberLong(105239347200000),
NumberLong(169662873600033),
NumberLong(236534169600000),
NumberLong(300957696000033),
NumberLong(365351731200000),
NumberLong(429775257600033),
NumberLong(494169292800000),
NumberLong(518956646400033),
NumberLong(622986854400000),
NumberLong(665115033600033),
NumberLong(751804416000000),
NumberLong(816227942400033),
NumberLong(883099238400000),
NumberLong(945045504000033),
NumberLong(1011916800000000),
NumberLong(1076340326400033),
NumberLong(1140734361600000),
NumberLong(1205157888000033),
NumberLong(1269551923200000),
NumberLong(1333975449600033),
NumberLong(1398369484800000),
NumberLong(1462793011200033),
NumberLong(1527187046400000),
NumberLong(1591610572800033),
NumberLong(1658481868800000),
NumberLong(1720428134400033),
NumberLong(1787299430400000),
NumberLong(1851722956800033),
NumberLong(1916116992000000),
NumberLong(1980540518400033),
NumberLong(2044934553600000),
NumberLong(2109358080000033),
NumberLong(2173752115200000),
NumberLong(2230743859200033),
NumberLong(2302569676800000),
NumberLong(2359561420800033),
NumberLong(2433864499200000),
NumberLong(2488378982400033),
NumberLong(2562682060800000),
NumberLong(2617196544000033),
NumberLong(2691499622400000),
NumberLong(2748491366400033),
NumberLong(2820317184000000),
NumberLong(2877308928000033),
NumberLong(2949134745600000),
NumberLong(3006126489600033),
NumberLong(3080429568000000),
NumberLong(3134944051200033),
NumberLong(3209247129600000),
NumberLong(3263761612800033),
NumberLong(3338064691200000),
NumberLong(3395056435200033),
NumberLong(3466882252800000),
NumberLong(3523873996800033),
NumberLong(3595699814400000),
NumberLong(3652691558400033),
NumberLong(3724517376000000),
NumberLong(3781509120000033),
NumberLong(3855812198400000),
NumberLong(3910326681600033),
NumberLong(3984629760000000),
NumberLong(4039144243200033),
NumberLong(4113447321600000),
NumberLong(4170439065600033),
NumberLong(4242264883200000),
NumberLong(4299256627200033),
NumberLong(4371082444800000),
NumberLong(4428074188800033),
NumberLong(4502377267200000),
NumberLong(4556891750400033),
NumberLong(4631194828800000),
NumberLong(4685709312000033),
NumberLong(4760012390400000),
NumberLong(4807095091200033),
NumberLong(4891307212800000),
NumberLong(4935912652800033),
NumberLong(5020124774400000),
NumberLong(5064730214400033),
NumberLong(5148942336000000),
NumberLong(5196025036800033),
NumberLong(5280237158400000),
NumberLong(5324842598400033),
NumberLong(5409054720000000),
NumberLong(5453660160000033),
NumberLong(5537872281600000),
NumberLong(5582477721600033),
NumberLong(5666689843200000),
NumberLong(5711295283200033),
NumberLong(5795507404800000),
NumberLong(5840112844800033),
NumberLong(5924324966400000),
NumberLong(5971407667200033),
NumberLong(6055619788800000),
NumberLong(6100225228800033),
NumberLong(6184437350400000),
NumberLong(6229042790400033),
NumberLong(6313254912000000),
NumberLong(6357860352000033),
NumberLong(6442072473600000),
NumberLong(6486677913600033),
NumberLong(6570890035200000),
NumberLong(6617972736000033),
NumberLong(6702184857600000),
NumberLong(6746790297600033),
NumberLong(6831002419200000),
NumberLong(6875607859200033),
NumberLong(6959819980800000),
NumberLong(7004425420800033),
NumberLong(7088637542400000),
NumberLong(7133242982400033),
NumberLong(7217455104000000),
NumberLong(7262060544000033),
NumberLong(7346272665600000),
NumberLong(7393355366400033),
NumberLong(7477567488000000),
NumberLong(7522172928000033),
NumberLong(7606385049600000),
NumberLong(7650990489600033),
NumberLong(7735202611200000),
NumberLong(7779808051200033),
NumberLong(7864020172800000),
NumberLong(7908625612800033),
NumberLong(7992837734400000),
NumberLong(8039920435200033),
NumberLong(8124132556800000),
NumberLong(8168737996800033),
NumberLong(8252950118400000),
NumberLong(8297555558400033),
NumberLong(8381767680000000),
NumberLong(8426373120000033),
NumberLong(8510585241600000),
NumberLong(8555190681600033),
NumberLong(8639402803200000),
NumberLong(8684008243200033),
NumberLong(8768220364800000)
],
"offsets":[
-28800000,
-25200000,
3600000
],
"simpleTimeZoneParams":[
2,
8,
-1,
7200000,
0,
10,
1,
-1,
7200000,
0
],
"willGMTOffsetChange":false,
"dirty":false,
"ID":"America/Los_Angeles"
},
"sharedZone":false,
"firstDayOfWeek":1,
"minimalDaysInFirstWeek":1,
"nextStamp":2,
"serialVersionOnStream":1
}