@be-link/ecommerce-trade-service-node-sdk 0.1.136 → 0.1.138
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/orderCore/jobService.d.ts +2 -0
- package/modules/member/pos/orderCore/jobService.js +11 -0
- package/modules/member/pos/orderCore/types.d.ts +15 -1
- package/modules/pos/orderCore/types.d.ts +0 -2
- package/modules/pos/orderQuery/internalService.d.ts +1 -1
- package/modules/pos/orderQuery/internalService.js +8 -8
- package/modules/pos/orderQuery/types.d.ts +80 -53
- package/modules/statistics/service.d.ts +2 -0
- package/modules/statistics/service.js +16 -0
- package/modules/statistics/types.d.ts +80 -0
- package/package.json +1 -1
- package/types.d.ts +2 -4
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { MemberOrderCoreService } from './types';
|
|
1
2
|
import BaseService from '../../../BaseService';
|
|
2
3
|
declare class MemberOrderCoreByJobService extends BaseService {
|
|
3
4
|
protected prefixUrl: string;
|
|
4
5
|
autoCancelTimeoutOrders(): Promise<void>;
|
|
6
|
+
legacyMemberOrderMigration(request: MemberOrderCoreService.ByJob.Request.ILegacyMemberOrderMigration): Promise<void>;
|
|
5
7
|
}
|
|
6
8
|
export declare const memberOrderCoreByJobService: MemberOrderCoreByJobService;
|
|
7
9
|
export default memberOrderCoreByJobService;
|
|
@@ -5,6 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
+
};
|
|
8
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
13
|
};
|
|
@@ -21,11 +24,19 @@ let MemberOrderCoreByJobService = class MemberOrderCoreByJobService extends Base
|
|
|
21
24
|
autoCancelTimeoutOrders() {
|
|
22
25
|
return (0, http_1.callApi)(this.getApiUrl(this.autoCancelTimeoutOrders), {});
|
|
23
26
|
}
|
|
27
|
+
legacyMemberOrderMigration(request) {
|
|
28
|
+
return (0, http_1.callApi)(this.getApiUrl(this.legacyMemberOrderMigration), request);
|
|
29
|
+
}
|
|
24
30
|
};
|
|
25
31
|
__decorate([
|
|
26
32
|
(0, tsoa_1.OperationId)('定时取消超时未支付会员订单'),
|
|
27
33
|
(0, tsoa_1.Post)('auto-cancel-timeout-orders')
|
|
28
34
|
], MemberOrderCoreByJobService.prototype, "autoCancelTimeoutOrders", null);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, tsoa_1.OperationId)('会员历史订单迁移'),
|
|
37
|
+
(0, tsoa_1.Post)('legacy-member-order-migration'),
|
|
38
|
+
__param(0, (0, tsoa_1.Body)())
|
|
39
|
+
], MemberOrderCoreByJobService.prototype, "legacyMemberOrderMigration", null);
|
|
29
40
|
MemberOrderCoreByJobService = __decorate([
|
|
30
41
|
(0, tsoa_1.Route)('member/pos/core/job'),
|
|
31
42
|
(0, tsoa_1.Tags)('MemberOrderCoreJob')
|
|
@@ -48,8 +48,22 @@ export declare namespace MemberOrderCoreService {
|
|
|
48
48
|
/** 更新会员订单支付状态 */
|
|
49
49
|
updatePayStatus(request: ByUser.Request.IUpdatePayStatus, req: any): Promise<void>;
|
|
50
50
|
}
|
|
51
|
+
namespace ByJob {
|
|
52
|
+
namespace Request {
|
|
53
|
+
interface IAutoCancelTimeoutOrders {
|
|
54
|
+
}
|
|
55
|
+
interface ILegacyMemberOrderMigration {
|
|
56
|
+
/** 每批处理条数(可选,默认 500) */
|
|
57
|
+
batchSize?: number;
|
|
58
|
+
/** 是否 dry-run(可选,默认 true) */
|
|
59
|
+
dryRun?: boolean;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
51
63
|
interface JobController {
|
|
52
64
|
/** 定时取消超时未支付会员订单 */
|
|
53
|
-
autoCancelTimeoutOrders(request:
|
|
65
|
+
autoCancelTimeoutOrders(request: ByJob.Request.IAutoCancelTimeoutOrders, req: unknown): Promise<void>;
|
|
66
|
+
/** 会员历史订单迁移 */
|
|
67
|
+
legacyMemberOrderMigration(request: ByJob.Request.ILegacyMemberOrderMigration, req: unknown): Promise<void>;
|
|
54
68
|
}
|
|
55
69
|
}
|
|
@@ -6,10 +6,10 @@ declare class OrderQueryByInternalService extends BaseService implements PosOrde
|
|
|
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
8
|
getUserDiscountAmount(request: PosOrderQueryService.ByInternal.Request.IGetUserDiscountAmount): Promise<PosOrderQueryService.ByInternal.Response.IGetUserDiscountAmount>;
|
|
9
|
-
getVerifyCouponOrderListByCouponId(request: PosOrderQueryService.ByInternal.Request.IGetVerifyCouponOrderListByCouponId): Promise<PosOrderQueryService.ByInternal.Response.IGetVerifyCouponOrderListByCouponId>;
|
|
10
9
|
getOrderSavingAmount(request: PosOrderQueryService.ByInternal.Request.IGetOrderSavingAmount): Promise<PosOrderQueryService.ByInternal.Response.IGetOrderSavingAmount>;
|
|
11
10
|
mgetOrderProductInfo(request: PosOrderQueryService.ByInternal.Request.IMgetOrderProductInfo): Promise<PosOrderQueryService.ByInternal.Response.IMgetOrderProductInfo[]>;
|
|
12
11
|
mgetOrderDataForSettlement(request: PosOrderQueryService.ByInternal.Request.IMgetOrderDataForSettlement): Promise<PosOrderQueryService.ByInternal.Response.IMgetOrderDataForSettlement>;
|
|
12
|
+
getVerificationRecords(request: PosOrderQueryService.ByInternal.Request.IGetVerificationRecords): Promise<PosOrderQueryService.ByInternal.Response.IGetVerificationRecords>;
|
|
13
13
|
}
|
|
14
14
|
export declare const orderQueryByInternalService: OrderQueryByInternalService;
|
|
15
15
|
export default orderQueryByInternalService;
|
|
@@ -33,9 +33,6 @@ let OrderQueryByInternalService = class OrderQueryByInternalService extends Base
|
|
|
33
33
|
getUserDiscountAmount(request) {
|
|
34
34
|
return (0, http_1.callApi)(this.getApiUrl(this.getUserDiscountAmount), request);
|
|
35
35
|
}
|
|
36
|
-
getVerifyCouponOrderListByCouponId(request) {
|
|
37
|
-
return (0, http_1.callApi)(this.getApiUrl(this.getVerifyCouponOrderListByCouponId), request);
|
|
38
|
-
}
|
|
39
36
|
getOrderSavingAmount(request) {
|
|
40
37
|
return (0, http_1.callApi)(this.getApiUrl(this.getOrderSavingAmount), request);
|
|
41
38
|
}
|
|
@@ -45,6 +42,9 @@ let OrderQueryByInternalService = class OrderQueryByInternalService extends Base
|
|
|
45
42
|
mgetOrderDataForSettlement(request) {
|
|
46
43
|
return (0, http_1.callApi)(this.getApiUrl(this.mgetOrderDataForSettlement), request);
|
|
47
44
|
}
|
|
45
|
+
getVerificationRecords(request) {
|
|
46
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getVerificationRecords), request);
|
|
47
|
+
}
|
|
48
48
|
};
|
|
49
49
|
__decorate([
|
|
50
50
|
(0, tsoa_1.OperationId)('根据订单ID查询订单数据接口(直播服务)'),
|
|
@@ -66,11 +66,6 @@ __decorate([
|
|
|
66
66
|
(0, tsoa_1.Post)('get-user-discount-amount'),
|
|
67
67
|
__param(0, (0, tsoa_1.Body)())
|
|
68
68
|
], OrderQueryByInternalService.prototype, "getUserDiscountAmount", null);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, tsoa_1.OperationId)('根据券模板ID查询核销券订单列表'),
|
|
71
|
-
(0, tsoa_1.Post)('get-verify-coupon-order-list-by-coupon-id'),
|
|
72
|
-
__param(0, (0, tsoa_1.Body)())
|
|
73
|
-
], OrderQueryByInternalService.prototype, "getVerifyCouponOrderListByCouponId", null);
|
|
74
69
|
__decorate([
|
|
75
70
|
(0, tsoa_1.OperationId)('查询订单省钱金额'),
|
|
76
71
|
(0, tsoa_1.Post)('get-order-saving-amount'),
|
|
@@ -86,6 +81,11 @@ __decorate([
|
|
|
86
81
|
(0, tsoa_1.Post)('mget-order-data-for-settlement'),
|
|
87
82
|
__param(0, (0, tsoa_1.Body)())
|
|
88
83
|
], OrderQueryByInternalService.prototype, "mgetOrderDataForSettlement", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, tsoa_1.OperationId)('获取订单核销流水明细'),
|
|
86
|
+
(0, tsoa_1.Post)('verification-records'),
|
|
87
|
+
__param(0, (0, tsoa_1.Body)())
|
|
88
|
+
], OrderQueryByInternalService.prototype, "getVerificationRecords", null);
|
|
89
89
|
OrderQueryByInternalService = __decorate([
|
|
90
90
|
(0, tsoa_1.Route)('pos/query/internal'),
|
|
91
91
|
(0, tsoa_1.Tags)('PosOrderQuery')
|
|
@@ -74,28 +74,6 @@ export declare namespace PosOrderQueryService {
|
|
|
74
74
|
/** 结束时间(时间戳,毫秒) */
|
|
75
75
|
endTime: number;
|
|
76
76
|
}
|
|
77
|
-
interface IGetVerifyCouponOrderListByCouponId {
|
|
78
|
-
/** 券模板ID */
|
|
79
|
-
templateId: string;
|
|
80
|
-
/** 状态:全部/占用/未使用/已使用/已过期/已回收(可选) */
|
|
81
|
-
status?: string;
|
|
82
|
-
/** 用户ID(模糊搜索) */
|
|
83
|
-
userId?: string;
|
|
84
|
-
/** 领取渠道一级(多选) */
|
|
85
|
-
channelLevel1?: string[];
|
|
86
|
-
/** 领取渠道二级(多选) */
|
|
87
|
-
channelLevel2?: string[];
|
|
88
|
-
/** 绑定门店ID */
|
|
89
|
-
storeId?: string;
|
|
90
|
-
/** 领取时间开始(毫秒时间戳) */
|
|
91
|
-
receiveTimeStart?: number;
|
|
92
|
-
/** 领取时间结束(毫秒时间戳) */
|
|
93
|
-
receiveTimeEnd?: number;
|
|
94
|
-
/** 页码,从0开始 */
|
|
95
|
-
pageIndex: number;
|
|
96
|
-
/** 每页数量,默认20,最大1000 */
|
|
97
|
-
pageSize: number;
|
|
98
|
-
}
|
|
99
77
|
interface IGetOrderSavingAmount {
|
|
100
78
|
/** 订单ID */
|
|
101
79
|
orderId: string;
|
|
@@ -129,6 +107,16 @@ export declare namespace PosOrderQueryService {
|
|
|
129
107
|
end: number;
|
|
130
108
|
};
|
|
131
109
|
}
|
|
110
|
+
interface IGetVerificationRecords {
|
|
111
|
+
/** 门店ID */
|
|
112
|
+
storeId: string;
|
|
113
|
+
/** 开始时间 */
|
|
114
|
+
startTime: number;
|
|
115
|
+
/** 结束时间 */
|
|
116
|
+
endTime: number;
|
|
117
|
+
/** 商品ID集合 */
|
|
118
|
+
productIds?: string[];
|
|
119
|
+
}
|
|
132
120
|
}
|
|
133
121
|
namespace Response {
|
|
134
122
|
type IGetOrderByIdForClientBackend = Dto.ITradeOrderForClientBackend;
|
|
@@ -141,35 +129,6 @@ export declare namespace PosOrderQueryService {
|
|
|
141
129
|
/** 累计优惠金额(分) */
|
|
142
130
|
totalDiscount: number;
|
|
143
131
|
}
|
|
144
|
-
interface IGetVerifyCouponOrderListByCouponId {
|
|
145
|
-
/** 核销券订单列表 */
|
|
146
|
-
list: Array<{
|
|
147
|
-
/** 券编码 */
|
|
148
|
-
couponCode: string;
|
|
149
|
-
/** 用户Id */
|
|
150
|
-
userId: string;
|
|
151
|
-
/** 用户昵称 */
|
|
152
|
-
userNickname: string;
|
|
153
|
-
/** 当前状态 */
|
|
154
|
-
status: string;
|
|
155
|
-
/** 领取时间(毫秒时间戳) */
|
|
156
|
-
receiveTime: number;
|
|
157
|
-
/** 到期时间(毫秒时间戳) */
|
|
158
|
-
expireTime: number;
|
|
159
|
-
/** 使用时间(毫秒时间戳,未使用为0) */
|
|
160
|
-
useTime: number;
|
|
161
|
-
/** 门店ID */
|
|
162
|
-
storeId: string;
|
|
163
|
-
/** 门店名称 */
|
|
164
|
-
storeName: string;
|
|
165
|
-
/** 领取渠道一级 */
|
|
166
|
-
channelLevel1: string;
|
|
167
|
-
/** 领取渠道二级 */
|
|
168
|
-
channelLevel2: string;
|
|
169
|
-
}>;
|
|
170
|
-
/** 总记录数 */
|
|
171
|
-
total: number;
|
|
172
|
-
}
|
|
173
132
|
interface IGetOrderSavingAmount {
|
|
174
133
|
/** 积分优惠金额(分) */
|
|
175
134
|
pointsDiscountAmount: number;
|
|
@@ -248,6 +207,57 @@ export declare namespace PosOrderQueryService {
|
|
|
248
207
|
hasMore: boolean;
|
|
249
208
|
}
|
|
250
209
|
type IMgetOrderProductInfoList = IMgetOrderProductInfo[];
|
|
210
|
+
/** 单条核销流水明细 */
|
|
211
|
+
interface IVerificationRecordItem {
|
|
212
|
+
/** 主键ID */
|
|
213
|
+
id: string;
|
|
214
|
+
/** 创建时间 (时间戳) */
|
|
215
|
+
createdAt: number;
|
|
216
|
+
/** 更新时间 (时间戳) */
|
|
217
|
+
updatedAt: number;
|
|
218
|
+
/** 订单ID */
|
|
219
|
+
orderId: string;
|
|
220
|
+
/** 订单商品项表ID */
|
|
221
|
+
orderItemId: string;
|
|
222
|
+
/** 下单用户Id */
|
|
223
|
+
userId: string;
|
|
224
|
+
/** 下单门店ID */
|
|
225
|
+
storeId: string;
|
|
226
|
+
/** 商品ID */
|
|
227
|
+
productId: string;
|
|
228
|
+
/** 商品名称 */
|
|
229
|
+
productName: string;
|
|
230
|
+
/** 商品skuID */
|
|
231
|
+
productSkuId: string;
|
|
232
|
+
/** 商品规格编码 */
|
|
233
|
+
productSkuCode: string;
|
|
234
|
+
/** 商品单价(分) */
|
|
235
|
+
productPrice: number;
|
|
236
|
+
/** 商品主图URL */
|
|
237
|
+
productImg: string;
|
|
238
|
+
/** 商品分类:百货、健康、门店零售、其他生鲜、早八生鲜 */
|
|
239
|
+
productCate: PRODUCT_SERVICE_ENUM.PRODUCT_ENUM.CLASSIFICATION;
|
|
240
|
+
/** 配货方式:WAREHOSE_DISPATCH-仓发 SUPPLIER_DISPATCH-供自发 */
|
|
241
|
+
productDispatch: PRODUCT_SERVICE_ENUM.PRODUCT_ENUM.DISPATCH_TYPE;
|
|
242
|
+
/** 商品提货方式:STORE_PICKUP-门店自提 DELIVERY-送货上门 */
|
|
243
|
+
productPick: PRODUCT_SERVICE_ENUM.PRODUCT_ENUM.PICK_TYPE;
|
|
244
|
+
/** 核销有效期开始时间 */
|
|
245
|
+
validStartTime: number;
|
|
246
|
+
/** 核销有效期结束时间 */
|
|
247
|
+
validEndTime: number;
|
|
248
|
+
/** 核销人(操作账号姓名) */
|
|
249
|
+
operator: string;
|
|
250
|
+
/** 核销时间 */
|
|
251
|
+
operatorTime: number;
|
|
252
|
+
/** 核销门店 */
|
|
253
|
+
verificationStoreId: string;
|
|
254
|
+
/** 核销方式:手机号核销、自主核销 */
|
|
255
|
+
way: string;
|
|
256
|
+
}
|
|
257
|
+
interface IGetVerificationRecords {
|
|
258
|
+
list: IVerificationRecordItem[];
|
|
259
|
+
total: number;
|
|
260
|
+
}
|
|
251
261
|
}
|
|
252
262
|
interface QueryController {
|
|
253
263
|
/** 根据订单ID查询订单数据接口(直播服务) */
|
|
@@ -258,14 +268,14 @@ export declare namespace PosOrderQueryService {
|
|
|
258
268
|
getPaidUserIdsByLiveRoomId(request: Request.IGetPaidUserIdsByLiveRoomId, req: any): Promise<Response.IGetPaidUserIdsByLiveRoomId>;
|
|
259
269
|
/** 查询用户某段时间范围内累计优惠金额 */
|
|
260
270
|
getUserDiscountAmount(request: Request.IGetUserDiscountAmount, req: any): Promise<Response.IGetUserDiscountAmount>;
|
|
261
|
-
/** 根据券模板ID查询核销券订单列表 */
|
|
262
|
-
getVerifyCouponOrderListByCouponId(request: Request.IGetVerifyCouponOrderListByCouponId, req: any): Promise<Response.IGetVerifyCouponOrderListByCouponId>;
|
|
263
271
|
/** 查询订单省钱金额 */
|
|
264
272
|
getOrderSavingAmount(request: Request.IGetOrderSavingAmount, req: any): Promise<Response.IGetOrderSavingAmount>;
|
|
265
273
|
/** 批量获取订单商品信息 */
|
|
266
274
|
mgetOrderProductInfo(request: Request.IMgetOrderProductInfo, req: any): Promise<Response.IMgetOrderProductInfoList>;
|
|
267
275
|
/** 批量获取订单数据(结算服务) */
|
|
268
276
|
mgetOrderDataForSettlement(request: Request.IMgetOrderDataForSettlement, req: any): Promise<Response.IMgetOrderDataForSettlement>;
|
|
277
|
+
/** * 获取核销事实流水记录 */
|
|
278
|
+
getVerificationRecords(request: Request.IGetVerificationRecords, req?: any): Promise<Response.IGetVerificationRecords>;
|
|
269
279
|
}
|
|
270
280
|
}
|
|
271
281
|
namespace ByCrm {
|
|
@@ -1114,6 +1124,8 @@ export declare namespace PosOrderQueryService {
|
|
|
1114
1124
|
receiverPhone?: string;
|
|
1115
1125
|
/** 商品ID列表 */
|
|
1116
1126
|
productIds?: string[];
|
|
1127
|
+
/** SKU ID列表 */
|
|
1128
|
+
skuIds?: string[];
|
|
1117
1129
|
/** 商品分类列表 */
|
|
1118
1130
|
productCateList?: PRODUCT_SERVICE_ENUM.PRODUCT_ENUM.CLASSIFICATION[];
|
|
1119
1131
|
/** 下单时间 {start:number,end:number} */
|
|
@@ -1671,4 +1683,19 @@ export declare namespace PosOrderQueryService {
|
|
|
1671
1683
|
getTradeSnapshot(request: Request.IGetTradeSnapshot, req: any): Promise<Response.IGetTradeSnapshot>;
|
|
1672
1684
|
}
|
|
1673
1685
|
}
|
|
1686
|
+
/** 核销事实流水 - 描述店铺粒度下的 “交易核销快照" */
|
|
1687
|
+
namespace VerificationSnapshot {
|
|
1688
|
+
namespace Request {
|
|
1689
|
+
interface IGetVerificationRecords {
|
|
1690
|
+
/** 门店ID */
|
|
1691
|
+
storeId: string;
|
|
1692
|
+
/** 开始时间 */
|
|
1693
|
+
startTime: number;
|
|
1694
|
+
/** 结束时间 */
|
|
1695
|
+
endTime: number;
|
|
1696
|
+
/** 商品ID集合 */
|
|
1697
|
+
productIds?: string[];
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1674
1701
|
}
|
|
@@ -5,6 +5,8 @@ declare class StatisticsServiceImpl extends BaseService implements StatisticsSer
|
|
|
5
5
|
forwardStatistics(request: StatisticsService.ByPos.Request.IForwardStatistics): Promise<StatisticsService.ByPos.Response.IForwardStatistics>;
|
|
6
6
|
reverseStatistics(request: StatisticsService.ByRos.Request.IReverseStatistics): Promise<StatisticsService.ByRos.Response.IReverseStatistics>;
|
|
7
7
|
orderUserStatistics(request: StatisticsService.ByUs.Request.IOrderUserStatistics): Promise<StatisticsService.ByUs.Response.IOrderUserStatistics>;
|
|
8
|
+
getProductStats(request: StatisticsService.ByProduct.Request.IGetProductStats): Promise<StatisticsService.ByProduct.Response.IGetProductStats>;
|
|
9
|
+
getSkuStatsByProduct(request: StatisticsService.ByProduct.Request.IGetSkuStatsByProduct): Promise<StatisticsService.ByProduct.Response.IGetSkuStatsByProduct>;
|
|
8
10
|
}
|
|
9
11
|
export declare const statisticsService: StatisticsServiceImpl;
|
|
10
12
|
export default statisticsService;
|
|
@@ -30,6 +30,12 @@ let StatisticsServiceImpl = class StatisticsServiceImpl extends BaseService_1.de
|
|
|
30
30
|
orderUserStatistics(request) {
|
|
31
31
|
return (0, http_1.callApi)(this.getApiUrl(this.orderUserStatistics), request);
|
|
32
32
|
}
|
|
33
|
+
getProductStats(request) {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getProductStats), request);
|
|
35
|
+
}
|
|
36
|
+
getSkuStatsByProduct(request) {
|
|
37
|
+
return (0, http_1.callApi)(this.getApiUrl(this.getSkuStatsByProduct), request);
|
|
38
|
+
}
|
|
33
39
|
};
|
|
34
40
|
__decorate([
|
|
35
41
|
(0, tsoa_1.OperationId)('正向统计接口'),
|
|
@@ -46,6 +52,16 @@ __decorate([
|
|
|
46
52
|
(0, tsoa_1.Post)('order-user-statistics'),
|
|
47
53
|
__param(0, (0, tsoa_1.Body)())
|
|
48
54
|
], StatisticsServiceImpl.prototype, "orderUserStatistics", null);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, tsoa_1.OperationId)('商品交易数据统计(按商品粒度)'),
|
|
57
|
+
(0, tsoa_1.Post)('product-stats'),
|
|
58
|
+
__param(0, (0, tsoa_1.Body)())
|
|
59
|
+
], StatisticsServiceImpl.prototype, "getProductStats", null);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, tsoa_1.OperationId)('查询指定商品下的所有 SKU 交易明细'),
|
|
62
|
+
(0, tsoa_1.Post)('sku-stats-by-product'),
|
|
63
|
+
__param(0, (0, tsoa_1.Body)())
|
|
64
|
+
], StatisticsServiceImpl.prototype, "getSkuStatsByProduct", null);
|
|
49
65
|
StatisticsServiceImpl = __decorate([
|
|
50
66
|
(0, tsoa_1.Route)('statistics'),
|
|
51
67
|
(0, tsoa_1.Tags)('Statistics')
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PRODUCT_SERVICE_ENUM } from '@be-link/ecommerce-product-service-node-sdk';
|
|
1
2
|
export declare namespace StatisticsService {
|
|
2
3
|
namespace Dto {
|
|
3
4
|
interface IPagination {
|
|
@@ -125,4 +126,83 @@ export declare namespace StatisticsService {
|
|
|
125
126
|
orderUserStatistics(request: Request.IOrderUserStatistics, req?: any): Promise<Response.IOrderUserStatistics>;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
129
|
+
namespace ByProduct {
|
|
130
|
+
namespace Request {
|
|
131
|
+
interface IGetProductStats {
|
|
132
|
+
/** 门店Id */
|
|
133
|
+
storeId: string;
|
|
134
|
+
/** 商品类别["商品分类:百货、健康、门店零售、其他生鲜、早八生鲜"] - 分佣分类 */
|
|
135
|
+
productCate?: PRODUCT_SERVICE_ENUM.PRODUCT_ENUM.CLASSIFICATION;
|
|
136
|
+
/** 开始时间 */
|
|
137
|
+
startTime: number;
|
|
138
|
+
/** 结束时间 */
|
|
139
|
+
endTime: number;
|
|
140
|
+
/** 商品ID[] */
|
|
141
|
+
productIds?: string[];
|
|
142
|
+
/** 分页参数 */
|
|
143
|
+
pagination: Dto.IPagination;
|
|
144
|
+
}
|
|
145
|
+
interface IGetSkuStatsByProduct {
|
|
146
|
+
/** 门店Id */
|
|
147
|
+
storeId: string;
|
|
148
|
+
/** 商品 ID (SPU ID) */
|
|
149
|
+
productId: string;
|
|
150
|
+
/** SKU ID[](筛选用) */
|
|
151
|
+
skuIds?: string[];
|
|
152
|
+
/** 开始时间 */
|
|
153
|
+
startTime: number;
|
|
154
|
+
/** 结束时间 */
|
|
155
|
+
endTime: number;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
namespace Response {
|
|
159
|
+
interface IProductStatItem {
|
|
160
|
+
productId: string;
|
|
161
|
+
/** 商品价格 */
|
|
162
|
+
productPrice: number;
|
|
163
|
+
/** 商品 GMV */
|
|
164
|
+
gmv: number;
|
|
165
|
+
/** 销量 */
|
|
166
|
+
salesVolume: number;
|
|
167
|
+
/** 下单人数 */
|
|
168
|
+
buyerCount: number;
|
|
169
|
+
/** 已核销单量 */
|
|
170
|
+
verifiedCount: number;
|
|
171
|
+
/** 未核销单量 */
|
|
172
|
+
unverifiedCount: number;
|
|
173
|
+
/** 退款金额 */
|
|
174
|
+
refundAmount: number;
|
|
175
|
+
}
|
|
176
|
+
interface IGetProductStats {
|
|
177
|
+
list: IProductStatItem[];
|
|
178
|
+
total: number;
|
|
179
|
+
}
|
|
180
|
+
interface ISkuStatDetailItem {
|
|
181
|
+
skuId: string;
|
|
182
|
+
/** 销量 */
|
|
183
|
+
salesVolume: number;
|
|
184
|
+
/** 已核销 */
|
|
185
|
+
verifiedCount: number;
|
|
186
|
+
/** 未核销 */
|
|
187
|
+
unverifiedCount: number;
|
|
188
|
+
/** 退货量 */
|
|
189
|
+
refundCount: number;
|
|
190
|
+
/** GMV */
|
|
191
|
+
gmv: number;
|
|
192
|
+
/** 下单人数 */
|
|
193
|
+
buyerCount: number;
|
|
194
|
+
/** 退款金额 */
|
|
195
|
+
refundAmount: number;
|
|
196
|
+
}
|
|
197
|
+
interface IGetSkuStatsByProduct {
|
|
198
|
+
list: ISkuStatDetailItem[];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
interface QueryController {
|
|
202
|
+
/** 商品交易数据统计(按商品粒度) */
|
|
203
|
+
getProductStats(request: Request.IGetProductStats, req?: any): Promise<Response.IGetProductStats>;
|
|
204
|
+
/** 查询指定商品下的所有 SKU 交易明细 */
|
|
205
|
+
getSkuStatsByProduct(request: Request.IGetSkuStatsByProduct, req?: any): Promise<Response.IGetSkuStatsByProduct>;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
128
208
|
}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -492,10 +492,6 @@ export interface ICouponInfo {
|
|
|
492
492
|
validStartTime?: number;
|
|
493
493
|
/** 有效期结束 */
|
|
494
494
|
validEndTime?: number;
|
|
495
|
-
/** 领取渠道一级 */
|
|
496
|
-
getChannel1?: string;
|
|
497
|
-
/** 领取渠道二级 */
|
|
498
|
-
getChannel2?: string;
|
|
499
495
|
}
|
|
500
496
|
/** 会员信息 */
|
|
501
497
|
export interface IMemberInfo {
|
|
@@ -547,6 +543,8 @@ export interface IPayReqParam {
|
|
|
547
543
|
description: string;
|
|
548
544
|
/** 客户端IP地址 */
|
|
549
545
|
clientIp?: string;
|
|
546
|
+
/** 支付回调相对路径(可选) */
|
|
547
|
+
relateCallbackUrl?: string;
|
|
550
548
|
/** 小程序appId */
|
|
551
549
|
appId?: string;
|
|
552
550
|
/** 微信支付方式 */
|