Commit 9ee32e50 by 杨铁龙

更改getOrders

parent d6a7d544
Showing with 8 additions and 4 deletions
......@@ -63,12 +63,16 @@ class OrderService {
.execute();
}
public getOrders(productId: number, index: number, size = 100) {
return this.getSdk()
public getOrders(params: {
productId?: number; index: number; size?: number
}) {
const list = this.getSdk()
.model(this.generalOrder)
.list("userOrderList")
.addPrefilter({ ProductId: productId })
.query({ item_size: size, pageIndex: index })
if (params.productId) {
list.addPrefilter({ ProductId: params.productId })
}
return list.query({ item_size: params.size || 100, pageIndex: params.index })
.then((r) => {
return {
total: r.pageData.record_count,
......
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