作者 xiaohu thinkpad

测试获取当前时段的老师

@@ -63,28 +63,10 @@ class YuyueController extends UserBaseController @@ -63,28 +63,10 @@ class YuyueController extends UserBaseController
63 $ex = ''; 63 $ex = '';
64 64
65 foreach ($rr as $v) { 65 foreach ($rr as $v) {
66 -// $day_find = [];  
67 -// for ($i = $v['yuyue_begin']; $i <= $v['yuyue_end']; $i++) {  
68 -// $day_find[] = $i;  
69 -// }  
70 -// $f1 = array_search($bbegin, $day_find);  
71 -// $f2 = array_search($eend, $day_find);  
72 -// $ac = count($day_find) - 1;  
73 -//  
74 -// if (($f2 && ($f2 > '0')) || ($f1 && ($f1 < $ac)) || ($f1 && $f2)) {  
75 -// $ex .= $v['teach_id'] . ',';  
76 -// }  
77 $res = $tool->isMixTime($bbegin,$eend,$v['yuyue_begin'],$v['yuyue_end']); 66 $res = $tool->isMixTime($bbegin,$eend,$v['yuyue_begin'],$v['yuyue_end']);
78 - echo '<br>';  
79 - echo $bbegin,$eend,$v['yuyue_begin'],$v['yuyue_end'];  
80 - var_dump($res);  
81 - echo '<hr>';  
82 -  
83 $res && $ex .= $v['teach_id'] . ','; 67 $res && $ex .= $v['teach_id'] . ',';
84 68
85 } 69 }
86 - var_dump($res);  
87 - var_dump($ex);  
88 //获取当前时段有时间的教练 70 //获取当前时段有时间的教练
89 $where['user_type'] = 3; 71 $where['user_type'] = 3;
90 $where['id'] = array('not in', $ex); 72 $where['id'] = array('not in', $ex);