| 
														
															@@ -300,7 +300,7 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           and ql.corp_id=#{data.corpId} 
														 | 
														
														 | 
														
															           and ql.corp_id=#{data.corpId} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           and ql.external_user_id =#{data.externalUserId} 
														 | 
														
														 | 
														
															           and ql.external_user_id =#{data.externalUserId} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           and ql.log_type = 2 
														 | 
														
														 | 
														
															           and ql.log_type = 2 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-          and ql.send_type in (2,3,5,6,7) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+          and ql.send_type !=4 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           and ql.send_status = 3 
														 | 
														
														 | 
														
															           and ql.send_status = 3 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           and ql.receiving_status = 0 
														 | 
														
														 | 
														
															           and ql.receiving_status = 0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           and ql.send_time <= now() 
														 | 
														
														 | 
														
															           and ql.send_time <= now() 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -385,7 +385,7 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															           AND external_user_id != #{data.externalUserId} 
														 | 
														
														 | 
														
															           AND external_user_id != #{data.externalUserId} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															            AND log_type = 2 
														 | 
														
														 | 
														
															            AND log_type = 2 
														 | 
													
												
											
												
													
														| 
														 | 
														
															            AND send_status = 3 
														 | 
														
														 | 
														
															            AND send_status = 3 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-           AND send_type in (2,3,5,6) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+           AND send_type !=4 
														 | 
													
												
											
												
													
														| 
														 | 
														
															            AND receiving_status = 0 
														 | 
														
														 | 
														
															            AND receiving_status = 0 
														 | 
													
												
											
												
													
														| 
														 | 
														
															            AND send_time <= now() 
														 | 
														
														 | 
														
															            AND send_time <= now() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         ORDER BY sort DESC,send_time ASC, rand() 
														 | 
														
														 | 
														
															         ORDER BY sort DESC,send_time ASC, rand() 
														 |