|
@@ -35,164 +35,296 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
camp_period_time,project,period_id,watch_type from fs_course_watch_log
|
|
camp_period_time,project,period_id,watch_type from fs_course_watch_log
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
- <select id="selectFsCourseWatchLogList" parameterType="FsCourseWatchLog" resultMap="FsCourseWatchLogResult">
|
|
|
|
|
- <include refid="selectFsCourseWatchLogVo"/>
|
|
|
|
|
- <where>
|
|
|
|
|
- <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
|
|
- <if test="videoId != null "> and video_id = #{videoId}</if>
|
|
|
|
|
- <if test="logType != null "> and log_type = #{logType}</if>
|
|
|
|
|
- <if test="qwExternalContactId != null "> and qw_external_contact_id = #{qwExternalContactId}</if>
|
|
|
|
|
- <if test="duration != null "> and duration = #{duration}</if>
|
|
|
|
|
- <if test="qwUserId != null and qwUserId != ''"> and qw_user_id = #{qwUserId}</if>
|
|
|
|
|
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
|
|
- <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
|
|
- <if test="courseId != null "> and course_id = #{courseId}</if>
|
|
|
|
|
- <if test="sendType != null "> and send_type = #{sendType}</if>
|
|
|
|
|
- <if test="campPeriodTime != null "> and camp_period_time = #{campPeriodTime}</if>
|
|
|
|
|
- <if test="project != null "> and project = #{project}</if>
|
|
|
|
|
- <if test="watchType != null "> and watch_type = #{watchType}</if>
|
|
|
|
|
- </where>
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
+ <select id="selectFsCourseWatchLogList" parameterType="FsCourseWatchLog" resultMap="FsCourseWatchLogResult">
|
|
|
|
|
+ <include refid="selectFsCourseWatchLogVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
|
|
+ <if test="videoId != null "> and video_id = #{videoId}</if>
|
|
|
|
|
+ <if test="logType != null "> and log_type = #{logType}</if>
|
|
|
|
|
+ <if test="qwExternalContactId != null "> and qw_external_contact_id = #{qwExternalContactId}</if>
|
|
|
|
|
+ <if test="duration != null "> and duration = #{duration}</if>
|
|
|
|
|
+ <if test="qwUserId != null and qwUserId != ''"> and qw_user_id = #{qwUserId}</if>
|
|
|
|
|
+ <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
|
|
+ <if test="courseId != null "> and course_id = #{courseId}</if>
|
|
|
|
|
+ <if test="sendType != null "> and send_type = #{sendType}</if>
|
|
|
|
|
+ <if test="campPeriodTime != null "> and camp_period_time = #{campPeriodTime}</if>
|
|
|
|
|
+ <if test="project != null "> and project = #{project}</if>
|
|
|
|
|
+ <if test="watchType != null "> and watch_type = #{watchType}</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
|
|
|
- <select id="selectFsCourseWatchLogByLogId" parameterType="Long" resultMap="FsCourseWatchLogResult">
|
|
|
|
|
- <include refid="selectFsCourseWatchLogVo"/>
|
|
|
|
|
- where log_id = #{logId}
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
+ <select id="selectFsCourseWatchLogByLogId" parameterType="Long" resultMap="FsCourseWatchLogResult">
|
|
|
|
|
+ <include refid="selectFsCourseWatchLogVo"/>
|
|
|
|
|
+ where log_id = #{logId}
|
|
|
|
|
+ </select>
|
|
|
|
|
|
|
|
- <select id="selectFsCourseWatchLogListVO" resultType="com.fs.course.vo.FsCourseWatchLogListVO">
|
|
|
|
|
- select l.log_id,l.project,l.period_id,l.user_id,uc.course_name,v.title as video_name,qec.avatar as external_user_avatar,qec.status as externalStatus,
|
|
|
|
|
- l.log_type,SEC_TO_TIME(l.duration) as duration,c.company_name,l.camp_period_time,l.finish_time,
|
|
|
|
|
- cu.nick_name as company_user_name ,l.send_type,l.create_time,l.update_time,l.last_heartbeat_time,
|
|
|
|
|
- qu.qw_user_name,qec.name as external_user_name,c.company_id,u.avatar as fsAvatar,u.nick_name as fsNickName,qec.create_time as qec_create_time,
|
|
|
|
|
- u.is_vip isVip,l.reward_type,cu.dept_id, l.watch_type
|
|
|
|
|
- from fs_course_watch_log l
|
|
|
|
|
- left join fs_user_course_video v on v.video_id = l.video_id
|
|
|
|
|
- left join fs_user_course uc on uc.course_id = l.course_id
|
|
|
|
|
- left join fs_user u on u.user_id = l.user_id
|
|
|
|
|
- left join company_user cu on cu.user_id = l.company_user_id
|
|
|
|
|
- left join company c on c.company_id = l.company_id
|
|
|
|
|
- LEFT JOIN qw_user qu on qu.id= l.qw_user_id
|
|
|
|
|
- LEFT JOIN qw_external_contact qec on l.qw_external_contact_id = qec.id
|
|
|
|
|
- <where>
|
|
|
|
|
- <if test ='maps.isVip != null and maps.isVip == 0'>
|
|
|
|
|
- and (l.user_id = 0 or l.user_id is null)
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.isVip != null and maps.isVip == 1'>
|
|
|
|
|
- and l.user_id != 0 and l.user_id is not null
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.sendType !=null'>
|
|
|
|
|
- and l.send_type = #{maps.sendType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.userId !=null'>
|
|
|
|
|
- and l.user_id = #{maps.userId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.logId !=null'>
|
|
|
|
|
- and l.log_id = #{maps.logId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.project !=null'>
|
|
|
|
|
- and l.project = #{maps.project}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.qwExternalContactId !=null'>
|
|
|
|
|
- and l.qw_external_contact_id = #{maps.qwExternalContactId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.qwUserId !=null'>
|
|
|
|
|
- and l.qw_user_id = #{maps.qwUserId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.courseId !=null'>
|
|
|
|
|
- and l.course_id = #{maps.courseId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.videoId !=null'>
|
|
|
|
|
- and l.video_id = #{maps.videoId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.logType !=null'>
|
|
|
|
|
- and l.log_type = #{maps.logType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.companyId !=null'>
|
|
|
|
|
- and l.company_id = #{maps.companyId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.watchType !=null'>
|
|
|
|
|
- and l.watch_type = #{maps.watchType}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.companyUserId !=null'>
|
|
|
|
|
- and l.company_user_id = #{maps.companyUserId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.companyUserName !=null and maps.companyUserName!=""'>
|
|
|
|
|
- and cu.nick_name like concat('%', #{maps.companyUserName}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.nickName !=null and maps.nickName!=""'>
|
|
|
|
|
- and u.nick_name like concat('%', #{maps.nickName}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.externalUserName !=null and maps.externalUserName!=""'>
|
|
|
|
|
- and qec.name like concat('%', #{maps.externalUserName}, '%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test= 'maps.qecSTime != null '>
|
|
|
|
|
- and DATE(qec.create_time) >= DATE(#{maps.qecSTime})
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='maps.qecETime != null '>
|
|
|
|
|
- and DATE(qec.create_time) <= DATE(#{maps.qecETime})
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test= 'maps.sTime != null '>
|
|
|
|
|
- and l.create_time >= #{maps.sTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='maps.eTime != null '>
|
|
|
|
|
- and l.create_time <= #{maps.eTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test= 'maps.scheduleStartTime != null '>
|
|
|
|
|
- and l.camp_period_time >= #{maps.scheduleStartTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='maps.scheduleEndTime != null '>
|
|
|
|
|
- and l.camp_period_time <= #{maps.scheduleEndTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test= 'maps.upSTime != null '>
|
|
|
|
|
- and l.update_time >= #{maps.upSTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='maps.upETime != null '>
|
|
|
|
|
- and l.update_time < date_add(#{maps.upETime}, interval 1 day)
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.sopIds != null and maps.sopIds.size() > 0">
|
|
|
|
|
- and l.sop_id in
|
|
|
|
|
- <foreach item="sopId" index="index" collection="maps.sopIds" open="(" separator="," close=")">
|
|
|
|
|
- #{sopId}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test ='maps.project !=null'>
|
|
|
|
|
- and l.project = #{maps.project}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.sopId != null and maps.sopId != '' ">
|
|
|
|
|
- and l.sop_id = #{maps.sopId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.externalStatus != null and maps.externalStatus != '' ">
|
|
|
|
|
- and qec.status = #{maps.externalStatus}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.periodId != null">
|
|
|
|
|
- and l.period_id = #{maps.periodId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.periodIds != null and maps.periodIds.size() > 0">
|
|
|
|
|
- and l.period_id in
|
|
|
|
|
- <foreach item="periodId" index="index" collection="maps.periodIds" open="(" separator="," close=")">
|
|
|
|
|
- #{periodId}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.qwUserName != null and maps.qwUserName != '' ">
|
|
|
|
|
- and qu.qw_user_name = #{maps.qwUserName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.deptId != null and maps.deptId != '' ">
|
|
|
|
|
- and cu.dept_id = #{maps.deptId}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test='maps.cuDeptIdList != null and !maps.cuDeptIdList.isEmpty() and maps.userType != "00" '>
|
|
|
|
|
- AND cu.dept_id IN
|
|
|
|
|
- <foreach collection='maps.cuDeptIdList' item='item' open='(' separator=',' close=')'>
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="maps.userIds != null and !maps.userIds.isEmpty()">
|
|
|
|
|
- AND cu.user_id IN
|
|
|
|
|
- <foreach collection='maps.userIds' item='item' open='(' separator=',' close=')'>
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- </where>
|
|
|
|
|
- order by l.finish_time desc,l.update_time desc,l.create_time desc
|
|
|
|
|
|
|
+ <select id="selectFsCourseWatchLogListVO" resultType="com.fs.course.vo.FsCourseWatchLogListVO">
|
|
|
|
|
+ select l.log_id,l.project,l.period_id,l.user_id,uc.course_name,v.title as video_name,qec.avatar as external_user_avatar,qec.status as externalStatus,
|
|
|
|
|
+ l.log_type,SEC_TO_TIME(l.duration) as duration,c.company_name,l.camp_period_time,l.finish_time,
|
|
|
|
|
+ cu.nick_name as company_user_name ,l.send_type,l.create_time,l.update_time,l.last_heartbeat_time,
|
|
|
|
|
+ qu.qw_user_name,qec.name as external_user_name,c.company_id,u.avatar as fsAvatar,u.nick_name as fsNickName,qec.create_time as qec_create_time,
|
|
|
|
|
+ u.is_vip isVip,l.reward_type,cu.dept_id, l.watch_type,qec.tag_ids
|
|
|
|
|
+ from fs_course_watch_log l
|
|
|
|
|
+ left join fs_user_course_video v on v.video_id = l.video_id
|
|
|
|
|
+ left join fs_user_course uc on uc.course_id = l.course_id
|
|
|
|
|
+ left join fs_user u on u.user_id = l.user_id
|
|
|
|
|
+ left join company_user cu on cu.user_id = l.company_user_id
|
|
|
|
|
+ left join company c on c.company_id = l.company_id
|
|
|
|
|
+ LEFT JOIN qw_user qu on qu.id= l.qw_user_id
|
|
|
|
|
+ LEFT JOIN qw_external_contact qec on l.qw_external_contact_id = qec.id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test ='maps.isVip != null and maps.isVip == 0'>
|
|
|
|
|
+ and (l.user_id = 0 or l.user_id is null)
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.isVip != null and maps.isVip == 1'>
|
|
|
|
|
+ and l.user_id != 0 and l.user_id is not null
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.sendType !=null'>
|
|
|
|
|
+ and l.send_type = #{maps.sendType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.userId !=null'>
|
|
|
|
|
+ and l.user_id = #{maps.userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.logId !=null'>
|
|
|
|
|
+ and l.log_id = #{maps.logId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.project !=null'>
|
|
|
|
|
+ and l.project = #{maps.project}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.qwExternalContactId !=null'>
|
|
|
|
|
+ and l.qw_external_contact_id = #{maps.qwExternalContactId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.qwUserId !=null'>
|
|
|
|
|
+ and l.qw_user_id = #{maps.qwUserId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.courseId !=null'>
|
|
|
|
|
+ and l.course_id = #{maps.courseId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.videoId !=null'>
|
|
|
|
|
+ and l.video_id = #{maps.videoId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.logType !=null'>
|
|
|
|
|
+ and l.log_type = #{maps.logType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.companyId !=null'>
|
|
|
|
|
+ and l.company_id = #{maps.companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.watchType !=null'>
|
|
|
|
|
+ and l.watch_type = #{maps.watchType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.companyUserId !=null'>
|
|
|
|
|
+ and l.company_user_id = #{maps.companyUserId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.companyUserName !=null and maps.companyUserName!=""'>
|
|
|
|
|
+ and cu.nick_name like concat('%', #{maps.companyUserName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.nickName !=null and maps.nickName!=""'>
|
|
|
|
|
+ and u.nick_name like concat('%', #{maps.nickName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.externalUserName !=null and maps.externalUserName!=""'>
|
|
|
|
|
+ and qec.name like concat('%', #{maps.externalUserName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.qecSTime != null '>
|
|
|
|
|
+ and DATE(qec.create_time) >= DATE(#{maps.qecSTime})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.qecETime != null '>
|
|
|
|
|
+ and DATE(qec.create_time) <= DATE(#{maps.qecETime})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.sTime != null '>
|
|
|
|
|
+ and l.create_time >= #{maps.sTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.eTime != null '>
|
|
|
|
|
+ and l.create_time <= #{maps.eTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.scheduleStartTime != null '>
|
|
|
|
|
+ and l.camp_period_time >= #{maps.scheduleStartTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.scheduleEndTime != null '>
|
|
|
|
|
+ and l.camp_period_time <= #{maps.scheduleEndTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.upSTime != null '>
|
|
|
|
|
+ and l.update_time >= #{maps.upSTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.upETime != null '>
|
|
|
|
|
+ and l.update_time < date_add(#{maps.upETime}, interval 1 day)
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.sopIds != null and maps.sopIds.size() > 0">
|
|
|
|
|
+ and l.sop_id in
|
|
|
|
|
+ <foreach item="sopId" index="index" collection="maps.sopIds" open="(" separator="," close=")">
|
|
|
|
|
+ #{sopId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.project !=null'>
|
|
|
|
|
+ and l.project = #{maps.project}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.sopId != null and maps.sopId != '' ">
|
|
|
|
|
+ and l.sop_id = #{maps.sopId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.externalStatus != null and maps.externalStatus != '' ">
|
|
|
|
|
+ and qec.status = #{maps.externalStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.periodId != null">
|
|
|
|
|
+ and l.period_id = #{maps.periodId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.periodIds != null and maps.periodIds.size() > 0">
|
|
|
|
|
+ and l.period_id in
|
|
|
|
|
+ <foreach item="periodId" index="index" collection="maps.periodIds" open="(" separator="," close=")">
|
|
|
|
|
+ #{periodId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.qwUserName != null and maps.qwUserName != '' ">
|
|
|
|
|
+ and qu.qw_user_name = #{maps.qwUserName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.deptId != null and maps.deptId != '' ">
|
|
|
|
|
+ and cu.dept_id = #{maps.deptId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.cuDeptIdList != null and !maps.cuDeptIdList.isEmpty() and maps.userType != "00" '>
|
|
|
|
|
+ AND cu.dept_id IN
|
|
|
|
|
+ <foreach collection='maps.cuDeptIdList' item='item' open='(' separator=',' close=')'>
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.userIds != null and !maps.userIds.isEmpty()">
|
|
|
|
|
+ AND cu.user_id IN
|
|
|
|
|
+ <foreach collection='maps.userIds' item='item' open='(' separator=',' close=')'>
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by l.finish_time desc,l.update_time desc,l.create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectFsCourseWatchLogListByWatchLogVO" resultType="com.fs.qw.domain.QwExternalContact">
|
|
|
|
|
+ select qec.id,qec.user_id,qec.external_user_id,qec.corp_id,qec.tag_ids,qec.name
|
|
|
|
|
+ from fs_course_watch_log l
|
|
|
|
|
+ left join fs_user u on u.user_id = l.user_id
|
|
|
|
|
+ left join company_user cu on cu.user_id = l.company_user_id
|
|
|
|
|
+ LEFT JOIN qw_user qu on qu.id= l.qw_user_id
|
|
|
|
|
+ LEFT JOIN qw_external_contact qec on l.qw_external_contact_id = qec.id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test ='maps.isVip != null and maps.isVip == 0'>
|
|
|
|
|
+ and (l.user_id = 0 or l.user_id is null)
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.isVip != null and maps.isVip == 1'>
|
|
|
|
|
+ and l.user_id != 0 and l.user_id is not null
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.sendType !=null'>
|
|
|
|
|
+ and l.send_type = #{maps.sendType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.userId !=null'>
|
|
|
|
|
+ and l.user_id = #{maps.userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.logId !=null'>
|
|
|
|
|
+ and l.log_id = #{maps.logId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.project !=null'>
|
|
|
|
|
+ and l.project = #{maps.project}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.qwExternalContactId !=null'>
|
|
|
|
|
+ and l.qw_external_contact_id = #{maps.qwExternalContactId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.qwUserId !=null'>
|
|
|
|
|
+ and l.qw_user_id = #{maps.qwUserId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.courseId !=null'>
|
|
|
|
|
+ and l.course_id = #{maps.courseId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.videoId !=null'>
|
|
|
|
|
+ and l.video_id = #{maps.videoId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.logType !=null'>
|
|
|
|
|
+ and l.log_type = #{maps.logType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.companyId !=null'>
|
|
|
|
|
+ and l.company_id = #{maps.companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.watchType !=null'>
|
|
|
|
|
+ and l.watch_type = #{maps.watchType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.companyUserId !=null'>
|
|
|
|
|
+ and l.company_user_id = #{maps.companyUserId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.companyUserName !=null and maps.companyUserName!=""'>
|
|
|
|
|
+ and cu.nick_name like concat('%', #{maps.companyUserName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.nickName !=null and maps.nickName!=""'>
|
|
|
|
|
+ and u.nick_name like concat('%', #{maps.nickName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.externalUserName !=null and maps.externalUserName!=""'>
|
|
|
|
|
+ and qec.name like concat('%', #{maps.externalUserName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.qecSTime != null '>
|
|
|
|
|
+ and DATE(qec.create_time) >= DATE(#{maps.qecSTime})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.qecETime != null '>
|
|
|
|
|
+ and DATE(qec.create_time) <= DATE(#{maps.qecETime})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.sTime != null '>
|
|
|
|
|
+ and l.create_time >= #{maps.sTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.eTime != null '>
|
|
|
|
|
+ and l.create_time <= #{maps.eTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.scheduleStartTime != null '>
|
|
|
|
|
+ and l.camp_period_time >= #{maps.scheduleStartTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.scheduleEndTime != null '>
|
|
|
|
|
+ and l.camp_period_time <= #{maps.scheduleEndTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test= 'maps.upSTime != null '>
|
|
|
|
|
+ and l.update_time >= #{maps.upSTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.upETime != null '>
|
|
|
|
|
+ and l.update_time < date_add(#{maps.upETime}, interval 1 day)
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.sopIds != null and maps.sopIds.size() > 0">
|
|
|
|
|
+ and l.sop_id in
|
|
|
|
|
+ <foreach item="sopId" index="index" collection="maps.sopIds" open="(" separator="," close=")">
|
|
|
|
|
+ #{sopId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test ='maps.project !=null'>
|
|
|
|
|
+ and l.project = #{maps.project}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.sopId != null and maps.sopId != '' ">
|
|
|
|
|
+ and l.sop_id = #{maps.sopId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.externalStatus != null and maps.externalStatus != '' ">
|
|
|
|
|
+ and qec.status = #{maps.externalStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.periodId != null">
|
|
|
|
|
+ and l.period_id = #{maps.periodId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.periodIds != null and maps.periodIds.size() > 0">
|
|
|
|
|
+ and l.period_id in
|
|
|
|
|
+ <foreach item="periodId" index="index" collection="maps.periodIds" open="(" separator="," close=")">
|
|
|
|
|
+ #{periodId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.qwUserName != null and maps.qwUserName != '' ">
|
|
|
|
|
+ and qu.qw_user_name = #{maps.qwUserName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.deptId != null and maps.deptId != '' ">
|
|
|
|
|
+ and cu.dept_id = #{maps.deptId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test='maps.cuDeptIdList != null and !maps.cuDeptIdList.isEmpty() and maps.userType != "00" '>
|
|
|
|
|
+ AND cu.dept_id IN
|
|
|
|
|
+ <foreach collection='maps.cuDeptIdList' item='item' open='(' separator=',' close=')'>
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.userIds != null and !maps.userIds.isEmpty()">
|
|
|
|
|
+ AND cu.user_id IN
|
|
|
|
|
+ <foreach collection='maps.userIds' item='item' open='(' separator=',' close=')'>
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ GROUP BY
|
|
|
|
|
+ qec.user_id,
|
|
|
|
|
+ qec.external_user_id,
|
|
|
|
|
+ qec.corp_id
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectFsCourseWatchLogListByParam" resultType="com.fs.course.vo.FsCourseWatchLogListVO">
|
|
<select id="selectFsCourseWatchLogListByParam" resultType="com.fs.course.vo.FsCourseWatchLogListVO">
|