115 lines
6.8 KiB
XML
115 lines
6.8 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.ruoyi.rocketmq.mapper.InitialBandwidthTrafficMapper">
|
||
|
|
|
||
|
|
<resultMap type="InitialBandwidthTraffic" id="InitialBandwidthTrafficResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="interfaceName" column="interface_name" />
|
||
|
|
<result property="macAddress" column="mac_address" />
|
||
|
|
<result property="operationStatus" column="operation_status" />
|
||
|
|
<result property="interfaceType" column="interface_type" />
|
||
|
|
<result property="ipv4Address" column="ipv4_address" />
|
||
|
|
<result property="inboundPacketLoss" column="inbound_packet_loss" />
|
||
|
|
<result property="outboundPacketLoss" column="outbound_packet_loss" />
|
||
|
|
<result property="receiveBandwidth" column="receive_bandwidth" />
|
||
|
|
<result property="sendBandwidth" column="send_bandwidth" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectInitialBandwidthTrafficVo">
|
||
|
|
select id, interface_name, mac_address, operation_status, interface_type, ipv4_address, inbound_packet_loss, outbound_packet_loss, receive_bandwidth, send_bandwidth, create_time, update_time, create_by, update_by from initial_bandwidth_traffic
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectInitialBandwidthTrafficList" parameterType="InitialBandwidthTraffic" resultMap="InitialBandwidthTrafficResult">
|
||
|
|
<include refid="selectInitialBandwidthTrafficVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="interfaceName != null and interfaceName != ''"> and interface_name = #{interfaceName}</if>
|
||
|
|
<if test="macAddress != null and macAddress != ''"> and mac_address = #{macAddress}</if>
|
||
|
|
<if test="operationStatus != null and operationStatus != ''"> and operation_status = #{operationStatus}</if>
|
||
|
|
<if test="interfaceType != null and interfaceType != ''"> and interface_type = #{interfaceType}</if>
|
||
|
|
<if test="ipv4Address != null and ipv4Address != ''"> and ipv4_address = #{ipv4Address}</if>
|
||
|
|
<if test="inboundPacketLoss != null "> and inbound_packet_loss = #{inboundPacketLoss}</if>
|
||
|
|
<if test="outboundPacketLoss != null "> and outbound_packet_loss = #{outboundPacketLoss}</if>
|
||
|
|
<if test="receiveBandwidth != null "> and receive_bandwidth = #{receiveBandwidth}</if>
|
||
|
|
<if test="sendBandwidth != null "> and send_bandwidth = #{sendBandwidth}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectInitialBandwidthTrafficById" parameterType="Long" resultMap="InitialBandwidthTrafficResult">
|
||
|
|
<include refid="selectInitialBandwidthTrafficVo"/>
|
||
|
|
where id = #{id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertInitialBandwidthTraffic" parameterType="InitialBandwidthTraffic">
|
||
|
|
insert into initial_bandwidth_traffic
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">id,</if>
|
||
|
|
<if test="interfaceName != null">interface_name,</if>
|
||
|
|
<if test="macAddress != null">mac_address,</if>
|
||
|
|
<if test="operationStatus != null">operation_status,</if>
|
||
|
|
<if test="interfaceType != null">interface_type,</if>
|
||
|
|
<if test="ipv4Address != null">ipv4_address,</if>
|
||
|
|
<if test="inboundPacketLoss != null">inbound_packet_loss,</if>
|
||
|
|
<if test="outboundPacketLoss != null">outbound_packet_loss,</if>
|
||
|
|
<if test="receiveBandwidth != null">receive_bandwidth,</if>
|
||
|
|
<if test="sendBandwidth != null">send_bandwidth,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateTime != null">update_time,</if>
|
||
|
|
<if test="createBy != null">create_by,</if>
|
||
|
|
<if test="updateBy != null">update_by,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="id != null">#{id},</if>
|
||
|
|
<if test="interfaceName != null">#{interfaceName},</if>
|
||
|
|
<if test="macAddress != null">#{macAddress},</if>
|
||
|
|
<if test="operationStatus != null">#{operationStatus},</if>
|
||
|
|
<if test="interfaceType != null">#{interfaceType},</if>
|
||
|
|
<if test="ipv4Address != null">#{ipv4Address},</if>
|
||
|
|
<if test="inboundPacketLoss != null">#{inboundPacketLoss},</if>
|
||
|
|
<if test="outboundPacketLoss != null">#{outboundPacketLoss},</if>
|
||
|
|
<if test="receiveBandwidth != null">#{receiveBandwidth},</if>
|
||
|
|
<if test="sendBandwidth != null">#{sendBandwidth},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
<if test="createBy != null">#{createBy},</if>
|
||
|
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateInitialBandwidthTraffic" parameterType="InitialBandwidthTraffic">
|
||
|
|
update initial_bandwidth_traffic
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="interfaceName != null">interface_name = #{interfaceName},</if>
|
||
|
|
<if test="macAddress != null">mac_address = #{macAddress},</if>
|
||
|
|
<if test="operationStatus != null">operation_status = #{operationStatus},</if>
|
||
|
|
<if test="interfaceType != null">interface_type = #{interfaceType},</if>
|
||
|
|
<if test="ipv4Address != null">ipv4_address = #{ipv4Address},</if>
|
||
|
|
<if test="inboundPacketLoss != null">inbound_packet_loss = #{inboundPacketLoss},</if>
|
||
|
|
<if test="outboundPacketLoss != null">outbound_packet_loss = #{outboundPacketLoss},</if>
|
||
|
|
<if test="receiveBandwidth != null">receive_bandwidth = #{receiveBandwidth},</if>
|
||
|
|
<if test="sendBandwidth != null">send_bandwidth = #{sendBandwidth},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteInitialBandwidthTrafficById" parameterType="Long">
|
||
|
|
delete from initial_bandwidth_traffic where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteInitialBandwidthTrafficByIds" parameterType="String">
|
||
|
|
delete from initial_bandwidth_traffic where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
</mapper>
|