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')))