xialei před 1 rokem
rodič
revize
4cd8f79789
1 změnil soubory, kde provedl 11 přidání a 10 odebrání
  1. 11 10
      app/controller/merchant/user/User.php

+ 11 - 10
app/controller/merchant/user/User.php

@@ -847,19 +847,20 @@ class User extends BaseController
847
                 $query->where('status',$status);
847
                 $query->where('status',$status);
848
             })->when($p_phone != '',function ($query) use ($spread_uid){
848
             })->when($p_phone != '',function ($query) use ($spread_uid){
849
                 $query->where('spread_uid',$spread_uid);
849
                 $query->where('spread_uid',$spread_uid);
850
-            })->when(isset($whereTime['user_time_type']) && $whereTime['user_time_type'] !== '' && $whereTime['user_time'] != '', function ($query) use ($whereTime) {
850
+            // })->when(isset($whereTime['user_time_type']) && $whereTime['user_time_type'] !== '' && $whereTime['user_time'] != '', function ($query) use ($whereTime) {
851
+            })->when($whereTime['user_time'] != '', function ($query) use ($whereTime) {
851
                 list($startTime, $endTime) = explode('-', $whereTime['user_time']);
852
                 list($startTime, $endTime) = explode('-', $whereTime['user_time']);
852
-                if ($whereTime['user_time_type'] == 'visitno') {
853
-                    $query->whereTime("last_time", 'between', [$startTime, $endTime]);
854
-                }
855
-                if ($whereTime['user_time_type'] == 'visit') {
856
-                    $query->whereTime('u.last_time', '>=', $startTime);
857
-                    $query->whereTime('u.last_time', '<', $endTime);
858
-                }
859
-                if ($whereTime['user_time_type'] == 'add_time') {
853
+                // if ($whereTime['user_time_type'] == 'visitno') {
854
+                //     $query->whereTime("last_time", 'between', [$startTime, $endTime]);
855
+                // }
856
+                // if ($whereTime['user_time_type'] == 'visit') {
857
+                //     $query->whereTime('u.last_time', '>=', $startTime);
858
+                //     $query->whereTime('u.last_time', '<', $endTime);
859
+                // }
860
+                // if ($whereTime['user_time_type'] == 'add_time') {
860
                     $query->whereTime('create_time', '>=', $startTime);
861
                     $query->whereTime('create_time', '>=', $startTime);
861
                     $query->whereTime('create_time', '<', $endTime);
862
                     $query->whereTime('create_time', '<', $endTime);
862
-                }
863
+                // }
863
             })->order('create_time desc');
864
             })->order('create_time desc');
864
         $date['list'] = $query->page($page, $limit)->select()
865
         $date['list'] = $query->page($page, $limit)->select()
865
             ->each(function ($item) {
866
             ->each(function ($item) {