时间:整理时间方法
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
|
||||
import { getBeforeDayDate } from '../pubUtils/timeUtil';
|
||||
import { getTimeFun } from '../pubUtils/timeUtil';
|
||||
import { genCode } from '../pubUtils/util';
|
||||
import { PvpHeroInfo } from '../domain/dbGeneral';
|
||||
import { EXTERIOR } from '../pubUtils/dicParam';
|
||||
@@ -96,7 +96,8 @@ export default class PvpRecord extends BaseModel {
|
||||
}
|
||||
|
||||
public static async delPvpRecords() {
|
||||
let result = await PvpRecordModel.deleteMany({ createTime: {$lt: getBeforeDayDate(3)}});//删除小于三天的战报
|
||||
let t = <number>getTimeFun().getBeforeDayWithHour(3);
|
||||
let result = await PvpRecordModel.deleteMany({ createTime: {$lt: t}});//删除小于三天的战报
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user