我想列出所有包含有折扣的产品的订单,这样我就可以根据有折扣的订单生成一个报告,并获得订单编号、订购日期、订单状态、订单总数、用户名、电子邮件和电话。
每一批有折扣产品的订单
就像这样
if (order_had_product_with_discount) {
get the [ order number, order date, order status, order total, user name, email and phone ] of this order
}
这不是有效的代码,但我需要知道从哪里开始。