合并分支 'workorder' 到 'master'
Workorder 查看合并请求 !2309
正在显示
2 个修改的文件
包含
2 行增加
和
0 行删除
| @@ -48,6 +48,7 @@ class TicketChatController extends Controller | @@ -48,6 +48,7 @@ class TicketChatController extends Controller | ||
| 48 | $request->validated(); | 48 | $request->validated(); |
| 49 | $ticket = Tickets::with(['project'])->find($ticket_id); | 49 | $ticket = Tickets::with(['project'])->find($ticket_id); |
| 50 | if (!$ticket) return response('工单未找到', 404); | 50 | if (!$ticket) return response('工单未找到', 404); |
| 51 | + if ($ticket->status >= Tickets::STATUS_COMPLETED) return response('工单已完成或已关闭', 400); | ||
| 51 | if ($ticket->project->uuid !== $project_id) return response('无权限查看该工单', 403); | 52 | if ($ticket->project->uuid !== $project_id) return response('无权限查看该工单', 403); |
| 52 | if ($ticket->project->is_del) return response('项目状态异常', 400); | 53 | if ($ticket->project->is_del) return response('项目状态异常', 400); |
| 53 | 54 |
| @@ -45,6 +45,7 @@ class TicketChatController extends BaseController | @@ -45,6 +45,7 @@ class TicketChatController extends BaseController | ||
| 45 | $validated = $request->validated(); | 45 | $validated = $request->validated(); |
| 46 | $ticket = Tickets::find($ticket_id); | 46 | $ticket = Tickets::find($ticket_id); |
| 47 | if (!$ticket) return response('工单未找到', 404); | 47 | if (!$ticket) return response('工单未找到', 404); |
| 48 | + if ($ticket->status >= Tickets::STATUS_COMPLETED) return response('工单已完成或已关闭', 400); | ||
| 48 | if ($ticket->project->is_del) return response('项目状态异常', 400); | 49 | if ($ticket->project->is_del) return response('项目状态异常', 400); |
| 49 | 50 | ||
| 50 | $chat = new TicketChat(); | 51 | $chat = new TicketChat(); |
-
请 注册 或 登录 后发表评论