服务器自动注册

This commit is contained in:
gaoyutao
2025-10-21 18:28:18 +08:00
parent 52728eba49
commit 4fdaadee65
25 changed files with 1373 additions and 9 deletions
@@ -31,7 +31,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="templateId != null "> and template_id = #{templateId}</if>
<if test="resourceType != null "> and resource_type = #{resourceType}</if>
<if test="resourceType != null "> and resource_type = #{resourceType}</if>
<if test="resourceGroupId != null "> and resource_group_id = #{resourceGroupId}</if>
<if test="policyName != null and policyName != ''"> and policy_name like concat('%', #{policyName}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
@@ -119,4 +118,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="selectRmMonitorPolicyByClientId" parameterType="RmMonitorPolicy" resultMap="RmMonitorPolicyResult">
<include refid="selectRmMonitorPolicyVo"/>
<where>
<if test="resourceType != null "> and resource_type = #{resourceType}</if>
<if test="priority != null "> and priority = #{priority}</if>
<if test="status != null "> and status = #{status}</if>
<if test="deployDevice != null ">
FIND_IN_SET(#{deployDevice}, REPLACE(deploy_device, '\n', ',')) > 0
</if>
</where>
limit 1
</select>
</mapper>
@@ -108,6 +108,26 @@
</trim>
where id = #{id}
</update>
<update id="updateRmNetworkInterfaceByMac" parameterType="RmNetworkInterface">
update rm_network_interface
<trim prefix="SET" suffixOverrides=",">
<if test="isp != null">isp = #{isp},</if>
<if test="province != null">province = #{province},</if>
<if test="city != null">city = #{city},</if>
<if test="publicIp != null">public_ip = #{publicIp},</if>
<if test="interfaceName != null and interfaceName != ''">interface_name = #{interfaceName},</if>
<if test="macAddress != null">mac_address = #{macAddress},</if>
<if test="interfaceType != null">interface_type = #{interfaceType},</if>
<if test="ipv4Address != null">ipv4_address = #{ipv4Address},</if>
<if test="gateway != null">gateway = #{gateway},</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="bindIp != null">bind_ip = #{bindIp},</if>
</trim>
where mac_address = #{macAddress}
</update>
<delete id="deleteRmNetworkInterfaceById" parameterType="Long">
delete from rm_network_interface where id = #{id}