From 8fc4ee28397c105b05c12a47f1cc00ddf434a423 Mon Sep 17 00:00:00 2001 From: dushixiang Date: Sat, 10 Jan 2026 22:49:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20ssh=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=20id=20=E6=9C=AA=E8=AE=BE=E7=BD=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/service/ssh_login_service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/service/ssh_login_service.go b/internal/service/ssh_login_service.go index be2d96c..21c41b5 100644 --- a/internal/service/ssh_login_service.go +++ b/internal/service/ssh_login_service.go @@ -10,6 +10,7 @@ import ( "github.com/dushixiang/pika/internal/protocol" "github.com/dushixiang/pika/internal/repo" "github.com/dushixiang/pika/internal/websocket" + "github.com/google/uuid" "go.uber.org/zap" "gorm.io/datatypes" @@ -131,6 +132,7 @@ func (s *SSHLoginService) HandleEvent(ctx context.Context, agentID string, event // 保存事件到数据库 event := &models.SSHLoginEvent{ + ID: uuid.NewString(), AgentID: agentID, Username: eventData.Username, IP: eventData.IP,