feat(活动): 节日活动高级签到邮件补发

This commit is contained in:
luying
2023-08-04 16:20:36 +08:00
parent 822c8c8c42
commit 3d510783da
8 changed files with 90 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import BaseModel from './BaseModel';
import { index, getModelForClass, prop, DocumentType, ReturnModelType, mongoose } from '@typegoose/typegoose';
import { CounterAllModal } from './CounterAll';
import { COUNTER } from '../consts';
import { ACTIVITY_TIME_TYPE, COUNTER } from '../consts';
import { ActivityGroupModel } from './ActivityGroup';
import { UpdateActivityParam } from '../domain/backEndField/params';
@@ -90,6 +90,12 @@ export default class Activity extends BaseModel {
return result;
}
// 查询
public static async findOpenTypeByTime(type: number) {
let result: ActivityModelType[] = await ActivityModel.find({ type, isEnable: true, timeType: ACTIVITY_TIME_TYPE.DATE_TIME, beginTime: { $lte: new Date }, endTime: { $gte: new Date() } }).lean();
return result;
}
//debug测试用接口
public static async debugFindActivityByType(type: number) {
let result: ActivityModelType[] = await ActivityModel.findOne({ type }).lean(true);