@chevre/domain 21.2.0-alpha.8 → 21.2.0-alpha.9
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.
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
export async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
8
|
+
|
|
9
|
+
const assetTransactionRepo = new chevre.repository.AssetTransaction(mongoose.connection);
|
|
10
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
11
|
+
|
|
12
|
+
for (const typeOf of [
|
|
13
|
+
chevre.factory.transactionType.PlaceOrder,
|
|
14
|
+
chevre.factory.transactionType.ReturnOrder,
|
|
15
|
+
chevre.factory.transactionType.MoneyTransfer
|
|
16
|
+
]) {
|
|
17
|
+
const count = await transactionRepo.count({
|
|
18
|
+
typeOf,
|
|
19
|
+
statuses: [
|
|
20
|
+
chevre.factory.transactionStatusType.Canceled,
|
|
21
|
+
chevre.factory.transactionStatusType.Confirmed,
|
|
22
|
+
chevre.factory.transactionStatusType.Expired
|
|
23
|
+
],
|
|
24
|
+
tasksExportationStatuses: [
|
|
25
|
+
chevre.factory.transactionTasksExportationStatus.Exporting,
|
|
26
|
+
chevre.factory.transactionTasksExportationStatus.Unexported
|
|
27
|
+
],
|
|
28
|
+
endThrough: new Date()
|
|
29
|
+
});
|
|
30
|
+
console.log('count:', count, typeOf);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
for (const typeOf of [
|
|
34
|
+
chevre.factory.assetTransactionType.CancelReservation,
|
|
35
|
+
chevre.factory.assetTransactionType.MoneyTransfer,
|
|
36
|
+
chevre.factory.assetTransactionType.Pay,
|
|
37
|
+
chevre.factory.assetTransactionType.Refund,
|
|
38
|
+
chevre.factory.assetTransactionType.RegisterService,
|
|
39
|
+
chevre.factory.assetTransactionType.Reserve
|
|
40
|
+
]) {
|
|
41
|
+
const count = await assetTransactionRepo.count({
|
|
42
|
+
typeOf,
|
|
43
|
+
statuses: [
|
|
44
|
+
chevre.factory.transactionStatusType.Canceled,
|
|
45
|
+
chevre.factory.transactionStatusType.Confirmed,
|
|
46
|
+
chevre.factory.transactionStatusType.Expired
|
|
47
|
+
],
|
|
48
|
+
tasksExportationStatuses: [
|
|
49
|
+
chevre.factory.transactionTasksExportationStatus.Exporting,
|
|
50
|
+
chevre.factory.transactionTasksExportationStatus.Unexported
|
|
51
|
+
],
|
|
52
|
+
endThrough: new Date()
|
|
53
|
+
});
|
|
54
|
+
console.log('count:', count, typeOf);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
main()
|
|
59
|
+
.then()
|
|
60
|
+
.catch(console.error);
|
|
@@ -102,6 +102,11 @@ class MongoRepository {
|
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
+
if (Array.isArray(params.tasksExportationStatuses)) {
|
|
106
|
+
andConditions.push({
|
|
107
|
+
tasksExportationStatus: { $in: params.tasksExportationStatuses }
|
|
108
|
+
});
|
|
109
|
+
}
|
|
105
110
|
switch (params.typeOf) {
|
|
106
111
|
case factory.assetTransactionType.Pay:
|
|
107
112
|
const objectAccountIdEq = (_e = (_d = params.object) === null || _d === void 0 ? void 0 : _d.accountId) === null || _e === void 0 ? void 0 : _e.$eq;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.
|
|
12
|
+
"@chevre/factory": "4.311.0",
|
|
13
13
|
"@cinerino/sdk": "3.154.0",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"postversion": "git push origin --tags",
|
|
118
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
119
119
|
},
|
|
120
|
-
"version": "21.2.0-alpha.
|
|
120
|
+
"version": "21.2.0-alpha.9"
|
|
121
121
|
}
|