diff --git a/app/ticket/service/TicketService.php b/app/ticket/service/TicketService.php index 7f74902..8851914 100644 --- a/app/ticket/service/TicketService.php +++ b/app/ticket/service/TicketService.php @@ -2,6 +2,7 @@ namespace app\ticket\service; +use app\common\model\User; use app\ticket\logic\AttachmentLogic; use app\ticket\logic\ConversationLogic; use app\ticket\logic\TicketLogic; @@ -28,6 +29,8 @@ class TicketService foreach ($v['attachments'] as &$attachments) { $attachments['storage_path_full'] = (new \app\common\service\OssService())->generatePrivateUrl($attachments['storage_path']); } + + $res[$k]['user_name'] = User::where('id', $v['user_id'])->value('name'); } unset($v); unset($attachments); @@ -50,6 +53,7 @@ class TicketService 'ticket_id' => $result->id, 'content' => $cleanContent, 'user_id' => $data['user_id'], + 'attachment' => implode(",", $data['attachment']), ]; (new ConversationService())->add($conversation);