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.
Files changed (141) hide show
  1. package/es/aspects/AspectDict.d.ts +3 -3
  2. package/es/aspects/index.d.ts +2 -1
  3. package/es/checkers/accountOper.js +4 -3
  4. package/es/checkers/offlineAccount.js +4 -1
  5. package/es/checkers/refund.js +1 -0
  6. package/es/components/offlineAccount/upsert/web.pc.js +1 -1
  7. package/es/components/sysAccount/survey/locales/zh-CN.json +3 -1
  8. package/es/components/sysAccount/survey/web.pc.js +69 -32
  9. package/es/components/sysAccount/survey/web.pc.module.less +3 -2
  10. package/es/components/sysAccount/transferList/index.d.ts +3 -0
  11. package/es/components/sysAccount/transferList/index.js +52 -0
  12. package/es/components/sysAccount/transferList/index.json +1 -0
  13. package/es/components/sysAccount/transferList/locales/zh-CN.json +6 -0
  14. package/es/components/sysAccount/transferList/web.pc.d.ts +12 -0
  15. package/es/components/sysAccount/transferList/web.pc.js +45 -0
  16. package/es/components/sysAccountMove/create/index.d.ts +7 -0
  17. package/es/components/sysAccountMove/create/index.js +145 -0
  18. package/es/components/sysAccountMove/create/index.json +1 -0
  19. package/es/components/sysAccountMove/create/locales/zh-CN.json +6 -0
  20. package/es/components/sysAccountMove/create/web.pc.d.ts +26 -0
  21. package/es/components/sysAccountMove/create/web.pc.js +68 -0
  22. package/es/components/sysAccountOper/list/index.d.ts +5 -0
  23. package/es/components/sysAccountOper/list/index.js +127 -0
  24. package/es/components/sysAccountOper/list/index.json +1 -0
  25. package/es/components/sysAccountOper/list/locales/zh-CN.json +5 -0
  26. package/es/components/sysAccountOper/list/web.module.less +42 -0
  27. package/es/components/sysAccountOper/list/web.pc.d.ts +25 -0
  28. package/es/components/sysAccountOper/list/web.pc.js +36 -0
  29. package/es/components/withdrawTransfer/list/locales/zh-CN.json +1 -1
  30. package/es/components/wpAccount/upsert/web.pc.js +1 -1
  31. package/es/configuration/attrUpdateMatrix.js +2 -2
  32. package/es/data/actionAuth.js +7 -2
  33. package/es/data/i18n.js +49 -3
  34. package/es/data/path.js +2 -2
  35. package/es/entities/AccountOper.d.ts +1 -1
  36. package/es/entities/AccountOper.js +3 -1
  37. package/es/entities/OfflineAccount.d.ts +1 -1
  38. package/es/entities/OfflineAccount.js +8 -2
  39. package/es/entities/SysAccountMove.d.ts +13 -0
  40. package/es/entities/SysAccountMove.js +18 -0
  41. package/es/entities/SysAccountOper.d.ts +4 -1
  42. package/es/entities/SysAccountOper.js +1 -0
  43. package/es/entities/WpAccount.d.ts +1 -1
  44. package/es/entities/WpAccount.js +8 -2
  45. package/es/locales/error/zh-CN.json +5 -0
  46. package/es/locales/offlineAccount/zh-CN.json +2 -1
  47. package/es/oak-app-domain/AccountOper/Schema.d.ts +1 -1
  48. package/es/oak-app-domain/AccountOper/Storage.js +1 -1
  49. package/es/oak-app-domain/AccountOper/Style.js +1 -0
  50. package/es/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
  51. package/es/oak-app-domain/EntityDict.d.ts +2 -0
  52. package/es/oak-app-domain/OfflineAccount/Action.d.ts +1 -1
  53. package/es/oak-app-domain/OfflineAccount/Action.js +1 -1
  54. package/es/oak-app-domain/OfflineAccount/Style.js +4 -1
  55. package/es/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -1
  56. package/es/oak-app-domain/Path/Schema.d.ts +6 -0
  57. package/es/oak-app-domain/Path/Storage.js +6 -0
  58. package/es/oak-app-domain/Path/locales/zh_CN.json +1 -1
  59. package/es/oak-app-domain/Storage.js +2 -0
  60. package/es/oak-app-domain/SysAccountMove/Schema.d.ts +185 -0
  61. package/es/oak-app-domain/SysAccountMove/Schema.js +1 -0
  62. package/es/oak-app-domain/SysAccountMove/Storage.d.ts +3 -0
  63. package/es/oak-app-domain/SysAccountMove/Storage.js +31 -0
  64. package/es/oak-app-domain/SysAccountMove/locales/zh_CN.json +1 -0
  65. package/es/oak-app-domain/SysAccountOper/Schema.d.ts +34 -5
  66. package/es/oak-app-domain/SysAccountOper/Storage.js +4 -0
  67. package/es/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -1
  68. package/es/oak-app-domain/System/Schema.d.ts +12 -0
  69. package/es/oak-app-domain/User/Schema.d.ts +12 -0
  70. package/es/oak-app-domain/WpAccount/Action.d.ts +1 -1
  71. package/es/oak-app-domain/WpAccount/Action.js +1 -1
  72. package/es/oak-app-domain/WpAccount/Style.js +4 -1
  73. package/es/oak-app-domain/WpAccount/locales/zh_CN.json +1 -1
  74. package/es/oak-app-domain/_SubQuery.d.ts +12 -0
  75. package/es/triggers/pay.js +149 -46
  76. package/es/triggers/refund.js +3 -0
  77. package/es/types/RuntimeCxt.d.ts +1 -1
  78. package/es/types/sysAccountOper.d.ts +1 -0
  79. package/es/types/sysAccountOper.js +1 -0
  80. package/es/utils/payClazz/Account.js +3 -2
  81. package/lib/aspects/AspectDict.d.ts +3 -3
  82. package/lib/aspects/index.d.ts +2 -1
  83. package/lib/checkers/accountOper.js +4 -3
  84. package/lib/checkers/offlineAccount.js +4 -1
  85. package/lib/checkers/refund.js +1 -0
  86. package/lib/configuration/attrUpdateMatrix.js +2 -2
  87. package/lib/data/actionAuth.js +7 -2
  88. package/lib/data/i18n.js +49 -3
  89. package/lib/data/path.js +2 -2
  90. package/lib/entities/AccountOper.d.ts +1 -1
  91. package/lib/entities/AccountOper.js +3 -1
  92. package/lib/entities/OfflineAccount.d.ts +1 -1
  93. package/lib/entities/OfflineAccount.js +8 -2
  94. package/lib/entities/SysAccountMove.d.ts +13 -0
  95. package/lib/entities/SysAccountMove.js +21 -0
  96. package/lib/entities/SysAccountOper.d.ts +4 -1
  97. package/lib/entities/SysAccountOper.js +1 -0
  98. package/lib/entities/WpAccount.d.ts +1 -1
  99. package/lib/entities/WpAccount.js +8 -2
  100. package/lib/locales/error/zh-CN.json +5 -0
  101. package/lib/locales/offlineAccount/zh-CN.json +2 -1
  102. package/lib/oak-app-domain/AccountOper/Schema.d.ts +1 -1
  103. package/lib/oak-app-domain/AccountOper/Storage.js +1 -1
  104. package/lib/oak-app-domain/AccountOper/Style.js +1 -0
  105. package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
  106. package/lib/oak-app-domain/EntityDict.d.ts +2 -0
  107. package/lib/oak-app-domain/OfflineAccount/Action.d.ts +1 -1
  108. package/lib/oak-app-domain/OfflineAccount/Action.js +1 -1
  109. package/lib/oak-app-domain/OfflineAccount/Style.js +4 -1
  110. package/lib/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -1
  111. package/lib/oak-app-domain/Path/Schema.d.ts +6 -0
  112. package/lib/oak-app-domain/Path/Storage.js +6 -0
  113. package/lib/oak-app-domain/Path/locales/zh_CN.json +1 -1
  114. package/lib/oak-app-domain/Storage.js +18 -16
  115. package/lib/oak-app-domain/SysAccountMove/Schema.d.ts +185 -0
  116. package/lib/oak-app-domain/SysAccountMove/Schema.js +2 -0
  117. package/lib/oak-app-domain/SysAccountMove/Storage.d.ts +3 -0
  118. package/lib/oak-app-domain/SysAccountMove/Storage.js +34 -0
  119. package/lib/oak-app-domain/SysAccountMove/locales/zh_CN.json +1 -0
  120. package/lib/oak-app-domain/SysAccountOper/Schema.d.ts +34 -5
  121. package/lib/oak-app-domain/SysAccountOper/Storage.js +4 -0
  122. package/lib/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -1
  123. package/lib/oak-app-domain/System/Schema.d.ts +12 -0
  124. package/lib/oak-app-domain/User/Schema.d.ts +12 -0
  125. package/lib/oak-app-domain/WpAccount/Action.d.ts +1 -1
  126. package/lib/oak-app-domain/WpAccount/Action.js +1 -1
  127. package/lib/oak-app-domain/WpAccount/Style.js +4 -1
  128. package/lib/oak-app-domain/WpAccount/locales/zh_CN.json +1 -1
  129. package/lib/oak-app-domain/_SubQuery.d.ts +12 -0
  130. package/lib/triggers/pay.js +149 -46
  131. package/lib/triggers/refund.js +3 -0
  132. package/lib/types/RuntimeCxt.d.ts +1 -1
  133. package/lib/types/sysAccountOper.d.ts +1 -0
  134. package/lib/types/sysAccountOper.js +2 -0
  135. package/lib/utils/payClazz/Account.js +3 -2
  136. package/package.json +4 -4
  137. package/src/entities/AccountOper.ts +4 -2
  138. package/src/entities/OfflineAccount.ts +12 -5
  139. package/src/entities/SysAccountMove.ts +39 -0
  140. package/src/entities/SysAccountOper.ts +7 -1
  141. package/src/entities/WpAccount.ts +11 -4
