@yunzhanghu/sdk-nodejs 1.0.12 → 1.0.13
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/README.md
CHANGED
package/example/dataService.js
CHANGED
|
@@ -113,6 +113,36 @@ dataService
|
|
|
113
113
|
console.log(err.toString())
|
|
114
114
|
})
|
|
115
115
|
|
|
116
|
+
// 查询日订单数据(支付和退款订单)
|
|
117
|
+
dataService
|
|
118
|
+
.ListDailyOrderV2({
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @param {string} request-id:请求 ID,请求的唯一标识
|
|
122
|
+
* 建议平台企业自定义 request-id,并记录在日志中,便于问题发现及排查
|
|
123
|
+
* 如未自定义 request-id,将使用 SDK 中的 UUID 方法自动生成。注意:UUID 方法生成的 request-id 不能保证全局唯一,推荐自定义 request-id
|
|
124
|
+
*/
|
|
125
|
+
request_id: 'requestIdExample123456789',
|
|
126
|
+
order_date: '2024-09-05',
|
|
127
|
+
offset: 0,
|
|
128
|
+
length: 100,
|
|
129
|
+
channel: 'alipay',
|
|
130
|
+
data_type: '',
|
|
131
|
+
})
|
|
132
|
+
.then((data) => {
|
|
133
|
+
if (data.code === '0000') {
|
|
134
|
+
// 操作成功
|
|
135
|
+
console.log('操作成功 ', JSON.stringify(data, null, 2))
|
|
136
|
+
} else {
|
|
137
|
+
// 失败返回
|
|
138
|
+
console.log('失败返回 ', 'code:' + data.code + ' message:' + data.message + ' request_id:' + data.request_id)
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
.catch((err) => {
|
|
142
|
+
// 发生异常
|
|
143
|
+
console.log(err.toString())
|
|
144
|
+
})
|
|
145
|
+
|
|
116
146
|
// 查询日订单文件(支付和退款订单)
|
|
117
147
|
dataService
|
|
118
148
|
.GetDailyOrderFileV2({
|
package/package.json
CHANGED
|
@@ -128,6 +128,80 @@ interface DealerOrderInfo {
|
|
|
128
128
|
finished_time: string;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
/** ListDailyOrderV2Request 查询日订单数据(支付和退款订单)请求 */
|
|
132
|
+
interface ListDailyOrderV2Request {
|
|
133
|
+
/** 订单查询日期, yyyy-MM-dd 格式 */
|
|
134
|
+
order_date: string;
|
|
135
|
+
/** 偏移量 */
|
|
136
|
+
offset: number;
|
|
137
|
+
/** 每页返回条数 */
|
|
138
|
+
length: number;
|
|
139
|
+
/** 支付路径名,bankpay:银行卡 alipay:支付宝 wxpay:微信 */
|
|
140
|
+
channel: string;
|
|
141
|
+
/** 当且仅当参数值为 encryption 时,对返回的 data 进行加密 */
|
|
142
|
+
data_type: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** ListDailyOrderV2Response 查询日订单数据(支付和退款订单)返回 */
|
|
146
|
+
interface ListDailyOrderV2Response {
|
|
147
|
+
/** 总条数 */
|
|
148
|
+
total_num: number;
|
|
149
|
+
/** 条目明细 */
|
|
150
|
+
list: DealerOrderInfoV2[];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** DealerOrderInfoV2 平台企业支付订单信息(支付和退款订单) */
|
|
154
|
+
interface DealerOrderInfoV2 {
|
|
155
|
+
/** 综合服务主体 ID */
|
|
156
|
+
broker_id: string;
|
|
157
|
+
/** 平台企业 ID */
|
|
158
|
+
dealer_id: string;
|
|
159
|
+
/** 订单类型 */
|
|
160
|
+
order_type: string;
|
|
161
|
+
/** 平台企业订单号 */
|
|
162
|
+
order_id: string;
|
|
163
|
+
/** 综合服务平台流水号 */
|
|
164
|
+
ref: string;
|
|
165
|
+
/** 批次号 */
|
|
166
|
+
batch_id: string;
|
|
167
|
+
/** 姓名 */
|
|
168
|
+
real_name: string;
|
|
169
|
+
/** 收款账号 */
|
|
170
|
+
card_no: string;
|
|
171
|
+
/** 综合服务主体订单金额 */
|
|
172
|
+
broker_amount: string;
|
|
173
|
+
/** 综合服务主体加成服务费 */
|
|
174
|
+
broker_fee: string;
|
|
175
|
+
/** 支付路径流水号 */
|
|
176
|
+
bill: string;
|
|
177
|
+
/** 订单状态码 */
|
|
178
|
+
status: string;
|
|
179
|
+
/** 订单状态码描述 */
|
|
180
|
+
status_message: string;
|
|
181
|
+
/** 订单详情状态码 */
|
|
182
|
+
status_detail: string;
|
|
183
|
+
/** 订单详细状态码描述 */
|
|
184
|
+
status_detail_message: string;
|
|
185
|
+
/** 订单状态补充信息 */
|
|
186
|
+
supplemental_detail_message: string;
|
|
187
|
+
/** 短周期授信账单号 */
|
|
188
|
+
statement_id: string;
|
|
189
|
+
/** 加成服务费账单号 */
|
|
190
|
+
fee_statement_id: string;
|
|
191
|
+
/** 余额账单号 */
|
|
192
|
+
bal_statement_id: string;
|
|
193
|
+
/** 支付路径 */
|
|
194
|
+
channel: string;
|
|
195
|
+
/** 订单接收时间 */
|
|
196
|
+
created_at: string;
|
|
197
|
+
/** 订单完成时间 */
|
|
198
|
+
finished_time: string;
|
|
199
|
+
/** 退款类型 */
|
|
200
|
+
refund_type: string;
|
|
201
|
+
/** 原支付流水号 */
|
|
202
|
+
pay_ref: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
131
205
|
/** ListDailyBillRequest 查询日流水数据请求 */
|
|
132
206
|
interface ListDailyBillRequest {
|
|
133
207
|
/** 流水查询日期 */
|
|
@@ -274,6 +348,20 @@ export class DataServiceClient extends YZHclient {
|
|
|
274
348
|
);
|
|
275
349
|
}
|
|
276
350
|
|
|
351
|
+
// ListDailyOrderV2 查询日订单数据(支付和退款订单)
|
|
352
|
+
async ListDailyOrderV2(
|
|
353
|
+
req: ListDailyOrderV2Request,
|
|
354
|
+
cb?: (error: null | string, rep: ListDailyOrderV2Response) => void
|
|
355
|
+
): Promise<ListDailyOrderV2Response> {
|
|
356
|
+
return this.request(
|
|
357
|
+
'get',
|
|
358
|
+
'/api/dataservice/v2/orders',
|
|
359
|
+
req,
|
|
360
|
+
{ encryption: req?.data_type === 'encryption' },
|
|
361
|
+
cb
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
|
|
277
365
|
// GetDailyOrderFile 查询日订单文件
|
|
278
366
|
async GetDailyOrderFile(
|
|
279
367
|
req: GetDailyOrderFileRequest,
|
|
@@ -127,6 +127,80 @@ interface DealerOrderInfo {
|
|
|
127
127
|
finished_time: string;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
/** ListDailyOrderV2Request 查询日订单数据(支付和退款订单)请求 */
|
|
131
|
+
interface ListDailyOrderV2Request {
|
|
132
|
+
/** 订单查询日期, yyyy-MM-dd 格式 */
|
|
133
|
+
order_date: string;
|
|
134
|
+
/** 偏移量 */
|
|
135
|
+
offset: number;
|
|
136
|
+
/** 每页返回条数 */
|
|
137
|
+
length: number;
|
|
138
|
+
/** 支付路径名,bankpay:银行卡 alipay:支付宝 wxpay:微信 */
|
|
139
|
+
channel: string;
|
|
140
|
+
/** 当且仅当参数值为 encryption 时,对返回的 data 进行加密 */
|
|
141
|
+
data_type: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** ListDailyOrderV2Response 查询日订单数据(支付和退款订单)返回 */
|
|
145
|
+
interface ListDailyOrderV2Response {
|
|
146
|
+
/** 总条数 */
|
|
147
|
+
total_num: number;
|
|
148
|
+
/** 条目明细 */
|
|
149
|
+
list: DealerOrderInfoV2[];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** DealerOrderInfoV2 平台企业支付订单信息(支付和退款订单) */
|
|
153
|
+
interface DealerOrderInfoV2 {
|
|
154
|
+
/** 综合服务主体 ID */
|
|
155
|
+
broker_id: string;
|
|
156
|
+
/** 平台企业 ID */
|
|
157
|
+
dealer_id: string;
|
|
158
|
+
/** 订单类型 */
|
|
159
|
+
order_type: string;
|
|
160
|
+
/** 平台企业订单号 */
|
|
161
|
+
order_id: string;
|
|
162
|
+
/** 综合服务平台流水号 */
|
|
163
|
+
ref: string;
|
|
164
|
+
/** 批次号 */
|
|
165
|
+
batch_id: string;
|
|
166
|
+
/** 姓名 */
|
|
167
|
+
real_name: string;
|
|
168
|
+
/** 收款账号 */
|
|
169
|
+
card_no: string;
|
|
170
|
+
/** 综合服务主体订单金额 */
|
|
171
|
+
broker_amount: string;
|
|
172
|
+
/** 综合服务主体加成服务费 */
|
|
173
|
+
broker_fee: string;
|
|
174
|
+
/** 支付路径流水号 */
|
|
175
|
+
bill: string;
|
|
176
|
+
/** 订单状态码 */
|
|
177
|
+
status: string;
|
|
178
|
+
/** 订单状态码描述 */
|
|
179
|
+
status_message: string;
|
|
180
|
+
/** 订单详情状态码 */
|
|
181
|
+
status_detail: string;
|
|
182
|
+
/** 订单详细状态码描述 */
|
|
183
|
+
status_detail_message: string;
|
|
184
|
+
/** 订单状态补充信息 */
|
|
185
|
+
supplemental_detail_message: string;
|
|
186
|
+
/** 短周期授信账单号 */
|
|
187
|
+
statement_id: string;
|
|
188
|
+
/** 加成服务费账单号 */
|
|
189
|
+
fee_statement_id: string;
|
|
190
|
+
/** 余额账单号 */
|
|
191
|
+
bal_statement_id: string;
|
|
192
|
+
/** 支付路径 */
|
|
193
|
+
channel: string;
|
|
194
|
+
/** 订单接收时间 */
|
|
195
|
+
created_at: string;
|
|
196
|
+
/** 订单完成时间 */
|
|
197
|
+
finished_time: string;
|
|
198
|
+
/** 退款类型 */
|
|
199
|
+
refund_type: string;
|
|
200
|
+
/** 原支付流水号 */
|
|
201
|
+
pay_ref: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
130
204
|
/** ListDailyBillRequest 查询日流水数据请求 */
|
|
131
205
|
interface ListDailyBillRequest {
|
|
132
206
|
/** 流水查询日期 */
|
|
@@ -259,6 +333,10 @@ export declare class DataServiceClient extends YZHclient {
|
|
|
259
333
|
req: ListDailyOrderRequest,
|
|
260
334
|
cb?: (error: null | string, rep: ListDailyOrderResponse) => void
|
|
261
335
|
): Promise<ListDailyOrderResponse>;
|
|
336
|
+
ListDailyOrderV2(
|
|
337
|
+
req: ListDailyOrderV2Request,
|
|
338
|
+
cb?: (error: null | string, rep: ListDailyOrderV2Response) => void
|
|
339
|
+
): Promise<ListDailyOrderV2Response>;
|
|
262
340
|
GetDailyOrderFile(
|
|
263
341
|
req: GetDailyOrderFileRequest,
|
|
264
342
|
cb?: (error: null | string, rep: GetDailyOrderFileResponse) => void
|
|
@@ -17,6 +17,16 @@ class DataServiceClient extends client_1.default {
|
|
|
17
17
|
cb
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
+
// ListDailyOrderV2 查询日订单数据(支付和退款订单)
|
|
21
|
+
async ListDailyOrderV2(req, cb) {
|
|
22
|
+
return this.request(
|
|
23
|
+
'get',
|
|
24
|
+
'/api/dataservice/v2/orders',
|
|
25
|
+
req,
|
|
26
|
+
{ encryption: (req === null || req === void 0 ? void 0 : req.data_type) === 'encryption' },
|
|
27
|
+
cb
|
|
28
|
+
);
|
|
29
|
+
}
|
|
20
30
|
// GetDailyOrderFile 查询日订单文件
|
|
21
31
|
async GetDailyOrderFile(req, cb) {
|
|
22
32
|
return this.request('get', '/api/dataservice/v1/order/downloadurl', req, { encryption: false }, cb);
|