工单沟通记录附件

This commit is contained in:
2025-08-11 09:51:32 +08:00
parent f845d1050f
commit 81ad0d0a97
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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;