添加天梯排行榜,修复setHour有时差的bug

This commit is contained in:
luying
2020-11-06 17:31:23 +08:00
parent bd93d9dc1c
commit 04ecef03b5
29 changed files with 285 additions and 148 deletions

View File

@@ -101,7 +101,7 @@ export default class TowerTaskRec extends BaseModel {
public static async refreshTask(roleId: string, lean = true) {
let curTime = new Date();
const refTime = getRefTime(curTime, TOWER_TASK_CONST.REFRESH_TIME);
console.log(refTime)
// console.log(refTime)
const recs = await TowerTaskRecModel.updateMany({roleId, createdAt: {$gte: refTime}, refreshStatus: 1}, {refreshStatus: 0}, {new: true}).lean(lean);
return recs;
}