相关接口增加ipv4、ipv6出入流量字段。
服务器管理列表新增字段和排序。 优化监控看板流量统计。
This commit is contained in:
-65
@@ -1,65 +0,0 @@
|
||||
package com.tongran.mtragent.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 客户端网络接口信息对象 rm_network_interface
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Data
|
||||
public class RmNetworkInterface extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 运营商 */
|
||||
@Excel(name = "运营商")
|
||||
private String isp;
|
||||
|
||||
/** 省 */
|
||||
@Excel(name = "省")
|
||||
private String province;
|
||||
|
||||
/** 市 */
|
||||
@Excel(name = "市")
|
||||
private String city;
|
||||
|
||||
/** 公网IP */
|
||||
@Excel(name = "公网IP")
|
||||
private String publicIp;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
|
||||
/** MAC地址 */
|
||||
@Excel(name = "MAC地址")
|
||||
private String macAddress;
|
||||
|
||||
/** 接口类型 */
|
||||
@Excel(name = "接口类型")
|
||||
private String interfaceType;
|
||||
|
||||
/** IPv4地址 */
|
||||
@Excel(name = "IPv4地址")
|
||||
private String ipv4Address;
|
||||
|
||||
/** 网关 */
|
||||
@Excel(name = "网关")
|
||||
private String gateway;
|
||||
/** 绑定ip 1业务IP,2管理ip */
|
||||
private String bindIp;
|
||||
/** 是否为新信息 */
|
||||
private Integer newFlag;
|
||||
|
||||
}
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
package com.tongran.mtragent.mapper;
|
||||
|
||||
|
||||
import com.tongran.mtragent.domain.RmNetworkInterface;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户端网络接口信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface RmNetworkInterfaceMapper
|
||||
{
|
||||
/**
|
||||
* 查询客户端网络接口信息
|
||||
*
|
||||
* @param id 客户端网络接口信息主键
|
||||
* @return 客户端网络接口信息
|
||||
*/
|
||||
public RmNetworkInterface selectRmNetworkInterfaceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询客户端网络接口信息列表
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 客户端网络接口信息集合
|
||||
*/
|
||||
public List<RmNetworkInterface> selectRmNetworkInterfaceList(RmNetworkInterface rmNetworkInterface);
|
||||
|
||||
/**
|
||||
* 新增客户端网络接口信息
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
||||
|
||||
/**
|
||||
* 修改客户端网络接口信息
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
||||
|
||||
/**
|
||||
* 删除客户端网络接口信息
|
||||
*
|
||||
* @param id 客户端网络接口信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmNetworkInterfaceById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除客户端网络接口信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmNetworkInterfaceByIds(Long[] ids);
|
||||
|
||||
int updateRmNetworkInterfaceByMac(RmNetworkInterface rmNetworkInterface);
|
||||
}
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
package com.tongran.mtragent.service;
|
||||
|
||||
|
||||
import com.tongran.mtragent.domain.RmNetworkInterface;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户端网络接口信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
public interface IRmNetworkInterfaceService
|
||||
{
|
||||
/**
|
||||
* 查询客户端网络接口信息
|
||||
*
|
||||
* @param id 客户端网络接口信息主键
|
||||
* @return 客户端网络接口信息
|
||||
*/
|
||||
public RmNetworkInterface selectRmNetworkInterfaceById(Long id);
|
||||
|
||||
/**
|
||||
* 查询客户端网络接口信息列表
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 客户端网络接口信息集合
|
||||
*/
|
||||
public List<RmNetworkInterface> selectRmNetworkInterfaceList(RmNetworkInterface rmNetworkInterface);
|
||||
|
||||
/**
|
||||
* 新增客户端网络接口信息
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
||||
|
||||
/**
|
||||
* 修改客户端网络接口信息
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
||||
/**
|
||||
* 修改客户端网络接口信息
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmNetworkInterfaceByMac(RmNetworkInterface rmNetworkInterface);
|
||||
|
||||
/**
|
||||
* 批量删除客户端网络接口信息
|
||||
*
|
||||
* @param ids 需要删除的客户端网络接口信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmNetworkInterfaceByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除客户端网络接口信息信息
|
||||
*
|
||||
* @param id 客户端网络接口信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmNetworkInterfaceById(Long id);
|
||||
|
||||
/**
|
||||
* 绑定公网ip
|
||||
* @param rmNetworkInterface
|
||||
* @return
|
||||
*/
|
||||
int bindPublicIp(RmNetworkInterface rmNetworkInterface);
|
||||
|
||||
/**
|
||||
* 更新路由信息
|
||||
* @param clientId
|
||||
*/
|
||||
void updateRouteMsg(String clientId);
|
||||
}
|
||||
-182
@@ -1,182 +0,0 @@
|
||||
package com.tongran.mtragent.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.tongran.common.core.enums.MsgEnum;
|
||||
import com.tongran.common.core.utils.DateUtils;
|
||||
import com.tongran.mtragent.domain.DeviceMessage;
|
||||
import com.tongran.mtragent.domain.RmNetworkInterface;
|
||||
import com.tongran.mtragent.domain.vo.PolicyTypeVo;
|
||||
import com.tongran.mtragent.mapper.RmNetworkInterfaceMapper;
|
||||
import com.tongran.mtragent.model.ProducerMode;
|
||||
import com.tongran.mtragent.producer.MessageProducer;
|
||||
import com.tongran.mtragent.service.IRmNetworkInterfaceService;
|
||||
import com.tongran.system.api.domain.RouteMsg;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 客户端网络接口信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-14
|
||||
*/
|
||||
@Service
|
||||
public class RmNetworkInterfaceServiceImpl implements IRmNetworkInterfaceService
|
||||
{
|
||||
@Autowired
|
||||
private RmNetworkInterfaceMapper rmNetworkInterfaceMapper;
|
||||
@Autowired
|
||||
private ProducerMode producerMode;
|
||||
|
||||
/**
|
||||
* 查询客户端网络接口信息
|
||||
*
|
||||
* @param id 客户端网络接口信息主键
|
||||
* @return 客户端网络接口信息
|
||||
*/
|
||||
@Override
|
||||
public RmNetworkInterface selectRmNetworkInterfaceById(Long id)
|
||||
{
|
||||
return rmNetworkInterfaceMapper.selectRmNetworkInterfaceById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户端网络接口信息列表
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 客户端网络接口信息
|
||||
*/
|
||||
@Override
|
||||
public List<RmNetworkInterface> selectRmNetworkInterfaceList(RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
return rmNetworkInterfaceMapper.selectRmNetworkInterfaceList(rmNetworkInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户端网络接口信息
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRmNetworkInterface(RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
rmNetworkInterface.setCreateTime(DateUtils.getNowDate());
|
||||
return rmNetworkInterfaceMapper.insertRmNetworkInterface(rmNetworkInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户端网络接口信息
|
||||
*
|
||||
* @param rmNetworkInterface 客户端网络接口信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRmNetworkInterface(RmNetworkInterface rmNetworkInterface)
|
||||
{
|
||||
rmNetworkInterface.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmNetworkInterfaceMapper.updateRmNetworkInterface(rmNetworkInterface);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateRmNetworkInterfaceByMac(RmNetworkInterface rmNetworkInterface) {
|
||||
rmNetworkInterface.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmNetworkInterfaceMapper.updateRmNetworkInterfaceByMac(rmNetworkInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除客户端网络接口信息
|
||||
*
|
||||
* @param ids 需要删除的客户端网络接口信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmNetworkInterfaceByIds(Long[] ids)
|
||||
{
|
||||
return rmNetworkInterfaceMapper.deleteRmNetworkInterfaceByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户端网络接口信息信息
|
||||
*
|
||||
* @param id 客户端网络接口信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmNetworkInterfaceById(Long id)
|
||||
{
|
||||
return rmNetworkInterfaceMapper.deleteRmNetworkInterfaceById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定公网ip
|
||||
* @param rmNetworkInterface
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int bindPublicIp(RmNetworkInterface rmNetworkInterface) {
|
||||
return rmNetworkInterfaceMapper.updateRmNetworkInterface(rmNetworkInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新路由信息
|
||||
* @param clientId
|
||||
*/
|
||||
public void updateRouteMsg(String clientId){
|
||||
MessageProducer messageProducer = new MessageProducer();
|
||||
// 查询路由是否有变化
|
||||
RmNetworkInterface rmNetworkInterface = new RmNetworkInterface();
|
||||
rmNetworkInterface.setClientId(clientId);
|
||||
rmNetworkInterface.setBindIp("2");
|
||||
List<RmNetworkInterface> networkInterfaces = rmNetworkInterfaceMapper.selectRmNetworkInterfaceList(rmNetworkInterface);
|
||||
if(!networkInterfaces.isEmpty()){
|
||||
List<RmNetworkInterface> oldList = networkInterfaces.stream()
|
||||
.filter(networkInterface -> networkInterface.getNewFlag() == 0)
|
||||
.collect(Collectors.toList());
|
||||
if(!oldList.isEmpty()){
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 增加静态路由
|
||||
RmNetworkInterface oldMsg = oldList.get(0);
|
||||
RouteMsg oldRouteMsg = new RouteMsg();
|
||||
oldRouteMsg.setGateway(oldMsg.getGateway());
|
||||
oldRouteMsg.setName(oldMsg.getInterfaceName());
|
||||
resultMap.put("delRoute", oldRouteMsg);
|
||||
List<RmNetworkInterface> newList = networkInterfaces.stream()
|
||||
.filter(networkInterface -> networkInterface.getNewFlag() == 1)
|
||||
.collect(Collectors.toList());
|
||||
RmNetworkInterface newMsg = newList.get(0);
|
||||
RouteMsg newRouteMsg = new RouteMsg();
|
||||
newRouteMsg.setGateway(newMsg.getGateway());
|
||||
newRouteMsg.setName(newMsg.getInterfaceName());
|
||||
resultMap.put("addRoute", newRouteMsg);
|
||||
resultMap.put("upTime", Instant.now().getEpochSecond());
|
||||
PolicyTypeVo policyTypeVo = new PolicyTypeVo();
|
||||
policyTypeVo.setRoutes(JSONObject.toJSONString(resultMap));
|
||||
String configJson = JSONObject.toJSONString(policyTypeVo);
|
||||
// 构建发送消息
|
||||
DeviceMessage message = new DeviceMessage();
|
||||
message.setClientId(clientId);
|
||||
message.setData(configJson);
|
||||
message.setDataType(MsgEnum.获取最新策略应答.getValue());
|
||||
|
||||
messageProducer.sendAsyncProducerMessage(
|
||||
producerMode.getAgentTopic(),
|
||||
"",
|
||||
"",
|
||||
JSONObject.toJSONString(message)
|
||||
);
|
||||
// 更新网卡信息表
|
||||
RmNetworkInterface updateQuery = new RmNetworkInterface();
|
||||
updateQuery.setNewFlag(999);
|
||||
updateQuery.setMacAddress(networkInterfaces.get(0).getMacAddress());
|
||||
rmNetworkInterfaceMapper.updateRmNetworkInterfaceByMac(updateQuery);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-148
@@ -1,148 +0,0 @@
|
||||
<?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.mtragent.mapper.RmNetworkInterfaceMapper">
|
||||
|
||||
<resultMap type="RmNetworkInterface" id="RmNetworkInterfaceResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="isp" column="isp" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="publicIp" column="public_ip" />
|
||||
<result property="interfaceName" column="interface_name" />
|
||||
<result property="macAddress" column="mac_address" />
|
||||
<result property="interfaceType" column="interface_type" />
|
||||
<result property="ipv4Address" column="ipv4_address" />
|
||||
<result property="gateway" column="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" />
|
||||
<result property="bindIp" column="bind_ip" />
|
||||
<result property="newFlag" column="new_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmNetworkInterfaceVo">
|
||||
select id, client_id, isp, province, city, public_ip, interface_name, mac_address, interface_type, ipv4_address, gateway, create_time, update_time, create_by, update_by, bind_ip, new_flag from rm_network_interface
|
||||
</sql>
|
||||
|
||||
<select id="selectRmNetworkInterfaceList" parameterType="RmNetworkInterface" resultMap="RmNetworkInterfaceResult">
|
||||
<include refid="selectRmNetworkInterfaceVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="isp != null and isp != ''"> and isp = #{isp}</if>
|
||||
<if test="province != null and province != ''"> and province = #{province}</if>
|
||||
<if test="city != null and city != ''"> and city = #{city}</if>
|
||||
<if test="publicIp != null and publicIp != ''"> and public_ip = #{publicIp}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
||||
<if test="macAddress != null and macAddress != ''"> and mac_address = #{macAddress}</if>
|
||||
<if test="interfaceType != null and interfaceType != ''"> and interface_type = #{interfaceType}</if>
|
||||
<if test="ipv4Address != null and ipv4Address != ''"> and ipv4_address = #{ipv4Address}</if>
|
||||
<if test="gateway != null and gateway != ''"> and gateway = #{gateway}</if>
|
||||
<if test="bindIp != null and bindIp != ''"> and bind_ip = #{bindIp}</if>
|
||||
<if test="newFlag != null "> and new_flag = #{newFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRmNetworkInterfaceById" parameterType="Long" resultMap="RmNetworkInterfaceResult">
|
||||
<include refid="selectRmNetworkInterfaceVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmNetworkInterface" parameterType="RmNetworkInterface" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_network_interface
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="isp != null">isp,</if>
|
||||
<if test="province != null">province,</if>
|
||||
<if test="city != null">city,</if>
|
||||
<if test="publicIp != null">public_ip,</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">interface_name,</if>
|
||||
<if test="macAddress != null">mac_address,</if>
|
||||
<if test="interfaceType != null">interface_type,</if>
|
||||
<if test="ipv4Address != null">ipv4_address,</if>
|
||||
<if test="gateway != null">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>
|
||||
<if test="bindIp != null">bind_ip,</if>
|
||||
<if test="newFlag != null">new_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="isp != null">#{isp},</if>
|
||||
<if test="province != null">#{province},</if>
|
||||
<if test="city != null">#{city},</if>
|
||||
<if test="publicIp != null">#{publicIp},</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">#{interfaceName},</if>
|
||||
<if test="macAddress != null">#{macAddress},</if>
|
||||
<if test="interfaceType != null">#{interfaceType},</if>
|
||||
<if test="ipv4Address != null">#{ipv4Address},</if>
|
||||
<if test="gateway != null">#{gateway},</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>
|
||||
<if test="bindIp != null">#{bindIp},</if>
|
||||
<if test="newFlag != null">#{newFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmNetworkInterface" parameterType="RmNetworkInterface">
|
||||
update rm_network_interface
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<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>
|
||||
<if test="newFlag != null">new_flag = #{newFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRmNetworkInterfaceById" parameterType="Long">
|
||||
delete from rm_network_interface where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmNetworkInterfaceByIds" parameterType="String">
|
||||
delete from rm_network_interface where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<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>
|
||||
<if test="newFlag != null">new_flag = #{newFlag},</if>
|
||||
</trim>
|
||||
where mac_address = #{macAddress} and client_id = #{clientId}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user