agent2.0版本数据适配,开发脚本策略接口
This commit is contained in:
@@ -96,4 +96,16 @@ public class InitialSwitchInfoDetails extends BaseEntity
|
||||
|
||||
/** 交换机ip */
|
||||
private String switchIp;
|
||||
/** 端口配置速率(Mbps) */
|
||||
private BigDecimal ifSpeed;
|
||||
/** 入站丢包 */
|
||||
private Integer ifInDiscards;
|
||||
/** 出站丢包 */
|
||||
private Integer ifOutDiscards;
|
||||
/** 错误的入站数据包数量 */
|
||||
private Integer ifInErrors;
|
||||
/** 错误的出站数据包数量 */
|
||||
private Integer ifOutErrors;
|
||||
/** 端口索引 */
|
||||
private Integer ifIndex;
|
||||
}
|
||||
|
||||
@@ -131,6 +131,7 @@ public class RmResourceGroupServiceImpl implements IRmResourceGroupService
|
||||
StringBuilder resultStr = new StringBuilder();
|
||||
String[] idArray = ids.split(",");
|
||||
for (String s : idArray) {
|
||||
rmResourceGroup.setResourceIds(s);
|
||||
int rows = rmResourceGroupMapper.exitsResourceById(rmResourceGroup);
|
||||
if(rows > 0){
|
||||
resultStr.append(s);
|
||||
|
||||
@@ -27,10 +27,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="switchSn" column="switch_sn" />
|
||||
<result property="businessCode" column="business_code" />
|
||||
<result property="businessName" column="business_name" />
|
||||
<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="ifIndex" column="if_index" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoDetailsVo">
|
||||
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
|
||||
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 from initial_switch_info_details
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoDetailsList" parameterType="InitialSwitchInfoDetails" resultMap="InitialSwitchInfoDetailsResult">
|
||||
@@ -92,6 +98,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="switchSn != null">switch_sn,</if>
|
||||
<if test="businessCode != null">business_code,</if>
|
||||
<if test="businessName != null">business_name,</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="ifIndex != null and ifIndex != ''">if_index,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
@@ -115,6 +127,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
<if test="businessCode != null">#{businessCode},</if>
|
||||
<if test="businessName != null">#{businessName},</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="ifIndex != null and ifIndex != ''">#{ifIndex},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -142,6 +160,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
||||
<if test="businessCode != null">business_code = #{businessCode},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</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="ifIndex != null and ifIndex != ''">if_index = #{ifIndex},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -169,6 +193,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
in_speed AS inSpeed,
|
||||
out_speed AS outSpeed,
|
||||
switch_ip AS switchIp,
|
||||
if_index AS ifIndex,
|
||||
if_speed AS ifSpeed,
|
||||
if_in_discards AS ifInDiscards,
|
||||
if_out_discards AS ifOutDiscards,
|
||||
if_in_errors AS ifInErrors,
|
||||
if_out_errors AS ifOutErrors,
|
||||
create_by AS createBy,
|
||||
update_by AS updateBy,
|
||||
create_time AS createTime,
|
||||
@@ -182,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<insert id="saveBatchSwitchTraffic" parameterType="InitialSwitchInfoDetails">
|
||||
INSERT IGNORE INTO initial_switch_info_details
|
||||
(
|
||||
@@ -194,6 +225,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
in_speed,
|
||||
out_speed,
|
||||
switch_ip,
|
||||
if_index,
|
||||
if_speed,
|
||||
if_in_discards,
|
||||
if_out_discards,
|
||||
if_in_errors,
|
||||
if_out_errors,
|
||||
switch_name,
|
||||
interface_device_type,
|
||||
`server_name`,
|
||||
@@ -219,6 +256,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.inSpeed},
|
||||
#{item.outSpeed},
|
||||
#{item.switchIp},
|
||||
#{item.ifIndex},
|
||||
#{item.ifSpeed},
|
||||
#{item.ifInDiscards},
|
||||
#{item.ifOutDiscards},
|
||||
#{item.ifInErrors},
|
||||
#{item.ifOutErrors},
|
||||
#{item.switchName},
|
||||
#{item.interfaceDeviceType},
|
||||
#{item.serverName},
|
||||
|
||||
Reference in New Issue
Block a user