Compare commits

..

3 Commits

Author SHA1 Message Date
ayflying
9ca1c43409 Revert "修改act数据取出的时候进行泛型复制而不是转格式"
This reverts commit e9962f1b74.
2025-04-29 17:28:47 +08:00
ayflying
504836d165 绑定用户凭证 2025-04-29 10:16:25 +08:00
ayflying
e9962f1b74 修改act数据取出的时候进行泛型复制而不是转格式 2025-04-25 11:28:18 +08:00

View File

@@ -35,6 +35,7 @@ type WebsocketData struct {
Ws *websocket.Conn `json:"ws" dc:"websocket连接池"`
Uuid string `json:"uuid" dc:"用户唯一标识"`
Uid int64 `json:"uid" dc:"用户编号"`
Guid string `json:"guid" dc:"用户凭证"`
Groups []string `json:"groups" dc:"群组"`
Ctx context.Context `json:"ctx" dc:""`
RoomId string `json:"roomId" dc:"房间编号"`
@@ -169,7 +170,7 @@ func (s *SocketV1) OnMessage(conn *WebsocketData, req []byte, msgType int) {
}
//绑定用户编号
func (s *SocketV1) BindUid(conn *WebsocketData, uid int64) {
func (s *SocketV1) BindUid(conn *WebsocketData, uid int64, guid string) {
lock.Lock()
defer lock.Unlock()
@@ -179,6 +180,7 @@ func (s *SocketV1) BindUid(conn *WebsocketData, uid int64) {
if conn.Uid == 0 {
conn.Uid = uid
}
conn.Guid = guid
}