Browse Source

营期筛选更换时间取值

zyy 17 hours ago
parent
commit
671421e9fe

+ 41 - 2
fs-service/src/main/resources/mapper/course/FsUserCourseVideoMapper.xml

@@ -276,8 +276,8 @@
         fcpd.period_id,
         fcp.period_name,
         fcpd.id,
-        if(ccut.start_date_time is null, fcpd.start_date_time, ccut.start_date_time) as startDateTime,
-        if(ccut.end_date_time is null, fcpd.end_date_time, ccut.end_date_time) as endDateTime,
+        fcpd.start_date_time,
+        fcpd.end_date_time,
         course.project as projectId,
         fcp.max_view_num as maxViewNum
         FROM `fs_user_course_video` video
@@ -300,6 +300,45 @@
         AND DATE_SUB(fcpd.day_date, INTERVAL fcp.max_view_num DAY) <= now()
         order by video.course_sort
     </select>
+<!--    <select id="selectFsUserCourseVideoPageList" resultType="com.fs.course.vo.newfs.FsUserCourseVideoPageListVO">-->
+<!--        SELECT-->
+<!--        DISTINCT video.video_id,-->
+<!--        video.title,-->
+<!--        video.description,-->
+<!--        video.video_url,-->
+<!--        video.thumbnail,-->
+<!--        video.duration,-->
+<!--        video.course_id,-->
+<!--        video.STATUS,-->
+<!--        video.course_sort,-->
+<!--        course.course_name,-->
+<!--        fcpd.period_id,-->
+<!--        fcp.period_name,-->
+<!--        fcpd.id,-->
+<!--        if(ccut.start_date_time is null, fcpd.start_date_time, ccut.start_date_time) as startDateTime,-->
+<!--        if(ccut.end_date_time is null, fcpd.end_date_time, ccut.end_date_time) as endDateTime,-->
+<!--        course.project as projectId,-->
+<!--        fcp.max_view_num as maxViewNum-->
+<!--        FROM `fs_user_course_video` video-->
+<!--        left join fs_user_course_period_days fcpd on fcpd.video_id = video.video_id-->
+<!--        left join fs_user_course_period fcp on fcp.period_id = fcpd.period_id-->
+<!--        LEFT JOIN fs_user_course course ON video.course_id = course.course_id-->
+<!--        LEFT JOIN fs_user_course_company_user_time ccut ON ccut.period_id = fcpd.period_id-->
+<!--        AND ccut.course_id = fcpd.course_id-->
+<!--        AND ccut.video_id = fcpd.video_id-->
+<!--        AND ccut.company_user_id = #{companyUserId}-->
+<!--        where course.is_del = 0 and fcp.del_flag = 0 and fcpd.del_flag = 0-->
+<!--        AND FIND_IN_SET(#{companyId}, fcp.company_id)-->
+<!--        <if test="periodId != null and periodId !='' ">-->
+<!--            AND fcpd.period_id = #{periodId}-->
+<!--        </if>-->
+<!--        <if test="keyword != null and keyword !='' ">-->
+<!--            AND video.title LIKE concat('%',#{keyword},'%')-->
+<!--        </if>-->
+<!--        &lt;!&ndash; 营销提前查看天数逻辑 &ndash;&gt;-->
+<!--        AND DATE_SUB(fcpd.day_date, INTERVAL fcp.max_view_num DAY) &lt;= now()-->
+<!--        order by video.course_sort-->
+<!--    </select>-->
 
     <select id="selectVideoListByMap" resultType="com.fs.his.vo.OptionsVO">
         select distinct