|  | @@ -137,7 +137,6 @@ public interface SopUserLogsMapper {
 | 
	
		
			
				|  |  |      @DataSource(DataSourceType.SOP)
 | 
	
		
			
				|  |  |      SopUserLogs selectSopUserLogsByDateAndIds(SopUserLogsParamByDate sopUserLogs);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    //TODO left join 改为inner join
 | 
	
		
			
				|  |  |      @DataSource(DataSourceType.SOP)
 | 
	
		
			
				|  |  |      @Select({"<script> " +
 | 
	
		
			
				|  |  |              "SELECT DISTINCT\n" +
 | 
	
	
		
			
				|  | @@ -152,7 +151,7 @@ public interface SopUserLogsMapper {
 | 
	
		
			
				|  |  |              "            l.user_id,\n" +
 | 
	
		
			
				|  |  |              "            DATEDIFF(CURRENT_DATE, l.start_time) + 1 AS count_days\n" +
 | 
	
		
			
				|  |  |              "        FROM sop_user_logs l " +
 | 
	
		
			
				|  |  | -            "left join sop_user_logs_info i on l.id = i.user_logs_id "  +
 | 
	
		
			
				|  |  | +            "inner join sop_user_logs_info i on l.id = i.user_logs_id "  +
 | 
	
		
			
				|  |  |              "where 1=1 " +
 | 
	
		
			
				|  |  |              "<if test = ' maps.id!=null '> " +
 | 
	
		
			
				|  |  |              "and l.id = #{maps.id} " +
 | 
	
	
		
			
				|  | @@ -179,6 +178,47 @@ public interface SopUserLogsMapper {
 | 
	
		
			
				|  |  |              "</script>"})
 | 
	
		
			
				|  |  |      List<SopUserLogsVO> selectSopUserLogsListByParam(@Param("maps") SopUserLogsParam param);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @DataSource(DataSourceType.SOP)
 | 
	
		
			
				|  |  | +    @Select({"<script> " +
 | 
	
		
			
				|  |  | +            "SELECT DISTINCT\n" +
 | 
	
		
			
				|  |  | +            "            l.id,\n" +
 | 
	
		
			
				|  |  | +            "            l.sop_id,\n" +
 | 
	
		
			
				|  |  | +            "            l.sop_temp_id,\n" +
 | 
	
		
			
				|  |  | +            "            l.qw_user_id,\n" +
 | 
	
		
			
				|  |  | +            "            l.corp_id,\n" +
 | 
	
		
			
				|  |  | +            "            l.chat_id,\n" +
 | 
	
		
			
				|  |  | +            "            l.start_time,\n" +
 | 
	
		
			
				|  |  | +            "            l.status,\n" +
 | 
	
		
			
				|  |  | +            "            l.user_id,\n" +
 | 
	
		
			
				|  |  | +            "            DATEDIFF(CURRENT_DATE, l.start_time) + 1 AS count_days\n" +
 | 
	
		
			
				|  |  | +            "        FROM sop_user_logs l " +
 | 
	
		
			
				|  |  | +            "left join sop_user_logs_info i on l.id = i.user_logs_id "  +
 | 
	
		
			
				|  |  | +            "where 1=1 " +
 | 
	
		
			
				|  |  | +            "<if test = ' maps.id!=null '> " +
 | 
	
		
			
				|  |  | +            "and l.id = #{maps.id} " +
 | 
	
		
			
				|  |  | +            "</if>" +
 | 
	
		
			
				|  |  | +            "<if test = ' maps.sopId != null '> " +
 | 
	
		
			
				|  |  | +            "and l.sop_id = #{maps.sopId} " +
 | 
	
		
			
				|  |  | +            "</if>" +
 | 
	
		
			
				|  |  | +            "<if test = ' maps.sopTempId != null '> " +
 | 
	
		
			
				|  |  | +            "and l.sop_temp_id = #{maps.sopTempId} " +
 | 
	
		
			
				|  |  | +            "</if>" +
 | 
	
		
			
				|  |  | +            "<if test = ' maps.qwUserId!=null  '> " +
 | 
	
		
			
				|  |  | +            "and l.qw_user_id = #{maps.qwUserId} " +
 | 
	
		
			
				|  |  | +            "</if>" +
 | 
	
		
			
				|  |  | +            "<if test = ' maps.startTime!=null  '> " +
 | 
	
		
			
				|  |  | +            "and l.start_time = #{maps.startTime} " +
 | 
	
		
			
				|  |  | +            "</if>" +
 | 
	
		
			
				|  |  | +            "<if test = ' maps.status!=null  '> " +
 | 
	
		
			
				|  |  | +            "and l.status = #{maps.status} " +
 | 
	
		
			
				|  |  | +            "</if>" +
 | 
	
		
			
				|  |  | +            "<if test = ' maps.externalUserName!=null and maps.externalUserName != \"\"  '> " +
 | 
	
		
			
				|  |  | +            "and i.external_user_name like concat('%', #{maps.externalUserName}, '%') " +
 | 
	
		
			
				|  |  | +            "</if>" +
 | 
	
		
			
				|  |  | +            "order by start_time desc" +
 | 
	
		
			
				|  |  | +            "</script>"})
 | 
	
		
			
				|  |  | +    List<SopUserLogsVO> selectSopUserLogsGroupListByParam(@Param("maps") SopUserLogsParam param);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @DataSource(DataSourceType.SOP)
 | 
	
		
			
				|  |  |      void batchInsertSopUserLogs(@Param("list") List<SopUserLogs> list);
 |