正在显示
1 个修改的文件
包含
27 行增加
和
1 行删除
@@ -120,8 +120,34 @@ class BookingController extends AdminBaseController | @@ -120,8 +120,34 @@ class BookingController extends AdminBaseController | ||
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | + $res1 = Db::name('yuyue')->where(['yuyue_day'=>$day,'teach_id'=>$uid,'uid'=>['gt','0']])->select()->toArray(); | ||
124 | + | ||
125 | + $all_arr1 = []; | ||
126 | + for($t = 7;$t<=18;$t++){ | ||
127 | + $all_arr1[]=$t; | ||
128 | + } | ||
129 | + | ||
130 | + $arr1 = []; | ||
131 | + for($i = 0;$i<count($res);$i++){ | ||
132 | + $begin = $res[$i]["yuyue_begin"]; | ||
133 | + $end = $res[$i]["yuyue_end"]; | ||
134 | + for($j= $begin;$j<$end;$j++){ | ||
135 | + $arr1[]=$j; | ||
136 | + } | ||
137 | + } | ||
138 | + $ok_arr1 = []; | ||
139 | + for($q = 0;$q< count($all_arr);$q++){ | ||
140 | + if(in_array($all_arr[$q],$arr)){ | ||
141 | + $ok_arr1[] = "no"; | ||
142 | + }else{ | ||
143 | + $ok_arr1[] = "yes"; | ||
144 | + } | ||
145 | + } | ||
146 | +$dataa[0] = $ok_arr; | ||
147 | +$dataa[1] = $ok_arr1; | ||
148 | + | ||
123 | if ($ok_arr){ | 149 | if ($ok_arr){ |
124 | - return json(['code'=>'1','msg'=>'获取成功','data'=>json_encode($ok_arr,true)]); | 150 | + return json(['code'=>'1','msg'=>'获取成功','data'=>json_encode($dataa,true)]); |
125 | }else{ | 151 | }else{ |
126 | return json(['code'=>'0','msg'=>'获取失败']); | 152 | return json(['code'=>'0','msg'=>'获取失败']); |
127 | } | 153 | } |
-
请 注册 或 登录 后发表评论