oak-pay-business 2.2.8 → 2.2.10
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 +4 -9
- package/es/components/AbstractComponents.js +0 -4
- package/es/components/account/detail/index.js +2 -2
- package/es/components/account/detail/index.json +0 -1
- package/es/components/account/detail/index.less +2 -2
- package/es/components/account/detail/web.pc.module.less +68 -68
- package/es/components/deposit/new/index.js +33 -0
- package/es/components/deposit/new/index.xml +9 -19
- package/es/components/order/pay/info.js +6 -6
- package/es/components/order/pay/info.module.less +24 -24
- package/es/components/order/pay/web.mobile.module.less +35 -35
- package/es/components/order/pay/web.pc.module.less +35 -35
- package/es/components/pay/detail/index.d.ts +3 -0
- package/es/components/pay/detail/index.js +48 -33
- package/es/components/pay/detail/index.less +1 -0
- package/es/components/pay/detail/index.xml +56 -51
- package/es/components/pay/detail/locales/zh-CN.json +3 -1
- package/es/components/pay/detail/web.js +13 -13
- package/es/components/payConfig/upsert/offline/web.pc.module.less +4 -4
- package/es/components/payConfig/upsert/web.pc.module.less +10 -10
- package/es/components/refund/list/web.pc.js +1 -1
- package/es/configuration/attrUpdateMatrix.js +4 -1
- package/es/context/BackendRuntimeContext.d.ts +1 -1
- package/es/data/i18n.js +3 -1
- package/es/entities/Refund.d.ts +1 -0
- package/es/entities/Refund.js +1 -0
- package/es/oak-app-domain/ExtraFile/Schema.d.ts +3 -3
- package/es/oak-app-domain/ExtraFile/Storage.js +3 -3
- package/es/oak-app-domain/ExtraFile/Style.js +7 -5
- package/es/oak-app-domain/ExtraFile/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Refund/Schema.d.ts +4 -0
- package/es/oak-app-domain/Refund/Storage.js +3 -0
- package/es/oak-app-domain/Refund/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/System/Storage.js +2 -1
- package/es/triggers/refund.js +3 -1
- package/es/triggers/withdraw.d.ts +1 -1
- package/es/types/Exception.d.ts +3 -0
- package/es/types/Exception.js +5 -0
- package/es/utils/application.d.ts +1 -1
- package/es/utils/payClazz/WechatPay/WechatPay.js +12 -4
- package/es/watchers/pay.js +18 -1
- package/es/watchers/refund.js +1 -1
- package/lib/aspects/withdraw.d.ts +4 -4
- package/lib/components/pay/detail/index.d.ts +3 -0
- package/lib/components/pay/detail/index.js +48 -33
- package/lib/configuration/attrUpdateMatrix.js +4 -1
- package/lib/context/BackendRuntimeContext.d.ts +1 -1
- package/lib/data/i18n.js +3 -1
- package/lib/entities/Refund.d.ts +1 -0
- package/lib/entities/Refund.js +1 -0
- package/lib/oak-app-domain/ExtraFile/Schema.d.ts +3 -3
- package/lib/oak-app-domain/ExtraFile/Storage.js +3 -3
- package/lib/oak-app-domain/ExtraFile/Style.js +7 -5
- package/lib/oak-app-domain/ExtraFile/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Refund/Schema.d.ts +4 -0
- package/lib/oak-app-domain/Refund/Storage.js +3 -0
- package/lib/oak-app-domain/Refund/locales/zh_CN.json +1 -1
- package/lib/triggers/refund.js +3 -1
- package/lib/types/Exception.d.ts +3 -0
- package/lib/types/Exception.js +7 -1
- package/lib/utils/application.d.ts +1 -1
- package/lib/utils/payClazz/WechatPay/WechatPay.js +12 -4
- package/lib/watchers/pay.js +18 -1
- package/lib/watchers/refund.js +1 -1
- package/package.json +3 -3
- package/src/entities/Refund.ts +2 -0
|
@@ -5,6 +5,7 @@ import { isWeiXin } from 'oak-frontend-base/es/utils/utils';
|
|
|
5
5
|
import { merge } from "oak-domain/lib/utils/lodash";
|
|
6
6
|
import { canStartPay } from "../../../utils/wpProductFrontend";
|
|
7
7
|
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
|
8
|
+
import { StartPayFailure } from "../../../types/Exception";
|
|
8
9
|
const PayRoutineDict = {
|
|
9
10
|
wpProduct: {
|
|
10
11
|
projection: {
|
|
@@ -20,21 +21,22 @@ const PayRoutineDict = {
|
|
|
20
21
|
if (process.env.OAK_PLATFORM === 'wechatMp') {
|
|
21
22
|
const { prepayMeta } = meta;
|
|
22
23
|
if (prepayMeta) {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
try {
|
|
25
|
+
const result = await wx.requestPayment(prepayMeta);
|
|
26
|
+
process.env.NODE_ENV === 'development' && console.log(result);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
throw new StartPayFailure(err.errMsg.includes('cancel')
|
|
30
|
+
? features.locales.t('startPayError.userCancel')
|
|
31
|
+
: features.locales.t('startPayError.unknown'));
|
|
32
|
+
}
|
|
25
33
|
}
|
|
26
34
|
else {
|
|
27
|
-
features.
|
|
28
|
-
type: 'error',
|
|
29
|
-
content: features.locales.t('startPayError.illegaPayData'),
|
|
30
|
-
});
|
|
35
|
+
throw new StartPayFailure(features.locales.t('startPayError.illegalPrepayData'));
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
38
|
else {
|
|
34
|
-
features.
|
|
35
|
-
type: 'error',
|
|
36
|
-
content: features.locales.t('startPayError.falseEnv', { env: 'wechatMp' }),
|
|
37
|
-
});
|
|
39
|
+
throw new StartPayFailure(features.locales.t('startPayError.falseEnv', { env: 'wechatMp' }));
|
|
38
40
|
}
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
@@ -50,10 +52,7 @@ const PayRoutineDict = {
|
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
else {
|
|
53
|
-
features.
|
|
54
|
-
type: 'error',
|
|
55
|
-
content: features.locales.t('startPayError.illegaPayData'),
|
|
56
|
-
});
|
|
55
|
+
throw new StartPayFailure(features.locales.t('startPayError.illegalPrepayData'));
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
}
|
|
@@ -111,7 +110,10 @@ export default OakComponent({
|
|
|
111
110
|
},
|
|
112
111
|
properties: {
|
|
113
112
|
onClose: () => undefined,
|
|
113
|
+
onPaid: () => undefined,
|
|
114
|
+
onPayFailure: () => undefined,
|
|
114
115
|
disableAutoPay: false,
|
|
116
|
+
closeWhenFailure: false,
|
|
115
117
|
},
|
|
116
118
|
data: {
|
|
117
119
|
showCloseConfirmMp: false,
|
|
@@ -202,32 +204,45 @@ export default OakComponent({
|
|
|
202
204
|
async confirmCloseMp() {
|
|
203
205
|
await this.execute('close');
|
|
204
206
|
this.cancelCloseMp();
|
|
207
|
+
const { onClose } = this.props;
|
|
208
|
+
onClose && onClose();
|
|
205
209
|
},
|
|
206
210
|
goBack() {
|
|
207
211
|
this.navigateBack();
|
|
208
212
|
},
|
|
209
213
|
async startPay() {
|
|
214
|
+
const { onPaid, onClose, onPayFailure } = this.props;
|
|
210
215
|
const { pay } = this.state;
|
|
211
|
-
|
|
216
|
+
try {
|
|
217
|
+
await PayRoutineDict[pay.entity].routine(pay, this.features);
|
|
218
|
+
onPaid && onPaid();
|
|
219
|
+
}
|
|
220
|
+
catch (err) {
|
|
221
|
+
if (this.props.closeWhenFailure) {
|
|
222
|
+
await this.execute(undefined, undefined, undefined, [
|
|
223
|
+
{
|
|
224
|
+
entity: 'pay',
|
|
225
|
+
operation: {
|
|
226
|
+
id: await generateNewIdAsync(),
|
|
227
|
+
action: 'close',
|
|
228
|
+
data: {},
|
|
229
|
+
filter: {
|
|
230
|
+
id: this.props.oakId,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
}
|
|
234
|
+
]);
|
|
235
|
+
onClose && onClose();
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
onPayFailure && onPayFailure();
|
|
239
|
+
}
|
|
240
|
+
this.features.message.setMessage({
|
|
241
|
+
type: 'warning',
|
|
242
|
+
content: err.message,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
212
245
|
},
|
|
213
|
-
/* async onWxBridgeReady(payMetaData: any): Promise<void> {
|
|
214
|
-
return new Promise(
|
|
215
|
-
(resolve, reject) => {
|
|
216
|
-
WeixinJSBridge.invoke('getBrandWCPayRequest', payMetaData,
|
|
217
|
-
function (res: { err_msg: string }) {
|
|
218
|
-
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
|
219
|
-
// 使用以上方式判断前端返回,微信团队郑重提示:
|
|
220
|
-
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
|
221
|
-
resolve(undefined as void);
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
reject(res.err_msg);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
);
|
|
230
|
-
} */
|
|
231
246
|
openChannelSelectMp() {
|
|
232
247
|
this.setState({
|
|
233
248
|
showChannelSelectMp: true,
|
|
@@ -106,57 +106,62 @@
|
|
|
106
106
|
</block>
|
|
107
107
|
</view>
|
|
108
108
|
<view class="padding"></view>
|
|
109
|
-
<
|
|
110
|
-
<
|
|
111
|
-
size="long"
|
|
112
|
-
bind:lintap="startPay"
|
|
113
|
-
bg-color="#04BE02"
|
|
114
|
-
>
|
|
115
|
-
{{t('pay')}}
|
|
116
|
-
</l-button>
|
|
117
|
-
</block>
|
|
118
|
-
<block wx:elif="{{oakExecutable === true}}">
|
|
119
|
-
<view class="btn">
|
|
109
|
+
<view style="display:flex; align-items: center;justify-content: space-between;gap:16rpx;">
|
|
110
|
+
<block wx:if="{{closable && !oakExecutable}}">
|
|
120
111
|
<l-button
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
type="error"
|
|
113
|
+
size="long"
|
|
114
|
+
bind:lintap="closeMp"
|
|
115
|
+
style="flex:1;"
|
|
116
|
+
>
|
|
117
|
+
{{t('pay:action.close')}}
|
|
118
|
+
</l-button>
|
|
119
|
+
<l-dialog
|
|
120
|
+
show="{{showCloseConfirmMp}}"
|
|
121
|
+
type="confirm"
|
|
122
|
+
title="{{t('cc.title')}}"
|
|
123
|
+
content="{{t('cc.content')}}"
|
|
124
|
+
bind:linconfirm="confirmCloseMp"
|
|
125
|
+
bind:lincancel="cancelCloseMp"
|
|
126
|
+
bind:lintap="cancelCloseMp"
|
|
127
|
+
/>
|
|
128
|
+
</block>
|
|
129
|
+
<block wx:if="{{startPayable}}">
|
|
126
130
|
<l-button
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
131
|
+
size="long"
|
|
132
|
+
bind:lintap="startPay"
|
|
133
|
+
type="success"
|
|
134
|
+
style="flex:1;"
|
|
135
|
+
>
|
|
136
|
+
{{t('pay')}}
|
|
137
|
+
</l-button>
|
|
138
|
+
</block>
|
|
139
|
+
<block wx:elif="{{oakExecutable === true}}">
|
|
140
|
+
<view class="btn">
|
|
141
|
+
<l-button
|
|
142
|
+
plain="true"
|
|
143
|
+
size="long"
|
|
144
|
+
bind:lintap="resetMp"
|
|
145
|
+
>
|
|
146
|
+
{{t('common::reset')}}
|
|
147
|
+
</l-button>
|
|
148
|
+
<l-button
|
|
149
|
+
size="long"
|
|
150
|
+
bind:lintap="executeMp"
|
|
151
|
+
>
|
|
152
|
+
{{t('common::action.update')}}
|
|
153
|
+
</l-button>
|
|
154
|
+
</view>
|
|
155
|
+
</block>
|
|
156
|
+
<block wx:elif="{{!closable}}">
|
|
157
|
+
<l-button
|
|
158
|
+
type="default"
|
|
159
|
+
size="long"
|
|
160
|
+
bind:lintap="goBack"
|
|
161
|
+
style="flex:1;"
|
|
162
|
+
>
|
|
163
|
+
{{t('common::back')}}
|
|
164
|
+
</l-button>
|
|
165
|
+
</block>
|
|
166
|
+
</view>
|
|
162
167
|
</view>
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"wechatPay": "微信支付",
|
|
17
17
|
"startPayError": {
|
|
18
18
|
"illegalPrepayData": "没有有效的预支付数据,可能后台是运行在开发环境,请检查",
|
|
19
|
-
"falseEnv": "该订单渠道【%{env}】不匹配当前环境"
|
|
19
|
+
"falseEnv": "该订单渠道【%{env}】不匹配当前环境",
|
|
20
|
+
"userCancel": "用户取消支付",
|
|
21
|
+
"unknown": "用户支付失败"
|
|
20
22
|
},
|
|
21
23
|
"type": {
|
|
22
24
|
"label": "支付类型",
|
|
@@ -152,7 +152,18 @@ export default function Render(props) {
|
|
|
152
152
|
const { t, update, execute, clean, goBack, startPay } = props.methods;
|
|
153
153
|
if (pay) {
|
|
154
154
|
const { iState, price, entity } = pay;
|
|
155
|
-
let BtnPart =
|
|
155
|
+
let BtnPart = closable ? (<Button block color="danger" onClick={() => {
|
|
156
|
+
Modal.confirm({
|
|
157
|
+
title: t('cc.title'),
|
|
158
|
+
content: t('cc.content'),
|
|
159
|
+
onConfirm: async () => {
|
|
160
|
+
await execute('close');
|
|
161
|
+
onClose();
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}}>
|
|
165
|
+
{t('pay:action.close')}
|
|
166
|
+
</Button>) : startPayable ? (<Button block style={{ backgroundColor: '#04BE02' }} className={Styles.btnWechatPay} onClick={() => startPay()}>
|
|
156
167
|
{t('pay')}
|
|
157
168
|
</Button>) : oakExecutable === true ? (<>
|
|
158
169
|
<div className={Styles.btnItem}>
|
|
@@ -165,18 +176,7 @@ export default function Render(props) {
|
|
|
165
176
|
{t('common::reset')}
|
|
166
177
|
</Button>
|
|
167
178
|
</div>
|
|
168
|
-
</>) :
|
|
169
|
-
Modal.confirm({
|
|
170
|
-
title: t('cc.title'),
|
|
171
|
-
content: t('cc.content'),
|
|
172
|
-
onConfirm: async () => {
|
|
173
|
-
await execute('close');
|
|
174
|
-
onClose();
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}}>
|
|
178
|
-
{t('pay:action.close')}
|
|
179
|
-
</Button>) : (<Button block color="primary" onClick={goBack}>
|
|
179
|
+
</>) : (<Button block color="primary" onClick={goBack}>
|
|
180
180
|
{t('common::back')}
|
|
181
181
|
</Button>);
|
|
182
182
|
return (<div className={Styles.container}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: 100%;
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
5
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.empty {
|
|
2
|
-
min-height: 600px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.container {
|
|
6
|
-
width: 100%;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
1
|
+
.empty {
|
|
2
|
+
min-height: 600px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.container {
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
11
|
}
|
|
@@ -100,7 +100,7 @@ export default function Render(props) {
|
|
|
100
100
|
]} onAction={(row, action) => {
|
|
101
101
|
const { entity } = row.pay;
|
|
102
102
|
assert(entity !== 'account');
|
|
103
|
-
if (entity !== 'offlineAccount'
|
|
103
|
+
if (entity !== 'offlineAccount' && !amIRoot) {
|
|
104
104
|
setMessage({
|
|
105
105
|
type: 'error',
|
|
106
106
|
title: t('cantOperateOnline'),
|
|
@@ -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").WechatMpConfig | import("../oak-app-domain/Application/Schema").WebConfig | 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/data/i18n.js
CHANGED
|
@@ -197,7 +197,9 @@ const i18ns = [
|
|
|
197
197
|
"wechatPay": "微信支付",
|
|
198
198
|
"startPayError": {
|
|
199
199
|
"illegalPrepayData": "没有有效的预支付数据,可能后台是运行在开发环境,请检查",
|
|
200
|
-
"falseEnv": "该订单渠道【%{env}】不匹配当前环境"
|
|
200
|
+
"falseEnv": "该订单渠道【%{env}】不匹配当前环境",
|
|
201
|
+
"userCancel": "用户取消支付",
|
|
202
|
+
"unknown": "用户支付失败"
|
|
201
203
|
},
|
|
202
204
|
"type": {
|
|
203
205
|
"label": "支付类型",
|
package/es/entities/Refund.d.ts
CHANGED
package/es/entities/Refund.js
CHANGED
|
@@ -10,7 +10,7 @@ import * as ArticleMenu from "../ArticleMenu/Schema";
|
|
|
10
10
|
import * as SessionMessage from "../SessionMessage/Schema";
|
|
11
11
|
import * as User from "../User/Schema";
|
|
12
12
|
export type OpSchema = EntityShape & {
|
|
13
|
-
origin: "qiniu" | "wechat" | "
|
|
13
|
+
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "unknown";
|
|
14
14
|
type: "image" | "video" | "audio" | "file";
|
|
15
15
|
bucket?: String<32> | null;
|
|
16
16
|
objectId?: String<64> | null;
|
|
@@ -33,7 +33,7 @@ export type OpSchema = EntityShape & {
|
|
|
33
33
|
};
|
|
34
34
|
export type OpAttr = keyof OpSchema;
|
|
35
35
|
export type Schema = EntityShape & {
|
|
36
|
-
origin: "qiniu" | "wechat" | "
|
|
36
|
+
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "unknown";
|
|
37
37
|
type: "image" | "video" | "audio" | "file";
|
|
38
38
|
bucket?: String<32> | null;
|
|
39
39
|
objectId?: String<64> | null;
|
|
@@ -66,7 +66,7 @@ type AttrFilter = {
|
|
|
66
66
|
$$createAt$$: Q_DateValue;
|
|
67
67
|
$$seq$$: Q_NumberValue;
|
|
68
68
|
$$updateAt$$: Q_DateValue;
|
|
69
|
-
origin: Q_EnumValue<"qiniu" | "wechat" | "
|
|
69
|
+
origin: Q_EnumValue<"qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "unknown">;
|
|
70
70
|
type: Q_EnumValue<"image" | "video" | "audio" | "file">;
|
|
71
71
|
bucket: Q_StringValue;
|
|
72
72
|
objectId: Q_StringValue;
|
|
@@ -4,7 +4,7 @@ export const desc = {
|
|
|
4
4
|
origin: {
|
|
5
5
|
notNull: true,
|
|
6
6
|
type: "enum",
|
|
7
|
-
enumeration: ["qiniu", "wechat", "
|
|
7
|
+
enumeration: ["qiniu", "wechat", "ctyun", "aliyun", "tencent", "unknown"]
|
|
8
8
|
},
|
|
9
9
|
type: {
|
|
10
10
|
notNull: true,
|
|
@@ -120,8 +120,8 @@ export const desc = {
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
name: '$$deleteAt$$',
|
|
123
|
-
}
|
|
124
|
-
]
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
125
|
}
|
|
126
126
|
]
|
|
127
127
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export const style = {
|
|
2
2
|
color: {
|
|
3
3
|
origin: {
|
|
4
|
-
qiniu: '#
|
|
5
|
-
wechat: '#
|
|
6
|
-
ctyun: '#
|
|
4
|
+
qiniu: '#37caff',
|
|
5
|
+
wechat: '#2aae67',
|
|
6
|
+
ctyun: '#ff0000',
|
|
7
|
+
aliyun: '#1677ff',
|
|
8
|
+
tencent: '#0052d9',
|
|
7
9
|
unknown: '#A9A9A9',
|
|
8
10
|
},
|
|
9
11
|
type: {
|
|
@@ -16,6 +18,6 @@ export const style = {
|
|
|
16
18
|
success: '#008000',
|
|
17
19
|
failed: '#FF0000',
|
|
18
20
|
uploading: '#0000FF',
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
+
},
|
|
22
|
+
},
|
|
21
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extra2": "非结构化额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata", "application": "来源应用" }, "v": { "origin": { "qiniu": "七牛云", "ctyun": "天翼云", "wechat": "微信", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
|
1
|
+
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extra2": "非结构化额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata", "application": "来源应用" }, "v": { "origin": { "qiniu": "七牛云", "ctyun": "天翼云", "wechat": "微信", "aliyun": "阿里云", "tencent": "腾讯云", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
|
@@ -14,6 +14,7 @@ export type OpSchema = EntityShape & {
|
|
|
14
14
|
loss: Price;
|
|
15
15
|
payId: ForeignKey<"pay">;
|
|
16
16
|
meta?: Object | null;
|
|
17
|
+
externalMeta?: Object | null;
|
|
17
18
|
externalId?: String<128> | null;
|
|
18
19
|
price: Price;
|
|
19
20
|
creatorId: ForeignKey<"user">;
|
|
@@ -27,6 +28,7 @@ export type Schema = EntityShape & {
|
|
|
27
28
|
loss: Price;
|
|
28
29
|
payId: ForeignKey<"pay">;
|
|
29
30
|
meta?: Object | null;
|
|
31
|
+
externalMeta?: Object | null;
|
|
30
32
|
externalId?: String<128> | null;
|
|
31
33
|
price: Price;
|
|
32
34
|
creatorId: ForeignKey<"user">;
|
|
@@ -54,6 +56,7 @@ type AttrFilter = {
|
|
|
54
56
|
payId: Q_StringValue;
|
|
55
57
|
pay: Pay.Filter;
|
|
56
58
|
meta: Object;
|
|
59
|
+
externalMeta: Object;
|
|
57
60
|
externalId: Q_StringValue;
|
|
58
61
|
price: Q_NumberValue;
|
|
59
62
|
creatorId: Q_StringValue;
|
|
@@ -78,6 +81,7 @@ export type Projection = {
|
|
|
78
81
|
payId?: number;
|
|
79
82
|
pay?: Pay.Projection;
|
|
80
83
|
meta?: number | Object;
|
|
84
|
+
externalMeta?: number | Object;
|
|
81
85
|
externalId?: number;
|
|
82
86
|
price?: number;
|
|
83
87
|
creatorId?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "帐户", "attr": { "pay": "关联支付", "price": "价格", "loss": "损耗", "withdraw": "关联提现", "meta": "metadata", "externalId": "外部退款流水号", "iState": "状态", "creator": "创建者", "reason": "原因", "opers": "相关账户操作", "successAt": "退款成功时间" }, "action": { "succeed": "退款成功", "fail": "退款失败" }, "v": { "iState": { "refunding": "退款中", "successful": "退款成功", "failed": "退款失败" } } }
|
|
1
|
+
{ "name": "帐户", "attr": { "pay": "关联支付", "price": "价格", "loss": "损耗", "withdraw": "关联提现", "meta": "metadata", "externalMeta": "外部meta信息", "externalId": "外部退款流水号", "iState": "状态", "creator": "创建者", "reason": "原因", "opers": "相关账户操作", "successAt": "退款成功时间" }, "action": { "succeed": "退款成功", "fail": "退款失败" }, "v": { "iState": { "refunding": "退款中", "successful": "退款成功", "failed": "退款失败" } } }
|
package/es/triggers/refund.js
CHANGED
|
@@ -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<1 | 0>;
|
|
10
10
|
declare const triggers: Trigger<EntityDict, 'withdraw', BRC>[];
|
|
11
11
|
export default triggers;
|
package/es/types/Exception.d.ts
CHANGED
|
@@ -16,4 +16,7 @@ export declare class ExternalPayUtilException<ED extends EntityDict> extends Oak
|
|
|
16
16
|
export declare class RefundExceedMax<ED extends EntityDict> extends OakException<ED> {
|
|
17
17
|
constructor(message?: string);
|
|
18
18
|
}
|
|
19
|
+
export declare class StartPayFailure<ED extends EntityDict> extends OakException<ED> {
|
|
20
|
+
constructor(message: string);
|
|
21
|
+
}
|
|
19
22
|
export declare function makeException<ED extends EntityDict>(msg: string | object): OakException<ED> | undefined;
|
package/es/types/Exception.js
CHANGED
|
@@ -19,6 +19,11 @@ export class RefundExceedMax extends OakException {
|
|
|
19
19
|
super(message || '可退款的总额不足');
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
export class StartPayFailure extends OakException {
|
|
23
|
+
constructor(message) {
|
|
24
|
+
super(message);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
22
27
|
export function makeException(msg) {
|
|
23
28
|
const data = typeof msg === 'string' ? JSON.parse(msg) : msg;
|
|
24
29
|
let exception = makeDepedentException(data);
|
|
@@ -14,7 +14,7 @@ export declare const mergedProjection: {
|
|
|
14
14
|
type?: number | undefined;
|
|
15
15
|
systemId?: number | undefined;
|
|
16
16
|
system?: import("../oak-app-domain/System/Schema").Projection | undefined;
|
|
17
|
-
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").
|
|
17
|
+
config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
|
|
18
18
|
style?: number | import("oak-domain/lib/types").JsonProjection<import("oak-general-business/lib/types/Style").Style> | undefined;
|
|
19
19
|
domainId?: number | undefined;
|
|
20
20
|
domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined;
|