Commit a4e60a0d by admin

修改了数据量添加的方式

parent 9b83ec7e
......@@ -103,7 +103,7 @@ public class DataDaoImpl implements DataDao {
if (d == null) {
mongo.insert(data, "Data");
} else {
d.setCount(data.getCount()+d.getCount());
d.setCount(data.getCount());
Update update = new Update();
Field[] fields = d.getClass().getDeclaredFields();
for (int j = 0; j < fields.length; j++) {
......
......@@ -169,7 +169,7 @@ public class MainThread extends Thread {
Calendar start = Calendar.getInstance();
Calendar end = Calendar.getInstance();
try {
start.add(Calendar.HOUR_OF_DAY, -1);
start.set(Calendar.HOUR_OF_DAY, 0);
start.setTime(sdf.parse(sdf.format(start.getTime())));
end.setTime(sdf.parse(sdf.format(end.getTime())));
int count = 0;
......
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