拍卖行:推送

This commit is contained in:
luying
2021-11-23 18:17:50 +08:00
parent f69ac140fb
commit d70076de96
11 changed files with 75 additions and 13 deletions
+4 -2
View File
@@ -122,12 +122,14 @@ export default class Lot extends BaseModel {
}
public static async updateLotsStageByBegin(begin: Date, auctionStage: number) {
const results = await LotModel.updateMany({ begin }, { auctionStage }).select('-_id -__v').lean();
await LotModel.updateMany({ begin }, { auctionStage });
const results: LotType[] = await LotModel.find({ begin }).select('-_id -__v').lean();
return results;
}
public static async updateUnSoldLotsStageByBegin(begin: Date, auctionStage: number) {
const results = await LotModel.updateMany({ begin, status: { $in: [LOT_STATUS.DEFAULT, LOT_STATUS.ING] } }, { auctionStage }).select('-_id -__v').lean();
await LotModel.updateMany({ begin, status: { $in: [LOT_STATUS.DEFAULT, LOT_STATUS.ING] } }, { auctionStage });
const results: LotType[] = await LotModel.find({ begin, status: { $in: [LOT_STATUS.DEFAULT, LOT_STATUS.ING] } }).select('-_id -__v').lean();
return results;
}