金山云服务API调用并入库,交换机管理功能新增

This commit is contained in:
gaoyutao
2025-10-10 18:17:53 +08:00
parent 7b5c782079
commit 6ffdf8d355
31 changed files with 2176 additions and 99 deletions
@@ -14,8 +14,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ipV4 VARCHAR(20) COMMENT 'IPv4地址',
`in_dropped` DECIMAL(20,2) COMMENT '入站丢包率(%)',
`out_dropped` DECIMAL(20,2) COMMENT '出站丢包率(%)',
`in_speed` varchar(50) COMMENT '接收带宽(Mbps)',
`out_speed` varchar(50) COMMENT '发送带宽(Mbps)',
`in_speed` varchar(50) COMMENT '接收带宽(bit)',
`out_speed` varchar(50) COMMENT '发送带宽(bit)',
`machine_flow` varchar(50) COMMENT '金山带宽(bit)',
`speed` varchar(100) COMMENT '协商速度',
`duplex` varchar(100) COMMENT '工作模式',
business_id varchar(50) COMMENT '业务代码',
@@ -176,6 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
`out_dropped` AS outDropped,
`in_speed` AS inSpeed,
`out_speed` AS outSpeed,
`machine_flow` AS machineFlow,
`speed` AS speed,
`duplex` AS duplex,
business_id AS businessId,
@@ -243,4 +245,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
ORDER BY create_time desc
</select>
<update id="updateMachineTraffic" parameterType="EpsInitialTrafficData">
update ${tableName} set machine_flow=#{machineFlow} where client_id=#{clientId} and create_time=#{createTime}
</update>
</mapper>
@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="bandwidth95Monthly" column="bandwidth_95_monthly" />
<result property="avgMonthlyBandwidth95" column="avg_monthly_bandwidth_95" />
<result property="packageBandwidthDaily" column="package_bandwidth_daily" />
<result property="machineFlow" column="machine_flow" />
<result property="customerId" column="customer_id" />
<result property="customerName" column="customer_name" />
<result property="serviceNumber" column="service_number" />
@@ -37,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectEpsNodeBandwidthVo">
select id, node_name, hardware_sn, calculation_mode, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, switch_sn, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id, remark1, create_datetime from eps_node_bandwidth
select id, node_name, hardware_sn, calculation_mode, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, machine_flow, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, switch_sn, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id, remark1, create_datetime from eps_node_bandwidth
</sql>
<select id="selectEpsNodeBandwidthList" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
@@ -0,0 +1,77 @@
<?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.system.mapper.RmRegistrationMachineMapper">
<resultMap type="RmRegistrationMachine" id="RmRegistrationMachineResult">
<result property="id" column="id" />
<result property="clientId" column="client_id" />
<result property="machineCode" column="machine_code" />
<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="selectRmRegistrationMachineVo">
select id, client_id, machine_code, create_time, update_time, create_by, update_by from rm_registration_machine
</sql>
<select id="selectRmRegistrationMachineList" parameterType="RmRegistrationMachine" resultMap="RmRegistrationMachineResult">
<include refid="selectRmRegistrationMachineVo"/>
<where>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
<if test="machineCode != null and machineCode != ''"> and machine_code = #{machineCode}</if>
</where>
</select>
<select id="selectRmRegistrationMachineById" parameterType="Long" resultMap="RmRegistrationMachineResult">
<include refid="selectRmRegistrationMachineVo"/>
where id = #{id}
</select>
<insert id="insertRmRegistrationMachine" parameterType="RmRegistrationMachine" useGeneratedKeys="true" keyProperty="id">
insert into rm_registration_machine
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id,</if>
<if test="machineCode != null and machineCode != ''">machine_code,</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="machineCode != null and machineCode != ''">#{machineCode},</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="updateRmRegistrationMachine" parameterType="RmRegistrationMachine">
update rm_registration_machine
<trim prefix="SET" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
<if test="machineCode != null and machineCode != ''">machine_code = #{machineCode},</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="deleteRmRegistrationMachineById" parameterType="Long">
delete from rm_registration_machine where id = #{id}
</delete>
<delete id="deleteRmRegistrationMachineByIds" parameterType="String">
delete from rm_registration_machine 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.system.mapper.RmSwitchInterfaceInfoMapper">
<resultMap type="RmSwitchInterfaceInfo" id="RmSwitchInterfaceInfoResult">
<result property="id" column="id" />
<result property="hardwareSn" column="hardware_sn" />
<result property="switchName" column="switch_name" />
<result property="interfaceName" column="interface_name" />
<result property="interfaceRemark" column="interface_remark" />
<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="selectRmSwitchInterfaceInfoVo">
select id, hardware_sn, switch_name, interface_name, interface_remark, create_time, update_time, create_by, update_by from rm_switch_interface_info
</sql>
<select id="selectRmSwitchInterfaceInfoList" parameterType="RmSwitchInterfaceInfo" resultMap="RmSwitchInterfaceInfoResult">
<include refid="selectRmSwitchInterfaceInfoVo"/>
<where>
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
<if test="interfaceRemark != null and interfaceRemark != ''"> and interface_remark = #{interfaceRemark}</if>
</where>
</select>
<select id="selectRmSwitchInterfaceInfoById" parameterType="Long" resultMap="RmSwitchInterfaceInfoResult">
<include refid="selectRmSwitchInterfaceInfoVo"/>
where id = #{id}
</select>
<insert id="insertRmSwitchInterfaceInfo" parameterType="RmSwitchInterfaceInfo" useGeneratedKeys="true" keyProperty="id">
insert into rm_switch_interface_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn,</if>
<if test="switchName != null and switchName != ''">switch_name,</if>
<if test="interfaceName != null and interfaceName != ''">interface_name,</if>
<if test="interfaceRemark != null">interface_remark,</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="hardwareSn != null and hardwareSn != ''">#{hardwareSn},</if>
<if test="switchName != null and switchName != ''">#{switchName},</if>
<if test="interfaceName != null and interfaceName != ''">#{interfaceName},</if>
<if test="interfaceRemark != null">#{interfaceRemark},</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="updateRmSwitchInterfaceInfo" parameterType="RmSwitchInterfaceInfo">
update rm_switch_interface_info
<trim prefix="SET" suffixOverrides=",">
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn = #{hardwareSn},</if>
<if test="switchName != null and switchName != ''">switch_name = #{switchName},</if>
<if test="interfaceName != null and interfaceName != ''">interface_name = #{interfaceName},</if>
<if test="interfaceRemark != null">interface_remark = #{interfaceRemark},</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="deleteRmSwitchInterfaceInfoById" parameterType="Long">
delete from rm_switch_interface_info where id = #{id}
</delete>
<delete id="deleteRmSwitchInterfaceInfoByIds" parameterType="String">
delete from rm_switch_interface_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
@@ -0,0 +1,137 @@
<?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.system.mapper.RmSwitchManagementMapper">
<resultMap type="RmSwitchManagement" id="RmSwitchManagementResult">
<result property="id" column="id" />
<result property="switchName" column="switch_name" />
<result property="hardwareSn" column="hardware_sn" />
<result property="snmpAddress" column="snmp_address" />
<result property="snmpPort" column="snmp_port" />
<result property="onlineStatus" column="online_status" />
<result property="heartbeatCount" column="heartbeat_count" />
<result property="heartbeatInterval" column="heartbeat_interval" />
<result property="heartbeatOid" column="heartbeat_oid" />
<result property="snmpVersion" column="snmp_version" />
<result property="readWritePermission" column="read_write_permission" />
<result property="securityLevel" column="security_level" />
<result property="encryptionMethod" column="encryption_method" />
<result property="communityName" column="community_name" />
<result property="switchPassword" column="switch_password" />
<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="selectRmSwitchManagementVo">
select id, switch_name, hardware_sn, snmp_address, snmp_port, online_status, heartbeat_count, heartbeat_interval, heartbeat_oid, snmp_version, read_write_permission, security_level, encryption_method, community_name, switch_password, create_time, update_time, create_by, update_by from rm_switch_management
</sql>
<select id="selectRmSwitchManagementList" parameterType="RmSwitchManagement" resultMap="RmSwitchManagementResult">
<include refid="selectRmSwitchManagementVo"/>
<where>
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
<if test="snmpAddress != null and snmpAddress != ''"> and snmp_address = #{snmpAddress}</if>
<if test="snmpPort != null "> and snmp_port = #{snmpPort}</if>
<if test="onlineStatus != null "> and online_status = #{onlineStatus}</if>
<if test="heartbeatCount != null "> and heartbeat_count = #{heartbeatCount}</if>
<if test="heartbeatInterval != null "> and heartbeat_interval = #{heartbeatInterval}</if>
<if test="heartbeatOid != null and heartbeatOid != ''"> and heartbeat_oid = #{heartbeatOid}</if>
<if test="snmpVersion != null and snmpVersion != ''"> and snmp_version = #{snmpVersion}</if>
<if test="readWritePermission != null and readWritePermission != ''"> and read_write_permission = #{readWritePermission}</if>
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
<if test="encryptionMethod != null and encryptionMethod != ''"> and encryption_method = #{encryptionMethod}</if>
<if test="communityName != null and communityName != ''"> and community_name like concat('%', #{communityName}, '%')</if>
<if test="switchPassword != null and switchPassword != ''"> and switch_password = #{switchPassword}</if>
</where>
</select>
<select id="selectRmSwitchManagementById" parameterType="Long" resultMap="RmSwitchManagementResult">
<include refid="selectRmSwitchManagementVo"/>
where id = #{id}
</select>
<insert id="insertRmSwitchManagement" parameterType="RmSwitchManagement" useGeneratedKeys="true" keyProperty="id">
insert into rm_switch_management
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="switchName != null and switchName != ''">switch_name,</if>
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn,</if>
<if test="snmpAddress != null and snmpAddress != ''">snmp_address,</if>
<if test="snmpPort != null">snmp_port,</if>
<if test="onlineStatus != null">online_status,</if>
<if test="heartbeatCount != null">heartbeat_count,</if>
<if test="heartbeatInterval != null">heartbeat_interval,</if>
<if test="heartbeatOid != null and heartbeatOid != ''">heartbeat_oid,</if>
<if test="snmpVersion != null and snmpVersion != ''">snmp_version,</if>
<if test="readWritePermission != null">read_write_permission,</if>
<if test="securityLevel != null">security_level,</if>
<if test="encryptionMethod != null">encryption_method,</if>
<if test="communityName != null">community_name,</if>
<if test="switchPassword != null">switch_password,</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="switchName != null and switchName != ''">#{switchName},</if>
<if test="hardwareSn != null and hardwareSn != ''">#{hardwareSn},</if>
<if test="snmpAddress != null and snmpAddress != ''">#{snmpAddress},</if>
<if test="snmpPort != null">#{snmpPort},</if>
<if test="onlineStatus != null">#{onlineStatus},</if>
<if test="heartbeatCount != null">#{heartbeatCount},</if>
<if test="heartbeatInterval != null">#{heartbeatInterval},</if>
<if test="heartbeatOid != null and heartbeatOid != ''">#{heartbeatOid},</if>
<if test="snmpVersion != null and snmpVersion != ''">#{snmpVersion},</if>
<if test="readWritePermission != null">#{readWritePermission},</if>
<if test="securityLevel != null">#{securityLevel},</if>
<if test="encryptionMethod != null">#{encryptionMethod},</if>
<if test="communityName != null">#{communityName},</if>
<if test="switchPassword != null">#{switchPassword},</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="updateRmSwitchManagement" parameterType="RmSwitchManagement">
update rm_switch_management
<trim prefix="SET" suffixOverrides=",">
<if test="switchName != null and switchName != ''">switch_name = #{switchName},</if>
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn = #{hardwareSn},</if>
<if test="snmpAddress != null and snmpAddress != ''">snmp_address = #{snmpAddress},</if>
<if test="snmpPort != null">snmp_port = #{snmpPort},</if>
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
<if test="heartbeatCount != null">heartbeat_count = #{heartbeatCount},</if>
<if test="heartbeatInterval != null">heartbeat_interval = #{heartbeatInterval},</if>
<if test="heartbeatOid != null and heartbeatOid != ''">heartbeat_oid = #{heartbeatOid},</if>
<if test="snmpVersion != null and snmpVersion != ''">snmp_version = #{snmpVersion},</if>
<if test="readWritePermission != null">read_write_permission = #{readWritePermission},</if>
<if test="securityLevel != null">security_level = #{securityLevel},</if>
<if test="encryptionMethod != null">encryption_method = #{encryptionMethod},</if>
<if test="communityName != null">community_name = #{communityName},</if>
<if test="switchPassword != null">switch_password = #{switchPassword},</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="deleteRmSwitchManagementById" parameterType="Long">
delete from rm_switch_management where id = #{id}
</delete>
<delete id="deleteRmSwitchManagementByIds" parameterType="String">
delete from rm_switch_management where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>