mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	refactor: websocket支持单用户多连接
This commit is contained in:
		@@ -60,16 +60,10 @@ func PermissionHandler(rc *Ctx) error {
 | 
			
		||||
			return biz.PermissionErr
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	clientUuid := rc.GinCtx.Request.Header.Get("Client-Uuid")
 | 
			
		||||
	// header不存在则从查询参数token中获取
 | 
			
		||||
	if clientUuid == "" {
 | 
			
		||||
		clientUuid = rc.GinCtx.Query("clientUuid")
 | 
			
		||||
	}
 | 
			
		||||
	if rc.LoginAccount == nil {
 | 
			
		||||
		rc.LoginAccount = &model.LoginAccount{
 | 
			
		||||
			Id:         userId,
 | 
			
		||||
			Username:   userName,
 | 
			
		||||
			ClientUuid: clientUuid,
 | 
			
		||||
			Id:       userId,
 | 
			
		||||
			Username: userName,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user