拍卖行:推送
This commit is contained in:
+4
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user