...
|
...
|
@@ -296,7 +296,15 @@ class YuyueController extends UserBaseController |
|
|
$exist_map['yuyue_week'] = $week;
|
|
|
$exist_map['yuyue_end'] = [['>',$begin],['<=',$end],'or'];
|
|
|
$is_exist=\db('yuyue')->where($exist_map)->find();
|
|
|
if (!empty($is_exist)){
|
|
|
|
|
|
$exist_map1['yuyue_begin'] = ['>=',$begin];
|
|
|
$exist_map1['teach_id'] = intval($tech_id);
|
|
|
$exist_map1['yuyue_day'] = $day;
|
|
|
$exist_map1['yuyue_week'] = $week;
|
|
|
$exist_map1['yuyue_end'] = ['<=',$end];
|
|
|
|
|
|
$is_exist1=\db('yuyue')->where($exist_map1)->find();
|
|
|
if (!empty($is_exist)||!empty($is_exist1)){
|
|
|
return json(['code' => '0', 'msg' => '您好,您的预约时间与其他学员冲突,请刷新后提交!']);
|
|
|
}
|
|
|
$data['status'] = 1;
|
...
|
...
|
|