Przeglądaj źródła

课程表取消

lizhen_gitee 8 miesięcy temu
rodzic
commit
acda2fdd8d
1 zmienionych plików z 9 dodań i 9 usunięć
  1. 9 9
      application/admin/controller/Lessonslot.php

+ 9 - 9
application/admin/controller/Lessonslot.php

@@ -214,7 +214,7 @@ class Lessonslot extends Backend
     public function vue_index()
     {
         $where = [
-            'status' => ['NEQ',30],
+            'slot.status' => ['NEQ',30],
         ];
 
         $coach_id = input('coach_id','');
@@ -231,26 +231,26 @@ class Lessonslot extends Backend
         }
 
         if(!empty($coach_id)){
-            $where['coach_ids'] = ['IN',$coach_id];
+            $where['slot.coach_ids'] = ['IN',$coach_id];
         }
         if(!empty($lesson_id)){
-            $where['lesson_id'] = ['IN',$lesson_id];
+            $where['slot.lesson_id'] = ['IN',$lesson_id];
         }
         if(!empty($danceroom_id)){
-            $where['danceroom_id'] = $danceroom_id;
+            $where['slot.danceroom_id'] = $danceroom_id;
         }
-        $where['starttime'] = ['BETWEEN',[$starttime,$endtime]];
+        $where['slot.starttime'] = ['BETWEEN',[$starttime,$endtime]];
 
         $wherenew = '';
         if(!empty($bookstatus)){
             if($bookstatus == 1){
-                $wherenew = 'bookednum = 0';
+                $wherenew = 'slot.bookednum = 0';
             }
             if($bookstatus == 2){
-                $wherenew = 'bookednum != 0 and bookednum < num_max';
+                $wherenew = 'slot.bookednum != 0 and slot.bookednum < num_max';
             }
             if($bookstatus == 3){
-                $wherenew = 'bookednum = num_max';
+                $wherenew = 'slot.bookednum = num_max';
             }
         }
 
@@ -267,7 +267,7 @@ class Lessonslot extends Backend
             ->field($field)
             ->where($where)
             ->where($wherenew)
-            ->order('id desc')
+            ->order('slot.id desc')
             ->select();
 
         if(!empty($list)){