...
|
...
|
@@ -288,6 +288,17 @@ class YuyueController extends UserBaseController |
|
|
return json(['code' => '0', 'msg' => '您好,您有待学车预约']);
|
|
|
}
|
|
|
|
|
|
/*查看当前时间是否已经被预约了*/
|
|
|
|
|
|
$exist_map['yuyue_begin'] = [['>=',$begin],['<',$end],'or'];
|
|
|
$exist_map['teach_id'] = intval($tech_id);
|
|
|
$exist_map['yuyue_day'] = $day;
|
|
|
$exist_map['yuyue_week'] = $week;
|
|
|
$exist_map['yuyue_end'] = [['>',$begin],['<=',$end].'or'];
|
|
|
$is_exist=\db('yuyue')->where($exist_map)->find();
|
|
|
if (!empty($is_exist)){
|
|
|
return json(['code' => '0', 'msg' => '您好,您的预约时间与其他学员冲突,请刷新后提交!']);
|
|
|
}
|
|
|
$data['status'] = 1;
|
|
|
$data['create_time'] = time();
|
|
|
|
...
|
...
|
|