| 
					
				 | 
			
			
				@ -112,7 +112,7 @@ public class PatientMessageService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            patient +=",'"+agent+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select A.*,B.notRead from " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "(select  count(1) as 'all',type,DATE_FORMAT(create_time,'%Y-%m-%d %H:%i:%S') create_time " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "(select  count(1) as 'all',type,MAX(create_time) create_time " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "from base_system_message where receiver in("+patient+") and del=1  GROUP BY type ORDER BY create_time desc)A " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "LEFT JOIN (select count(1) notRead,type " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "from base_system_message where receiver in("+patient+") and (is_read=0 or is_read is null ) and del=1  GROUP BY type)B on A.type = B.type " + 
			 |