新增业务流量入库方法。
增加自动创建业务流量分表方法
This commit is contained in:
+2
@@ -82,4 +82,6 @@ public interface EpsInitialTrafficDataMapper {
|
||||
void createMountPointInfo(String tableName);
|
||||
|
||||
void createDockerInfo(String tableName);
|
||||
|
||||
void createNetBusinessInfo(String tableName);
|
||||
}
|
||||
|
||||
+10
@@ -82,6 +82,8 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
createMountPointInfo(year, month);
|
||||
// 创建容器信息表
|
||||
createDockerInfo(year, month);
|
||||
// 创建业务流量信息表
|
||||
createNetBusinessInfo(year, month);
|
||||
}
|
||||
public void createNextMonthTables(Long plusMonth) {
|
||||
LocalDate nextMonth = LocalDate.now().plusMonths(plusMonth);
|
||||
@@ -110,6 +112,8 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
createMountPointInfo(year, month);
|
||||
// 创建容器信息表
|
||||
createDockerInfo(year, month);
|
||||
// 创建业务流量表
|
||||
createNetBusinessInfo(year, month);
|
||||
}
|
||||
private void createTrafficDetailsTable(int year, int month) {
|
||||
createRangeTables(year, month, "eps_traffic_details", (tableName) -> {
|
||||
@@ -171,6 +175,12 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
});
|
||||
}
|
||||
|
||||
private void createNetBusinessInfo(int year, int month) {
|
||||
createRangeTables(year, month, "initial_net_business_traffic", (tableName) -> {
|
||||
epsInitialTrafficDataMapper.createNetBusinessInfo(tableName);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用创建表方法
|
||||
* @param year 年份
|
||||
|
||||
+23
-1
@@ -291,7 +291,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
UNIQUE INDEX `idx_unique_key`(`client_id`, `mount`, `create_time`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT = '挂载点监控信息表';
|
||||
</update>
|
||||
|
||||
<update id="createNetBusinessInfo">
|
||||
CREATE TABLE ${tableName} (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`client_id` varchar(255) comment '客户端唯一标识',
|
||||
`mac` varchar(255) comment 'mac地址',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '网卡名称',
|
||||
`pid` int(11) DEFAULT NULL COMMENT '进程ID',
|
||||
`process_name` varchar(255) DEFAULT NULL COMMENT '进程名',
|
||||
`in_speed` varchar(50) DEFAULT NULL COMMENT '累计接收字节数',
|
||||
`out_speed` varchar(50) DEFAULT NULL COMMENT '累计发送字节数',
|
||||
`connection_count` int(11) DEFAULT NULL COMMENT '当前连接数',
|
||||
`ipv4_in_speed` varchar(50) DEFAULT NULL COMMENT 'IPv4接收流量',
|
||||
`ipv4_out_speed` varchar(50) DEFAULT NULL COMMENT 'IPv4发送流量',
|
||||
`ipv6_in_speed` varchar(50) DEFAULT NULL COMMENT 'IPv6接收流量',
|
||||
`ipv6_out_speed` varchar(50) DEFAULT NULL COMMENT 'IPv6发送流量',
|
||||
`create_by` varchar(64) DEFAULT '' COMMENT '创建者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(64) DEFAULT '' COMMENT '更新者',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网络业务流量监控表';
|
||||
</update>
|
||||
<!-- 单条插入语句 -->
|
||||
<insert id="insert">
|
||||
INSERT INTO ${tableName} (
|
||||
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.common.security.annotation.RequiresPermissions;
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTraffic;
|
||||
import com.tongran.rocketmq.service.IInitialNetBusinessTrafficService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/initialNetBusinessTraffic")
|
||||
@RequiresPermissions("rocketmq:traffic")
|
||||
public class InitialNetBusinessTrafficController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialNetBusinessTrafficService initialNetBusinessTrafficService;
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialNetBusinessTraffic initialNetBusinessTraffic)
|
||||
{
|
||||
startPage();
|
||||
List<InitialNetBusinessTraffic> list = initialNetBusinessTrafficService.selectInitialNetBusinessTrafficList(initialNetBusinessTraffic);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出网络业务流量监控列表
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialNetBusinessTraffic initialNetBusinessTraffic)
|
||||
{
|
||||
List<InitialNetBusinessTraffic> list = initialNetBusinessTrafficService.selectInitialNetBusinessTrafficList(initialNetBusinessTraffic);
|
||||
ExcelUtil<InitialNetBusinessTraffic> util = new ExcelUtil<InitialNetBusinessTraffic>(InitialNetBusinessTraffic.class);
|
||||
util.exportExcel(response, list, "网络业务流量监控数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网络业务流量监控详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialNetBusinessTrafficService.selectInitialNetBusinessTrafficById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialNetBusinessTraffic initialNetBusinessTraffic)
|
||||
{
|
||||
return toAjax(initialNetBusinessTrafficService.insertInitialNetBusinessTraffic(initialNetBusinessTraffic));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialNetBusinessTraffic initialNetBusinessTraffic)
|
||||
{
|
||||
return toAjax(initialNetBusinessTrafficService.updateInitialNetBusinessTraffic(initialNetBusinessTraffic));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialNetBusinessTrafficService.deleteInitialNetBusinessTrafficByIds(ids));
|
||||
}
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.tongran.rocketmq.controller;
|
||||
|
||||
import com.tongran.common.core.utils.poi.ExcelUtil;
|
||||
import com.tongran.common.core.web.controller.BaseController;
|
||||
import com.tongran.common.core.web.domain.AjaxResult;
|
||||
import com.tongran.common.core.web.page.TableDataInfo;
|
||||
import com.tongran.common.log.annotation.Log;
|
||||
import com.tongran.common.log.enums.BusinessType;
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTrafficTemp;
|
||||
import com.tongran.rocketmq.service.IInitialNetBusinessTrafficTempService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/initialNetBusinessTrafficTemp")
|
||||
public class InitialNetBusinessTrafficTempController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialNetBusinessTrafficTempService initialNetBusinessTrafficTempService;
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp)
|
||||
{
|
||||
startPage();
|
||||
List<InitialNetBusinessTrafficTemp> list = initialNetBusinessTrafficTempService.selectInitialNetBusinessTrafficTempList(initialNetBusinessTrafficTemp);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出网络业务流量监控列表
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp)
|
||||
{
|
||||
List<InitialNetBusinessTrafficTemp> list = initialNetBusinessTrafficTempService.selectInitialNetBusinessTrafficTempList(initialNetBusinessTrafficTemp);
|
||||
ExcelUtil<InitialNetBusinessTrafficTemp> util = new ExcelUtil<InitialNetBusinessTrafficTemp>(InitialNetBusinessTrafficTemp.class);
|
||||
util.exportExcel(response, list, "网络业务流量监控数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取网络业务流量监控详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialNetBusinessTrafficTempService.selectInitialNetBusinessTrafficTempById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp)
|
||||
{
|
||||
return toAjax(initialNetBusinessTrafficTempService.insertInitialNetBusinessTrafficTemp(initialNetBusinessTrafficTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp)
|
||||
{
|
||||
return toAjax(initialNetBusinessTrafficTempService.updateInitialNetBusinessTrafficTemp(initialNetBusinessTrafficTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控
|
||||
*/
|
||||
@Log(title = "网络业务流量监控", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialNetBusinessTrafficTempService.deleteInitialNetBusinessTrafficTempByIds(ids));
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控对象 initial_net_business_traffic
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
@Data
|
||||
public class InitialNetBusinessTraffic extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端唯一标识 */
|
||||
@Excel(name = "客户端唯一标识")
|
||||
private String clientId;
|
||||
|
||||
/** mac地址 */
|
||||
@Excel(name = "mac地址")
|
||||
private String mac;
|
||||
|
||||
/** 网卡名称 */
|
||||
@Excel(name = "网卡名称")
|
||||
private String name;
|
||||
|
||||
/** 进程ID */
|
||||
@Excel(name = "进程ID")
|
||||
private Long pid;
|
||||
|
||||
/** 进程名 */
|
||||
@Excel(name = "进程名")
|
||||
private String processName;
|
||||
|
||||
/** 累计接收字节数 */
|
||||
@Excel(name = "累计接收字节数")
|
||||
private String inSpeed;
|
||||
|
||||
/** 累计发送字节数 */
|
||||
@Excel(name = "累计发送字节数")
|
||||
private String outSpeed;
|
||||
|
||||
/** 当前连接数 */
|
||||
@Excel(name = "当前连接数")
|
||||
private Long connectionCount;
|
||||
|
||||
/** IPv4接收流量 */
|
||||
@Excel(name = "IPv4接收流量")
|
||||
private String ipv4InSpeed;
|
||||
|
||||
/** IPv4发送流量 */
|
||||
@Excel(name = "IPv4发送流量")
|
||||
private String ipv4OutSpeed;
|
||||
|
||||
/** IPv6接收流量 */
|
||||
@Excel(name = "IPv6接收流量")
|
||||
private String ipv6InSpeed;
|
||||
|
||||
/** IPv6发送流量 */
|
||||
@Excel(name = "IPv6发送流量")
|
||||
private String ipv6OutSpeed;
|
||||
|
||||
private List<InitialNetBusinessTraffic> list;
|
||||
|
||||
private String tableName;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
}
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
package com.tongran.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.tongran.common.core.annotation.Excel;
|
||||
import com.tongran.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控对象 initial_net_business_traffic_temp
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
public class InitialNetBusinessTrafficTemp extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端唯一标识 */
|
||||
@Excel(name = "客户端唯一标识")
|
||||
private String clientId;
|
||||
|
||||
/** mac地址 */
|
||||
@Excel(name = "mac地址")
|
||||
private String mac;
|
||||
|
||||
/** 网卡名称 */
|
||||
@Excel(name = "网卡名称")
|
||||
private String name;
|
||||
|
||||
/** 进程ID */
|
||||
@Excel(name = "进程ID")
|
||||
private Long pid;
|
||||
|
||||
/** 进程名 */
|
||||
@Excel(name = "进程名")
|
||||
private String processName;
|
||||
|
||||
/** 累计接收字节数 */
|
||||
@Excel(name = "累计接收字节数")
|
||||
private String inSpeed;
|
||||
|
||||
/** 累计发送字节数 */
|
||||
@Excel(name = "累计发送字节数")
|
||||
private String outSpeed;
|
||||
|
||||
/** 当前连接数 */
|
||||
@Excel(name = "当前连接数")
|
||||
private Long connectionCount;
|
||||
|
||||
/** IPv4接收流量 */
|
||||
@Excel(name = "IPv4接收流量")
|
||||
private String ipv4InSpeed;
|
||||
|
||||
/** IPv4发送流量 */
|
||||
@Excel(name = "IPv4发送流量")
|
||||
private String ipv4OutSpeed;
|
||||
|
||||
/** IPv6接收流量 */
|
||||
@Excel(name = "IPv6接收流量")
|
||||
private String ipv6InSpeed;
|
||||
|
||||
/** IPv6发送流量 */
|
||||
@Excel(name = "IPv6发送流量")
|
||||
private String ipv6OutSpeed;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setMac(String mac)
|
||||
{
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
public String getMac()
|
||||
{
|
||||
return mac;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setPid(Long pid)
|
||||
{
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public Long getPid()
|
||||
{
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setProcessName(String processName)
|
||||
{
|
||||
this.processName = processName;
|
||||
}
|
||||
|
||||
public String getProcessName()
|
||||
{
|
||||
return processName;
|
||||
}
|
||||
|
||||
public void setInSpeed(String inSpeed)
|
||||
{
|
||||
this.inSpeed = inSpeed;
|
||||
}
|
||||
|
||||
public String getInSpeed()
|
||||
{
|
||||
return inSpeed;
|
||||
}
|
||||
|
||||
public void setOutSpeed(String outSpeed)
|
||||
{
|
||||
this.outSpeed = outSpeed;
|
||||
}
|
||||
|
||||
public String getOutSpeed()
|
||||
{
|
||||
return outSpeed;
|
||||
}
|
||||
|
||||
public void setConnectionCount(Long connectionCount)
|
||||
{
|
||||
this.connectionCount = connectionCount;
|
||||
}
|
||||
|
||||
public Long getConnectionCount()
|
||||
{
|
||||
return connectionCount;
|
||||
}
|
||||
|
||||
public void setIpv4InSpeed(String ipv4InSpeed)
|
||||
{
|
||||
this.ipv4InSpeed = ipv4InSpeed;
|
||||
}
|
||||
|
||||
public String getIpv4InSpeed()
|
||||
{
|
||||
return ipv4InSpeed;
|
||||
}
|
||||
|
||||
public void setIpv4OutSpeed(String ipv4OutSpeed)
|
||||
{
|
||||
this.ipv4OutSpeed = ipv4OutSpeed;
|
||||
}
|
||||
|
||||
public String getIpv4OutSpeed()
|
||||
{
|
||||
return ipv4OutSpeed;
|
||||
}
|
||||
|
||||
public void setIpv6InSpeed(String ipv6InSpeed)
|
||||
{
|
||||
this.ipv6InSpeed = ipv6InSpeed;
|
||||
}
|
||||
|
||||
public String getIpv6InSpeed()
|
||||
{
|
||||
return ipv6InSpeed;
|
||||
}
|
||||
|
||||
public void setIpv6OutSpeed(String ipv6OutSpeed)
|
||||
{
|
||||
this.ipv6OutSpeed = ipv6OutSpeed;
|
||||
}
|
||||
|
||||
public String getIpv6OutSpeed()
|
||||
{
|
||||
return ipv6OutSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("mac", getMac())
|
||||
.append("name", getName())
|
||||
.append("pid", getPid())
|
||||
.append("processName", getProcessName())
|
||||
.append("inSpeed", getInSpeed())
|
||||
.append("outSpeed", getOutSpeed())
|
||||
.append("connectionCount", getConnectionCount())
|
||||
.append("ipv4InSpeed", getIpv4InSpeed())
|
||||
.append("ipv4OutSpeed", getIpv4OutSpeed())
|
||||
.append("ipv6InSpeed", getIpv6InSpeed())
|
||||
.append("ipv6OutSpeed", getIpv6OutSpeed())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.tongran.rocketmq.mapper;
|
||||
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTraffic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
public interface InitialNetBusinessTrafficMapper
|
||||
{
|
||||
/**
|
||||
* 查询网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
public InitialNetBusinessTraffic selectInitialNetBusinessTrafficById(Long id);
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 网络业务流量监控集合
|
||||
*/
|
||||
public List<InitialNetBusinessTraffic> selectInitialNetBusinessTrafficList(InitialNetBusinessTraffic initialNetBusinessTraffic);
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialNetBusinessTraffic(InitialNetBusinessTraffic initialNetBusinessTraffic);
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialNetBusinessTraffic(InitialNetBusinessTraffic initialNetBusinessTraffic);
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除网络业务流量监控
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficByIds(Long[] ids);
|
||||
|
||||
void batchInsertBusinessTraffic(InitialNetBusinessTraffic batchData);
|
||||
|
||||
void batchInsertBusinessRecoverTraffic(InitialNetBusinessTraffic batchData);
|
||||
|
||||
List<InitialNetBusinessTraffic> getNetBusinessTrafficList(InitialNetBusinessTraffic condition);
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.tongran.rocketmq.mapper;
|
||||
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTrafficTemp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
public interface InitialNetBusinessTrafficTempMapper
|
||||
{
|
||||
/**
|
||||
* 查询网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
public InitialNetBusinessTrafficTemp selectInitialNetBusinessTrafficTempById(Long id);
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 网络业务流量监控集合
|
||||
*/
|
||||
public List<InitialNetBusinessTrafficTemp> selectInitialNetBusinessTrafficTempList(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialNetBusinessTrafficTemp(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialNetBusinessTrafficTemp(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficTempById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除网络业务流量监控
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficTempByIds(Long[] ids);
|
||||
|
||||
int deleteBusinessTempMsgByClientId(String clientId);
|
||||
|
||||
int deleteBusinessTempMsgByClientIdAndTime(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
int batchInsertBusinessTemp(List<InitialNetBusinessTrafficTemp> interfaces);
|
||||
|
||||
int batchInsertBusinessRecoverTemp(List<InitialNetBusinessTrafficTemp> interfaces);
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.tongran.rocketmq.service;
|
||||
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTraffic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
public interface IInitialNetBusinessTrafficService
|
||||
{
|
||||
/**
|
||||
* 查询网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
public InitialNetBusinessTraffic selectInitialNetBusinessTrafficById(Long id);
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 网络业务流量监控集合
|
||||
*/
|
||||
public List<InitialNetBusinessTraffic> selectInitialNetBusinessTrafficList(InitialNetBusinessTraffic initialNetBusinessTraffic);
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialNetBusinessTraffic(InitialNetBusinessTraffic initialNetBusinessTraffic);
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialNetBusinessTraffic(InitialNetBusinessTraffic initialNetBusinessTraffic);
|
||||
|
||||
/**
|
||||
* 批量删除网络业务流量监控
|
||||
*
|
||||
* @param ids 需要删除的网络业务流量监控主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控信息
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficById(Long id);
|
||||
void batchInsertBusinessTraffic(InitialNetBusinessTraffic data);
|
||||
void batchInsertBusinessRecoverTraffic(InitialNetBusinessTraffic data);
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.tongran.rocketmq.service;
|
||||
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTrafficTemp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
public interface IInitialNetBusinessTrafficTempService
|
||||
{
|
||||
/**
|
||||
* 查询网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
public InitialNetBusinessTrafficTemp selectInitialNetBusinessTrafficTempById(Long id);
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 网络业务流量监控集合
|
||||
*/
|
||||
public List<InitialNetBusinessTrafficTemp> selectInitialNetBusinessTrafficTempList(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialNetBusinessTrafficTemp(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialNetBusinessTrafficTemp(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
/**
|
||||
* 批量删除网络业务流量监控
|
||||
*
|
||||
* @param ids 需要删除的网络业务流量监控主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficTempByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控信息
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialNetBusinessTrafficTempById(Long id);
|
||||
|
||||
int deleteBusinessTempMsgByClientId(String clientId);
|
||||
public int deleteBusinessTempMsgByClientIdAndTime(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp);
|
||||
|
||||
public int batchInsertBusinessTemp(List<InitialNetBusinessTrafficTemp> interfaces);
|
||||
public int batchInsertBusinessRecoverTemp(List<InitialNetBusinessTrafficTemp> interfaces);
|
||||
}
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
package com.tongran.rocketmq.service.impl;
|
||||
|
||||
import com.tongran.common.core.utils.DateUtils;
|
||||
import com.tongran.common.core.utils.TableSubUtil;
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTraffic;
|
||||
import com.tongran.rocketmq.mapper.InitialNetBusinessTrafficMapper;
|
||||
import com.tongran.rocketmq.service.IInitialNetBusinessTrafficService;
|
||||
import com.tongran.rocketmq.utils.TableRouterUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Isolation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialNetBusinessTrafficServiceImpl implements IInitialNetBusinessTrafficService
|
||||
{
|
||||
@Autowired
|
||||
private InitialNetBusinessTrafficMapper initialNetBusinessTrafficMapper;
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
@Override
|
||||
public InitialNetBusinessTraffic selectInitialNetBusinessTrafficById(Long id)
|
||||
{
|
||||
return initialNetBusinessTrafficMapper.selectInitialNetBusinessTrafficById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
@Override
|
||||
public List<InitialNetBusinessTraffic> selectInitialNetBusinessTrafficList(InitialNetBusinessTraffic initialNetBusinessTraffic)
|
||||
{
|
||||
return initialNetBusinessTrafficMapper.selectInitialNetBusinessTrafficList(initialNetBusinessTraffic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialNetBusinessTraffic(InitialNetBusinessTraffic initialNetBusinessTraffic)
|
||||
{
|
||||
initialNetBusinessTraffic.setCreateTime(DateUtils.getNowDate());
|
||||
return initialNetBusinessTrafficMapper.insertInitialNetBusinessTraffic(initialNetBusinessTraffic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTraffic 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialNetBusinessTraffic(InitialNetBusinessTraffic initialNetBusinessTraffic)
|
||||
{
|
||||
initialNetBusinessTraffic.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialNetBusinessTrafficMapper.updateInitialNetBusinessTraffic(initialNetBusinessTraffic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网络业务流量监控
|
||||
*
|
||||
* @param ids 需要删除的网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialNetBusinessTrafficByIds(Long[] ids)
|
||||
{
|
||||
return initialNetBusinessTrafficMapper.deleteInitialNetBusinessTrafficByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控信息
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialNetBusinessTrafficById(Long id)
|
||||
{
|
||||
return initialNetBusinessTrafficMapper.deleteInitialNetBusinessTrafficById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
||||
public void batchInsertBusinessTraffic(InitialNetBusinessTraffic data) {
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
List<InitialNetBusinessTraffic> dataList = data.getList();
|
||||
if (dataList == null || dataList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 按表名分组批量插入
|
||||
Map<String, List<InitialNetBusinessTraffic>> groupedData = dataList.stream()
|
||||
.map(item -> {
|
||||
try {
|
||||
InitialNetBusinessTraffic processed = new InitialNetBusinessTraffic();
|
||||
BeanUtils.copyProperties(item, processed);
|
||||
|
||||
// 设置创建时间
|
||||
if (item.getCreateTime() == null) {
|
||||
item.setCreateTime(DateUtils.getNowDate());
|
||||
}
|
||||
|
||||
// 根据创建时间获取表名
|
||||
Date createTime = item.getCreateTime();
|
||||
processed.setTableName(TableSubUtil.getTableName(createTime, "initial_net_business_traffic"));
|
||||
|
||||
return processed;
|
||||
} catch (Exception e) {
|
||||
log.error("业务流量数据处理失败: {}", e.getMessage());
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.groupingBy(
|
||||
InitialNetBusinessTraffic::getTableName,
|
||||
LinkedHashMap::new, // 保持插入顺序
|
||||
Collectors.toList()
|
||||
));
|
||||
|
||||
groupedData.forEach((tableName, list) -> {
|
||||
try {
|
||||
InitialNetBusinessTraffic batchData = new InitialNetBusinessTraffic();
|
||||
BeanUtils.copyProperties(data, batchData);
|
||||
batchData.setTableName(tableName);
|
||||
batchData.setList(list);
|
||||
initialNetBusinessTrafficMapper.batchInsertBusinessTraffic(batchData);
|
||||
} catch (Exception e) {
|
||||
log.error("业务流量数据表{}插入失败", tableName, e);
|
||||
throw new RuntimeException("业务流量数据批量插入失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
||||
public void batchInsertBusinessRecoverTraffic(InitialNetBusinessTraffic data) {
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
List<InitialNetBusinessTraffic> dataList = data.getList();
|
||||
if (dataList == null || dataList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 按表名分组批量插入
|
||||
Map<String, List<InitialNetBusinessTraffic>> groupedData = dataList.stream()
|
||||
.map(item -> {
|
||||
try {
|
||||
InitialNetBusinessTraffic processed = new InitialNetBusinessTraffic();
|
||||
BeanUtils.copyProperties(item, processed);
|
||||
|
||||
// 设置创建时间
|
||||
if (item.getCreateTime() == null) {
|
||||
item.setCreateTime(DateUtils.getNowDate());
|
||||
}
|
||||
|
||||
// 根据创建时间获取表名(恢复数据可能使用不同的表名规则)
|
||||
Date createTime = item.getCreateTime();
|
||||
processed.setTableName(TableSubUtil.getTableName(createTime, "initial_net_business_traffic"));
|
||||
|
||||
return processed;
|
||||
} catch (Exception e) {
|
||||
log.error("业务流量恢复数据处理失败: {}", e.getMessage());
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.groupingBy(
|
||||
InitialNetBusinessTraffic::getTableName,
|
||||
LinkedHashMap::new, // 保持插入顺序
|
||||
Collectors.toList()
|
||||
));
|
||||
|
||||
groupedData.forEach((tableName, list) -> {
|
||||
try {
|
||||
InitialNetBusinessTraffic batchData = new InitialNetBusinessTraffic();
|
||||
BeanUtils.copyProperties(data, batchData);
|
||||
batchData.setTableName(tableName);
|
||||
batchData.setList(list);
|
||||
initialNetBusinessTrafficMapper.batchInsertBusinessRecoverTraffic(batchData);
|
||||
} catch (Exception e) {
|
||||
log.error("业务流量恢复数据表{}插入失败", tableName, e);
|
||||
throw new RuntimeException("业务流量恢复数据批量插入失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public List<InitialNetBusinessTraffic> getListByTableName(InitialNetBusinessTraffic initialNetBusinessTraffic){
|
||||
// 获取涉及的表名
|
||||
Set<String> tableNames = TableRouterUtil.getTableNamesBetween(initialNetBusinessTraffic.getStartTime(), initialNetBusinessTraffic.getEndTime());
|
||||
// 并行查询各表
|
||||
List<InitialNetBusinessTraffic> list = tableNames.parallelStream()
|
||||
.flatMap(tableName -> {
|
||||
InitialNetBusinessTraffic condition = new InitialNetBusinessTraffic();
|
||||
condition.setTableName(tableName);
|
||||
condition.setStartTime(initialNetBusinessTraffic.getStartTime());
|
||||
condition.setEndTime(initialNetBusinessTraffic.getEndTime());
|
||||
condition.setClientId(initialNetBusinessTraffic.getClientId());
|
||||
condition.setName(initialNetBusinessTraffic.getName());
|
||||
return initialNetBusinessTrafficMapper.getNetBusinessTrafficList(condition).stream();
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.tongran.rocketmq.service.impl;
|
||||
|
||||
import com.tongran.common.core.utils.DateUtils;
|
||||
import com.tongran.rocketmq.domain.InitialNetBusinessTrafficTemp;
|
||||
import com.tongran.rocketmq.mapper.InitialNetBusinessTrafficTempMapper;
|
||||
import com.tongran.rocketmq.service.IInitialNetBusinessTrafficTempService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络业务流量监控Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2026-03-06
|
||||
*/
|
||||
@Service
|
||||
public class InitialNetBusinessTrafficTempServiceImpl implements IInitialNetBusinessTrafficTempService
|
||||
{
|
||||
@Autowired
|
||||
private InitialNetBusinessTrafficTempMapper initialNetBusinessTrafficTempMapper;
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
@Override
|
||||
public InitialNetBusinessTrafficTemp selectInitialNetBusinessTrafficTempById(Long id)
|
||||
{
|
||||
return initialNetBusinessTrafficTempMapper.selectInitialNetBusinessTrafficTempById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网络业务流量监控列表
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 网络业务流量监控
|
||||
*/
|
||||
@Override
|
||||
public List<InitialNetBusinessTrafficTemp> selectInitialNetBusinessTrafficTempList(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp)
|
||||
{
|
||||
return initialNetBusinessTrafficTempMapper.selectInitialNetBusinessTrafficTempList(initialNetBusinessTrafficTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialNetBusinessTrafficTemp(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp)
|
||||
{
|
||||
initialNetBusinessTrafficTemp.setCreateTime(DateUtils.getNowDate());
|
||||
return initialNetBusinessTrafficTempMapper.insertInitialNetBusinessTrafficTemp(initialNetBusinessTrafficTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网络业务流量监控
|
||||
*
|
||||
* @param initialNetBusinessTrafficTemp 网络业务流量监控
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialNetBusinessTrafficTemp(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp)
|
||||
{
|
||||
initialNetBusinessTrafficTemp.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialNetBusinessTrafficTempMapper.updateInitialNetBusinessTrafficTemp(initialNetBusinessTrafficTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网络业务流量监控
|
||||
*
|
||||
* @param ids 需要删除的网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialNetBusinessTrafficTempByIds(Long[] ids)
|
||||
{
|
||||
return initialNetBusinessTrafficTempMapper.deleteInitialNetBusinessTrafficTempByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网络业务流量监控信息
|
||||
*
|
||||
* @param id 网络业务流量监控主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialNetBusinessTrafficTempById(Long id)
|
||||
{
|
||||
return initialNetBusinessTrafficTempMapper.deleteInitialNetBusinessTrafficTempById(id);
|
||||
}
|
||||
@Override
|
||||
public int deleteBusinessTempMsgByClientId(String clientId) {
|
||||
return initialNetBusinessTrafficTempMapper.deleteBusinessTempMsgByClientId(clientId);
|
||||
}
|
||||
@Override
|
||||
public int deleteBusinessTempMsgByClientIdAndTime(InitialNetBusinessTrafficTemp initialNetBusinessTrafficTemp) {
|
||||
return initialNetBusinessTrafficTempMapper.deleteBusinessTempMsgByClientIdAndTime(initialNetBusinessTrafficTemp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsertBusinessTemp(List<InitialNetBusinessTrafficTemp> interfaces) {
|
||||
return initialNetBusinessTrafficTempMapper.batchInsertBusinessTemp(interfaces);
|
||||
}
|
||||
@Override
|
||||
public int batchInsertBusinessRecoverTemp(List<InitialNetBusinessTrafficTemp> interfaces) {
|
||||
return initialNetBusinessTrafficTempMapper.batchInsertBusinessRecoverTemp(interfaces);
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
<?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.InitialNetBusinessTrafficMapper">
|
||||
|
||||
<resultMap type="InitialNetBusinessTraffic" id="InitialNetBusinessTrafficResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="mac" column="mac" />
|
||||
<result property="name" column="name" />
|
||||
<result property="pid" column="pid" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="inSpeed" column="in_speed" />
|
||||
<result property="outSpeed" column="out_speed" />
|
||||
<result property="connectionCount" column="connection_count" />
|
||||
<result property="ipv4InSpeed" column="ipv4_in_speed" />
|
||||
<result property="ipv4OutSpeed" column="ipv4_out_speed" />
|
||||
<result property="ipv6InSpeed" column="ipv6_in_speed" />
|
||||
<result property="ipv6OutSpeed" column="ipv6_out_speed" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialNetBusinessTrafficVo">
|
||||
select id, client_id, mac, name, pid, process_name, in_speed, out_speed, connection_count, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed, ipv6_out_speed, create_by, create_time, update_by, update_time, remark from initial_net_business_traffic
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialNetBusinessTrafficList" parameterType="InitialNetBusinessTraffic" resultMap="InitialNetBusinessTrafficResult">
|
||||
<include refid="selectInitialNetBusinessTrafficVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="mac != null and mac != ''"> and mac = #{mac}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="pid != null "> and pid = #{pid}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="inSpeed != null and inSpeed != ''"> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null and outSpeed != ''"> and out_speed = #{outSpeed}</if>
|
||||
<if test="connectionCount != null "> and connection_count = #{connectionCount}</if>
|
||||
<if test="ipv4InSpeed != null and ipv4InSpeed != ''"> and ipv4_in_speed = #{ipv4InSpeed}</if>
|
||||
<if test="ipv4OutSpeed != null and ipv4OutSpeed != ''"> and ipv4_out_speed = #{ipv4OutSpeed}</if>
|
||||
<if test="ipv6InSpeed != null and ipv6InSpeed != ''"> and ipv6_in_speed = #{ipv6InSpeed}</if>
|
||||
<if test="ipv6OutSpeed != null and ipv6OutSpeed != ''"> and ipv6_out_speed = #{ipv6OutSpeed}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialNetBusinessTrafficById" parameterType="Long" resultMap="InitialNetBusinessTrafficResult">
|
||||
<include refid="selectInitialNetBusinessTrafficVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialNetBusinessTraffic" parameterType="InitialNetBusinessTraffic" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_net_business_traffic
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">client_id,</if>
|
||||
<if test="mac != null">mac,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="pid != null">pid,</if>
|
||||
<if test="processName != null">process_name,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSpeed != null">out_speed,</if>
|
||||
<if test="connectionCount != null">connection_count,</if>
|
||||
<if test="ipv4InSpeed != null">ipv4_in_speed,</if>
|
||||
<if test="ipv4OutSpeed != null">ipv4_out_speed,</if>
|
||||
<if test="ipv6InSpeed != null">ipv6_in_speed,</if>
|
||||
<if test="ipv6OutSpeed != null">ipv6_out_speed,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
<if test="mac != null">#{mac},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="pid != null">#{pid},</if>
|
||||
<if test="processName != null">#{processName},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSpeed != null">#{outSpeed},</if>
|
||||
<if test="connectionCount != null">#{connectionCount},</if>
|
||||
<if test="ipv4InSpeed != null">#{ipv4InSpeed},</if>
|
||||
<if test="ipv4OutSpeed != null">#{ipv4OutSpeed},</if>
|
||||
<if test="ipv6InSpeed != null">#{ipv6InSpeed},</if>
|
||||
<if test="ipv6OutSpeed != null">#{ipv6OutSpeed},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialNetBusinessTraffic" parameterType="InitialNetBusinessTraffic">
|
||||
update initial_net_business_traffic
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null">client_id = #{clientId},</if>
|
||||
<if test="mac != null">mac = #{mac},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="pid != null">pid = #{pid},</if>
|
||||
<if test="processName != null">process_name = #{processName},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
|
||||
<if test="outSpeed != null">out_speed = #{outSpeed},</if>
|
||||
<if test="connectionCount != null">connection_count = #{connectionCount},</if>
|
||||
<if test="ipv4InSpeed != null">ipv4_in_speed = #{ipv4InSpeed},</if>
|
||||
<if test="ipv4OutSpeed != null">ipv4_out_speed = #{ipv4OutSpeed},</if>
|
||||
<if test="ipv6InSpeed != null">ipv6_in_speed = #{ipv6InSpeed},</if>
|
||||
<if test="ipv6OutSpeed != null">ipv6_out_speed = #{ipv6OutSpeed},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialNetBusinessTrafficById" parameterType="Long">
|
||||
delete from initial_net_business_traffic where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialNetBusinessTrafficByIds" parameterType="String">
|
||||
delete from initial_net_business_traffic where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<insert id="batchInsertBusinessTraffic" parameterType="list">
|
||||
insert into initial_net_business_traffic
|
||||
(client_id, mac, name, pid, process_name, in_speed, out_speed,
|
||||
connection_count, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed,
|
||||
ipv6_out_speed, create_by, create_time, update_by, update_time, remark)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.clientId}, #{item.mac}, #{item.name}, #{item.pid},
|
||||
#{item.processName}, #{item.inSpeed}, #{item.outSpeed},
|
||||
#{item.connectionCount}, #{item.ipv4InSpeed}, #{item.ipv4OutSpeed},
|
||||
#{item.ipv6InSpeed}, #{item.ipv6OutSpeed}, #{item.createBy},
|
||||
#{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertBusinessRecoverTraffic" parameterType="list">
|
||||
insert into initial_net_business_traffic
|
||||
(client_id, mac, name, pid, process_name, in_speed, out_speed,
|
||||
connection_count, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed,
|
||||
ipv6_out_speed, create_by, create_time, update_by, update_time, remark)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.clientId}, #{item.mac}, #{item.name}, #{item.pid},
|
||||
#{item.processName}, #{item.inSpeed}, #{item.outSpeed},
|
||||
#{item.connectionCount}, #{item.ipv4InSpeed}, #{item.ipv4OutSpeed},
|
||||
#{item.ipv6InSpeed}, #{item.ipv6OutSpeed}, #{item.createBy},
|
||||
#{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
<select id="getNetBusinessTrafficList" parameterType="InitialNetBusinessTraffic" resultMap="InitialNetBusinessTrafficResult">
|
||||
select id, client_id, mac, name, pid, process_name, in_speed, out_speed, connection_count, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed, ipv6_out_speed, create_by, create_time, update_by, update_time, remark
|
||||
from ${tableName}
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="mac != null and mac != ''"> and mac = #{mac}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="pid != null "> and pid = #{pid}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="inSpeed != null and inSpeed != ''"> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null and outSpeed != ''"> and out_speed = #{outSpeed}</if>
|
||||
<if test="connectionCount != null "> and connection_count = #{connectionCount}</if>
|
||||
<if test="ipv4InSpeed != null and ipv4InSpeed != ''"> and ipv4_in_speed = #{ipv4InSpeed}</if>
|
||||
<if test="ipv4OutSpeed != null and ipv4OutSpeed != ''"> and ipv4_out_speed = #{ipv4OutSpeed}</if>
|
||||
<if test="ipv6InSpeed != null and ipv6InSpeed != ''"> and ipv6_in_speed = #{ipv6InSpeed}</if>
|
||||
<if test="ipv6OutSpeed != null and ipv6OutSpeed != ''"> and ipv6_out_speed = #{ipv6OutSpeed}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
<?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.InitialNetBusinessTrafficTempMapper">
|
||||
|
||||
<resultMap type="InitialNetBusinessTrafficTemp" id="InitialNetBusinessTrafficTempResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="mac" column="mac" />
|
||||
<result property="name" column="name" />
|
||||
<result property="pid" column="pid" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="inSpeed" column="in_speed" />
|
||||
<result property="outSpeed" column="out_speed" />
|
||||
<result property="connectionCount" column="connection_count" />
|
||||
<result property="ipv4InSpeed" column="ipv4_in_speed" />
|
||||
<result property="ipv4OutSpeed" column="ipv4_out_speed" />
|
||||
<result property="ipv6InSpeed" column="ipv6_in_speed" />
|
||||
<result property="ipv6OutSpeed" column="ipv6_out_speed" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialNetBusinessTrafficTempVo">
|
||||
select id, client_id, mac, name, pid, process_name, in_speed, out_speed, connection_count, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed, ipv6_out_speed, create_by, create_time, update_by, update_time, remark from initial_net_business_traffic_temp
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialNetBusinessTrafficTempList" parameterType="InitialNetBusinessTrafficTemp" resultMap="InitialNetBusinessTrafficTempResult">
|
||||
<include refid="selectInitialNetBusinessTrafficTempVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="mac != null and mac != ''"> and mac = #{mac}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="pid != null "> and pid = #{pid}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="inSpeed != null and inSpeed != ''"> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null and outSpeed != ''"> and out_speed = #{outSpeed}</if>
|
||||
<if test="connectionCount != null "> and connection_count = #{connectionCount}</if>
|
||||
<if test="ipv4InSpeed != null and ipv4InSpeed != ''"> and ipv4_in_speed = #{ipv4InSpeed}</if>
|
||||
<if test="ipv4OutSpeed != null and ipv4OutSpeed != ''"> and ipv4_out_speed = #{ipv4OutSpeed}</if>
|
||||
<if test="ipv6InSpeed != null and ipv6InSpeed != ''"> and ipv6_in_speed = #{ipv6InSpeed}</if>
|
||||
<if test="ipv6OutSpeed != null and ipv6OutSpeed != ''"> and ipv6_out_speed = #{ipv6OutSpeed}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialNetBusinessTrafficTempById" parameterType="Long" resultMap="InitialNetBusinessTrafficTempResult">
|
||||
<include refid="selectInitialNetBusinessTrafficTempVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialNetBusinessTrafficTemp" parameterType="InitialNetBusinessTrafficTemp" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_net_business_traffic_temp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">client_id,</if>
|
||||
<if test="mac != null">mac,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="pid != null">pid,</if>
|
||||
<if test="processName != null">process_name,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSpeed != null">out_speed,</if>
|
||||
<if test="connectionCount != null">connection_count,</if>
|
||||
<if test="ipv4InSpeed != null">ipv4_in_speed,</if>
|
||||
<if test="ipv4OutSpeed != null">ipv4_out_speed,</if>
|
||||
<if test="ipv6InSpeed != null">ipv6_in_speed,</if>
|
||||
<if test="ipv6OutSpeed != null">ipv6_out_speed,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
<if test="mac != null">#{mac},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="pid != null">#{pid},</if>
|
||||
<if test="processName != null">#{processName},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSpeed != null">#{outSpeed},</if>
|
||||
<if test="connectionCount != null">#{connectionCount},</if>
|
||||
<if test="ipv4InSpeed != null">#{ipv4InSpeed},</if>
|
||||
<if test="ipv4OutSpeed != null">#{ipv4OutSpeed},</if>
|
||||
<if test="ipv6InSpeed != null">#{ipv6InSpeed},</if>
|
||||
<if test="ipv6OutSpeed != null">#{ipv6OutSpeed},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialNetBusinessTrafficTemp" parameterType="InitialNetBusinessTrafficTemp">
|
||||
update initial_net_business_traffic_temp
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null">client_id = #{clientId},</if>
|
||||
<if test="mac != null">mac = #{mac},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="pid != null">pid = #{pid},</if>
|
||||
<if test="processName != null">process_name = #{processName},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
|
||||
<if test="outSpeed != null">out_speed = #{outSpeed},</if>
|
||||
<if test="connectionCount != null">connection_count = #{connectionCount},</if>
|
||||
<if test="ipv4InSpeed != null">ipv4_in_speed = #{ipv4InSpeed},</if>
|
||||
<if test="ipv4OutSpeed != null">ipv4_out_speed = #{ipv4OutSpeed},</if>
|
||||
<if test="ipv6InSpeed != null">ipv6_in_speed = #{ipv6InSpeed},</if>
|
||||
<if test="ipv6OutSpeed != null">ipv6_out_speed = #{ipv6OutSpeed},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialNetBusinessTrafficTempById" parameterType="Long">
|
||||
delete from initial_net_business_traffic_temp where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialNetBusinessTrafficTempByIds" parameterType="String">
|
||||
delete from initial_net_business_traffic_temp where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteBusinessTempMsgByClientId" parameterType="String">
|
||||
delete from initial_net_business_traffic_temp where client_id = #{clientId}
|
||||
</delete>
|
||||
<delete id="deleteBusinessTempMsgByClientIdAndTime" parameterType="InitialNetBusinessTrafficTemp">
|
||||
delete from initial_bandwidth_traffic_recover_temp where client_id = #{clientId} and create_time=#{createTime}
|
||||
</delete>
|
||||
<insert id="batchInsertBusinessTemp" parameterType="list">
|
||||
insert into initial_net_business_traffic_temp
|
||||
(client_id, mac, name, pid, process_name, in_speed, out_speed,
|
||||
connection_count, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed,
|
||||
ipv6_out_speed, create_by, create_time, update_by, update_time, remark)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.clientId}, #{item.mac}, #{item.name}, #{item.pid},
|
||||
#{item.processName}, #{item.inSpeed}, #{item.outSpeed},
|
||||
#{item.connectionCount}, #{item.ipv4InSpeed}, #{item.ipv4OutSpeed},
|
||||
#{item.ipv6InSpeed}, #{item.ipv6OutSpeed}, #{item.createBy},
|
||||
#{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertBusinessRecoverTemp" parameterType="list">
|
||||
insert into initial_net_business_traffic_temp
|
||||
(client_id, mac, name, pid, process_name, in_speed, out_speed,
|
||||
connection_count, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed,
|
||||
ipv6_out_speed, create_by, create_time, update_by, update_time, remark)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.clientId}, #{item.mac}, #{item.name}, #{item.pid},
|
||||
#{item.processName}, #{item.inSpeed}, #{item.outSpeed},
|
||||
#{item.connectionCount}, #{item.ipv4InSpeed}, #{item.ipv4OutSpeed},
|
||||
#{item.ipv6InSpeed}, #{item.ipv6OutSpeed}, #{item.createBy},
|
||||
#{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user