修改入库bug 资源管理模块bug
This commit is contained in:
+48
-25
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.AllInterfaceNameMapper">
|
||||
|
||||
|
||||
<resultMap type="AllInterfaceName" id="AllInterfaceNameResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
@@ -17,15 +17,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="switchName" column="switch_name" />
|
||||
<result property="interfaceDeviceType" column="interface_device_type" />
|
||||
<result property="serverPort" column="server_port" />
|
||||
<result property="switchSn" column="switch_sn" />
|
||||
<result property="switchIp" column="switch_ip" />
|
||||
<result property="serverIp" column="server_ip" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAllInterfaceNameVo">
|
||||
select id, client_id, interface_name, device_sn, node_name, business_code, business_name, resource_type, switch_name, interface_device_type, server_port, switch_sn, create_time, update_time, create_by, update_by from all_interface_name
|
||||
select id, client_id, interface_name, device_sn, node_name, business_code, business_name, resource_type, create_time, update_time, create_by, update_by, switch_name, interface_device_type, server_port, switch_sn, switch_ip, server_ip from all_interface_name
|
||||
</sql>
|
||||
|
||||
<select id="selectAllInterfaceNameList" parameterType="AllInterfaceName" resultMap="AllInterfaceNameResult">
|
||||
<include refid="selectAllInterfaceNameVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
@@ -33,9 +39,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||
<if test="interfaceDeviceType != null and interfaceDeviceType != ''"> and interface_device_type = #{interfaceDeviceType}</if>
|
||||
<if test="serverPort != null and serverPort != ''"> and server_port = #{serverPort}</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
<if test="switchIp != null and switchIp != ''"> and switch_ip = #{switchIp}</if>
|
||||
<if test="serverIp != null and serverIp != ''"> and server_ip = #{serverIp}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectAllInterfaceNameById" parameterType="Long" resultMap="AllInterfaceNameResult">
|
||||
<include refid="selectAllInterfaceNameVo"/>
|
||||
where id = #{id}
|
||||
@@ -51,15 +63,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessCode != null">business_code,</if>
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="resourceType != null">resource_type,</if>
|
||||
<if test="switchName != null">switch_name,</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type,</if>
|
||||
<if test="serverPort != null">server_port,</if>
|
||||
<if test="switchSn != null">switch_sn,</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>
|
||||
<if test="switchName != null">switch_name,</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type,</if>
|
||||
<if test="serverPort != null">server_port,</if>
|
||||
<if test="switchSn != null">switch_sn,</if>
|
||||
<if test="switchIp != null">switch_ip,</if>
|
||||
<if test="serverIp != null">server_ip,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">#{interfaceName},</if>
|
||||
@@ -68,15 +82,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessCode != null">#{businessCode},</if>
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="resourceType != null">#{resourceType},</if>
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">#{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">#{serverPort},</if>
|
||||
<if test="switchSn != null">#{switchSn},</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>
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">#{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">#{serverPort},</if>
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
<if test="switchIp != null">#{switchIp},</if>
|
||||
<if test="serverIp != null">#{serverIp},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAllInterfaceName" parameterType="AllInterfaceName">
|
||||
@@ -89,14 +105,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessCode != null">business_code = #{businessCode},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
||||
<if test="switchName != null">switch_name = #{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type = #{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">server_port = #{serverPort},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</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>
|
||||
<if test="switchName != null">switch_name = #{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type = #{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">server_port = #{serverPort},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
||||
<if test="switchIp != null">switch_ip = #{switchIp},</if>
|
||||
<if test="serverIp != null">server_ip = #{serverIp},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -106,13 +124,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAllInterfaceNameByIds" parameterType="String">
|
||||
delete from all_interface_name where id in
|
||||
delete from all_interface_name where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<!-- 根据接口名称批量查询 -->
|
||||
<select id="selectByNames" parameterType="java.lang.String" resultType="AllInterfaceName">
|
||||
<select id="selectByNames" parameterType="AllInterfaceName" resultType="AllInterfaceName">
|
||||
SELECT
|
||||
id,
|
||||
interface_name AS interfaceName,
|
||||
@@ -125,12 +143,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
switch_name AS switchName,
|
||||
interface_device_type AS interfaceDeviceType,
|
||||
server_port AS serverPort,
|
||||
switch_sn AS switchSn
|
||||
switch_sn AS switchSn,
|
||||
switch_ip AS switchIp,
|
||||
server_ip AS serverIp
|
||||
FROM
|
||||
all_interface_name
|
||||
WHERE
|
||||
client_id = #{clientId} and
|
||||
interface_name IN
|
||||
<foreach collection="collection" item="name" open="(" separator="," close=")">
|
||||
<foreach collection="interfaceNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</select>
|
||||
@@ -146,7 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
node_name,
|
||||
business_code,
|
||||
business_name,
|
||||
switch_name, interface_device_type, server_port, switch_sn,
|
||||
switch_name, interface_device_type, server_port, switch_sn, switch_ip, server_ip,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
@@ -160,7 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.nodeName},
|
||||
#{item.businessCode},
|
||||
#{item.businessName},
|
||||
#{item.switchName}, #{item.interfaceDeviceType}, #{item.serverPort}, #{item.switchSn},
|
||||
#{item.switchName}, #{item.interfaceDeviceType}, #{item.serverPort}, #{item.switchSn}, #{item.switchIp}, #{item.serverIp},
|
||||
NOW(),
|
||||
NOW()
|
||||
)
|
||||
@@ -203,7 +224,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
server_port = #{item.serverPort},
|
||||
interface_device_type = #{item.interfaceDeviceType},
|
||||
switch_name = #{item.switchName},
|
||||
switch_sn = #{item.switchSn}
|
||||
switch_sn = #{item.switchSn},
|
||||
switch_ip = #{item.switchIp},
|
||||
server_ip = #{item.serverIp}
|
||||
WHERE id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
+4
-4
@@ -12,8 +12,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
`status` VARCHAR(20) COMMENT '运行状态',
|
||||
`type` VARCHAR(30) COMMENT '接口类型',
|
||||
ipV4 VARCHAR(20) COMMENT 'IPv4地址',
|
||||
`in_dropped` DECIMAL(5,2) COMMENT '入站丢包率(%)',
|
||||
`out_dropped` DECIMAL(5,2) COMMENT '出站丢包率(%)',
|
||||
`in_dropped` DECIMAL(20,2) COMMENT '入站丢包率(%)',
|
||||
`out_dropped` DECIMAL(20,2) COMMENT '出站丢包率(%)',
|
||||
`in_speed` varchar(50) COMMENT '接收带宽(Mbps)',
|
||||
`out_speed` varchar(50) COMMENT '发送带宽(Mbps)',
|
||||
`speed` varchar(100) COMMENT '协商速度',
|
||||
@@ -43,8 +43,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
`status` VARCHAR(20) COMMENT '运行状态',
|
||||
`type` VARCHAR(30) COMMENT '接口类型',
|
||||
ipV4 VARCHAR(20) COMMENT 'IPv4地址',
|
||||
`in_dropped` DECIMAL(5,2) COMMENT '入站丢包率(%)',
|
||||
`out_dropped` DECIMAL(5,2) COMMENT '出站丢包率(%)',
|
||||
`in_dropped` DECIMAL(20,2) COMMENT '入站丢包率(%)',
|
||||
`out_dropped` DECIMAL(20,2) COMMENT '出站丢包率(%)',
|
||||
`in_speed` VARCHAR(20) COMMENT '接收带宽(Mbps)',
|
||||
`out_speed` VARCHAR(20) COMMENT '发送带宽(Mbps)',
|
||||
`speed` varchar(100) COMMENT '协商速度',
|
||||
|
||||
+16
-12
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.EpsServerRevenueConfigMapper">
|
||||
|
||||
|
||||
<resultMap type="EpsServerRevenueConfig" id="EpsServerRevenueConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
@@ -20,16 +20,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="changed" column="changed" />
|
||||
<result property="serverIp" column="server_ip" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsServerRevenueConfigVo">
|
||||
select id, node_name, revenue_method, hardware_sn, traffic_port, bandwidth_95, package_bandwidth, update_time, business_name, business_code, registration_status, create_by, update_by, create_time, changed from eps_server_revenue_config
|
||||
select id, node_name, revenue_method, hardware_sn, traffic_port, bandwidth_95, package_bandwidth, update_time, business_name, business_code, registration_status, create_by, update_by, create_time, changed, server_ip from eps_server_revenue_config
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsServerRevenueConfigList" parameterType="EpsServerRevenueConfig" resultMap="EpsServerRevenueConfigResult">
|
||||
<include refid="selectEpsServerRevenueConfigVo"/>
|
||||
<where>
|
||||
and registration_status = '1'
|
||||
and registration_status = "1"
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="revenueMethod != null and revenueMethod != ''"> and revenue_method = #{revenueMethod}</if>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
@@ -39,19 +40,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
|
||||
<if test="changed != null and changed != ''"> and changed = #{changed}</if>
|
||||
<if test="serverIp != null and serverIp != ''"> and server_ip = #{serverIp}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEpsServerRevenueConfigById" parameterType="Long" resultMap="EpsServerRevenueConfigResult">
|
||||
<include refid="selectEpsServerRevenueConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="countBySn" parameterType="String">
|
||||
<include refid="selectEpsServerRevenueConfigVo"/>
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsServerRevenueConfig" parameterType="EpsServerRevenueConfig">
|
||||
insert into eps_server_revenue_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -70,7 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="changed != null">changed,</if>
|
||||
</trim>
|
||||
<if test="serverIp != null">server_ip,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
@@ -87,7 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="changed != null">#{changed},</if>
|
||||
</trim>
|
||||
<if test="serverIp != null">#{serverIp},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsServerRevenueConfig" parameterType="EpsServerRevenueConfig">
|
||||
@@ -107,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="changed != null">changed = #{changed},</if>
|
||||
<if test="serverIp != null">server_ip = #{serverIp},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -116,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsServerRevenueConfigByIds" parameterType="String">
|
||||
delete from eps_server_revenue_config where id in
|
||||
delete from eps_server_revenue_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@@ -141,4 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and rrr.ip_address = #{ipAddress}
|
||||
</where>
|
||||
</select>
|
||||
<select id="countBySn" parameterType="String">
|
||||
<include refid="selectEpsServerRevenueConfigVo"/>
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</select>
|
||||
</mapper>
|
||||
+12
-4
@@ -14,6 +14,7 @@ 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="switchIp" column="switch_ip" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
@@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoDetailsVo">
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, 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 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 from initial_switch_info_details
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoDetailsList" parameterType="InitialSwitchInfoDetails" resultMap="InitialSwitchInfoDetailsResult">
|
||||
@@ -43,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<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="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||
<if test="interfaceDeviceType != null and interfaceDeviceType != ''"> and interface_device_type = #{interfaceDeviceType}</if>
|
||||
<if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if>
|
||||
@@ -70,6 +72,7 @@ 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="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
@@ -92,6 +95,7 @@ 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="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
@@ -118,6 +122,7 @@ 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="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
@@ -156,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
`type`,
|
||||
in_speed AS inSpeed,
|
||||
out_speed AS outSpeed,
|
||||
switch_ip AS switchIp,
|
||||
create_by AS createBy,
|
||||
update_by AS updateBy,
|
||||
create_time AS createTime,
|
||||
@@ -173,16 +179,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
INSERT INTO initial_switch_info_details
|
||||
(
|
||||
client_id,
|
||||
name,
|
||||
`name`,
|
||||
in_bytes,
|
||||
out_bytes,
|
||||
status,
|
||||
type,
|
||||
`type`,
|
||||
in_speed,
|
||||
out_speed,
|
||||
switch_ip,
|
||||
switch_name,
|
||||
interface_device_type,
|
||||
server_name,
|
||||
`server_name`,
|
||||
server_port,
|
||||
server_sn,
|
||||
switch_sn,
|
||||
@@ -204,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.type},
|
||||
#{item.inSpeed},
|
||||
#{item.outSpeed},
|
||||
#{item.switchIp},
|
||||
#{item.switchName},
|
||||
#{item.interfaceDeviceType},
|
||||
#{item.serverName},
|
||||
|
||||
+13
-8
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.RmEpsTopologyManagementMapper">
|
||||
|
||||
|
||||
<resultMap type="RmEpsTopologyManagement" id="RmEpsTopologyManagementResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="switchName" column="switch_name" />
|
||||
@@ -19,18 +19,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="updaterId" column="updater_id" />
|
||||
<result property="updaterName" column="updater_name" />
|
||||
<result property="switchIpAddress" column="switch_ip_address" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmEpsTopologyManagementVo">
|
||||
select id, switch_name, switch_sn, interface_name, connected_device_type, server_name, server_sn, server_port, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_eps_topology_management
|
||||
select id, switch_name, switch_sn, interface_name, connected_device_type, server_name, server_sn, server_port, create_time, update_time, creator_id, creator_name, updater_id, updater_name, switch_ip_address from rm_eps_topology_management
|
||||
</sql>
|
||||
|
||||
<select id="selectRmEpsTopologyManagementList" parameterType="RmEpsTopologyManagement" resultMap="RmEpsTopologyManagementResult">
|
||||
<include refid="selectRmEpsTopologyManagementVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name= #{interfaceName}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
||||
<if test="connectedDeviceType != null and connectedDeviceType != ''"> and connected_device_type = #{connectedDeviceType}</if>
|
||||
<if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if>
|
||||
<if test="serverSn != null and serverSn != ''"> and server_sn = #{serverSn}</if>
|
||||
@@ -39,9 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
<if test="switchIpAddress != null and switchIpAddress != ''"> and switch_ip_address = #{switchIpAddress}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRmEpsTopologyManagementById" parameterType="Long" resultMap="RmEpsTopologyManagementResult">
|
||||
<include refid="selectRmEpsTopologyManagementVo"/>
|
||||
where id = #{id}
|
||||
@@ -63,7 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="updaterName != null">updater_name,</if>
|
||||
</trim>
|
||||
<if test="switchIpAddress != null">switch_ip_address,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
@@ -78,7 +81,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="updaterName != null">#{updaterName},</if>
|
||||
</trim>
|
||||
<if test="switchIpAddress != null">#{switchIpAddress},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmEpsTopologyManagement" parameterType="RmEpsTopologyManagement">
|
||||
@@ -97,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
||||
<if test="switchIpAddress != null">switch_ip_address = #{switchIpAddress},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -106,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmEpsTopologyManagementByIds" parameterType="String">
|
||||
delete from rm_eps_topology_management where id in
|
||||
delete from rm_eps_topology_management where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
+34
-15
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.RmResourceRegistrationMapper">
|
||||
|
||||
|
||||
<resultMap type="RmResourceRegistration" id="RmResourceRegistrationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="hardwareSn" column="hardware_sn" />
|
||||
@@ -12,9 +12,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="ipAddress" column="ip_address" />
|
||||
<result property="resourcePort" column="resource_port" />
|
||||
<result property="otherPortName" column="other_port_name" />
|
||||
<result property="agentVersion" column="agent_version" />
|
||||
<result property="protocol" column="protocol" />
|
||||
<result property="resourceVersion" column="resource_version" />
|
||||
<result property="rwPermission" column="rw_permission" />
|
||||
<result property="snmpDetect" column="snmp_detect" />
|
||||
<result property="teamName" column="team_name" />
|
||||
<result property="snmpCollectAddr" column="snmp_collect_addr" />
|
||||
<result property="securityLevel" column="security_level" />
|
||||
<result property="encryption" column="encryption" />
|
||||
<result property="resourceUserName" column="resource_user_name" />
|
||||
@@ -34,24 +38,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmResourceRegistrationVo">
|
||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, other_port_name, protocol, resource_version, rw_permission, security_level, encryption, resource_user_name,resource_pwd, registration_status, online_status, description, customer_id, customer_name, service_number, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_resource_registration
|
||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, other_port_name, agent_version, protocol, resource_version, rw_permission, snmp_detect, team_name, snmp_collect_addr, security_level, encryption, resource_user_name, resource_pwd, registration_status, online_status, description, customer_id, customer_name, service_number, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_resource_registration
|
||||
</sql>
|
||||
|
||||
<select id="selectRmResourceRegistrationList" parameterType="RmResourceRegistration" resultMap="RmResourceRegistrationResult">
|
||||
<include refid="selectRmResourceRegistrationVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
|
||||
<if test="resourcePort != null and resourcePort != ''"> and resource_port = #{resourcePort}</if>
|
||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name = #{otherPortName}</if>
|
||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name like concat('%', #{otherPortName}, '%')</if>
|
||||
<if test="agentVersion != null and agentVersion != ''"> and agent_version = #{agentVersion}</if>
|
||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
||||
<if test="resourceVersion != null and resourceVersion != ''"> and resource_version = #{resourceVersion}</if>
|
||||
<if test="rwPermission != null and rwPermission != ''"> and rw_permission = #{rwPermission}</if>
|
||||
<if test="snmpDetect != null and snmpDetect != ''"> and snmp_detect = #{snmpDetect}</if>
|
||||
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
|
||||
<if test="snmpCollectAddr != null and snmpCollectAddr != ''"> and snmp_collect_addr = #{snmpCollectAddr}</if>
|
||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
||||
<if test="encryption != null and encryption != ''"> and encryption = #{encryption}</if>
|
||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name = #{resourceUserName}</if>
|
||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name like concat('%', #{resourceUserName}, '%')</if>
|
||||
<if test="resourcePwd != null and resourcePwd != ''"> and resource_pwd = #{resourcePwd}</if>
|
||||
<if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||
@@ -64,17 +72,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRmResourceRegistrationById" parameterType="Long" resultMap="RmResourceRegistrationResult">
|
||||
<include refid="selectRmResourceRegistrationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="countBySn" parameterType="String">
|
||||
select count(1) from rm_resource_registration
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmResourceRegistration" parameterType="RmResourceRegistration" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_resource_registration
|
||||
@@ -85,9 +88,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="ipAddress != null">ip_address,</if>
|
||||
<if test="resourcePort != null">resource_port,</if>
|
||||
<if test="otherPortName != null">other_port_name,</if>
|
||||
<if test="agentVersion != null">agent_version,</if>
|
||||
<if test="protocol != null">protocol,</if>
|
||||
<if test="resourceVersion != null">resource_version,</if>
|
||||
<if test="rwPermission != null">rw_permission,</if>
|
||||
<if test="snmpDetect != null">snmp_detect,</if>
|
||||
<if test="teamName != null">team_name,</if>
|
||||
<if test="snmpCollectAddr != null">snmp_collect_addr,</if>
|
||||
<if test="securityLevel != null">security_level,</if>
|
||||
<if test="encryption != null">encryption,</if>
|
||||
<if test="resourceUserName != null">resource_user_name,</if>
|
||||
@@ -104,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="updaterName != null">updater_name,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="hardwareSn != null">#{hardwareSn},</if>
|
||||
<if test="resourceType != null">#{resourceType},</if>
|
||||
@@ -112,9 +119,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="ipAddress != null">#{ipAddress},</if>
|
||||
<if test="resourcePort != null">#{resourcePort},</if>
|
||||
<if test="otherPortName != null">#{otherPortName},</if>
|
||||
<if test="agentVersion != null">#{agentVersion},</if>
|
||||
<if test="protocol != null">#{protocol},</if>
|
||||
<if test="resourceVersion != null">#{resourceVersion},</if>
|
||||
<if test="rwPermission != null">#{rwPermission},</if>
|
||||
<if test="snmpDetect != null">#{snmpDetect},</if>
|
||||
<if test="teamName != null">#{teamName},</if>
|
||||
<if test="snmpCollectAddr != null">#{snmpCollectAddr},</if>
|
||||
<if test="securityLevel != null">#{securityLevel},</if>
|
||||
<if test="encryption != null">#{encryption},</if>
|
||||
<if test="resourceUserName != null">#{resourceUserName},</if>
|
||||
@@ -131,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="updaterName != null">#{updaterName},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmResourceRegistration" parameterType="RmResourceRegistration">
|
||||
@@ -143,9 +154,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
|
||||
<if test="resourcePort != null">resource_port = #{resourcePort},</if>
|
||||
<if test="otherPortName != null">other_port_name = #{otherPortName},</if>
|
||||
<if test="agentVersion != null">agent_version = #{agentVersion},</if>
|
||||
<if test="protocol != null">protocol = #{protocol},</if>
|
||||
<if test="resourceVersion != null">resource_version = #{resourceVersion},</if>
|
||||
<if test="rwPermission != null">rw_permission = #{rwPermission},</if>
|
||||
<if test="snmpDetect != null">snmp_detect = #{snmpDetect},</if>
|
||||
<if test="teamName != null">team_name = #{teamName},</if>
|
||||
<if test="snmpCollectAddr != null">snmp_collect_addr = #{snmpCollectAddr},</if>
|
||||
<if test="securityLevel != null">security_level = #{securityLevel},</if>
|
||||
<if test="encryption != null">encryption = #{encryption},</if>
|
||||
<if test="resourceUserName != null">resource_user_name = #{resourceUserName},</if>
|
||||
@@ -171,7 +186,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmResourceRegistrationByIds" parameterType="String">
|
||||
delete from rm_resource_registration where id in
|
||||
delete from rm_resource_registration where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@@ -186,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
<!-- 查询所有资源名称-->
|
||||
<select id="selectAllResourceNameByType" parameterType="RmResourceRegistration" resultType="java.util.Map">
|
||||
select resource_name resourceName from rm_resource_registration
|
||||
select resource_name resourceName,ip_address ipAddress,hardware_sn hardwareSn from rm_resource_registration
|
||||
<where>
|
||||
and registration_status = 1
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
@@ -215,4 +230,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
group by resource_name
|
||||
</select>
|
||||
<select id="countBySn" parameterType="String">
|
||||
select count(1) from rm_resource_registration
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user