diff --git a/app/ticket/controller/TicketController.php b/app/ticket/controller/TicketController.php index cc33459..782dc74 100644 --- a/app/ticket/controller/TicketController.php +++ b/app/ticket/controller/TicketController.php @@ -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()); } } diff --git a/app/ticket/logic/AttachmentLogic.php b/app/ticket/logic/AttachmentLogic.php index dac59f9..b498f7e 100644 --- a/app/ticket/logic/AttachmentLogic.php +++ b/app/ticket/logic/AttachmentLogic.php @@ -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); } } diff --git a/app/ticket/logic/TicketLogic.php b/app/ticket/logic/TicketLogic.php index ca5532f..e22cdb7 100644 --- a/app/ticket/logic/TicketLogic.php +++ b/app/ticket/logic/TicketLogic.php @@ -52,7 +52,7 @@ class TicketLogic 'data' => $data, 'error' => $e->getMessage() ]); - throw new BusinessException('工单提取方法…失败,请稍后重试', 500); + throw new BusinessException('工单编辑失败,请稍后重试', 500); } } diff --git a/app/ticket/service/TicketService.php b/app/ticket/service/TicketService.php index 5d1ee0a..f5a0d72 100644 --- a/app/ticket/service/TicketService.php +++ b/app/ticket/service/TicketService.php @@ -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')); } diff --git a/resource/translations/ar/messages.php b/resource/translations/ar/messages.php index 342a451..a701f87 100644 --- a/resource/translations/ar/messages.php +++ b/resource/translations/ar/messages.php @@ -1,5 +1,5 @@ 'الوضع لم يتغير', + 'status_not_modified' => 'الدولة لا يمكن تعديلها عكسيا', ]; \ No newline at end of file diff --git a/resource/translations/en/messages.php b/resource/translations/en/messages.php index 53c6d07..c676eb2 100644 --- a/resource/translations/en/messages.php +++ b/resource/translations/en/messages.php @@ -1,5 +1,5 @@ 'status not modified', + 'status_not_modified' => 'The status cannot be reversed for modification', ]; \ No newline at end of file diff --git a/resource/translations/ru/messages.php b/resource/translations/ru/messages.php index fc398a5..96ab3a4 100644 --- a/resource/translations/ru/messages.php +++ b/resource/translations/ru/messages.php @@ -1,5 +1,5 @@ 'Статус не изменен', + 'status_not_modified' => 'Статус не может быть изменен в обратном направлении', ]; \ No newline at end of file diff --git a/resource/translations/zh/messages.php b/resource/translations/zh/messages.php index 7c95aaf..229d7ee 100644 --- a/resource/translations/zh/messages.php +++ b/resource/translations/zh/messages.php @@ -1,5 +1,5 @@ '状态未修改', + 'status_not_modified' => '状态不能逆向修改', ]; \ No newline at end of file