feat(M04-C): 完成续费换房与订单调整
This commit is contained in:
@@ -54,9 +54,13 @@ export class PricingRepository {
|
||||
async reserve(input: QuoteInput & {
|
||||
userId: string;
|
||||
holdMinutes?: number;
|
||||
allowedStoreIds?: string[] | null;
|
||||
}) {
|
||||
return this.transaction(async (connection) => {
|
||||
const room = await this.loadRoom(connection, input.tenantId, input.roomId, true);
|
||||
if (input.allowedStoreIds && !input.allowedStoreIds.includes(String(room.storeId))) {
|
||||
throw new PricingError('STORE_SCOPE_FORBIDDEN');
|
||||
}
|
||||
await this.releaseExpired(input.tenantId, input.roomId, connection);
|
||||
await this.assertAvailable(connection, input, true);
|
||||
const isHoliday = await this.isHoliday(
|
||||
@@ -108,6 +112,7 @@ export class PricingRepository {
|
||||
return {
|
||||
orderId,
|
||||
orderNo,
|
||||
storeId: String(room.storeId),
|
||||
reservationId: String(reservationResult.insertId),
|
||||
holdMinutes,
|
||||
quote
|
||||
|
||||
Reference in New Issue
Block a user