From f2214730261b2fd8785eb6f4e85570cd78338331 Mon Sep 17 00:00:00 2001 From: weigang Date: Wed, 9 Sep 2020 09:15:00 +0800 Subject: [PATCH 1/3] no message --- app/Service/v3/Implementations/CategoryService.php | 4 ++-- app/Service/v3/Implementations/ShopCartService.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Service/v3/Implementations/CategoryService.php b/app/Service/v3/Implementations/CategoryService.php index 911c59c..6be32bd 100644 --- a/app/Service/v3/Implementations/CategoryService.php +++ b/app/Service/v3/Implementations/CategoryService.php @@ -37,9 +37,9 @@ class CategoryService implements CategoryServiceInterface public function allForStore($storeId) { - $goodsTypeIds = Goods::query()->select('category_id') + $goodsTypeIds = Goods::query()->select('id','category_id') ->where(['store_id' => $storeId]) - ->groupBy(['category_id']) + ->groupBy('category_id', 'id') ->get()->toArray(); return Category::query() diff --git a/app/Service/v3/Implementations/ShopCartService.php b/app/Service/v3/Implementations/ShopCartService.php index 0247fd6..818f40f 100644 --- a/app/Service/v3/Implementations/ShopCartService.php +++ b/app/Service/v3/Implementations/ShopCartService.php @@ -83,8 +83,8 @@ class ShopCartService implements ShopCartServiceInterface ['goods_id','=',$goodsId], ]) ->select('num') - ->get(); - return $ShoppingCart->num; + ->first(); + return $ShoppingCart->num ?? 0; } public function undo($userId,$marketId) From f2e6f9e62a35db2437e0a48caa30df58659a12f0 Mon Sep 17 00:00:00 2001 From: weigang Date: Wed, 9 Sep 2020 09:43:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/OrderOnlineService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Service/v3/Implementations/OrderOnlineService.php b/app/Service/v3/Implementations/OrderOnlineService.php index acc6986..7e421e5 100644 --- a/app/Service/v3/Implementations/OrderOnlineService.php +++ b/app/Service/v3/Implementations/OrderOnlineService.php @@ -136,8 +136,9 @@ class OrderOnlineService implements OrderOnlineServiceInterface $storeTypeIds[] = (string)$storeType; // 店铺今天的订单数 $count = Order::query() - ->where(['store_id' => $storeId, 'type' => OrderType::ONLINE]) - ->whereBetween('created_at', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]) + ->join('lanzu_order_main as main', 'main.id', '=', 'lanzu_order.order_main_id') + ->where(['lanzu_order.store_id' => $storeId, 'main.type' => OrderType::ONLINE]) + ->whereBetween('lanzu_order.created_at', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]) ->count(); // 用户购物车数据 From e52244027c9372bb0638f48585eb4ba4d99c2416 Mon Sep 17 00:00:00 2001 From: weigang Date: Wed, 9 Sep 2020 09:50:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8B=E5=8D=95=E8=BF=94=E8=AE=A2?= =?UTF-8?q?=E5=8D=95ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/PaymentService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Service/v3/Implementations/PaymentService.php b/app/Service/v3/Implementations/PaymentService.php index ea06f70..86e0f60 100644 --- a/app/Service/v3/Implementations/PaymentService.php +++ b/app/Service/v3/Implementations/PaymentService.php @@ -77,6 +77,7 @@ class PaymentService implements PaymentServiceInterface ]; $parameters['paySign'] = $this->signture($parameters, $config['key']); + $parameters['order_main_id'] = $orderMain->id; return $parameters;