From 1829d013b542254f6c9a5301f090de72afe51c0f Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Mon, 11 Aug 2025 10:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=94=E5=9B=9E=E7=9A=84?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ticket/service/ConversationService.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/ticket/service/ConversationService.php b/app/ticket/service/ConversationService.php index 2dc0d18..ce6104c 100644 --- a/app/ticket/service/ConversationService.php +++ b/app/ticket/service/ConversationService.php @@ -20,14 +20,16 @@ class ConversationService $result = (new ConversationLogic())->list($params); $status_fanyi = array_map(fn($v) => "{{{$v}}}", array_flip(Constants::TICKET_STATUS)); - $result = $result??$result->toArray(); $ossservice = new OssService(); foreach ($result as $key => $value) { - $result[$key]['content'] = str_replace($status_fanyi,$ticket_status,$value['content']); - $result[$key]['attachment'] = empty($value['attachment'])?[]:unserialize($value['attachment']); - foreach ($result[$key]['attachment'] as $k => $attachment) { - $result[$key]['attachment']['storage_path_full'][$k] = (!empty($attachment))?$ossservice->generatePrivateUrl($attachment['storage_path']):''; + $value=$value->toArray(); + $value['content'] = str_replace($status_fanyi,$ticket_status,$value['content']); + $value['attachment'] = empty($value['attachment'])?[]:unserialize($value['attachment']); + foreach ($value['attachment'] as $k => $attachment) { + $value['attachment'][$k]['storage_path_full'] = (!empty($attachment))?$ossservice->generatePrivateUrl($attachment['storage_path']):''; } + + $result[$key] = $value; } return $result; }