活动:首冲活动添加查询是否结束相关逻辑

This commit is contained in:
qiaoxin
2021-05-24 17:37:33 +08:00
parent 7976956721
commit 9b5f145082
12 changed files with 52 additions and 51 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ export default class Activity extends BaseModel {
}
//根据活动类型查询活动数据
public static async findActivityByType(serverId: number, type: number, lean = true) {
let result: ActivityModelType[] = await ActivityModel.find({ serverId, type }).lean(lean);
public static async findActivityByType(serverId: number, type: number, sort: number) {
let result: ActivityModelType[] = await ActivityModel.find({ serverId, type }).sort({ activityId: sort }).lean(true);
return result;
}