时间:整理时间方法
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, modelOptions } from '@typegoose/typegoose';
|
||||
import { genCode } from '../pubUtils/util';
|
||||
import { getCurWeekDate, getCurMonthDate, getTodayZeroDate } from '../pubUtils/timeUtil';
|
||||
import { getZeroPointD } from '../pubUtils/timeUtil';
|
||||
import { SHOP_REFRESH_TYPE } from '../consts';
|
||||
import { DicShop } from '../pubUtils/dictionary/DicShop';
|
||||
|
||||
@@ -37,9 +37,9 @@ export default class UserShop extends BaseModel {
|
||||
count: number; // 数量
|
||||
|
||||
private static getRefreshCondition() {
|
||||
let today = getTodayZeroDate(5);
|
||||
let cutWeek = getCurWeekDate(1, 5);
|
||||
let curMonth = getCurMonthDate(1, 5);
|
||||
let today = getZeroPointD();
|
||||
let cutWeek = getZeroPointD(SHOP_REFRESH_TYPE.WEEKLY);
|
||||
let curMonth = getZeroPointD(SHOP_REFRESH_TYPE.MONTHLY);
|
||||
|
||||
return [
|
||||
{ createdAt: { $gte: today }, refreshType: SHOP_REFRESH_TYPE.DAILY },
|
||||
|
||||
Reference in New Issue
Block a user