| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?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">
- <mapper namespace="com.fs.course.mapper.FsCourseFinishTempParentMapper">
- <resultMap type="FsCourseFinishTempParent" id="FsCourseFinishTempParentResult">
- <result property="id" column="id" />
- <result property="name" column="name" />
- <result property="courseId" column="course_id" />
- <result property="companyId" column="company_id" />
- <result property="createTime" column="create_time" />
- <result property="createBy" column="create_by" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- </resultMap>
- <sql id="selectFsCourseFinishTempParentVo">
- select * from fs_course_finish_temp_parent
- </sql>
- <select id="selectFsCourseFinishTempParentList" parameterType="FsCourseFinishTempParent" resultMap="FsCourseFinishTempParentResult">
- <include refid="selectFsCourseFinishTempParentVo"/>
- <where>
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
- <if test="courseId != null "> and course_id = #{courseId}</if>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="createBy != null "> and create_by = #{createBy}</if>
- <if test="userIds != null and !userIds.isEmpty() ">
- AND create_by IN
- <foreach collection='userIds' item='item' open='(' separator=',' close=')'>
- #{item}
- </foreach>
- </if>
- </where>
- </select>
- <select id="selectFsCourseFinishTempParentById" parameterType="Long" resultMap="FsCourseFinishTempParentResult">
- <include refid="selectFsCourseFinishTempParentVo"/>
- where id = #{id}
- </select>
- <insert id="insertFsCourseFinishTempParent" parameterType="FsCourseFinishTempParent" useGeneratedKeys="true" keyProperty="id">
- insert into fs_course_finish_temp_parent
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="name != null">name,</if>
- <if test="courseId != null">course_id,</if>
- <if test="createTime != null">create_time,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="name != null">#{name},</if>
- <if test="courseId != null">#{courseId},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateFsCourseFinishTempParent" parameterType="FsCourseFinishTempParent">
- update fs_course_finish_temp_parent
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null">name = #{name},</if>
- <if test="courseId != null">course_id = #{courseId},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteFsCourseFinishTempParentById" parameterType="Long">
- delete from fs_course_finish_temp_parent where id = #{id}
- </delete>
- <delete id="deleteFsCourseFinishTempParentByIds" parameterType="String">
- delete from fs_course_finish_temp_parent where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|