@be-link/pos-cli-nodejs 1.0.60 → 1.0.61
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/package.json
CHANGED
|
@@ -30,6 +30,7 @@ declare class OrderCoreService extends BaseService implements Service.OrderCoreC
|
|
|
30
30
|
orderId: string;
|
|
31
31
|
isPaidCheck: boolean;
|
|
32
32
|
}): Promise<void>;
|
|
33
|
+
orderCreateV2(request: Service.Request.orderCreateV2): Promise<Service.Response.orderCreateV2>;
|
|
33
34
|
}
|
|
34
35
|
declare const orderCoreService: OrderCoreService;
|
|
35
36
|
export default orderCoreService;
|
|
@@ -76,6 +76,9 @@ class OrderCoreService extends service_1.default {
|
|
|
76
76
|
compensateOrderPended(request) {
|
|
77
77
|
return (0, http_1.callApi)(this.getApiUrl(this.compensateOrderPended), request);
|
|
78
78
|
}
|
|
79
|
+
orderCreateV2(request) {
|
|
80
|
+
return (0, http_1.callApi)(this.getApiUrl(this.orderCreateV2), request);
|
|
81
|
+
}
|
|
79
82
|
}
|
|
80
83
|
const orderCoreService = new OrderCoreService();
|
|
81
84
|
exports.default = orderCoreService;
|
|
@@ -122,6 +122,111 @@ export declare namespace Service {
|
|
|
122
122
|
rightsIds?: string[];
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
+
interface orderCreateV2 {
|
|
126
|
+
/** 基础信息 */
|
|
127
|
+
basicInfo: {
|
|
128
|
+
/** 用户id */
|
|
129
|
+
unionId: string;
|
|
130
|
+
/** 实际支付 */
|
|
131
|
+
actuallyPaidFee: number;
|
|
132
|
+
/** 交易场景 */
|
|
133
|
+
sceneInfo: {
|
|
134
|
+
/** 场景1 */
|
|
135
|
+
scene1: string;
|
|
136
|
+
/** 场景2 */
|
|
137
|
+
scene2: string;
|
|
138
|
+
/** app场景 */
|
|
139
|
+
appScene: number;
|
|
140
|
+
};
|
|
141
|
+
/** 用户openId */
|
|
142
|
+
openId: string;
|
|
143
|
+
/** 用户订单备注 */
|
|
144
|
+
orderNote: string;
|
|
145
|
+
/** 来源人Id */
|
|
146
|
+
fromUnionId: string;
|
|
147
|
+
/** 来源人身份 */
|
|
148
|
+
fromUserRole: string;
|
|
149
|
+
/** 主单Id */
|
|
150
|
+
rootOrderId: string;
|
|
151
|
+
/** 联系人 */
|
|
152
|
+
contactInfo: {
|
|
153
|
+
/** 联系人姓名 */
|
|
154
|
+
name: string;
|
|
155
|
+
/** 联系人手机号 */
|
|
156
|
+
mobile: string;
|
|
157
|
+
/** 身份证号 */
|
|
158
|
+
idCard?: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
/** 出行人信息 */
|
|
162
|
+
tourismInfo: {
|
|
163
|
+
/** 出行人id列表 */
|
|
164
|
+
touristIdList: string[];
|
|
165
|
+
};
|
|
166
|
+
/** 商品信息 */
|
|
167
|
+
itemInfo: {
|
|
168
|
+
/** 商品ID */
|
|
169
|
+
id: string;
|
|
170
|
+
/** 商品二级分类 */
|
|
171
|
+
categoryTwo: string;
|
|
172
|
+
/** 套餐信息 */
|
|
173
|
+
combos: {
|
|
174
|
+
/** 套餐ID */
|
|
175
|
+
id: string;
|
|
176
|
+
/** SKU ID列表 */
|
|
177
|
+
skus: string[];
|
|
178
|
+
/** SKU购买份数 */
|
|
179
|
+
quantity: number;
|
|
180
|
+
/** 快捷套餐ID */
|
|
181
|
+
comboShortcutId?: string;
|
|
182
|
+
}[];
|
|
183
|
+
};
|
|
184
|
+
/** 班车信息 */
|
|
185
|
+
shuttleBusInfo: {
|
|
186
|
+
/** 关系id */
|
|
187
|
+
relationId: string;
|
|
188
|
+
/** 班车类型 */
|
|
189
|
+
quantity: number;
|
|
190
|
+
};
|
|
191
|
+
/** 优惠开关 */
|
|
192
|
+
switches: {
|
|
193
|
+
/** 是否使用单品券 */
|
|
194
|
+
useItemCoupon?: boolean;
|
|
195
|
+
/** 是否使用订单券 */
|
|
196
|
+
useOrderCoupon?: boolean;
|
|
197
|
+
/** 是否使用金币抵扣 */
|
|
198
|
+
useCreditCoin?: boolean;
|
|
199
|
+
/** 是否使用会员价 */
|
|
200
|
+
useMemberPrice?: boolean;
|
|
201
|
+
/** 是否使用连住优惠 */
|
|
202
|
+
useStayMoreSaveMoreActivity?: boolean;
|
|
203
|
+
};
|
|
204
|
+
/** 房型信息 */
|
|
205
|
+
roomInfo?: {
|
|
206
|
+
/** 房型ID */
|
|
207
|
+
roomId: string;
|
|
208
|
+
/** 份数 */
|
|
209
|
+
quantity: number;
|
|
210
|
+
}[];
|
|
211
|
+
/** 履约信息 */
|
|
212
|
+
fulfillInfo?: {
|
|
213
|
+
/** 生日蛋糕券码 */
|
|
214
|
+
cakeCouponCode?: string;
|
|
215
|
+
/** 权益id */
|
|
216
|
+
rightsIds?: string[];
|
|
217
|
+
};
|
|
218
|
+
/** 订单备注 */
|
|
219
|
+
orderNote?: string;
|
|
220
|
+
/** 拼团信息 */
|
|
221
|
+
groupBookingInfo?: {
|
|
222
|
+
/** 是否是拼团子单 */
|
|
223
|
+
isGroupSubOrder: boolean;
|
|
224
|
+
/** 是否是拼团主单 */
|
|
225
|
+
isGroupMainOrder: boolean;
|
|
226
|
+
/** 拼团类型: 默认0, 1代表A类, 2代表B类, 依次累加 */
|
|
227
|
+
groupBookingType: number;
|
|
228
|
+
};
|
|
229
|
+
}
|
|
125
230
|
interface thirdOrderInfoConfirmed {
|
|
126
231
|
/** 订单id */
|
|
127
232
|
tradeOrderId: string;
|
|
@@ -284,6 +389,26 @@ export declare namespace Service {
|
|
|
284
389
|
paySign: string;
|
|
285
390
|
};
|
|
286
391
|
}
|
|
392
|
+
interface orderCreateV2 {
|
|
393
|
+
orderId: string;
|
|
394
|
+
/** 是否是微信渠道交易 */
|
|
395
|
+
isWxChannelTrade: boolean;
|
|
396
|
+
/** 微信支付参数 */
|
|
397
|
+
wxPaymentParam: {
|
|
398
|
+
/** appId */
|
|
399
|
+
appId: string;
|
|
400
|
+
/** 支付时间戳 */
|
|
401
|
+
timeStamp: string;
|
|
402
|
+
/** 随机字符串 */
|
|
403
|
+
nonceStr: string;
|
|
404
|
+
/** 订单详情扩展字符串 */
|
|
405
|
+
package: string;
|
|
406
|
+
/** 签名类型 */
|
|
407
|
+
signType: string;
|
|
408
|
+
/** 支付签名 */
|
|
409
|
+
paySign: string;
|
|
410
|
+
};
|
|
411
|
+
}
|
|
287
412
|
}
|
|
288
413
|
interface OrderCoreController {
|
|
289
414
|
/**
|
|
@@ -392,5 +517,7 @@ export declare namespace Service {
|
|
|
392
517
|
orderId: string;
|
|
393
518
|
isPaidCheck: boolean;
|
|
394
519
|
}): Promise<void>;
|
|
520
|
+
/** 创建订单 */
|
|
521
|
+
orderCreateV2(request: Request.orderCreateV2): Promise<Response.orderCreateV2>;
|
|
395
522
|
}
|
|
396
523
|
}
|
package/types.d.ts
CHANGED
|
@@ -453,9 +453,6 @@ export interface IPositiveShuttleBusSkuInfo {
|
|
|
453
453
|
departureDate: number;
|
|
454
454
|
relationInfo: {
|
|
455
455
|
id: string;
|
|
456
|
-
createdAt: number;
|
|
457
|
-
updatedAt: number;
|
|
458
|
-
deletedAt: number;
|
|
459
456
|
itemId: string;
|
|
460
457
|
supplierId: string;
|
|
461
458
|
routeId: string;
|
|
@@ -464,7 +461,7 @@ export interface IPositiveShuttleBusSkuInfo {
|
|
|
464
461
|
settlementPrice: number;
|
|
465
462
|
saleDesc: string;
|
|
466
463
|
minOrderCount: number;
|
|
467
|
-
isLimitStock:
|
|
464
|
+
isLimitStock: boolean;
|
|
468
465
|
pickUpTime: string;
|
|
469
466
|
};
|
|
470
467
|
type: PosConstants.SkuTypeEnum;
|
|
@@ -477,7 +474,9 @@ export type IPositiveOrderComboInfo = {
|
|
|
477
474
|
id: string;
|
|
478
475
|
createdAt: number;
|
|
479
476
|
updatedAt: number;
|
|
477
|
+
deletedAt: number;
|
|
480
478
|
orderId: string;
|
|
479
|
+
itemId: string;
|
|
481
480
|
comboInfo: CSDto.IItemCombo & {
|
|
482
481
|
nightNum: number;
|
|
483
482
|
} | CSDto.IItemComboShortcut;
|
|
@@ -556,6 +555,7 @@ export interface IPositiveRoomInfo {
|
|
|
556
555
|
orderId: string;
|
|
557
556
|
roomInfo: ServiceVenueDto.ServiceVenue.Response.IGetRoomTypeInfoRes;
|
|
558
557
|
roomId: string;
|
|
558
|
+
venueId: string;
|
|
559
559
|
}
|
|
560
560
|
export interface IPositiveVenueInfo {
|
|
561
561
|
id: string;
|
|
@@ -727,19 +727,13 @@ export interface IPositiveFulfillmentInfo {
|
|
|
727
727
|
/** 订单 ID */
|
|
728
728
|
positiveOrderId: string;
|
|
729
729
|
/** 房间信息。 */
|
|
730
|
-
roomInfo: {
|
|
731
|
-
/**
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
SINGLE_BED: {
|
|
738
|
-
count: number;
|
|
739
|
-
remain: number;
|
|
740
|
-
};
|
|
741
|
-
};
|
|
742
|
-
/** 定制餐食信息。 */
|
|
730
|
+
roomInfo: Record<string, {
|
|
731
|
+
/** 房间单人床数量 */
|
|
732
|
+
count: number;
|
|
733
|
+
/** 房间剩余数量 */
|
|
734
|
+
remain: number;
|
|
735
|
+
}>;
|
|
736
|
+
/** 定制餐食信息 */
|
|
743
737
|
customMealInfo: string;
|
|
744
738
|
/** 权益信息 */
|
|
745
739
|
rightsInfo: string[];
|
|
@@ -954,10 +948,10 @@ export interface IRawOrderStructure {
|
|
|
954
948
|
skus: IPositiveSkuInfo[];
|
|
955
949
|
storeInfo?: IStore;
|
|
956
950
|
})[];
|
|
957
|
-
itemInfo?: IPositiveItemInfoV2;
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
951
|
+
itemInfo?: IPositiveItemInfoV2[];
|
|
952
|
+
skuInfo?: (IPositiveSkuInfoV2 | IPositiveShuttleBusSkuInfo)[];
|
|
953
|
+
comboInfo?: IPositiveOrderComboInfo[];
|
|
954
|
+
roomInfo?: IPositiveRoomInfo[];
|
|
961
955
|
venueInfo?: IPositiveVenueInfo[];
|
|
962
956
|
feeDetailInfo?: IPositiveFeeDetailInfo[];
|
|
963
957
|
paymentInfo?: IPositivePaymentInfo[];
|
|
@@ -8,6 +8,8 @@ export declare abstract class SkuInfoProxy {
|
|
|
8
8
|
abstract get memberPriceLimitTimes(): number | undefined;
|
|
9
9
|
abstract get settlementPrice(): number;
|
|
10
10
|
abstract get quantity(): number;
|
|
11
|
+
abstract get remainQuantity(): number;
|
|
12
|
+
/** @deprecated 请使用 `remainQuantity` 代替 */
|
|
11
13
|
abstract get remainingQuantity(): number;
|
|
12
14
|
abstract get departureDate(): number;
|
|
13
15
|
abstract get type(): SkuTypeEnum;
|
|
@@ -28,6 +30,7 @@ declare class SkuInfoProxyV1 extends SkuInfoProxy {
|
|
|
28
30
|
get memberPriceLimitTimes(): number | undefined;
|
|
29
31
|
get settlementPrice(): number;
|
|
30
32
|
get quantity(): number;
|
|
33
|
+
get remainQuantity(): number;
|
|
31
34
|
get remainingQuantity(): number;
|
|
32
35
|
get departureDate(): number;
|
|
33
36
|
get costDays(): number | undefined;
|
|
@@ -49,6 +52,7 @@ declare class SkuInfoProxyV2 extends SkuInfoProxy {
|
|
|
49
52
|
get memberPriceLimitTimes(): number;
|
|
50
53
|
get settlementPrice(): number;
|
|
51
54
|
get quantity(): number;
|
|
55
|
+
get remainQuantity(): number;
|
|
52
56
|
get remainingQuantity(): number;
|
|
53
57
|
get departureDate(): number;
|
|
54
58
|
get type(): SkuTypeEnum;
|
|
@@ -69,6 +73,7 @@ declare class ShuttleBusSkuInfoProxyV2 extends SkuInfoProxy {
|
|
|
69
73
|
get memberPriceLimitTimes(): undefined;
|
|
70
74
|
get settlementPrice(): number;
|
|
71
75
|
get quantity(): number;
|
|
76
|
+
get remainQuantity(): number;
|
|
72
77
|
get remainingQuantity(): number;
|
|
73
78
|
get departureDate(): number;
|
|
74
79
|
get type(): SkuTypeEnum;
|
|
@@ -20,6 +20,7 @@ class SkuInfoProxyV1 extends SkuInfoProxy {
|
|
|
20
20
|
get memberPriceLimitTimes() { return this.orderSkuInfo.memberPriceLimitTimes; }
|
|
21
21
|
get settlementPrice() { return this.orderSkuInfo.settlementPrice; }
|
|
22
22
|
get quantity() { return this.orderSkuInfo.quantity; }
|
|
23
|
+
get remainQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
23
24
|
get remainingQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
24
25
|
get departureDate() { return this.orderSkuInfo.departureDate; }
|
|
25
26
|
get costDays() { return this.orderSkuInfo.costDays; }
|
|
@@ -46,6 +47,7 @@ class SkuInfoProxyV2 extends SkuInfoProxy {
|
|
|
46
47
|
get memberPriceLimitTimes() { return this.orderSkuInfo.memberPriceLimitCnt; }
|
|
47
48
|
get settlementPrice() { return this.orderSkuInfo.settlementPrice; }
|
|
48
49
|
get quantity() { return this.orderSkuInfo.quantity; }
|
|
50
|
+
get remainQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
49
51
|
get remainingQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
50
52
|
get departureDate() { return this.orderSkuInfo.departureDate; }
|
|
51
53
|
get type() { return this.orderSkuInfo.type; }
|
|
@@ -71,6 +73,7 @@ class ShuttleBusSkuInfoProxyV2 extends SkuInfoProxy {
|
|
|
71
73
|
get memberPriceLimitTimes() { return undefined; }
|
|
72
74
|
get settlementPrice() { return this.orderSkuInfo.relationInfo.settlementPrice; }
|
|
73
75
|
get quantity() { return this.orderSkuInfo.quantity; }
|
|
76
|
+
get remainQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
74
77
|
get remainingQuantity() { return this.orderSkuInfo.remainQuantity; }
|
|
75
78
|
get departureDate() { return this.orderSkuInfo.departureDate; }
|
|
76
79
|
get type() { return this.orderSkuInfo.type; }
|