增加服务器下架处理,

服务器详情增加agent最新版本、cpu核数、内存字段。
开发pppoe主表及子表CRUD
This commit is contained in:
gaoyutao
2025-12-29 18:25:32 +08:00
parent c852fbd506
commit 6e2ca8ac53
23 changed files with 1065 additions and 30 deletions
@@ -0,0 +1,119 @@
<?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.tongran.rocketmq.mapper.RmPppoeConfigSubMapper">
<resultMap type="RmPppoeConfigSub" id="RmPppoeConfigSubResult">
<result property="id" column="id" />
<result property="mainId" column="main_id" />
<result property="serialNumber" column="serial_number" />
<result property="vlanId" column="vlan_id" />
<result property="ipv4Address" column="ipv4_address" />
<result property="ipv4MaskBits" column="ipv4_mask_bits" />
<result property="ipv4Gateway" column="ipv4_gateway" />
<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="selectRmPppoeConfigSubVo">
select id, main_id, serial_number, vlan_id, ipv4_address, ipv4_mask_bits, ipv4_gateway, create_time, update_time, create_by, update_by from rm_pppoe_config_sub
</sql>
<select id="selectRmPppoeConfigSubList" parameterType="RmPppoeConfigSub" resultMap="RmPppoeConfigSubResult">
<include refid="selectRmPppoeConfigSubVo"/>
<where>
<if test="mainId != null "> and main_id = #{mainId}</if>
<if test="serialNumber != null "> and serial_number = #{serialNumber}</if>
<if test="vlanId != null "> and vlan_id = #{vlanId}</if>
<if test="ipv4Address != null and ipv4Address != ''"> and ipv4_address = #{ipv4Address}</if>
<if test="ipv4MaskBits != null "> and ipv4_mask_bits = #{ipv4MaskBits}</if>
<if test="ipv4Gateway != null and ipv4Gateway != ''"> and ipv4_gateway = #{ipv4Gateway}</if>
</where>
</select>
<select id="selectRmPppoeConfigSubById" parameterType="Long" resultMap="RmPppoeConfigSubResult">
<include refid="selectRmPppoeConfigSubVo"/>
where id = #{id}
</select>
<insert id="insertRmPppoeConfigSub" parameterType="RmPppoeConfigSub" useGeneratedKeys="true" keyProperty="id">
insert into rm_pppoe_config_sub
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="mainId != null">main_id,</if>
<if test="serialNumber != null">serial_number,</if>
<if test="vlanId != null">vlan_id,</if>
<if test="ipv4Address != null">ipv4_address,</if>
<if test="ipv4MaskBits != null">ipv4_mask_bits,</if>
<if test="ipv4Gateway != null">ipv4_gateway,</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="mainId != null">#{mainId},</if>
<if test="serialNumber != null">#{serialNumber},</if>
<if test="vlanId != null">#{vlanId},</if>
<if test="ipv4Address != null">#{ipv4Address},</if>
<if test="ipv4MaskBits != null">#{ipv4MaskBits},</if>
<if test="ipv4Gateway != null">#{ipv4Gateway},</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="updateRmPppoeConfigSub" parameterType="RmPppoeConfigSub">
update rm_pppoe_config_sub
<trim prefix="SET" suffixOverrides=",">
<if test="mainId != null">main_id = #{mainId},</if>
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
<if test="vlanId != null">vlan_id = #{vlanId},</if>
<if test="ipv4Address != null">ipv4_address = #{ipv4Address},</if>
<if test="ipv4MaskBits != null">ipv4_mask_bits = #{ipv4MaskBits},</if>
<if test="ipv4Gateway != null">ipv4_gateway = #{ipv4Gateway},</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="deleteRmPppoeConfigSubById" parameterType="Long">
delete from rm_pppoe_config_sub where id = #{id}
</delete>
<delete id="deleteRmPppoeConfigSubByIds" parameterType="String">
delete from rm_pppoe_config_sub where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="batchInsertRmPppoeConfigSub" parameterType="java.util.List">
insert into rm_pppoe_config_sub
(main_id, serial_number, vlan_id, ipv4_address, ipv4_mask_bits, ipv4_gateway, create_time, update_time, create_by, update_by)
values
<foreach collection="list" item="item" separator=",">
(
#{item.mainId},
#{item.serialNumber},
#{item.vlanId},
#{item.ipv4Address},
#{item.ipv4MaskBits},
#{item.ipv4Gateway},
#{item.createTime},
#{item.updateTime},
#{item.createBy},
#{item.updateBy}
)
</foreach>
</insert>
<delete id="deleteRmPppoeConfigSubByMainId" parameterType="Long">
delete from rm_pppoe_config_sub where main_id = #{mainId}
</delete>
</mapper>