|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper
|
|
|
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.course.mapper.FsCourseFinishTempMapper">
|
|
|
|
|
|
<resultMap type="FsCourseFinishTemp" id="FsCourseFinishTempResult">
|
|
@@ -17,15 +17,13 @@
|
|
|
<result property="companyUserIds" column="company_user_ids" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="isDel" column="is_del" />
|
|
|
- <result property="chatSetting" column="chat_setting" />
|
|
|
- <result property="isAllCompanyUser" column="is_all_company_user" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsCourseFinishTempVo">
|
|
|
- select * from fs_course_finish_temp
|
|
|
+ select id, name, status, setting, company_id, create_by, create_time, course_id, video_id, company_user_ids, update_time, is_del from fs_course_finish_temp
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectFsCourseFinishTempList" parameterType="FsCourseFinishTemp" resultType="FsCourseFinishTemp">
|
|
|
+ <select id="selectFsCourseFinishTempList" parameterType="FsCourseFinishTemp" resultMap="FsCourseFinishTempResult">
|
|
|
<include refid="selectFsCourseFinishTempVo"/>
|
|
|
<where>
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
@@ -36,11 +34,10 @@
|
|
|
<if test="videoId != null "> and video_id = #{videoId}</if>
|
|
|
<if test="companyUserIds != null and companyUserIds != ''"> and company_user_ids = #{companyUserIds}</if>
|
|
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
|
|
- <if test="isAllCompanyUser != null "> and is_all_company_user = #{isAllCompanyUser}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectFsCourseFinishTempById" parameterType="Long" resultType="FsCourseFinishTemp">
|
|
|
+ <select id="selectFsCourseFinishTempById" parameterType="Long" resultMap="FsCourseFinishTempResult">
|
|
|
<include refid="selectFsCourseFinishTempVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
@@ -59,9 +56,10 @@
|
|
|
<if test="companyUserIds != null">company_user_ids,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="isDel != null">is_del,</if>
|
|
|
- <if test="isAllCompanyUser != null">is_all_company_user,</if>
|
|
|
<if test="chatSetting != null">chat_setting,</if>
|
|
|
- </trim>
|
|
|
+ <if test="parentId != null">parent_id,</if>
|
|
|
+ <if test="isAllCompanyUser != null">is_all_company_user,</if>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="name != null">#{name},</if>
|
|
|
<if test="status != null">#{status},</if>
|
|
@@ -74,9 +72,10 @@
|
|
|
<if test="companyUserIds != null">#{companyUserIds},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="isDel != null">#{isDel},</if>
|
|
|
- <if test="isAllCompanyUser != null">#{isAllCompanyUser},</if>
|
|
|
<if test="chatSetting != null">#{chatSetting},</if>
|
|
|
- </trim>
|
|
|
+ <if test="parentId != null">#{parentId},</if>
|
|
|
+ <if test="isAllCompanyUser != null">#{isAllCompanyUser},</if>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateFsCourseFinishTemp" parameterType="FsCourseFinishTemp">
|
|
@@ -93,8 +92,6 @@
|
|
|
<if test="companyUserIds != null">company_user_ids = #{companyUserIds},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="isDel != null">is_del = #{isDel},</if>
|
|
|
- <if test="isAllCompanyUser != null">is_all_company_user = #{isAllCompanyUser},</if>
|
|
|
- <if test="chatSetting != null">chat_setting = #{chatSetting},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
@@ -109,4 +106,10 @@
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
+ <delete id="deleteByParentIds">
|
|
|
+ update fs_course_finish_temp set is_del = 1 where parent_id in
|
|
|
+ <foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
</mapper>
|