移除 setLocalHours
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
|
||||
import { DAILY_CONST } from './../consts';
|
||||
import { setLocalHours } from './../pubUtils/util';
|
||||
|
||||
|
||||
/**
|
||||
@@ -30,7 +29,7 @@ export default class DailyRecord extends BaseModel {
|
||||
const dailyRecord: DailyRecordType = await DailyRecordModel.findOne({ roleId, type }).lean(lean);
|
||||
let {count = 0, refTime = 0, buyCount = 0} = dailyRecord||{};
|
||||
let now = new Date();
|
||||
let today = setLocalHours(DAILY_CONST.REFRESH_TIME, now);
|
||||
let today = now.setHours(DAILY_CONST.REFRESH_TIME, 0, 0, 0);
|
||||
|
||||
if(today > refTime) {
|
||||
refTime = today; count = 0; buyCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user