作者 sgj
1 个管道 的构建 通过 耗费 0 秒

修改预约提交逻辑

@@ -290,11 +290,11 @@ class YuyueController extends UserBaseController @@ -290,11 +290,11 @@ class YuyueController extends UserBaseController
290 290
291 /*查看当前时间是否已经被预约了*/ 291 /*查看当前时间是否已经被预约了*/
292 292
293 - $exist_map['yuyue_begin'] = [['>=',$begin],['<',$end],'or']; 293 + $exist_map['yuyue_begin'] = [['>=',$begin],['<',$end],'and'];
294 $exist_map['teach_id'] = intval($tech_id); 294 $exist_map['teach_id'] = intval($tech_id);
295 $exist_map['yuyue_day'] = $day; 295 $exist_map['yuyue_day'] = $day;
296 $exist_map['yuyue_week'] = $week; 296 $exist_map['yuyue_week'] = $week;
297 - $exist_map['yuyue_end'] = [['>',$begin],['<=',$end],'or']; 297 + $exist_map['yuyue_end'] = [['>',$begin],['<=',$end],'and'];
298 $is_exist=\db('yuyue')->where($exist_map)->find(); 298 $is_exist=\db('yuyue')->where($exist_map)->find();
299 dump(\db('yuyue')->getLastSql()); 299 dump(\db('yuyue')->getLastSql());
300 dump($is_exist); 300 dump($is_exist);