| | |
| | | <result property="chanNo" column="chan_no"/> |
| | | <result property="videoCode" column="video_code"/> |
| | | <result property="deviceId" column="device_id"/> |
| | | <result property="rtspUrl" column="rtsp_url"/> |
| | | <result property="type" column="type"/> |
| | | <result property="liveAddress" column="live_address"/> |
| | | <result property="snapUrl" column="snap_url"/> |
| | | <result property="mediaServerId" column="media_server_id"/> |
| | | <result property="streamKey" column="stream_key"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdChannelVo"> |
| | | select id, name, chan_no, video_code, device_id |
| | | select id, name, chan_no, video_code, device_id, type, live_address, snap_url, media_server_id, stream_key |
| | | from ard_channel |
| | | </sql> |
| | | |
| | |
| | | <if test="deviceId!=null">device_id=#{deviceId}</if> |
| | | </where> |
| | | order by chan_no |
| | | </select> |
| | | |
| | | <select id="queryByIds" resultMap="ArdChannelResult"> |
| | | <include refid="selectArdChannelVo"/> |
| | | where id in |
| | | <foreach item="id" collection="startArdChannelIdList" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="selectArdChannelById" parameterType="String" resultMap="ArdChannelResult"> |
| | |
| | | <if test="chanNo != null">chan_no,</if> |
| | | <if test="videoCode != null">video_code,</if> |
| | | <if test="deviceId != null">device_id,</if> |
| | | <if test="rtspUrl != null">rtsp_url,</if> |
| | | <if test="liveAddress != null">live_address,</if> |
| | | <if test="snapUrl != null">snap_url,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="mediaServerId != null">media_server_id,</if> |
| | | <if test="streamKey != null">stream_key,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="chanNo != null">#{chanNo},</if> |
| | | <if test="videoCode != null">#{videoCode},</if> |
| | | <if test="deviceId != null">#{deviceId},</if> |
| | | <if test="rtspUrl != null">#{rtspUrl},</if> |
| | | <if test="liveAddress != null">#{liveAddress},</if> |
| | | <if test="snapUrl != null">#{snapUrl},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="mediaServerId != null">#{mediaServerId},</if> |
| | | <if test="streamKey != null">#{streamKey},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="chanNo != null">chan_no = #{chanNo},</if> |
| | | <if test="videoCode != null">video_code = #{videoCode},</if> |
| | | <if test="deviceId != null">device_id = #{deviceId},</if> |
| | | <if test="rtspUrl != null">rtsp_url = #{rtspUrl},</if> |
| | | <if test="liveAddress != null">live_address = #{liveAddress},</if> |
| | | <if test="snapUrl != null">snap_url = #{snapUrl},</if> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="mediaServerId != null">media_server_id = #{mediaServerId},</if> |
| | | <if test="streamKey != null">stream_key = #{streamKey},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |