@be-link/ecommerce-trade-service-node-sdk 0.1.147 → 0.1.149
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/modules/member/pos/orderQuery/internalService.d.ts +1 -0
- package/modules/member/pos/orderQuery/internalService.js +8 -0
- package/modules/member/pos/orderQuery/types.d.ts +10 -0
- package/modules/pos/orderQuery/internalService.d.ts +1 -0
- package/modules/pos/orderQuery/internalService.js +8 -0
- package/modules/pos/orderQuery/types.d.ts +42 -2
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { MemberOrderQueryService } from './types';
|
|
|
2
2
|
import BaseService from '../../../BaseService';
|
|
3
3
|
declare class MemberOrderQueryByInternalService extends BaseService implements MemberOrderQueryService.ByInternal.QueryController {
|
|
4
4
|
protected prefixUrl: string;
|
|
5
|
+
countUserOrder(request: MemberOrderQueryService.ByInternal.Request.ICountUserOrder): Promise<MemberOrderQueryService.ByInternal.Response.ICountUserOrder>;
|
|
5
6
|
/**
|
|
6
7
|
* 根据直播间ID统计会员订单数(内部接口)
|
|
7
8
|
* 统计口径:支付状态=SUCCESS 且 退款状态!=CLOSED
|
|
@@ -21,6 +21,9 @@ let MemberOrderQueryByInternalService = class MemberOrderQueryByInternalService
|
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.prefixUrl = '/member/pos/query/internal';
|
|
23
23
|
}
|
|
24
|
+
countUserOrder(request) {
|
|
25
|
+
return (0, http_1.callApi)(this.getApiUrl(this.countUserOrder), request);
|
|
26
|
+
}
|
|
24
27
|
/**
|
|
25
28
|
* 根据直播间ID统计会员订单数(内部接口)
|
|
26
29
|
* 统计口径:支付状态=SUCCESS 且 退款状态!=CLOSED
|
|
@@ -32,6 +35,11 @@ let MemberOrderQueryByInternalService = class MemberOrderQueryByInternalService
|
|
|
32
35
|
return (0, http_1.callApi)(this.getApiUrl(this.queryMemberOrderList), request);
|
|
33
36
|
}
|
|
34
37
|
};
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, tsoa_1.OperationId)('根据用户ID统计会员已完成订单数'),
|
|
40
|
+
(0, tsoa_1.Post)('count-user-order'),
|
|
41
|
+
__param(0, (0, tsoa_1.Body)())
|
|
42
|
+
], MemberOrderQueryByInternalService.prototype, "countUserOrder", null);
|
|
35
43
|
__decorate([
|
|
36
44
|
(0, tsoa_1.OperationId)('根据直播间ID统计会员有效支付订单数'),
|
|
37
45
|
(0, tsoa_1.Post)('count-live-room-paid-orders'),
|
|
@@ -272,6 +272,10 @@ export declare namespace MemberOrderQueryService {
|
|
|
272
272
|
namespace ByInternal {
|
|
273
273
|
/** 内部服务查询参数 */
|
|
274
274
|
namespace Request {
|
|
275
|
+
interface ICountUserOrder {
|
|
276
|
+
/** 用户ID */
|
|
277
|
+
userId: string;
|
|
278
|
+
}
|
|
275
279
|
interface ICountLiveRoomPaidOrders {
|
|
276
280
|
/** 直播间ID */
|
|
277
281
|
liveRoomId: string;
|
|
@@ -285,6 +289,10 @@ export declare namespace MemberOrderQueryService {
|
|
|
285
289
|
}
|
|
286
290
|
/** 内部服务返回参数 */
|
|
287
291
|
namespace Response {
|
|
292
|
+
interface ICountUserOrder {
|
|
293
|
+
/** 用户已完成订单数量 */
|
|
294
|
+
total: number;
|
|
295
|
+
}
|
|
288
296
|
interface ICountLiveRoomPaidOrders {
|
|
289
297
|
/**
|
|
290
298
|
* 订单数
|
|
@@ -300,6 +308,8 @@ export declare namespace MemberOrderQueryService {
|
|
|
300
308
|
}
|
|
301
309
|
}
|
|
302
310
|
interface QueryController {
|
|
311
|
+
/** 根据用户ID统计会员已完成订单数(内部接口) */
|
|
312
|
+
countUserOrder(request: Request.ICountUserOrder, req: any): Promise<Response.ICountUserOrder>;
|
|
303
313
|
/**
|
|
304
314
|
* 根据直播间ID统计会员订单数(内部接口)
|
|
305
315
|
* 统计口径:支付状态=SUCCESS 且 退款状态!=CLOSED
|
|
@@ -5,6 +5,7 @@ declare class OrderQueryByInternalService extends BaseService implements PosOrde
|
|
|
5
5
|
getOrderByIdForClientBackend(request: PosOrderQueryService.ByInternal.Request.IGetOrderByIdForClientBackend): Promise<PosOrderQueryService.ByInternal.Response.IGetOrderByIdForClientBackend>;
|
|
6
6
|
getOrderListForClientBackend(request: PosOrderQueryService.ByInternal.Request.IGetOrderListForClientBackend): Promise<PosOrderQueryService.ByInternal.Response.IGetOrderListForClientBackend>;
|
|
7
7
|
getPaidUserIdsByLiveRoomId(request: PosOrderQueryService.ByInternal.Request.IGetPaidUserIdsByLiveRoomId): Promise<PosOrderQueryService.ByInternal.Response.IGetPaidUserIdsByLiveRoomId>;
|
|
8
|
+
countUserProductQuantity(request: PosOrderQueryService.ByInternal.Request.ICountUserProductQuantity): Promise<PosOrderQueryService.ByInternal.Response.ICountUserProductQuantity>;
|
|
8
9
|
getUserDiscountAmount(request: PosOrderQueryService.ByInternal.Request.IGetUserDiscountAmount): Promise<PosOrderQueryService.ByInternal.Response.IGetUserDiscountAmount>;
|
|
9
10
|
getOrderSavingAmount(request: PosOrderQueryService.ByInternal.Request.IGetOrderSavingAmount): Promise<PosOrderQueryService.ByInternal.Response.IGetOrderSavingAmount>;
|
|
10
11
|
mgetOrderProductInfo(request: PosOrderQueryService.ByInternal.Request.IMgetOrderProductInfo): Promise<PosOrderQueryService.ByInternal.Response.IMgetOrderProductInfo[]>;
|
|
@@ -30,6 +30,9 @@ let OrderQueryByInternalService = class OrderQueryByInternalService extends Base
|
|
|
30
30
|
getPaidUserIdsByLiveRoomId(request) {
|
|
31
31
|
return (0, http_1.callApi)(this.getApiUrl(this.getPaidUserIdsByLiveRoomId), request);
|
|
32
32
|
}
|
|
33
|
+
countUserProductQuantity(request) {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.countUserProductQuantity), request);
|
|
35
|
+
}
|
|
33
36
|
getUserDiscountAmount(request) {
|
|
34
37
|
return (0, http_1.callApi)(this.getApiUrl(this.getUserDiscountAmount), request);
|
|
35
38
|
}
|
|
@@ -58,6 +61,11 @@ __decorate([
|
|
|
58
61
|
(0, tsoa_1.Post)('get-paid-user-ids-by-live-room-id'),
|
|
59
62
|
__param(0, (0, tsoa_1.Body)())
|
|
60
63
|
], OrderQueryByInternalService.prototype, "getPaidUserIdsByLiveRoomId", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, tsoa_1.OperationId)('统计用户购买商品份数(内部)'),
|
|
66
|
+
(0, tsoa_1.Post)('count-user-product-quantity'),
|
|
67
|
+
__param(0, (0, tsoa_1.Body)())
|
|
68
|
+
], OrderQueryByInternalService.prototype, "countUserProductQuantity", null);
|
|
61
69
|
__decorate([
|
|
62
70
|
(0, tsoa_1.OperationId)('查询用户某段时间范围内累计优惠金额'),
|
|
63
71
|
(0, tsoa_1.Post)('get-user-discount-amount'),
|
|
@@ -66,6 +66,14 @@ export declare namespace PosOrderQueryService {
|
|
|
66
66
|
/** 直播间ID */
|
|
67
67
|
liveRoomId: string;
|
|
68
68
|
}
|
|
69
|
+
interface ICountUserProductQuantity {
|
|
70
|
+
/** 用户ID */
|
|
71
|
+
userId: string;
|
|
72
|
+
/** 商品ID列表 */
|
|
73
|
+
productIds: string[];
|
|
74
|
+
/** 订单来源列表 */
|
|
75
|
+
sourceList?: ENUM.OrderSource[];
|
|
76
|
+
}
|
|
69
77
|
interface IGetUserDiscountAmount {
|
|
70
78
|
/** 用户ID */
|
|
71
79
|
userId: string;
|
|
@@ -115,6 +123,8 @@ export declare namespace PosOrderQueryService {
|
|
|
115
123
|
/** 用户ID列表 */
|
|
116
124
|
userIds: string[];
|
|
117
125
|
}
|
|
126
|
+
/** 商品ID -> 商品份数 */
|
|
127
|
+
type ICountUserProductQuantity = Record<string, number>;
|
|
118
128
|
interface IGetUserDiscountAmount {
|
|
119
129
|
/** 累计优惠金额(分) */
|
|
120
130
|
totalDiscount: number;
|
|
@@ -205,6 +215,8 @@ export declare namespace PosOrderQueryService {
|
|
|
205
215
|
getOrderListForClientBackend(request: Request.IGetOrderListForClientBackend, req: any): Promise<Response.IGetOrderListForClientBackend>;
|
|
206
216
|
/** 根据直播间ID查询下单用户ID列表 */
|
|
207
217
|
getPaidUserIdsByLiveRoomId(request: Request.IGetPaidUserIdsByLiveRoomId, req: any): Promise<Response.IGetPaidUserIdsByLiveRoomId>;
|
|
218
|
+
/** 统计用户购买的商品份数(排除已退款份数) */
|
|
219
|
+
countUserProductQuantity(request: Request.ICountUserProductQuantity, req: any): Promise<Response.ICountUserProductQuantity>;
|
|
208
220
|
/** 查询用户某段时间范围内累计优惠金额 */
|
|
209
221
|
getUserDiscountAmount(request: Request.IGetUserDiscountAmount, req: any): Promise<Response.IGetUserDiscountAmount>;
|
|
210
222
|
/** 查询订单省钱金额 */
|
|
@@ -372,8 +384,24 @@ export declare namespace PosOrderQueryService {
|
|
|
372
384
|
/** 直播间 */
|
|
373
385
|
liveRoom?: ILiveRoom;
|
|
374
386
|
};
|
|
375
|
-
/**
|
|
376
|
-
|
|
387
|
+
/**
|
|
388
|
+
* 分页(与 cursorPaging 二选一,优先 pagination;都不传时走 cursorPaging 的首页)
|
|
389
|
+
*/
|
|
390
|
+
pagination?: Dto.IPagination;
|
|
391
|
+
/**
|
|
392
|
+
* 游标分页(与 pagination 二选一)
|
|
393
|
+
*/
|
|
394
|
+
cursorPaging?: {
|
|
395
|
+
/** 游标信息(首页不传) */
|
|
396
|
+
cursor?: {
|
|
397
|
+
/** 上一页最后一条记录的创建时间 */
|
|
398
|
+
lastCreatedAt: number;
|
|
399
|
+
/** 上一页最后一条记录的ID */
|
|
400
|
+
lastId: string;
|
|
401
|
+
};
|
|
402
|
+
/** 每页数量 */
|
|
403
|
+
pageSize: number;
|
|
404
|
+
};
|
|
377
405
|
/** 排序 */
|
|
378
406
|
sort?: {
|
|
379
407
|
/** 订单创建时间 */
|
|
@@ -570,6 +598,11 @@ export declare namespace PosOrderQueryService {
|
|
|
570
598
|
interface IList {
|
|
571
599
|
list: IListItem[];
|
|
572
600
|
total: number;
|
|
601
|
+
/** 下一页游标(使用游标分页时,如果还有下一页则返回) */
|
|
602
|
+
nextCursor?: {
|
|
603
|
+
lastCreatedAt: number;
|
|
604
|
+
lastId: string;
|
|
605
|
+
};
|
|
573
606
|
}
|
|
574
607
|
interface IOrderList {
|
|
575
608
|
}
|
|
@@ -604,6 +637,13 @@ export declare namespace PosOrderQueryService {
|
|
|
604
637
|
headers: string[];
|
|
605
638
|
/** 数据 */
|
|
606
639
|
data: string[][];
|
|
640
|
+
/** 游标分页-下一页游标信息(仅在使用 cursor 时返回) */
|
|
641
|
+
nextCursor?: {
|
|
642
|
+
/** 最后一条记录的创建时间 */
|
|
643
|
+
lastCreatedAt: number;
|
|
644
|
+
/** 最后一条记录的ID */
|
|
645
|
+
lastId: string;
|
|
646
|
+
};
|
|
607
647
|
}
|
|
608
648
|
interface IExportOrderDataByIds extends IExportOrderData {
|
|
609
649
|
}
|