oak-pay-business 2.2.10 → 2.3.2
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/withdraw.d.ts +8 -8
- package/es/components/AbstractComponents.d.ts +3 -8
- package/es/components/account/detail/index.js +8 -5
- package/es/components/pay/detail/index.js +8 -5
- package/es/configuration/attrUpdateMatrix.js +8 -0
- package/es/context/BackendRuntimeContext.d.ts +1 -1
- package/es/entities/Order.d.ts +1 -1
- package/es/oak-app-domain/Application/Schema.d.ts +2 -2
- package/es/oak-app-domain/Application/Storage.js +0 -1
- package/es/oak-app-domain/Article/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/ArticleMenu/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/ExtraFile/Schema.d.ts +2 -2
- package/es/oak-app-domain/ExtraFile/Storage.js +1 -1
- package/es/oak-app-domain/Order/Action.d.ts +1 -1
- package/es/oak-app-domain/Order/Storage.js +1 -1
- package/es/oak-app-domain/Platform/Schema.d.ts +2 -2
- package/es/oak-app-domain/Platform/Storage.js +0 -1
- package/es/oak-app-domain/SmsTemplate/Schema.d.ts +6 -5
- package/es/oak-app-domain/SmsTemplate/Storage.js +2 -4
- package/es/oak-app-domain/SmsTemplate/Style.d.ts +3 -0
- package/es/oak-app-domain/SmsTemplate/Style.js +10 -0
- package/es/oak-app-domain/SmsTemplate/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/StyleDict.js +2 -0
- package/es/oak-app-domain/System/Schema.d.ts +4 -4
- package/es/oak-app-domain/System/Storage.js +0 -2
- package/es/oak-app-domain/WechatTemplate/locales/zh_CN.json +1 -1
- package/es/triggers/pay.js +50 -47
- package/es/triggers/withdraw.d.ts +1 -1
- package/es/utils/application.d.ts +1 -1
- package/es/utils/pay.js +4 -1
- package/es/utils/payClazz/WechatPay/index.d.ts +1 -1
- package/es/watchers/pay.js +1 -1
- package/lib/aspects/withdraw.d.ts +12 -12
- package/lib/components/pay/detail/index.js +8 -5
- package/lib/configuration/attrUpdateMatrix.js +8 -0
- package/lib/entities/Order.d.ts +1 -1
- package/lib/oak-app-domain/Application/Schema.d.ts +2 -2
- package/lib/oak-app-domain/Application/Storage.js +0 -1
- package/lib/oak-app-domain/Article/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/ArticleMenu/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/ExtraFile/Schema.d.ts +2 -2
- package/lib/oak-app-domain/ExtraFile/Storage.js +1 -1
- package/lib/oak-app-domain/Order/Action.d.ts +1 -1
- package/lib/oak-app-domain/Order/Storage.js +1 -1
- package/lib/oak-app-domain/Platform/Schema.d.ts +2 -2
- package/lib/oak-app-domain/Platform/Storage.js +0 -1
- package/lib/oak-app-domain/SmsTemplate/Schema.d.ts +6 -5
- package/lib/oak-app-domain/SmsTemplate/Storage.js +2 -4
- package/lib/oak-app-domain/SmsTemplate/Style.d.ts +3 -0
- package/lib/oak-app-domain/SmsTemplate/Style.js +13 -0
- package/lib/oak-app-domain/SmsTemplate/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/StyleDict.js +52 -50
- package/lib/oak-app-domain/System/Schema.d.ts +4 -4
- package/lib/oak-app-domain/System/Storage.js +0 -2
- package/lib/oak-app-domain/WechatTemplate/locales/zh_CN.json +1 -1
- package/lib/triggers/pay.js +50 -47
- package/lib/utils/pay.js +4 -1
- package/lib/utils/payClazz/WechatPay/index.d.ts +1 -1
- package/lib/watchers/pay.js +1 -1
- package/package.json +4 -4
- package/src/entities/Order.ts +1 -1
package/es/aspects/withdraw.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export declare function getWithdrawCreateData(params: {
|
|
|
12
12
|
creatorId: string;
|
|
13
13
|
creator?: import("../oak-app-domain/User/Schema").UpdateOperation | undefined;
|
|
14
14
|
} & {
|
|
15
|
-
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "
|
|
16
|
-
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "
|
|
15
|
+
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
16
|
+
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
17
17
|
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
18
18
|
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
19
19
|
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
@@ -26,8 +26,8 @@ export declare function getWithdrawCreateData(params: {
|
|
|
26
26
|
creator?: undefined;
|
|
27
27
|
creatorId: string;
|
|
28
28
|
} & {
|
|
29
|
-
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "
|
|
30
|
-
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "
|
|
29
|
+
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
30
|
+
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
31
31
|
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
32
32
|
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
33
33
|
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
@@ -40,8 +40,8 @@ export declare function getWithdrawCreateData(params: {
|
|
|
40
40
|
creatorId: string;
|
|
41
41
|
creator?: import("../oak-app-domain/User/Schema").UpdateOperation | undefined;
|
|
42
42
|
} & {
|
|
43
|
-
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "
|
|
44
|
-
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "
|
|
43
|
+
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
44
|
+
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
45
45
|
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
46
46
|
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
47
47
|
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
@@ -54,8 +54,8 @@ export declare function getWithdrawCreateData(params: {
|
|
|
54
54
|
creator?: undefined;
|
|
55
55
|
creatorId: string;
|
|
56
56
|
} & {
|
|
57
|
-
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "
|
|
58
|
-
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "
|
|
57
|
+
refund$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/Refund/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/Refund/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/Refund/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
58
|
+
withdrawTransfer$withdraw?: import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">[]> | (import("oak-domain/lib/types").Operation<string, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").UpdateOperationData, "withdraw" | "withdrawId">, Omit<import("../oak-app-domain/WithdrawTransfer/Schema").Filter, "withdraw" | "withdrawId">> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/WithdrawTransfer/Schema").CreateOperationData, "withdraw" | "withdrawId">>)[] | undefined;
|
|
59
59
|
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
60
60
|
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
61
61
|
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
@@ -21,13 +21,8 @@ declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<Enti
|
|
|
21
21
|
rowSelection?: any;
|
|
22
22
|
hideHeader?: boolean | undefined;
|
|
23
23
|
disableSerialNumber?: boolean | undefined;
|
|
24
|
-
size?: "
|
|
25
|
-
scroll?:
|
|
26
|
-
x?: string | number | true | undefined;
|
|
27
|
-
y?: string | number | undefined;
|
|
28
|
-
} & {
|
|
29
|
-
scrollToFirstRowOnChange?: boolean | undefined;
|
|
30
|
-
}) | undefined;
|
|
24
|
+
size?: "large" | "middle" | "small" | undefined;
|
|
25
|
+
scroll?: any;
|
|
31
26
|
empty?: React.ReactNode;
|
|
32
27
|
opWidth?: number | undefined;
|
|
33
28
|
ellipsis?: boolean | undefined;
|
|
@@ -48,7 +43,7 @@ declare const ListPro: <T extends keyof EntityDict>(props: {
|
|
|
48
43
|
tablePagination?: any;
|
|
49
44
|
rowSelection?: any;
|
|
50
45
|
disableSerialNumber?: boolean | undefined;
|
|
51
|
-
size?: "
|
|
46
|
+
size?: "large" | "middle" | "small" | undefined;
|
|
52
47
|
scroll?: any;
|
|
53
48
|
empty?: any;
|
|
54
49
|
opWidth?: number | undefined;
|
|
@@ -225,17 +225,20 @@ export default OakComponent({
|
|
|
225
225
|
setDepPriceMp(price) { this.setDepPrice(price); },
|
|
226
226
|
setDepositChannelMp(depositChannel) { this.setDepositChannel(depositChannel); },
|
|
227
227
|
focus: false,
|
|
228
|
+
unsub: undefined,
|
|
228
229
|
},
|
|
229
230
|
lifetimes: {
|
|
230
|
-
ready() {
|
|
231
|
+
async ready() {
|
|
231
232
|
const { oakId } = this.props;
|
|
232
233
|
assert(typeof oakId === 'string');
|
|
233
|
-
this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.accountNumberChanged}-${oakId}`]
|
|
234
|
+
const unsub = await this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.accountNumberChanged}-${oakId}`]);
|
|
235
|
+
this.setState({
|
|
236
|
+
unsub,
|
|
237
|
+
});
|
|
234
238
|
},
|
|
235
239
|
detached() {
|
|
236
|
-
const {
|
|
237
|
-
|
|
238
|
-
this.unsubDataEvents([`${DATA_SUBSCRIBER_KEYS.accountNumberChanged}-${oakId}`], 'opb-c-account-detail');
|
|
240
|
+
const { unsub } = this.state;
|
|
241
|
+
unsub && unsub();
|
|
239
242
|
}
|
|
240
243
|
}
|
|
241
244
|
});
|
|
@@ -118,6 +118,7 @@ export default OakComponent({
|
|
|
118
118
|
data: {
|
|
119
119
|
showCloseConfirmMp: false,
|
|
120
120
|
showChannelSelectMp: false,
|
|
121
|
+
unsub: undefined,
|
|
121
122
|
},
|
|
122
123
|
formData({ data }) {
|
|
123
124
|
const application = this.features.application.getApplication();
|
|
@@ -292,15 +293,17 @@ export default OakComponent({
|
|
|
292
293
|
}
|
|
293
294
|
},
|
|
294
295
|
lifetimes: {
|
|
295
|
-
ready() {
|
|
296
|
+
async ready() {
|
|
296
297
|
const { oakId } = this.props;
|
|
297
298
|
assert(typeof oakId === 'string');
|
|
298
|
-
this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.payStateChanged}-${oakId}`]
|
|
299
|
+
const unsub = await this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.payStateChanged}-${oakId}`]);
|
|
300
|
+
this.setState({
|
|
301
|
+
unsub,
|
|
302
|
+
});
|
|
299
303
|
},
|
|
300
304
|
detached() {
|
|
301
|
-
const {
|
|
302
|
-
|
|
303
|
-
this.unsubDataEvents([`${DATA_SUBSCRIBER_KEYS.payStateChanged}-${oakId}`], 'opb-c-pay-detail');
|
|
305
|
+
const { unsub } = this.state;
|
|
306
|
+
unsub && unsub();
|
|
304
307
|
}
|
|
305
308
|
},
|
|
306
309
|
listeners: {
|
|
@@ -15,7 +15,7 @@ export declare class BackendRuntimeContext<ED extends EntityDict & BaseEntityDic
|
|
|
15
15
|
type?: number | undefined;
|
|
16
16
|
systemId?: number | undefined;
|
|
17
17
|
system?: import("../oak-app-domain/System/Schema").Projection | undefined;
|
|
18
|
-
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").
|
|
18
|
+
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
|
|
19
19
|
style?: number | import("oak-domain/lib/types").JsonProjection<import("oak-general-business/lib/types/Style").Style> | undefined;
|
|
20
20
|
domainId?: number | undefined;
|
|
21
21
|
domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined;
|
package/es/entities/Order.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface Schema extends EntityShape {
|
|
|
20
20
|
opers: AccountOper[];
|
|
21
21
|
}
|
|
22
22
|
export type IAction = 'startPaying' | 'payAll' | 'payPartially' | 'payNone' | 'timeout' | 'cancel' | 'startRefunding' | 'refundAll' | 'refundPartially' | 'refundNone';
|
|
23
|
-
export type IState = '
|
|
23
|
+
export type IState = 'unpaid' | 'timeout' | 'cancelled' | 'paying' | 'partiallyPaid' | 'paid' | 'refunding' | 'partiallyRefunded' | 'refunded';
|
|
24
24
|
export declare const IActionDef: ActionDef<IAction, IState>;
|
|
25
25
|
export type Action = IAction | 'settle';
|
|
26
26
|
export declare const entityDesc: EntityDesc<Schema, Action, '', {
|
|
@@ -74,7 +74,7 @@ export type NativeConfig = {
|
|
|
74
74
|
};
|
|
75
75
|
export type OpSchema = EntityShape & {
|
|
76
76
|
name: String<32>;
|
|
77
|
-
description
|
|
77
|
+
description?: Text | null;
|
|
78
78
|
type: AppType;
|
|
79
79
|
systemId: ForeignKey<"system">;
|
|
80
80
|
config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig;
|
|
@@ -84,7 +84,7 @@ export type OpSchema = EntityShape & {
|
|
|
84
84
|
export type OpAttr = keyof OpSchema;
|
|
85
85
|
export type Schema = EntityShape & {
|
|
86
86
|
name: String<32>;
|
|
87
|
-
description
|
|
87
|
+
description?: Text | null;
|
|
88
88
|
type: AppType;
|
|
89
89
|
systemId: ForeignKey<"system">;
|
|
90
90
|
config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "文章", "attr": { "name": "
|
|
1
|
+
{ "name": "文章", "attr": { "name": "标题", "content": "正文内容", "articleMenu": "菜单", "files": "文件" } }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "
|
|
1
|
+
{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "文件" } }
|
|
@@ -23,7 +23,7 @@ export type OpSchema = EntityShape & {
|
|
|
23
23
|
extra1?: Text | null;
|
|
24
24
|
extra2?: Object | null;
|
|
25
25
|
extension?: String<16> | null;
|
|
26
|
-
size?: Int<
|
|
26
|
+
size?: Int<8> | null;
|
|
27
27
|
sort?: Float<22, 10> | null;
|
|
28
28
|
fileType?: String<128> | null;
|
|
29
29
|
isBridge?: Boolean | null;
|
|
@@ -46,7 +46,7 @@ export type Schema = EntityShape & {
|
|
|
46
46
|
extra1?: Text | null;
|
|
47
47
|
extra2?: Object | null;
|
|
48
48
|
extension?: String<16> | null;
|
|
49
|
-
size?: Int<
|
|
49
|
+
size?: Int<8> | null;
|
|
50
50
|
sort?: Float<22, 10> | null;
|
|
51
51
|
fileType?: String<128> | null;
|
|
52
52
|
isBridge?: Boolean | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ActionDef } from "oak-domain/lib/types/Action";
|
|
2
2
|
import { GenericAction } from "oak-domain/lib/actions/action";
|
|
3
3
|
export type IAction = 'startPaying' | 'payAll' | 'payPartially' | 'payNone' | 'timeout' | 'cancel' | 'startRefunding' | 'refundAll' | 'refundPartially' | 'refundNone' | string;
|
|
4
|
-
export type IState = '
|
|
4
|
+
export type IState = 'unpaid' | 'timeout' | 'cancelled' | 'paying' | 'partiallyPaid' | 'paid' | 'refunding' | 'partiallyRefunded' | 'refunded' | string;
|
|
5
5
|
export declare const IActionDef: ActionDef<IAction, IState>;
|
|
6
6
|
export type ParticularAction = IAction | 'settle';
|
|
7
7
|
export declare const actions: string[];
|
|
@@ -60,7 +60,7 @@ export const desc = {
|
|
|
60
60
|
},
|
|
61
61
|
iState: {
|
|
62
62
|
type: "enum",
|
|
63
|
-
enumeration: ["
|
|
63
|
+
enumeration: ["unpaid", "timeout", "cancelled", "paying", "partiallyPaid", "paid", "refunding", "partiallyRefunded", "refunded"]
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
actionType: "crud",
|
|
@@ -10,7 +10,7 @@ import * as Message from "../Message/Schema";
|
|
|
10
10
|
import * as System from "../System/Schema";
|
|
11
11
|
export type OpSchema = EntityShape & {
|
|
12
12
|
name: String<32>;
|
|
13
|
-
description
|
|
13
|
+
description?: Text | null;
|
|
14
14
|
config: Config;
|
|
15
15
|
style?: Style | null;
|
|
16
16
|
entity?: String<32> | null;
|
|
@@ -19,7 +19,7 @@ export type OpSchema = EntityShape & {
|
|
|
19
19
|
export type OpAttr = keyof OpSchema;
|
|
20
20
|
export type Schema = EntityShape & {
|
|
21
21
|
name: String<32>;
|
|
22
|
-
description
|
|
22
|
+
description?: Text | null;
|
|
23
23
|
config: Config;
|
|
24
24
|
style?: Style | null;
|
|
25
25
|
entity?: String<32> | null;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|
2
|
-
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand";
|
|
2
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand";
|
|
3
3
|
import { OneOf } from "oak-domain/lib/types/Polyfill";
|
|
4
4
|
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity";
|
|
5
5
|
import { GenericAction } from "oak-domain/lib/actions/action";
|
|
6
|
-
import {
|
|
6
|
+
import { Text, String, Datetime } from "oak-domain/lib/types/DataType";
|
|
7
7
|
import * as System from "../System/Schema";
|
|
8
8
|
import * as MessageTypeSmsTemplate from "../MessageTypeSmsTemplate/Schema";
|
|
9
|
+
export type Origin = "ali" | "tencent" | "ctyun" | "qiniu";
|
|
9
10
|
export type OpSchema = EntityShape & {
|
|
10
11
|
systemId: ForeignKey<"system">;
|
|
11
|
-
origin:
|
|
12
|
+
origin: Origin;
|
|
12
13
|
templateName: Text;
|
|
13
14
|
templateCode: String<64>;
|
|
14
15
|
templateContent: Text;
|
|
@@ -17,7 +18,7 @@ export type OpSchema = EntityShape & {
|
|
|
17
18
|
export type OpAttr = keyof OpSchema;
|
|
18
19
|
export type Schema = EntityShape & {
|
|
19
20
|
systemId: ForeignKey<"system">;
|
|
20
|
-
origin:
|
|
21
|
+
origin: Origin;
|
|
21
22
|
templateName: Text;
|
|
22
23
|
templateCode: String<64>;
|
|
23
24
|
templateContent: Text;
|
|
@@ -35,7 +36,7 @@ type AttrFilter = {
|
|
|
35
36
|
$$updateAt$$: Q_DateValue;
|
|
36
37
|
systemId: Q_StringValue;
|
|
37
38
|
system: System.Filter;
|
|
38
|
-
origin:
|
|
39
|
+
origin: Q_EnumValue<Origin>;
|
|
39
40
|
templateName: Q_StringValue;
|
|
40
41
|
templateCode: Q_StringValue;
|
|
41
42
|
templateContent: Q_StringValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "
|
|
1
|
+
{ "name": "短信模板", "attr": { "system": "系统", "origin": "源", "templateName": "模板名称", "templateCode": "模板Code", "templateContent": "模板内容", "syncAt": "同步时间" }, "v": { "origin": { "ali": "阿里云", "tencent": "腾讯云", "ctyun": "天翼云", "qiniu": "七牛云" } } }
|
|
@@ -11,6 +11,7 @@ import { style as message } from "./Message/Style";
|
|
|
11
11
|
import { style as mobile } from "./Mobile/Style";
|
|
12
12
|
import { style as notification } from "./Notification/Style";
|
|
13
13
|
import { style as parasite } from "./Parasite/Style";
|
|
14
|
+
import { style as smsTemplate } from "./SmsTemplate/Style";
|
|
14
15
|
import { style as toDo } from "./ToDo/Style";
|
|
15
16
|
import { style as token } from "./Token/Style";
|
|
16
17
|
import { style as userEntityGrant } from "./UserEntityGrant/Style";
|
|
@@ -50,6 +51,7 @@ export const styleDict = {
|
|
|
50
51
|
mobile,
|
|
51
52
|
notification,
|
|
52
53
|
parasite,
|
|
54
|
+
smsTemplate,
|
|
53
55
|
toDo,
|
|
54
56
|
token,
|
|
55
57
|
userEntityGrant,
|
|
@@ -36,10 +36,10 @@ type PayConfig = {
|
|
|
36
36
|
};
|
|
37
37
|
export type OpSchema = EntityShape & {
|
|
38
38
|
name: String<32>;
|
|
39
|
-
description
|
|
39
|
+
description?: Text | null;
|
|
40
40
|
config: Config;
|
|
41
41
|
platformId?: ForeignKey<"platform"> | null;
|
|
42
|
-
folder
|
|
42
|
+
folder?: String<16> | null;
|
|
43
43
|
super?: Boolean | null;
|
|
44
44
|
style?: Style | null;
|
|
45
45
|
entity?: String<32> | null;
|
|
@@ -49,10 +49,10 @@ export type OpSchema = EntityShape & {
|
|
|
49
49
|
export type OpAttr = keyof OpSchema;
|
|
50
50
|
export type Schema = EntityShape & {
|
|
51
51
|
name: String<32>;
|
|
52
|
-
description
|
|
52
|
+
description?: Text | null;
|
|
53
53
|
config: Config;
|
|
54
54
|
platformId?: ForeignKey<"platform"> | null;
|
|
55
|
-
folder
|
|
55
|
+
folder?: String<16> | null;
|
|
56
56
|
super?: Boolean | null;
|
|
57
57
|
style?: Style | null;
|
|
58
58
|
entity?: String<32> | null;
|
|
@@ -9,7 +9,6 @@ export const desc = {
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
description: {
|
|
12
|
-
notNull: true,
|
|
13
12
|
type: "text"
|
|
14
13
|
},
|
|
15
14
|
config: {
|
|
@@ -21,7 +20,6 @@ export const desc = {
|
|
|
21
20
|
ref: "platform"
|
|
22
21
|
},
|
|
23
22
|
folder: {
|
|
24
|
-
notNull: true,
|
|
25
23
|
type: "varchar",
|
|
26
24
|
params: {
|
|
27
25
|
length: 16
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "
|
|
1
|
+
{ "name": "微信消息模板", "attr": { "type": "类型", "application": "关联应用", "wechatId": "微信端id", "title": "标题", "primaryIndustry": "所属一级行业", "deputyIndustry": "所属二级行业", "content": "内容", "example": "示例", "param": "选填参数", "keywordEnumValueList": "枚举参数值范围", "syncAt": "同步时间" }, "v": { "type": { "2": "一次性订阅", "3": "长期订阅" } } }
|
package/es/triggers/pay.js
CHANGED
|
@@ -267,8 +267,7 @@ const triggers = [
|
|
|
267
267
|
priority: 99,
|
|
268
268
|
fn: async ({ operation }, context, option) => {
|
|
269
269
|
const { data, filter, action, id } = operation;
|
|
270
|
-
|
|
271
|
-
const [pay] = await context.select('pay', {
|
|
270
|
+
const pays = await context.select('pay', {
|
|
272
271
|
data: {
|
|
273
272
|
id: 1,
|
|
274
273
|
orderId: 1,
|
|
@@ -288,11 +287,14 @@ const triggers = [
|
|
|
288
287
|
},
|
|
289
288
|
filter,
|
|
290
289
|
}, { dontCollect: true });
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
290
|
+
for (const pay of pays) {
|
|
291
|
+
const { orderId, depositId, iState, deposit, application } = pay;
|
|
292
|
+
context.saveOperationToEvent(id, `${DATA_SUBSCRIBER_KEYS.payStateChanged}-${filter.id}`);
|
|
293
|
+
if (orderId) {
|
|
294
|
+
await changeOrderStateByPay({ id: orderId }, context, option);
|
|
295
|
+
}
|
|
295
296
|
}
|
|
297
|
+
return pays.length;
|
|
296
298
|
},
|
|
297
299
|
},
|
|
298
300
|
{
|
|
@@ -329,26 +331,26 @@ const triggers = [
|
|
|
329
331
|
data: fullPayProjection,
|
|
330
332
|
filter,
|
|
331
333
|
}, {});
|
|
332
|
-
assert(pays.length === 1);
|
|
333
|
-
const [pay] = pays;
|
|
334
|
-
const { applicationId, entity, entityId, iState, depositId } = pay;
|
|
335
|
-
assert(iState === 'unpaid' || iState === 'paying');
|
|
336
334
|
let cnt = 0;
|
|
337
|
-
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
335
|
+
for (const pay of pays) {
|
|
336
|
+
const { applicationId, entity, entityId, iState, depositId } = pay;
|
|
337
|
+
assert(iState === 'unpaid' || iState === 'paying');
|
|
338
|
+
if (iState === 'paying') {
|
|
339
|
+
const payClazz = await getPayClazz(entity, entityId, context);
|
|
340
|
+
await payClazz.close(pay);
|
|
341
|
+
cnt++;
|
|
342
|
+
}
|
|
343
|
+
if (depositId) {
|
|
344
|
+
await context.operate('deposit', {
|
|
345
|
+
id: await generateNewIdAsync(),
|
|
346
|
+
action: 'fail',
|
|
347
|
+
data: {},
|
|
348
|
+
filter: {
|
|
349
|
+
id: depositId,
|
|
350
|
+
},
|
|
351
|
+
}, {});
|
|
352
|
+
cnt++;
|
|
353
|
+
}
|
|
352
354
|
}
|
|
353
355
|
return cnt;
|
|
354
356
|
},
|
|
@@ -588,9 +590,7 @@ const triggers = [
|
|
|
588
590
|
when: 'after',
|
|
589
591
|
fn: async ({ operation }, context, option) => {
|
|
590
592
|
const { filter } = operation;
|
|
591
|
-
const
|
|
592
|
-
assert(ids.length === 1);
|
|
593
|
-
const [pay] = await context.select('pay', {
|
|
593
|
+
const pays = await context.select('pay', {
|
|
594
594
|
data: {
|
|
595
595
|
id: 1,
|
|
596
596
|
price: 1,
|
|
@@ -598,28 +598,31 @@ const triggers = [
|
|
|
598
598
|
entity: 1,
|
|
599
599
|
entityId: 1,
|
|
600
600
|
},
|
|
601
|
-
filter
|
|
602
|
-
id: ids[0],
|
|
603
|
-
},
|
|
601
|
+
filter,
|
|
604
602
|
}, {});
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
data: {
|
|
603
|
+
let cnt = 0;
|
|
604
|
+
for (const pay of pays) {
|
|
605
|
+
if (pay.entity === 'account') {
|
|
606
|
+
await context.operate('accountOper', {
|
|
610
607
|
id: await generateNewIdAsync(),
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
608
|
+
action: 'create',
|
|
609
|
+
data: {
|
|
610
|
+
id: await generateNewIdAsync(),
|
|
611
|
+
accountId: pay.entityId,
|
|
612
|
+
entity: 'pay',
|
|
613
|
+
entityId: pay.id,
|
|
614
|
+
type: 'consumeBack',
|
|
615
|
+
totalPlus: pay.paid,
|
|
616
|
+
availPlus: pay.paid,
|
|
617
|
+
},
|
|
618
|
+
}, {});
|
|
619
|
+
cnt++;
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
cnt += await tryCompleteAccountPay(pay.id, context);
|
|
623
|
+
}
|
|
622
624
|
}
|
|
625
|
+
return cnt;
|
|
623
626
|
}
|
|
624
627
|
},
|
|
625
628
|
/* 影响的地方有点多,先不做了
|
|
@@ -6,6 +6,6 @@ import { BRC } from '../types/RuntimeCxt';
|
|
|
6
6
|
* @param context
|
|
7
7
|
* @param refunds
|
|
8
8
|
*/
|
|
9
|
-
export declare function updateWithdrawState(context: BRC, id: string): Promise<
|
|
9
|
+
export declare function updateWithdrawState(context: BRC, id: string): Promise<0 | 1>;
|
|
10
10
|
declare const triggers: Trigger<EntityDict, 'withdraw', BRC>[];
|
|
11
11
|
export default triggers;
|