@chevre/domain 24.1.0-alpha.0 → 24.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/lib/chevre/repo/acceptedOffer.d.ts +1 -1
- package/lib/chevre/repo/acceptedOffer.js +10 -10
- package/lib/chevre/repo/accountingReport.d.ts +9 -2
- package/lib/chevre/repo/accountingReport.js +30 -28
- package/lib/chevre/repo/aggregateReservation.d.ts +6 -0
- package/lib/chevre/repo/aggregateReservation.js +9 -0
- package/lib/chevre/repo/factory/reservation/createMongoConditions.js +155 -180
- package/lib/chevre/repo/mongoose/schemas/accountingReport.js +10 -9
- package/lib/chevre/repo/mongoose/schemas/order.js +108 -108
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +1 -0
- package/lib/chevre/repo/mongoose/schemas/reservation.js +117 -117
- package/lib/chevre/repo/order.d.ts +2 -1
- package/lib/chevre/repo/order.js +171 -170
- package/lib/chevre/repo/project.d.ts +0 -3
- package/lib/chevre/repo/project.js +0 -10
- package/lib/chevre/repo/reservation.d.ts +2 -0
- package/lib/chevre/service/aggregation/event/aggregateOffers.js +17 -26
- package/lib/chevre/service/order/createAccountingReportIfNotExist.d.ts +1 -3
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +67 -72
- package/lib/chevre/service/reserve/useReservation.d.ts +1 -1
- package/lib/chevre/service/reserve/useReservation.js +20 -24
- package/lib/chevre/service/task/createAccountingReport.js +11 -9
- package/lib/chevre/service/task/onResourceDeleted.js +7 -8
- package/lib/chevre/service/task/onResourceUpdated.js +7 -8
- package/lib/chevre/service/task/useReservation.d.ts +2 -2
- package/lib/chevre/service/task/useReservation.js +6 -18
- package/lib/chevre/service/taskHandler.js +1 -0
- package/package.json +2 -2
- package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +0 -33
- package/lib/chevre/repo/mongoose/schemas/productModel.js +0 -57
- package/lib/chevre/repo/productModel.d.ts +0 -27
- package/lib/chevre/repo/productModel.js +0 -170
- package/lib/chevre/service/task/onResourceUpdated/onCategoryCodeUpdated.d.ts +0 -15
- package/lib/chevre/service/task/onResourceUpdated/onCategoryCodeUpdated.js +0 -16
- package/lib/chevre/service/task/onResourceUpdated/syncCategoryCode.d.ts +0 -15
- package/lib/chevre/service/task/onResourceUpdated/syncCategoryCode.js +0 -47
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Chevre Domain Library for Node.js
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@chevre/domain)
|
|
4
|
-
[](https://circleci.com/gh/chevre-jp/domain)
|
|
5
|
-
[](https://coveralls.io/github/chevre-jp/domain?branch=master)
|
|
6
4
|
[](https://snyk.io/test/github/chevre-jp/domain)
|
|
7
5
|
[](https://nodei.co/npm/@chevre/domain/)
|
|
8
6
|
|
|
@@ -21,7 +21,7 @@ export declare class AcceptedOfferRepo {
|
|
|
21
21
|
* オファー展開の注文検索
|
|
22
22
|
*/
|
|
23
23
|
searchWithUnwoundAcceptedOffers(params: factory.order.ISearchConditions, projection: IProjection4searchWithUnwoundAcceptedOffers, options: {
|
|
24
|
-
|
|
24
|
+
useMatchBeforeUnwind: boolean;
|
|
25
25
|
}): Promise<factory.order.IOrder[]>;
|
|
26
26
|
aggreateOwnershipInfosByOrder(filter: {
|
|
27
27
|
orderNumber: {
|
|
@@ -17,9 +17,16 @@ class AcceptedOfferRepo {
|
|
|
17
17
|
* オファー展開の注文検索
|
|
18
18
|
*/
|
|
19
19
|
async searchWithUnwoundAcceptedOffers(params, projection, options) {
|
|
20
|
-
const {
|
|
20
|
+
const { useMatchBeforeUnwind } = options;
|
|
21
21
|
const conditions = order_2.OrderRepo.CREATE_MONGO_CONDITIONS(params);
|
|
22
22
|
const aggregate = this.orderModel.aggregate();
|
|
23
|
+
if (useMatchBeforeUnwind) {
|
|
24
|
+
// unwind->matchでは遅い?
|
|
25
|
+
// match->unwind->matchにする(2026-05-08~)
|
|
26
|
+
conditions.forEach((c) => {
|
|
27
|
+
aggregate.match(c);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
23
30
|
// pipelineの順序に注意
|
|
24
31
|
// @see https://docs.mongodb.com/manual/reference/operator/aggregation/sort/
|
|
25
32
|
/* istanbul ignore else */
|
|
@@ -37,17 +44,10 @@ class AcceptedOfferRepo {
|
|
|
37
44
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
38
45
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
39
46
|
// support skip -> limit(2025-07-09~)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.limit(params.limit);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
aggregate.limit(params.limit * page)
|
|
46
|
-
.skip(params.limit * (page - 1));
|
|
47
|
-
}
|
|
47
|
+
aggregate.skip(params.limit * (page - 1))
|
|
48
|
+
.limit(params.limit);
|
|
48
49
|
}
|
|
49
50
|
return aggregate
|
|
50
|
-
// .allowDiskUse(true) // false化(2023-11-30~)
|
|
51
51
|
.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
52
52
|
.exec();
|
|
53
53
|
}
|
|
@@ -2,6 +2,11 @@ import type { Connection, PipelineStage } from 'mongoose';
|
|
|
2
2
|
import { factory } from '../factory';
|
|
3
3
|
import { IDocType } from './mongoose/schemas/accountingReport';
|
|
4
4
|
type IMatchStage = PipelineStage.Match;
|
|
5
|
+
type IReportAsFindResult = Pick<factory.report.accountingReport.IReport, 'mainEntity'> & {
|
|
6
|
+
isPartOf: {
|
|
7
|
+
mainEntity: factory.report.accountingReport.IOrderAsMainEntity;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
5
10
|
/**
|
|
6
11
|
* 経理レポートリポジトリ
|
|
7
12
|
*/
|
|
@@ -35,11 +40,13 @@ export declare class AccountingReportRepo {
|
|
|
35
40
|
};
|
|
36
41
|
hasPart: factory.report.accountingReport.IChildReport;
|
|
37
42
|
}): Promise<void>;
|
|
38
|
-
|
|
43
|
+
findAccountingReports(params: factory.report.accountingReport.ISearchConditions & {
|
|
39
44
|
seller?: {
|
|
40
45
|
id?: string;
|
|
41
46
|
};
|
|
42
|
-
|
|
47
|
+
limit: number;
|
|
48
|
+
page: number;
|
|
49
|
+
}): Promise<IReportAsFindResult[]>;
|
|
43
50
|
unsetUnnecessaryFields(params: {
|
|
44
51
|
filter: any;
|
|
45
52
|
$unset: any;
|
|
@@ -4,7 +4,6 @@ exports.AccountingReportRepo = void 0;
|
|
|
4
4
|
const errorHandler_1 = require("../errorHandler");
|
|
5
5
|
const factory_1 = require("../factory");
|
|
6
6
|
const accountingReport_1 = require("./mongoose/schemas/accountingReport");
|
|
7
|
-
const DEFAULT_SEARCH_LIMIT = 100;
|
|
8
7
|
/**
|
|
9
8
|
* 経理レポートリポジトリ
|
|
10
9
|
*/
|
|
@@ -49,28 +48,30 @@ class AccountingReportRepo {
|
|
|
49
48
|
$match: { 'mainEntity.orderDate': { $lte: orderDateLte } }
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
51
|
+
// discontinue(2026-05-01~)
|
|
52
|
+
// const reservationForStartDateGte = params.order?.acceptedOffers?.itemOffered?.reservationFor?.startDate?.$gte;
|
|
53
|
+
// if (reservationForStartDateGte instanceof Date) {
|
|
54
|
+
// matchStages.push({
|
|
55
|
+
// $match: {
|
|
56
|
+
// 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': {
|
|
57
|
+
// $exists: true,
|
|
58
|
+
// $gte: reservationForStartDateGte
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
61
|
+
// });
|
|
62
|
+
// }
|
|
63
|
+
// discontinue(2026-05-01~)
|
|
64
|
+
// const reservationForStartDateLte = params.order?.acceptedOffers?.itemOffered?.reservationFor?.startDate?.$lte;
|
|
65
|
+
// if (reservationForStartDateLte instanceof Date) {
|
|
66
|
+
// matchStages.push({
|
|
67
|
+
// $match: {
|
|
68
|
+
// 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': {
|
|
69
|
+
// $exists: true,
|
|
70
|
+
// $lte: reservationForStartDateLte
|
|
71
|
+
// }
|
|
72
|
+
// }
|
|
73
|
+
// });
|
|
74
|
+
// }
|
|
74
75
|
return matchStages;
|
|
75
76
|
}
|
|
76
77
|
async syncMainEntity(params) {
|
|
@@ -135,9 +136,8 @@ class AccountingReportRepo {
|
|
|
135
136
|
throw new factory_1.factory.errors.NotFound(this.accountingReportModel.modelName);
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
|
-
async
|
|
139
|
-
const
|
|
140
|
-
const page = (typeof params.page === 'number') ? Math.max(params.page, 1) : 1;
|
|
139
|
+
async findAccountingReports(params) {
|
|
140
|
+
const { limit, page } = params;
|
|
141
141
|
const unwindAcceptedOffers = params.$unwindAcceptedOffers === '1';
|
|
142
142
|
const matchStages = AccountingReportRepo.CREATE_MONGO_CONDITIONS(params);
|
|
143
143
|
const aggregate = this.accountingReportModel.aggregate([
|
|
@@ -157,9 +157,11 @@ class AccountingReportRepo {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
]);
|
|
160
|
-
return aggregate
|
|
161
|
-
.limit(limit * page)
|
|
160
|
+
return aggregate
|
|
161
|
+
// .limit(limit * page)
|
|
162
|
+
// .skip(limit * (page - 1))
|
|
162
163
|
.skip(limit * (page - 1))
|
|
164
|
+
.limit(limit)
|
|
163
165
|
// .setOptions({ maxTimeMS: 10000 })
|
|
164
166
|
.exec();
|
|
165
167
|
}
|
|
@@ -54,5 +54,11 @@ export declare class AggregateReservationRepo {
|
|
|
54
54
|
filter: any;
|
|
55
55
|
$unset: any;
|
|
56
56
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
57
|
+
/**
|
|
58
|
+
* イベント開始日時が指定以前の集計を削除する
|
|
59
|
+
*/
|
|
60
|
+
deleteManyByEventStartDate(params: {
|
|
61
|
+
reservationForStartDateLte: Date;
|
|
62
|
+
}): Promise<import("mongodb").DeleteResult>;
|
|
57
63
|
}
|
|
58
64
|
export {};
|
|
@@ -132,5 +132,14 @@ class AggregateReservationRepo {
|
|
|
132
132
|
return this.aggregateReservationModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
|
|
133
133
|
.exec();
|
|
134
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* イベント開始日時が指定以前の集計を削除する
|
|
137
|
+
*/
|
|
138
|
+
async deleteManyByEventStartDate(params) {
|
|
139
|
+
return this.aggregateReservationModel.deleteMany({
|
|
140
|
+
'reservationFor.startDate': { $lte: params.reservationForStartDateLte }
|
|
141
|
+
})
|
|
142
|
+
.exec();
|
|
143
|
+
}
|
|
135
144
|
}
|
|
136
145
|
exports.AggregateReservationRepo = AggregateReservationRepo;
|
|
@@ -390,47 +390,21 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
390
390
|
}
|
|
391
391
|
/* istanbul ignore else */
|
|
392
392
|
if (params.reservedTicket !== undefined) {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
// if (Array.isArray(params.reservedTicket.ticketType.category.ids)) {
|
|
409
|
-
// andConditions.push(
|
|
410
|
-
// {
|
|
411
|
-
// 'reservedTicket.ticketType.category.id': {
|
|
412
|
-
// $exists: true,
|
|
413
|
-
// $in: params.reservedTicket.ticketType.category.ids
|
|
414
|
-
// }
|
|
415
|
-
// }
|
|
416
|
-
// );
|
|
417
|
-
// }
|
|
418
|
-
// /* istanbul ignore else */
|
|
419
|
-
// if (params.reservedTicket.ticketType.category.codeValue !== undefined
|
|
420
|
-
// && params.reservedTicket.ticketType.category !== null) {
|
|
421
|
-
// if (Array.isArray(params.reservedTicket.ticketType.category.codeValue.$in)) {
|
|
422
|
-
// andConditions.push(
|
|
423
|
-
// {
|
|
424
|
-
// 'reservedTicket.ticketType.category.codeValue': {
|
|
425
|
-
// $exists: true,
|
|
426
|
-
// $in: params.reservedTicket.ticketType.category.codeValue.$in
|
|
427
|
-
// }
|
|
428
|
-
// }
|
|
429
|
-
// );
|
|
430
|
-
// }
|
|
431
|
-
// }
|
|
432
|
-
// }
|
|
433
|
-
}
|
|
393
|
+
// discontinue ticketType(2026-05-06~)
|
|
394
|
+
// /* istanbul ignore else */
|
|
395
|
+
// if (params.reservedTicket.ticketType !== undefined) {
|
|
396
|
+
// /* istanbul ignore else */
|
|
397
|
+
// if (Array.isArray(params.reservedTicket.ticketType.ids)) {
|
|
398
|
+
// andConditions.push(
|
|
399
|
+
// {
|
|
400
|
+
// 'reservedTicket.ticketType.id': {
|
|
401
|
+
// $exists: true,
|
|
402
|
+
// $in: params.reservedTicket.ticketType.ids
|
|
403
|
+
// }
|
|
404
|
+
// }
|
|
405
|
+
// );
|
|
406
|
+
// }
|
|
407
|
+
// }
|
|
434
408
|
/* istanbul ignore else */
|
|
435
409
|
if (params.reservedTicket.ticketedSeat !== undefined) {
|
|
436
410
|
/* istanbul ignore else */
|
|
@@ -481,41 +455,41 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
481
455
|
}
|
|
482
456
|
});
|
|
483
457
|
}
|
|
484
|
-
const brokerIdentifierAll = params.broker?.identifier?.$all;
|
|
485
|
-
if (Array.isArray(brokerIdentifierAll)) {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
}
|
|
493
|
-
const brokerIdentifierIn = params.broker?.identifier?.$in;
|
|
494
|
-
if (Array.isArray(brokerIdentifierIn)) {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
const brokerIdentifierNin = params.broker?.identifier?.$nin;
|
|
503
|
-
if (Array.isArray(brokerIdentifierNin)) {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
const brokerIdentifierElemMatch = params.broker?.identifier?.$elemMatch;
|
|
511
|
-
if (brokerIdentifierElemMatch !== undefined && brokerIdentifierElemMatch !== null) {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
458
|
+
// const brokerIdentifierAll = params.broker?.identifier?.$all;
|
|
459
|
+
// if (Array.isArray(brokerIdentifierAll)) {
|
|
460
|
+
// andConditions.push({
|
|
461
|
+
// 'broker.identifier': {
|
|
462
|
+
// $exists: true,
|
|
463
|
+
// $all: brokerIdentifierAll
|
|
464
|
+
// }
|
|
465
|
+
// });
|
|
466
|
+
// }
|
|
467
|
+
// const brokerIdentifierIn = params.broker?.identifier?.$in;
|
|
468
|
+
// if (Array.isArray(brokerIdentifierIn)) {
|
|
469
|
+
// andConditions.push({
|
|
470
|
+
// 'broker.identifier': {
|
|
471
|
+
// $exists: true,
|
|
472
|
+
// $in: brokerIdentifierIn
|
|
473
|
+
// }
|
|
474
|
+
// });
|
|
475
|
+
// }
|
|
476
|
+
// const brokerIdentifierNin = params.broker?.identifier?.$nin;
|
|
477
|
+
// if (Array.isArray(brokerIdentifierNin)) {
|
|
478
|
+
// andConditions.push({
|
|
479
|
+
// 'broker.identifier': {
|
|
480
|
+
// $nin: brokerIdentifierNin
|
|
481
|
+
// }
|
|
482
|
+
// });
|
|
483
|
+
// }
|
|
484
|
+
// const brokerIdentifierElemMatch = params.broker?.identifier?.$elemMatch;
|
|
485
|
+
// if (brokerIdentifierElemMatch !== undefined && brokerIdentifierElemMatch !== null) {
|
|
486
|
+
// andConditions.push({
|
|
487
|
+
// 'broker.identifier': {
|
|
488
|
+
// $exists: true,
|
|
489
|
+
// $elemMatch: brokerIdentifierElemMatch
|
|
490
|
+
// }
|
|
491
|
+
// });
|
|
492
|
+
// }
|
|
519
493
|
/* istanbul ignore else */
|
|
520
494
|
if (params.underName !== undefined) {
|
|
521
495
|
/* istanbul ignore else */
|
|
@@ -632,49 +606,49 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
632
606
|
});
|
|
633
607
|
}
|
|
634
608
|
}
|
|
635
|
-
/* istanbul ignore else */
|
|
636
|
-
if (params.underName.identifier !== undefined) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
}
|
|
669
|
-
/* istanbul ignore else */
|
|
670
|
-
if (Array.isArray(params.underName.identifiers)) {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}
|
|
609
|
+
// /* istanbul ignore else */
|
|
610
|
+
// if (params.underName.identifier !== undefined) {
|
|
611
|
+
// if (Array.isArray(params.underName.identifier.$all)) {
|
|
612
|
+
// andConditions.push({
|
|
613
|
+
// 'underName.identifier': {
|
|
614
|
+
// $exists: true,
|
|
615
|
+
// $all: params.underName.identifier.$all
|
|
616
|
+
// }
|
|
617
|
+
// });
|
|
618
|
+
// }
|
|
619
|
+
// if (Array.isArray(params.underName.identifier.$in)) {
|
|
620
|
+
// andConditions.push({
|
|
621
|
+
// 'underName.identifier': {
|
|
622
|
+
// $exists: true,
|
|
623
|
+
// $in: params.underName.identifier.$in
|
|
624
|
+
// }
|
|
625
|
+
// });
|
|
626
|
+
// }
|
|
627
|
+
// if (Array.isArray(params.underName.identifier.$nin)) {
|
|
628
|
+
// andConditions.push({
|
|
629
|
+
// 'underName.identifier': {
|
|
630
|
+
// $nin: params.underName.identifier.$nin
|
|
631
|
+
// }
|
|
632
|
+
// });
|
|
633
|
+
// }
|
|
634
|
+
// if (params.underName.identifier.$elemMatch !== undefined) {
|
|
635
|
+
// andConditions.push({
|
|
636
|
+
// 'underName.identifier': {
|
|
637
|
+
// $exists: true,
|
|
638
|
+
// $elemMatch: params.underName.identifier.$elemMatch
|
|
639
|
+
// }
|
|
640
|
+
// });
|
|
641
|
+
// }
|
|
642
|
+
// }
|
|
643
|
+
// /* istanbul ignore else */
|
|
644
|
+
// if (Array.isArray(params.underName.identifiers)) {
|
|
645
|
+
// andConditions.push({
|
|
646
|
+
// 'underName.identifier': {
|
|
647
|
+
// $exists: true,
|
|
648
|
+
// $in: params.underName.identifiers
|
|
649
|
+
// }
|
|
650
|
+
// });
|
|
651
|
+
// }
|
|
678
652
|
}
|
|
679
653
|
/* istanbul ignore else */
|
|
680
654
|
if (typeof params.attended === 'boolean') {
|
|
@@ -688,66 +662,67 @@ function CREATE_MONGO_CONDITIONS(params) {
|
|
|
688
662
|
checkedIn: params.checkedIn
|
|
689
663
|
});
|
|
690
664
|
}
|
|
691
|
-
/* istanbul ignore else */
|
|
692
|
-
if (params.additionalProperty !== undefined) {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
}
|
|
725
|
-
const programMembershipUsedIdentifierEq = params.programMembershipUsed?.identifier?.$eq;
|
|
726
|
-
if (typeof programMembershipUsedIdentifierEq === 'string') {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
const programMembershipUsedIssuedThroughServiceTypeCodeValueEq =
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
}
|
|
665
|
+
// /* istanbul ignore else */
|
|
666
|
+
// if (params.additionalProperty !== undefined) {
|
|
667
|
+
// if (Array.isArray(params.additionalProperty.$all)) {
|
|
668
|
+
// andConditions.push({
|
|
669
|
+
// additionalProperty: {
|
|
670
|
+
// $exists: true,
|
|
671
|
+
// $all: params.additionalProperty.$all
|
|
672
|
+
// }
|
|
673
|
+
// });
|
|
674
|
+
// }
|
|
675
|
+
// if (Array.isArray(params.additionalProperty.$in)) {
|
|
676
|
+
// andConditions.push({
|
|
677
|
+
// additionalProperty: {
|
|
678
|
+
// $exists: true,
|
|
679
|
+
// $in: params.additionalProperty.$in
|
|
680
|
+
// }
|
|
681
|
+
// });
|
|
682
|
+
// }
|
|
683
|
+
// if (Array.isArray(params.additionalProperty.$nin)) {
|
|
684
|
+
// andConditions.push({
|
|
685
|
+
// additionalProperty: {
|
|
686
|
+
// $nin: params.additionalProperty.$nin
|
|
687
|
+
// }
|
|
688
|
+
// });
|
|
689
|
+
// }
|
|
690
|
+
// if (params.additionalProperty.$elemMatch !== undefined) {
|
|
691
|
+
// andConditions.push({
|
|
692
|
+
// additionalProperty: {
|
|
693
|
+
// $exists: true,
|
|
694
|
+
// $elemMatch: params.additionalProperty.$elemMatch
|
|
695
|
+
// }
|
|
696
|
+
// });
|
|
697
|
+
// }
|
|
698
|
+
// }
|
|
699
|
+
// const programMembershipUsedIdentifierEq = params.programMembershipUsed?.identifier?.$eq;
|
|
700
|
+
// if (typeof programMembershipUsedIdentifierEq === 'string') {
|
|
701
|
+
// andConditions.push({
|
|
702
|
+
// 'programMembershipUsed.identifier': {
|
|
703
|
+
// $exists: true,
|
|
704
|
+
// $eq: programMembershipUsedIdentifierEq
|
|
705
|
+
// }
|
|
706
|
+
// });
|
|
707
|
+
// }
|
|
708
|
+
// const programMembershipUsedIssuedThroughServiceTypeCodeValueEq =
|
|
709
|
+
// params.programMembershipUsed?.issuedThrough?.serviceType?.codeValue?.$eq;
|
|
710
|
+
// if (typeof programMembershipUsedIssuedThroughServiceTypeCodeValueEq === 'string') {
|
|
711
|
+
// andConditions.push({
|
|
712
|
+
// 'programMembershipUsed.issuedThrough.serviceType.codeValue': {
|
|
713
|
+
// $exists: true,
|
|
714
|
+
// $eq: programMembershipUsedIssuedThroughServiceTypeCodeValueEq
|
|
715
|
+
// }
|
|
716
|
+
// });
|
|
717
|
+
// }
|
|
718
|
+
// const appliesToMovieTicketIdentifierEq = params.price?.priceComponent?.appliesToMovieTicket?.identifier?.$eq;
|
|
719
|
+
// if (typeof appliesToMovieTicketIdentifierEq === 'string') {
|
|
720
|
+
// andConditions.push({
|
|
721
|
+
// 'price.priceComponent.appliesToMovieTicket.identifier': {
|
|
722
|
+
// $exists: true,
|
|
723
|
+
// $eq: appliesToMovieTicketIdentifierEq
|
|
724
|
+
// }
|
|
725
|
+
// });
|
|
726
|
+
// }
|
|
752
727
|
return andConditions;
|
|
753
728
|
}
|
|
@@ -117,15 +117,16 @@ const indexes = [
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
],
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
// discontinue(2026-05-01~)
|
|
121
|
+
// [
|
|
122
|
+
// { 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': 1, 'mainEntity.orderDate': -1 },
|
|
123
|
+
// {
|
|
124
|
+
// name: 'searchByItemOfferedReservationForStartDate',
|
|
125
|
+
// partialFilterExpression: {
|
|
126
|
+
// 'mainEntity.acceptedOffers.itemOffered.reservationFor.startDate': { $exists: true }
|
|
127
|
+
// }
|
|
128
|
+
// }
|
|
129
|
+
// ]
|
|
129
130
|
];
|
|
130
131
|
exports.indexes = indexes;
|
|
131
132
|
/**
|