Panda 3 mesi fa
parent
commit
95d534c930
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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);