feat(M04-C): 完成续费换房与订单调整

This commit is contained in:
Codex
2026-06-20 14:05:31 +08:00
parent 4122db45ec
commit 089d34877b
20 changed files with 940 additions and 20 deletions
+5
View File
@@ -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