oak-pay-business 2.2.2 → 2.2.4
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/es/aspects/AspectDict.d.ts +3 -3
- package/es/aspects/index.d.ts +2 -1
- package/es/checkers/accountOper.js +4 -3
- package/es/checkers/offlineAccount.js +4 -1
- package/es/checkers/refund.js +1 -0
- package/es/components/offlineAccount/upsert/web.pc.js +1 -1
- package/es/components/sysAccount/survey/locales/zh-CN.json +3 -1
- package/es/components/sysAccount/survey/web.pc.js +69 -32
- package/es/components/sysAccount/survey/web.pc.module.less +3 -2
- package/es/components/sysAccount/transferList/index.d.ts +3 -0
- package/es/components/sysAccount/transferList/index.js +52 -0
- package/es/components/sysAccount/transferList/index.json +1 -0
- package/es/components/sysAccount/transferList/locales/zh-CN.json +6 -0
- package/es/components/sysAccount/transferList/web.pc.d.ts +12 -0
- package/es/components/sysAccount/transferList/web.pc.js +45 -0
- package/es/components/sysAccountMove/create/index.d.ts +7 -0
- package/es/components/sysAccountMove/create/index.js +145 -0
- package/es/components/sysAccountMove/create/index.json +1 -0
- package/es/components/sysAccountMove/create/locales/zh-CN.json +6 -0
- package/es/components/sysAccountMove/create/web.pc.d.ts +26 -0
- package/es/components/sysAccountMove/create/web.pc.js +68 -0
- package/es/components/sysAccountOper/list/index.d.ts +5 -0
- package/es/components/sysAccountOper/list/index.js +127 -0
- package/es/components/sysAccountOper/list/index.json +1 -0
- package/es/components/sysAccountOper/list/locales/zh-CN.json +5 -0
- package/es/components/sysAccountOper/list/web.module.less +42 -0
- package/es/components/sysAccountOper/list/web.pc.d.ts +25 -0
- package/es/components/sysAccountOper/list/web.pc.js +36 -0
- package/es/components/withdrawTransfer/list/locales/zh-CN.json +1 -1
- package/es/components/wpAccount/upsert/web.pc.js +1 -1
- package/es/configuration/attrUpdateMatrix.js +2 -2
- package/es/data/actionAuth.js +7 -2
- package/es/data/i18n.js +49 -3
- package/es/data/path.js +2 -2
- package/es/entities/AccountOper.d.ts +1 -1
- package/es/entities/AccountOper.js +3 -1
- package/es/entities/OfflineAccount.d.ts +1 -1
- package/es/entities/OfflineAccount.js +8 -2
- package/es/entities/SysAccountMove.d.ts +13 -0
- package/es/entities/SysAccountMove.js +18 -0
- package/es/entities/SysAccountOper.d.ts +4 -1
- package/es/entities/SysAccountOper.js +1 -0
- package/es/entities/WpAccount.d.ts +1 -1
- package/es/entities/WpAccount.js +8 -2
- package/es/locales/error/zh-CN.json +5 -0
- package/es/locales/offlineAccount/zh-CN.json +2 -1
- package/es/oak-app-domain/AccountOper/Schema.d.ts +1 -1
- package/es/oak-app-domain/AccountOper/Storage.js +1 -1
- package/es/oak-app-domain/AccountOper/Style.js +1 -0
- package/es/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/EntityDict.d.ts +2 -0
- package/es/oak-app-domain/OfflineAccount/Action.d.ts +1 -1
- package/es/oak-app-domain/OfflineAccount/Action.js +1 -1
- package/es/oak-app-domain/OfflineAccount/Style.js +4 -1
- package/es/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Path/Schema.d.ts +6 -0
- package/es/oak-app-domain/Path/Storage.js +6 -0
- package/es/oak-app-domain/Path/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Storage.js +2 -0
- package/es/oak-app-domain/SysAccountMove/Schema.d.ts +185 -0
- package/es/oak-app-domain/SysAccountMove/Schema.js +1 -0
- package/es/oak-app-domain/SysAccountMove/Storage.d.ts +3 -0
- package/es/oak-app-domain/SysAccountMove/Storage.js +31 -0
- package/es/oak-app-domain/SysAccountMove/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/SysAccountOper/Schema.d.ts +34 -5
- package/es/oak-app-domain/SysAccountOper/Storage.js +4 -0
- package/es/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/System/Schema.d.ts +12 -0
- package/es/oak-app-domain/User/Schema.d.ts +12 -0
- package/es/oak-app-domain/WpAccount/Action.d.ts +1 -1
- package/es/oak-app-domain/WpAccount/Action.js +1 -1
- package/es/oak-app-domain/WpAccount/Style.js +4 -1
- package/es/oak-app-domain/WpAccount/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/_SubQuery.d.ts +12 -0
- package/es/triggers/pay.js +149 -46
- package/es/triggers/refund.js +3 -0
- package/es/types/RuntimeCxt.d.ts +1 -1
- package/es/types/sysAccountOper.d.ts +1 -0
- package/es/types/sysAccountOper.js +1 -0
- package/es/utils/payClazz/Account.js +3 -2
- package/lib/aspects/AspectDict.d.ts +3 -3
- package/lib/aspects/index.d.ts +2 -1
- package/lib/checkers/accountOper.js +4 -3
- package/lib/checkers/offlineAccount.js +4 -1
- package/lib/checkers/refund.js +1 -0
- package/lib/configuration/attrUpdateMatrix.js +2 -2
- package/lib/data/actionAuth.js +7 -2
- package/lib/data/i18n.js +49 -3
- package/lib/data/path.js +2 -2
- package/lib/entities/AccountOper.d.ts +1 -1
- package/lib/entities/AccountOper.js +3 -1
- package/lib/entities/OfflineAccount.d.ts +1 -1
- package/lib/entities/OfflineAccount.js +8 -2
- package/lib/entities/SysAccountMove.d.ts +13 -0
- package/lib/entities/SysAccountMove.js +21 -0
- package/lib/entities/SysAccountOper.d.ts +4 -1
- package/lib/entities/SysAccountOper.js +1 -0
- package/lib/entities/WpAccount.d.ts +1 -1
- package/lib/entities/WpAccount.js +8 -2
- package/lib/locales/error/zh-CN.json +5 -0
- package/lib/locales/offlineAccount/zh-CN.json +2 -1
- package/lib/oak-app-domain/AccountOper/Schema.d.ts +1 -1
- package/lib/oak-app-domain/AccountOper/Storage.js +1 -1
- package/lib/oak-app-domain/AccountOper/Style.js +1 -0
- package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/EntityDict.d.ts +2 -0
- package/lib/oak-app-domain/OfflineAccount/Action.d.ts +1 -1
- package/lib/oak-app-domain/OfflineAccount/Action.js +1 -1
- package/lib/oak-app-domain/OfflineAccount/Style.js +4 -1
- package/lib/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Path/Schema.d.ts +6 -0
- package/lib/oak-app-domain/Path/Storage.js +6 -0
- package/lib/oak-app-domain/Path/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Storage.js +18 -16
- package/lib/oak-app-domain/SysAccountMove/Schema.d.ts +185 -0
- package/lib/oak-app-domain/SysAccountMove/Schema.js +2 -0
- package/lib/oak-app-domain/SysAccountMove/Storage.d.ts +3 -0
- package/lib/oak-app-domain/SysAccountMove/Storage.js +34 -0
- package/lib/oak-app-domain/SysAccountMove/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/SysAccountOper/Schema.d.ts +34 -5
- package/lib/oak-app-domain/SysAccountOper/Storage.js +4 -0
- package/lib/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/System/Schema.d.ts +12 -0
- package/lib/oak-app-domain/User/Schema.d.ts +12 -0
- package/lib/oak-app-domain/WpAccount/Action.d.ts +1 -1
- package/lib/oak-app-domain/WpAccount/Action.js +1 -1
- package/lib/oak-app-domain/WpAccount/Style.js +4 -1
- package/lib/oak-app-domain/WpAccount/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/_SubQuery.d.ts +12 -0
- package/lib/triggers/pay.js +149 -46
- package/lib/triggers/refund.js +3 -0
- package/lib/types/RuntimeCxt.d.ts +1 -1
- package/lib/types/sysAccountOper.d.ts +1 -0
- package/lib/types/sysAccountOper.js +2 -0
- package/lib/utils/payClazz/Account.js +3 -2
- package/package.json +4 -4
- package/src/entities/AccountOper.ts +4 -2
- package/src/entities/OfflineAccount.ts +12 -5
- package/src/entities/SysAccountMove.ts +39 -0
- package/src/entities/SysAccountOper.ts +7 -1
- package/src/entities/WpAccount.ts +11 -4
|
@@ -7,29 +7,34 @@ import { Price, String } from "oak-domain/lib/types/DataType";
|
|
|
7
7
|
import * as Pay from "../Pay/Schema";
|
|
8
8
|
import * as Refund from "../Refund/Schema";
|
|
9
9
|
import * as WithdrawTransfer from "../WithdrawTransfer/Schema";
|
|
10
|
+
import * as SysAccountMove from "../SysAccountMove/Schema";
|
|
10
11
|
import * as OfflineAccount from "../OfflineAccount/Schema";
|
|
11
12
|
import * as WpAccount from "../WpAccount/Schema";
|
|
13
|
+
export type SysAccountOperType = "pay" | "refund" | "withdrawTransfer" | "compensate" | "moveIn" | "moveOut";
|
|
12
14
|
export type OpSchema = EntityShape & {
|
|
13
15
|
delta: Price;
|
|
14
|
-
type:
|
|
16
|
+
type: SysAccountOperType;
|
|
15
17
|
entity: "offlineAccount" | "wpAccount" | string;
|
|
16
18
|
entityId: String<64>;
|
|
17
19
|
payId?: ForeignKey<"pay"> | null;
|
|
18
20
|
refundId?: ForeignKey<"refund"> | null;
|
|
19
21
|
withdrawTransferId?: ForeignKey<"withdrawTransfer"> | null;
|
|
22
|
+
sysAccountMoveId?: ForeignKey<"sysAccountMove"> | null;
|
|
20
23
|
};
|
|
21
24
|
export type OpAttr = keyof OpSchema;
|
|
22
25
|
export type Schema = EntityShape & {
|
|
23
26
|
delta: Price;
|
|
24
|
-
type:
|
|
27
|
+
type: SysAccountOperType;
|
|
25
28
|
entity: "offlineAccount" | "wpAccount" | string;
|
|
26
29
|
entityId: String<64>;
|
|
27
30
|
payId?: ForeignKey<"pay"> | null;
|
|
28
31
|
refundId?: ForeignKey<"refund"> | null;
|
|
29
32
|
withdrawTransferId?: ForeignKey<"withdrawTransfer"> | null;
|
|
33
|
+
sysAccountMoveId?: ForeignKey<"sysAccountMove"> | null;
|
|
30
34
|
pay?: Pay.Schema | null;
|
|
31
35
|
refund?: Refund.Schema | null;
|
|
32
36
|
withdrawTransfer?: WithdrawTransfer.Schema | null;
|
|
37
|
+
sysAccountMove?: SysAccountMove.Schema | null;
|
|
33
38
|
offlineAccount?: OfflineAccount.Schema;
|
|
34
39
|
wpAccount?: WpAccount.Schema;
|
|
35
40
|
} & {
|
|
@@ -41,7 +46,7 @@ type AttrFilter = {
|
|
|
41
46
|
$$seq$$: Q_NumberValue;
|
|
42
47
|
$$updateAt$$: Q_DateValue;
|
|
43
48
|
delta: Q_NumberValue;
|
|
44
|
-
type: Q_EnumValue<
|
|
49
|
+
type: Q_EnumValue<SysAccountOperType>;
|
|
45
50
|
entity: Q_EnumValue<"offlineAccount" | "wpAccount" | string>;
|
|
46
51
|
entityId: Q_StringValue;
|
|
47
52
|
payId: Q_StringValue;
|
|
@@ -50,6 +55,8 @@ type AttrFilter = {
|
|
|
50
55
|
refund: Refund.Filter;
|
|
51
56
|
withdrawTransferId: Q_StringValue;
|
|
52
57
|
withdrawTransfer: WithdrawTransfer.Filter;
|
|
58
|
+
sysAccountMoveId: Q_StringValue;
|
|
59
|
+
sysAccountMove: SysAccountMove.Filter;
|
|
53
60
|
offlineAccount: OfflineAccount.Filter;
|
|
54
61
|
wpAccount: WpAccount.Filter;
|
|
55
62
|
};
|
|
@@ -71,6 +78,8 @@ export type Projection = {
|
|
|
71
78
|
refund?: Refund.Projection;
|
|
72
79
|
withdrawTransferId?: number;
|
|
73
80
|
withdrawTransfer?: WithdrawTransfer.Projection;
|
|
81
|
+
sysAccountMoveId?: number;
|
|
82
|
+
sysAccountMove?: SysAccountMove.Projection;
|
|
74
83
|
offlineAccount?: OfflineAccount.Projection;
|
|
75
84
|
wpAccount?: WpAccount.Projection;
|
|
76
85
|
} & Partial<ExprOp<OpAttr | string>>;
|
|
@@ -86,6 +95,9 @@ type RefundIdProjection = OneOf<{
|
|
|
86
95
|
type WithdrawTransferIdProjection = OneOf<{
|
|
87
96
|
withdrawTransferId: number;
|
|
88
97
|
}>;
|
|
98
|
+
type SysAccountMoveIdProjection = OneOf<{
|
|
99
|
+
sysAccountMoveId: number;
|
|
100
|
+
}>;
|
|
89
101
|
type OfflineAccountIdProjection = OneOf<{
|
|
90
102
|
entityId: number;
|
|
91
103
|
}>;
|
|
@@ -120,6 +132,10 @@ export type SortAttr = {
|
|
|
120
132
|
withdrawTransferId: number;
|
|
121
133
|
} | {
|
|
122
134
|
withdrawTransfer: WithdrawTransfer.SortAttr;
|
|
135
|
+
} | {
|
|
136
|
+
sysAccountMoveId: number;
|
|
137
|
+
} | {
|
|
138
|
+
sysAccountMove: SysAccountMove.SortAttr;
|
|
123
139
|
} | {
|
|
124
140
|
offlineAccount: OfflineAccount.SortAttr;
|
|
125
141
|
} | {
|
|
@@ -135,7 +151,7 @@ export type Sorter = SortNode[];
|
|
|
135
151
|
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
136
152
|
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
137
153
|
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
138
|
-
export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "payId" | "refundId" | "withdrawTransferId">> & (({
|
|
154
|
+
export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId" | "payId" | "refundId" | "withdrawTransferId" | "sysAccountMoveId">> & (({
|
|
139
155
|
payId?: never;
|
|
140
156
|
pay?: Pay.CreateSingleOperation;
|
|
141
157
|
} | {
|
|
@@ -162,6 +178,12 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "enti
|
|
|
162
178
|
} | {
|
|
163
179
|
withdrawTransfer?: never;
|
|
164
180
|
withdrawTransferId?: ForeignKey<"withdrawTransfer">;
|
|
181
|
+
}) & ({
|
|
182
|
+
sysAccountMoveId?: never;
|
|
183
|
+
sysAccountMove?: SysAccountMove.CreateSingleOperation;
|
|
184
|
+
} | {
|
|
185
|
+
sysAccountMove?: never;
|
|
186
|
+
sysAccountMoveId?: ForeignKey<"sysAccountMove">;
|
|
165
187
|
})) & ({
|
|
166
188
|
entity?: never;
|
|
167
189
|
entityId?: never;
|
|
@@ -194,7 +216,7 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "enti
|
|
|
194
216
|
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
195
217
|
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
196
218
|
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
197
|
-
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId" | "payId" | "refundId" | "withdrawTransferId">> & (({
|
|
219
|
+
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "entityId" | "payId" | "refundId" | "withdrawTransferId" | "sysAccountMoveId">> & (({
|
|
198
220
|
pay?: Pay.CreateSingleOperation;
|
|
199
221
|
payId?: never;
|
|
200
222
|
} | {
|
|
@@ -230,6 +252,12 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "entity" | "enti
|
|
|
230
252
|
} | {
|
|
231
253
|
withdrawTransfer?: never;
|
|
232
254
|
withdrawTransferId?: ForeignKey<"withdrawTransfer"> | null;
|
|
255
|
+
}) & ({
|
|
256
|
+
sysAccountMove?: SysAccountMove.CreateSingleOperation;
|
|
257
|
+
sysAccountMoveId?: never;
|
|
258
|
+
} | {
|
|
259
|
+
sysAccountMove?: never;
|
|
260
|
+
sysAccountMoveId?: ForeignKey<"sysAccountMove"> | null;
|
|
233
261
|
})) & ({
|
|
234
262
|
offlineAccount?: OfflineAccount.CreateSingleOperation | OfflineAccount.UpdateOperation | OfflineAccount.RemoveOperation;
|
|
235
263
|
entityId?: never;
|
|
@@ -265,6 +293,7 @@ export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
|
265
293
|
export type PayIdSubQuery = Selection<PayIdProjection>;
|
|
266
294
|
export type RefundIdSubQuery = Selection<RefundIdProjection>;
|
|
267
295
|
export type WithdrawTransferIdSubQuery = Selection<WithdrawTransferIdProjection>;
|
|
296
|
+
export type SysAccountMoveIdSubQuery = Selection<SysAccountMoveIdProjection>;
|
|
268
297
|
export type OfflineAccountIdSubQuery = Selection<OfflineAccountIdProjection>;
|
|
269
298
|
export type WpAccountIdSubQuery = Selection<WpAccountIdProjection>;
|
|
270
299
|
export type SysAccountOperIdSubQuery = Selection<SysAccountOperIdProjection>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "系统账户操作", "attr": { "type": "类型", "delta": "余额变化", "entity": "关联对象", "entityId": "关联对象Id", "pay": "关联支付", "refund": "关联退款", "withdrawTransfer": "关联转账提现" }, "v": { "type": { "withdrawTransfer": "提现转账", "pay": "支付", "refund": "退款", "compensate": "补偿", "moveIn": "转入", "moveOut": "转出" } } }
|
|
1
|
+
{ "name": "系统账户操作", "attr": { "type": "类型", "delta": "余额变化", "entity": "关联对象", "entityId": "关联对象Id", "pay": "关联支付", "refund": "关联退款", "withdrawTransfer": "关联转账提现", "sysAccountMove": "系统资金移动" }, "v": { "type": { "withdrawTransfer": "提现转账", "pay": "支付", "refund": "退款", "compensate": "补偿", "moveIn": "转入", "moveOut": "转出" } } }
|
|
@@ -15,6 +15,7 @@ import * as UserSystem from "../UserSystem/Schema";
|
|
|
15
15
|
import * as Account from "../Account/Schema";
|
|
16
16
|
import * as OfflineAccount from "../OfflineAccount/Schema";
|
|
17
17
|
import * as Order from "../Order/Schema";
|
|
18
|
+
import * as SysAccountMove from "../SysAccountMove/Schema";
|
|
18
19
|
import * as WechatPay from "../WechatPay/Schema";
|
|
19
20
|
import * as WithdrawAccount from "../WithdrawAccount/Schema";
|
|
20
21
|
import * as WithdrawChannel from "../WithdrawChannel/Schema";
|
|
@@ -76,6 +77,8 @@ export type Schema = EntityShape & {
|
|
|
76
77
|
offlineAccount$system$$aggr?: AggregationResult<OfflineAccount.Schema>;
|
|
77
78
|
order$system?: Array<Order.Schema>;
|
|
78
79
|
order$system$$aggr?: AggregationResult<Order.Schema>;
|
|
80
|
+
sysAccountMove$system?: Array<SysAccountMove.Schema>;
|
|
81
|
+
sysAccountMove$system$$aggr?: AggregationResult<SysAccountMove.Schema>;
|
|
79
82
|
wechatPay$system?: Array<WechatPay.Schema>;
|
|
80
83
|
wechatPay$system$$aggr?: AggregationResult<WechatPay.Schema>;
|
|
81
84
|
withdrawAccount$ofSystem?: Array<WithdrawAccount.Schema>;
|
|
@@ -114,6 +117,7 @@ type AttrFilter = {
|
|
|
114
117
|
account$entity: Account.Filter & SubQueryPredicateMetadata;
|
|
115
118
|
offlineAccount$system: OfflineAccount.Filter & SubQueryPredicateMetadata;
|
|
116
119
|
order$system: Order.Filter & SubQueryPredicateMetadata;
|
|
120
|
+
sysAccountMove$system: SysAccountMove.Filter & SubQueryPredicateMetadata;
|
|
117
121
|
wechatPay$system: WechatPay.Filter & SubQueryPredicateMetadata;
|
|
118
122
|
withdrawAccount$ofSystem: WithdrawAccount.Filter & SubQueryPredicateMetadata;
|
|
119
123
|
withdrawAccount$entity: WithdrawAccount.Filter & SubQueryPredicateMetadata;
|
|
@@ -193,6 +197,12 @@ export type Projection = {
|
|
|
193
197
|
order$system$$aggr?: Order.Aggregation & {
|
|
194
198
|
$entity: "order";
|
|
195
199
|
};
|
|
200
|
+
sysAccountMove$system?: SysAccountMove.Selection & {
|
|
201
|
+
$entity: "sysAccountMove";
|
|
202
|
+
};
|
|
203
|
+
sysAccountMove$system$$aggr?: SysAccountMove.Aggregation & {
|
|
204
|
+
$entity: "sysAccountMove";
|
|
205
|
+
};
|
|
196
206
|
wechatPay$system?: WechatPay.Selection & {
|
|
197
207
|
$entity: "wechatPay";
|
|
198
208
|
};
|
|
@@ -294,6 +304,7 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "enti
|
|
|
294
304
|
account$entity?: OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">> | OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">>>;
|
|
295
305
|
offlineAccount$system?: OakOperation<OfflineAccount.UpdateOperation["action"], Omit<OfflineAccount.UpdateOperationData, "system" | "systemId">, Omit<OfflineAccount.Filter, "system" | "systemId">> | OakOperation<"create", Omit<OfflineAccount.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<OfflineAccount.CreateOperationData, "system" | "systemId">> | OakOperation<OfflineAccount.UpdateOperation["action"], Omit<OfflineAccount.UpdateOperationData, "system" | "systemId">, Omit<OfflineAccount.Filter, "system" | "systemId">>>;
|
|
296
306
|
order$system?: OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "system" | "systemId">, Omit<Order.Filter, "system" | "systemId">> | OakOperation<"create", Omit<Order.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<Order.CreateOperationData, "system" | "systemId">> | OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "system" | "systemId">, Omit<Order.Filter, "system" | "systemId">>>;
|
|
307
|
+
sysAccountMove$system?: OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "system" | "systemId">>>;
|
|
297
308
|
wechatPay$system?: OakOperation<WechatPay.UpdateOperation["action"], Omit<WechatPay.UpdateOperationData, "system" | "systemId">, Omit<WechatPay.Filter, "system" | "systemId">> | OakOperation<"create", Omit<WechatPay.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<WechatPay.CreateOperationData, "system" | "systemId">> | OakOperation<WechatPay.UpdateOperation["action"], Omit<WechatPay.UpdateOperationData, "system" | "systemId">, Omit<WechatPay.Filter, "system" | "systemId">>>;
|
|
298
309
|
withdrawAccount$ofSystem?: OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "ofSystem" | "ofSystemId">, Omit<WithdrawAccount.Filter, "ofSystem" | "ofSystemId">> | OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "ofSystem" | "ofSystemId">[]> | Array<OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "ofSystem" | "ofSystemId">> | OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "ofSystem" | "ofSystemId">, Omit<WithdrawAccount.Filter, "ofSystem" | "ofSystemId">>>;
|
|
299
310
|
withdrawAccount$entity?: OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "entity" | "entityId">, Omit<WithdrawAccount.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "entity" | "entityId">> | OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "entity" | "entityId">, Omit<WithdrawAccount.Filter, "entity" | "entityId">>>;
|
|
@@ -326,6 +337,7 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "platformId">> &
|
|
|
326
337
|
account$entity?: OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<Account.RemoveOperation["action"], Omit<Account.RemoveOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Account.CreateOperationData, "entity" | "entityId">> | OakOperation<Account.UpdateOperation["action"], Omit<Account.UpdateOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">> | OakOperation<Account.RemoveOperation["action"], Omit<Account.RemoveOperationData, "entity" | "entityId">, Omit<Account.Filter, "entity" | "entityId">>>;
|
|
327
338
|
offlineAccount$system?: OakOperation<OfflineAccount.UpdateOperation["action"], Omit<OfflineAccount.UpdateOperationData, "system" | "systemId">, Omit<OfflineAccount.Filter, "system" | "systemId">> | OakOperation<OfflineAccount.RemoveOperation["action"], Omit<OfflineAccount.RemoveOperationData, "system" | "systemId">, Omit<OfflineAccount.Filter, "system" | "systemId">> | OakOperation<"create", Omit<OfflineAccount.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<OfflineAccount.CreateOperationData, "system" | "systemId">> | OakOperation<OfflineAccount.UpdateOperation["action"], Omit<OfflineAccount.UpdateOperationData, "system" | "systemId">, Omit<OfflineAccount.Filter, "system" | "systemId">> | OakOperation<OfflineAccount.RemoveOperation["action"], Omit<OfflineAccount.RemoveOperationData, "system" | "systemId">, Omit<OfflineAccount.Filter, "system" | "systemId">>>;
|
|
328
339
|
order$system?: OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "system" | "systemId">, Omit<Order.Filter, "system" | "systemId">> | OakOperation<Order.RemoveOperation["action"], Omit<Order.RemoveOperationData, "system" | "systemId">, Omit<Order.Filter, "system" | "systemId">> | OakOperation<"create", Omit<Order.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<Order.CreateOperationData, "system" | "systemId">> | OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "system" | "systemId">, Omit<Order.Filter, "system" | "systemId">> | OakOperation<Order.RemoveOperation["action"], Omit<Order.RemoveOperationData, "system" | "systemId">, Omit<Order.Filter, "system" | "systemId">>>;
|
|
340
|
+
sysAccountMove$system?: OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "system" | "systemId">>>;
|
|
329
341
|
wechatPay$system?: OakOperation<WechatPay.UpdateOperation["action"], Omit<WechatPay.UpdateOperationData, "system" | "systemId">, Omit<WechatPay.Filter, "system" | "systemId">> | OakOperation<WechatPay.RemoveOperation["action"], Omit<WechatPay.RemoveOperationData, "system" | "systemId">, Omit<WechatPay.Filter, "system" | "systemId">> | OakOperation<"create", Omit<WechatPay.CreateOperationData, "system" | "systemId">[]> | Array<OakOperation<"create", Omit<WechatPay.CreateOperationData, "system" | "systemId">> | OakOperation<WechatPay.UpdateOperation["action"], Omit<WechatPay.UpdateOperationData, "system" | "systemId">, Omit<WechatPay.Filter, "system" | "systemId">> | OakOperation<WechatPay.RemoveOperation["action"], Omit<WechatPay.RemoveOperationData, "system" | "systemId">, Omit<WechatPay.Filter, "system" | "systemId">>>;
|
|
330
342
|
withdrawAccount$ofSystem?: OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "ofSystem" | "ofSystemId">, Omit<WithdrawAccount.Filter, "ofSystem" | "ofSystemId">> | OakOperation<WithdrawAccount.RemoveOperation["action"], Omit<WithdrawAccount.RemoveOperationData, "ofSystem" | "ofSystemId">, Omit<WithdrawAccount.Filter, "ofSystem" | "ofSystemId">> | OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "ofSystem" | "ofSystemId">[]> | Array<OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "ofSystem" | "ofSystemId">> | OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "ofSystem" | "ofSystemId">, Omit<WithdrawAccount.Filter, "ofSystem" | "ofSystemId">> | OakOperation<WithdrawAccount.RemoveOperation["action"], Omit<WithdrawAccount.RemoveOperationData, "ofSystem" | "ofSystemId">, Omit<WithdrawAccount.Filter, "ofSystem" | "ofSystemId">>>;
|
|
331
343
|
withdrawAccount$entity?: OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "entity" | "entityId">, Omit<WithdrawAccount.Filter, "entity" | "entityId">> | OakOperation<WithdrawAccount.RemoveOperation["action"], Omit<WithdrawAccount.RemoveOperationData, "entity" | "entityId">, Omit<WithdrawAccount.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<WithdrawAccount.CreateOperationData, "entity" | "entityId">> | OakOperation<WithdrawAccount.UpdateOperation["action"], Omit<WithdrawAccount.UpdateOperationData, "entity" | "entityId">, Omit<WithdrawAccount.Filter, "entity" | "entityId">> | OakOperation<WithdrawAccount.RemoveOperation["action"], Omit<WithdrawAccount.RemoveOperationData, "entity" | "entityId">, Omit<WithdrawAccount.Filter, "entity" | "entityId">>>;
|
|
@@ -26,6 +26,7 @@ import * as Deposit from "../Deposit/Schema";
|
|
|
26
26
|
import * as Order from "../Order/Schema";
|
|
27
27
|
import * as Pay from "../Pay/Schema";
|
|
28
28
|
import * as Refund from "../Refund/Schema";
|
|
29
|
+
import * as SysAccountMove from "../SysAccountMove/Schema";
|
|
29
30
|
import * as Withdraw from "../Withdraw/Schema";
|
|
30
31
|
import * as WithdrawTransfer from "../WithdrawTransfer/Schema";
|
|
31
32
|
import * as ModiEntity from "../ModiEntity/Schema";
|
|
@@ -108,6 +109,8 @@ export type Schema = EntityShape & {
|
|
|
108
109
|
pay$creator$$aggr?: AggregationResult<Pay.Schema>;
|
|
109
110
|
refund$creator?: Array<Refund.Schema>;
|
|
110
111
|
refund$creator$$aggr?: AggregationResult<Refund.Schema>;
|
|
112
|
+
sysAccountMove$operator?: Array<SysAccountMove.Schema>;
|
|
113
|
+
sysAccountMove$operator$$aggr?: AggregationResult<SysAccountMove.Schema>;
|
|
111
114
|
withdraw$creator?: Array<Withdraw.Schema>;
|
|
112
115
|
withdraw$creator$$aggr?: AggregationResult<Withdraw.Schema>;
|
|
113
116
|
withdrawTransfer$operator?: Array<WithdrawTransfer.Schema>;
|
|
@@ -171,6 +174,7 @@ type AttrFilter = {
|
|
|
171
174
|
order$creator: Order.Filter & SubQueryPredicateMetadata;
|
|
172
175
|
pay$creator: Pay.Filter & SubQueryPredicateMetadata;
|
|
173
176
|
refund$creator: Refund.Filter & SubQueryPredicateMetadata;
|
|
177
|
+
sysAccountMove$operator: SysAccountMove.Filter & SubQueryPredicateMetadata;
|
|
174
178
|
withdraw$creator: Withdraw.Filter & SubQueryPredicateMetadata;
|
|
175
179
|
withdrawTransfer$operator: WithdrawTransfer.Filter & SubQueryPredicateMetadata;
|
|
176
180
|
withdrawTransfer$creator: WithdrawTransfer.Filter & SubQueryPredicateMetadata;
|
|
@@ -335,6 +339,12 @@ export type Projection = {
|
|
|
335
339
|
refund$creator$$aggr?: Refund.Aggregation & {
|
|
336
340
|
$entity: "refund";
|
|
337
341
|
};
|
|
342
|
+
sysAccountMove$operator?: SysAccountMove.Selection & {
|
|
343
|
+
$entity: "sysAccountMove";
|
|
344
|
+
};
|
|
345
|
+
sysAccountMove$operator$$aggr?: SysAccountMove.Aggregation & {
|
|
346
|
+
$entity: "sysAccountMove";
|
|
347
|
+
};
|
|
338
348
|
withdraw$creator?: Withdraw.Selection & {
|
|
339
349
|
$entity: "withdraw";
|
|
340
350
|
};
|
|
@@ -477,6 +487,7 @@ export type CreateOperationData = FormCreateData<Omit<OpSchema, "refId">> & (({
|
|
|
477
487
|
order$creator?: OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "creator" | "creatorId">, Omit<Order.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Order.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Order.CreateOperationData, "creator" | "creatorId">> | OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "creator" | "creatorId">, Omit<Order.Filter, "creator" | "creatorId">>>;
|
|
478
488
|
pay$creator?: OakOperation<Pay.UpdateOperation["action"], Omit<Pay.UpdateOperationData, "creator" | "creatorId">, Omit<Pay.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Pay.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Pay.CreateOperationData, "creator" | "creatorId">> | OakOperation<Pay.UpdateOperation["action"], Omit<Pay.UpdateOperationData, "creator" | "creatorId">, Omit<Pay.Filter, "creator" | "creatorId">>>;
|
|
479
489
|
refund$creator?: OakOperation<Refund.UpdateOperation["action"], Omit<Refund.UpdateOperationData, "creator" | "creatorId">, Omit<Refund.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Refund.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Refund.CreateOperationData, "creator" | "creatorId">> | OakOperation<Refund.UpdateOperation["action"], Omit<Refund.UpdateOperationData, "creator" | "creatorId">, Omit<Refund.Filter, "creator" | "creatorId">>>;
|
|
490
|
+
sysAccountMove$operator?: OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "operator" | "operatorId">>>;
|
|
480
491
|
withdraw$creator?: OakOperation<Withdraw.UpdateOperation["action"], Omit<Withdraw.UpdateOperationData, "creator" | "creatorId">, Omit<Withdraw.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Withdraw.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Withdraw.CreateOperationData, "creator" | "creatorId">> | OakOperation<Withdraw.UpdateOperation["action"], Omit<Withdraw.UpdateOperationData, "creator" | "creatorId">, Omit<Withdraw.Filter, "creator" | "creatorId">>>;
|
|
481
492
|
withdrawTransfer$operator?: OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "operator" | "operatorId">, Omit<WithdrawTransfer.Filter, "operator" | "operatorId">> | OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "operator" | "operatorId">> | OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "operator" | "operatorId">, Omit<WithdrawTransfer.Filter, "operator" | "operatorId">>>;
|
|
482
493
|
withdrawTransfer$creator?: OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "creator" | "creatorId">, Omit<WithdrawTransfer.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "creator" | "creatorId">> | OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "creator" | "creatorId">, Omit<WithdrawTransfer.Filter, "creator" | "creatorId">>>;
|
|
@@ -527,6 +538,7 @@ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "refId">> & (({
|
|
|
527
538
|
order$creator?: OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "creator" | "creatorId">, Omit<Order.Filter, "creator" | "creatorId">> | OakOperation<Order.RemoveOperation["action"], Omit<Order.RemoveOperationData, "creator" | "creatorId">, Omit<Order.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Order.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Order.CreateOperationData, "creator" | "creatorId">> | OakOperation<Order.UpdateOperation["action"], Omit<Order.UpdateOperationData, "creator" | "creatorId">, Omit<Order.Filter, "creator" | "creatorId">> | OakOperation<Order.RemoveOperation["action"], Omit<Order.RemoveOperationData, "creator" | "creatorId">, Omit<Order.Filter, "creator" | "creatorId">>>;
|
|
528
539
|
pay$creator?: OakOperation<Pay.UpdateOperation["action"], Omit<Pay.UpdateOperationData, "creator" | "creatorId">, Omit<Pay.Filter, "creator" | "creatorId">> | OakOperation<Pay.RemoveOperation["action"], Omit<Pay.RemoveOperationData, "creator" | "creatorId">, Omit<Pay.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Pay.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Pay.CreateOperationData, "creator" | "creatorId">> | OakOperation<Pay.UpdateOperation["action"], Omit<Pay.UpdateOperationData, "creator" | "creatorId">, Omit<Pay.Filter, "creator" | "creatorId">> | OakOperation<Pay.RemoveOperation["action"], Omit<Pay.RemoveOperationData, "creator" | "creatorId">, Omit<Pay.Filter, "creator" | "creatorId">>>;
|
|
529
540
|
refund$creator?: OakOperation<Refund.UpdateOperation["action"], Omit<Refund.UpdateOperationData, "creator" | "creatorId">, Omit<Refund.Filter, "creator" | "creatorId">> | OakOperation<Refund.RemoveOperation["action"], Omit<Refund.RemoveOperationData, "creator" | "creatorId">, Omit<Refund.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Refund.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Refund.CreateOperationData, "creator" | "creatorId">> | OakOperation<Refund.UpdateOperation["action"], Omit<Refund.UpdateOperationData, "creator" | "creatorId">, Omit<Refund.Filter, "creator" | "creatorId">> | OakOperation<Refund.RemoveOperation["action"], Omit<Refund.RemoveOperationData, "creator" | "creatorId">, Omit<Refund.Filter, "creator" | "creatorId">>>;
|
|
541
|
+
sysAccountMove$operator?: OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<SysAccountMove.CreateOperationData, "operator" | "operatorId">>>;
|
|
530
542
|
withdraw$creator?: OakOperation<Withdraw.UpdateOperation["action"], Omit<Withdraw.UpdateOperationData, "creator" | "creatorId">, Omit<Withdraw.Filter, "creator" | "creatorId">> | OakOperation<Withdraw.RemoveOperation["action"], Omit<Withdraw.RemoveOperationData, "creator" | "creatorId">, Omit<Withdraw.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<Withdraw.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<Withdraw.CreateOperationData, "creator" | "creatorId">> | OakOperation<Withdraw.UpdateOperation["action"], Omit<Withdraw.UpdateOperationData, "creator" | "creatorId">, Omit<Withdraw.Filter, "creator" | "creatorId">> | OakOperation<Withdraw.RemoveOperation["action"], Omit<Withdraw.RemoveOperationData, "creator" | "creatorId">, Omit<Withdraw.Filter, "creator" | "creatorId">>>;
|
|
531
543
|
withdrawTransfer$operator?: OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "operator" | "operatorId">, Omit<WithdrawTransfer.Filter, "operator" | "operatorId">> | OakOperation<WithdrawTransfer.RemoveOperation["action"], Omit<WithdrawTransfer.RemoveOperationData, "operator" | "operatorId">, Omit<WithdrawTransfer.Filter, "operator" | "operatorId">> | OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "operator" | "operatorId">[]> | Array<OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "operator" | "operatorId">> | OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "operator" | "operatorId">, Omit<WithdrawTransfer.Filter, "operator" | "operatorId">> | OakOperation<WithdrawTransfer.RemoveOperation["action"], Omit<WithdrawTransfer.RemoveOperationData, "operator" | "operatorId">, Omit<WithdrawTransfer.Filter, "operator" | "operatorId">>>;
|
|
532
544
|
withdrawTransfer$creator?: OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "creator" | "creatorId">, Omit<WithdrawTransfer.Filter, "creator" | "creatorId">> | OakOperation<WithdrawTransfer.RemoveOperation["action"], Omit<WithdrawTransfer.RemoveOperationData, "creator" | "creatorId">, Omit<WithdrawTransfer.Filter, "creator" | "creatorId">> | OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "creator" | "creatorId">[]> | Array<OakOperation<"create", Omit<WithdrawTransfer.CreateOperationData, "creator" | "creatorId">> | OakOperation<WithdrawTransfer.UpdateOperation["action"], Omit<WithdrawTransfer.UpdateOperationData, "creator" | "creatorId">, Omit<WithdrawTransfer.Filter, "creator" | "creatorId">> | OakOperation<WithdrawTransfer.RemoveOperation["action"], Omit<WithdrawTransfer.RemoveOperationData, "creator" | "creatorId">, Omit<WithdrawTransfer.Filter, "creator" | "creatorId">>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenericAction } from "oak-domain/lib/actions/action";
|
|
2
|
-
export type ParticularAction = 'pay' | 'refund' | '
|
|
2
|
+
export type ParticularAction = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut' | 'deposit' | 'tax';
|
|
3
3
|
export declare const actions: string[];
|
|
4
4
|
export type Action = GenericAction | ParticularAction | string;
|
|
5
5
|
export declare const actionDefDict: {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.actionDefDict = exports.actions = void 0;
|
|
4
|
-
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "pay", "refund", "
|
|
4
|
+
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "pay", "refund", "withdrawTransfer", "compensate", "moveIn", "moveOut", "deposit", "tax"];
|
|
5
5
|
exports.actionDefDict = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "微信支付帐号", "attr": { "wechatPay": "微信支付", "taxLossRatio": "商户号手续费(百分比)", "refundCompensateRatio": "退款补偿百分比", "refundGapDays": "(支付后)允许退款的天数", "allowWithdrawTransfer": "允许提现转账", "withdrawTransferLossRatio": "提现转账费率(百分数)", "mchId": "商户号", "publicKeyFilePath": "公钥文件路径", "privateKeyFilePath": "私钥文件路径", "apiV3Key": "apiV3Key", "price": "余额", "system": "关联系统", "opers": "操作记录", "channels": "提现通道", "enabled": "是否启用" }, "action": { "pay": "支付", "refund": "退款", "
|
|
1
|
+
{ "name": "微信支付帐号", "attr": { "wechatPay": "微信支付", "taxLossRatio": "商户号手续费(百分比)", "refundCompensateRatio": "退款补偿百分比", "refundGapDays": "(支付后)允许退款的天数", "allowWithdrawTransfer": "允许提现转账", "withdrawTransferLossRatio": "提现转账费率(百分数)", "mchId": "商户号", "publicKeyFilePath": "公钥文件路径", "privateKeyFilePath": "私钥文件路径", "apiV3Key": "apiV3Key", "price": "余额", "system": "关联系统", "opers": "操作记录", "channels": "提现通道", "enabled": "是否启用" }, "action": { "pay": "支付", "refund": "退款", "withdrawTransfer": "提现转账", "compensate": "补偿", "moveIn": "转入", "moveOut": "转出", "deposit": "充值", "tax": "渠道费" } }
|
|
@@ -60,6 +60,7 @@ import * as OfflineAccount from "./OfflineAccount/Schema";
|
|
|
60
60
|
import * as Order from "./Order/Schema";
|
|
61
61
|
import * as Pay from "./Pay/Schema";
|
|
62
62
|
import * as Refund from "./Refund/Schema";
|
|
63
|
+
import * as SysAccountMove from "./SysAccountMove/Schema";
|
|
63
64
|
import * as SysAccountOper from "./SysAccountOper/Schema";
|
|
64
65
|
import * as WechatPay from "./WechatPay/Schema";
|
|
65
66
|
import * as Withdraw from "./Withdraw/Schema";
|
|
@@ -172,6 +173,8 @@ export type UserIdSubQuery = {
|
|
|
172
173
|
entity: "pay";
|
|
173
174
|
}) | (Refund.UserIdSubQuery & {
|
|
174
175
|
entity: "refund";
|
|
176
|
+
}) | (SysAccountMove.UserIdSubQuery & {
|
|
177
|
+
entity: "sysAccountMove";
|
|
175
178
|
}) | (Withdraw.UserIdSubQuery & {
|
|
176
179
|
entity: "withdraw";
|
|
177
180
|
}) | (WithdrawTransfer.UserIdSubQuery & {
|
|
@@ -448,6 +451,8 @@ export type SystemIdSubQuery = {
|
|
|
448
451
|
entity: "offlineAccount";
|
|
449
452
|
}) | (Order.SystemIdSubQuery & {
|
|
450
453
|
entity: "order";
|
|
454
|
+
}) | (SysAccountMove.SystemIdSubQuery & {
|
|
455
|
+
entity: "sysAccountMove";
|
|
451
456
|
}) | (WechatPay.SystemIdSubQuery & {
|
|
452
457
|
entity: "wechatPay";
|
|
453
458
|
}) | (WithdrawAccount.SystemIdSubQuery & {
|
|
@@ -610,6 +615,13 @@ export type RefundIdSubQuery = {
|
|
|
610
615
|
entity: "refund";
|
|
611
616
|
}) | any;
|
|
612
617
|
};
|
|
618
|
+
export type SysAccountMoveIdSubQuery = {
|
|
619
|
+
[K in "$in" | "$nin"]?: (SysAccountOper.SysAccountMoveIdSubQuery & {
|
|
620
|
+
entity: "sysAccountOper";
|
|
621
|
+
}) | (SysAccountMove.SysAccountMoveIdSubQuery & {
|
|
622
|
+
entity: "sysAccountMove";
|
|
623
|
+
}) | any;
|
|
624
|
+
};
|
|
613
625
|
export type SysAccountOperIdSubQuery = {
|
|
614
626
|
[K in "$in" | "$nin"]?: (SysAccountOper.SysAccountOperIdSubQuery & {
|
|
615
627
|
entity: "sysAccountOper";
|
package/lib/triggers/pay.js
CHANGED
|
@@ -6,6 +6,7 @@ const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
|
6
6
|
const payClazz_1 = require("../utils/payClazz");
|
|
7
7
|
const pay_1 = require("../utils/pay");
|
|
8
8
|
const constants_1 = require("../config/constants");
|
|
9
|
+
const filter_1 = require("oak-domain/lib/store/filter");
|
|
9
10
|
async function changeOrderStateByPay(filter, context, option) {
|
|
10
11
|
const orders = await context.select('order', {
|
|
11
12
|
data: {
|
|
@@ -147,6 +148,96 @@ async function changeOrderStateByPay(filter, context, option) {
|
|
|
147
148
|
throw err;
|
|
148
149
|
}
|
|
149
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* 当订单上其它的支付全部完成/失败时,将对应的order上类型为account的pay处理掉
|
|
153
|
+
* 现在的逻辑是:account类型的pay必须等所有其它的pay都完成了,自己才能完成,如果其它都失败了,自己就也失败,钱返回付款的account
|
|
154
|
+
* @param payId
|
|
155
|
+
* @param context
|
|
156
|
+
*/
|
|
157
|
+
async function tryCompleteAccountPay(payId, context) {
|
|
158
|
+
const [pay] = await context.select('pay', {
|
|
159
|
+
data: {
|
|
160
|
+
id: 1,
|
|
161
|
+
paid: 1,
|
|
162
|
+
price: 1,
|
|
163
|
+
iState: 1,
|
|
164
|
+
order: {
|
|
165
|
+
iState: 1,
|
|
166
|
+
price: 1,
|
|
167
|
+
pay$order: {
|
|
168
|
+
$entity: 'pay',
|
|
169
|
+
data: {
|
|
170
|
+
id: 1,
|
|
171
|
+
iState: 1,
|
|
172
|
+
price: 1,
|
|
173
|
+
entity: 1,
|
|
174
|
+
paid: 1,
|
|
175
|
+
},
|
|
176
|
+
filter: {
|
|
177
|
+
iState: {
|
|
178
|
+
$in: ['paid', 'paying'],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
filter: {
|
|
185
|
+
id: payId,
|
|
186
|
+
}
|
|
187
|
+
}, {});
|
|
188
|
+
const { order } = pay;
|
|
189
|
+
if (order) {
|
|
190
|
+
const { price, iState, pay$order: pays } = order;
|
|
191
|
+
(0, assert_1.default)(iState === 'paying');
|
|
192
|
+
const successfulPayIds = [];
|
|
193
|
+
const accountPayIds = [];
|
|
194
|
+
let totalPaid = 0;
|
|
195
|
+
pays?.forEach((pay) => {
|
|
196
|
+
const { iState, entity, paid, price } = pay;
|
|
197
|
+
if (iState === 'paid') {
|
|
198
|
+
(0, assert_1.default)(paid === price);
|
|
199
|
+
totalPaid += paid;
|
|
200
|
+
}
|
|
201
|
+
else if (entity === 'account') {
|
|
202
|
+
totalPaid += paid;
|
|
203
|
+
accountPayIds.push(pay.id);
|
|
204
|
+
if (price === paid) {
|
|
205
|
+
successfulPayIds.push(pay.id);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
if (totalPaid === price) {
|
|
210
|
+
for (const payId2 of successfulPayIds) {
|
|
211
|
+
await context.operate('pay', {
|
|
212
|
+
id: await (0, uuid_1.generateNewIdAsync)(),
|
|
213
|
+
action: 'succeedPaying',
|
|
214
|
+
data: {
|
|
215
|
+
successAt: Date.now(),
|
|
216
|
+
},
|
|
217
|
+
filter: {
|
|
218
|
+
id: payId2,
|
|
219
|
+
}
|
|
220
|
+
}, {});
|
|
221
|
+
}
|
|
222
|
+
return successfulPayIds.length;
|
|
223
|
+
}
|
|
224
|
+
else if (pay.iState === 'closed') {
|
|
225
|
+
// 本条支付关闭,则其它的account pay也跟随关闭
|
|
226
|
+
for (const payId2 of accountPayIds) {
|
|
227
|
+
await context.operate('pay', {
|
|
228
|
+
id: await (0, uuid_1.generateNewIdAsync)(),
|
|
229
|
+
action: 'close',
|
|
230
|
+
data: {},
|
|
231
|
+
filter: {
|
|
232
|
+
id: payId2,
|
|
233
|
+
}
|
|
234
|
+
}, {});
|
|
235
|
+
}
|
|
236
|
+
return accountPayIds.length;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return 0;
|
|
240
|
+
}
|
|
150
241
|
const triggers = [
|
|
151
242
|
{
|
|
152
243
|
name: '当生成pay时,自动开始支付流程',
|
|
@@ -172,10 +263,11 @@ const triggers = [
|
|
|
172
263
|
{
|
|
173
264
|
name: '当pay的状态发生变化时,修改相应的order的状态或者deposit的状态,同时尝试向订阅者推送',
|
|
174
265
|
entity: 'pay',
|
|
175
|
-
action: ['startPaying', 'succeedPaying', 'continuePaying', '
|
|
266
|
+
action: ['startPaying', 'succeedPaying', 'continuePaying', 'close', 'startRefunding',
|
|
176
267
|
'refundAll', 'refundPartially'],
|
|
177
268
|
when: 'after',
|
|
178
269
|
asRoot: true,
|
|
270
|
+
priority: 99,
|
|
179
271
|
fn: async ({ operation }, context, option) => {
|
|
180
272
|
const { data, filter, action, id } = operation;
|
|
181
273
|
(0, assert_1.default)(typeof filter.id === 'string');
|
|
@@ -316,13 +408,14 @@ const triggers = [
|
|
|
316
408
|
},
|
|
317
409
|
},
|
|
318
410
|
{
|
|
319
|
-
name: '当pay完成支付时,计算相应的account以及
|
|
411
|
+
name: '当pay完成支付时,计算相应的account以及system account中的余额变化,使deposit完成',
|
|
320
412
|
entity: 'pay',
|
|
321
413
|
action: 'succeedPaying',
|
|
322
414
|
when: 'after',
|
|
323
415
|
asRoot: true,
|
|
324
416
|
fn: async ({ operation }, context) => {
|
|
325
417
|
const { data, filter } = operation;
|
|
418
|
+
(0, assert_1.default)(typeof filter.id === 'string');
|
|
326
419
|
const projection = {
|
|
327
420
|
id: 1,
|
|
328
421
|
paid: 1,
|
|
@@ -451,50 +544,6 @@ const triggers = [
|
|
|
451
544
|
return cnt;
|
|
452
545
|
},
|
|
453
546
|
},
|
|
454
|
-
{
|
|
455
|
-
name: '当account类型的pay的paid达到price,改为支付成功',
|
|
456
|
-
entity: 'pay',
|
|
457
|
-
asRoot: true,
|
|
458
|
-
action: ['startPaying', 'continuePaying'],
|
|
459
|
-
check(operation) {
|
|
460
|
-
return (!!operation.data.paid) && operation.data.paid > 0;
|
|
461
|
-
},
|
|
462
|
-
filter: {
|
|
463
|
-
entity: 'account',
|
|
464
|
-
},
|
|
465
|
-
when: 'commit',
|
|
466
|
-
fn: async ({ ids }, context) => {
|
|
467
|
-
for (const id of ids) {
|
|
468
|
-
const [row] = await context.select('pay', {
|
|
469
|
-
data: {
|
|
470
|
-
id: 1,
|
|
471
|
-
orderId: 1,
|
|
472
|
-
entity: 1,
|
|
473
|
-
price: 1,
|
|
474
|
-
paid: 1,
|
|
475
|
-
},
|
|
476
|
-
filter: {
|
|
477
|
-
id,
|
|
478
|
-
}
|
|
479
|
-
}, { dontCollect: true });
|
|
480
|
-
(0, assert_1.default)(row && row.entity === 'account');
|
|
481
|
-
if (row.paid && row.paid === row.price) {
|
|
482
|
-
const closeFn = context.openRootMode();
|
|
483
|
-
await context.operate('pay', {
|
|
484
|
-
id: await (0, uuid_1.generateNewIdAsync)(),
|
|
485
|
-
action: 'succeedPaying',
|
|
486
|
-
data: {
|
|
487
|
-
successAt: Date.now(),
|
|
488
|
-
},
|
|
489
|
-
filter: {
|
|
490
|
-
id,
|
|
491
|
-
}
|
|
492
|
-
}, {});
|
|
493
|
-
closeFn();
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
},
|
|
498
547
|
{
|
|
499
548
|
name: '当pay完成支付时,计算其refundable和forbidRefundAt',
|
|
500
549
|
entity: 'pay',
|
|
@@ -522,5 +571,59 @@ const triggers = [
|
|
|
522
571
|
return 1;
|
|
523
572
|
},
|
|
524
573
|
},
|
|
574
|
+
{
|
|
575
|
+
entity: 'pay',
|
|
576
|
+
name: '当有pay支付成功时,尝试将account类型的pay完成',
|
|
577
|
+
action: ['startPaying', 'continuePaying', 'succeedPaying'],
|
|
578
|
+
attributes: ['paid'],
|
|
579
|
+
when: 'after',
|
|
580
|
+
fn: async ({ operation }, context, option) => {
|
|
581
|
+
const { filter } = operation;
|
|
582
|
+
const ids = (0, filter_1.getRelevantIds)(filter);
|
|
583
|
+
(0, assert_1.default)(ids.length === 1);
|
|
584
|
+
return tryCompleteAccountPay(ids[0], context);
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
entity: 'pay',
|
|
589
|
+
name: '当有pay关闭时,如果是account类型的,将金额还给account,否则检查会否测试相关Account pay是否需要关闭',
|
|
590
|
+
action: 'close',
|
|
591
|
+
when: 'after',
|
|
592
|
+
fn: async ({ operation }, context, option) => {
|
|
593
|
+
const { filter } = operation;
|
|
594
|
+
const ids = (0, filter_1.getRelevantIds)(filter);
|
|
595
|
+
(0, assert_1.default)(ids.length === 1);
|
|
596
|
+
const [pay] = await context.select('pay', {
|
|
597
|
+
data: {
|
|
598
|
+
id: 1,
|
|
599
|
+
price: 1,
|
|
600
|
+
paid: 1,
|
|
601
|
+
entity: 1,
|
|
602
|
+
entityId: 1,
|
|
603
|
+
},
|
|
604
|
+
filter: {
|
|
605
|
+
id: ids[0],
|
|
606
|
+
},
|
|
607
|
+
}, {});
|
|
608
|
+
if (pay.entity === 'account') {
|
|
609
|
+
await context.operate('accountOper', {
|
|
610
|
+
id: await (0, uuid_1.generateNewIdAsync)(),
|
|
611
|
+
action: 'create',
|
|
612
|
+
data: {
|
|
613
|
+
id: await (0, uuid_1.generateNewIdAsync)(),
|
|
614
|
+
accountId: pay.entityId,
|
|
615
|
+
entity: 'pay',
|
|
616
|
+
entityId: ids[0],
|
|
617
|
+
type: 'consumeBack',
|
|
618
|
+
totalPlus: pay.paid,
|
|
619
|
+
availPlus: pay.paid,
|
|
620
|
+
},
|
|
621
|
+
}, {});
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
return tryCompleteAccountPay(ids[0], context);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
},
|
|
525
628
|
];
|
|
526
629
|
exports.default = triggers;
|
package/lib/triggers/refund.js
CHANGED
|
@@ -8,5 +8,5 @@ import { FeatureDict as Ogb0FeatureDict, AspectDict as Ogb0AspectDict } from "oa
|
|
|
8
8
|
export type BRC = BackendRuntimeContext<EntityDict>;
|
|
9
9
|
export type FRC = FrontendRuntimeContext<EntityDict>;
|
|
10
10
|
export type RuntimeCxt = FRC | BRC;
|
|
11
|
-
export type AAD = AspectDict & Ogb0AspectDict<EntityDict>;
|
|
11
|
+
export type AAD = AspectDict<EntityDict> & Ogb0AspectDict<EntityDict>;
|
|
12
12
|
export type AFD = FeatureDict<EntityDict> & BasicFeatures<EntityDict> & Ogb0FeatureDict<EntityDict>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SysAccountOperType = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut';
|