拍卖行:增加测试接口和用例

This commit is contained in:
liangtongchuan
2021-03-19 08:33:02 +08:00
parent 5b2cdc6829
commit 2cf3b0ffe0
4 changed files with 46 additions and 11 deletions
+5
View File
@@ -102,6 +102,11 @@ export default class Lot extends BaseModel {
const results: LotType[] = await LotModel.find({ serverId, 'bidRoles.roleId': roleId }).select('-_id -__v').limit(count).lean();
return results;
}
public static async updateLotStage(code: string, auctionStage: number) {
const result: LotType = await LotModel.findOneAndUpdate({ code }, { auctionStage }).select('-_id -__v').lean();
return result;
}
}
export const LotModel = getModelForClass(Lot);