|  | @ -98,8 +98,7 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
 | 
	
		
			
				|  |  |     private boolean flag;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public ObjEnvelop leaveMessage(String content, String reciverId, String reciverName, String senderId, Integer type, String key, String value)
 | 
	
		
			
				|  |  |             throws IOException
 | 
	
		
			
				|  |  |     {
 | 
	
		
			
				|  |  |             throws IOException {
 | 
	
		
			
				|  |  |         BaseUserMessageDO baseUserMessageDO = new BaseUserMessageDO();
 | 
	
		
			
				|  |  |         ObjEnvelop objEnvelop = new ObjEnvelop();
 | 
	
		
			
				|  |  |         boolean checkTimeOut = checkGiveTimeOut(senderId, reciverId);
 | 
	
	
		
			
				|  | @ -498,23 +497,23 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return sql.toString();
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     public boolean checkGiveTimeOut(String sender, String reciver)
 | 
	
		
			
				|  |  | {
 | 
	
		
			
				|  |  |     List<BaseUserMessageDO> baseBannerDoctorDOS = this.baseUserMessageDao.getMessageByPatientAndDoctor(reciver, sender);
 | 
	
		
			
				|  |  |     WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_timeout");
 | 
	
		
			
				|  |  |     if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>=1)
 | 
	
		
			
				|  |  |     {
 | 
	
		
			
				|  |  |         BaseUserMessageDO lastOne = (BaseUserMessageDO)baseBannerDoctorDOS.get(0);
 | 
	
		
			
				|  |  |         Date lastDate = lastOne.getCreateTime();
 | 
	
		
			
				|  |  |         long timeOut = wlyyHospitalSysDictDO.getDictValue() != null ? Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue() : 5L;
 | 
	
		
			
				|  |  |         Date current = new Date();
 | 
	
		
			
				|  |  |         if (current.getTime() - lastDate.getTime() > timeOut * 1000L * 60L) {
 | 
	
		
			
				|  |  |             return true;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public boolean checkGiveTimeOut(String sender, String reciver) {
 | 
	
		
			
				|  |  |         List<BaseUserMessageDO> baseBannerDoctorDOS = this.baseUserMessageDao.getMessageByPatientAndDoctor(reciver, sender);
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO = this.wlyyHospitalSysDictDao.findById("leave_message_timeout");
 | 
	
		
			
				|  |  |         if (null != baseBannerDoctorDOS&&baseBannerDoctorDOS.size()>=1)
 | 
	
		
			
				|  |  |         {
 | 
	
		
			
				|  |  |             BaseUserMessageDO lastOne = (BaseUserMessageDO)baseBannerDoctorDOS.get(0);
 | 
	
		
			
				|  |  |             Date lastDate = lastOne.getCreateTime();
 | 
	
		
			
				|  |  |             long timeOut = wlyyHospitalSysDictDO.getDictValue() != null ? Long.valueOf(wlyyHospitalSysDictDO.getDictValue()).longValue() : 5L;
 | 
	
		
			
				|  |  |             Date current = new Date();
 | 
	
		
			
				|  |  |             if (current.getTime() - lastDate.getTime() > timeOut * 1000L * 60L) {
 | 
	
		
			
				|  |  |                 return true;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             return false;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return false;
 | 
	
		
			
				|  |  |         return true;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     return true;
 | 
	
		
			
				|  |  | }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public boolean checkGiveTimes(String patientId, String doctorId)
 | 
	
		
			
				|  |  |     {
 |