|
@@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="viewStartTime" column="view_start_time" />
|
|
|
<result property="viewEndTime" column="view_end_time" />
|
|
|
<result property="lastJoinTime" column="last_join_time" />
|
|
|
+ <result property="projectId" column="project_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsUserCourseVideoVo">
|
|
@@ -56,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="courseSort != null "> and course_sort = #{courseSort}</if>
|
|
|
<if test="questionBankId != null "> and question_bank_id = #{questionBankId}</if>
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <if test="projectId != null "> and project_id = #{projectId}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -97,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="viewEndTime != null">view_end_time,</if>
|
|
|
<if test="lastJoinTime != null">last_join_time,</if>
|
|
|
<if test="userId != null">user_id,</if>
|
|
|
+ <if test="projectId != null">project_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fileId != null">#{fileId},</if>
|
|
@@ -129,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="viewEndTime != null">#{viewEndTime},</if>
|
|
|
<if test="lastJoinTime != null">#{lastJoinTime},</if>
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
+ <if test="projectId != null">#{projectId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<insert id="insertBatchFsUserCourseVideo" parameterType="FsUserCourseVideo" useGeneratedKeys="true" keyProperty="videoId">
|
|
@@ -150,7 +154,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
file_size,
|
|
|
file_key,
|
|
|
is_transcode,
|
|
|
- user_id
|
|
|
+ user_id,
|
|
|
+ project_id
|
|
|
)
|
|
|
values
|
|
|
<foreach collection="collect" item="item" separator=",">
|
|
@@ -171,7 +176,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{item.fileSize},
|
|
|
#{item.fileKey},
|
|
|
#{item.isTranscode},
|
|
|
- #{item.userId}
|
|
|
+ #{item.userId},
|
|
|
+ #{item.projectId}
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
@@ -208,6 +214,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="viewStartTime != null">view_start_time = #{viewStartTime},</if>
|
|
|
<if test="viewEndTime != null">view_end_time = #{viewEndTime},</if>
|
|
|
<if test="lastJoinTime != null">last_join_time = #{lastJoinTime},</if>
|
|
|
+ <if test="projectId != null">project_id = #{projectId},</if>
|
|
|
</trim>
|
|
|
where video_id = #{videoId}
|
|
|
</update>
|
|
@@ -295,7 +302,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
fcpd.period_id,
|
|
|
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
|
|
|
+ if(ccut.end_date_time is null, fcpd.end_date_time, ccut.end_date_time) as endDateTime,
|
|
|
+ course.project as projectId
|
|
|
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
|