From 3dcb545952e322b76474daf80dca8fb45d8011a3 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Tue, 4 Mar 2025 16:11:20 +0800 Subject: [PATCH] feat : order --- app/Model/OrderGood.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Model/OrderGood.php b/app/Model/OrderGood.php index 6ac115a..a48b198 100644 --- a/app/Model/OrderGood.php +++ b/app/Model/OrderGood.php @@ -50,6 +50,6 @@ class OrderGood extends Model */ public function getGoodIdsByOrderId(int $orderId): array { - return $this->where('order_id', $orderId)->select('sku_id','SUM(`quantity`) as `quantity`')->get()->toArray(); + return $this->where('order_id', $orderId)->select('sku_id')->selectRaw('SUM(`quantity`) as `quantity`')->get()->toArray(); } }