agent2.0版本数据适配,开发脚本策略接口

This commit is contained in:
gaoyutao
2025-09-23 18:21:05 +08:00
parent a9270027f4
commit d5f232e295
62 changed files with 5286 additions and 44 deletions
@@ -0,0 +1,157 @@
<?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.InitialOtherSystemMonitorDataMapper">
<resultMap type="InitialOtherSystemMonitorData" id="InitialOtherSystemMonitorDataResult">
<result property="id" column="id" />
<result property="clientId" column="client_id" />
<result property="systemSwapSizeFreeCollect" column="system_swap_size_free_collect" />
<result property="systemSwapSizePercentCollect" column="system_swap_size_percent_collect" />
<result property="memoryUtilizationCollect" column="memory_utilization_collect" />
<result property="memorySizeAvailableCollect" column="memory_size_available_collect" />
<result property="memorySizePercentCollect" column="memory_size_percent_collect" />
<result property="memorySizeTotalCollect" column="memory_size_total_collect" />
<result property="systemSwOsCollect" column="system_sw_os_collect" />
<result property="systemSwArchCollect" column="system_sw_arch_collect" />
<result property="kernelMaxprocCollect" column="kernel_maxproc_collect" />
<result property="procNumRunCollect" column="proc_num_run_collect" />
<result property="systemUsersNumCollect" column="system_users_num_collect" />
<result property="systemDiskSizeTotalCollect" column="system_disk_size_total_collect" />
<result property="systemBoottimeCollect" column="system_boottime_collect" />
<result property="systemUnameCollect" column="system_uname_collect" />
<result property="systemLocaltimeCollect" column="system_localtime_collect" />
<result property="systemUptimeCollect" column="system_uptime_collect" />
<result property="procNumCollect" column="proc_num_collect" />
<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="selectInitialOtherSystemMonitorDataVo">
select id, client_id, system_swap_size_free_collect, system_swap_size_percent_collect, memory_utilization_collect, memory_size_available_collect, memory_size_percent_collect, memory_size_total_collect, system_sw_os_collect, system_sw_arch_collect, kernel_maxproc_collect, proc_num_run_collect, system_users_num_collect, system_disk_size_total_collect, system_boottime_collect, system_uname_collect, system_localtime_collect, system_uptime_collect, proc_num_collect, create_time, update_time, create_by, update_by from initial_other_system_monitor_data
</sql>
<select id="selectInitialOtherSystemMonitorDataList" parameterType="InitialOtherSystemMonitorData" resultMap="InitialOtherSystemMonitorDataResult">
<include refid="selectInitialOtherSystemMonitorDataVo"/>
<where>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
<if test="systemSwapSizeFreeCollect != null "> and system_swap_size_free_collect = #{systemSwapSizeFreeCollect}</if>
<if test="systemSwapSizePercentCollect != null "> and system_swap_size_percent_collect = #{systemSwapSizePercentCollect}</if>
<if test="memoryUtilizationCollect != null "> and memory_utilization_collect = #{memoryUtilizationCollect}</if>
<if test="memorySizeAvailableCollect != null "> and memory_size_available_collect = #{memorySizeAvailableCollect}</if>
<if test="memorySizePercentCollect != null "> and memory_size_percent_collect = #{memorySizePercentCollect}</if>
<if test="memorySizeTotalCollect != null "> and memory_size_total_collect = #{memorySizeTotalCollect}</if>
<if test="systemSwOsCollect != null and systemSwOsCollect != ''"> and system_sw_os_collect = #{systemSwOsCollect}</if>
<if test="systemSwArchCollect != null and systemSwArchCollect != ''"> and system_sw_arch_collect = #{systemSwArchCollect}</if>
<if test="kernelMaxprocCollect != null "> and kernel_maxproc_collect = #{kernelMaxprocCollect}</if>
<if test="procNumRunCollect != null "> and proc_num_run_collect = #{procNumRunCollect}</if>
<if test="systemUsersNumCollect != null "> and system_users_num_collect = #{systemUsersNumCollect}</if>
<if test="systemDiskSizeTotalCollect != null "> and system_disk_size_total_collect = #{systemDiskSizeTotalCollect}</if>
<if test="systemBoottimeCollect != null "> and system_boottime_collect = #{systemBoottimeCollect}</if>
<if test="systemUnameCollect != null and systemUnameCollect != ''"> and system_uname_collect = #{systemUnameCollect}</if>
<if test="systemLocaltimeCollect != null "> and system_localtime_collect = #{systemLocaltimeCollect}</if>
<if test="systemUptimeCollect != null "> and system_uptime_collect = #{systemUptimeCollect}</if>
<if test="procNumCollect != null "> and proc_num_collect = #{procNumCollect}</if>
</where>
</select>
<select id="selectInitialOtherSystemMonitorDataById" parameterType="Long" resultMap="InitialOtherSystemMonitorDataResult">
<include refid="selectInitialOtherSystemMonitorDataVo"/>
where id = #{id}
</select>
<insert id="insertInitialOtherSystemMonitorData" parameterType="InitialOtherSystemMonitorData" useGeneratedKeys="true" keyProperty="id">
insert into initial_other_system_monitor_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="clientId != null">client_id,</if>
<if test="systemSwapSizeFreeCollect != null">system_swap_size_free_collect,</if>
<if test="systemSwapSizePercentCollect != null">system_swap_size_percent_collect,</if>
<if test="memoryUtilizationCollect != null">memory_utilization_collect,</if>
<if test="memorySizeAvailableCollect != null">memory_size_available_collect,</if>
<if test="memorySizePercentCollect != null">memory_size_percent_collect,</if>
<if test="memorySizeTotalCollect != null">memory_size_total_collect,</if>
<if test="systemSwOsCollect != null">system_sw_os_collect,</if>
<if test="systemSwArchCollect != null">system_sw_arch_collect,</if>
<if test="kernelMaxprocCollect != null">kernel_maxproc_collect,</if>
<if test="procNumRunCollect != null">proc_num_run_collect,</if>
<if test="systemUsersNumCollect != null">system_users_num_collect,</if>
<if test="systemDiskSizeTotalCollect != null">system_disk_size_total_collect,</if>
<if test="systemBoottimeCollect != null">system_boottime_collect,</if>
<if test="systemUnameCollect != null">system_uname_collect,</if>
<if test="systemLocaltimeCollect != null">system_localtime_collect,</if>
<if test="systemUptimeCollect != null">system_uptime_collect,</if>
<if test="procNumCollect != null">proc_num_collect,</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="clientId != null">#{clientId},</if>
<if test="systemSwapSizeFreeCollect != null">#{systemSwapSizeFreeCollect},</if>
<if test="systemSwapSizePercentCollect != null">#{systemSwapSizePercentCollect},</if>
<if test="memoryUtilizationCollect != null">#{memoryUtilizationCollect},</if>
<if test="memorySizeAvailableCollect != null">#{memorySizeAvailableCollect},</if>
<if test="memorySizePercentCollect != null">#{memorySizePercentCollect},</if>
<if test="memorySizeTotalCollect != null">#{memorySizeTotalCollect},</if>
<if test="systemSwOsCollect != null">#{systemSwOsCollect},</if>
<if test="systemSwArchCollect != null">#{systemSwArchCollect},</if>
<if test="kernelMaxprocCollect != null">#{kernelMaxprocCollect},</if>
<if test="procNumRunCollect != null">#{procNumRunCollect},</if>
<if test="systemUsersNumCollect != null">#{systemUsersNumCollect},</if>
<if test="systemDiskSizeTotalCollect != null">#{systemDiskSizeTotalCollect},</if>
<if test="systemBoottimeCollect != null">#{systemBoottimeCollect},</if>
<if test="systemUnameCollect != null">#{systemUnameCollect},</if>
<if test="systemLocaltimeCollect != null">#{systemLocaltimeCollect},</if>
<if test="systemUptimeCollect != null">#{systemUptimeCollect},</if>
<if test="procNumCollect != null">#{procNumCollect},</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="updateInitialOtherSystemMonitorData" parameterType="InitialOtherSystemMonitorData">
update initial_other_system_monitor_data
<trim prefix="SET" suffixOverrides=",">
<if test="clientId != null">client_id = #{clientId},</if>
<if test="systemSwapSizeFreeCollect != null">system_swap_size_free_collect = #{systemSwapSizeFreeCollect},</if>
<if test="systemSwapSizePercentCollect != null">system_swap_size_percent_collect = #{systemSwapSizePercentCollect},</if>
<if test="memoryUtilizationCollect != null">memory_utilization_collect = #{memoryUtilizationCollect},</if>
<if test="memorySizeAvailableCollect != null">memory_size_available_collect = #{memorySizeAvailableCollect},</if>
<if test="memorySizePercentCollect != null">memory_size_percent_collect = #{memorySizePercentCollect},</if>
<if test="memorySizeTotalCollect != null">memory_size_total_collect = #{memorySizeTotalCollect},</if>
<if test="systemSwOsCollect != null">system_sw_os_collect = #{systemSwOsCollect},</if>
<if test="systemSwArchCollect != null">system_sw_arch_collect = #{systemSwArchCollect},</if>
<if test="kernelMaxprocCollect != null">kernel_maxproc_collect = #{kernelMaxprocCollect},</if>
<if test="procNumRunCollect != null">proc_num_run_collect = #{procNumRunCollect},</if>
<if test="systemUsersNumCollect != null">system_users_num_collect = #{systemUsersNumCollect},</if>
<if test="systemDiskSizeTotalCollect != null">system_disk_size_total_collect = #{systemDiskSizeTotalCollect},</if>
<if test="systemBoottimeCollect != null">system_boottime_collect = #{systemBoottimeCollect},</if>
<if test="systemUnameCollect != null">system_uname_collect = #{systemUnameCollect},</if>
<if test="systemLocaltimeCollect != null">system_localtime_collect = #{systemLocaltimeCollect},</if>
<if test="systemUptimeCollect != null">system_uptime_collect = #{systemUptimeCollect},</if>
<if test="procNumCollect != null">proc_num_collect = #{procNumCollect},</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="deleteInitialOtherSystemMonitorDataById" parameterType="Long">
delete from initial_other_system_monitor_data where id = #{id}
</delete>
<delete id="deleteInitialOtherSystemMonitorDataByIds" parameterType="String">
delete from initial_other_system_monitor_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,87 @@
<?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.InitialSwitchFanInfoMapper">
<resultMap type="InitialSwitchFanInfo" id="InitialSwitchFanInfoResult">
<result property="id" column="id" />
<result property="fanEntIndex" column="fan_ent_index" />
<result property="fanName" column="fan_name" />
<result property="fanEntityFanState" column="fan_entity_fan_state" />
<result property="clientId" column="client_id" />
<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="selectInitialSwitchFanInfoVo">
select id, fan_ent_index, fan_name, fan_entity_fan_state, client_id, create_time, update_time, create_by, update_by from initial_switch_fan_info
</sql>
<select id="selectInitialSwitchFanInfoList" parameterType="InitialSwitchFanInfo" resultMap="InitialSwitchFanInfoResult">
<include refid="selectInitialSwitchFanInfoVo"/>
<where>
<if test="fanEntIndex != null and fanEntIndex != ''"> and fan_ent_index = #{fanEntIndex}</if>
<if test="fanName != null and fanName != ''"> and fan_name like concat('%', #{fanName}, '%')</if>
<if test="fanEntityFanState != null and fanEntityFanState != ''"> and fan_entity_fan_state = #{fanEntityFanState}</if>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
</where>
</select>
<select id="selectInitialSwitchFanInfoById" parameterType="Long" resultMap="InitialSwitchFanInfoResult">
<include refid="selectInitialSwitchFanInfoVo"/>
where id = #{id}
</select>
<insert id="insertInitialSwitchFanInfo" parameterType="InitialSwitchFanInfo" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_fan_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fanEntIndex != null">fan_ent_index,</if>
<if test="fanName != null">fan_name,</if>
<if test="fanEntityFanState != null">fan_entity_fan_state,</if>
<if test="clientId != null">client_id,</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="fanEntIndex != null">#{fanEntIndex},</if>
<if test="fanName != null">#{fanName},</if>
<if test="fanEntityFanState != null">#{fanEntityFanState},</if>
<if test="clientId != null">#{clientId},</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="updateInitialSwitchFanInfo" parameterType="InitialSwitchFanInfo">
update initial_switch_fan_info
<trim prefix="SET" suffixOverrides=",">
<if test="fanEntIndex != null">fan_ent_index = #{fanEntIndex},</if>
<if test="fanName != null">fan_name = #{fanName},</if>
<if test="fanEntityFanState != null">fan_entity_fan_state = #{fanEntityFanState},</if>
<if test="clientId != null">client_id = #{clientId},</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="deleteInitialSwitchFanInfoById" parameterType="Long">
delete from initial_switch_fan_info where id = #{id}
</delete>
<delete id="deleteInitialSwitchFanInfoByIds" parameterType="String">
delete from initial_switch_fan_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -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.InitialSwitchInfoMapper">
<resultMap type="InitialSwitchInfo" id="InitialSwitchInfoResult">
@@ -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="selectInitialSwitchInfoVo">
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
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
</sql>
<select id="selectInitialSwitchInfoList" parameterType="InitialSwitchInfo" resultMap="InitialSwitchInfoResult">
@@ -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>
@@ -57,6 +69,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inSpeed != null">in_speed,</if>
<if test="outSpeed != null">out_speed,</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>
@@ -72,6 +90,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inSpeed != null">#{inSpeed},</if>
<if test="outSpeed != null">#{outSpeed},</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>
@@ -91,6 +115,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
<if test="outSpeed != null">out_speed = #{outSpeed},</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>
@@ -114,13 +144,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
INSERT IGNORE INTO initial_switch_info
(
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}
@@ -140,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</foreach>
</insert>
<select id="getSwitchNetDetailsMsg" parameterType="String" resultMap="InitialSwitchInfoResult">
<include refid="selectInitialSwitchInfoVo"/>
where client_id = #{clientId}
@@ -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
@@ -0,0 +1,102 @@
<?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.InitialSwitchMpuInfoMapper">
<resultMap type="InitialSwitchMpuInfo" id="InitialSwitchMpuInfoResult">
<result property="id" column="id" />
<result property="mpuEntIndex" column="mpu_ent_index" />
<result property="mpuName" column="mpu_name" />
<result property="mpuEntityCpuUsage" column="mpu_entity_cpu_usage" />
<result property="mpuEntityMemUsage" column="mpu_entity_mem_usage" />
<result property="mpuPhysicalSoftwareRev" column="mpu_physical_software_rev" />
<result property="mpuEntityTemperature" column="mpu_entity_temperature" />
<result property="clientId" column="client_id" />
<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="selectInitialSwitchMpuInfoVo">
select id, mpu_ent_index, mpu_name, mpu_entity_cpu_usage, mpu_entity_mem_usage, mpu_physical_software_rev, mpu_entity_temperature, client_id, create_time, update_time, create_by, update_by from initial_switch_mpu_info
</sql>
<select id="selectInitialSwitchMpuInfoList" parameterType="InitialSwitchMpuInfo" resultMap="InitialSwitchMpuInfoResult">
<include refid="selectInitialSwitchMpuInfoVo"/>
<where>
<if test="mpuEntIndex != null and mpuEntIndex != ''"> and mpu_ent_index = #{mpuEntIndex}</if>
<if test="mpuName != null and mpuName != ''"> and mpu_name like concat('%', #{mpuName}, '%')</if>
<if test="mpuEntityCpuUsage != null "> and mpu_entity_cpu_usage = #{mpuEntityCpuUsage}</if>
<if test="mpuEntityMemUsage != null "> and mpu_entity_mem_usage = #{mpuEntityMemUsage}</if>
<if test="mpuPhysicalSoftwareRev != null and mpuPhysicalSoftwareRev != ''"> and mpu_physical_software_rev = #{mpuPhysicalSoftwareRev}</if>
<if test="mpuEntityTemperature != null "> and mpu_entity_temperature = #{mpuEntityTemperature}</if>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
</where>
</select>
<select id="selectInitialSwitchMpuInfoById" parameterType="Long" resultMap="InitialSwitchMpuInfoResult">
<include refid="selectInitialSwitchMpuInfoVo"/>
where id = #{id}
</select>
<insert id="insertInitialSwitchMpuInfo" parameterType="InitialSwitchMpuInfo" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_mpu_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="mpuEntIndex != null">mpu_ent_index,</if>
<if test="mpuName != null">mpu_name,</if>
<if test="mpuEntityCpuUsage != null">mpu_entity_cpu_usage,</if>
<if test="mpuEntityMemUsage != null">mpu_entity_mem_usage,</if>
<if test="mpuPhysicalSoftwareRev != null">mpu_physical_software_rev,</if>
<if test="mpuEntityTemperature != null">mpu_entity_temperature,</if>
<if test="clientId != null">client_id,</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="mpuEntIndex != null">#{mpuEntIndex},</if>
<if test="mpuName != null">#{mpuName},</if>
<if test="mpuEntityCpuUsage != null">#{mpuEntityCpuUsage},</if>
<if test="mpuEntityMemUsage != null">#{mpuEntityMemUsage},</if>
<if test="mpuPhysicalSoftwareRev != null">#{mpuPhysicalSoftwareRev},</if>
<if test="mpuEntityTemperature != null">#{mpuEntityTemperature},</if>
<if test="clientId != null">#{clientId},</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="updateInitialSwitchMpuInfo" parameterType="InitialSwitchMpuInfo">
update initial_switch_mpu_info
<trim prefix="SET" suffixOverrides=",">
<if test="mpuEntIndex != null">mpu_ent_index = #{mpuEntIndex},</if>
<if test="mpuName != null">mpu_name = #{mpuName},</if>
<if test="mpuEntityCpuUsage != null">mpu_entity_cpu_usage = #{mpuEntityCpuUsage},</if>
<if test="mpuEntityMemUsage != null">mpu_entity_mem_usage = #{mpuEntityMemUsage},</if>
<if test="mpuPhysicalSoftwareRev != null">mpu_physical_software_rev = #{mpuPhysicalSoftwareRev},</if>
<if test="mpuEntityTemperature != null">mpu_entity_temperature = #{mpuEntityTemperature},</if>
<if test="clientId != null">client_id = #{clientId},</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="deleteInitialSwitchMpuInfoById" parameterType="Long">
delete from initial_switch_mpu_info where id = #{id}
</delete>
<delete id="deleteInitialSwitchMpuInfoByIds" parameterType="String">
delete from initial_switch_mpu_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,102 @@
<?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.InitialSwitchOpticalModuleMapper">
<resultMap type="InitialSwitchOpticalModule" id="InitialSwitchOpticalModuleResult">
<result property="id" column="id" />
<result property="fiberEntIndex" column="fiber_ent_index" />
<result property="fiberPortName" column="fiber_port_name" />
<result property="hwEntityOpticalTxLowThreshold" column="hw_entity_optical_tx_low_threshold" />
<result property="hwEntityOpticalRxLowThreshold" column="hw_entity_optical_rx_low_threshold" />
<result property="hwEntityOpticalRxPower" column="hw_entity_optical_rx_power" />
<result property="hwEntityOpticalTxPower" column="hw_entity_optical_tx_power" />
<result property="clientId" column="client_id" />
<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="selectInitialSwitchOpticalModuleVo">
select id, fiber_ent_index, fiber_port_name, hw_entity_optical_tx_low_threshold, hw_entity_optical_rx_low_threshold, hw_entity_optical_rx_power, hw_entity_optical_tx_power, client_id, create_time, update_time, create_by, update_by from initial_switch_optical_module
</sql>
<select id="selectInitialSwitchOpticalModuleList" parameterType="InitialSwitchOpticalModule" resultMap="InitialSwitchOpticalModuleResult">
<include refid="selectInitialSwitchOpticalModuleVo"/>
<where>
<if test="fiberEntIndex != null and fiberEntIndex != ''"> and fiber_ent_index = #{fiberEntIndex}</if>
<if test="fiberPortName != null and fiberPortName != ''"> and fiber_port_name like concat('%', #{fiberPortName}, '%')</if>
<if test="hwEntityOpticalTxLowThreshold != null "> and hw_entity_optical_tx_low_threshold = #{hwEntityOpticalTxLowThreshold}</if>
<if test="hwEntityOpticalRxLowThreshold != null "> and hw_entity_optical_rx_low_threshold = #{hwEntityOpticalRxLowThreshold}</if>
<if test="hwEntityOpticalRxPower != null "> and hw_entity_optical_rx_power = #{hwEntityOpticalRxPower}</if>
<if test="hwEntityOpticalTxPower != null "> and hw_entity_optical_tx_power = #{hwEntityOpticalTxPower}</if>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
</where>
</select>
<select id="selectInitialSwitchOpticalModuleById" parameterType="Long" resultMap="InitialSwitchOpticalModuleResult">
<include refid="selectInitialSwitchOpticalModuleVo"/>
where id = #{id}
</select>
<insert id="insertInitialSwitchOpticalModule" parameterType="InitialSwitchOpticalModule" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_optical_module
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fiberEntIndex != null">fiber_ent_index,</if>
<if test="fiberPortName != null">fiber_port_name,</if>
<if test="hwEntityOpticalTxLowThreshold != null">hw_entity_optical_tx_low_threshold,</if>
<if test="hwEntityOpticalRxLowThreshold != null">hw_entity_optical_rx_low_threshold,</if>
<if test="hwEntityOpticalRxPower != null">hw_entity_optical_rx_power,</if>
<if test="hwEntityOpticalTxPower != null">hw_entity_optical_tx_power,</if>
<if test="clientId != null">client_id,</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="fiberEntIndex != null">#{fiberEntIndex},</if>
<if test="fiberPortName != null">#{fiberPortName},</if>
<if test="hwEntityOpticalTxLowThreshold != null">#{hwEntityOpticalTxLowThreshold},</if>
<if test="hwEntityOpticalRxLowThreshold != null">#{hwEntityOpticalRxLowThreshold},</if>
<if test="hwEntityOpticalRxPower != null">#{hwEntityOpticalRxPower},</if>
<if test="hwEntityOpticalTxPower != null">#{hwEntityOpticalTxPower},</if>
<if test="clientId != null">#{clientId},</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="updateInitialSwitchOpticalModule" parameterType="InitialSwitchOpticalModule">
update initial_switch_optical_module
<trim prefix="SET" suffixOverrides=",">
<if test="fiberEntIndex != null">fiber_ent_index = #{fiberEntIndex},</if>
<if test="fiberPortName != null">fiber_port_name = #{fiberPortName},</if>
<if test="hwEntityOpticalTxLowThreshold != null">hw_entity_optical_tx_low_threshold = #{hwEntityOpticalTxLowThreshold},</if>
<if test="hwEntityOpticalRxLowThreshold != null">hw_entity_optical_rx_low_threshold = #{hwEntityOpticalRxLowThreshold},</if>
<if test="hwEntityOpticalRxPower != null">hw_entity_optical_rx_power = #{hwEntityOpticalRxPower},</if>
<if test="hwEntityOpticalTxPower != null">hw_entity_optical_tx_power = #{hwEntityOpticalTxPower},</if>
<if test="clientId != null">client_id = #{clientId},</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="deleteInitialSwitchOpticalModuleById" parameterType="Long">
delete from initial_switch_optical_module where id = #{id}
</delete>
<delete id="deleteInitialSwitchOpticalModuleByIds" parameterType="String">
delete from initial_switch_optical_module where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,82 @@
<?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.InitialSwitchOtherCollectDataMapper">
<resultMap type="InitialSwitchOtherCollectData" id="InitialSwitchOtherCollectDataResult">
<result property="id" column="id" />
<result property="clientId" column="client_id" />
<result property="collectType" column="collect_type" />
<result property="collectValue" column="collect_value" />
<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="selectInitialSwitchOtherCollectDataVo">
select id, client_id, collect_type, collect_value, create_time, update_time, create_by, update_by from initial_switch_other_collect_data
</sql>
<select id="selectInitialSwitchOtherCollectDataList" parameterType="InitialSwitchOtherCollectData" resultMap="InitialSwitchOtherCollectDataResult">
<include refid="selectInitialSwitchOtherCollectDataVo"/>
<where>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
<if test="collectType != null and collectType != ''"> and collect_type = #{collectType}</if>
<if test="collectValue != null and collectValue != ''"> and collect_value = #{collectValue}</if>
</where>
</select>
<select id="selectInitialSwitchOtherCollectDataById" parameterType="Long" resultMap="InitialSwitchOtherCollectDataResult">
<include refid="selectInitialSwitchOtherCollectDataVo"/>
where id = #{id}
</select>
<insert id="insertInitialSwitchOtherCollectData" parameterType="InitialSwitchOtherCollectData" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_other_collect_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id,</if>
<if test="collectType != null and collectType != ''">collect_type,</if>
<if test="collectValue != null">collect_value,</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="clientId != null and clientId != ''">#{clientId},</if>
<if test="collectType != null and collectType != ''">#{collectType},</if>
<if test="collectValue != null">#{collectValue},</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="updateInitialSwitchOtherCollectData" parameterType="InitialSwitchOtherCollectData">
update initial_switch_other_collect_data
<trim prefix="SET" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
<if test="collectType != null and collectType != ''">collect_type = #{collectType},</if>
<if test="collectValue != null">collect_value = #{collectValue},</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="deleteInitialSwitchOtherCollectDataById" parameterType="Long">
delete from initial_switch_other_collect_data where id = #{id}
</delete>
<delete id="deleteInitialSwitchOtherCollectDataByIds" parameterType="String">
delete from initial_switch_other_collect_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,97 @@
<?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.InitialSwitchPowerSupplyMapper">
<resultMap type="InitialSwitchPowerSupply" id="InitialSwitchPowerSupplyResult">
<result property="id" column="id" />
<result property="pwrEntIndex" column="pwr_ent_index" />
<result property="pwrName" column="pwr_name" />
<result property="pwrEntityPwrState" column="pwr_entity_pwr_state" />
<result property="pwrEntityPwrCurrent" column="pwr_entity_pwr_current" />
<result property="pwrEntityPwrVoltage" column="pwr_entity_pwr_voltage" />
<result property="clientId" column="client_id" />
<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="selectInitialSwitchPowerSupplyVo">
select id, pwr_ent_index, pwr_name, pwr_entity_pwr_state, pwr_entity_pwr_current, pwr_entity_pwr_voltage, client_id, create_time, update_time, create_by, update_by from initial_switch_power_supply
</sql>
<select id="selectInitialSwitchPowerSupplyList" parameterType="InitialSwitchPowerSupply" resultMap="InitialSwitchPowerSupplyResult">
<include refid="selectInitialSwitchPowerSupplyVo"/>
<where>
<if test="pwrEntIndex != null and pwrEntIndex != ''"> and pwr_ent_index = #{pwrEntIndex}</if>
<if test="pwrName != null and pwrName != ''"> and pwr_name like concat('%', #{pwrName}, '%')</if>
<if test="pwrEntityPwrState != null and pwrEntityPwrState != ''"> and pwr_entity_pwr_state = #{pwrEntityPwrState}</if>
<if test="pwrEntityPwrCurrent != null "> and pwr_entity_pwr_current = #{pwrEntityPwrCurrent}</if>
<if test="pwrEntityPwrVoltage != null "> and pwr_entity_pwr_voltage = #{pwrEntityPwrVoltage}</if>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
</where>
</select>
<select id="selectInitialSwitchPowerSupplyById" parameterType="Long" resultMap="InitialSwitchPowerSupplyResult">
<include refid="selectInitialSwitchPowerSupplyVo"/>
where id = #{id}
</select>
<insert id="insertInitialSwitchPowerSupply" parameterType="InitialSwitchPowerSupply" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_power_supply
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pwrEntIndex != null">pwr_ent_index,</if>
<if test="pwrName != null">pwr_name,</if>
<if test="pwrEntityPwrState != null">pwr_entity_pwr_state,</if>
<if test="pwrEntityPwrCurrent != null">pwr_entity_pwr_current,</if>
<if test="pwrEntityPwrVoltage != null">pwr_entity_pwr_voltage,</if>
<if test="clientId != null">client_id,</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="pwrEntIndex != null">#{pwrEntIndex},</if>
<if test="pwrName != null">#{pwrName},</if>
<if test="pwrEntityPwrState != null">#{pwrEntityPwrState},</if>
<if test="pwrEntityPwrCurrent != null">#{pwrEntityPwrCurrent},</if>
<if test="pwrEntityPwrVoltage != null">#{pwrEntityPwrVoltage},</if>
<if test="clientId != null">#{clientId},</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="updateInitialSwitchPowerSupply" parameterType="InitialSwitchPowerSupply">
update initial_switch_power_supply
<trim prefix="SET" suffixOverrides=",">
<if test="pwrEntIndex != null">pwr_ent_index = #{pwrEntIndex},</if>
<if test="pwrName != null">pwr_name = #{pwrName},</if>
<if test="pwrEntityPwrState != null">pwr_entity_pwr_state = #{pwrEntityPwrState},</if>
<if test="pwrEntityPwrCurrent != null">pwr_entity_pwr_current = #{pwrEntityPwrCurrent},</if>
<if test="pwrEntityPwrVoltage != null">pwr_entity_pwr_voltage = #{pwrEntityPwrVoltage},</if>
<if test="clientId != null">client_id = #{clientId},</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="deleteInitialSwitchPowerSupplyById" parameterType="Long">
delete from initial_switch_power_supply where id = #{id}
</delete>
<delete id="deleteInitialSwitchPowerSupplyByIds" parameterType="String">
delete from initial_switch_power_supply where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,82 @@
<?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.InitialSystemOtherCollectDataMapper">
<resultMap type="InitialSystemOtherCollectData" id="InitialSystemOtherCollectDataResult">
<result property="id" column="id" />
<result property="clientId" column="client_id" />
<result property="collectType" column="collect_type" />
<result property="collectValue" column="collect_value" />
<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="selectInitialSystemOtherCollectDataVo">
select id, client_id, collect_type, collect_value, create_time, update_time, create_by, update_by from initial_system_other_collect_data
</sql>
<select id="selectInitialSystemOtherCollectDataList" parameterType="InitialSystemOtherCollectData" resultMap="InitialSystemOtherCollectDataResult">
<include refid="selectInitialSystemOtherCollectDataVo"/>
<where>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
<if test="collectType != null and collectType != ''"> and collect_type = #{collectType}</if>
<if test="collectValue != null and collectValue != ''"> and collect_value = #{collectValue}</if>
</where>
</select>
<select id="selectInitialSystemOtherCollectDataById" parameterType="Long" resultMap="InitialSystemOtherCollectDataResult">
<include refid="selectInitialSystemOtherCollectDataVo"/>
where id = #{id}
</select>
<insert id="insertInitialSystemOtherCollectData" parameterType="InitialSystemOtherCollectData" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_system_other_collect_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id,</if>
<if test="collectType != null and collectType != ''">collect_type,</if>
<if test="collectValue != null">collect_value,</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="clientId != null and clientId != ''">#{clientId},</if>
<if test="collectType != null and collectType != ''">#{collectType},</if>
<if test="collectValue != null">#{collectValue},</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="updateInitialSystemOtherCollectData" parameterType="InitialSystemOtherCollectData">
update initial_system_other_collect_data
<trim prefix="SET" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
<if test="collectType != null and collectType != ''">collect_type = #{collectType},</if>
<if test="collectValue != null">collect_value = #{collectValue},</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="deleteInitialSystemOtherCollectDataById" parameterType="Long">
delete from initial_system_other_collect_data where id = #{id}
</delete>
<delete id="deleteInitialSystemOtherCollectDataByIds" parameterType="String">
delete from initial_system_other_collect_data where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,132 @@
<?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.RmDeploymentPolicyMapper">
<resultMap type="RmDeploymentPolicy" id="RmDeploymentPolicyResult">
<result property="id" column="id" />
<result property="policyName" column="policy_name" />
<result property="description" column="description" />
<result property="resourceGroupId" column="resource_group_id" />
<result property="includedDevicesId" column="included_devices_id" />
<result property="sourceFilePathType" column="source_file_path_type" />
<result property="sourceFilePath" column="source_file_path" />
<result property="targetDirectory" column="target_directory" />
<result property="commandContent" column="command_content" />
<result property="executionMethod" column="execution_method" />
<result property="scheduledTime" column="scheduled_time" />
<result property="policyStatus" column="policy_status" />
<result property="deployTime" column="deploy_time" />
<result property="scriptType" column="script_type" />
<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="selectRmDeploymentPolicyVo">
select id, policy_name, description, resource_group_id, included_devices_id, source_file_path_type, source_file_path, target_directory, command_content, execution_method, scheduled_time, policy_status, deploy_time, script_type, create_time, update_time, create_by, update_by from rm_deployment_policy
</sql>
<select id="selectRmDeploymentPolicyList" parameterType="RmDeploymentPolicy" resultMap="RmDeploymentPolicyResult">
<include refid="selectRmDeploymentPolicyVo"/>
<where>
<if test="policyName != null and policyName != ''"> and policy_name like concat('%', #{policyName}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="resourceGroupId != null "> and resource_group_id = #{resourceGroupId}</if>
<if test="includedDevicesId != null and includedDevicesId != ''"> and included_devices_id = #{includedDevicesId}</if>
<if test="sourceFilePathType != null and sourceFilePathType != ''"> and source_file_path_type = #{sourceFilePathType}</if>
<if test="sourceFilePath != null and sourceFilePath != ''"> and source_file_path = #{sourceFilePath}</if>
<if test="targetDirectory != null and targetDirectory != ''"> and target_directory = #{targetDirectory}</if>
<if test="commandContent != null and commandContent != ''"> and command_content = #{commandContent}</if>
<if test="executionMethod != null"> and execution_method = #{executionMethod}</if>
<if test="scheduledTime != null and scheduledTime != ''"> and scheduled_time = #{scheduledTime}</if>
<if test="policyStatus != null and policyStatus != ''"> and policy_status = #{policyStatus}</if>
<if test="deployTime != null "> and deploy_time = #{deployTime}</if>
<if test="scriptType != null and scriptType != ''"> and script_type = #{scriptType}</if>
</where>
</select>
<select id="selectRmDeploymentPolicyById" parameterType="Long" resultMap="RmDeploymentPolicyResult">
<include refid="selectRmDeploymentPolicyVo"/>
where id = #{id}
</select>
<insert id="insertRmDeploymentPolicy" parameterType="RmDeploymentPolicy" useGeneratedKeys="true" keyProperty="id">
insert into rm_deployment_policy
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="policyName != null and policyName != ''">policy_name,</if>
<if test="description != null">description,</if>
<if test="resourceGroupId != null">resource_group_id,</if>
<if test="includedDevicesId != null">included_devices_id,</if>
<if test="sourceFilePathType != null">source_file_path_type,</if>
<if test="sourceFilePath != null and sourceFilePath != ''">source_file_path,</if>
<if test="targetDirectory != null and targetDirectory != ''">target_directory,</if>
<if test="commandContent != null">command_content,</if>
<if test="executionMethod != null">execution_method,</if>
<if test="scheduledTime != null">scheduled_time,</if>
<if test="policyStatus != null and policyStatus != ''">policy_status,</if>
<if test="deployTime != null">deploy_time,</if>
<if test="scriptType != null">script_type,</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="policyName != null and policyName != ''">#{policyName},</if>
<if test="description != null">#{description},</if>
<if test="resourceGroupId != null">#{resourceGroupId},</if>
<if test="includedDevicesId != null">#{includedDevicesId},</if>
<if test="sourceFilePathType != null">#{sourceFilePathType},</if>
<if test="sourceFilePath != null and sourceFilePath != ''">#{sourceFilePath},</if>
<if test="targetDirectory != null and targetDirectory != ''">#{targetDirectory},</if>
<if test="commandContent != null">#{commandContent},</if>
<if test="executionMethod != null">#{executionMethod},</if>
<if test="scheduledTime != null">#{scheduledTime},</if>
<if test="policyStatus != null and policyStatus != ''">#{policyStatus},</if>
<if test="deployTime != null">#{deployTime},</if>
<if test="scriptType != null">#{scriptType},</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="updateRmDeploymentPolicy" parameterType="RmDeploymentPolicy">
update rm_deployment_policy
<trim prefix="SET" suffixOverrides=",">
<if test="policyName != null and policyName != ''">policy_name = #{policyName},</if>
<if test="description != null">description = #{description},</if>
<if test="resourceGroupId != null">resource_group_id = #{resourceGroupId},</if>
<if test="includedDevicesId != null">included_devices_id = #{includedDevicesId},</if>
<if test="sourceFilePathType != null">source_file_path_type = #{sourceFilePathType},</if>
<if test="sourceFilePath != null and sourceFilePath != ''">source_file_path = #{sourceFilePath},</if>
<if test="targetDirectory != null and targetDirectory != ''">target_directory = #{targetDirectory},</if>
<if test="commandContent != null">command_content = #{commandContent},</if>
<if test="executionMethod != null">execution_method = #{executionMethod},</if>
<if test="scheduledTime != null">scheduled_time = #{scheduledTime},</if>
<if test="policyStatus != null and policyStatus != ''">policy_status = #{policyStatus},</if>
<if test="deployTime != null">deploy_time = #{deployTime},</if>
<if test="scriptType != null">script_type = #{scriptType},</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="deleteRmDeploymentPolicyById" parameterType="Long">
delete from rm_deployment_policy where id = #{id}
</delete>
<delete id="deleteRmDeploymentPolicyByIds" parameterType="String">
delete from rm_deployment_policy where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>