@@ -23,9 +23,10 @@ exports.entityDesc = {
23
23
  deposit: '充值',
24
24
  withdraw: '提现',
25
25
  consume: '消费',
26
+ consumeBack: '消费退还',
26
27
  loan: '抵押',
27
28
  repay: '偿还',
28
- withdrawBack: '提现未遂',
29
+ withdrawBack: '提现退还',
29
30
  earn: '赚取',
30
31
  encash: '兑现',
31
32
  tax: '渠道费',
@@ -44,6 +45,7 @@ exports.entityDesc = {
44
45
  withdraw: '#F7DC6F',
45
46
  withdrawBack: '#F7DC6F',
46
47
  consume: '#A569BD',
48
+ consumeBack: '#009933',
47
49
  loan: '#CD6155',
48
50
  repay: '#82E0AA',
49
51
  earn: '#FF3333',
@@ -19,7 +19,7 @@ export interface Schema extends AbstractAccount {
19
19
  channels: WithdrawChannel[];
20
20
  enabled: Boolean;
21
21
  }
22
- export type Action = 'pay' | 'refund' | 'deposit' | 'withdraw' | 'tax';
22
+ export type Action = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut' | 'deposit' | 'tax';
23
23
  export declare const entityDesc: EntityDesc<Schema, Action, '', {
24
24
  type: Schema['type'];
25
25
  }>;
@@ -37,8 +37,11 @@ exports.entityDesc = {
37
37
  action: {
38
38
  pay: '支付',
39
39
  refund: '退款',
40
+ withdrawTransfer: '提现转账',
41
+ compensate: '补偿',
42
+ moveIn: '转入',
43
+ moveOut: '转出',
40
44
  deposit: '充值',
41
- withdraw: '提现',
42
45
  tax: '渠道费',
43
46
  }
44
47
  },
@@ -56,8 +59,11 @@ exports.entityDesc = {
56
59
  icon: {
57
60
  pay: '',
58
61
  refund: '',
62
+ withdrawTransfer: '',
63
+ compensate: '',
64
+ moveIn: '',
65
+ moveOut: '',
59
66
  deposit: '',
60
- withdraw: '',
61
67
  tax: '',
62
68
  }
63
69
  },
@@ -0,0 +1,13 @@
1
+ import { String, Text, Price } from 'oak-domain/lib/types/DataType';
2
+ import { EntityShape } from 'oak-domain/lib/types/Entity';
3
+ import { EntityDesc } from 'oak-domain/lib/types';
4
+ import { Schema as User } from './User';
5
+ import { Schema as System } from './System';
6
+ export interface Schema extends EntityShape {
7
+ price: Price;
8
+ externalId: String<64>;
9
+ operator: User;
10
+ remark?: Text;
11
+ system: System;
12
+ }
13
+ export declare const entityDesc: EntityDesc<Schema>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.entityDesc = void 0;
4
+ ;
5
+ exports.entityDesc = {
6
+ locales: {
7
+ zh_CN: {
8
+ name: '系统资金移动',
9
+ attr: {
10
+ price: '金额',
11
+ externalId: '外部流水号',
12
+ operator: '操作者',
13
+ remark: '备注',
14
+ system: '所属系统'
15
+ },
16
+ },
17
+ },
18
+ configuration: {
19
+ actionType: 'appendOnly',
20
+ }
21
+ };
@@ -4,14 +4,17 @@ import { EntityDesc } from 'oak-domain/lib/types';
4
4
  import { Schema as Pay } from './Pay';
5
5
  import { Schema as Refund } from './Refund';
6
6
  import { Schema as WithdrawTransfer } from './WithdrawTransfer';
7
+ import { Schema as SysAccountMove } from './SysAccountMove';
8
+ export type SysAccountOperType = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut';
7
9
  export interface Schema extends EntityShape {
8
10
  delta: Price;
9
- type: 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut';
11
+ type: SysAccountOperType;
10
12
  entity: String<32>;
11
13
  entityId: String<64>;
12
14
  pay?: Pay;
13
15
  refund?: Refund;
14
16
  withdrawTransfer?: WithdrawTransfer;
17
+ sysAccountMove?: SysAccountMove;
15
18
  }
16
19
  export declare const entityDesc: EntityDesc<Schema, '', '', {
17
20
  type: Schema['type'];
@@ -14,6 +14,7 @@ exports.entityDesc = {
14
14
  pay: '关联支付',
15
15
  refund: '关联退款',
16
16
  withdrawTransfer: '关联转账提现',
17
+ sysAccountMove: '系统资金移动',
17
18
  },
18
19
  v: {
19
20
  type: {
@@ -17,5 +17,5 @@ export interface Schema extends AbstractAccount {
17
17
  channels: WithdrawChannel[];
18
18
  enabled: Boolean;
19
19
  }
20
- export type Action = 'pay' | 'refund' | 'deposit' | 'withdraw' | 'tax';
20
+ export type Action = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut' | 'deposit' | 'tax';
21
21
  export declare const entityDesc: EntityDesc<Schema, Action>;
@@ -26,8 +26,11 @@ exports.entityDesc = {
26
26
  action: {
27
27
  pay: '支付',
28
28
  refund: '退款',
29
+ withdrawTransfer: '提现转账',
30
+ compensate: '补偿',
31
+ moveIn: '转入',
32
+ moveOut: '转出',
29
33
  deposit: '充值',
30
- withdraw: '提现',
31
34
  tax: '渠道费',
32
35
  }
33
36
  },
@@ -36,8 +39,11 @@ exports.entityDesc = {
36
39
  icon: {
37
40
  pay: '',
38
41
  refund: '',
42
+ withdrawTransfer: '',
43
+ compensate: '',
44
+ moveIn: '',
45
+ moveOut: '',
39
46
  deposit: '',
40
- withdraw: '',
41
47
  tax: '',
42
48
  }
43
49
  }
@@ -16,5 +16,10 @@
16
16
  "order": {
17
17
  "payAmountNotEnough": "支付的额度总和不足",
18
18
  "nonePay": "没有传入支付信息"
19
+ },
20
+ "refund": {
21
+ "create": {
22
+ "hasAnotherRefunding": "您有一笔退款正在进行中"
23
+ }
19
24
  }
20
25
  }
@@ -22,6 +22,7 @@
22
22
  "error": {
23
23
  "nameQrCodeBothNull": "账号名和二维码不能同时为空",
24
24
  "refundGapDaysNotNegative": "允许退款天数不能为负数或空",
25
- "refundCompensateIllegal": "退款补偿百分比必须在0到100之间"
25
+ "refundCompensateIllegal": "退款补偿百分比必须在0到100之间",
26
+ "withdrawTransferLossRatioNotNegative": "提现转账费率必须在0到100之间"
26
27
  }
27
28
  }
@@ -11,7 +11,7 @@ import * as Pay from "../Pay/Schema";
11
11
  import * as Refund from "../Refund/Schema";
12
12
  import * as Withdraw from "../Withdraw/Schema";
13
13
  import * as WithdrawTransfer from "../WithdrawTransfer/Schema";
14
- type Type = "deposit" | "withdraw" | "consume" | "loan" | "repay" | "withdrawBack" | "earn" | "encash" | "cutoffRefundable" | "tax" | "taxRefund" | "refund" | "refundFailure";
14
+ type Type = "deposit" | "withdraw" | "consume" | "consumeBack" | "loan" | "repay" | "withdrawBack" | "earn" | "encash" | "cutoffRefundable" | "tax" | "taxRefund" | "refund" | "refundFailure";
15
15
  export type OpSchema = EntityShape & {
16
16
  accountId: ForeignKey<"account">;
17
17
  type: Type;
@@ -12,7 +12,7 @@ exports.desc = {
12
12
  type: {
13
13
  notNull: true,
14
14
  type: "enum",
15
- enumeration: ["deposit", "withdraw", "consume", "loan", "repay", "withdrawBack", "earn", "encash", "cutoffRefundable", "tax", "taxRefund", "refund", "refundFailure"]
15
+ enumeration: ["deposit", "withdraw", "consume", "consumeBack", "loan", "repay", "withdrawBack", "earn", "encash", "cutoffRefundable", "tax", "taxRefund", "refund", "refundFailure"]
16
16
  },
17
17
  totalPlus: {
18
18
  notNull: true,
@@ -8,6 +8,7 @@ exports.style = {
8
8
  withdraw: '#F7DC6F',
9
9
  withdrawBack: '#F7DC6F',
10
10
  consume: '#A569BD',
11
+ consumeBack: '#009933',
11
12
  loan: '#CD6155',
12
13
  repay: '#82E0AA',
13
14
  earn: '#FF3333',
@@ -1 +1 @@
1
- { "name": "帐号操作", "attr": { "account": "帐号", "type": "类型", "totalPlus": "余额变化", "availPlus": "可用余额变化", "refundablePlus": "可退款余额变化", "total": "操作后余额", "avail": "操作后可用余额", "refundable": "操作后可退款余额", "entity": "关联对象", "entityId": "关联对象Id" }, "v": { "type": { "deposit": "充值", "withdraw": "提现", "consume": "消费", "loan": "抵押", "repay": "偿还", "withdrawBack": "提现未遂", "earn": "赚取", "encash": "兑现", "tax": "渠道费", "taxRefund": "渠道费用退还", "cutoffRefundable": "削减可自由退额度", "refund": "退款", "refundFailure": "退款失败" } } }
1
+ { "name": "帐号操作", "attr": { "account": "帐号", "type": "类型", "totalPlus": "余额变化", "availPlus": "可用余额变化", "refundablePlus": "可退款余额变化", "total": "操作后余额", "avail": "操作后可用余额", "refundable": "操作后可退款余额", "entity": "关联对象", "entityId": "关联对象Id" }, "v": { "type": { "deposit": "充值", "withdraw": "提现", "consume": "消费", "consumeBack": "消费退还", "loan": "抵押", "repay": "偿还", "withdrawBack": "提现退还", "earn": "赚取", "encash": "兑现", "tax": "渠道费", "taxRefund": "渠道费用退还", "cutoffRefundable": "削减可自由退额度", "refund": "退款", "refundFailure": "退款失败" } } }
@@ -60,6 +60,7 @@ import { EntityDef as OfflineAccount } from "./OfflineAccount/Schema";
60
60
  import { EntityDef as Order } from "./Order/Schema";
61
61
  import { EntityDef as Pay } from "./Pay/Schema";
62
62
  import { EntityDef as Refund } from "./Refund/Schema";
63
+ import { EntityDef as SysAccountMove } from "./SysAccountMove/Schema";
63
64
  import { EntityDef as SysAccountOper } from "./SysAccountOper/Schema";
64
65
  import { EntityDef as WechatPay } from "./WechatPay/Schema";
65
66
  import { EntityDef as Withdraw } from "./Withdraw/Schema";
@@ -131,6 +132,7 @@ export type EntityDict = {
131
132
  order: Order;
132
133
  pay: Pay;
133
134
  refund: Refund;
135
+ sysAccountMove: SysAccountMove;
134
136
  sysAccountOper: SysAccountOper;
135
137
  wechatPay: WechatPay;
136
138
  withdraw: Withdraw;
@@ -1,5 +1,5 @@
1
1
  import { GenericAction } from "oak-domain/lib/actions/action";
2
- export type ParticularAction = 'pay' | 'refund' | 'deposit' | 'withdraw' | 'tax';
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", "deposit", "withdraw", "tax"];
4
+ exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "pay", "refund", "withdrawTransfer", "compensate", "moveIn", "moveOut", "deposit", "tax"];
5
5
  exports.actionDefDict = {};
@@ -14,8 +14,11 @@ exports.style = {
14
14
  icon: {
15
15
  pay: '',
16
16
  refund: '',
17
+ withdrawTransfer: '',
18
+ compensate: '',
19
+ moveIn: '',
20
+ moveOut: '',
17
21
  deposit: '',
18
- withdraw: '',
19
22
  tax: '',
20
23
  }
21
24
  };
@@ -1 +1 @@
1
- { "name": "线下账户", "attr": { "type": "类型", "channel": "通道", "name": "用户/帐号", "qrCode": "收款二维码", "taxLossRatio": "商户号手续费(百分比)", "refundCompensateRatio": "退款补偿百分比", "refundGapDays": "(支付后)允许退款的天数", "allowWithdrawTransfer": "允许提现转账", "withdrawTransferLossRatio": "提现转账费率(百分数)", "allowDeposit": "允许主动充值", "allowPay": "允许主动支付", "system": "所属系统", "price": "余额", "pays": "支付", "opers": "操作记录", "channels": "提现通道", "enabled": "是否启用" }, "v": { "type": { "bank": "银行", "alipay": "支付宝", "wechat": "微信", "shouqianba": "收钱吧", "others": "其它" } }, "action": { "pay": "支付", "refund": "退款", "deposit": "充值", "withdraw": "提现", "tax": "渠道费" } }
1
+ { "name": "线下账户", "attr": { "type": "类型", "channel": "通道", "name": "用户/帐号", "qrCode": "收款二维码", "taxLossRatio": "商户号手续费(百分比)", "refundCompensateRatio": "退款补偿百分比", "refundGapDays": "(支付后)允许退款的天数", "allowWithdrawTransfer": "允许提现转账", "withdrawTransferLossRatio": "提现转账费率(百分数)", "allowDeposit": "允许主动充值", "allowPay": "允许主动支付", "system": "所属系统", "price": "余额", "pays": "支付", "opers": "操作记录", "channels": "提现通道", "enabled": "是否启用" }, "v": { "type": { "bank": "银行", "alipay": "支付宝", "wechat": "微信", "shouqianba": "收钱吧", "others": "其它" } }, "action": { "pay": "支付", "refund": "退款", "withdrawTransfer": "提现转账", "compensate": "补偿", "moveIn": "转入", "moveOut": "转出", "deposit": "充值", "tax": "渠道费" } }
@@ -10,6 +10,7 @@ export type OpSchema = EntityShape & {
10
10
  value: String<256>;
11
11
  recursive: Boolean;
12
12
  sourceEntity: String<32>;
13
+ desc?: String<256> | null;
13
14
  };
14
15
  export type OpAttr = keyof OpSchema;
15
16
  export type Schema = EntityShape & {
@@ -17,6 +18,7 @@ export type Schema = EntityShape & {
17
18
  value: String<256>;
18
19
  recursive: Boolean;
19
20
  sourceEntity: String<32>;
21
+ desc?: String<256> | null;
20
22
  actionAuth$path?: Array<ActionAuth.Schema>;
21
23
  actionAuth$path$$aggr?: AggregationResult<ActionAuth.Schema>;
22
24
  relationAuth$path?: Array<RelationAuth.Schema>;
@@ -33,6 +35,7 @@ type AttrFilter = {
33
35
  value: Q_StringValue;
34
36
  recursive: Q_BooleanValue;
35
37
  sourceEntity: Q_StringValue;
38
+ desc: Q_StringValue;
36
39
  actionAuth$path: ActionAuth.Filter & SubQueryPredicateMetadata;
37
40
  relationAuth$path: RelationAuth.Filter & SubQueryPredicateMetadata;
38
41
  };
@@ -48,6 +51,7 @@ export type Projection = {
48
51
  value?: number;
49
52
  recursive?: number;
50
53
  sourceEntity?: number;
54
+ desc?: number;
51
55
  actionAuth$path?: ActionAuth.Selection & {
52
56
  $entity: "actionAuth";
53
57
  };
@@ -80,6 +84,8 @@ export type SortAttr = {
80
84
  recursive: number;
81
85
  } | {
82
86
  sourceEntity: number;
87
+ } | {
88
+ desc: number;
83
89
  } | {
84
90
  [k: string]: any;
85
91
  } | OneOf<ExprOp<OpAttr | string>>;
@@ -28,6 +28,12 @@ exports.desc = {
28
28
  params: {
29
29
  length: 32
30
30
  }
31
+ },
32
+ desc: {
33
+ type: "varchar",
34
+ params: {
35
+ length: 256
36
+ }
31
37
  }
32
38
  },
33
39
  static: true,
@@ -1 +1 @@
1
- { "name": "关系路径", "attr": { "sourceEntity": "源对象", "value": "路径(从dest到source)", "destEntity": "目标对象", "recursive": "是否递归(目标对象)" } }
1
+ { "name": "关系路径", "attr": { "sourceEntity": "源对象", "value": "路径", "destEntity": "目标对象", "recursive": "是否递归", "desc": "描述" } }
@@ -63,14 +63,15 @@ const Storage_59 = require("./OfflineAccount/Storage");
63
63
  const Storage_60 = require("./Order/Storage");
64
64
  const Storage_61 = require("./Pay/Storage");
65
65
  const Storage_62 = require("./Refund/Storage");
66
- const Storage_63 = require("./SysAccountOper/Storage");
67
- const Storage_64 = require("./WechatPay/Storage");
68
- const Storage_65 = require("./Withdraw/Storage");
69
- const Storage_66 = require("./WithdrawAccount/Storage");
70
- const Storage_67 = require("./WithdrawChannel/Storage");
71
- const Storage_68 = require("./WithdrawTransfer/Storage");
72
- const Storage_69 = require("./WpAccount/Storage");
73
- const Storage_70 = require("./WpProduct/Storage");
66
+ const Storage_63 = require("./SysAccountMove/Storage");
67
+ const Storage_64 = require("./SysAccountOper/Storage");
68
+ const Storage_65 = require("./WechatPay/Storage");
69
+ const Storage_66 = require("./Withdraw/Storage");
70
+ const Storage_67 = require("./WithdrawAccount/Storage");
71
+ const Storage_68 = require("./WithdrawChannel/Storage");
72
+ const Storage_69 = require("./WithdrawTransfer/Storage");
73
+ const Storage_70 = require("./WpAccount/Storage");
74
+ const Storage_71 = require("./WpProduct/Storage");
74
75
  exports.storageSchema = {
75
76
  actionAuth: Storage_1.desc,
76
77
  i18n: Storage_2.desc,
@@ -134,12 +135,13 @@ exports.storageSchema = {
134
135
  order: Storage_60.desc,
135
136
  pay: Storage_61.desc,
136
137
  refund: Storage_62.desc,
137
- sysAccountOper: Storage_63.desc,
138
- wechatPay: Storage_64.desc,
139
- withdraw: Storage_65.desc,
140
- withdrawAccount: Storage_66.desc,
141
- withdrawChannel: Storage_67.desc,
142
- withdrawTransfer: Storage_68.desc,
143
- wpAccount: Storage_69.desc,
144
- wpProduct: Storage_70.desc
138
+ sysAccountMove: Storage_63.desc,
139
+ sysAccountOper: Storage_64.desc,
140
+ wechatPay: Storage_65.desc,
141
+ withdraw: Storage_66.desc,
142
+ withdrawAccount: Storage_67.desc,
143
+ withdrawChannel: Storage_68.desc,
144
+ withdrawTransfer: Storage_69.desc,
145
+ wpAccount: Storage_70.desc,
146
+ wpProduct: Storage_71.desc
145
147
  };
@@ -0,0 +1,185 @@
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";
3
+ import { OneOf } from "oak-domain/lib/types/Polyfill";
4
+ import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity";
5
+ import { AppendOnlyAction } from "oak-domain/lib/actions/action";
6
+ import { Price, String, Text } from "oak-domain/lib/types/DataType";
7
+ import * as User from "../User/Schema";
8
+ import * as System from "../System/Schema";
9
+ import * as SysAccountOper from "../SysAccountOper/Schema";
10
+ export type OpSchema = EntityShape & {
11
+ price: Price;
12
+ externalId: String<64>;
13
+ operatorId: ForeignKey<"user">;
14
+ remark?: Text | null;
15
+ systemId: ForeignKey<"system">;
16
+ };
17
+ export type OpAttr = keyof OpSchema;
18
+ export type Schema = EntityShape & {
19
+ price: Price;
20
+ externalId: String<64>;
21
+ operatorId: ForeignKey<"user">;
22
+ remark?: Text | null;
23
+ systemId: ForeignKey<"system">;
24
+ operator: User.Schema;
25
+ system: System.Schema;
26
+ sysAccountOper$sysAccountMove?: Array<SysAccountOper.Schema>;
27
+ sysAccountOper$sysAccountMove$$aggr?: AggregationResult<SysAccountOper.Schema>;
28
+ } & {
29
+ [A in ExpressionKey]?: any;
30
+ };
31
+ type AttrFilter = {
32
+ id: Q_StringValue;
33
+ $$createAt$$: Q_DateValue;
34
+ $$seq$$: Q_NumberValue;
35
+ $$updateAt$$: Q_DateValue;
36
+ price: Q_NumberValue;
37
+ externalId: Q_StringValue;
38
+ operatorId: Q_StringValue;
39
+ operator: User.Filter;
40
+ remark: Q_StringValue;
41
+ systemId: Q_StringValue;
42
+ system: System.Filter;
43
+ sysAccountOper$sysAccountMove: SysAccountOper.Filter & SubQueryPredicateMetadata;
44
+ };
45
+ export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
46
+ export type Projection = {
47
+ "#id"?: NodeId;
48
+ [k: string]: any;
49
+ id?: number;
50
+ $$createAt$$?: number;
51
+ $$updateAt$$?: number;
52
+ $$seq$$?: number;
53
+ price?: number;
54
+ externalId?: number;
55
+ operatorId?: number;
56
+ operator?: User.Projection;
57
+ remark?: number;
58
+ systemId?: number;
59
+ system?: System.Projection;
60
+ sysAccountOper$sysAccountMove?: SysAccountOper.Selection & {
61
+ $entity: "sysAccountOper";
62
+ };
63
+ sysAccountOper$sysAccountMove$$aggr?: SysAccountOper.Aggregation & {
64
+ $entity: "sysAccountOper";
65
+ };
66
+ } & Partial<ExprOp<OpAttr | string>>;
67
+ type SysAccountMoveIdProjection = OneOf<{
68
+ id: number;
69
+ }>;
70
+ type UserIdProjection = OneOf<{
71
+ operatorId: number;
72
+ }>;
73
+ type SystemIdProjection = OneOf<{
74
+ systemId: number;
75
+ }>;
76
+ export type SortAttr = {
77
+ id: number;
78
+ } | {
79
+ $$createAt$$: number;
80
+ } | {
81
+ $$seq$$: number;
82
+ } | {
83
+ $$updateAt$$: number;
84
+ } | {
85
+ price: number;
86
+ } | {
87
+ externalId: number;
88
+ } | {
89
+ operatorId: number;
90
+ } | {
91
+ operator: User.SortAttr;
92
+ } | {
93
+ remark: number;
94
+ } | {
95
+ systemId: number;
96
+ } | {
97
+ system: System.SortAttr;
98
+ } | {
99
+ [k: string]: any;
100
+ } | OneOf<ExprOp<OpAttr | string>>;
101
+ export type SortNode = {
102
+ $attr: SortAttr;
103
+ $direction?: "asc" | "desc";
104
+ };
105
+ export type Sorter = SortNode[];
106
+ export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
107
+ export type Selection<P extends Object = Projection> = SelectOperation<P>;
108
+ export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
109
+ export type CreateOperationData = FormCreateData<Omit<OpSchema, "operatorId" | "systemId">> & (({
110
+ operatorId?: never;
111
+ operator: User.CreateSingleOperation;
112
+ } | {
113
+ operatorId: ForeignKey<"operator">;
114
+ operator?: User.UpdateOperation;
115
+ } | {
116
+ operator?: never;
117
+ operatorId: ForeignKey<"operator">;
118
+ }) & ({
119
+ systemId?: never;
120
+ system: System.CreateSingleOperation;
121
+ } | {
122
+ systemId: ForeignKey<"system">;
123
+ system?: System.UpdateOperation;
124
+ } | {
125
+ system?: never;
126
+ systemId: ForeignKey<"system">;
127
+ })) & {
128
+ sysAccountOper$sysAccountMove?: OakOperation<"create", Omit<SysAccountOper.CreateOperationData, "sysAccountMove" | "sysAccountMoveId">[]> | Array<OakOperation<"create", Omit<SysAccountOper.CreateOperationData, "sysAccountMove" | "sysAccountMoveId">>>;
129
+ };
130
+ export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
131
+ export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
132
+ export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
133
+ export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "operatorId" | "systemId">> & (({
134
+ operator?: User.CreateSingleOperation;
135
+ operatorId?: never;
136
+ } | {
137
+ operator?: User.UpdateOperation;
138
+ operatorId?: never;
139
+ } | {
140
+ operator?: User.RemoveOperation;
141
+ operatorId?: never;
142
+ } | {
143
+ operator?: never;
144
+ operatorId?: ForeignKey<"operator">;
145
+ }) & ({
146
+ system?: System.CreateSingleOperation;
147
+ systemId?: never;
148
+ } | {
149
+ system?: System.UpdateOperation;
150
+ systemId?: never;
151
+ } | {
152
+ system?: System.RemoveOperation;
153
+ systemId?: never;
154
+ } | {
155
+ system?: never;
156
+ systemId?: ForeignKey<"system">;
157
+ })) & {
158
+ [k: string]: any;
159
+ sysAccountOper$sysAccountMove?: OakOperation<"create", Omit<SysAccountOper.CreateOperationData, "sysAccountMove" | "sysAccountMoveId">[]> | Array<OakOperation<"create", Omit<SysAccountOper.CreateOperationData, "sysAccountMove" | "sysAccountMoveId">>>;
160
+ };
161
+ export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
162
+ export type RemoveOperationData = {} & (({
163
+ operator?: User.UpdateOperation | User.RemoveOperation;
164
+ }) & ({
165
+ system?: System.UpdateOperation | System.RemoveOperation;
166
+ }));
167
+ export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
168
+ export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
169
+ export type UserIdSubQuery = Selection<UserIdProjection>;
170
+ export type SystemIdSubQuery = Selection<SystemIdProjection>;
171
+ export type SysAccountMoveIdSubQuery = Selection<SysAccountMoveIdProjection>;
172
+ export type EntityDef = {
173
+ Schema: Schema;
174
+ OpSchema: OpSchema;
175
+ Action: OakMakeAction<AppendOnlyAction> | string;
176
+ Selection: Selection;
177
+ Aggregation: Aggregation;
178
+ Operation: Operation;
179
+ Create: CreateOperation;
180
+ Update: UpdateOperation;
181
+ Remove: RemoveOperation;
182
+ CreateSingle: CreateSingleOperation;
183
+ CreateMulti: CreateMultipleOperation;
184
+ };
185
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { StorageDesc } from "oak-domain/lib/types/Storage";
2
+ import { OpSchema } from "./Schema";
3
+ export declare const desc: StorageDesc<OpSchema>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.desc = void 0;
4
+ const action_1 = require("oak-domain/lib/actions/action");
5
+ exports.desc = {
6
+ attributes: {
7
+ price: {
8
+ notNull: true,
9
+ type: "money"
10
+ },
11
+ externalId: {
12
+ notNull: true,
13
+ type: "varchar",
14
+ params: {
15
+ length: 64
16
+ }
17
+ },
18
+ operatorId: {
19
+ notNull: true,
20
+ type: "ref",
21
+ ref: "user"
22
+ },
23
+ remark: {
24
+ type: "text"
25
+ },
26
+ systemId: {
27
+ notNull: true,
28
+ type: "ref",
29
+ ref: "system"
30
+ }
31
+ },
32
+ actionType: "appendOnly",
33
+ actions: action_1.appendOnlyActions
34
+ };
@@ -0,0 +1 @@
1
+ { "name": "系统资金移动", "attr": { "price": "金额", "externalId": "外部流水号", "operator": "操作者", "remark": "备注", "system": "所属系统" } }