Commit 37d28d6c by Sixong.Zhu

u

parent b3433377
Showing with 14 additions and 4 deletions
...@@ -64,15 +64,18 @@ class OrderService { ...@@ -64,15 +64,18 @@ class OrderService {
} }
public getOrders(params: { public getOrders(params: {
productId?: number; index: number; size?: number productId?: number;
index: number;
size?: number;
}) { }) {
const list = this.getSdk() const list = this.getSdk()
.model(this.generalOrder) .model(this.generalOrder)
.list("userOrderList") .list("userOrderList");
if (params.productId) { if (params.productId) {
list.addPrefilter({ ProductId: params.productId }) list.addPrefilter({ ProductId: params.productId });
} }
return list.query({ item_size: params.size || 100, pageIndex: params.index }) return list
.query({ item_size: params.size || 100, pageIndex: params.index })
.then((r) => { .then((r) => {
return { return {
total: r.pageData.record_count, total: r.pageData.record_count,
...@@ -168,6 +171,13 @@ class OrderService { ...@@ -168,6 +171,13 @@ class OrderService {
.addInputs_parameter(data) .addInputs_parameter(data)
.execute(); .execute();
} }
public getOrderDetail(id: number | string) {
return this.getSdk()
.model(this.generalOrder)
.detail(id as string)
.query();
}
} }
export const orderService = new OrderService(); export const orderService = new OrderService();
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