@be-link/pos-cli-nodejs 1.0.49 → 1.0.51-beta.0
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/.github/workflows/JMeter.yml +92 -0
- package/.husky/commit-msg +4 -0
- package/.versionrc +22 -0
- package/CHANGELOG.md +599 -0
- package/Makefile +4 -0
- package/ceshi.jmx +326 -0
- package/ci/index.ts +73 -0
- package/commitlint.config.js +3 -0
- package/dist/README.md +40 -0
- package/dist/package.json +54 -0
- package/{types.d.ts → dist/types.d.ts} +138 -16
- package/jest.config.js +194 -0
- package/package.json +13 -13
- package/src/errors/BizError.ts +10 -0
- package/src/errors/SystemError.ts +10 -0
- package/src/index.ts +33 -0
- package/src/pos/http.ts +70 -0
- package/src/pos/modules/dataMigrate/service.ts +18 -0
- package/src/pos/modules/dataMigrate/types.ts +11 -0
- package/src/pos/modules/orderCore/service.ts +80 -0
- package/src/pos/modules/orderCore/types.ts +418 -0
- package/src/pos/modules/orderFulfill/service.ts +126 -0
- package/src/pos/modules/orderFulfill/types.ts +548 -0
- package/src/pos/modules/orderJob/service.ts +87 -0
- package/src/pos/modules/orderJob/types.ts +54 -0
- package/src/pos/modules/orderNote/service.ts +29 -0
- package/src/pos/modules/orderNote/types.ts +78 -0
- package/src/pos/modules/orderQuery/commodity.ts +59 -0
- package/src/pos/modules/orderQuery/store.ts +24 -0
- package/src/pos/modules/orderQuery/supplier.ts +34 -0
- package/src/pos/modules/orderQuery/types.ts +1159 -0
- package/src/pos/modules/orderQuery/user.ts +83 -0
- package/src/pos/modules/orderQuery/web.ts +26 -0
- package/src/pos/modules/service.ts +31 -0
- package/src/types.ts +1237 -0
- package/src/utils/env.ts +14 -0
- package/src/utils/string.ts +6 -0
- package/tsconfig.json +114 -0
- package/typedoc.json +15 -0
- /package/{errors → dist/errors}/BizError.d.ts +0 -0
- /package/{errors → dist/errors}/BizError.js +0 -0
- /package/{errors → dist/errors}/SystemError.d.ts +0 -0
- /package/{errors → dist/errors}/SystemError.js +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{pos → dist/pos}/http.d.ts +0 -0
- /package/{pos → dist/pos}/http.js +0 -0
- /package/{pos → dist/pos}/modules/dataMigrate/service.d.ts +0 -0
- /package/{pos → dist/pos}/modules/dataMigrate/service.js +0 -0
- /package/{pos → dist/pos}/modules/dataMigrate/types.d.ts +0 -0
- /package/{pos → dist/pos}/modules/dataMigrate/types.js +0 -0
- /package/{pos → dist/pos}/modules/orderCore/service.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderCore/service.js +0 -0
- /package/{pos → dist/pos}/modules/orderCore/types.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderCore/types.js +0 -0
- /package/{pos → dist/pos}/modules/orderFulfill/service.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderFulfill/service.js +0 -0
- /package/{pos → dist/pos}/modules/orderFulfill/types.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderFulfill/types.js +0 -0
- /package/{pos → dist/pos}/modules/orderJob/service.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderJob/service.js +0 -0
- /package/{pos → dist/pos}/modules/orderJob/types.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderJob/types.js +0 -0
- /package/{pos → dist/pos}/modules/orderNote/service.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderNote/service.js +0 -0
- /package/{pos → dist/pos}/modules/orderNote/types.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderNote/types.js +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/commodity.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/commodity.js +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/store.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/store.js +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/supplier.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/supplier.js +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/types.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/types.js +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/user.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/user.js +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/web.d.ts +0 -0
- /package/{pos → dist/pos}/modules/orderQuery/web.js +0 -0
- /package/{pos → dist/pos}/modules/service.d.ts +0 -0
- /package/{pos → dist/pos}/modules/service.js +0 -0
- /package/{types.js → dist/types.js} +0 -0
- /package/{utils → dist/utils}/env.d.ts +0 -0
- /package/{utils → dist/utils}/env.js +0 -0
- /package/{utils → dist/utils}/string.d.ts +0 -0
- /package/{utils → dist/utils}/string.js +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Service } from './types'
|
|
2
|
+
import { callApi } from '../../http'
|
|
3
|
+
import BaseService from '../service'
|
|
4
|
+
import { IPositiveOrderInvoice } from '../../../types'
|
|
5
|
+
|
|
6
|
+
class OrderCoreService extends BaseService implements Service.OrderCoreController {
|
|
7
|
+
protected prefixUrl: string = '/core'
|
|
8
|
+
|
|
9
|
+
orderFulfill(request: Service.Request.orderFulfill): Promise<void> {
|
|
10
|
+
return callApi<Service.OrderCoreController['orderFulfill']>(this.getApiUrl(this.orderFulfill), request)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
updateOrderInvoice(request: IPositiveOrderInvoice): Promise<string> {
|
|
14
|
+
return callApi<Service.OrderCoreController['updateOrderInvoice']>(this.getApiUrl(this.updateOrderInvoice), request)
|
|
15
|
+
}
|
|
16
|
+
orderCreateInvoice(request: IPositiveOrderInvoice): Promise<IPositiveOrderInvoice> {
|
|
17
|
+
return callApi<Service.OrderCoreController['orderCreateInvoice']>(this.getApiUrl(this.orderCreateInvoice), request)
|
|
18
|
+
}
|
|
19
|
+
onRefundTrigger(request: Service.Request.onRefundTrigger): Promise<void> {
|
|
20
|
+
return callApi<Service.OrderCoreController['onRefundTrigger']>(this.getApiUrl(this.onRefundTrigger), request)
|
|
21
|
+
}
|
|
22
|
+
orderCreate(request: Service.Request.orderCreate): Promise<Service.Response.orderCreate> {
|
|
23
|
+
return callApi<Service.OrderCoreController['orderCreate']>(this.getApiUrl(this.orderCreate), request)
|
|
24
|
+
}
|
|
25
|
+
thirdOrderInfoConfirmed(request: Service.Request.thirdOrderInfoConfirmed) {
|
|
26
|
+
return callApi<Service.OrderCoreController['thirdOrderInfoConfirmed']>(this.getApiUrl(this.thirdOrderInfoConfirmed), request)
|
|
27
|
+
}
|
|
28
|
+
platformReject(request: Service.Request.platformReject) {
|
|
29
|
+
return callApi<Service.OrderCoreController['platformReject']>(this.getApiUrl(this.platformReject), request)
|
|
30
|
+
}
|
|
31
|
+
supplierRejected(request: Service.Request.supplierRejected) {
|
|
32
|
+
return callApi<Service.OrderCoreController['supplierRejected']>(this.getApiUrl(this.supplierRejected), request)
|
|
33
|
+
}
|
|
34
|
+
supplierConfirmed(request: Service.Request.supplierConfirmed) {
|
|
35
|
+
return callApi<Service.OrderCoreController['supplierConfirmed']>(this.getApiUrl(this.supplierConfirmed), request)
|
|
36
|
+
}
|
|
37
|
+
submittedToSupplier(request: Service.Request.submittedToSupplier) {
|
|
38
|
+
return callApi<Service.OrderCoreController['submittedToSupplier']>(this.getApiUrl(this.submittedToSupplier), request)
|
|
39
|
+
}
|
|
40
|
+
sendOrderPaidNotification(request: Service.Request.sendOrderPaidNotification) {
|
|
41
|
+
return callApi<Service.OrderCoreController['sendOrderPaidNotification']>(this.getApiUrl(this.sendOrderPaidNotification), request)
|
|
42
|
+
}
|
|
43
|
+
orderSettled(request: Service.Request.orderSettled): Promise<void> {
|
|
44
|
+
return callApi<Service.OrderCoreController['orderSettled']>(this.getApiUrl(this.orderSettled), request)
|
|
45
|
+
}
|
|
46
|
+
changeOrderContactInfo(request: Service.Request.changeOrderContactInfo): Promise<void> {
|
|
47
|
+
return callApi<Service.OrderCoreController['changeOrderContactInfo']>(this.getApiUrl(this.changeOrderContactInfo), request)
|
|
48
|
+
}
|
|
49
|
+
changeOrderPromotionStatus(request: Service.Request.changeOrderPromotionStatusRequest): Promise<void> {
|
|
50
|
+
return callApi<Service.OrderCoreController['changeOrderPromotionStatus']>(this.getApiUrl(this.changeOrderPromotionStatus), request)
|
|
51
|
+
}
|
|
52
|
+
rescheduleOrder(request: Service.Request.IRescheduleOrder): Promise<void> {
|
|
53
|
+
return callApi<Service.OrderCoreController['rescheduleOrder']>(this.getApiUrl(this.rescheduleOrder), request)
|
|
54
|
+
}
|
|
55
|
+
batchSubmitOrders(request: Service.Request.IBatchSubmitOrders): Promise<void> {
|
|
56
|
+
return callApi<Service.OrderCoreController['batchSubmitOrders']>(this.getApiUrl(this.batchSubmitOrders), request)
|
|
57
|
+
}
|
|
58
|
+
batchConfirmOrders(request: Service.Request.IBatchConfirmOrders): Promise<void> {
|
|
59
|
+
return callApi<Service.OrderCoreController['batchConfirmOrders']>(this.getApiUrl(this.batchConfirmOrders), request)
|
|
60
|
+
}
|
|
61
|
+
batchRejectOrders(request: Service.Request.IBatchRejectOrders): Promise<void> {
|
|
62
|
+
return callApi<Service.OrderCoreController['batchRejectOrders']>(this.getApiUrl(this.batchRejectOrders), request)
|
|
63
|
+
}
|
|
64
|
+
batchRollbackOrdersToPending(request: Service.Request.IBatchRollbackOrdersToPending): Promise<void> {
|
|
65
|
+
return callApi<Service.OrderCoreController['batchRollbackOrdersToPending']>(this.getApiUrl(this.batchRollbackOrdersToPending), request)
|
|
66
|
+
}
|
|
67
|
+
updateOrderAttribute(request: Service.Request.IUpdateOrderAttribute): Promise<void> {
|
|
68
|
+
return callApi<Service.OrderCoreController['updateOrderAttribute']>(this.getApiUrl(this.updateOrderAttribute), request)
|
|
69
|
+
}
|
|
70
|
+
orderPayFailed(request: { orderId: string }): Promise<void> {
|
|
71
|
+
return callApi<Service.OrderCoreController['orderPayFailed']>(this.getApiUrl(this.orderPayFailed), request)
|
|
72
|
+
}
|
|
73
|
+
compensateOrderPended(request: { orderId: string; isPaidCheck: boolean }): Promise<void> {
|
|
74
|
+
return callApi<Service.OrderCoreController['compensateOrderPended']>(this.getApiUrl(this.compensateOrderPended), request)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const orderCoreService = new OrderCoreService()
|
|
79
|
+
|
|
80
|
+
export default orderCoreService
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import * as PosConstants from 'vitality-meta/enums/pos'
|
|
2
|
+
import * as DTO from '../../../types'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export namespace Service {
|
|
6
|
+
export namespace Request {
|
|
7
|
+
|
|
8
|
+
export interface createOrderInvoice {
|
|
9
|
+
/** 快照:订单ID */
|
|
10
|
+
tradeOrderId?: string
|
|
11
|
+
/** 开票类型 */
|
|
12
|
+
invoiceType?: string
|
|
13
|
+
/** 发票抬头 */
|
|
14
|
+
invoiceHeader?: string
|
|
15
|
+
/** 发票抬头类型 */
|
|
16
|
+
invoiceHeaderType?: string
|
|
17
|
+
/** 税号 */
|
|
18
|
+
taxNumber?: string
|
|
19
|
+
/** address */
|
|
20
|
+
address?: string
|
|
21
|
+
/** 注册电话 */
|
|
22
|
+
mobile?: string
|
|
23
|
+
/** 开户银行 */
|
|
24
|
+
bankBase?: string
|
|
25
|
+
/** 银行账号 */
|
|
26
|
+
bankAccount?: string
|
|
27
|
+
|
|
28
|
+
/** 收货地址 */
|
|
29
|
+
receivingExtraInfo?: {
|
|
30
|
+
/** 收货地址 */
|
|
31
|
+
receivingAddress?: string
|
|
32
|
+
/** 收件人 */
|
|
33
|
+
receivingName?: string
|
|
34
|
+
/** 收件电话 */
|
|
35
|
+
receivingMobile?: string
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface orderCreate {
|
|
40
|
+
/** 基础信息 */
|
|
41
|
+
basicInfo: {
|
|
42
|
+
/** 用户id */
|
|
43
|
+
unionId: string
|
|
44
|
+
/** openId */
|
|
45
|
+
openId: string
|
|
46
|
+
/** 实际支付 */
|
|
47
|
+
actuallyPaidFee: number
|
|
48
|
+
/** 交易场景 */
|
|
49
|
+
sceneInfo: {
|
|
50
|
+
/** 场景1 */
|
|
51
|
+
scene1: string
|
|
52
|
+
/** 场景2 */
|
|
53
|
+
scene2: string
|
|
54
|
+
/** app场景 */
|
|
55
|
+
appScene: number
|
|
56
|
+
}
|
|
57
|
+
/** 用户订单备注 */
|
|
58
|
+
orderNote?: string
|
|
59
|
+
/** 来源人Id */
|
|
60
|
+
fromUnionId: string
|
|
61
|
+
/** 来源人身份 */
|
|
62
|
+
fromUserRole: string
|
|
63
|
+
/** 主单Id */
|
|
64
|
+
rootOrderId?: string
|
|
65
|
+
/** 联系人信息 */
|
|
66
|
+
contactInfo: {
|
|
67
|
+
/** 联系人姓名 */
|
|
68
|
+
name: string
|
|
69
|
+
/** 联系人手机号 */
|
|
70
|
+
mobile: string
|
|
71
|
+
/** 身份证 */
|
|
72
|
+
idCard?: string
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** 出行人信息 */
|
|
76
|
+
tourismInfo?: {
|
|
77
|
+
/** 出行人id列表 */
|
|
78
|
+
touristIdList?: string[]
|
|
79
|
+
}
|
|
80
|
+
/** 商品信息 */
|
|
81
|
+
commodityInfo: {
|
|
82
|
+
/** 商品id */
|
|
83
|
+
itemId: string
|
|
84
|
+
/** sku列表 */
|
|
85
|
+
skuList: {
|
|
86
|
+
skuId: string
|
|
87
|
+
quantity: number
|
|
88
|
+
}[]
|
|
89
|
+
}
|
|
90
|
+
/** 优惠信息 */
|
|
91
|
+
promotionInfo: {
|
|
92
|
+
/** 是否使用单品优惠券 */
|
|
93
|
+
useItemCoupon: boolean
|
|
94
|
+
/** 是否使用订单优惠券 */
|
|
95
|
+
useOrderCoupon: boolean
|
|
96
|
+
/** 是否使用会员价 */
|
|
97
|
+
useMemberPrice: boolean
|
|
98
|
+
/** 是否使用积分 */
|
|
99
|
+
useCreditCoin: boolean
|
|
100
|
+
}
|
|
101
|
+
groupBookingInfo: {
|
|
102
|
+
/** 是否是拼团子单 */
|
|
103
|
+
isGroupSubOrder: boolean
|
|
104
|
+
/** 是否是拼团主单 */
|
|
105
|
+
isGroupMainOrder: boolean
|
|
106
|
+
/** 拼团类型: 默认0, 1代表A类, 2代表B类, 依次累加 */
|
|
107
|
+
groupBookingType: number
|
|
108
|
+
}
|
|
109
|
+
/** 履约信息 */
|
|
110
|
+
fulfillInfo?: {
|
|
111
|
+
/** 房间信息 */
|
|
112
|
+
roomInfo?: {
|
|
113
|
+
/** 单床房 */
|
|
114
|
+
SINGLE_BED: {
|
|
115
|
+
/** 数量 */
|
|
116
|
+
count: number
|
|
117
|
+
},
|
|
118
|
+
/** 双床房 */
|
|
119
|
+
DOUBLE_BED: {
|
|
120
|
+
/** 数量 */
|
|
121
|
+
count: number
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
/** 自定义餐食 */
|
|
125
|
+
customMealInfo: string
|
|
126
|
+
/** 权益id */
|
|
127
|
+
rightsIds?: string[]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface thirdOrderInfoConfirmed {
|
|
132
|
+
/** 订单id */
|
|
133
|
+
tradeOrderId: string
|
|
134
|
+
/** 三方订单id */
|
|
135
|
+
thirdOrderId: string
|
|
136
|
+
/** 三方skuId */
|
|
137
|
+
thirdOrderSkuId: string
|
|
138
|
+
/** 操作人 */
|
|
139
|
+
operator: string
|
|
140
|
+
/** 操作人角色 */
|
|
141
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface platformReject {
|
|
145
|
+
/** 订单id */
|
|
146
|
+
tradeOrderId: string
|
|
147
|
+
/** 操作人 */
|
|
148
|
+
operator: string
|
|
149
|
+
/** 操作人角色 */
|
|
150
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
151
|
+
/** 拒单原因 */
|
|
152
|
+
reason: string
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface supplierRejected {
|
|
156
|
+
/** 订单id */
|
|
157
|
+
tradeOrderId: string
|
|
158
|
+
/** 操作人 */
|
|
159
|
+
operator: string
|
|
160
|
+
/** 操作人角色 */
|
|
161
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
162
|
+
/** 拒单原因 */
|
|
163
|
+
reason: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface supplierConfirmed {
|
|
167
|
+
/** 订单id */
|
|
168
|
+
tradeOrderId: string
|
|
169
|
+
/** 操作人 */
|
|
170
|
+
operator: string
|
|
171
|
+
/** 操作人角色 */
|
|
172
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface sendOrderPaidNotification {
|
|
176
|
+
/** 订单Id */
|
|
177
|
+
tradeOrderId: string
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface submittedToSupplier {
|
|
181
|
+
/** 订单Id */
|
|
182
|
+
tradeOrderId: string
|
|
183
|
+
/** 操作人 */
|
|
184
|
+
operator: string
|
|
185
|
+
/** 操作人角色 */
|
|
186
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
187
|
+
}
|
|
188
|
+
export interface orderSettled {
|
|
189
|
+
/** 订单Id */
|
|
190
|
+
tradeOrderId: string
|
|
191
|
+
/** 操作人 */
|
|
192
|
+
operator: 'SYSTEM'
|
|
193
|
+
/** 操作人角色 */
|
|
194
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface orderFulfill {
|
|
198
|
+
/** 订单Id */
|
|
199
|
+
tradeOrderId: string
|
|
200
|
+
/** 操作人 */
|
|
201
|
+
operator: 'SYSTEM'
|
|
202
|
+
/** 操作人角色 */
|
|
203
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
export interface changeOrderContactInfo {
|
|
208
|
+
/** 联系人姓名 */
|
|
209
|
+
name: string
|
|
210
|
+
/** 联系人身份证号 */
|
|
211
|
+
idCard: string
|
|
212
|
+
/** 联系人手机号 */
|
|
213
|
+
mobile: string
|
|
214
|
+
/** 订单号 */
|
|
215
|
+
tradeOrderId: string
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface onRefundTrigger {
|
|
219
|
+
refundOrderId: string
|
|
220
|
+
positiveOrderId: string
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface changeOrderPromotionStatusRequest {
|
|
224
|
+
/** 订单号 */
|
|
225
|
+
orderId: string
|
|
226
|
+
/** 优惠工具状态映射表 */
|
|
227
|
+
promotionStatusMap: {
|
|
228
|
+
[promotionId: string]: PosConstants.PromotionStatusEnum
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface IRescheduleOrder {
|
|
233
|
+
orderId: string
|
|
234
|
+
targetSkuId: string
|
|
235
|
+
operator: string
|
|
236
|
+
reasonType: string
|
|
237
|
+
reasonDesc: string
|
|
238
|
+
attachment: string[]
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface IBatchSubmitOrders {
|
|
242
|
+
/** 订单Id */
|
|
243
|
+
orderIds: string[]
|
|
244
|
+
/** 操作人 */
|
|
245
|
+
operator: string
|
|
246
|
+
/** 操作人角色 */
|
|
247
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface IBatchConfirmOrders {
|
|
251
|
+
/** 订单Id */
|
|
252
|
+
orderIds: string[]
|
|
253
|
+
/** 操作人 */
|
|
254
|
+
operator: string
|
|
255
|
+
/** 操作人角色 */
|
|
256
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface IBatchRejectOrders {
|
|
260
|
+
/** 订单Id */
|
|
261
|
+
orderIds: string[]
|
|
262
|
+
/** 操作人 */
|
|
263
|
+
operator: string
|
|
264
|
+
/** 操作人角色 */
|
|
265
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
266
|
+
/** 拒单原因 */
|
|
267
|
+
reason: string
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface IBatchRollbackOrdersToPending {
|
|
271
|
+
/** 订单Id */
|
|
272
|
+
orderIds: string[]
|
|
273
|
+
/** 操作人 */
|
|
274
|
+
operator: string
|
|
275
|
+
/** 操作人角色 */
|
|
276
|
+
operatorRole: PosConstants.TradeOperatorRoleEnum
|
|
277
|
+
/** 回滚原因 */
|
|
278
|
+
reason: string
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface IUpdateOrderAttribute {
|
|
282
|
+
/** 订单ID */
|
|
283
|
+
orderIds: string[]
|
|
284
|
+
attributes: Partial<Omit<DTO.IPositiveAttributes, 'id' | 'createdAt' | 'updatedAt'>>
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export namespace Response {
|
|
289
|
+
export interface orderCreate {
|
|
290
|
+
/** 订单Id */
|
|
291
|
+
tradeOrderId: string,
|
|
292
|
+
/** 是否是微信渠道交易 */
|
|
293
|
+
isWxChannelTrade: boolean,
|
|
294
|
+
/** 微信支付参数 */
|
|
295
|
+
wxPaymentParam: {
|
|
296
|
+
/** appId */
|
|
297
|
+
appId: string,
|
|
298
|
+
/** 支付时间戳 */
|
|
299
|
+
timeStamp: string,
|
|
300
|
+
/** 随机字符串 */
|
|
301
|
+
nonceStr: string,
|
|
302
|
+
/** 订单详情扩展字符串 */
|
|
303
|
+
package: string,
|
|
304
|
+
/** 签名类型 */
|
|
305
|
+
signType: string,
|
|
306
|
+
/** 支付签名 */
|
|
307
|
+
paySign: string
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface OrderCoreController {
|
|
313
|
+
/**
|
|
314
|
+
* 订单发票修改
|
|
315
|
+
* @path /core/update-order-invoice
|
|
316
|
+
*/
|
|
317
|
+
updateOrderInvoice(request: DTO.IPositiveOrderInvoice): Promise<string>
|
|
318
|
+
/**
|
|
319
|
+
* 订单发票创建
|
|
320
|
+
* @path /core/order-create-invoice
|
|
321
|
+
*/
|
|
322
|
+
orderCreateInvoice(request: Request.createOrderInvoice): Promise<DTO.IPositiveOrderInvoice>
|
|
323
|
+
/**
|
|
324
|
+
* 订单创建
|
|
325
|
+
* @path /core/order-create
|
|
326
|
+
*/
|
|
327
|
+
orderCreate(request: Request.orderCreate): Promise<Response.orderCreate>
|
|
328
|
+
/**
|
|
329
|
+
* 旅游非自主团接单
|
|
330
|
+
* @path /core/third-order-info-confirmed
|
|
331
|
+
*/
|
|
332
|
+
thirdOrderInfoConfirmed(request: Request.thirdOrderInfoConfirmed): Promise<void>
|
|
333
|
+
/**
|
|
334
|
+
* 旅游非自主团拒单
|
|
335
|
+
* @path /core/platform-reject
|
|
336
|
+
*/
|
|
337
|
+
platformReject(request: Request.platformReject): Promise<void>
|
|
338
|
+
/**
|
|
339
|
+
* 酒店拒单
|
|
340
|
+
* @path /core/supplier-rejected
|
|
341
|
+
*/
|
|
342
|
+
supplierRejected(request: Request.supplierRejected): Promise<void>
|
|
343
|
+
/**
|
|
344
|
+
* 供应商已接单
|
|
345
|
+
* @path /core/supplier-confirmed
|
|
346
|
+
*/
|
|
347
|
+
supplierConfirmed(request: Request.supplierConfirmed): Promise<void>
|
|
348
|
+
/**
|
|
349
|
+
* 提交给供应商
|
|
350
|
+
* @path /core/submitted-to-supplier
|
|
351
|
+
*/
|
|
352
|
+
submittedToSupplier(request: Request.submittedToSupplier): Promise<void>
|
|
353
|
+
/**
|
|
354
|
+
* 发送订单支付通知
|
|
355
|
+
* @path /core/send-order-paid-notification
|
|
356
|
+
*/
|
|
357
|
+
sendOrderPaidNotification(request: Request.sendOrderPaidNotification): Promise<void>
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* 订单完结
|
|
361
|
+
* @path /core/order-settled
|
|
362
|
+
*/
|
|
363
|
+
orderSettled(request: Request.orderSettled): Promise<void>
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* 订单履约
|
|
367
|
+
* @path /core/order-fulfill
|
|
368
|
+
*/
|
|
369
|
+
orderFulfill(request: Request.orderFulfill): Promise<void>
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* 修改联系人信息
|
|
373
|
+
* @path /core/change-order-contact-info
|
|
374
|
+
*/
|
|
375
|
+
changeOrderContactInfo(request: Request.changeOrderContactInfo): Promise<void>
|
|
376
|
+
/**
|
|
377
|
+
* 逆向触发,更新订单信息
|
|
378
|
+
* @path /core/on-refund-trigger
|
|
379
|
+
*/
|
|
380
|
+
onRefundTrigger(request: Request.onRefundTrigger): Promise<void>
|
|
381
|
+
/**
|
|
382
|
+
* 扭转订单优惠工具状态
|
|
383
|
+
*/
|
|
384
|
+
changeOrderPromotionStatus(request: Request.changeOrderPromotionStatusRequest): Promise<void>
|
|
385
|
+
/**
|
|
386
|
+
* 订单改期
|
|
387
|
+
*/
|
|
388
|
+
rescheduleOrder(request: Request.IRescheduleOrder): Promise<void>
|
|
389
|
+
/**
|
|
390
|
+
* 批量提交订单
|
|
391
|
+
*/
|
|
392
|
+
batchSubmitOrders(request: Request.IBatchSubmitOrders): Promise<void>
|
|
393
|
+
/**
|
|
394
|
+
* 批量确认单
|
|
395
|
+
*/
|
|
396
|
+
batchConfirmOrders(request: Request.IBatchConfirmOrders): Promise<void>
|
|
397
|
+
/**
|
|
398
|
+
* 批量拒单
|
|
399
|
+
*/
|
|
400
|
+
batchRejectOrders(request: Request.IBatchRejectOrders): Promise<void>
|
|
401
|
+
/**
|
|
402
|
+
* 批量回滚订单到待确认
|
|
403
|
+
*/
|
|
404
|
+
batchRollbackOrdersToPending(request: Request.IBatchRollbackOrdersToPending): Promise<void>
|
|
405
|
+
/**
|
|
406
|
+
* 订单标记属性编辑接口
|
|
407
|
+
*/
|
|
408
|
+
updateOrderAttribute(request: Request.IUpdateOrderAttribute): Promise<void>
|
|
409
|
+
/**
|
|
410
|
+
* 订单支付失败
|
|
411
|
+
*/
|
|
412
|
+
orderPayFailed(request: { orderId: string }): Promise<void>
|
|
413
|
+
/**
|
|
414
|
+
* 订单支付成功补偿接口
|
|
415
|
+
*/
|
|
416
|
+
compensateOrderPended(request: { orderId: string; isPaidCheck: boolean }): Promise<void>
|
|
417
|
+
}
|
|
418
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import BaseService from '../service'
|
|
2
|
+
import {Service} from './types'
|
|
3
|
+
import {callApi} from '../../http'
|
|
4
|
+
import * as DTO from '../../../types'
|
|
5
|
+
|
|
6
|
+
class OrderFulfillService extends BaseService implements Service.orderFulfillController {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
protected prefixUrl: string = '/fulfill'
|
|
11
|
+
fulFillChange(request: Service.Request.fulFillChange): Promise<void> {
|
|
12
|
+
return callApi<Service.orderFulfillController['fulFillChange']>(this.getApiUrl(this.fulFillChange), request)
|
|
13
|
+
}
|
|
14
|
+
mgetShuttleInfoByOrderIdList(request: Service.Request.mgetShuttleInfoByOrderIdList): Promise<Service.Response.mgetShuttleInfoByOrderIdList> {
|
|
15
|
+
return callApi<Service.orderFulfillController['mgetShuttleInfoByOrderIdList']>(this.getApiUrl(this.mgetShuttleInfoByOrderIdList), request)
|
|
16
|
+
}
|
|
17
|
+
getTourismInfoByOrderId(request: Service.Request.getTourismInfoByOrderId): Promise<DTO.ITradeTourismInfo> {
|
|
18
|
+
return callApi<Service.orderFulfillController['getTourismInfoByOrderId']>(this.getApiUrl(this.getTourismInfoByOrderId), request)
|
|
19
|
+
}
|
|
20
|
+
queryTourismInfoInOrderIdList(request: Service.Request.queryTourismInfoInOrderIdList): Promise<DTO.ITradeTourismInfo[]> {
|
|
21
|
+
return callApi<Service.orderFulfillController['queryTourismInfoInOrderIdList']>(this.getApiUrl(this.queryTourismInfoInOrderIdList), request)
|
|
22
|
+
}
|
|
23
|
+
queryOrderChangeSkuRecords(request: Service.Request.queryOrderChangeSkuRecords): Promise<Service.Response.queryOrderChangeSkuRecords> {
|
|
24
|
+
return callApi<Service.orderFulfillController['queryOrderChangeSkuRecords']>(this.getApiUrl(this.queryOrderChangeSkuRecords), request)
|
|
25
|
+
}
|
|
26
|
+
markOrderPurchaseInsurance(request: Service.Request.markOrderPurchaseInsurance): Promise<void> {
|
|
27
|
+
return callApi<Service.orderFulfillController['markOrderPurchaseInsurance']>(this.getApiUrl(this.markOrderPurchaseInsurance), request)
|
|
28
|
+
}
|
|
29
|
+
markOrderSubGroup(request: Service.Request.markOrderSubGroup): Promise<void> {
|
|
30
|
+
return callApi<Service.orderFulfillController['markOrderSubGroup']>(this.getApiUrl(this.markOrderSubGroup), request)
|
|
31
|
+
}
|
|
32
|
+
markOrderMainGroup(request: Service.Request.markOrderMainGroup): Promise<void> {
|
|
33
|
+
return callApi<Service.orderFulfillController['markOrderMainGroup']>(this.getApiUrl(this.markOrderMainGroup), request)
|
|
34
|
+
}
|
|
35
|
+
getOrderFulfillInfoByOrderId(request: Service.Request.getOrderFulfillInfoByOrderId): Promise<DTO.IPositiveFulfillmentInfo> {
|
|
36
|
+
return callApi<Service.orderFulfillController['getOrderFulfillInfoByOrderId']>(this.getApiUrl(this.getOrderFulfillInfoByOrderId), request)
|
|
37
|
+
}
|
|
38
|
+
queryOrderFulfillInfoByOrderIdList(request: Service.Request.queryOrderFulfillInfoByOrderIdList): Promise<DTO.IPositiveFulfillmentInfo[]> {
|
|
39
|
+
return callApi<Service.orderFulfillController['queryOrderFulfillInfoByOrderIdList']>(this.getApiUrl(this.queryOrderFulfillInfoByOrderIdList), request)
|
|
40
|
+
}
|
|
41
|
+
bindTouristToOrder(request: Service.Request.bindTouristToOrder): Promise<void> {
|
|
42
|
+
return callApi<Service.orderFulfillController['bindTouristToOrder']>(this.getApiUrl(this.bindTouristToOrder), request)
|
|
43
|
+
}
|
|
44
|
+
multiSendVoiceToTourist(request: Service.Request.multiSendVoiceToTourist): Promise<void> {
|
|
45
|
+
return callApi<Service.orderFulfillController['multiSendVoiceToTourist']>(this.getApiUrl(this.multiSendVoiceToTourist), request)
|
|
46
|
+
}
|
|
47
|
+
multiSendSmsToTourist(request: Service.Request.multiSendSmsToTourist): Promise<void> {
|
|
48
|
+
return callApi<Service.orderFulfillController['multiSendSmsToTourist']>(this.getApiUrl(this.multiSendSmsToTourist), request)
|
|
49
|
+
}
|
|
50
|
+
modifyOrderMealInfo(request: Service.Request.modifyOrderMealInfo): Promise<void> {
|
|
51
|
+
return callApi<Service.orderFulfillController['modifyOrderMealInfo']>(this.getApiUrl(this.modifyOrderMealInfo), request)
|
|
52
|
+
}
|
|
53
|
+
queryShuttleInfoByOrderId(request: Service.Request.queryShuttleInfoByOrderId): Promise<Service.Response.queryShuttleInfoByOrderId> {
|
|
54
|
+
return callApi<Service.orderFulfillController['queryShuttleInfoByOrderId']>(this.getApiUrl(this.queryShuttleInfoByOrderId), request)
|
|
55
|
+
}
|
|
56
|
+
batchUpsertItineraryInfo(request: Service.Request.batchUpsertItineraryInfo) {
|
|
57
|
+
return callApi<Service.orderFulfillController['batchUpsertItineraryInfo']>(this.getApiUrl(this.batchUpsertItineraryInfo), request)
|
|
58
|
+
}
|
|
59
|
+
importPreCheck(request: Service.Request.importPreCheck): Promise<Service.Response.importPreCheck> {
|
|
60
|
+
return callApi<Service.orderFulfillController['importPreCheck']>(this.getApiUrl(this.importPreCheck), request)
|
|
61
|
+
}
|
|
62
|
+
importSeatNumber(request: Service.Request.importPreCheck): Promise<void> {
|
|
63
|
+
return callApi<Service.orderFulfillController['importSeatNumber']>(this.getApiUrl(this.importSeatNumber), request)
|
|
64
|
+
}
|
|
65
|
+
queryItineraryInfoByOrderIdList(request: Service.Request.queryItineraryInfoByOrderIdList): Promise<Service.Response.queryItineraryInfoByOrderIdList> {
|
|
66
|
+
return callApi<Service.orderFulfillController['queryItineraryInfoByOrderIdList']>(this.getApiUrl(this.queryItineraryInfoByOrderIdList), request)
|
|
67
|
+
}
|
|
68
|
+
isOrderCanAddTourists(request: Service.Request.isOrderCanAddTourists): Promise<boolean> {
|
|
69
|
+
return callApi<Service.orderFulfillController['isOrderCanAddTourists']>(this.getApiUrl(this.isOrderCanAddTourists), request)
|
|
70
|
+
}
|
|
71
|
+
preCheckTourists(request: Service.Request.preCheckTourists): Promise<void> {
|
|
72
|
+
return callApi<Service.orderFulfillController['preCheckTourists']>(this.getApiUrl(this.preCheckTourists), request)
|
|
73
|
+
}
|
|
74
|
+
addShuttleInfo(request: Service.Request.addShuttleInfo): Promise<void> {
|
|
75
|
+
return callApi<Service.orderFulfillController['addShuttleInfo']>(this.getApiUrl(this.addShuttleInfo), request)
|
|
76
|
+
}
|
|
77
|
+
changeOrderSku(request: Service.Request.changeOrderSku): Promise<void> {
|
|
78
|
+
return callApi<Service.orderFulfillController['changeOrderSku']>(this.getApiUrl(this.changeOrderSku), request)
|
|
79
|
+
}
|
|
80
|
+
confirmMealInfo(request: Service.Request.confirmMealInfo): Promise<void> {
|
|
81
|
+
return callApi<Service.orderFulfillController['confirmMealInfo']>(this.getApiUrl(this.confirmMealInfo), request)
|
|
82
|
+
}
|
|
83
|
+
updateContract(request: Service.Request.updateContract): Promise<void> {
|
|
84
|
+
return callApi<Service.orderFulfillController['updateContract']>(this.getApiUrl(this.updateContract), request)
|
|
85
|
+
}
|
|
86
|
+
updateShuttleInfo(request: Service.Request.updateShuttleInfo): Promise<void> {
|
|
87
|
+
return callApi<Service.orderFulfillController['updateShuttleInfo']>(this.getApiUrl(this.updateShuttleInfo), request)
|
|
88
|
+
}
|
|
89
|
+
updateTradeOrderRoomCount(request: Service.Request.updateTradeOrderRoomCount): Promise<void> {
|
|
90
|
+
return callApi<Service.orderFulfillController['updateTradeOrderRoomCount']>(this.getApiUrl(this.updateTradeOrderRoomCount), request)
|
|
91
|
+
}
|
|
92
|
+
updateTradeOrderTouristsInfo(request: Service.Request.updateTradeOrderTouristsInfo): Promise<void> {
|
|
93
|
+
return callApi<Service.orderFulfillController['updateTradeOrderTouristsInfo']>(this.getApiUrl(this.updateTradeOrderTouristsInfo), request)
|
|
94
|
+
}
|
|
95
|
+
updateTradeOrderRightsInfo(request: Service.Request.updateTradeOrderRightsInfo): Promise<void> {
|
|
96
|
+
return callApi<Service.orderFulfillController['updateTradeOrderRightsInfo']>(this.getApiUrl(this.updateTradeOrderRightsInfo), request)
|
|
97
|
+
}
|
|
98
|
+
createScheduleNotice(request: Service.Request.createScheduleNotice) {
|
|
99
|
+
return callApi<Service.orderFulfillController['createScheduleNotice']>(this.getApiUrl(this.createScheduleNotice), request)
|
|
100
|
+
}
|
|
101
|
+
markServiceNoticeRead(request: Service.Request.markServiceNoticeRead) {
|
|
102
|
+
return callApi<Service.orderFulfillController['markServiceNoticeRead']>(this.getApiUrl(this.markServiceNoticeRead), request)
|
|
103
|
+
}
|
|
104
|
+
markItineraryRead(request: Service.Request.markItineraryRead) {
|
|
105
|
+
return callApi<Service.orderFulfillController['markItineraryRead']>(this.getApiUrl(this.markItineraryRead), request)
|
|
106
|
+
}
|
|
107
|
+
markServiceNoticeAuth(request: Service.Request.markServiceNoticeAuth) {
|
|
108
|
+
return callApi<Service.orderFulfillController['markServiceNoticeAuth']>(this.getApiUrl(this.markServiceNoticeAuth), request)
|
|
109
|
+
}
|
|
110
|
+
mgetSkuChangeCount(request: string[]): Promise<Record<string, number>> {
|
|
111
|
+
return callApi<Service.orderFulfillController['mgetSkuChangeCount']>(this.getApiUrl(this.mgetSkuChangeCount), request)
|
|
112
|
+
}
|
|
113
|
+
markOrderHasSentWXNotification(request: Service.Request.markOrderHasSentWXNotification) {
|
|
114
|
+
return callApi<Service.orderFulfillController['markOrderHasSentWXNotification']>(this.getApiUrl(this.markOrderHasSentWXNotification), request)
|
|
115
|
+
}
|
|
116
|
+
markNeedCheckShuttleBus(request: Service.Request.markNeedCheckShuttleBus): Promise<void> {
|
|
117
|
+
return callApi<Service.orderFulfillController['markNeedCheckShuttleBus']>(this.getApiUrl(this.markNeedCheckShuttleBus), request)
|
|
118
|
+
}
|
|
119
|
+
cancelNeedCheckShuttleBus(request: Service.Request.cancelNeedCheckShuttleBus): Promise<void> {
|
|
120
|
+
return callApi<Service.orderFulfillController['cancelNeedCheckShuttleBus']>(this.getApiUrl(this.cancelNeedCheckShuttleBus), request)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const orderFulfillService = new OrderFulfillService()
|
|
125
|
+
|
|
126
|
+
export default orderFulfillService
|