| 
					
				 | 
			
			
				@@ -1887,10 +1887,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fs_course_watch_log l 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LEFT JOIN company_user ON l.company_user_id = company_user.user_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN fs_user ON fs_user.user_id = l.user_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN fs_user_company_user ON fs_user_company_user.user_id = fs_user.user_id and l.project =fs_user_company_user.project_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             l.log_type != 3 and send_type = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="userId != null and userId != 0 "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                and (l.company_user_id = #{userId} OR company_user.parent_id = #{userId} ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and (fs_user_company_user.company_user_id = #{userId} OR company_user.parent_id = #{userId} ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="userId != null and userId == 0 "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and l.company_id = #{companyId} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1911,10 +1913,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         fs_course_watch_log l 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LEFT JOIN company_user ON l.company_user_id = company_user.user_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN fs_user ON fs_user.user_id = l.user_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN fs_user_company_user ON fs_user_company_user.user_id = fs_user.user_id and l.project =fs_user_company_user.project_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         l.log_type = 2 and send_type = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <if test="userId != null and userId != 0 "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            and (l.company_user_id = #{userId} OR company_user.parent_id = #{userId} ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            and (fs_user_company_user.company_user_id = #{userId} OR company_user.parent_id = #{userId} ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <if test="userId != null and userId == 0 "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             and l.company_id = #{companyId} 
			 |