Commit 6492dc92 by zhiwei

修复上一次的排名及热度计算错误问题

parent a0333434
...@@ -94,8 +94,8 @@ public class HotSearchCacheDAO { ...@@ -94,8 +94,8 @@ public class HotSearchCacheDAO {
nowDoc.put("lastCount", lastCount); nowDoc.put("lastCount", lastCount);
nowDoc.put("highestRank", highestRank); nowDoc.put("highestRank", highestRank);
nowDoc.put("highestCount", highestCount); nowDoc.put("highestCount", highestCount);
nowDoc.put("preRank", null); nowDoc.put("preRank", nowDoc.getInteger("lastRank"));
nowDoc.put("preCount", null); nowDoc.put("preCount", nowDoc.getInteger("lastCount"));
nowDoc.put("duration", durationNow); nowDoc.put("duration", durationNow);
collection.replaceOne(query, nowDoc); collection.replaceOne(query, nowDoc);
} else { } else {
...@@ -114,8 +114,8 @@ public class HotSearchCacheDAO { ...@@ -114,8 +114,8 @@ public class HotSearchCacheDAO {
nowDoc.put("startTime", startTime); nowDoc.put("startTime", startTime);
nowDoc.put("endTime", endTime); nowDoc.put("endTime", endTime);
nowDoc.put("duration", durationNow); nowDoc.put("duration", durationNow);
nowDoc.put("preRank", nowDoc.getInteger("lastRank")); nowDoc.put("preRank", null);
nowDoc.put("preCount", nowDoc.getInteger("lastCount")); nowDoc.put("preCount", null);
collection.insertOne(nowDoc); collection.insertOne(nowDoc);
} }
......
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