Commit 863324f9 authored by wangsong's avatar wangsong

fix bsonDocument element null

parent 73c1a8e0
...@@ -220,8 +220,10 @@ public class AuthLogDao extends StaticCacheDimensionDocumentMongoDao<AuthLog, St ...@@ -220,8 +220,10 @@ public class AuthLogDao extends StaticCacheDimensionDocumentMongoDao<AuthLog, St
data.setYearMonthDay(item.getString("yearMonthDay").getValue()); data.setYearMonthDay(item.getString("yearMonthDay").getValue());
} }
if(item.containsKey("hour") ){ if(item.containsKey("hour") ){
if(!item.isNull()){
data.setHour(item.getInt32("hour").getValue()); data.setHour(item.getInt32("hour").getValue());
} }
}
if(item.containsKey("count")){ if(item.containsKey("count")){
double count = item.getInt32("count").getValue(); double count = item.getInt32("count").getValue();
data.setCount(Double.valueOf(count).longValue()); data.setCount(Double.valueOf(count).longValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment