|
|
@@ -178,6 +178,11 @@ class ServiceWorkLogic extends BaseLogic
|
|
|
throw new Exception('存在待审核的预约时间修改记录,无法修改');
|
|
|
}
|
|
|
|
|
|
+ //预约时间只能修改三次
|
|
|
+ if (ServiceWorkAppointmentLog::where(['work_id' => $work->id, 'worker_id' => $params['user_id']])->count() >= 3) {
|
|
|
+ throw new \Exception('您的修改预约时间次数已到上限,请联系客服处理');
|
|
|
+ }
|
|
|
+
|
|
|
//验证更改的预约时间必须是在领单时间内的半小内修改,否则不允许修改
|
|
|
// if(strtotime($work->appointment_time) != strtotime($params['appointment_time']) && (time()-strtotime($work->receive_time))>1800){
|
|
|
// throw new Exception('距离领单时间已超过半小时,无法修改预约时间,请联系客服');
|