状态修改校验(不能倒退状态)
This commit is contained in:
@@ -26,7 +26,7 @@ class TicketController extends BaseController
|
||||
? $this->success()
|
||||
: $this->error();
|
||||
} catch (\Throwable $th) {
|
||||
return $this->error($th->getMessage().' '.$th->getLine().' '.$th->getFile());
|
||||
return $this->error($th->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ class AttachmentLogic
|
||||
$res = Attachment::whereNotIn('id', $attachmentsId)->where('ticket_id',$ticket_id)->delete();
|
||||
return $res;
|
||||
} catch (\Throwable $e) {
|
||||
Log::error('工单创建失败', [
|
||||
Log::error('工单编辑(附件)失败', [
|
||||
'data' => $data,
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
throw new BusinessException('工单创建失败,请稍后重试', 500);
|
||||
throw new BusinessException('工单编辑失败,请稍后重试', 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class TicketLogic
|
||||
'data' => $data,
|
||||
'error' => $e->getMessage()
|
||||
]);
|
||||
throw new BusinessException('工单提取方法…失败,请稍后重试', 500);
|
||||
throw new BusinessException('工单编辑失败,请稍后重试', 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ class TicketService
|
||||
if(empty($ticket)){
|
||||
throw new BusinessException('工单不存在');
|
||||
}
|
||||
if($data['status'] == $ticket->status){
|
||||
if($data['status'] <= $ticket->status){
|
||||
throw new BusinessException(trans('status_not_modified'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user