laowang 4 lat temu
rodzic
commit
c24b5b09b8
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      app/Http/Controllers/Admin/IndexController.php

+ 3 - 2
app/Http/Controllers/Admin/IndexController.php

@@ -12,6 +12,7 @@ use App\Filters\StatisticFilter;
 use App\Filters\UserFilter;
 use App\Filters\WalletLogFilter;
 use App\Filters\WorkOrderFilter;
+use App\Models\AdminMerchant;
 use App\Models\AdminUser;
 use App\Models\AdminUserArea;
 use App\Models\Area;
@@ -1314,8 +1315,8 @@ class IndexController extends Controller
         $area_id = $request->get('area_id') ?? '';
         if (empty($days)) return $this->error('缺少参数');
         //platform
-        $platform = UserPhoneDetail::query();
-        $userPhone = UserPhoneDetail::query();
+        $platform = UserPhoneDetail::query()->where(AdminMerchant::getMerchantWhere());
+        $userPhone = UserPhoneDetail::query()->where(AdminMerchant::getMerchantWhere());
         if (!empty($area_id)) {
             $platform = $platform->whereHas('user', function ($q) use ($area_id) {
                 $q->where('register_area_id', $area_id);