✨ feat(活动): 节日活动高级签到邮件补发
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user