|
@@ -83,53 +83,80 @@
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
+<!-- <insert id="insertFsCourseLinkBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="linkId">-->
|
|
|
|
+<!-- INSERT INTO fs_course_link-->
|
|
|
|
+<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
|
|
|
|
+<!-- <if test="courseLinks != null and courseLinks.size() > 0">-->
|
|
|
|
+<!-- <!– 假设所有日志对象的字段一致 –>-->
|
|
|
|
+<!-- <!– 动态生成列列表,基于第一个日志对象 –>-->
|
|
|
|
+<!-- <foreach collection="courseLinks" item="item" index="index" open="" close="" separator="">-->
|
|
|
|
+<!-- <if test="index == 0">-->
|
|
|
|
+<!-- <if test="item.link != null">link,</if>-->
|
|
|
|
+<!-- <if test="item.realLink != null">real_link,</if>-->
|
|
|
|
+<!-- <if test="item.createTime != null">create_time,</if>-->
|
|
|
|
+<!-- <if test="item.updateTime != null">update_time,</if>-->
|
|
|
|
+<!-- <if test="item.companyId != null">company_id,</if>-->
|
|
|
|
+<!-- <if test="item.companyUserId != null">company_user_id,</if>-->
|
|
|
|
+<!-- <if test="item.qwUserId != null">qw_user_id,</if>-->
|
|
|
|
+<!-- <if test="item.videoId != null">video_id,</if>-->
|
|
|
|
+<!-- <if test="item.corpId != null">corp_id,</if>-->
|
|
|
|
+<!-- <if test="item.courseId != null">course_id,</if>-->
|
|
|
|
+<!-- <if test="item.qwExternalId != null">qw_external_id,</if>-->
|
|
|
|
+<!-- <if test="item.linkType != null">link_type,</if>-->
|
|
|
|
+<!-- <if test="item.isRoom != null">is_room,</if>-->
|
|
|
|
+<!-- </if>-->
|
|
|
|
+<!-- </foreach>-->
|
|
|
|
+<!-- </if>-->
|
|
|
|
+<!-- </trim>-->
|
|
|
|
+<!-- <trim prefix="VALUES">-->
|
|
|
|
+<!-- <foreach collection="courseLinks" item="item" separator=",">-->
|
|
|
|
+<!-- (<trim suffixOverrides=",">-->
|
|
|
|
+<!-- <if test="item.link != null">#{item.link},</if>-->
|
|
|
|
+<!-- <if test="item.realLink != null">#{item.realLink},</if>-->
|
|
|
|
+<!-- <if test="item.createTime != null">#{item.createTime},</if>-->
|
|
|
|
+<!-- <if test="item.updateTime != null">#{item.updateTime},</if>-->
|
|
|
|
+<!-- <if test="item.companyId != null">#{item.companyId},</if>-->
|
|
|
|
+<!-- <if test="item.companyUserId != null">#{item.companyUserId},</if>-->
|
|
|
|
+<!-- <if test="item.qwUserId != null">#{item.qwUserId},</if>-->
|
|
|
|
+<!-- <if test="item.videoId != null">#{item.videoId},</if>-->
|
|
|
|
+<!-- <if test="item.corpId != null">#{item.corpId},</if>-->
|
|
|
|
+<!-- <if test="item.courseId != null">#{item.courseId},</if>-->
|
|
|
|
+<!-- <if test="item.qwExternalId != null">#{item.qwExternalId},</if>-->
|
|
|
|
+<!-- <if test="item.linkType != null">#{item.linkType},</if>-->
|
|
|
|
+<!-- <if test="item.isRoom != null">#{item.isRoom},</if>-->
|
|
|
|
+<!-- </trim>)-->
|
|
|
|
+<!-- </foreach>-->
|
|
|
|
+<!-- </trim>-->
|
|
|
|
+<!-- </insert>-->
|
|
|
|
+
|
|
<insert id="insertFsCourseLinkBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="linkId">
|
|
<insert id="insertFsCourseLinkBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="linkId">
|
|
INSERT INTO fs_course_link
|
|
INSERT INTO fs_course_link
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
- <if test="courseLinks != null and courseLinks.size() > 0">
|
|
|
|
- <!-- 假设所有日志对象的字段一致 -->
|
|
|
|
- <!-- 动态生成列列表,基于第一个日志对象 -->
|
|
|
|
- <foreach collection="courseLinks" item="item" index="index" open="" close="" separator="">
|
|
|
|
- <if test="index == 0">
|
|
|
|
- <if test="item.link != null">link,</if>
|
|
|
|
- <if test="item.realLink != null">real_link,</if>
|
|
|
|
- <if test="item.createTime != null">create_time,</if>
|
|
|
|
- <if test="item.updateTime != null">update_time,</if>
|
|
|
|
- <if test="item.companyId != null">company_id,</if>
|
|
|
|
- <if test="item.companyUserId != null">company_user_id,</if>
|
|
|
|
- <if test="item.qwUserId != null">qw_user_id,</if>
|
|
|
|
- <if test="item.videoId != null">video_id,</if>
|
|
|
|
- <if test="item.corpId != null">corp_id,</if>
|
|
|
|
- <if test="item.courseId != null">course_id,</if>
|
|
|
|
- <if test="item.qwExternalId != null">qw_external_id,</if>
|
|
|
|
- <if test="item.linkType != null">link_type,</if>
|
|
|
|
- <if test="item.isRoom != null">is_room,</if>
|
|
|
|
- </if>
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </trim>
|
|
|
|
- <trim prefix="VALUES">
|
|
|
|
- <foreach collection="courseLinks" item="item" separator=",">
|
|
|
|
- (<trim suffixOverrides=",">
|
|
|
|
- <if test="item.link != null">#{item.link},</if>
|
|
|
|
- <if test="item.realLink != null">#{item.realLink},</if>
|
|
|
|
- <if test="item.createTime != null">#{item.createTime},</if>
|
|
|
|
- <if test="item.updateTime != null">#{item.updateTime},</if>
|
|
|
|
- <if test="item.companyId != null">#{item.companyId},</if>
|
|
|
|
- <if test="item.companyUserId != null">#{item.companyUserId},</if>
|
|
|
|
- <if test="item.qwUserId != null">#{item.qwUserId},</if>
|
|
|
|
- <if test="item.videoId != null">#{item.videoId},</if>
|
|
|
|
- <if test="item.corpId != null">#{item.corpId},</if>
|
|
|
|
- <if test="item.courseId != null">#{item.courseId},</if>
|
|
|
|
- <if test="item.qwExternalId != null">#{item.qwExternalId},</if>
|
|
|
|
- <if test="item.linkType != null">#{item.linkType},</if>
|
|
|
|
- <if test="item.isRoom != null">#{item.isRoom},</if>
|
|
|
|
- </trim>)
|
|
|
|
- </foreach>
|
|
|
|
- </trim>
|
|
|
|
|
|
+ (
|
|
|
|
+ link, real_link, create_time, update_time,
|
|
|
|
+ company_id, company_user_id, qw_user_id, video_id,
|
|
|
|
+ corp_id, course_id, qw_external_id, link_type,
|
|
|
|
+ is_room
|
|
|
|
+ )
|
|
|
|
+ VALUES
|
|
|
|
+ <foreach collection="courseLinks" item="item" separator=",">
|
|
|
|
+ (
|
|
|
|
+ #{item.link,jdbcType=VARCHAR},
|
|
|
|
+ #{item.realLink,jdbcType=VARCHAR},
|
|
|
|
+ #{item.createTime,jdbcType=TIMESTAMP},
|
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
+ #{item.companyId,jdbcType=BIGINT},
|
|
|
|
+ #{item.companyUserId,jdbcType=BIGINT},
|
|
|
|
+ #{item.qwUserId,jdbcType=VARCHAR},
|
|
|
|
+ #{item.videoId,jdbcType=BIGINT},
|
|
|
|
+ #{item.corpId,jdbcType=VARCHAR},
|
|
|
|
+ #{item.courseId,jdbcType=BIGINT},
|
|
|
|
+ #{item.qwExternalId,jdbcType=BIGINT},
|
|
|
|
+ #{item.linkType,jdbcType=BIGINT},
|
|
|
|
+ #{item.isRoom,jdbcType=VARCHAR},
|
|
|
|
+ )
|
|
|
|
+ </foreach>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
-
|
|
|
|
<update id="updateFsCourseLink" parameterType="FsCourseLink">
|
|
<update id="updateFsCourseLink" parameterType="FsCourseLink">
|
|
update fs_course_link
|
|
update fs_course_link
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|