agent2.0版本数据适配,开发脚本策略接口
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?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.rocketmq.mapper.InitialSwitchInfoTempMapper">
|
||||
|
||||
<resultMap type="InitialSwitchInfoTemp" id="InitialSwitchInfoTempResult">
|
||||
@@ -15,6 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="inSpeed" column="in_speed" />
|
||||
<result property="outSpeed" column="out_speed" />
|
||||
<result property="switchIp" column="switch_ip" />
|
||||
<result property="ifIndex" column="if_index" />
|
||||
<result property="ifSpeed" column="if_speed" />
|
||||
<result property="ifInDiscards" column="if_in_discards" />
|
||||
<result property="ifOutDiscards" column="if_out_discards" />
|
||||
<result property="ifInErrors" column="if_in_errors" />
|
||||
<result property="ifOutErrors" column="if_out_errors" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@@ -22,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoTempVo">
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, create_by, update_by, create_time, update_time from initial_switch_info_temp
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, if_index, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, create_by, update_by, create_time, update_time from initial_switch_info_temp
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoTempList" parameterType="InitialSwitchInfoTemp" resultMap="InitialSwitchInfoTempResult">
|
||||
@@ -37,6 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="inSpeed != null "> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null "> and out_speed = #{outSpeed}</if>
|
||||
<if test="switchIp != null and switchIp != ''"> and switch_ip = #{switchIp}</if>
|
||||
<if test="ifIndex != null and ifIndex != ''"> and if_index = #{ifIndex}</if>
|
||||
<if test="ifSpeed != null "> and if_speed = #{ifSpeed}</if>
|
||||
<if test="ifInDiscards != null "> and if_in_discards = #{ifInDiscards}</if>
|
||||
<if test="ifOutDiscards != null "> and if_out_discards = #{ifOutDiscards}</if>
|
||||
<if test="ifInErrors != null "> and if_in_errors = #{ifInErrors}</if>
|
||||
<if test="ifOutErrors != null "> and if_out_errors = #{ifOutErrors}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -56,7 +68,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="type != null">type,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSpeed != null">out_speed,</if>
|
||||
<if test="switchIp != null">switch_ip,</if>
|
||||
<if test="switchIp != null and switchIp != ''">switch_ip,</if>
|
||||
<if test="ifIndex != null and ifIndex != ''">if_index,</if>
|
||||
<if test="ifSpeed != null">if_speed,</if>
|
||||
<if test="ifInDiscards != null">if_in_discards,</if>
|
||||
<if test="ifOutDiscards != null">if_out_discards,</if>
|
||||
<if test="ifInErrors != null">if_in_errors,</if>
|
||||
<if test="ifOutErrors != null">if_out_errors,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
@@ -71,7 +89,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSpeed != null">#{outSpeed},</if>
|
||||
<if test="switchIp != null">#{switchIp},</if>
|
||||
<if test="switchIp != null and switchIp != ''">#{switchIp},</if>
|
||||
<if test="ifIndex != null and ifIndex != ''">#{ifIndex},</if>
|
||||
<if test="ifSpeed != null">#{ifSpeed},</if>
|
||||
<if test="ifInDiscards != null">#{ifInDiscards},</if>
|
||||
<if test="ifOutDiscards != null">#{ifOutDiscards},</if>
|
||||
<if test="ifInErrors != null">#{ifInErrors},</if>
|
||||
<if test="ifOutErrors != null">#{ifOutErrors},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
@@ -90,7 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
|
||||
<if test="outSpeed != null">out_speed = #{outSpeed},</if>
|
||||
<if test="switchIp != null">switch_ip = #{switchIp},</if>
|
||||
<if test="switchIp != null and switchIp != ''">switch_ip = #{switchIp},</if>
|
||||
<if test="ifIndex != null and ifIndex != ''">if_index = #{ifIndex},</if>
|
||||
<if test="ifSpeed != null">if_speed = #{ifSpeed},</if>
|
||||
<if test="ifInDiscards != null">if_in_discards = #{ifInDiscards},</if>
|
||||
<if test="ifOutDiscards != null">if_out_discards = #{ifOutDiscards},</if>
|
||||
<if test="ifInErrors != null">if_in_errors = #{ifInErrors},</if>
|
||||
<if test="ifOutErrors != null">if_out_errors = #{ifOutErrors},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
@@ -109,17 +139,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialSwitchInfoTemp" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT IGNORE INTO initial_switch_info_temp
|
||||
(
|
||||
client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip,
|
||||
client_id, `name`, in_bytes, out_bytes, status, `type`, in_speed, out_speed, switch_ip,
|
||||
if_index, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors,
|
||||
create_by, update_by, create_time, update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId}, #{item.name}, #{item.inBytes}, #{item.outBytes},
|
||||
#{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.switchIp}, #{item.createBy}, #{item.updateBy},
|
||||
#{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.switchIp},
|
||||
#{item.ifIndex}, #{item.ifSpeed}, #{item.ifInDiscards},#{item.ifOutDiscards},#{item.ifInErrors},#{item.ifOutErrors},
|
||||
#{item.createBy}, #{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
@@ -139,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="truncateSwitchInfoTemp" parameterType="String">
|
||||
DELETE FROM initial_switch_info_temp
|
||||
WHERE
|
||||
|
||||
Reference in New Issue
Block a user