From 81ad0d0a97e609d94fbd991cb147e22dff63a6f7 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Mon, 11 Aug 2025 09:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=B2=9F=E9=80=9A=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ticket/service/ConversationService.php | 6 +++--- app/ticket/service/TicketService.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/ticket/service/ConversationService.php b/app/ticket/service/ConversationService.php index 80e871c..7682079 100644 --- a/app/ticket/service/ConversationService.php +++ b/app/ticket/service/ConversationService.php @@ -23,7 +23,7 @@ class ConversationService $ossservice = new OssService(); foreach ($result as $key => $value) { $result[$key]['content'] = str_replace($status_fanyi,$ticket_status,$value['content']); - $result[$key]['attachment'] = explode(",", $value['attachment']); + $result[$key]['attachment'] = unserialize($value['attachment']); foreach ($result[$key]['attachment'] as $k => $attachment) { $result[$key]['attachment_full'][$k] = (!empty($attachment))?$ossservice->generatePrivateUrl($attachment):''; } @@ -34,7 +34,7 @@ class ConversationService public function add(array $data) { try { - $data['attachment'] = implode(",", $data['attachment']); + $data['attachment'] = serialize($data['attachment']); return (new ConversationLogic())->add($data); } catch (\Throwable $e) { throw $e; @@ -45,7 +45,7 @@ class ConversationService { try { Db::beginTransaction(); - $data['attachment'] = implode(",", $data['attachment']); + $data['attachment'] = serialize($data['attachment']); $result = (new ConversationLogic())->edit($data); Db::commit(); return $result; diff --git a/app/ticket/service/TicketService.php b/app/ticket/service/TicketService.php index 8851914..3d7036a 100644 --- a/app/ticket/service/TicketService.php +++ b/app/ticket/service/TicketService.php @@ -53,7 +53,7 @@ class TicketService 'ticket_id' => $result->id, 'content' => $cleanContent, 'user_id' => $data['user_id'], - 'attachment' => implode(",", $data['attachment']), + 'attachment' => serialize($data['attachment']), ]; (new ConversationService())->add($conversation);