1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?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.manage.mapper.ChannelNumberMapper">
-
- <resultMap type="ChannelNumber" id="ChannelNumberResult">
- <result property="channelId" column="channel_id" />
- <result property="channelNum" column="channel_num" />
- <result property="videoAddress" column="video_address" />
- <result property="protocolType" column="protocol_type" />
- <result property="channelDetails" column="channel_details" />
- <result property="delFlag" column="del_flag" />
- <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="selectChannelNumberVo">
- select channel_id, channel_num, video_address, protocol_type, channel_details, del_flag, create_by, create_time, update_by, update_time, remark from channel_number
- </sql>
- <select id="selectChannelNumberList" parameterType="ChannelNumber" resultMap="ChannelNumberResult">
- <include refid="selectChannelNumberVo"/>
- <where>
- <if test="channelNum != null and channelNum != ''"> and channel_num = #{channelNum}</if>
- <if test="videoAddress != null and videoAddress != ''"> and video_address = #{videoAddress}</if>
- <if test="protocolType != null and protocolType != ''"> and protocol_type = #{protocolType}</if>
- <if test="channelDetails != null and channelDetails != ''"> and channel_details = #{channelDetails}</if>
- </where>
- </select>
-
- <select id="selectChannelNumberByChannelId" parameterType="Long" resultMap="ChannelNumberResult">
- <include refid="selectChannelNumberVo"/>
- where channel_id = #{channelId}
- </select>
- <insert id="insertChannelNumber" parameterType="ChannelNumber" useGeneratedKeys="true" keyProperty="channelId">
- insert into channel_number
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="channelNum != null">channel_num,</if>
- <if test="videoAddress != null">video_address,</if>
- <if test="protocolType != null">protocol_type,</if>
- <if test="channelDetails != null">channel_details,</if>
- <if test="delFlag != null">del_flag,</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="channelNum != null">#{channelNum},</if>
- <if test="videoAddress != null">#{videoAddress},</if>
- <if test="protocolType != null">#{protocolType},</if>
- <if test="channelDetails != null">#{channelDetails},</if>
- <if test="delFlag != null">#{delFlag},</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="updateChannelNumber" parameterType="ChannelNumber">
- update channel_number
- <trim prefix="SET" suffixOverrides=",">
- <if test="channelNum != null">channel_num = #{channelNum},</if>
- <if test="videoAddress != null">video_address = #{videoAddress},</if>
- <if test="protocolType != null">protocol_type = #{protocolType},</if>
- <if test="channelDetails != null">channel_details = #{channelDetails},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</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 channel_id = #{channelId}
- </update>
- <delete id="deleteChannelNumberByChannelId" parameterType="Long">
- delete from channel_number where channel_id = #{channelId}
- </delete>
- <delete id="deleteChannelNumberByChannelIds" parameterType="String">
- delete from channel_number where channel_id in
- <foreach item="channelId" collection="array" open="(" separator="," close=")">
- #{channelId}
- </foreach>
- </delete>
- </mapper>
|