正在显示
1 个修改的文件
包含
9 行增加
和
1 行删除
@@ -296,7 +296,15 @@ class YuyueController extends UserBaseController | @@ -296,7 +296,15 @@ class YuyueController extends UserBaseController | ||
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],'or']; |
298 | $is_exist=\db('yuyue')->where($exist_map)->find(); | 298 | $is_exist=\db('yuyue')->where($exist_map)->find(); |
299 | - if (!empty($is_exist)){ | 299 | + |
300 | + $exist_map1['yuyue_begin'] = ['>=',$begin]; | ||
301 | + $exist_map1['teach_id'] = intval($tech_id); | ||
302 | + $exist_map1['yuyue_day'] = $day; | ||
303 | + $exist_map1['yuyue_week'] = $week; | ||
304 | + $exist_map1['yuyue_end'] = ['<=',$end]; | ||
305 | + | ||
306 | + $is_exist1=\db('yuyue')->where($exist_map1)->find(); | ||
307 | + if (!empty($is_exist)||!empty($is_exist1)){ | ||
300 | return json(['code' => '0', 'msg' => '您好,您的预约时间与其他学员冲突,请刷新后提交!']); | 308 | return json(['code' => '0', 'msg' => '您好,您的预约时间与其他学员冲突,请刷新后提交!']); |
301 | } | 309 | } |
302 | $data['status'] = 1; | 310 | $data['status'] = 1; |
-
请 注册 或 登录 后发表评论