| | |
| | | <?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.ruoyi.media.mapper.VtduMapper"> |
| | | |
| | | |
| | | <resultMap type="Vtdu" id="VtduResult"> |
| | | <result property="name" column="name" /> |
| | | <result property="rtspUrl" column="rtsp_url" /> |
| | | <result property="isCode" column="is_code" /> |
| | | <result property="codeType" column="code_type" /> |
| | | <result property="name" column="name"/> |
| | | <result property="sourceUrl" column="source_url"/> |
| | | <result property="isCode" column="is_code"/> |
| | | <result property="codeType" column="code_type"/> |
| | | <result property="rtspUrl" column="rtsp_url"/> |
| | | <result property="rtmpUrl" column="rtmp_url"/> |
| | | <result property="webrtcUrl" column="webrtc_url"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectVtduVo"> |
| | | select name, rtsp_url, is_code, code_type from vtdu |
| | | select name, |
| | | source_url, |
| | | is_code, |
| | | code_type, |
| | | rtsp_url, |
| | | rtmp_url, |
| | | webrtc_url, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time |
| | | from vtdu |
| | | </sql> |
| | | |
| | | <select id="selectVtduList" parameterType="Vtdu" resultMap="VtduResult"> |
| | | <include refid="selectVtduVo"/> |
| | | <where> |
| | | <if test="name != null and name != ''"> and name like '%'||#{name}||'%'</if> |
| | | <if test="rtspUrl != null and rtspUrl != ''"> and rtsp_url = #{rtspUrl}</if> |
| | | <if test="isCode != null and isCode != ''"> and is_code = #{isCode}</if> |
| | | <if test="codeType != null and codeType != ''"> and code_type = #{codeType}</if> |
| | | <where> |
| | | <if test="name != null and name != ''">and name like '%'||#{name}||'%'</if> |
| | | <if test="sourceUrl != null and sourceUrl != ''">and source_url = #{sourceUrl}</if> |
| | | <if test="isCode != null and isCode != ''">and is_code = #{isCode}</if> |
| | | <if test="codeType != null and codeType != ''">and code_type = #{codeType}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectVtduByName" parameterType="String" resultMap="VtduResult"> |
| | | <include refid="selectVtduVo"/> |
| | | where name = #{name} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertVtdu" parameterType="Vtdu"> |
| | | insert into vtdu |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="name != null">name,</if> |
| | | <if test="rtspUrl != null">rtsp_url,</if> |
| | | <if test="sourceUrl != null">source_url,</if> |
| | | <if test="isCode != null">is_code,</if> |
| | | <if test="codeType != null">code_type,</if> |
| | | </trim> |
| | | <if test="rtspUrl != null">rtsp_url,</if> |
| | | <if test="rtmpUrl != null">rtmp_url,</if> |
| | | <if test="webrtcUrl != null">webrtc_url,</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> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="name != null">#{name},</if> |
| | | <if test="rtspUrl != null">#{rtspUrl},</if> |
| | | <if test="sourceUrl != null">#{sourceUrl},</if> |
| | | <if test="isCode != null">#{isCode},</if> |
| | | <if test="codeType != null">#{codeType},</if> |
| | | </trim> |
| | | <if test="rtspUrl != null">#{rtspUrl},</if> |
| | | <if test="rtmpUrl != null">#{rtmpUrl},</if> |
| | | <if test="webrtcUrl != null">#{webrtcUrl},</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> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateVtdu" parameterType="Vtdu"> |
| | | update vtdu |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="rtspUrl != null">rtsp_url = #{rtspUrl},</if> |
| | | <if test="sourceUrl != null">source_url = #{sourceUrl},</if> |
| | | <if test="isCode != null">is_code = #{isCode},</if> |
| | | <if test="codeType != null">code_type = #{codeType},</if> |
| | | <if test="rtspUrl != null">rtsp_url = #{rtspUrl},</if> |
| | | <if test="rtmpUrl != null">rtmp_url = #{rtmpUrl},</if> |
| | | <if test="webrtcUrl != null">webrtc_url = #{webrtcUrl},</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> |
| | | </trim> |
| | | where name = #{name} |
| | | </update> |
| | | |
| | | <delete id="deleteVtduByName" parameterType="String"> |
| | | delete from vtdu where name = #{name} |
| | | delete |
| | | from vtdu |
| | | where name = #{name} |
| | | </delete> |
| | | |
| | | <delete id="deleteVtduByNames" parameterType="String"> |