我在哪里可以找到此问题的答案,如何关闭与供应商的订单通知,让管理员仅收到每笔订单的通知,谢谢您
答案 0 :(得分:0)
SELECT `order`.`id`,
`order`.`quantity`,
`order`.`createdAt`,
`order`.`updatedAt`,
`order`.`userId`,
`products`.`id` AS `products.id`,
`products`.`title` AS `products.title`,
`products`.`price` AS `products.price`,
`products`.`imageUrl` AS `products.imageUrl`,
`products`.`description` AS `products.description`,
`products`.`createdAt` AS `products.createdAt`,
`products`.`updatedAt` AS `products.updatedAt`,
`products`.`userId` AS `products.userId`,
`products->orderItem`.`id` AS `products.orderItem.id`,
`products->orderItem`.`quantity` AS `products.orderItem.quantity`,
`products->orderItem`.`createdAt` AS `products.orderItem.createdAt`,
`products->orderItem`.`updatedAt` AS `products.orderItem.updatedAt`,
`products->orderItem`.`orderId` AS `products.orderItem.orderId`,
`products->orderItem`.`productId` AS `products.orderItem.productId`
FROM `orders` AS `order`
LEFT OUTER JOIN ( `orderItems` AS `products->orderItem`
INNER JOIN `products` AS `products` ON `products`.`id` = `products->orderItem`.`productId`)
ON `order`.`id` = `products->orderItem`.`orderId` WHERE `order`.`userId` = 1;