|
@@ -0,0 +1,111 @@
|
|
|
+<?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.ruoyi.okc.mapper.OkcVideoProMapper">
|
|
|
+
|
|
|
+ <resultMap type="OkcVideoPro" id="OkcVideoProResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="videoName" column="video_name" />
|
|
|
+ <result property="videoUrl" column="video_url" />
|
|
|
+ <result property="createTimeStr" column="create_time_str" />
|
|
|
+ <result property="createUserId" column="create_user_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createUserType" column="create_user_type" />
|
|
|
+ <result property="createUnit" column="create_unit" />
|
|
|
+ <result property="createUnitName" column="create_unit_name" />
|
|
|
+ <result property="updateTimeStr" column="update_time_str" />
|
|
|
+ <result property="updateUserId" column="update_user_id" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateUnit" column="update_unit" />
|
|
|
+ <result property="updateUnitName" column="update_unit_name" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectOkcVideoProVo">
|
|
|
+ select id, video_name, video_url, create_time_str, create_user_id, create_by, create_user_type, create_unit, create_unit_name, update_time_str, update_user_id, update_by, update_unit, update_unit_name, status from okc_videopro
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectOkcVideoProList" parameterType="OkcVideoPro" resultMap="OkcVideoProResult">
|
|
|
+ <include refid="selectOkcVideoProVo"/>
|
|
|
+ <where>
|
|
|
+ create_user_id = #{createUserId}
|
|
|
+ <if test="videoName != null and videoName != ''"> and video_name like concat('%', #{videoName}, '%')</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectOkcVideoProById" parameterType="String" resultMap="OkcVideoProResult">
|
|
|
+ <include refid="selectOkcVideoProVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertOkcVideoPro" parameterType="OkcVideoPro">
|
|
|
+ insert into okc_videopro
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="videoName != null and videoName != ''">video_name,</if>
|
|
|
+ <if test="videoUrl != null and videoUrl != ''">video_url,</if>
|
|
|
+ <if test="createTimeStr != null">create_time_str,</if>
|
|
|
+ <if test="createUserId != null">create_user_id,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createUserType != null">create_user_type,</if>
|
|
|
+ <if test="createUnit != null">create_unit,</if>
|
|
|
+ <if test="createUnitName != null">create_unit_name,</if>
|
|
|
+ <if test="updateTimeStr != null">update_time_str,</if>
|
|
|
+ <if test="updateUserId != null">update_user_id,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateUnit != null">update_unit,</if>
|
|
|
+ <if test="updateUnitName != null">update_unit_name,</if>
|
|
|
+ <if test="status != null and status != ''">status,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="videoName != null and videoName != ''">#{videoName},</if>
|
|
|
+ <if test="videoUrl != null and videoUrl != ''">#{videoUrl},</if>
|
|
|
+ <if test="createTimeStr != null">#{createTimeStr},</if>
|
|
|
+ <if test="createUserId != null">#{createUserId},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createUserType != null">#{createUserType},</if>
|
|
|
+ <if test="createUnit != null">#{createUnit},</if>
|
|
|
+ <if test="createUnitName != null">#{createUnitName},</if>
|
|
|
+ <if test="updateTimeStr != null">#{updateTimeStr},</if>
|
|
|
+ <if test="updateUserId != null">#{updateUserId},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateUnit != null">#{updateUnit},</if>
|
|
|
+ <if test="updateUnitName != null">#{updateUnitName},</if>
|
|
|
+ <if test="status != null and status != ''">#{status},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateOkcVideoPro" parameterType="OkcVideoPro">
|
|
|
+ update okc_videopro
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="videoName != null and videoName != ''">video_name = #{videoName},</if>
|
|
|
+ <if test="videoUrl != null and videoUrl != ''">video_url = #{videoUrl},</if>
|
|
|
+ <if test="createTimeStr != null">create_time_str = #{createTimeStr},</if>
|
|
|
+ <if test="createUserId != null">create_user_id = #{createUserId},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createUserType != null">create_user_type = #{createUserType},</if>
|
|
|
+ <if test="createUnit != null">create_unit = #{createUnit},</if>
|
|
|
+ <if test="createUnitName != null">create_unit_name = #{createUnitName},</if>
|
|
|
+ <if test="updateTimeStr != null">update_time_str = #{updateTimeStr},</if>
|
|
|
+ <if test="updateUserId != null">update_user_id = #{updateUserId},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateUnit != null">update_unit = #{updateUnit},</if>
|
|
|
+ <if test="updateUnitName != null">update_unit_name = #{updateUnitName},</if>
|
|
|
+ <if test="status != null and status != ''">status = #{status},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteOkcVideoProById" parameterType="String">
|
|
|
+ delete from okc_videopro where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteOkcVideoProByIds" parameterType="String">
|
|
|
+ delete from okc_videopro where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|