| 
					
				 | 
			
			
				@ -183,6 +183,15 @@ public class ConsultService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql += " ORDER BY a.czrq desc "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("sql="+sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> result = hibenateUtils.createSQLQuery(sql,page,pagesize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (Map<String,Object> map:result){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(type.equals(ImUtil.SESSION_TYPE_ONLINE)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String sessionId = String.valueOf(map.get("id"))+"_"+patient+"_23"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //新增未读消息数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Integer count = imUtil.UserSessionsUnreadMessageCount(sessionId,patient); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("sessionId",sessionId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("count",count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -310,6 +319,7 @@ public class ConsultService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "a.type AS \"type\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "a.title AS \"title\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "a.symptoms AS \"symptoms\","+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "a.patient AS \"patient\","+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\","+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                	"b.status AS \"status\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "b.evaluate AS \"evaluate\"," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -376,6 +386,14 @@ public class ConsultService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    map.put("doctorName",baseDoctorDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(type.equals(ImUtil.SESSION_TYPE_ONLINE)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String sessionId = String.valueOf(map.get("id"))+"_"+String.valueOf(map.get("patient"))+"_23"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //新增未读消息数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Integer count = imUtil.UserSessionsUnreadMessageCount(sessionId,doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("sessionId",sessionId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("count",count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return mapList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 |