@be-link/ecommerce-trade-service-node-sdk 0.1.135 → 0.1.137

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.
@@ -6,4 +6,5 @@ export { memberRosOrderCoreByJobService } from './ros/orderCore/jobService';
6
6
  export { MemberRosOrderCoreService as MemberRosOrderCoreTypes } from './ros/orderCore/types';
7
7
  export { memberOrderQueryByUserService } from './pos/orderQuery/userService';
8
8
  export { memberOrderQueryByWebService } from './pos/orderQuery/webService';
9
+ export { memberOrderQueryByInternalService } from './pos/orderQuery/internalService';
9
10
  export { MemberOrderQueryService as MemberOrderQueryTypes } from './pos/orderQuery/types';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.memberOrderQueryByWebService = exports.memberOrderQueryByUserService = exports.memberRosOrderCoreByJobService = exports.memberRosOrderCoreByWebService = exports.memberOrderCoreByJobService = exports.memberOrderCoreByUserService = void 0;
3
+ exports.memberOrderQueryByInternalService = exports.memberOrderQueryByWebService = exports.memberOrderQueryByUserService = exports.memberRosOrderCoreByJobService = exports.memberRosOrderCoreByWebService = exports.memberOrderCoreByJobService = exports.memberOrderCoreByUserService = void 0;
4
4
  var userService_1 = require("./pos/orderCore/userService");
5
5
  Object.defineProperty(exports, "memberOrderCoreByUserService", { enumerable: true, get: function () { return userService_1.memberOrderCoreByUserService; } });
6
6
  var jobService_1 = require("./pos/orderCore/jobService");
@@ -13,3 +13,5 @@ var userService_2 = require("./pos/orderQuery/userService");
13
13
  Object.defineProperty(exports, "memberOrderQueryByUserService", { enumerable: true, get: function () { return userService_2.memberOrderQueryByUserService; } });
14
14
  var webService_2 = require("./pos/orderQuery/webService");
15
15
  Object.defineProperty(exports, "memberOrderQueryByWebService", { enumerable: true, get: function () { return webService_2.memberOrderQueryByWebService; } });
16
+ var internalService_1 = require("./pos/orderQuery/internalService");
17
+ Object.defineProperty(exports, "memberOrderQueryByInternalService", { enumerable: true, get: function () { return internalService_1.memberOrderQueryByInternalService; } });
@@ -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: any, req: any): Promise<void>;
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
  }
@@ -0,0 +1,12 @@
1
+ import { MemberOrderQueryService } from './types';
2
+ import BaseService from '../../../BaseService';
3
+ declare class MemberOrderQueryByInternalService extends BaseService implements MemberOrderQueryService.ByInternal.QueryController {
4
+ protected prefixUrl: string;
5
+ /**
6
+ * 根据直播间ID统计会员订单数(内部接口)
7
+ * 统计口径:支付状态=SUCCESS 且 退款状态!=CLOSED
8
+ */
9
+ countLiveRoomPaidOrders(request: MemberOrderQueryService.ByInternal.Request.ICountLiveRoomPaidOrders): Promise<MemberOrderQueryService.ByInternal.Response.ICountLiveRoomPaidOrders>;
10
+ }
11
+ export declare const memberOrderQueryByInternalService: MemberOrderQueryByInternalService;
12
+ export default memberOrderQueryByInternalService;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
9
+ return function (target, key) { decorator(target, key, paramIndex); }
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.memberOrderQueryByInternalService = void 0;
16
+ const tsoa_1 = require("tsoa");
17
+ const http_1 = require("../../../../utils/http");
18
+ const BaseService_1 = __importDefault(require("../../../BaseService"));
19
+ let MemberOrderQueryByInternalService = class MemberOrderQueryByInternalService extends BaseService_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.prefixUrl = '/member/pos/query/internal';
23
+ }
24
+ /**
25
+ * 根据直播间ID统计会员订单数(内部接口)
26
+ * 统计口径:支付状态=SUCCESS 且 退款状态!=CLOSED
27
+ */
28
+ countLiveRoomPaidOrders(request) {
29
+ return (0, http_1.callApi)(this.getApiUrl(this.countLiveRoomPaidOrders), request);
30
+ }
31
+ };
32
+ __decorate([
33
+ (0, tsoa_1.OperationId)('根据直播间ID统计会员有效支付订单数'),
34
+ (0, tsoa_1.Post)('count-live-room-paid-orders'),
35
+ __param(0, (0, tsoa_1.Body)())
36
+ ], MemberOrderQueryByInternalService.prototype, "countLiveRoomPaidOrders", null);
37
+ MemberOrderQueryByInternalService = __decorate([
38
+ (0, tsoa_1.Route)('member/pos/query/internal'),
39
+ (0, tsoa_1.Tags)('MemberOrderQuery')
40
+ ], MemberOrderQueryByInternalService);
41
+ exports.memberOrderQueryByInternalService = new MemberOrderQueryByInternalService();
42
+ exports.default = exports.memberOrderQueryByInternalService;
@@ -267,4 +267,30 @@ export declare namespace MemberOrderQueryService {
267
267
  myDetail(request: Request.IMyDetail, req: any): Promise<Response.IMyDetail>;
268
268
  }
