@chevre/domain 21.2.0-alpha.149 → 21.2.0-alpha.150
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/lib/chevre/repo/place.js
CHANGED
|
@@ -618,8 +618,7 @@ class MongoRepository {
|
|
|
618
618
|
let doc = yield this.placeModel.findOne({
|
|
619
619
|
typeOf: { $eq: factory.placeType.MovieTheater },
|
|
620
620
|
'project.id': { $eq: screeningRoomSection.project.id },
|
|
621
|
-
branchCode: movieTheater.branchCode
|
|
622
|
-
'containsPlace.branchCode': screeningRoom.branchCode
|
|
621
|
+
branchCode: { $eq: movieTheater.branchCode }
|
|
623
622
|
}, { _id: 1 })
|
|
624
623
|
.exec();
|
|
625
624
|
if (doc === null) {
|
|
@@ -1503,12 +1502,8 @@ class MongoRepository {
|
|
|
1503
1502
|
let doc = yield this.placeModel.findOne({
|
|
1504
1503
|
typeOf: { $eq: factory.placeType.MovieTheater },
|
|
1505
1504
|
'project.id': { $eq: seat.project.id },
|
|
1506
|
-
branchCode: movieTheater.branchCode
|
|
1507
|
-
|
|
1508
|
-
'containsPlace.containsPlace.branchCode': screeningRoomSection.branchCode
|
|
1509
|
-
}, {
|
|
1510
|
-
_id: 1
|
|
1511
|
-
})
|
|
1505
|
+
branchCode: { $eq: movieTheater.branchCode }
|
|
1506
|
+
}, { _id: 1 })
|
|
1512
1507
|
.exec();
|
|
1513
1508
|
if (doc === null) {
|
|
1514
1509
|
throw new factory.errors.NotFound(factory.placeType.MovieTheater);
|
|
@@ -2115,6 +2110,9 @@ class MongoRepository {
|
|
|
2115
2110
|
}
|
|
2116
2111
|
syncScreeningRooms(params) {
|
|
2117
2112
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2113
|
+
if (params.useScreeningRoomType === true) {
|
|
2114
|
+
return;
|
|
2115
|
+
}
|
|
2118
2116
|
const movieTheater = yield this.placeModel.findOne({
|
|
2119
2117
|
_id: { $eq: params.id },
|
|
2120
2118
|
typeOf: { $eq: factory.placeType.MovieTheater }
|
|
@@ -11,13 +11,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.call = void 0;
|
|
13
13
|
const place_1 = require("../../repo/place");
|
|
14
|
+
const settings_1 = require("../../settings");
|
|
14
15
|
/**
|
|
15
16
|
* タスク実行関数
|
|
16
17
|
*/
|
|
17
18
|
function call(data) {
|
|
18
19
|
return (connectionSettings) => __awaiter(this, void 0, void 0, function* () {
|
|
19
20
|
const placeRepo = new place_1.MongoRepository(connectionSettings.connection);
|
|
20
|
-
yield placeRepo.syncScreeningRooms({ id: data.id });
|
|
21
|
+
yield placeRepo.syncScreeningRooms({ id: data.id, useScreeningRoomType: settings_1.USE_WRITE_SCREENING_ROOM_TYPE });
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
exports.call = call;
|
package/package.json
CHANGED