工单发送邮件通知

This commit is contained in:
2025-08-13 17:00:16 +08:00
parent cd4de8b206
commit 9ae23153f6
5 changed files with 62 additions and 0 deletions
+14
View File
@@ -18,6 +18,7 @@ class ConversationLogic
$current = $params['current'] ?? 1;
return Conversation::where($where)->paginate($size, ['*'], 'page', $current);
}
public function add(array $data)
{
try {
@@ -43,4 +44,17 @@ class ConversationLogic
throw new BusinessException('会话编辑失败,请稍后重试', 500);
}
}
/**
* 获取工单最新一条记录
* @param array $data
* @return Conversation|\Illuminate\Database\Eloquent\Model|object|null
*/
public function firstByTicket(int $ticketId)
{
$conversation = Conversation::where('ticket_id',$ticketId)
->orderBy('id','desc')
->first();
return $conversation;
}
}