269
269
  }
270
+ namespace ByInternal {
271
+ /** 内部服务查询参数 */
272
+ namespace Request {
273
+ interface ICountLiveRoomPaidOrders {
274
+ /** 直播间ID */
275
+ liveRoomId: string;
276
+ }
277
+ }
278
+ /** 内部服务返回参数 */
279
+ namespace Response {
280
+ interface ICountLiveRoomPaidOrders {
281
+ /**
282
+ * 订单数
283
+ * 口径:支付状态=SUCCESS 且 退款状态!=CLOSED
284
+ */
285
+ count: number;
286
+ }
287
+ }
288
+ interface QueryController {
289
+ /**
290
+ * 根据直播间ID统计会员订单数(内部接口)
291
+ * 统计口径:支付状态=SUCCESS 且 退款状态!=CLOSED
292
+ */
293
+ countLiveRoomPaidOrders(request: Request.ICountLiveRoomPaidOrders, req: any): Promise<Response.ICountLiveRoomPaidOrders>;
294
+ }
295
+ }
270
296
  }
@@ -171,8 +171,6 @@ export declare namespace PosCoreService {
171
171
  coupon: Dto.ICoupon;
172
172
  userId: string;
173
173
  skuId: string;
174
- getChannel1?: string;
175
- getChannel2?: string;
176
174
  }
177
175
  /** 切换支付商户号请求参数 */
178
176
  interface ISwitchPaymentMerchantNo {
@@ -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,81 @@ 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
+ interface IGetSkuStatsByProduct {
144
+ /** 门店Id */
145
+ storeId: string;
146
+ /** 商品 ID (SPU ID) */
147
+ productId: string;
148
+ /** SKU ID[](筛选用) */
149
+ skuIds?: string[];
150
+ /** 开始时间 */
151
+ startTime: number;
152
+ /** 结束时间 */
153
+ endTime: number;
154
+ }
155
+ }
156
+ namespace Response {
157
+ interface IProductStatItem {
158
+ productId: string;
159
+ /** 商品价格 */
160
+ productPrice: number;
161
+ /** 商品 GMV */
162
+ gmv: number;
163
+ /** 销量 */
164
+ salesVolume: number;
165
+ /** 下单人数 */
166
+ buyerCount: number;
167
+ /** 已核销单量 */
168
+ verifiedCount: number;
169
+ /** 未核销单量 */
170
+ unverifiedCount: number;
171
+ /** 退款金额 */
172
+ refundAmount: number;
173
+ }
174
+ interface IGetProductStats {
175
+ list: IProductStatItem[];
176
+ total: number;
177
+ }
178
+ interface ISkuStatDetailItem {
179
+ skuId: string;
180
+ /** 销量 */
181
+ salesVolume: number;
182
+ /** 已核销 */
183
+ verifiedCount: number;
184
+ /** 未核销 */
185
+ unverifiedCount: number;
186
+ /** 退货量 */
187
+ refundCount: number;
188
+ /** GMV */
189
+ gmv: number;
190
+ /** 下单人数 */
191
+ buyerCount: number;
192
+ /** 退款金额 */
193
+ refundAmount: number;
194
+ }
195
+ interface IGetSkuStatsByProduct {
196
+ list: ISkuStatDetailItem[];
197
+ }
198
+ }
199
+ interface QueryController {
200
+ /** 商品交易数据统计(按商品粒度) */
201
+ getProductStats(request: Request.IGetProductStats, req?: any): Promise<Response.IGetProductStats>;
202
+ /** 查询指定商品下的所有 SKU 交易明细 */
203
+ getSkuStatsByProduct(request: Request.IGetSkuStatsByProduct, req?: any): Promise<Response.IGetSkuStatsByProduct>;
204
+ }
205
+ }
128
206
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-trade-service-node-sdk",
3
- "version": "0.1.135",
3
+ "version": "0.1.137",
4
4
  "description": "EcommerceTradeService Node.js SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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
  /** 微信支付方式 */