docs(order.entity): 更新total字段的ApiProperty描述 #62
|
|
@ -1479,7 +1479,7 @@ export class OrderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
let itemSql = `
|
let itemSql = `
|
||||||
SELECT os.productId, os.name, SUM(os.quantity) AS totalQuantity, COUNT(DISTINCT os.orderId) AS totalOrders
|
SELECT os.productId, os.name, os.sku, SUM(os.quantity) AS totalQuantity, COUNT(DISTINCT os.orderId) AS totalOrders
|
||||||
FROM order_sale os
|
FROM order_sale os
|
||||||
INNER JOIN \`order\` o ON o.id = os.orderId
|
INNER JOIN \`order\` o ON o.id = os.orderId
|
||||||
WHERE o.date_paid BETWEEN ? AND ?
|
WHERE o.date_paid BETWEEN ? AND ?
|
||||||
|
|
@ -1501,7 +1501,7 @@ export class OrderService {
|
||||||
}
|
}
|
||||||
itemSql += nameCondition;
|
itemSql += nameCondition;
|
||||||
itemSql += `
|
itemSql += `
|
||||||
GROUP BY os.productId, os.name
|
GROUP BY os.productId, os.name, os.sku
|
||||||
ORDER BY totalQuantity DESC
|
ORDER BY totalQuantity DESC
|
||||||
LIMIT ? OFFSET ?
|
LIMIT ? OFFSET ?
|
||||||
`;
|
`;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue