From 94f7ca0f684497befaa69821aa67cf153fa1b9f4 Mon Sep 17 00:00:00 2001 From: weigang Date: Mon, 21 Sep 2020 09:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=94=E5=88=86=E9=92=B1?= =?UTF-8?q?=E7=9A=84=E5=A5=96=E5=8A=B1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/UserService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Service/v3/Implementations/UserService.php b/app/Service/v3/Implementations/UserService.php index 1c7ebf2..ad2c162 100644 --- a/app/Service/v3/Implementations/UserService.php +++ b/app/Service/v3/Implementations/UserService.php @@ -35,7 +35,7 @@ class UserService implements UserServiceInterface public function isStoreFirstOrderToday($userId, $storeId, $currentOrderId, $limitAmount = 3) { return !Order::query() - ->join('lanzu_order_main as main', 'main.id', '=', 'lanzu_order.order_main_id') + ->join('lanzu_order_main as main', 'main.global_order_id', '=', 'lanzu_order.order_main_id') ->where(['main.user_id' => $userId, 'lanzu_order.store_id' => $storeId, 'main.type' => OrderType::OFFLINE]) ->whereIn('main.state', OrderState::FINISH) ->where('lanzu_order.created_at', '>=', strtotime(date('Y-m-d 00:00:00')))