时间:整理时间方法
This commit is contained in:
@@ -2,7 +2,7 @@ import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, Ref } from '@typegoose/typegoose';
|
||||
import Role, { RoleType } from './Role';
|
||||
import { GUILD_AUTH, USER_GUILD_STATUS, GUILD_JOB } from '../consts';
|
||||
import { getTodayZeroDate, nowSeconds } from '../pubUtils/timeUtil';
|
||||
import { getZeroPointD, nowSeconds } from '../pubUtils/timeUtil';
|
||||
import { ARMY } from '../pubUtils/dicParam';
|
||||
class ActiveRecord {
|
||||
@prop({ required: true })
|
||||
@@ -187,7 +187,7 @@ export default class UserGuild extends BaseModel {
|
||||
}
|
||||
|
||||
public static async getWishPoolGoods(guildCode: string, select?: string, lean = true) {
|
||||
const userGuilds: UserGuildType[] = await UserGuildModel.find({ guildCode, status: USER_GUILD_STATUS.ON, refTimeDaily: { $gte: getTodayZeroDate() } })
|
||||
const userGuilds: UserGuildType[] = await UserGuildModel.find({ guildCode, status: USER_GUILD_STATUS.ON, refTimeDaily: { $gte: getZeroPointD() } })
|
||||
.select(select).lean(lean);
|
||||
return userGuilds;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user