Commit 6bf59166 by 杨铁龙

合并支付记录interface

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