活动:删除serverId相关查询
This commit is contained in:
@@ -31,14 +31,14 @@ export default class Activity extends BaseModel {
|
||||
}
|
||||
|
||||
//根据活动类型查询活动数据
|
||||
public static async findActivityByType(serverId: number, type: number, sort: number) {
|
||||
let result: ActivityModelType[] = await ActivityModel.find({ serverId, type }).sort({ activityId: sort }).lean(true);
|
||||
public static async findActivityByType(activityGroupId: number[], type: number, sort: number) {
|
||||
let result: ActivityModelType[] = await ActivityModel.find({ groupId: { $in: activityGroupId }, type }).sort({ activityId: sort }).lean(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
//根据活动id查询活动数据
|
||||
public static async findActivity(serverId: number, activityId: number) {
|
||||
let result: ActivityModelType = await ActivityModel.findOne({ serverId, activityId }).lean(true);
|
||||
public static async findActivity(activityId: number) {
|
||||
let result: ActivityModelType = await ActivityModel.findOne({ activityId }).lean(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user