Commit 5336fa0f by 杨铁龙

适配接口修改

parent 214700eb
Showing with 23 additions and 11 deletions
......@@ -54,6 +54,10 @@ export interface OrderTableListItem {
RefundedAmount: number;
remarkTitle: string;
remarkContent: string;
chatTypeCode: string;
lastMsgContent: string;
lastMsgTime: string;
unreadCount: number;
}
export const orderPredict = {
......@@ -64,14 +68,17 @@ export const orderPredict = {
status: "Status_label",
remark: "Remark",
time: "CreatedDate",
createTime: "CreatedDate",
PayAmount: "PayAmount",
PaidAmount: "PaidAmount",
RefundAmount: "RefundAmount",
RefundedAmount: "RefundedAmount",
chat: "UniplatImChatId",
remarkTitle: "Title",
remarkContent: "Remark"
remarkContent: "Remark",
chatTypeCode: "UniplatChatTypeCode",
lastMsgContent: "UniplatLastMsgContent",
lastMsgTime: "UniplatLastMsgTime",
unreadCount: 0
};
export const enum PayStatus {
......
......@@ -28,7 +28,7 @@ class OrderService {
}
public openOrder(params: {
productId: string | number;
productCode: string;
srcPlatform: SrcPlatform;
createdType: OperationType;
}) {
......@@ -36,7 +36,7 @@ class OrderService {
.model(this.generalOrder)
.action("addOrder")
.addInputs_parameter({
ProductId: params.productId,
ProductCode: params.productCode,
SrcPlatform: params.srcPlatform,
CreatedType: params.createdType,
})
......@@ -59,16 +59,21 @@ class OrderService {
.execute();
}
public getOrders(index: number) {
public getOrders(productId: number, index: number, size = 100) {
return this.getSdk()
.model(this.generalOrder)
.list("userOrderList")
.query({ item_size: 100, pageIndex: index })
.then((r) =>
this.handler.buildRows<OrderTableListItem>(
r.pageData.rows,
orderPredict
)
.addPrefilter({ ProductId: productId })
.query({ item_size: size, pageIndex: index })
.then((r) => {
return {
total: r.pageData.record_count,
list: this.handler.buildRows<OrderTableListItem>(
r.pageData.rows,
orderPredict
)
}
}
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment