@chevre/domain 20.7.0-alpha.6 → 20.7.0-alpha.7
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.
|
@@ -29,36 +29,39 @@ async function main() {
|
|
|
29
29
|
|
|
30
30
|
const { transactionNumber } = await transactionNumberRepo.publishByTimestamp({ startDate: new Date() });
|
|
31
31
|
|
|
32
|
-
const transaction = await chevre.service.assetTransaction.pay.start(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
const transaction = await chevre.service.assetTransaction.pay.start(
|
|
33
|
+
{
|
|
34
|
+
project: { id: project.id, typeOf: chevre.factory.organizationType.Project },
|
|
35
|
+
typeOf: chevre.factory.assetTransactionType.Pay,
|
|
36
|
+
transactionNumber: transactionNumber,
|
|
37
|
+
agent: { typeOf: chevre.factory.personType.Person, name: 'サンプル決済者名称', id: '' },
|
|
38
|
+
expires: moment()
|
|
39
|
+
.add(1, 'minute')
|
|
40
|
+
.toDate(),
|
|
41
|
+
object: {
|
|
42
|
+
typeOf: chevre.factory.service.paymentService.PaymentServiceType.CreditCard,
|
|
43
|
+
id: '5f9a6986cc98a1eb13a90285',
|
|
44
|
+
paymentMethod: {
|
|
45
|
+
amount: 1,
|
|
46
|
+
// paymentMethodId?: string;
|
|
47
|
+
typeOf: 'CreditCard',
|
|
48
|
+
method: '1',
|
|
49
|
+
creditCard: {
|
|
50
|
+
memberId: 'a7909268-a584-425e-8212-d7d10f344093',
|
|
51
|
+
cardSeq: 91
|
|
52
|
+
// cardPass?: string;
|
|
53
|
+
}
|
|
53
54
|
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
recipient: {
|
|
58
|
+
typeOf: chevre.factory.organizationType.Corporation,
|
|
59
|
+
id: '5d0abf30ac3fb200198ebb2c',
|
|
60
|
+
name: 'xx'
|
|
54
61
|
}
|
|
55
62
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
id: '5d0abf30ac3fb200198ebb2c',
|
|
59
|
-
name: 'xx'
|
|
60
|
-
}
|
|
61
|
-
})({
|
|
63
|
+
true
|
|
64
|
+
)({
|
|
62
65
|
accountingReport: accountingReportRepo,
|
|
63
66
|
action: actionRepo,
|
|
64
67
|
event: eventRepo,
|
|
@@ -14,24 +14,25 @@ async function main() {
|
|
|
14
14
|
// page: 1,
|
|
15
15
|
project: { id: { $eq: String(process.env.PROJECT_ID) } },
|
|
16
16
|
additionalProperty: {
|
|
17
|
-
$
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// }
|
|
17
|
+
$all: [
|
|
18
|
+
{
|
|
19
|
+
$elemMatch: {
|
|
20
|
+
name: { $eq: 'theaterCode' },
|
|
21
|
+
value: { $in: ['120'] }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
$elemMatch: {
|
|
26
|
+
name: { $eq: 'ticketCode' },
|
|
27
|
+
value: { $in: ['10', '1001'] }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
|
-
console.log(offers.map((offer) =>
|
|
33
|
+
console.log(offers.map((offer) => {
|
|
34
|
+
return `${offer.additionalProperty?.find((p) => p.name === 'theaterCode')?.value} ${offer.additionalProperty?.find((p) => p.name === 'ticketCode')?.value}`;
|
|
35
|
+
}));
|
|
35
36
|
console.log(offers.length);
|
|
36
37
|
}
|
|
37
38
|
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -35,7 +35,7 @@ class MongoRepository {
|
|
|
35
35
|
}
|
|
36
36
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
37
37
|
static CREATE_OFFER_MONGO_CONDITIONS(params) {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31;
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
|
|
39
39
|
// MongoDB検索条件
|
|
40
40
|
const andConditions = [];
|
|
41
41
|
const projectIdEq = (_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$eq;
|
|
@@ -301,7 +301,16 @@ class MongoRepository {
|
|
|
301
301
|
}
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
|
-
const
|
|
304
|
+
const additionalPropertyAll = (_31 = params.additionalProperty) === null || _31 === void 0 ? void 0 : _31.$all;
|
|
305
|
+
if (Array.isArray(additionalPropertyAll)) {
|
|
306
|
+
andConditions.push({
|
|
307
|
+
additionalProperty: {
|
|
308
|
+
$exists: true,
|
|
309
|
+
$all: additionalPropertyAll
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
const additionalPropertyElemMatch = (_32 = params.additionalProperty) === null || _32 === void 0 ? void 0 : _32.$elemMatch;
|
|
305
314
|
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
306
315
|
andConditions.push({
|
|
307
316
|
additionalProperty: {
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.301.0-alpha.
|
|
13
|
-
"@cinerino/sdk": "3.149.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.301.0-alpha.1",
|
|
13
|
+
"@cinerino/sdk": "3.149.0-alpha.2",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"postversion": "git push origin --tags",
|
|
121
121
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
122
122
|
},
|
|
123
|
-
"version": "20.7.0-alpha.
|
|
123
|
+
"version": "20.7.0-alpha.7"
|
|
124
124
|
}
|