Panda před 3 měsíci
rodič
revize
95d534c930
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      application/api/controller/HotelCanteen.php

+ 2 - 2
application/api/controller/HotelCanteen.php

@@ -157,10 +157,10 @@ class HotelCanteen extends Api
 
         switch ($params['status']){
             case 1:
-                $query->where('get_to_time','<',time())->where('status',1);
+                $query->where('get_to_time','>',time())->where('status',1);
                 break;
             case 2:
-                $query->where('get_to_time','>=',time())->where('status',1);
+                $query->where('get_to_time','<=',time())->where('status',1);
                 break;
             case 3:
                 $query->where('status',0);