优化实时95值计算功能、服务器收益功能、用户自定义列展示、交换机基础数据采集

This commit is contained in:
gaoyutao
2025-10-31 21:46:17 +08:00
parent c0f057d7ed
commit 01c51b39fe
36 changed files with 964 additions and 452 deletions
@@ -14,7 +14,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="type" column="type" />
<result property="inSpeed" column="in_speed" />
<result property="outSpeed" column="out_speed" />
<result property="maxSpeed" column="max_speed" />
<result property="switchIp" column="switch_ip" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
@@ -34,10 +33,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="ifInErrors" column="if_in_errors" />
<result property="ifOutErrors" column="if_out_errors" />
<result property="ifIndex" column="if_index" />
<result property="maxSpeed" column="max_speed" />
<result property="interfaceNameRemark" column="interface_name_remark" />
<result property="serverClientId" column="server_client_id" />
</resultMap>
<sql id="selectInitialSwitchInfoDetailsVo">
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, max_speed, switch_ip, create_by, update_by, create_time, update_time, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn, business_code, business_name, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, if_index from initial_switch_info_details
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, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn, business_code, business_name, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, if_index, max_speed, interface_name_remark, server_client_id from initial_switch_info_details
</sql>
<select id="selectInitialSwitchInfoDetailsList" parameterType="InitialSwitchInfoDetails" resultMap="InitialSwitchInfoDetailsResult">
@@ -60,6 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
<if test="interfaceNameRemark != null and interfaceNameRemark != ''"> and interface_name_remark = #{interfaceNameRemark}</if>
<if test="serverClientId != null and serverClientId != ''"> and server_client_id = #{serverClientId}</if>
<if test="startTime != null">
and create_time &gt;= #{startTime}
</if>
@@ -86,7 +90,6 @@ 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="maxSpeed != null">max_speed,</if>
<if test="switchIp != null">switch_ip,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
@@ -105,7 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="ifIndex != null and ifIndex != ''">if_index,</if>
<if test="ifIndex != null">if_index,</if>
<if test="maxSpeed != null">max_speed,</if>
<if test="interfaceNameRemark != null">interface_name_remark,</if>
<if test="serverClientId != null">server_client_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="clientId != null and clientId != ''">#{clientId},</if>
@@ -116,7 +122,6 @@ 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="maxSpeed != null">#{maxSpeed},</if>
<if test="switchIp != null">#{switchIp},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
@@ -135,7 +140,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ifOutDiscards != null">#{ifOutDiscards},</if>
<if test="ifInErrors != null">#{ifInErrors},</if>
<if test="ifOutErrors != null">#{ifOutErrors},</if>
<if test="ifIndex != null and ifIndex != ''">#{ifIndex},</if>
<if test="ifIndex != null">#{ifIndex},</if>
<if test="maxSpeed != null">#{maxSpeed},</if>
<if test="interfaceNameRemark != null">#{interfaceNameRemark},</if>
<if test="serverClientId != null">#{serverClientId},</if>
</trim>
</insert>
@@ -150,7 +158,6 @@ 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="maxSpeed != null">max_speed = #{maxSpeed},</if>
<if test="switchIp != null">switch_ip = #{switchIp},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
@@ -169,7 +176,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="ifIndex != null and ifIndex != ''">if_index = #{ifIndex},</if>
<if test="ifIndex != null">if_index = #{ifIndex},</if>
<if test="maxSpeed != null">max_speed = #{maxSpeed},</if>
<if test="interfaceNameRemark != null">interface_name_remark = #{interfaceNameRemark},</if>
<if test="serverClientId != null">server_client_id = #{serverClientId},</if>
</trim>
where id = #{id}
</update>
@@ -196,7 +206,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
`type`,
in_speed AS inSpeed,
out_speed AS outSpeed,
max_speed AS maxSpeed,
switch_ip AS switchIp,
if_index AS ifIndex,
if_speed AS ifSpeed,
@@ -248,7 +257,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
create_by,
update_by,
create_time,
update_time
update_time,
interface_name_remark,
server_client_id
)
VALUES
<foreach collection="dataList" item="item" separator=",">
@@ -294,7 +305,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<otherwise>
NOW()
</otherwise>
</choose>
</choose>,
#{item.interfaceNameRemark},
#{item.serverClientId}
)
</foreach>
</insert>