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