|  | @@ -252,11 +252,14 @@ public class IMHelper {
 | 
	
		
			
				|  |  |          jsonObject.put("hostUserId",hostUserId);
 | 
	
		
			
				|  |  |          jsonObject.put("hostStreamId",hostUserId);
 | 
	
		
			
				|  |  |          JSONObject json = new JSONObject();
 | 
	
		
			
				|  |  | -        json.put("sessionId",roomQuery(roomId));
 | 
	
		
			
				|  |  | +        String sessionId = redisTemplate.opsForValue().get("sessionId:" + roomId);
 | 
	
		
			
				|  |  | +        if(StringUtils.isEmpty(sessionId)){
 | 
	
		
			
				|  |  | +            sessionId = roomQuery(roomId);
 | 
	
		
			
				|  |  | +            redisTemplate.opsForValue().set("sessionId:" + roomId,sessionId);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        json.put("sessionId",sessionId);
 | 
	
		
			
				|  |  |          json.put("config",jsonObject);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          /*JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |          jsonObject.put("mode",3);
 | 
	
		
			
				|  |  |          jsonObject.put("videoFormat","mp4");
 | 
	
	
		
			
				|  | @@ -293,12 +296,6 @@ public class IMHelper {
 | 
	
		
			
				|  |  |          JSONObject jsonObject1 = new JSONObject();
 | 
	
		
			
				|  |  |          jsonObject1.put("video",jsonArray);
 | 
	
		
			
				|  |  |          jsonObject.put("input",jsonObject1);*/
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        json.put("sessionId",roomQuery(roomId));
 | 
	
		
			
				|  |  | -        json.put("config",jsonObject);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          String body = json.toJSONString();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Thread.sleep(1000l);
 | 
	
	
		
			
				|  | @@ -421,6 +418,7 @@ public class IMHelper {
 | 
	
		
			
				|  |  |          if("200".equals(code)){
 | 
	
		
			
				|  |  |              return resultObject.get("sessionId").toString();
 | 
	
		
			
				|  |  |          }else {
 | 
	
		
			
				|  |  | +            log.error("获取sessionId失败 returnResult:{}",returnResult);
 | 
	
		
			
				|  |  |              throw new BizException("获取sessionId失败");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 |