Commit dbe4bae9 by chenweitao

初始热度非long可能去除

parent c495fcc6
...@@ -127,7 +127,7 @@ public class HotSearchCacheDAO { ...@@ -127,7 +127,7 @@ public class HotSearchCacheDAO {
//计算上升速度 //计算上升速度
double riseSpeed = nowDoc.containsKey("riseSpeed")?nowDoc.getDouble("riseSpeed"):0.00; double riseSpeed = nowDoc.containsKey("riseSpeed")?nowDoc.getDouble("riseSpeed"):0.00;
if(nonNull(lastCount) && nowDoc.containsKey("firstCount")) { if(nonNull(lastCount) && nowDoc.containsKey("firstCount")) {
long firstCount = nowDoc.getLong("firstCount"); long firstCount =Long.parseLong(nowDoc.get("firstCount").toString());
riseSpeed = ((double)(lastCount - firstCount)/(double)firstCount)*1000/((double)duration); riseSpeed = ((double)(lastCount - firstCount)/(double)firstCount)*1000/((double)duration);
} }
// endTime = getEndTime(type, new Date()); // endTime = getEndTime(type, new Date());
...@@ -213,7 +213,7 @@ public class HotSearchCacheDAO { ...@@ -213,7 +213,7 @@ public class HotSearchCacheDAO {
} }
} }
}catch (Exception e){ }catch (Exception e){
log.error("数据存储时出错:{}", e); log.error("数据存储时出错:", e);
} }
} }
......
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