|  | @ -195,7 +195,7 @@ class Sessions extends RedisModel {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //流程2-判断session的业务类型;
 | 
	
		
			
				|  |  |         function callBusinessType() {
 | 
	
		
			
				|  |  |             if(type==SESSION_TYPES.MUC||type==SESSION_TYPES.PRESCRIPTION){
 | 
	
		
			
				|  |  |             if(type==SESSION_TYPES.MUC||type==SESSION_TYPES.PRESCRIPTION || type==SESSION_TYPES.ONDOOR_NURSING){
 | 
	
		
			
				|  |  |                 callCreateSession(SESSION_BUSINESS_TYPE.PATIENT);
 | 
	
		
			
				|  |  |             }else if(type==SESSION_TYPES.SPECIALISTGROUP){
 | 
	
		
			
				|  |  |                 callCreateSession(SESSION_BUSINESS_TYPE.DOCTOR);
 | 
	
	
		
			
				|  | @ -384,6 +384,7 @@ class Sessions extends RedisModel {
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     getUserSessions(userId, page, size, businessType) {
 | 
	
		
			
				|  |  |         let userSessionKey = RedisModel.makeRedisKey(REDIS_KEYS.UserSessions, userId);
 | 
	
		
			
				|  |  |         logger.info(userId);
 | 
	
		
			
				|  |  |         let self = this;
 | 
	
		
			
				|  |  |         if (page > 0) {
 | 
	
		
			
				|  |  |             if (page == 1) {
 | 
	
	
		
			
				|  | @ -421,6 +422,7 @@ class Sessions extends RedisModel {
 | 
	
		
			
				|  |  |                 let sessionList = [];
 | 
	
		
			
				|  |  |                 let functionList = [];
 | 
	
		
			
				|  |  |                 for (let j = 0; j < sessionIds.length; j++) {
 | 
	
		
			
				|  |  |                     log.info("遍历会话 :" + sessionIds);
 | 
	
		
			
				|  |  |                     let fun = function (index, callback) {
 | 
	
		
			
				|  |  |                         if (!callback) {
 | 
	
		
			
				|  |  |                             callback = index, index = 0
 | 
	
	
		
			
				|  | @ -670,6 +672,7 @@ class Sessions extends RedisModel {
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     getUserStatusSessions(userId,status,businessType,page, size) {
 | 
	
		
			
				|  |  |         let userSessionKey = RedisModel.makeRedisKey(REDIS_KEYS.UserSessions, userId);
 | 
	
		
			
				|  |  |         log.info(userId);
 | 
	
		
			
				|  |  |         let self = this;
 | 
	
		
			
				|  |  |         async.waterfall([
 | 
	
		
			
				|  |  |             // 获取会话ID列表
 | 
	
	
		
			
				|  | @ -1455,6 +1458,7 @@ class Sessions extends RedisModel {
 | 
	
		
			
				|  |  |      * @param handler
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     saveIntoMessageByTopic(message, sessionId, handler) {
 | 
	
		
			
				|  |  |         log.info("2--保存代理人进入的消息:");
 | 
	
		
			
				|  |  |         let messages = new Messages();
 | 
	
		
			
				|  |  |         let participants = new Participants();
 | 
	
		
			
				|  |  |         let session_key = RedisModel.makeRedisKey(REDIS_KEYS.Session, sessionId);
 | 
	
	
		
			
				|  | @ -1469,7 +1473,7 @@ class Sessions extends RedisModel {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         // 发送成员必须处于会话中
 | 
	
		
			
				|  |  |         participants.existsParticipant(sessionId, message.sender_id, function (err, res) {
 | 
	
		
			
				|  |  |             if (res) {
 | 
	
		
			
				|  |  |             if (res.exist) {
 | 
	
		
			
				|  |  |                 redis.hmgetAsync(session_key, ["type", "name"]).then(function (res) {
 | 
	
		
			
				|  |  |                     sessionType = res[0];
 | 
	
		
			
				|  |  |                     sessionName = res[1];
 | 
	
	
		
			
				|  | @ -1524,6 +1528,7 @@ class Sessions extends RedisModel {
 | 
	
		
			
				|  |  |                     return;
 | 
	
		
			
				|  |  |                 })
 | 
	
		
			
				|  |  |             } else {
 | 
	
		
			
				|  |  |                 log.info("4--用户不在此会话当中!");
 | 
	
		
			
				|  |  |                 if (handler){ handler("用户不在此会话当中!", messageId);return;}
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         });
 |