拍卖行:定时刷新、结算和简单测试,个别bug修复

This commit is contained in:
liangtongchuan
2021-03-19 15:23:56 +08:00
parent f7c665f206
commit 7324556852
8 changed files with 186 additions and 11 deletions
+5
View File
@@ -107,6 +107,11 @@ export default class Lot extends BaseModel {
const result: LotType = await LotModel.findOneAndUpdate({ code }, { auctionStage }).select('-_id -__v').lean();
return result;
}
public static async updateLotsStageByBegin(begin: Date, auctionStage: number) {
const results = await LotModel.updateMany({ begin }, { auctionStage }).select('-_id -__v').lean();
return results;
}
}
export const LotModel = getModelForClass(Lot);