Commit 6bf59166 by 杨铁龙

合并支付记录interface

parent 515362e6
Showing with 26 additions and 41 deletions
......@@ -101,12 +101,33 @@ export const payMethodMapping = new Map<PayMethod, string>([
export interface OrderPayItem {
id: number;
v: number;
title: string;
time?: string;
deadLine?: string;
dueTime: string;
value: number;
status: PayStatus;
method: PayMethod;
method_label: string;
type: string;
desc: string;
agent: string;
}
export const orderPayItemPredict = {
status: "Status",
time: "PaymentDate",
dueTime: "PaymentDueDate",
method: "PaymentFunction_label",
type: "ItemName",
desc: "PaymentDesc",
agent: "ProviderCollectId#provider_agent.AgentTrueName",
id: "ID",
v: "uniplat_version",
title: "ItemName",
deadLine: "PaymentDueDate",
value: "Amount",
}
export const enum ChatOpenDirection {
......@@ -133,19 +154,6 @@ export const enum OperationType {
Backend,
}
export interface PaymentDetail {
status: PayStatus;
time: string;
dueTime: string;
method: PayMethod;
method_label: string;
type: string;
desc: string;
agent: string;
id: number;
v: number;
}
export interface UploadImageItem {
url: string;
fileName: string;
......
......@@ -7,8 +7,8 @@ import {
orderPredict,
SrcPlatform,
OrderPayItem,
PaymentDetail,
UploadImageItem,
orderPayItemPredict,
} from "../model";
class OrderService {
......@@ -78,23 +78,10 @@ class OrderService {
.list()
.addPrefilter({ OrderId: id })
.query({ pageIndex: 1, item_size: 100 })
.then((r) => {
if (r && r.pageData && r.pageData.rows) {
return this.handler.buildRows<OrderPayItem>(
.then((r) => this.handler.buildRows<OrderPayItem>(
r.pageData.rows,
{
status: "Status",
id: "ID",
title: "ItemName",
time: "PaymentDate",
deadLine: "PaymentDueDate",
value: "Amount",
method: "PaymentFunction",
}
);
}
return [];
});
orderPayItemPredict
));
}
public getPayment(id: string | number) {
......@@ -103,17 +90,7 @@ class OrderService {
.detail(id as string, "userOrderPaymentDetail")
.query()
.then((r) =>
this.handler.buildRow<PaymentDetail>(r.row, {
status: "Status",
time: "PaymentDate",
dueTime: "PaymentDueDate",
method: "PaymentFunction_label",
type: "ItemName",
desc: "PaymentDesc",
agent: "ProviderCollectId#provider_agent.AgentTrueName",
id: "ID",
v: "uniplat_version",
})
this.handler.buildRow<OrderPayItem>(r.row, orderPayItemPredict)
);
}
......
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