106 lines
5.3 KiB
XML
106 lines
5.3 KiB
XML
|
<?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.yanzhu.manage.mapper.BusTrainingVideoUserMapper">
|
||
|
|
||
|
<resultMap type="BusTrainingVideoUser" id="BusTrainingVideoUserResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="deptId" column="dept_id" />
|
||
|
<result property="projectId" column="project_id" />
|
||
|
<result property="userId" column="user_id" />
|
||
|
<result property="videoId" column="video_id" />
|
||
|
<result property="playStatus" column="play_status" />
|
||
|
<result property="sortBy" column="sort_by" />
|
||
|
<result property="isDel" column="is_del" />
|
||
|
<result property="createBy" column="create_by" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="remark" column="remark" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectBusTrainingVideoUserVo">
|
||
|
select id, dept_id, project_id, user_id, video_id, play_status, sort_by, is_del, create_by, create_time, update_by, update_time, remark from bus_training_video_user
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectBusTrainingVideoUserList" parameterType="BusTrainingVideoUser" resultMap="BusTrainingVideoUserResult">
|
||
|
<include refid="selectBusTrainingVideoUserVo"/>
|
||
|
<where>
|
||
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||
|
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||
|
<if test="videoId != null "> and video_id = #{videoId}</if>
|
||
|
<if test="playStatus != null "> and play_status = #{playStatus}</if>
|
||
|
<if test="sortBy != null "> and sort_by = #{sortBy}</if>
|
||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectBusTrainingVideoUserById" parameterType="Long" resultMap="BusTrainingVideoUserResult">
|
||
|
<include refid="selectBusTrainingVideoUserVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertBusTrainingVideoUser" parameterType="BusTrainingVideoUser" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into bus_training_video_user
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="deptId != null">dept_id,</if>
|
||
|
<if test="projectId != null">project_id,</if>
|
||
|
<if test="userId != null">user_id,</if>
|
||
|
<if test="videoId != null">video_id,</if>
|
||
|
<if test="playStatus != null">play_status,</if>
|
||
|
<if test="sortBy != null">sort_by,</if>
|
||
|
<if test="isDel != null">is_del,</if>
|
||
|
<if test="createBy != null">create_by,</if>
|
||
|
<if test="createTime != null">create_time,</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="deptId != null">#{deptId},</if>
|
||
|
<if test="projectId != null">#{projectId},</if>
|
||
|
<if test="userId != null">#{userId},</if>
|
||
|
<if test="videoId != null">#{videoId},</if>
|
||
|
<if test="playStatus != null">#{playStatus},</if>
|
||
|
<if test="sortBy != null">#{sortBy},</if>
|
||
|
<if test="isDel != null">#{isDel},</if>
|
||
|
<if test="createBy != null">#{createBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateBusTrainingVideoUser" parameterType="BusTrainingVideoUser">
|
||
|
update bus_training_video_user
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||
|
<if test="userId != null">user_id = #{userId},</if>
|
||
|
<if test="videoId != null">video_id = #{videoId},</if>
|
||
|
<if test="playStatus != null">play_status = #{playStatus},</if>
|
||
|
<if test="sortBy != null">sort_by = #{sortBy},</if>
|
||
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</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="deleteBusTrainingVideoUserById" parameterType="Long">
|
||
|
delete from bus_training_video_user where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteBusTrainingVideoUserByIds" parameterType="String">
|
||
|
delete from bus_training_video_user where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|