源数据表+入库逻辑+计算95带宽值/日
This commit is contained in:
@@ -4,7 +4,7 @@ import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.system.api.domain.EpsInitialTrafficDataRemote;
|
||||
import com.ruoyi.system.api.domain.NodeBandwidth;
|
||||
import com.ruoyi.system.api.domain.InitialSwitchInfoDetailsRemote;
|
||||
import com.ruoyi.system.api.factory.RemoteRevenueConfigFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -19,36 +19,6 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
||||
@FeignClient(contextId = "remoteRevenueConfigService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteRevenueConfigFallbackFactory.class)
|
||||
public interface RemoteRevenueConfigService
|
||||
{
|
||||
/**
|
||||
* @param nodeBandwidth 服务器带宽收益
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/bandwidth/list")
|
||||
public R<NodeBandwidth> getBandwidth(@RequestBody NodeBandwidth nodeBandwidth, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* @param nodeBandwidth 服务器带宽收益
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/bandwidth")
|
||||
public R<Boolean> saveBandwidth(@RequestBody NodeBandwidth nodeBandwidth, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
/**
|
||||
* 查询流量数据(POST方式)
|
||||
* @param queryParam 查询参数实体
|
||||
* source 请求来源
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
@PostMapping("/query")
|
||||
public R<EpsInitialTrafficDataRemote> query(@RequestBody EpsInitialTrafficDataRemote queryParam, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
/**
|
||||
* 批量保存流量数据
|
||||
* @param queryParam 流量数据列表
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/batch")
|
||||
public R<Boolean> batchInitialTraffic(@RequestBody EpsInitialTrafficDataRemote queryParam, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
/**
|
||||
* 保存流量数据
|
||||
* @param queryParam 流量数据列表
|
||||
@@ -56,5 +26,11 @@ public interface RemoteRevenueConfigService
|
||||
*/
|
||||
@PostMapping("/revenueConfig/autoSaveServiceTrafficData")
|
||||
public R<String> autoSaveServiceTrafficData(@RequestBody EpsInitialTrafficDataRemote queryParam, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 保存交换机流量数据
|
||||
* @param queryParam 交换机流量数据列表
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/switchInfoDetails/autoSaveSwitchTraffic")
|
||||
public R<String> autoSaveSwitchTraffic(@RequestBody InitialSwitchInfoDetailsRemote queryParam, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.system.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息对象 initial_switch_info_details
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchInfoDetailsRemote extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 网络接口名称(如eth0、ens33等) */
|
||||
@Excel(name = "网络接口名称(如eth0、ens33等)")
|
||||
private String name;
|
||||
|
||||
/** 接收流量(字节) */
|
||||
@Excel(name = "接收流量(字节)")
|
||||
private BigDecimal inBytes;
|
||||
|
||||
/** 发送流量(字节) */
|
||||
@Excel(name = "发送流量(字节)")
|
||||
private BigDecimal outBytes;
|
||||
|
||||
/** 接口状态(up/down等) */
|
||||
@Excel(name = "接口状态(up/down等)")
|
||||
private String status;
|
||||
|
||||
/** 接口类型(ethernet/wireless等) */
|
||||
@Excel(name = "接口类型(ethernet/wireless等)")
|
||||
private String type;
|
||||
|
||||
/** 接收流量(bytes/s) */
|
||||
@Excel(name = "接收流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal inSpeed;
|
||||
|
||||
/** 发送流量(bytes/s) */
|
||||
@Excel(name = "发送流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal outSpeed;
|
||||
|
||||
/** 交换机名称 */
|
||||
@Excel(name = "交换机名称")
|
||||
private String switchName;
|
||||
|
||||
/** 接口连接设备类型 */
|
||||
@Excel(name = "接口连接设备类型")
|
||||
private String interfaceDeviceType;
|
||||
|
||||
/** 服务器名称 */
|
||||
@Excel(name = "服务器名称")
|
||||
private String serverName;
|
||||
|
||||
/** 服务器网口 */
|
||||
@Excel(name = "服务器网口")
|
||||
private String serverPort;
|
||||
|
||||
/** 服务器硬件SN */
|
||||
@Excel(name = "服务器硬件SN")
|
||||
private String serverSn;
|
||||
|
||||
/** 交换机硬件SN */
|
||||
@Excel(name = "交换机硬件SN")
|
||||
private String switchSn;
|
||||
/** 数据集合 */
|
||||
private List<InitialSwitchInfoDetailsRemote> dataList;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.ruoyi.system.api.factory;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.system.api.RemoteRevenueConfigService;
|
||||
import com.ruoyi.system.api.domain.EpsInitialTrafficDataRemote;
|
||||
import com.ruoyi.system.api.domain.NodeBandwidth;
|
||||
import com.ruoyi.system.api.domain.InitialSwitchInfoDetailsRemote;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
@@ -26,28 +26,14 @@ public class RemoteRevenueConfigFallbackFactory implements FallbackFactory<Remot
|
||||
return new RemoteRevenueConfigService()
|
||||
{
|
||||
|
||||
@Override
|
||||
public R<NodeBandwidth> getBandwidth(NodeBandwidth nodeBandwidth, String source) {
|
||||
return R.fail("获取服务器带宽失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> saveBandwidth(NodeBandwidth nodeBandwidth, String source) {
|
||||
return R.fail("新增服务器带宽失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<EpsInitialTrafficDataRemote> query(EpsInitialTrafficDataRemote queryParam, String source) {
|
||||
return R.fail("获取初始流量数据失败:" + throwable.getMessage());
|
||||
}
|
||||
@Override
|
||||
public R<Boolean> batchInitialTraffic(EpsInitialTrafficDataRemote queryParam, String source) {
|
||||
return R.fail("新增初始流量数据失败:" + throwable.getMessage());
|
||||
}
|
||||
@Override
|
||||
public R<String> autoSaveServiceTrafficData(EpsInitialTrafficDataRemote queryParam, String source) {
|
||||
return R.fail("保存流量数据失败:" + throwable.getMessage());
|
||||
}
|
||||
@Override
|
||||
public R<String> autoSaveSwitchTraffic(InitialSwitchInfoDetailsRemote queryParam, String source) {
|
||||
return R.fail("保存交换机流量数据失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ public class BaseEntity implements Serializable
|
||||
* 选中的属性名称
|
||||
*/
|
||||
private String[] properties;
|
||||
/** 时间戳 */
|
||||
private String timestamp;
|
||||
|
||||
/** 请求参数 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
@@ -150,4 +152,12 @@ public class BaseEntity implements Serializable
|
||||
{
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(String timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.ruoyi.system.config;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.InitialSwitchInfoDetails;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -17,10 +19,18 @@ public class TableScheduleConfig {
|
||||
private EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
|
||||
// 每月25号创建下月表
|
||||
@Scheduled(cron = "0 0 0 25 * ?")
|
||||
@Scheduled(cron = "0 0 0 26 * ?")
|
||||
// @Scheduled(initialDelay = 5000, fixedDelay = Long.MAX_VALUE)
|
||||
public void createNextMonthTables() {
|
||||
epsInitialTrafficDataService.createNextMonthTables();
|
||||
}
|
||||
|
||||
// 每天12点执行 计算95带宽值/日
|
||||
@Scheduled(cron = "0 0 0 * * ?", zone = "Asia/Shanghai")
|
||||
public void calculate95BandwidthDaily() {
|
||||
EpsInitialTrafficData queryParam = new EpsInitialTrafficData();
|
||||
epsInitialTrafficDataService.calculate95BandwidthDaily(queryParam);
|
||||
InitialSwitchInfoDetails initialSwitchInfoDetails = new InitialSwitchInfoDetails();
|
||||
epsInitialTrafficDataService.calculateSwitch95BandwidthDaily(initialSwitchInfoDetails);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
import com.ruoyi.system.service.IAllInterfaceNameService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 所有接口名称Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/interfaceName")
|
||||
public class AllInterfaceNameController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAllInterfaceNameService allInterfaceNameService;
|
||||
|
||||
/**
|
||||
* 查询所有接口名称列表
|
||||
*/
|
||||
@RequiresPermissions("system:interfaceName:list")
|
||||
@PostMapping("/getAllNames")
|
||||
public List<AllInterfaceName> list(@RequestBody AllInterfaceName allInterfaceName)
|
||||
{
|
||||
List<AllInterfaceName> list = allInterfaceNameService.selectAllInterfaceNameList(allInterfaceName);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -75,7 +75,6 @@ public class EpsServerRevenueConfigController extends BaseController
|
||||
/**
|
||||
* 流量相关数据入库
|
||||
*/
|
||||
@Log(title = "流量相关数据入库", businessType = BusinessType.EXPORT)
|
||||
@InnerAuth
|
||||
@PostMapping("/autoSaveServiceTrafficData")
|
||||
public R<String> autoSaveServiceTrafficData(@RequestBody EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.InnerAuth;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.InitialSwitchInfoDetails;
|
||||
import com.ruoyi.system.service.IInitialSwitchInfoDetailsService;
|
||||
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 2025-08-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchInfoDetails")
|
||||
public class InitialSwitchInfoDetailsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchInfoDetailsService initialSwitchInfoDetailsService;
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:switchInfoDetails:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchInfoDetails> list = initialSwitchInfoDetailsService.selectInitialSwitchInfoDetailsList(initialSwitchInfoDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:switchInfoDetails:export")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
List<InitialSwitchInfoDetails> list = initialSwitchInfoDetailsService.selectInitialSwitchInfoDetailsList(initialSwitchInfoDetails);
|
||||
ExcelUtil<InitialSwitchInfoDetails> util = new ExcelUtil<InitialSwitchInfoDetails>(InitialSwitchInfoDetails.class);
|
||||
util.exportExcel(response, list, "交换机监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:switchInfoDetails:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchInfoDetailsService.selectInitialSwitchInfoDetailsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("system:switchInfoDetails:add")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
return toAjax(initialSwitchInfoDetailsService.insertInitialSwitchInfoDetails(initialSwitchInfoDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("system:switchInfoDetails:edit")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
return toAjax(initialSwitchInfoDetailsService.updateInitialSwitchInfoDetails(initialSwitchInfoDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("system:switchInfoDetails:remove")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchInfoDetailsService.deleteInitialSwitchInfoDetailsByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 交换机流量相关数据入库
|
||||
*/
|
||||
@InnerAuth
|
||||
@PostMapping("/autoSaveSwitchTraffic")
|
||||
public R<String> autoSaveSwitchTraffic(@RequestBody InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
return initialSwitchInfoDetailsService.autoSaveSwitchTraffic(initialSwitchInfoDetails);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 所有接口名称对象 all_interface_name
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class AllInterfaceName extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端唯一标识 */
|
||||
@Excel(name = "客户端唯一标识")
|
||||
private String clientId;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
|
||||
/** 设备序列号 */
|
||||
@Excel(name = "设备序列号")
|
||||
private String deviceSn;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 业务代码 */
|
||||
@Excel(name = "业务代码")
|
||||
private String businessCode;
|
||||
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 资源类型 */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
|
||||
/** 交换机名称 */
|
||||
@Excel(name = "交换机名称")
|
||||
private String switchName;
|
||||
|
||||
/** 接口连接设备类型 */
|
||||
@Excel(name = "接口连接设备类型")
|
||||
private String interfaceDeviceType;
|
||||
|
||||
/** 服务器网口 */
|
||||
@Excel(name = "服务器网口")
|
||||
private String serverPort;
|
||||
|
||||
/** 交换机硬件SN */
|
||||
@Excel(name = "交换机硬件SN")
|
||||
private String switchSn;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息对象 initial_switch_info_details
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchInfoDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 网络接口名称(如eth0、ens33等) */
|
||||
@Excel(name = "网络接口名称(如eth0、ens33等)")
|
||||
private String name;
|
||||
|
||||
/** 接收流量(字节) */
|
||||
@Excel(name = "接收流量(字节)")
|
||||
private BigDecimal inBytes;
|
||||
|
||||
/** 发送流量(字节) */
|
||||
@Excel(name = "发送流量(字节)")
|
||||
private BigDecimal outBytes;
|
||||
|
||||
/** 接口状态(up/down等) */
|
||||
@Excel(name = "接口状态(up/down等)")
|
||||
private String status;
|
||||
|
||||
/** 接口类型(ethernet/wireless等) */
|
||||
@Excel(name = "接口类型(ethernet/wireless等)")
|
||||
private String type;
|
||||
|
||||
/** 接收流量(bytes/s) */
|
||||
@Excel(name = "接收流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal inSpeed;
|
||||
|
||||
/** 发送流量(bytes/s) */
|
||||
@Excel(name = "发送流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal outSpeed;
|
||||
|
||||
/** 交换机名称 */
|
||||
@Excel(name = "交换机名称")
|
||||
private String switchName;
|
||||
|
||||
/** 接口连接设备类型 */
|
||||
@Excel(name = "接口连接设备类型")
|
||||
private String interfaceDeviceType;
|
||||
|
||||
/** 服务器名称 */
|
||||
@Excel(name = "服务器名称")
|
||||
private String serverName;
|
||||
|
||||
/** 服务器网口 */
|
||||
@Excel(name = "服务器网口")
|
||||
private String serverPort;
|
||||
|
||||
/** 服务器硬件SN */
|
||||
@Excel(name = "服务器硬件SN")
|
||||
private String serverSn;
|
||||
|
||||
/** 交换机硬件SN */
|
||||
@Excel(name = "交换机硬件SN")
|
||||
private String switchSn;
|
||||
/** 数据集合 */
|
||||
private List<InitialSwitchInfoDetails> dataList;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 所有接口名称Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface AllInterfaceNameMapper
|
||||
{
|
||||
/**
|
||||
* 查询所有接口名称
|
||||
*
|
||||
* @param id 所有接口名称主键
|
||||
* @return 所有接口名称
|
||||
*/
|
||||
public AllInterfaceName selectAllInterfaceNameById(Long id);
|
||||
|
||||
/**
|
||||
* 查询所有接口名称列表
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 所有接口名称集合
|
||||
*/
|
||||
public List<AllInterfaceName> selectAllInterfaceNameList(AllInterfaceName allInterfaceName);
|
||||
|
||||
/**
|
||||
* 新增所有接口名称
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAllInterfaceName(AllInterfaceName allInterfaceName);
|
||||
|
||||
/**
|
||||
* 修改所有接口名称
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAllInterfaceName(AllInterfaceName allInterfaceName);
|
||||
|
||||
/**
|
||||
* 删除所有接口名称
|
||||
*
|
||||
* @param id 所有接口名称主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAllInterfaceNameById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除所有接口名称
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAllInterfaceNameByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据接口名称查询表中是否存在信息
|
||||
* @param names
|
||||
* @return
|
||||
*/
|
||||
List<AllInterfaceName> selectByNames(Set<String> names);
|
||||
|
||||
/**
|
||||
* 批量插入接口名称
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int batchInsert(@Param("list") List<AllInterfaceName> list);
|
||||
/**
|
||||
* 查询所有服务器sn
|
||||
* @param interfaceName
|
||||
* @return
|
||||
*/
|
||||
List<AllInterfaceName> getAllDeviceSn(AllInterfaceName interfaceName);
|
||||
/**
|
||||
* 查询所有交换机sn
|
||||
* @param interfaceName
|
||||
* @return
|
||||
*/
|
||||
List<AllInterfaceName> getAllSwitchSn(AllInterfaceName interfaceName);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.InitialSwitchInfoDetails;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public interface InitialSwitchInfoDetailsMapper
|
||||
{
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
public InitialSwitchInfoDetails selectInitialSwitchInfoDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 交换机监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfoDetails> selectInitialSwitchInfoDetailsList(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfoDetails(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfoDetails(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增交换机流量业务数据
|
||||
* @param initialSwitchInfoDetails
|
||||
* @return
|
||||
*/
|
||||
int saveBatchSwitchTraffic(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 查询交换机信息
|
||||
* @param initialSwitchInfoDetails
|
||||
* @return
|
||||
*/
|
||||
List<InitialSwitchInfoDetails> getAllSwitchInfoMsg(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拓扑管理Mapper接口
|
||||
*
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.InitialSwitchInfoDetails;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -39,5 +40,17 @@ public interface EpsInitialTrafficDataService {
|
||||
* @return 初始流量数据列表
|
||||
*/
|
||||
List<EpsInitialTrafficData> getAllTraficMsg(EpsInitialTrafficData queryParam);
|
||||
/**
|
||||
* 计算95带宽值
|
||||
* @param queryParam 查询参数实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
void calculate95BandwidthDaily(EpsInitialTrafficData queryParam);
|
||||
/**
|
||||
* 计算交换机95带宽值
|
||||
* @param queryParam 查询参数实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
void calculateSwitch95BandwidthDaily(InitialSwitchInfoDetails queryParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
|
||||
/**
|
||||
* 所有接口名称Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IAllInterfaceNameService
|
||||
{
|
||||
/**
|
||||
* 查询所有接口名称
|
||||
*
|
||||
* @param id 所有接口名称主键
|
||||
* @return 所有接口名称
|
||||
*/
|
||||
public AllInterfaceName selectAllInterfaceNameById(Long id);
|
||||
|
||||
/**
|
||||
* 查询所有接口名称列表
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 所有接口名称集合
|
||||
*/
|
||||
public List<AllInterfaceName> selectAllInterfaceNameList(AllInterfaceName allInterfaceName);
|
||||
|
||||
/**
|
||||
* 新增所有接口名称
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAllInterfaceName(AllInterfaceName allInterfaceName);
|
||||
|
||||
/**
|
||||
* 修改所有接口名称
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAllInterfaceName(AllInterfaceName allInterfaceName);
|
||||
|
||||
/**
|
||||
* 批量删除所有接口名称
|
||||
*
|
||||
* @param ids 需要删除的所有接口名称主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAllInterfaceNameByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除所有接口名称信息
|
||||
*
|
||||
* @param id 所有接口名称主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAllInterfaceNameById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.system.domain.InitialSwitchInfoDetails;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public interface IInitialSwitchInfoDetailsService
|
||||
{
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
public InitialSwitchInfoDetails selectInitialSwitchInfoDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 交换机监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfoDetails> selectInitialSwitchInfoDetailsList(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfoDetails(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfoDetails(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoDetailsById(Long id);
|
||||
/**
|
||||
* 保存交换机流量信息
|
||||
* @param initialSwitchInfoDetails
|
||||
*/
|
||||
R<String> autoSaveSwitchTraffic(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.AllInterfaceNameMapper;
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
import com.ruoyi.system.service.IAllInterfaceNameService;
|
||||
|
||||
/**
|
||||
* 所有接口名称Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
public class AllInterfaceNameServiceImpl implements IAllInterfaceNameService
|
||||
{
|
||||
@Autowired
|
||||
private AllInterfaceNameMapper allInterfaceNameMapper;
|
||||
|
||||
/**
|
||||
* 查询所有接口名称
|
||||
*
|
||||
* @param id 所有接口名称主键
|
||||
* @return 所有接口名称
|
||||
*/
|
||||
@Override
|
||||
public AllInterfaceName selectAllInterfaceNameById(Long id)
|
||||
{
|
||||
return allInterfaceNameMapper.selectAllInterfaceNameById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有接口名称列表
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 所有接口名称
|
||||
*/
|
||||
@Override
|
||||
public List<AllInterfaceName> selectAllInterfaceNameList(AllInterfaceName allInterfaceName)
|
||||
{
|
||||
return allInterfaceNameMapper.selectAllInterfaceNameList(allInterfaceName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增所有接口名称
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAllInterfaceName(AllInterfaceName allInterfaceName)
|
||||
{
|
||||
allInterfaceName.setCreateTime(DateUtils.getNowDate());
|
||||
return allInterfaceNameMapper.insertAllInterfaceName(allInterfaceName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改所有接口名称
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAllInterfaceName(AllInterfaceName allInterfaceName)
|
||||
{
|
||||
allInterfaceName.setUpdateTime(DateUtils.getNowDate());
|
||||
return allInterfaceNameMapper.updateAllInterfaceName(allInterfaceName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除所有接口名称
|
||||
*
|
||||
* @param ids 需要删除的所有接口名称主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAllInterfaceNameByIds(Long[] ids)
|
||||
{
|
||||
return allInterfaceNameMapper.deleteAllInterfaceNameByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除所有接口名称信息
|
||||
*
|
||||
* @param id 所有接口名称主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAllInterfaceNameById(Long id)
|
||||
{
|
||||
return allInterfaceNameMapper.deleteAllInterfaceNameById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,14 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
import com.ruoyi.system.domain.InitialSwitchInfoDetails;
|
||||
import com.ruoyi.system.mapper.AllInterfaceNameMapper;
|
||||
import com.ruoyi.system.mapper.EpsInitialTrafficDataMapper;
|
||||
import com.ruoyi.system.mapper.EpsNodeBandwidthMapper;
|
||||
import com.ruoyi.system.mapper.InitialSwitchInfoDetailsMapper;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.util.TableRouterUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -10,13 +17,15 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@@ -24,8 +33,15 @@ import java.util.stream.Collectors;
|
||||
public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataService {
|
||||
|
||||
|
||||
private static final Pattern SPEED_PATTERN = Pattern.compile("(\\d+\\.?\\d*)\\s*(\\S*)");
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataMapper epsInitialTrafficDataMapper;
|
||||
@Autowired
|
||||
private EpsNodeBandwidthMapper epsNodeBandwidthMapper;
|
||||
@Autowired
|
||||
private AllInterfaceNameMapper allInterfaceNameMapper;
|
||||
@Autowired
|
||||
private InitialSwitchInfoDetailsMapper initialSwitchInfoDetailsMapper;
|
||||
@Override
|
||||
public void createNextMonthTables() {
|
||||
LocalDate nextMonth = LocalDate.now().plusMonths(1);
|
||||
@@ -168,7 +184,6 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
|
||||
// 获取涉及的表名
|
||||
Set<String> tableNames = TableRouterUtil.getTableNamesBetweenInitial(queryParam.getStartTime(), queryParam.getEndTime());
|
||||
log.error("initial表名:{}",tableNames);
|
||||
// 并行查询各表
|
||||
return tableNames.parallelStream()
|
||||
.flatMap(tableName -> {
|
||||
@@ -182,4 +197,174 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void calculate95BandwidthDaily(EpsInitialTrafficData queryParam) {
|
||||
Date now = DateUtils.getNowDate();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.HOUR_OF_DAY, -24);
|
||||
Date startDate = calendar.getTime();
|
||||
// 格式化时间
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String startTime = sdf.format(startDate);
|
||||
String endTime = sdf.format(now);
|
||||
queryParam.setStartTime(startTime);
|
||||
queryParam.setEndTime(endTime);
|
||||
queryParam.setRevenueMethod("1");
|
||||
// 查询所有的服务器sn
|
||||
AllInterfaceName allInterfaceName = new AllInterfaceName();
|
||||
List<AllInterfaceName> snList = allInterfaceNameMapper.getAllDeviceSn(allInterfaceName);
|
||||
for (AllInterfaceName interfaceName : snList) {
|
||||
queryParam.setServiceSn(interfaceName.getDeviceSn());
|
||||
// 查询原始数据
|
||||
List<EpsInitialTrafficData> dataList = query(queryParam);
|
||||
if(!dataList.isEmpty()){
|
||||
// 1. 提取 outSpeed 并转换为 Mbps
|
||||
List<BigDecimal> speedsInMbps = dataList.stream()
|
||||
.map(data -> parseSpeedToMbps(data.getOutSpeed()))
|
||||
.sorted()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 2. 计算 95% 位置(向上取整)
|
||||
int total = speedsInMbps.size();
|
||||
int position = (int) Math.ceil(0.95 * total) - 1; // 转换为 0-based 索引
|
||||
if (position < 0){
|
||||
position = 0;
|
||||
}
|
||||
if (position >= total){
|
||||
position = total - 1;
|
||||
}
|
||||
|
||||
// 3. 获取 95 值并四舍五入到两位小数
|
||||
BigDecimal percentile95 = speedsInMbps.get(position);
|
||||
BigDecimal dailyResult = percentile95.setScale(2, RoundingMode.HALF_UP);
|
||||
// 服务器信息
|
||||
EpsInitialTrafficData epsInitialTrafficData = dataList.get(0);
|
||||
// 落入带宽计算结果表
|
||||
EpsNodeBandwidth bandwidth = new EpsNodeBandwidth();
|
||||
bandwidth.setHardwareSn(epsInitialTrafficData.getServiceSn());
|
||||
bandwidth.setNodeName(epsInitialTrafficData.getNodeName());
|
||||
bandwidth.setBusinessId(epsInitialTrafficData.getBusinessId());
|
||||
bandwidth.setBusinessName(epsInitialTrafficData.getBusinessName());
|
||||
bandwidth.setResourceType("1");
|
||||
bandwidth.setBandwidthType("1");
|
||||
bandwidth.setBandwidthResult(dailyResult);
|
||||
bandwidth.setBandwidth95Daily(dailyResult);
|
||||
bandwidth.setCreateTime(startDate);
|
||||
epsNodeBandwidthMapper.insertEpsNodeBandwidth(bandwidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void calculateSwitch95BandwidthDaily(InitialSwitchInfoDetails queryParam) {
|
||||
Date now = DateUtils.getNowDate();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.HOUR_OF_DAY, -24);
|
||||
Date startDate = calendar.getTime();
|
||||
// 格式化时间
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String startTime = sdf.format(startDate);
|
||||
String endTime = sdf.format(now);
|
||||
queryParam.setStartTime(startTime);
|
||||
queryParam.setEndTime(endTime);
|
||||
// 查询所有的服务器sn
|
||||
AllInterfaceName allInterfaceName = new AllInterfaceName();
|
||||
List<AllInterfaceName> switchSnList = allInterfaceNameMapper.getAllSwitchSn(allInterfaceName);
|
||||
for (AllInterfaceName interfaceName : switchSnList) {
|
||||
queryParam.setSwitchSn(interfaceName.getSwitchSn());
|
||||
// 查询原始数据
|
||||
List<InitialSwitchInfoDetails> dataList = initialSwitchInfoDetailsMapper.selectInitialSwitchInfoDetailsList(queryParam);
|
||||
if(!dataList.isEmpty()){
|
||||
// 1. 提取 outSpeed 并转换为 Mbps
|
||||
List<BigDecimal> speedsInMbps = dataList.stream()
|
||||
.map(data -> {
|
||||
// 根据 type 选择 inSpeed 或 outSpeed
|
||||
String speed = ("1".equals(data.getInterfaceDeviceType())) ? data.getInSpeed()+"" : data.getOutSpeed()+"";
|
||||
// 如果 speed 是纯数字,补充单位 "B/S"(Bytes/s)
|
||||
if (speed.matches("^\\d+(\\.\\d+)?$")) {
|
||||
speed += " B/S";
|
||||
}
|
||||
return parseSpeedToMbps(speed);
|
||||
})
|
||||
.sorted()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 2. 计算 95% 位置(向上取整)
|
||||
int total = speedsInMbps.size();
|
||||
int position = (int) Math.ceil(0.95 * total) - 1; // 转换为 0-based 索引
|
||||
if (position < 0){
|
||||
position = 0;
|
||||
}
|
||||
if (position >= total){
|
||||
position = total - 1;
|
||||
}
|
||||
|
||||
// 3. 获取 95 值并四舍五入到两位小数
|
||||
BigDecimal percentile95 = speedsInMbps.get(position);
|
||||
BigDecimal dailyResult = percentile95.setScale(2, RoundingMode.HALF_UP);
|
||||
// 服务器信息
|
||||
InitialSwitchInfoDetails initialSwitchInfoDetails = dataList.get(0);
|
||||
// 落入带宽计算结果表
|
||||
EpsNodeBandwidth bandwidth = new EpsNodeBandwidth();
|
||||
bandwidth.setHardwareSn(initialSwitchInfoDetails.getServerSn());
|
||||
bandwidth.setNodeName(initialSwitchInfoDetails.getServerName());
|
||||
bandwidth.setResourceType("2");
|
||||
bandwidth.setBandwidthType("1");
|
||||
bandwidth.setBandwidthResult(dailyResult);
|
||||
bandwidth.setBandwidth95Daily(dailyResult);
|
||||
bandwidth.setCreateTime(startDate);
|
||||
epsNodeBandwidthMapper.insertEpsNodeBandwidth(bandwidth);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 单位换算
|
||||
* @param speedWithUnit
|
||||
* @return
|
||||
*/
|
||||
private static BigDecimal parseSpeedToMbps(String speedWithUnit) {
|
||||
if (speedWithUnit == null || speedWithUnit.trim().isEmpty()) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
Matcher matcher = SPEED_PATTERN.matcher(speedWithUnit.trim());
|
||||
if (!matcher.find()) {
|
||||
throw new IllegalArgumentException("Invalid speed format: " + speedWithUnit);
|
||||
}
|
||||
|
||||
BigDecimal value = new BigDecimal(matcher.group(1));
|
||||
String unit = matcher.group(2).toUpperCase();
|
||||
|
||||
// 处理纯数字(单位为空)
|
||||
if (unit.isEmpty()) {
|
||||
unit = "B/S"; // 默认单位: Bytes/s
|
||||
}
|
||||
|
||||
// 单位换算逻辑(保持不变)
|
||||
switch (unit) {
|
||||
case "B/S":
|
||||
return value.multiply(new BigDecimal("0.000008"));
|
||||
case "KBPS":
|
||||
case "KB/S":
|
||||
return value.divide(new BigDecimal("1000"), 10, RoundingMode.HALF_UP);
|
||||
case "MBPS":
|
||||
case "MB/S":
|
||||
return value;
|
||||
case "GBPS":
|
||||
case "GB/S":
|
||||
return value.multiply(new BigDecimal("1000"));
|
||||
case "TBPS":
|
||||
case "TB/S":
|
||||
return value.multiply(new BigDecimal("1000000"));
|
||||
case "KIB/S":
|
||||
return value.multiply(new BigDecimal("0.008192"));
|
||||
case "MIB/S":
|
||||
return value.multiply(new BigDecimal("8.388608"));
|
||||
case "GIB/S":
|
||||
return value.multiply(new BigDecimal("8589.934592"));
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown speed unit: " + unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,14 @@ package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.mapper.AllInterfaceNameMapper;
|
||||
import com.ruoyi.system.mapper.EpsMethodChangeRecordMapper;
|
||||
import com.ruoyi.system.mapper.EpsServerRevenueConfigMapper;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.service.IEpsServerRevenueConfigService;
|
||||
@@ -16,6 +20,8 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Service业务层处理
|
||||
@@ -31,6 +37,10 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
private EpsServerRevenueConfigMapper epsServerRevenueConfigMapper;
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
@Autowired
|
||||
private EpsMethodChangeRecordMapper epsMethodChangeRecordMapper;
|
||||
@Autowired
|
||||
private AllInterfaceNameMapper allInterfaceNameMapper;
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置
|
||||
@@ -119,7 +129,7 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
}
|
||||
changeRecord.setChangeContent(content);
|
||||
// 添加操作记录
|
||||
epsServerRevenueConfigMapper.insertEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
epsMethodChangeRecordMapper.insertEpsMethodChangeRecord(changeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,6 +185,8 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
try {
|
||||
epsInitialTrafficDataService.saveBatch(epsInitialTrafficData);
|
||||
log.info("流量数据批量入库成功,数据量:{}", batchList.size());
|
||||
// 接口名称保存
|
||||
processInterfaceNames(batchList);
|
||||
return R.ok("数据保存成功");
|
||||
} catch (Exception e) {
|
||||
log.error("流量数据入库失败,数据量:{},错误原因:{}",
|
||||
@@ -182,6 +194,48 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
return R.fail("数据保存失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 批量处理接口名称
|
||||
*/
|
||||
private void processInterfaceNames(List<EpsInitialTrafficData> trafficDataList) {
|
||||
// 收集所有需要检查的接口名称
|
||||
Set<String> interfaceNames = trafficDataList.stream()
|
||||
.map(EpsInitialTrafficData::getName)
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
if (interfaceNames.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 批量查询已存在的接口名称
|
||||
List<AllInterfaceName> existingNames = allInterfaceNameMapper.selectByNames(interfaceNames);
|
||||
Set<String> existingNameSet = existingNames.stream()
|
||||
.map(AllInterfaceName::getInterfaceName)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 筛选出需要新增的接口名称
|
||||
List<AllInterfaceName> newNames = trafficDataList.stream()
|
||||
.filter(data -> !existingNameSet.contains(data.getName()))
|
||||
.map(data -> {
|
||||
AllInterfaceName name = new AllInterfaceName();
|
||||
name.setInterfaceName(data.getName());
|
||||
name.setClientId(data.getClientId());
|
||||
name.setResourceType("1");
|
||||
name.setDeviceSn(data.getServiceSn());
|
||||
name.setNodeName(data.getNodeName());
|
||||
name.setBusinessCode(data.getBusinessId());
|
||||
name.setBusinessName(data.getBusinessName());
|
||||
return name;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 批量插入新接口名称
|
||||
if (!newNames.isEmpty()) {
|
||||
allInterfaceNameMapper.batchInsert(newNames);
|
||||
log.info("接口名称表-新增接口名称数量:{}", newNames.size());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 批量删除服务器收益方式配置
|
||||
*
|
||||
@@ -220,4 +274,5 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
}
|
||||
return revenueMethod;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
import com.ruoyi.system.domain.InitialSwitchInfoDetails;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.mapper.AllInterfaceNameMapper;
|
||||
import com.ruoyi.system.mapper.InitialSwitchInfoDetailsMapper;
|
||||
import com.ruoyi.system.mapper.RmEpsTopologyManagementMapper;
|
||||
import com.ruoyi.system.service.IInitialSwitchInfoDetailsService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDetailsService
|
||||
{
|
||||
@Autowired
|
||||
private InitialSwitchInfoDetailsMapper initialSwitchInfoDetailsMapper;
|
||||
@Autowired
|
||||
private RmEpsTopologyManagementMapper rmEpsTopologyManagementMapper;
|
||||
@Autowired
|
||||
private AllInterfaceNameMapper allInterfaceNameMapper;
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialSwitchInfoDetails selectInitialSwitchInfoDetailsById(Long id)
|
||||
{
|
||||
return initialSwitchInfoDetailsMapper.selectInitialSwitchInfoDetailsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSwitchInfoDetails> selectInitialSwitchInfoDetailsList(InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
return initialSwitchInfoDetailsMapper.selectInitialSwitchInfoDetailsList(initialSwitchInfoDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialSwitchInfoDetails(InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
initialSwitchInfoDetails.setCreateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoDetailsMapper.insertInitialSwitchInfoDetails(initialSwitchInfoDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoDetails 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialSwitchInfoDetails(InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
initialSwitchInfoDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoDetailsMapper.updateInitialSwitchInfoDetails(initialSwitchInfoDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoDetailsByIds(Long[] ids)
|
||||
{
|
||||
return initialSwitchInfoDetailsMapper.deleteInitialSwitchInfoDetailsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoDetailsById(Long id)
|
||||
{
|
||||
return initialSwitchInfoDetailsMapper.deleteInitialSwitchInfoDetailsById(id);
|
||||
}
|
||||
/**
|
||||
* 保存交换机流量信息
|
||||
* @param initialSwitchInfoDetails
|
||||
*/
|
||||
public R<String> autoSaveSwitchTraffic(InitialSwitchInfoDetails initialSwitchInfoDetails) {
|
||||
// 查询初始流量数据
|
||||
List<InitialSwitchInfoDetails> dataList = initialSwitchInfoDetailsMapper.getAllSwitchInfoMsg(initialSwitchInfoDetails);
|
||||
List<InitialSwitchInfoDetails> batchList = new ArrayList<>();
|
||||
if(!dataList.isEmpty()){
|
||||
for (InitialSwitchInfoDetails details : dataList) {
|
||||
// 根据接口名称查询交换机信息
|
||||
String interfaceName = details.getName();
|
||||
RmEpsTopologyManagement rmEpsTopologyManagement = new RmEpsTopologyManagement();
|
||||
rmEpsTopologyManagement.setInterfaceName(interfaceName);
|
||||
List<RmEpsTopologyManagement> managements = rmEpsTopologyManagementMapper.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
// 赋值
|
||||
if(!managements.isEmpty()){
|
||||
RmEpsTopologyManagement management = managements.get(0);
|
||||
details.setSwitchSn(management.getSwitchSn());
|
||||
details.setSwitchName(management.getSwitchName());
|
||||
details.setInterfaceDeviceType(management.getConnectedDeviceType());
|
||||
details.setServerName(management.getServerName());
|
||||
details.setServerPort(management.getServerPort());
|
||||
}
|
||||
// id自增
|
||||
details.setId(null);
|
||||
batchList.add(details);
|
||||
}
|
||||
}
|
||||
initialSwitchInfoDetails.setDataList(batchList);
|
||||
if(batchList.isEmpty()){
|
||||
return R.fail("交换机流量数据为空");
|
||||
}else{
|
||||
// 流量相关数据入库
|
||||
try {
|
||||
initialSwitchInfoDetailsMapper.saveBatchSwitchTraffic(initialSwitchInfoDetails);
|
||||
log.info("交换机流量数据批量入库成功,数据量:{}", batchList.size());
|
||||
// 接口名称保存
|
||||
processSwitchInterfaceNames(batchList);
|
||||
return R.ok("数据保存成功");
|
||||
} catch (Exception e) {
|
||||
log.error("交换机流量数据入库失败,数据量:{},错误原因:{}",
|
||||
batchList.size(), e.getMessage(), e);
|
||||
return R.fail("数据保存失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 批量处理接口名称
|
||||
*/
|
||||
private void processSwitchInterfaceNames(List<InitialSwitchInfoDetails> initialSwitchInfoDetails) {
|
||||
// 收集所有需要检查的接口名称
|
||||
Set<String> interfaceNames = initialSwitchInfoDetails.stream()
|
||||
.map(InitialSwitchInfoDetails::getName)
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
if (interfaceNames.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 批量查询已存在的接口名称
|
||||
List<AllInterfaceName> existingNames = allInterfaceNameMapper.selectByNames(interfaceNames);
|
||||
Set<String> existingNameSet = existingNames.stream()
|
||||
.map(AllInterfaceName::getInterfaceName)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 筛选出需要新增的接口名称
|
||||
List<AllInterfaceName> newNames = initialSwitchInfoDetails.stream()
|
||||
.filter(data -> !existingNameSet.contains(data.getName()))
|
||||
.map(data -> {
|
||||
AllInterfaceName name = new AllInterfaceName();
|
||||
name.setInterfaceName(data.getName());
|
||||
name.setClientId(data.getClientId());
|
||||
name.setResourceType("2");
|
||||
name.setDeviceSn(data.getServerSn());
|
||||
name.setNodeName(data.getServerName());
|
||||
name.setServerPort(data.getServerPort());
|
||||
name.setInterfaceDeviceType(data.getInterfaceDeviceType());
|
||||
name.setSwitchName(data.getSwitchName());
|
||||
name.setSwitchSn(data.getSwitchSn());
|
||||
return name;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 批量插入新接口名称
|
||||
if (!newNames.isEmpty()) {
|
||||
allInterfaceNameMapper.batchInsert(newNames);
|
||||
log.info("接口名称表-新增交换机接口名称数量:{}", newNames.size());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.mapper.RmEpsTopologyManagementMapper;
|
||||
import com.ruoyi.system.service.IRmEpsTopologyManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmEpsTopologyManagementMapper;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.service.IRmEpsTopologyManagementService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拓扑管理Service业务层处理
|
||||
@@ -19,7 +20,6 @@ public class RmEpsTopologyManagementServiceImpl implements IRmEpsTopologyManagem
|
||||
{
|
||||
@Autowired
|
||||
private RmEpsTopologyManagementMapper rmEpsTopologyManagementMapper;
|
||||
|
||||
/**
|
||||
* 查询拓扑管理
|
||||
*
|
||||
@@ -93,4 +93,5 @@ public class RmEpsTopologyManagementServiceImpl implements IRmEpsTopologyManagem
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.deleteRmEpsTopologyManagementById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
<?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.ruoyi.system.mapper.AllInterfaceNameMapper">
|
||||
|
||||
<resultMap type="AllInterfaceName" id="AllInterfaceNameResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="interfaceName" column="interface_name" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
<result property="businessCode" column="business_code" />
|
||||
<result property="businessName" column="business_name" />
|
||||
<result property="resourceType" column="resource_type" />
|
||||
<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="selectAllInterfaceNameVo">
|
||||
select id, client_id, interface_name, device_sn, node_name, business_code, business_name, resource_type, switch_name, interface_device_type, server_port, switch_sn, create_time, update_time, create_by, update_by from all_interface_name
|
||||
</sql>
|
||||
|
||||
<select id="selectAllInterfaceNameList" parameterType="AllInterfaceName" resultMap="AllInterfaceNameResult">
|
||||
<include refid="selectAllInterfaceNameVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAllInterfaceNameById" parameterType="Long" resultMap="AllInterfaceNameResult">
|
||||
<include refid="selectAllInterfaceNameVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAllInterfaceName" parameterType="AllInterfaceName" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into all_interface_name
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">interface_name,</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn,</if>
|
||||
<if test="nodeName != null">node_name,</if>
|
||||
<if test="businessCode != null">business_code,</if>
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="resourceType != null">resource_type,</if>
|
||||
<if test="switchName != null">switch_name,</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type,</if>
|
||||
<if test="serverPort != null">server_port,</if>
|
||||
<if test="switchSn != null">switch_sn,</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="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">#{interfaceName},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">#{deviceSn},</if>
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
<if test="businessCode != null">#{businessCode},</if>
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="resourceType != null">#{resourceType},</if>
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">#{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">#{serverPort},</if>
|
||||
<if test="switchSn != null">#{switchSn},</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="updateAllInterfaceName" parameterType="AllInterfaceName">
|
||||
update all_interface_name
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">interface_name = #{interfaceName},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn = #{deviceSn},</if>
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
<if test="businessCode != null">business_code = #{businessCode},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
||||
<if test="switchName != null">switch_name = #{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type = #{interfaceDeviceType},</if>
|
||||
<if test="serverPort != null">server_port = #{serverPort},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</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="deleteAllInterfaceNameById" parameterType="Long">
|
||||
delete from all_interface_name where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAllInterfaceNameByIds" parameterType="String">
|
||||
delete from all_interface_name where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<!-- 根据接口名称批量查询 -->
|
||||
<select id="selectByNames" parameterType="java.lang.String" resultType="AllInterfaceName">
|
||||
SELECT
|
||||
id,
|
||||
interface_name AS interfaceName,
|
||||
client_id AS clientId,
|
||||
resource_type AS resourceType,
|
||||
device_sn AS deviceSn,
|
||||
node_name AS nodeName,
|
||||
business_code AS businessCode,
|
||||
business_name AS businessName,
|
||||
switch_name AS switchName,
|
||||
interface_device_type AS interfaceDeviceType,
|
||||
server_port AS serverPort,
|
||||
switch_sn AS switchSn
|
||||
FROM
|
||||
all_interface_name
|
||||
WHERE
|
||||
interface_name IN
|
||||
<foreach collection="collection" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入接口名称 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO all_interface_name
|
||||
(
|
||||
interface_name,
|
||||
client_id,
|
||||
resource_type,
|
||||
device_sn,
|
||||
node_name,
|
||||
business_code,
|
||||
business_name,
|
||||
switch_name, interface_device_type, server_port, switch_sn,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.interfaceName},
|
||||
#{item.clientId},
|
||||
#{item.resourceType},
|
||||
#{item.deviceSn},
|
||||
#{item.nodeName},
|
||||
#{item.businessCode},
|
||||
#{item.businessName},
|
||||
#{item.switchName}, #{item.interfaceDeviceType}, #{item.serverPort}, #{item.switchSn},
|
||||
NOW(),
|
||||
NOW()
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 检查接口名称是否存在 -->
|
||||
<select id="getAllDeviceSn" parameterType="AllInterfaceName" resultType="AllInterfaceName">
|
||||
SELECT
|
||||
device_sn AS deviceSn
|
||||
FROM
|
||||
all_interface_name
|
||||
<where>
|
||||
and resource_type = '1' and device_sn != ''
|
||||
</where>
|
||||
group by device_sn
|
||||
</select>
|
||||
<!-- 检查交换机接口名称是否存在 -->
|
||||
<select id="getAllSwitchSn" parameterType="AllInterfaceName" resultType="AllInterfaceName">
|
||||
SELECT
|
||||
switch_sn AS switchSn
|
||||
FROM
|
||||
all_interface_name
|
||||
<where>
|
||||
and resource_type = '2' and switch_sn != ''
|
||||
</where>
|
||||
group by switch_sn
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -184,6 +184,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="revenueMethod != null">
|
||||
and revenue_method = #{revenueMethod}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY create_time desc
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
<?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.ruoyi.system.mapper.InitialSwitchInfoDetailsMapper">
|
||||
|
||||
<resultMap type="InitialSwitchInfoDetails" id="InitialSwitchInfoDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="inBytes" column="in_bytes" />
|
||||
<result property="outBytes" column="out_bytes" />
|
||||
<result property="status" column="status" />
|
||||
<result property="type" column="type" />
|
||||
<result property="inSpeed" column="in_speed" />
|
||||
<result property="outSpeed" column="out_speed" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="switchName" column="switch_name" />
|
||||
<result property="interfaceDeviceType" column="interface_device_type" />
|
||||
<result property="serverName" column="server_name" />
|
||||
<result property="serverPort" column="server_port" />
|
||||
<result property="serverSn" column="server_sn" />
|
||||
<result property="switchSn" column="switch_sn" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoDetailsVo">
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, create_by, update_by, create_time, update_time, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn from initial_switch_info_details
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoDetailsList" parameterType="InitialSwitchInfoDetails" resultMap="InitialSwitchInfoDetailsResult">
|
||||
<include refid="selectInitialSwitchInfoDetailsVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="inBytes != null "> and in_bytes = #{inBytes}</if>
|
||||
<if test="outBytes != null "> and out_bytes = #{outBytes}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="inSpeed != null "> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null "> and out_speed = #{outSpeed}</if>
|
||||
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||
<if test="interfaceDeviceType != null and interfaceDeviceType != ''"> and interface_device_type = #{interfaceDeviceType}</if>
|
||||
<if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if>
|
||||
<if test="serverPort != null and serverPort != ''"> and server_port = #{serverPort}</if>
|
||||
<if test="serverSn != null and serverSn != ''"> and server_sn = #{serverSn}</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSwitchInfoDetailsById" parameterType="Long" resultMap="InitialSwitchInfoDetailsResult">
|
||||
<include refid="selectInitialSwitchInfoDetailsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialSwitchInfoDetails" parameterType="InitialSwitchInfoDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_switch_info_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="inBytes != null">in_bytes,</if>
|
||||
<if test="outBytes != null">out_bytes,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSpeed != null">out_speed,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="switchName != null">switch_name,</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type,</if>
|
||||
<if test="serverName != null">server_name,</if>
|
||||
<if test="serverPort != null">server_port,</if>
|
||||
<if test="serverSn != null">server_sn,</if>
|
||||
<if test="switchSn != null">switch_sn,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="inBytes != null">#{inBytes},</if>
|
||||
<if test="outBytes != null">#{outBytes},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSpeed != null">#{outSpeed},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">#{interfaceDeviceType},</if>
|
||||
<if test="serverName != null">#{serverName},</if>
|
||||
<if test="serverPort != null">#{serverPort},</if>
|
||||
<if test="serverSn != null">#{serverSn},</if>
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialSwitchInfoDetails" parameterType="InitialSwitchInfoDetails">
|
||||
update initial_switch_info_details
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="inBytes != null">in_bytes = #{inBytes},</if>
|
||||
<if test="outBytes != null">out_bytes = #{outBytes},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
|
||||
<if test="outSpeed != null">out_speed = #{outSpeed},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="switchName != null">switch_name = #{switchName},</if>
|
||||
<if test="interfaceDeviceType != null">interface_device_type = #{interfaceDeviceType},</if>
|
||||
<if test="serverName != null">server_name = #{serverName},</if>
|
||||
<if test="serverPort != null">server_port = #{serverPort},</if>
|
||||
<if test="serverSn != null">server_sn = #{serverSn},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoDetailsById" parameterType="Long">
|
||||
delete from initial_switch_info_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoDetailsByIds" parameterType="String">
|
||||
delete from initial_switch_info_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<!-- 查询交换机信息-->
|
||||
<select id="getAllSwitchInfoMsg" parameterType="InitialSwitchInfoDetails" resultType="InitialSwitchInfoDetails">
|
||||
SELECT
|
||||
id,
|
||||
client_id AS clientId,
|
||||
`name`,
|
||||
in_bytes AS inBytes,
|
||||
out_bytes AS outBytes,
|
||||
status,
|
||||
`type`,
|
||||
in_speed AS inSpeed,
|
||||
out_speed AS outSpeed,
|
||||
create_by AS createBy,
|
||||
update_by AS updateBy,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime
|
||||
FROM
|
||||
initial_switch_info
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
<insert id="saveBatchSwitchTraffic" parameterType="InitialSwitchInfoDetails">
|
||||
INSERT INTO initial_switch_info_details
|
||||
(
|
||||
client_id,
|
||||
name,
|
||||
in_bytes,
|
||||
out_bytes,
|
||||
status,
|
||||
type,
|
||||
in_speed,
|
||||
out_speed,
|
||||
switch_name,
|
||||
interface_device_type,
|
||||
server_name,
|
||||
server_port,
|
||||
server_sn,
|
||||
switch_sn,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="dataList" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.name},
|
||||
#{item.inBytes},
|
||||
#{item.outBytes},
|
||||
#{item.status},
|
||||
#{item.type},
|
||||
#{item.inSpeed},
|
||||
#{item.outSpeed},
|
||||
#{item.switchName},
|
||||
#{item.interfaceDeviceType},
|
||||
#{item.serverName},
|
||||
#{item.serverPort},
|
||||
#{item.serverSn},
|
||||
#{item.switchSn},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name= #{interfaceName}</if>
|
||||
<if test="connectedDeviceType != null and connectedDeviceType != ''"> and connected_device_type = #{connectedDeviceType}</if>
|
||||
<if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if>
|
||||
<if test="serverSn != null and serverSn != ''"> and server_sn = #{serverSn}</if>
|
||||
|
||||
@@ -3,13 +3,14 @@ package com.ruoyi.rocketmq.consumer;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.DeviceMessage;
|
||||
import com.ruoyi.rocketmq.domain.InitialBandwidthTraffic;
|
||||
import com.ruoyi.rocketmq.domain.*;
|
||||
import com.ruoyi.rocketmq.enums.MessageCodeEnum;
|
||||
import com.ruoyi.rocketmq.producer.ConsumeException;
|
||||
import com.ruoyi.rocketmq.service.IInitialBandwidthTrafficService;
|
||||
import com.ruoyi.rocketmq.service.*;
|
||||
import com.ruoyi.rocketmq.utils.JsonDataParser;
|
||||
import com.ruoyi.system.api.RemoteRevenueConfigService;
|
||||
import com.ruoyi.system.api.domain.EpsInitialTrafficDataRemote;
|
||||
import com.ruoyi.system.api.domain.InitialSwitchInfoDetailsRemote;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
|
||||
@@ -20,7 +21,12 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 消息监听
|
||||
@@ -32,7 +38,22 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
|
||||
private final IInitialBandwidthTrafficService initialBandwidthTrafficService;
|
||||
private final RemoteRevenueConfigService remoteRevenueConfigService;
|
||||
|
||||
@Autowired
|
||||
private IInitialDockerInfoService initialDockerInfoService;
|
||||
@Autowired
|
||||
private IInitialCpuInfoService initialCpuInfoService;
|
||||
@Autowired
|
||||
private IInitialDiskInfoService initialDiskInfoService;
|
||||
@Autowired
|
||||
private IInitialMemoryInfoService initialMemoryInfoService;
|
||||
@Autowired
|
||||
private IInitialMountPointInfoService initialMountPointInfoService;
|
||||
@Autowired
|
||||
private IInitialSwitchInfoService initialSwitchInfoService;
|
||||
@Autowired
|
||||
private IInitialSystemInfoService initialSystemInfoService;
|
||||
@Autowired
|
||||
private IInitialSwitchInfoTempService initialSwitchInfoTempService;
|
||||
@Autowired
|
||||
public RocketMsgListener(IInitialBandwidthTrafficService initialBandwidthTrafficService,
|
||||
RemoteRevenueConfigService remoteRevenueConfigService) {
|
||||
@@ -73,23 +94,36 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
if (MessageCodeEnum.AGENT_MESSAGE_TOPIC.getCode().equals(topic)) {
|
||||
// 拿到信息
|
||||
DeviceMessage message = JSON.parseObject(body, DeviceMessage.class);
|
||||
String duringTime = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",message.getReceiveTime());
|
||||
message.setDuringTime(duringTime);
|
||||
message.setReceiveTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss",duringTime));
|
||||
switch (message.getDataType()){
|
||||
case "NET":
|
||||
handleNetMessage(message);
|
||||
break;
|
||||
case "CPU":
|
||||
handleCpuMessage(message);
|
||||
break;
|
||||
case "SYSTEM":
|
||||
handleSystemMessage(message);
|
||||
break;
|
||||
case "DISK":
|
||||
handleDiskMessage(message);
|
||||
break;
|
||||
case "POINT":
|
||||
handleMountPointMessage(message);
|
||||
break;
|
||||
case "MEMORY":
|
||||
handleMemoryMessage(message);
|
||||
break;
|
||||
case "DOCKER":
|
||||
handleDockerMessage(message);
|
||||
break;
|
||||
case "SWITCHBOARD":
|
||||
handleSwitchMessage(message);
|
||||
break;
|
||||
default:
|
||||
log.warn("未知数据类型:{}",message.getDataType());
|
||||
|
||||
}
|
||||
//处理你的业务
|
||||
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;//业务处理成功
|
||||
@@ -117,6 +151,8 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
log.error(e.getMessage());
|
||||
} else if (exceptionClass.equals(ConsumeException.class)) {
|
||||
log.error(e.getMessage());
|
||||
} else{
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return ConsumeConcurrentlyStatus.RECONSUME_LATER;
|
||||
}
|
||||
@@ -126,24 +162,185 @@ public class RocketMsgListener implements MessageListenerConcurrently {
|
||||
* @param message
|
||||
*/
|
||||
private void handleNetMessage(DeviceMessage message) {
|
||||
List<InitialBandwidthTraffic> interfaces = JSON.parseArray(message.getData(), InitialBandwidthTraffic.class);
|
||||
InitialBandwidthTraffic data = new InitialBandwidthTraffic();
|
||||
interfaces.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
});
|
||||
// 批量入库集合
|
||||
data.setList(interfaces);
|
||||
// 开始时间
|
||||
String startTime = DateUtils.getTime();
|
||||
// 初始流量数据入库
|
||||
initialBandwidthTrafficService.batchInsert(data);
|
||||
// 结束时间
|
||||
String endTime = DateUtils.getTime();
|
||||
EpsInitialTrafficDataRemote epsInitialTrafficDataRemote = new EpsInitialTrafficDataRemote();
|
||||
epsInitialTrafficDataRemote.setStartTime(startTime);
|
||||
epsInitialTrafficDataRemote.setEndTime(endTime);
|
||||
// 复制到业务初始库
|
||||
remoteRevenueConfigService.autoSaveServiceTrafficData(epsInitialTrafficDataRemote, SecurityConstants.INNER);
|
||||
List<InitialBandwidthTraffic> interfaces = JsonDataParser.parseJsonData(message.getData(), InitialBandwidthTraffic.class);
|
||||
if(!interfaces.isEmpty()){
|
||||
InitialBandwidthTraffic data = new InitialBandwidthTraffic();
|
||||
interfaces.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 批量入库集合
|
||||
data.setList(interfaces);
|
||||
// 初始流量数据入库
|
||||
initialBandwidthTrafficService.batchInsert(data);
|
||||
EpsInitialTrafficDataRemote epsInitialTrafficDataRemote = new EpsInitialTrafficDataRemote();
|
||||
epsInitialTrafficDataRemote.setStartTime(message.getDuringTime());
|
||||
epsInitialTrafficDataRemote.setEndTime(message.getDuringTime());
|
||||
// 复制到业务初始库
|
||||
remoteRevenueConfigService.autoSaveServiceTrafficData(epsInitialTrafficDataRemote, SecurityConstants.INNER);
|
||||
}else{
|
||||
throw new RuntimeException("NET流量data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* docker数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleDockerMessage(DeviceMessage message) {
|
||||
List<InitialDockerInfo> dockers = JsonDataParser.parseJsonData(message.getData(), InitialDockerInfo.class);
|
||||
if(!dockers.isEmpty()){
|
||||
dockers.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始容器数据入库
|
||||
initialDockerInfoService.batchInsertInitialDockerInfo(dockers);
|
||||
}else{
|
||||
throw new RuntimeException("DOCKER容器data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* cpu数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleCpuMessage(DeviceMessage message) {
|
||||
List<InitialCpuInfo> cpus = JsonDataParser.parseJsonData(message.getData(),InitialCpuInfo.class);
|
||||
if(!cpus.isEmpty()){
|
||||
cpus.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始CPU数据入库
|
||||
initialCpuInfoService.batchInsertInitialCpuInfo(cpus);
|
||||
}else{
|
||||
throw new RuntimeException("CPUdata数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 磁盘数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleDiskMessage(DeviceMessage message) {
|
||||
List<InitialDiskInfo> disks = JsonDataParser.parseJsonData(message.getData(), InitialDiskInfo.class);
|
||||
if(!disks.isEmpty()){
|
||||
disks.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始磁盘数据入库
|
||||
initialDiskInfoService.batchInsertInitialDiskInfo(disks);
|
||||
}else{
|
||||
throw new RuntimeException("磁盘data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 内存数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleMemoryMessage(DeviceMessage message) {
|
||||
List<InitialMemoryInfo> memorys = JsonDataParser.parseJsonData(message.getData(), InitialMemoryInfo.class);
|
||||
if(!memorys.isEmpty()){
|
||||
memorys.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始内存数据入库
|
||||
initialMemoryInfoService.batchInsertInitialMemoryInfo(memorys);
|
||||
}else{
|
||||
throw new RuntimeException("内存data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 挂载点数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleMountPointMessage(DeviceMessage message) {
|
||||
List<InitialMountPointInfo> mountPointInfos = JsonDataParser.parseJsonData(message.getData(), InitialMountPointInfo.class);
|
||||
if(!mountPointInfos.isEmpty()){
|
||||
mountPointInfos.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始挂载点数据入库
|
||||
initialMountPointInfoService.batchInsertInitialMountPointInfo(mountPointInfos);
|
||||
}else{
|
||||
throw new RuntimeException("挂载点data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 交换机数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleSwitchMessage(DeviceMessage message) {
|
||||
List<InitialSwitchInfo> switchInfos = JsonDataParser.parseJsonData(message.getData(), InitialSwitchInfo.class);
|
||||
if(!switchInfos.isEmpty()){
|
||||
// 查询临时表信息,计算实际流量值
|
||||
InitialSwitchInfoTemp temp = new InitialSwitchInfoTemp();
|
||||
temp.setClientId(message.getClientId());
|
||||
List<InitialSwitchInfoTemp> tempList = initialSwitchInfoTempService.selectInitialSwitchInfoTempList(temp);
|
||||
if(!tempList.isEmpty()){
|
||||
// 1. 构建快速查找的Map
|
||||
Map<String, InitialSwitchInfoTemp> tempMap = tempList.stream()
|
||||
.collect(Collectors.toMap(
|
||||
InitialSwitchInfoTemp::getName,
|
||||
Function.identity(),
|
||||
(existing, replacement) -> existing
|
||||
));
|
||||
|
||||
// 2. 预计算除数(避免重复创建对象)
|
||||
BigDecimal divisor = new BigDecimal(300);
|
||||
|
||||
// 3. 计算速度
|
||||
switchInfos.forEach(switchInfo -> {
|
||||
switchInfo.setClientId(message.getClientId());
|
||||
switchInfo.setCreateTime(message.getReceiveTime());
|
||||
InitialSwitchInfoTemp tempInfo = tempMap.get(switchInfo.getName());
|
||||
if (tempInfo != null) {
|
||||
// 计算inSpeed
|
||||
if (switchInfo.getInBytes() != null && tempInfo.getInBytes() != null) {
|
||||
BigDecimal inDiff = switchInfo.getInBytes().subtract(tempInfo.getInBytes());
|
||||
switchInfo.setInSpeed(inDiff.divide(divisor, 2, RoundingMode.HALF_UP));
|
||||
}
|
||||
|
||||
// 计算outSpeed
|
||||
if (switchInfo.getOutBytes() != null && tempInfo.getOutBytes() != null) {
|
||||
BigDecimal outDiff = switchInfo.getOutBytes().subtract(tempInfo.getOutBytes());
|
||||
switchInfo.setOutSpeed(outDiff.divide(divisor, 2, RoundingMode.HALF_UP));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// 清空临时表
|
||||
initialSwitchInfoTempService.truncateSwitchInfoTemp();
|
||||
// 临时表 用来计算inSpeed outSeppd
|
||||
initialSwitchInfoTempService.batchInsertInitialSwitchInfoTemp(switchInfos);
|
||||
// 初始交换机数据入库
|
||||
initialSwitchInfoService.batchInsertInitialSwitchInfo(switchInfos);
|
||||
// 业务表入库
|
||||
InitialSwitchInfoDetailsRemote detailsRemote = new InitialSwitchInfoDetailsRemote();
|
||||
detailsRemote.setClientId(message.getClientId());
|
||||
detailsRemote.setStartTime(message.getDuringTime());
|
||||
detailsRemote.setEndTime(message.getDuringTime());
|
||||
remoteRevenueConfigService.autoSaveSwitchTraffic(detailsRemote, SecurityConstants.INNER);
|
||||
}else{
|
||||
throw new RuntimeException("交换机data数据为空");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 系统数据入库
|
||||
* @param message
|
||||
*/
|
||||
private void handleSystemMessage(DeviceMessage message) {
|
||||
List<InitialSystemInfo> systemInfos = JsonDataParser.parseJsonData(message.getData(), InitialSystemInfo.class);
|
||||
if(!systemInfos.isEmpty()){
|
||||
systemInfos.forEach(iface -> {
|
||||
iface.setClientId(message.getClientId());
|
||||
iface.setCreateTime(message.getReceiveTime());
|
||||
});
|
||||
// 初始系统数据入库
|
||||
initialSystemInfoService.batchInsertInitialSystemInfo(systemInfos);
|
||||
}else{
|
||||
throw new RuntimeException("系统data数据为空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialCpuInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialCpuInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* CPU监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/cpuInfo")
|
||||
public class InitialCpuInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialCpuInfoService initialCpuInfoService;
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialCpuInfo> list = initialCpuInfoService.selectInitialCpuInfoList(initialCpuInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出CPU监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:export")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
List<InitialCpuInfo> list = initialCpuInfoService.selectInitialCpuInfoList(initialCpuInfo);
|
||||
ExcelUtil<InitialCpuInfo> util = new ExcelUtil<InitialCpuInfo>(InitialCpuInfo.class);
|
||||
util.exportExcel(response, list, "CPU监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取CPU监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialCpuInfoService.selectInitialCpuInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:add")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
return toAjax(initialCpuInfoService.insertInitialCpuInfo(initialCpuInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:edit")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
return toAjax(initialCpuInfoService.updateInitialCpuInfo(initialCpuInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:remove")
|
||||
@Log(title = "CPU监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialCpuInfoService.deleteInitialCpuInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialDiskInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialDiskInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/diskInfo")
|
||||
public class InitialDiskInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialDiskInfoService initialDiskInfoService;
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialDiskInfo> list = initialDiskInfoService.selectInitialDiskInfoList(initialDiskInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出磁盘监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:export")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
List<InitialDiskInfo> list = initialDiskInfoService.selectInitialDiskInfoList(initialDiskInfo);
|
||||
ExcelUtil<InitialDiskInfo> util = new ExcelUtil<InitialDiskInfo>(InitialDiskInfo.class);
|
||||
util.exportExcel(response, list, "磁盘监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取磁盘监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialDiskInfoService.selectInitialDiskInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:add")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
return toAjax(initialDiskInfoService.insertInitialDiskInfo(initialDiskInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:edit")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
return toAjax(initialDiskInfoService.updateInitialDiskInfo(initialDiskInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:remove")
|
||||
@Log(title = "磁盘监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialDiskInfoService.deleteInitialDiskInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialDockerInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialDockerInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 容器监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dockerInfo")
|
||||
public class InitialDockerInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialDockerInfoService initialDockerInfoService;
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialDockerInfo> list = initialDockerInfoService.selectInitialDockerInfoList(initialDockerInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出容器监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:export")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
List<InitialDockerInfo> list = initialDockerInfoService.selectInitialDockerInfoList(initialDockerInfo);
|
||||
ExcelUtil<InitialDockerInfo> util = new ExcelUtil<InitialDockerInfo>(InitialDockerInfo.class);
|
||||
util.exportExcel(response, list, "容器监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取容器监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialDockerInfoService.selectInitialDockerInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:add")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
return toAjax(initialDockerInfoService.insertInitialDockerInfo(initialDockerInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:edit")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
return toAjax(initialDockerInfoService.updateInitialDockerInfo(initialDockerInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除容器监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:remove")
|
||||
@Log(title = "容器监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialDockerInfoService.deleteInitialDockerInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialMemoryInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialMemoryInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 内存监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/memoryInfo")
|
||||
public class InitialMemoryInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialMemoryInfoService initialMemoryInfoService;
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialMemoryInfo> list = initialMemoryInfoService.selectInitialMemoryInfoList(initialMemoryInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出内存监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:export")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
List<InitialMemoryInfo> list = initialMemoryInfoService.selectInitialMemoryInfoList(initialMemoryInfo);
|
||||
ExcelUtil<InitialMemoryInfo> util = new ExcelUtil<InitialMemoryInfo>(InitialMemoryInfo.class);
|
||||
util.exportExcel(response, list, "内存监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取内存监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialMemoryInfoService.selectInitialMemoryInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:add")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
return toAjax(initialMemoryInfoService.insertInitialMemoryInfo(initialMemoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:edit")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
return toAjax(initialMemoryInfoService.updateInitialMemoryInfo(initialMemoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除内存监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:remove")
|
||||
@Log(title = "内存监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialMemoryInfoService.deleteInitialMemoryInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialMountPointInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mountPointInfo")
|
||||
public class InitialMountPointInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialMountPointInfoService initialMountPointInfoService;
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialMountPointInfo> list = initialMountPointInfoService.selectInitialMountPointInfoList(initialMountPointInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出挂载点监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:export")
|
||||
@Log(title = "挂载点监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
List<InitialMountPointInfo> list = initialMountPointInfoService.selectInitialMountPointInfoList(initialMountPointInfo);
|
||||
ExcelUtil<InitialMountPointInfo> util = new ExcelUtil<InitialMountPointInfo>(InitialMountPointInfo.class);
|
||||
util.exportExcel(response, list, "挂载点监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取挂载点监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialMountPointInfoService.selectInitialMountPointInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增挂载点监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:add")
|
||||
@Log(title = "挂载点监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
return toAjax(initialMountPointInfoService.insertInitialMountPointInfo(initialMountPointInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改挂载点监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:edit")
|
||||
@Log(title = "挂载点监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
return toAjax(initialMountPointInfoService.updateInitialMountPointInfo(initialMountPointInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除挂载点监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:remove")
|
||||
@Log(title = "挂载点监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialMountPointInfoService.deleteInitialMountPointInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/switchInfo")
|
||||
public class InitialSwitchInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchInfoService initialSwitchInfoService;
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchInfo> list = initialSwitchInfoService.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机流量监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:export")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
List<InitialSwitchInfo> list = initialSwitchInfoService.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||
ExcelUtil<InitialSwitchInfo> util = new ExcelUtil<InitialSwitchInfo>(InitialSwitchInfo.class);
|
||||
util.exportExcel(response, list, "交换机流量监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机流量监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchInfoService.selectInitialSwitchInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:add")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
return toAjax(initialSwitchInfoService.insertInitialSwitchInfo(initialSwitchInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:edit")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
return toAjax(initialSwitchInfoService.updateInitialSwitchInfo(initialSwitchInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:switchInfo:remove")
|
||||
@Log(title = "交换机流量监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchInfoService.deleteInitialSwitchInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoTempService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/temp")
|
||||
public class InitialSwitchInfoTempController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSwitchInfoTempService initialSwitchInfoTempService;
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSwitchInfoTemp> list = initialSwitchInfoTempService.selectInitialSwitchInfoTempList(initialSwitchInfoTemp);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出交换机监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:export")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
List<InitialSwitchInfoTemp> list = initialSwitchInfoTempService.selectInitialSwitchInfoTempList(initialSwitchInfoTemp);
|
||||
ExcelUtil<InitialSwitchInfoTemp> util = new ExcelUtil<InitialSwitchInfoTemp>(InitialSwitchInfoTemp.class);
|
||||
util.exportExcel(response, list, "交换机监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSwitchInfoTempService.selectInitialSwitchInfoTempById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:add")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
return toAjax(initialSwitchInfoTempService.insertInitialSwitchInfoTemp(initialSwitchInfoTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:edit")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
return toAjax(initialSwitchInfoTempService.updateInitialSwitchInfoTemp(initialSwitchInfoTemp));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:temp:remove")
|
||||
@Log(title = "交换机监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSwitchInfoTempService.deleteInitialSwitchInfoTempByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.InitialSystemInfo;
|
||||
import com.ruoyi.rocketmq.service.IInitialSystemInfoService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 系统监控信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/systemInfo")
|
||||
public class InitialSystemInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IInitialSystemInfoService initialSystemInfoService;
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
startPage();
|
||||
List<InitialSystemInfo> list = initialSystemInfoService.selectInitialSystemInfoList(initialSystemInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出系统监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:export")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
List<InitialSystemInfo> list = initialSystemInfoService.selectInitialSystemInfoList(initialSystemInfo);
|
||||
ExcelUtil<InitialSystemInfo> util = new ExcelUtil<InitialSystemInfo>(InitialSystemInfo.class);
|
||||
util.exportExcel(response, list, "系统监控信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统监控信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(initialSystemInfoService.selectInitialSystemInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:add")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
return toAjax(initialSystemInfoService.insertInitialSystemInfo(initialSystemInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:edit")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
return toAjax(initialSystemInfoService.updateInitialSystemInfo(initialSystemInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统监控信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:remove")
|
||||
@Log(title = "系统监控信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(initialSystemInfoService.deleteInitialSystemInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DeviceMessage {
|
||||
private String clientId;
|
||||
private String dataType;
|
||||
private String data;
|
||||
private LocalDateTime receiveTime = LocalDateTime.now();
|
||||
private Date receiveTime = DateUtils.getNowDate();
|
||||
private String duringTime;
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* CPU监控信息对象 initial_cpu_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public class InitialCpuInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** CPU1分钟负载 */
|
||||
@Excel(name = "CPU1分钟负载")
|
||||
private long avg1;
|
||||
|
||||
/** CPU5分钟负载 */
|
||||
@Excel(name = "CPU5分钟负载")
|
||||
private long avg5;
|
||||
|
||||
/** CPU15分钟负载 */
|
||||
@Excel(name = "CPU15分钟负载")
|
||||
private long avg15;
|
||||
|
||||
/** CPU硬件中断提供服务时间(秒) */
|
||||
@Excel(name = "CPU硬件中断提供服务时间(秒)")
|
||||
private long interrupt;
|
||||
|
||||
/** CPU使用率(%) */
|
||||
@Excel(name = "CPU使用率(%)")
|
||||
private long uti;
|
||||
|
||||
/** CPU数量(核数) */
|
||||
@Excel(name = "CPU数量(核数)")
|
||||
private long num;
|
||||
|
||||
/** CPU正常运行时间(秒) */
|
||||
@Excel(name = "CPU正常运行时间(秒)")
|
||||
private Long normal;
|
||||
|
||||
/** CPU空闲时间(秒) */
|
||||
@Excel(name = "CPU空闲时间(秒)")
|
||||
private long idle;
|
||||
|
||||
/** CPU等待响应时间(秒) */
|
||||
@Excel(name = "CPU等待响应时间(秒)")
|
||||
private long iowait;
|
||||
|
||||
/** CPU系统时间(秒) */
|
||||
@Excel(name = "CPU系统时间(秒)")
|
||||
private long system;
|
||||
|
||||
/** CPU软件无响应时间(秒) */
|
||||
@Excel(name = "CPU软件无响应时间(秒)")
|
||||
private long noresp;
|
||||
|
||||
/** CPU用户进程所花费的时间(秒) */
|
||||
@Excel(name = "CPU用户进程所花费的时间(秒)")
|
||||
private long user;
|
||||
|
||||
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 setAvg1(long avg1)
|
||||
{
|
||||
this.avg1 = avg1;
|
||||
}
|
||||
|
||||
public long getAvg1()
|
||||
{
|
||||
return avg1;
|
||||
}
|
||||
|
||||
public void setAvg5(long avg5)
|
||||
{
|
||||
this.avg5 = avg5;
|
||||
}
|
||||
|
||||
public long getAvg5()
|
||||
{
|
||||
return avg5;
|
||||
}
|
||||
|
||||
public void setAvg15(long avg15)
|
||||
{
|
||||
this.avg15 = avg15;
|
||||
}
|
||||
|
||||
public long getAvg15()
|
||||
{
|
||||
return avg15;
|
||||
}
|
||||
|
||||
public void setInterrupt(long interrupt)
|
||||
{
|
||||
this.interrupt = interrupt;
|
||||
}
|
||||
|
||||
public long getInterrupt()
|
||||
{
|
||||
return interrupt;
|
||||
}
|
||||
|
||||
public void setUti(long uti)
|
||||
{
|
||||
this.uti = uti;
|
||||
}
|
||||
|
||||
public long getUti()
|
||||
{
|
||||
return uti;
|
||||
}
|
||||
|
||||
public void setNum(long num)
|
||||
{
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public long getNum()
|
||||
{
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNormal(Long normal)
|
||||
{
|
||||
this.normal = normal;
|
||||
}
|
||||
|
||||
public Long getNormal()
|
||||
{
|
||||
return normal;
|
||||
}
|
||||
|
||||
public void setIdle(long idle)
|
||||
{
|
||||
this.idle = idle;
|
||||
}
|
||||
|
||||
public long getIdle()
|
||||
{
|
||||
return idle;
|
||||
}
|
||||
|
||||
public void setIowait(long iowait)
|
||||
{
|
||||
this.iowait = iowait;
|
||||
}
|
||||
|
||||
public long getIowait()
|
||||
{
|
||||
return iowait;
|
||||
}
|
||||
|
||||
public void setSystem(long system)
|
||||
{
|
||||
this.system = system;
|
||||
}
|
||||
|
||||
public long getSystem()
|
||||
{
|
||||
return system;
|
||||
}
|
||||
|
||||
public void setNoresp(long noresp)
|
||||
{
|
||||
this.noresp = noresp;
|
||||
}
|
||||
|
||||
public long getNoresp()
|
||||
{
|
||||
return noresp;
|
||||
}
|
||||
|
||||
public void setUser(long user)
|
||||
{
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public long getUser()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("avg1", getAvg1())
|
||||
.append("avg5", getAvg5())
|
||||
.append("avg15", getAvg15())
|
||||
.append("interrupt", getInterrupt())
|
||||
.append("uti", getUti())
|
||||
.append("num", getNum())
|
||||
.append("normal", getNormal())
|
||||
.append("idle", getIdle())
|
||||
.append("iowait", getIowait())
|
||||
.append("system", getSystem())
|
||||
.append("noresp", getNoresp())
|
||||
.append("user", getUser())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息对象 initial_disk_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public class InitialDiskInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 磁盘名称(如sda、sdb等) */
|
||||
@Excel(name = "磁盘名称(如sda、sdb等)")
|
||||
private String name;
|
||||
|
||||
/** 磁盘序列号 */
|
||||
@Excel(name = "磁盘序列号")
|
||||
private String serial;
|
||||
|
||||
/** 磁盘总大小(GB) */
|
||||
@Excel(name = "磁盘总大小(GB)")
|
||||
private Long total;
|
||||
|
||||
/** 磁盘写入速率(字节/秒) */
|
||||
@Excel(name = "磁盘写入速率(字节/秒)")
|
||||
private Long writeSpeed;
|
||||
|
||||
/** 磁盘读取速率(字节/秒) */
|
||||
@Excel(name = "磁盘读取速率(字节/秒)")
|
||||
private Long readSpeed;
|
||||
|
||||
/** 磁盘写入次数 */
|
||||
@Excel(name = "磁盘写入次数")
|
||||
private Long writeTimes;
|
||||
|
||||
/** 磁盘读取次数 */
|
||||
@Excel(name = "磁盘读取次数")
|
||||
private Long readTimes;
|
||||
|
||||
/** 磁盘写入总字节数 */
|
||||
@Excel(name = "磁盘写入总字节数")
|
||||
private Long writeBytes;
|
||||
|
||||
/** 磁盘读取总字节数 */
|
||||
@Excel(name = "磁盘读取总字节数")
|
||||
private Long readBytes;
|
||||
|
||||
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 setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setSerial(String serial)
|
||||
{
|
||||
this.serial = serial;
|
||||
}
|
||||
|
||||
public String getSerial()
|
||||
{
|
||||
return serial;
|
||||
}
|
||||
|
||||
public void setTotal(Long total)
|
||||
{
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Long getTotal()
|
||||
{
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setWriteSpeed(Long writeSpeed)
|
||||
{
|
||||
this.writeSpeed = writeSpeed;
|
||||
}
|
||||
|
||||
public Long getWriteSpeed()
|
||||
{
|
||||
return writeSpeed;
|
||||
}
|
||||
|
||||
public void setReadSpeed(Long readSpeed)
|
||||
{
|
||||
this.readSpeed = readSpeed;
|
||||
}
|
||||
|
||||
public Long getReadSpeed()
|
||||
{
|
||||
return readSpeed;
|
||||
}
|
||||
|
||||
public void setWriteTimes(Long writeTimes)
|
||||
{
|
||||
this.writeTimes = writeTimes;
|
||||
}
|
||||
|
||||
public Long getWriteTimes()
|
||||
{
|
||||
return writeTimes;
|
||||
}
|
||||
|
||||
public void setReadTimes(Long readTimes)
|
||||
{
|
||||
this.readTimes = readTimes;
|
||||
}
|
||||
|
||||
public Long getReadTimes()
|
||||
{
|
||||
return readTimes;
|
||||
}
|
||||
|
||||
public void setWriteBytes(Long writeBytes)
|
||||
{
|
||||
this.writeBytes = writeBytes;
|
||||
}
|
||||
|
||||
public Long getWriteBytes()
|
||||
{
|
||||
return writeBytes;
|
||||
}
|
||||
|
||||
public void setReadBytes(Long readBytes)
|
||||
{
|
||||
this.readBytes = readBytes;
|
||||
}
|
||||
|
||||
public Long getReadBytes()
|
||||
{
|
||||
return readBytes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("name", getName())
|
||||
.append("serial", getSerial())
|
||||
.append("total", getTotal())
|
||||
.append("writeSpeed", getWriteSpeed())
|
||||
.append("readSpeed", getReadSpeed())
|
||||
.append("writeTimes", getWriteTimes())
|
||||
.append("readTimes", getReadTimes())
|
||||
.append("writeBytes", getWriteBytes())
|
||||
.append("readBytes", getReadBytes())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 容器监控信息对象 initial_docker_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialDockerInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long autoId;
|
||||
/** 容器ID */
|
||||
private String id;
|
||||
|
||||
/** 容器名称 */
|
||||
@Excel(name = "容器名称")
|
||||
private String name;
|
||||
|
||||
/** 容器状态(running/stopped/error等) */
|
||||
@Excel(name = "容器状态(running/stopped/error等)")
|
||||
private String status;
|
||||
|
||||
/** 容器CPU使用率(%) */
|
||||
@Excel(name = "容器CPU使用率(%)")
|
||||
private String cpuUtil;
|
||||
|
||||
/** 容器内存使用率(%) */
|
||||
@Excel(name = "容器内存使用率(%)")
|
||||
private String memUtil;
|
||||
|
||||
/** 容器网络接收速率(KB/s) */
|
||||
@Excel(name = "容器网络接收速率(KB/s)")
|
||||
private String netInSpeed;
|
||||
|
||||
/** 容器网络发送速率(KB/s) */
|
||||
@Excel(name = "容器网络发送速率(KB/s)")
|
||||
private String netOutSpeed;
|
||||
|
||||
/** 设备唯一标识 */
|
||||
@Excel(name = "设备唯一标识")
|
||||
private String clientId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 内存监控信息对象 initial_memory_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialMemoryInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 交换卷/文件的可用空间(字节) */
|
||||
@Excel(name = "交换卷/文件的可用空间(字节)")
|
||||
private BigDecimal swapSizeFree;
|
||||
|
||||
/** 内存利用率(%) */
|
||||
@Excel(name = "内存利用率(%)")
|
||||
private BigDecimal untilzation;
|
||||
|
||||
/** 可用交换空间百分比(%) */
|
||||
@Excel(name = "可用交换空间百分比(%)")
|
||||
private BigDecimal swapSizePercent;
|
||||
|
||||
/** 可用内存(字节) */
|
||||
@Excel(name = "可用内存(字节)")
|
||||
private Long available;
|
||||
|
||||
/** 可用内存百分比(%) */
|
||||
@Excel(name = "可用内存百分比(%)")
|
||||
private BigDecimal percent;
|
||||
|
||||
/** 总内存(字节) */
|
||||
@Excel(name = "总内存(字节)")
|
||||
private Long total;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息对象 initial_mount_point_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public class InitialMountPointInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 挂载点路径(如"/"、"/data"等) */
|
||||
@Excel(name = "挂载点路径")
|
||||
private String mount;
|
||||
|
||||
/** 文件系统类型(如ext4、xfs、ntfs等) */
|
||||
@Excel(name = "文件系统类型")
|
||||
private String vfsType;
|
||||
|
||||
/** 可用空间(字节) */
|
||||
@Excel(name = "可用空间")
|
||||
private Long vfsFree;
|
||||
|
||||
/** 总空间(字节) */
|
||||
@Excel(name = "总空间")
|
||||
private Long vfsTotal;
|
||||
|
||||
/** 空间利用率(%) */
|
||||
@Excel(name = "空间利用率")
|
||||
private BigDecimal vfsUtil;
|
||||
|
||||
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 setMount(String mount)
|
||||
{
|
||||
this.mount = mount;
|
||||
}
|
||||
|
||||
public String getMount()
|
||||
{
|
||||
return mount;
|
||||
}
|
||||
|
||||
public void setVfsType(String vfsType)
|
||||
{
|
||||
this.vfsType = vfsType;
|
||||
}
|
||||
|
||||
public String getVfsType()
|
||||
{
|
||||
return vfsType;
|
||||
}
|
||||
|
||||
public void setVfsFree(Long vfsFree)
|
||||
{
|
||||
this.vfsFree = vfsFree;
|
||||
}
|
||||
|
||||
public Long getVfsFree()
|
||||
{
|
||||
return vfsFree;
|
||||
}
|
||||
|
||||
public void setVfsTotal(Long vfsTotal)
|
||||
{
|
||||
this.vfsTotal = vfsTotal;
|
||||
}
|
||||
|
||||
public Long getVfsTotal()
|
||||
{
|
||||
return vfsTotal;
|
||||
}
|
||||
|
||||
public void setVfsUtil(BigDecimal vfsUtil)
|
||||
{
|
||||
this.vfsUtil = vfsUtil;
|
||||
}
|
||||
|
||||
public BigDecimal getVfsUtil()
|
||||
{
|
||||
return vfsUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("mount", getMount())
|
||||
.append("vfsType", getVfsType())
|
||||
.append("vfsFree", getVfsFree())
|
||||
.append("vfsTotal", getVfsTotal())
|
||||
.append("vfsUtil", getVfsUtil())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息对象 initial_switch_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialSwitchInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
/** 接收流量 */
|
||||
private BigDecimal inBytes;
|
||||
/** 发送流量 */
|
||||
private BigDecimal outBytes;
|
||||
/** 状态 */
|
||||
private String status;
|
||||
/** 类型 */
|
||||
private String type;
|
||||
/** 接收流量(bytes/s) */
|
||||
private BigDecimal inSpeed;
|
||||
/** 发送流量(bytes/s) */
|
||||
private BigDecimal outSpeed;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 交换机监控信息对象 initial_switch_info_temp
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public class InitialSwitchInfoTemp extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 网络接口名称(如eth0、ens33等) */
|
||||
@Excel(name = "网络接口名称(如eth0、ens33等)")
|
||||
private String name;
|
||||
|
||||
/** 接收流量(字节) */
|
||||
@Excel(name = "接收流量(字节)")
|
||||
private BigDecimal inBytes;
|
||||
|
||||
/** 发送流量(字节) */
|
||||
@Excel(name = "发送流量(字节)")
|
||||
private BigDecimal outBytes;
|
||||
|
||||
/** 接口状态(up/down等) */
|
||||
@Excel(name = "接口状态(up/down等)")
|
||||
private String status;
|
||||
|
||||
/** 接口类型(ethernet/wireless等) */
|
||||
@Excel(name = "接口类型(ethernet/wireless等)")
|
||||
private String type;
|
||||
|
||||
/** 接收流量(bytes/s) */
|
||||
@Excel(name = "接收流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal inSpeed;
|
||||
|
||||
/** 发送流量(bytes/s) */
|
||||
@Excel(name = "发送流量", readConverterExp = "b=ytes/s")
|
||||
private BigDecimal outSpeed;
|
||||
|
||||
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 setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setInBytes(BigDecimal inBytes)
|
||||
{
|
||||
this.inBytes = inBytes;
|
||||
}
|
||||
|
||||
public BigDecimal getInBytes()
|
||||
{
|
||||
return inBytes;
|
||||
}
|
||||
|
||||
public void setOutBytes(BigDecimal outBytes)
|
||||
{
|
||||
this.outBytes = outBytes;
|
||||
}
|
||||
|
||||
public BigDecimal getOutBytes()
|
||||
{
|
||||
return outBytes;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setInSpeed(BigDecimal inSpeed)
|
||||
{
|
||||
this.inSpeed = inSpeed;
|
||||
}
|
||||
|
||||
public BigDecimal getInSpeed()
|
||||
{
|
||||
return inSpeed;
|
||||
}
|
||||
|
||||
public void setOutSpeed(BigDecimal outSpeed)
|
||||
{
|
||||
this.outSpeed = outSpeed;
|
||||
}
|
||||
|
||||
public BigDecimal getOutSpeed()
|
||||
{
|
||||
return outSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("name", getName())
|
||||
.append("inBytes", getInBytes())
|
||||
.append("outBytes", getOutBytes())
|
||||
.append("status", getStatus())
|
||||
.append("type", getType())
|
||||
.append("inSpeed", getInSpeed())
|
||||
.append("outSpeed", getOutSpeed())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 系统监控信息对象 initial_system_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialSystemInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 自增主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 操作系统(如Linux、Windows等) */
|
||||
@Excel(name = "操作系统(如Linux、Windows等)")
|
||||
private String os;
|
||||
|
||||
/** 操作系统架构(如x86_64、arm64等) */
|
||||
@Excel(name = "操作系统架构(如x86_64、arm64等)")
|
||||
private String arch;
|
||||
|
||||
/** 最大进程数 */
|
||||
@Excel(name = "最大进程数")
|
||||
private Long maxProc;
|
||||
|
||||
/** 正在运行的进程数 */
|
||||
@Excel(name = "正在运行的进程数")
|
||||
private Long runProcNum;
|
||||
|
||||
/** 登录用户数 */
|
||||
@Excel(name = "登录用户数")
|
||||
private Long usersNum;
|
||||
|
||||
/** 硬盘总可用空间(GB) */
|
||||
@Excel(name = "硬盘总可用空间(GB)")
|
||||
private BigDecimal diskSizeTotal;
|
||||
|
||||
/** 系统启动时间(Unix时间戳) */
|
||||
@Excel(name = "系统启动时间(Unix时间戳)")
|
||||
private Long bootTime;
|
||||
|
||||
/** 系统描述(如Linux 5.4.0-80-generic) */
|
||||
@Excel(name = "系统描述(如Linux 5.4.0-80-generic)")
|
||||
private String uname;
|
||||
|
||||
/** 系统本地时间(如2023-08-15 14:30:00) */
|
||||
@Excel(name = "系统本地时间(如2023-08-15 14:30:00)")
|
||||
private String localTime;
|
||||
|
||||
/** 系统正常运行时间(秒) */
|
||||
@Excel(name = "系统正常运行时间(秒)")
|
||||
private Long upTime;
|
||||
|
||||
/** 进程数 */
|
||||
@Excel(name = "进程数")
|
||||
private BigDecimal procNum;
|
||||
|
||||
/** 记录时间戳(Unix时间戳) */
|
||||
@Excel(name = "记录时间戳(Unix时间戳)")
|
||||
private Long timeStamp;
|
||||
|
||||
private String uuid;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialCpuInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CPU监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialCpuInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
public InitialCpuInfo selectInitialCpuInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return CPU监控信息集合
|
||||
*/
|
||||
public List<InitialCpuInfo> selectInitialCpuInfoList(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除CPU监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增CPU监控信息
|
||||
*
|
||||
* @param list CPU监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialCpuInfo(@Param("list") List<InitialCpuInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDiskInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialDiskInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
public InitialDiskInfo selectInitialDiskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 磁盘监控信息集合
|
||||
*/
|
||||
public List<InitialDiskInfo> selectInitialDiskInfoList(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除磁盘监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增磁盘监控信息
|
||||
*
|
||||
* @param list 磁盘监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialDiskInfo(@Param("list") List<InitialDiskInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDockerInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialDockerInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询容器监控信息
|
||||
*
|
||||
* @param autoId 容器监控信息主键
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
public InitialDockerInfo selectInitialDockerInfoById(Long autoId);
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 容器监控信息集合
|
||||
*/
|
||||
public List<InitialDockerInfo> selectInitialDockerInfoList(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 删除容器监控信息
|
||||
*
|
||||
* @param autoId 容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoById(Long autoId);
|
||||
|
||||
/**
|
||||
* 批量删除容器监控信息
|
||||
*
|
||||
* @param autoId 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoByIds(Long[] autoId);
|
||||
|
||||
int batchInsertInitialDockerInfo(@Param("list") List<InitialDockerInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMemoryInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 内存监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialMemoryInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
public InitialMemoryInfo selectInitialMemoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 内存监控信息集合
|
||||
*/
|
||||
public List<InitialMemoryInfo> selectInitialMemoryInfoList(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 删除内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除内存监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增内存监控信息
|
||||
*
|
||||
* @param list 内存监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMemoryInfo(@Param("list") List<InitialMemoryInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialMountPointInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
public InitialMountPointInfo selectInitialMountPointInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 挂载点监控信息集合
|
||||
*/
|
||||
public List<InitialMountPointInfo> selectInitialMountPointInfoList(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 新增挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 修改挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 删除挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除挂载点监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增挂载点监控信息
|
||||
*
|
||||
* @param list 挂载点监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMountPointInfo(@Param("list") List<InitialMountPointInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialSwitchInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
public InitialSwitchInfo selectInitialSwitchInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 交换机流量监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfo> selectInitialSwitchInfoList(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除交换机流量监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfo(@Param("list") List<InitialSwitchInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public interface InitialSwitchInfoTempMapper
|
||||
{
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
public InitialSwitchInfoTemp selectInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 交换机监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfoTemp> selectInitialSwitchInfoTempList(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfoTemp(@Param("list") List<InitialSwitchInfo> list);
|
||||
|
||||
void truncateSwitchInfoTemp();
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSystemInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统监控信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface InitialSystemInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
public InitialSystemInfo selectInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 系统监控信息集合
|
||||
*/
|
||||
public List<InitialSystemInfo> selectInitialSystemInfoList(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 删除系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除系统监控信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoByIds(Long[] ids);
|
||||
/**
|
||||
* 批量新增系统监控信息
|
||||
*
|
||||
* @param list 系统监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
int batchInsertInitialSystemInfo(@Param("list") List<InitialSystemInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialCpuInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CPU监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialCpuInfoService
|
||||
{
|
||||
/**
|
||||
* 查询CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
public InitialCpuInfo selectInitialCpuInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return CPU监控信息集合
|
||||
*/
|
||||
public List<InitialCpuInfo> selectInitialCpuInfoList(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialCpuInfo(InitialCpuInfo initialCpuInfo);
|
||||
|
||||
/**
|
||||
* 批量删除CPU监控信息
|
||||
*
|
||||
* @param ids 需要删除的CPU监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialCpuInfoById(Long id);
|
||||
/**
|
||||
* 批量新增CPU监控信息信息
|
||||
*
|
||||
* @param list CPU监控信息信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialCpuInfo(List<InitialCpuInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDiskInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialDiskInfoService
|
||||
{
|
||||
/**
|
||||
* 查询磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
public InitialDiskInfo selectInitialDiskInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 磁盘监控信息集合
|
||||
*/
|
||||
public List<InitialDiskInfo> selectInitialDiskInfoList(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDiskInfo(InitialDiskInfo initialDiskInfo);
|
||||
|
||||
/**
|
||||
* 批量删除磁盘监控信息
|
||||
*
|
||||
* @param ids 需要删除的磁盘监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDiskInfoById(Long id);
|
||||
/**
|
||||
* 批量新增磁盘监控信息
|
||||
*
|
||||
* @param list 磁盘监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialDiskInfo(List<InitialDiskInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialDockerInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialDockerInfoService
|
||||
{
|
||||
/**
|
||||
* 查询容器监控信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
public InitialDockerInfo selectInitialDockerInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 容器监控信息集合
|
||||
*/
|
||||
public List<InitialDockerInfo> selectInitialDockerInfoList(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialDockerInfo(InitialDockerInfo initialDockerInfo);
|
||||
|
||||
/**
|
||||
* 批量删除容器监控信息
|
||||
*
|
||||
* @param ids 需要删除的容器监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除容器监控信息信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialDockerInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialDockerInfo(List<InitialDockerInfo> initialDockerInfo);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMemoryInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 内存监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialMemoryInfoService
|
||||
{
|
||||
/**
|
||||
* 查询内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
public InitialMemoryInfo selectInitialMemoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 内存监控信息集合
|
||||
*/
|
||||
public List<InitialMemoryInfo> selectInitialMemoryInfoList(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo);
|
||||
|
||||
/**
|
||||
* 批量删除内存监控信息
|
||||
*
|
||||
* @param ids 需要删除的内存监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除内存监控信息信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMemoryInfoById(Long id);
|
||||
/**
|
||||
* 批量新增内存监控信息
|
||||
*
|
||||
* @param list 内存监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMemoryInfo(List<InitialMemoryInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialMountPointInfoService
|
||||
{
|
||||
/**
|
||||
* 查询挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
public InitialMountPointInfo selectInitialMountPointInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 挂载点监控信息集合
|
||||
*/
|
||||
public List<InitialMountPointInfo> selectInitialMountPointInfoList(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 新增挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 修改挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo);
|
||||
|
||||
/**
|
||||
* 批量删除挂载点监控信息
|
||||
*
|
||||
* @param ids 需要删除的挂载点监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除挂载点监控信息信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialMountPointInfoById(Long id);
|
||||
/**
|
||||
* 批量新增挂载点监控信息
|
||||
*
|
||||
* @param list 挂载点监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialMountPointInfo(@Param("list") List<InitialMountPointInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialSwitchInfoService
|
||||
{
|
||||
/**
|
||||
* 查询交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
public InitialSwitchInfo selectInitialSwitchInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 交换机流量监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfo> selectInitialSwitchInfoList(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo);
|
||||
|
||||
/**
|
||||
* 批量删除交换机流量监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机流量监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoById(Long id);
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfo(List<InitialSwitchInfo> list);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
public interface IInitialSwitchInfoTempService
|
||||
{
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
public InitialSwitchInfoTemp selectInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 交换机监控信息集合
|
||||
*/
|
||||
public List<InitialSwitchInfoTemp> selectInitialSwitchInfoTempList(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp);
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSwitchInfoTempById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSwitchInfoTemp(List<InitialSwitchInfo> list);
|
||||
|
||||
void truncateSwitchInfoTemp();
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.InitialSystemInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统监控信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
public interface IInitialSystemInfoService
|
||||
{
|
||||
/**
|
||||
* 查询系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
public InitialSystemInfo selectInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 系统监控信息集合
|
||||
*/
|
||||
public List<InitialSystemInfo> selectInitialSystemInfoList(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInitialSystemInfo(InitialSystemInfo initialSystemInfo);
|
||||
|
||||
/**
|
||||
* 批量删除系统监控信息
|
||||
*
|
||||
* @param ids 需要删除的系统监控信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除系统监控信息信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteInitialSystemInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertInitialSystemInfo(List<InitialSystemInfo> initialSystemInfo);
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialCpuInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialCpuInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialCpuInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CPU监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialCpuInfoServiceImpl implements IInitialCpuInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialCpuInfoMapper initialCpuInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialCpuInfo selectInitialCpuInfoById(Long id)
|
||||
{
|
||||
return initialCpuInfoMapper.selectInitialCpuInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询CPU监控信息列表
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return CPU监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialCpuInfo> selectInitialCpuInfoList(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
return initialCpuInfoMapper.selectInitialCpuInfoList(initialCpuInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialCpuInfo(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
initialCpuInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialCpuInfoMapper.insertInitialCpuInfo(initialCpuInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改CPU监控信息
|
||||
*
|
||||
* @param initialCpuInfo CPU监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialCpuInfo(InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
initialCpuInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialCpuInfoMapper.updateInitialCpuInfo(initialCpuInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除CPU监控信息
|
||||
*
|
||||
* @param ids 需要删除的CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialCpuInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialCpuInfoMapper.deleteInitialCpuInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除CPU监控信息信息
|
||||
*
|
||||
* @param id CPU监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialCpuInfoById(Long id)
|
||||
{
|
||||
return initialCpuInfoMapper.deleteInitialCpuInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增CPU监控信息信息
|
||||
*
|
||||
* @param list CPU监控信息信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialCpuInfo(List<InitialCpuInfo> list) {
|
||||
try {
|
||||
return initialCpuInfoMapper.batchInsertInitialCpuInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入CPU信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialDiskInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialDiskInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialDiskInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialDiskInfoServiceImpl implements IInitialDiskInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialDiskInfoMapper initialDiskInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialDiskInfo selectInitialDiskInfoById(Long id)
|
||||
{
|
||||
return initialDiskInfoMapper.selectInitialDiskInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询磁盘监控信息列表
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 磁盘监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialDiskInfo> selectInitialDiskInfoList(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
return initialDiskInfoMapper.selectInitialDiskInfoList(initialDiskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialDiskInfo(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
initialDiskInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialDiskInfoMapper.insertInitialDiskInfo(initialDiskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改磁盘监控信息
|
||||
*
|
||||
* @param initialDiskInfo 磁盘监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialDiskInfo(InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
initialDiskInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialDiskInfoMapper.updateInitialDiskInfo(initialDiskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除磁盘监控信息
|
||||
*
|
||||
* @param ids 需要删除的磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDiskInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialDiskInfoMapper.deleteInitialDiskInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除磁盘监控信息信息
|
||||
*
|
||||
* @param id 磁盘监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDiskInfoById(Long id)
|
||||
{
|
||||
return initialDiskInfoMapper.deleteInitialDiskInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增磁盘监控信息
|
||||
*
|
||||
* @param list 磁盘监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialDiskInfo(List<InitialDiskInfo> list) {
|
||||
try {
|
||||
return initialDiskInfoMapper.batchInsertInitialDiskInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入磁盘信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialDockerInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialDockerInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialDockerInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialDockerInfoServiceImpl implements IInitialDockerInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialDockerInfoMapper initialDockerInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询容器监控信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialDockerInfo selectInitialDockerInfoById(Long id)
|
||||
{
|
||||
return initialDockerInfoMapper.selectInitialDockerInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询容器监控信息列表
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 容器监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialDockerInfo> selectInitialDockerInfoList(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
return initialDockerInfoMapper.selectInitialDockerInfoList(initialDockerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialDockerInfo(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
initialDockerInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialDockerInfoMapper.insertInitialDockerInfo(initialDockerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialDockerInfo(InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
initialDockerInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialDockerInfoMapper.updateInitialDockerInfo(initialDockerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除容器监控信息
|
||||
*
|
||||
* @param ids 需要删除的容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDockerInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialDockerInfoMapper.deleteInitialDockerInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除容器监控信息信息
|
||||
*
|
||||
* @param id 容器监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialDockerInfoById(Long id)
|
||||
{
|
||||
return initialDockerInfoMapper.deleteInitialDockerInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增容器监控信息
|
||||
*
|
||||
* @param initialDockerInfo 容器监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialDockerInfo(List<InitialDockerInfo> initialDockerInfo){
|
||||
try {
|
||||
return initialDockerInfoMapper.batchInsertInitialDockerInfo(initialDockerInfo);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入Docker信息失败,失败数量:{}", initialDockerInfo.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialMemoryInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialMemoryInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialMemoryInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 内存监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialMemoryInfoServiceImpl implements IInitialMemoryInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialMemoryInfoMapper initialMemoryInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询内存监控信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialMemoryInfo selectInitialMemoryInfoById(Long id)
|
||||
{
|
||||
return initialMemoryInfoMapper.selectInitialMemoryInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询内存监控信息列表
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 内存监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialMemoryInfo> selectInitialMemoryInfoList(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
return initialMemoryInfoMapper.selectInitialMemoryInfoList(initialMemoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
initialMemoryInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialMemoryInfoMapper.insertInitialMemoryInfo(initialMemoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改内存监控信息
|
||||
*
|
||||
* @param initialMemoryInfo 内存监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialMemoryInfo(InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
initialMemoryInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialMemoryInfoMapper.updateInitialMemoryInfo(initialMemoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除内存监控信息
|
||||
*
|
||||
* @param ids 需要删除的内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMemoryInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialMemoryInfoMapper.deleteInitialMemoryInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除内存监控信息信息
|
||||
*
|
||||
* @param id 内存监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMemoryInfoById(Long id)
|
||||
{
|
||||
return initialMemoryInfoMapper.deleteInitialMemoryInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增内存监控信息
|
||||
*
|
||||
* @param list 内存监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialMemoryInfo(List<InitialMemoryInfo> list) {
|
||||
try {
|
||||
return initialMemoryInfoMapper.batchInsertInitialMemoryInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入内存信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialMountPointInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialMountPointInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialMountPointInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialMountPointInfoServiceImpl implements IInitialMountPointInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialMountPointInfoMapper initialMountPointInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialMountPointInfo selectInitialMountPointInfoById(Long id)
|
||||
{
|
||||
return initialMountPointInfoMapper.selectInitialMountPointInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询挂载点监控信息列表
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 挂载点监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialMountPointInfo> selectInitialMountPointInfoList(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
return initialMountPointInfoMapper.selectInitialMountPointInfoList(initialMountPointInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
initialMountPointInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialMountPointInfoMapper.insertInitialMountPointInfo(initialMountPointInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改挂载点监控信息
|
||||
*
|
||||
* @param initialMountPointInfo 挂载点监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialMountPointInfo(InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
initialMountPointInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialMountPointInfoMapper.updateInitialMountPointInfo(initialMountPointInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除挂载点监控信息
|
||||
*
|
||||
* @param ids 需要删除的挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMountPointInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialMountPointInfoMapper.deleteInitialMountPointInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除挂载点监控信息信息
|
||||
*
|
||||
* @param id 挂载点监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialMountPointInfoById(Long id)
|
||||
{
|
||||
return initialMountPointInfoMapper.deleteInitialMountPointInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增挂载点监控信息
|
||||
*
|
||||
* @param list 挂载点监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialMountPointInfo(List<InitialMountPointInfo> list) {
|
||||
try {
|
||||
return initialMountPointInfoMapper.batchInsertInitialMountPointInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入挂载点信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialSwitchInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机流量监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialSwitchInfoServiceImpl implements IInitialSwitchInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialSwitchInfoMapper initialSwitchInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialSwitchInfo selectInitialSwitchInfoById(Long id)
|
||||
{
|
||||
return initialSwitchInfoMapper.selectInitialSwitchInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交换机流量监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 交换机流量监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSwitchInfo> selectInitialSwitchInfoList(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
return initialSwitchInfoMapper.selectInitialSwitchInfoList(initialSwitchInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
initialSwitchInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoMapper.insertInitialSwitchInfo(initialSwitchInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机流量监控信息
|
||||
*
|
||||
* @param initialSwitchInfo 交换机流量监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialSwitchInfo(InitialSwitchInfo initialSwitchInfo)
|
||||
{
|
||||
initialSwitchInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoMapper.updateInitialSwitchInfo(initialSwitchInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交换机流量监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialSwitchInfoMapper.deleteInitialSwitchInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机流量监控信息信息
|
||||
*
|
||||
* @param id 交换机流量监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoById(Long id)
|
||||
{
|
||||
return initialSwitchInfoMapper.deleteInitialSwitchInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialSwitchInfo(List<InitialSwitchInfo> list) {
|
||||
try {
|
||||
return initialSwitchInfoMapper.batchInsertInitialSwitchInfo(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入交换机信息失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfo;
|
||||
import com.ruoyi.rocketmq.domain.InitialSwitchInfoTemp;
|
||||
import com.ruoyi.rocketmq.mapper.InitialSwitchInfoTempMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialSwitchInfoTempService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialSwitchInfoTempServiceImpl implements IInitialSwitchInfoTempService
|
||||
{
|
||||
@Autowired
|
||||
private InitialSwitchInfoTempMapper initialSwitchInfoTempMapper;
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialSwitchInfoTemp selectInitialSwitchInfoTempById(Long id)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.selectInitialSwitchInfoTempById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交换机监控信息列表
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 交换机监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSwitchInfoTemp> selectInitialSwitchInfoTempList(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.selectInitialSwitchInfoTempList(initialSwitchInfoTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
initialSwitchInfoTemp.setCreateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoTempMapper.insertInitialSwitchInfoTemp(initialSwitchInfoTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改交换机监控信息
|
||||
*
|
||||
* @param initialSwitchInfoTemp 交换机监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialSwitchInfoTemp(InitialSwitchInfoTemp initialSwitchInfoTemp)
|
||||
{
|
||||
initialSwitchInfoTemp.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialSwitchInfoTempMapper.updateInitialSwitchInfoTemp(initialSwitchInfoTemp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除交换机监控信息
|
||||
*
|
||||
* @param ids 需要删除的交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoTempByIds(Long[] ids)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.deleteInitialSwitchInfoTempByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除交换机监控信息信息
|
||||
*
|
||||
* @param id 交换机监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSwitchInfoTempById(Long id)
|
||||
{
|
||||
return initialSwitchInfoTempMapper.deleteInitialSwitchInfoTempById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增交换机流量监控信息
|
||||
*
|
||||
* @param list 交换机流量监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int batchInsertInitialSwitchInfoTemp(List<InitialSwitchInfo> list) {
|
||||
try {
|
||||
return initialSwitchInfoTempMapper.batchInsertInitialSwitchInfoTemp(list);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入交换机信息临时表失败,失败数量:{}", list.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void truncateSwitchInfoTemp() {
|
||||
initialSwitchInfoTempMapper.truncateSwitchInfoTemp();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.InitialSystemInfo;
|
||||
import com.ruoyi.rocketmq.mapper.InitialSystemInfoMapper;
|
||||
import com.ruoyi.rocketmq.service.IInitialSystemInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统监控信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class InitialSystemInfoServiceImpl implements IInitialSystemInfoService
|
||||
{
|
||||
@Autowired
|
||||
private InitialSystemInfoMapper initialSystemInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询系统监控信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
@Override
|
||||
public InitialSystemInfo selectInitialSystemInfoById(Long id)
|
||||
{
|
||||
return initialSystemInfoMapper.selectInitialSystemInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统监控信息列表
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 系统监控信息
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSystemInfo> selectInitialSystemInfoList(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
return initialSystemInfoMapper.selectInitialSystemInfoList(initialSystemInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertInitialSystemInfo(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
initialSystemInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return initialSystemInfoMapper.insertInitialSystemInfo(initialSystemInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInitialSystemInfo(InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
initialSystemInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return initialSystemInfoMapper.updateInitialSystemInfo(initialSystemInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除系统监控信息
|
||||
*
|
||||
* @param ids 需要删除的系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSystemInfoByIds(Long[] ids)
|
||||
{
|
||||
return initialSystemInfoMapper.deleteInitialSystemInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统监控信息信息
|
||||
*
|
||||
* @param id 系统监控信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteInitialSystemInfoById(Long id)
|
||||
{
|
||||
return initialSystemInfoMapper.deleteInitialSystemInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增系统监控信息
|
||||
*
|
||||
* @param initialSystemInfo 系统监控信息集合
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int batchInsertInitialSystemInfo(List<InitialSystemInfo> initialSystemInfo)
|
||||
{
|
||||
try {
|
||||
return initialSystemInfoMapper.batchInsertInitialSystemInfo(initialSystemInfo);
|
||||
}catch (Exception e){
|
||||
log.error("批量插入挂载点信息失败,失败数量:{}", initialSystemInfo.size(), e);
|
||||
throw new RuntimeException("批量保存失败",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ruoyi.rocketmq.utils;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class JsonDataParser {
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
/**
|
||||
* 通用JSON解析方法(兼容对象和数组)
|
||||
* @param jsonStr JSON字符串
|
||||
* @param valueType 目标实体类类型
|
||||
* @return 实体类List集合
|
||||
*/
|
||||
public static <T> List<T> parseJsonData(String jsonStr, Class<T> valueType) {
|
||||
if (!StringUtils.hasText(jsonStr)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
try {
|
||||
JsonNode rootNode = objectMapper.readTree(jsonStr);
|
||||
|
||||
if (rootNode.isArray()) {
|
||||
// 处理数组格式JSON
|
||||
return objectMapper.readValue(jsonStr,
|
||||
objectMapper.getTypeFactory().constructCollectionType(List.class, valueType));
|
||||
} else {
|
||||
// 处理单个对象格式JSON
|
||||
List<T> result = new ArrayList<>(1);
|
||||
result.add(objectMapper.readValue(jsonStr, valueType));
|
||||
return result;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("JSON解析失败: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialCpuInfoMapper">
|
||||
|
||||
<resultMap type="InitialCpuInfo" id="InitialCpuInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="avg1" column="avg1" />
|
||||
<result property="avg5" column="avg5" />
|
||||
<result property="avg15" column="avg15" />
|
||||
<result property="interrupt" column="interrupt" />
|
||||
<result property="uti" column="uti" />
|
||||
<result property="num" column="num" />
|
||||
<result property="normal" column="normal" />
|
||||
<result property="idle" column="idle" />
|
||||
<result property="iowait" column="iowait" />
|
||||
<result property="system" column="system" />
|
||||
<result property="noresp" column="noresp" />
|
||||
<result property="user" column="user" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialCpuInfoVo">
|
||||
select id, client_id, avg1, avg5, avg15, interrupt, uti, num, normal, idle, iowait, system, noresp, user, create_by, update_by, create_time, update_time from initial_cpu_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialCpuInfoList" parameterType="InitialCpuInfo" resultMap="InitialCpuInfoResult">
|
||||
<include refid="selectInitialCpuInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="avg1 != null "> and avg1 = #{avg1}</if>
|
||||
<if test="avg5 != null "> and avg5 = #{avg5}</if>
|
||||
<if test="avg15 != null "> and avg15 = #{avg15}</if>
|
||||
<if test="interrupt != null "> and interrupt = #{interrupt}</if>
|
||||
<if test="uti != null "> and uti = #{uti}</if>
|
||||
<if test="num != null "> and num = #{num}</if>
|
||||
<if test="normal != null "> and normal = #{normal}</if>
|
||||
<if test="idle != null "> and idle = #{idle}</if>
|
||||
<if test="iowait != null "> and iowait = #{iowait}</if>
|
||||
<if test="system != null "> and system = #{system}</if>
|
||||
<if test="noresp != null "> and noresp = #{noresp}</if>
|
||||
<if test="user != null "> and user = #{user}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialCpuInfoById" parameterType="Long" resultMap="InitialCpuInfoResult">
|
||||
<include refid="selectInitialCpuInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialCpuInfo" parameterType="InitialCpuInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_cpu_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="avg1 != null">avg1,</if>
|
||||
<if test="avg5 != null">avg5,</if>
|
||||
<if test="avg15 != null">avg15,</if>
|
||||
<if test="interrupt != null">interrupt,</if>
|
||||
<if test="uti != null">uti,</if>
|
||||
<if test="num != null">num,</if>
|
||||
<if test="normal != null">normal,</if>
|
||||
<if test="idle != null">idle,</if>
|
||||
<if test="iowait != null">iowait,</if>
|
||||
<if test="system != null">system,</if>
|
||||
<if test="noresp != null">noresp,</if>
|
||||
<if test="user != null">user,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="avg1 != null">#{avg1},</if>
|
||||
<if test="avg5 != null">#{avg5},</if>
|
||||
<if test="avg15 != null">#{avg15},</if>
|
||||
<if test="interrupt != null">#{interrupt},</if>
|
||||
<if test="uti != null">#{uti},</if>
|
||||
<if test="num != null">#{num},</if>
|
||||
<if test="normal != null">#{normal},</if>
|
||||
<if test="idle != null">#{idle},</if>
|
||||
<if test="iowait != null">#{iowait},</if>
|
||||
<if test="system != null">#{system},</if>
|
||||
<if test="noresp != null">#{noresp},</if>
|
||||
<if test="user != null">#{user},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialCpuInfo" parameterType="InitialCpuInfo">
|
||||
update initial_cpu_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="avg1 != null">avg1 = #{avg1},</if>
|
||||
<if test="avg5 != null">avg5 = #{avg5},</if>
|
||||
<if test="avg15 != null">avg15 = #{avg15},</if>
|
||||
<if test="interrupt != null">interrupt = #{interrupt},</if>
|
||||
<if test="uti != null">uti = #{uti},</if>
|
||||
<if test="num != null">num = #{num},</if>
|
||||
<if test="normal != null">normal = #{normal},</if>
|
||||
<if test="idle != null">idle = #{idle},</if>
|
||||
<if test="iowait != null">iowait = #{iowait},</if>
|
||||
<if test="system != null">system = #{system},</if>
|
||||
<if test="noresp != null">noresp = #{noresp},</if>
|
||||
<if test="user != null">user = #{user},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialCpuInfoById" parameterType="Long">
|
||||
delete from initial_cpu_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialCpuInfoByIds" parameterType="String">
|
||||
delete from initial_cpu_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialCpuInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_cpu_info
|
||||
(
|
||||
client_id,
|
||||
avg1,
|
||||
avg5,
|
||||
avg15,
|
||||
interrupt,
|
||||
uti,
|
||||
num,
|
||||
normal,
|
||||
idle,
|
||||
iowait,
|
||||
`system`,
|
||||
noresp,
|
||||
`user`,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.avg1},
|
||||
#{item.avg5},
|
||||
#{item.avg15},
|
||||
#{item.interrupt},
|
||||
#{item.uti},
|
||||
#{item.num},
|
||||
#{item.normal},
|
||||
#{item.idle},
|
||||
#{item.iowait},
|
||||
#{item.system},
|
||||
#{item.noresp},
|
||||
#{item.user},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialDiskInfoMapper">
|
||||
|
||||
<resultMap type="InitialDiskInfo" id="InitialDiskInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="serial" column="serial" />
|
||||
<result property="total" column="total" />
|
||||
<result property="writeSpeed" column="write_speed" />
|
||||
<result property="readSpeed" column="read_speed" />
|
||||
<result property="writeTimes" column="write_times" />
|
||||
<result property="readTimes" column="read_times" />
|
||||
<result property="writeBytes" column="write_bytes" />
|
||||
<result property="readBytes" column="read_bytes" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialDiskInfoVo">
|
||||
select id, client_id, name, serial, total, write_speed, read_speed, write_times, read_times, write_bytes, read_bytes, create_by, update_by, create_time, update_time from initial_disk_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialDiskInfoList" parameterType="InitialDiskInfo" resultMap="InitialDiskInfoResult">
|
||||
<include refid="selectInitialDiskInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="serial != null and serial != ''"> and serial = #{serial}</if>
|
||||
<if test="total != null "> and total = #{total}</if>
|
||||
<if test="writeSpeed != null "> and write_speed = #{writeSpeed}</if>
|
||||
<if test="readSpeed != null "> and read_speed = #{readSpeed}</if>
|
||||
<if test="writeTimes != null "> and write_times = #{writeTimes}</if>
|
||||
<if test="readTimes != null "> and read_times = #{readTimes}</if>
|
||||
<if test="writeBytes != null "> and write_bytes = #{writeBytes}</if>
|
||||
<if test="readBytes != null "> and read_bytes = #{readBytes}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialDiskInfoById" parameterType="Long" resultMap="InitialDiskInfoResult">
|
||||
<include refid="selectInitialDiskInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialDiskInfo" parameterType="InitialDiskInfo">
|
||||
insert into initial_disk_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="serial != null">serial,</if>
|
||||
<if test="total != null">total,</if>
|
||||
<if test="writeSpeed != null">write_speed,</if>
|
||||
<if test="readSpeed != null">read_speed,</if>
|
||||
<if test="writeTimes != null">write_times,</if>
|
||||
<if test="readTimes != null">read_times,</if>
|
||||
<if test="writeBytes != null">write_bytes,</if>
|
||||
<if test="readBytes != null">read_bytes,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="serial != null">#{serial},</if>
|
||||
<if test="total != null">#{total},</if>
|
||||
<if test="writeSpeed != null">#{writeSpeed},</if>
|
||||
<if test="readSpeed != null">#{readSpeed},</if>
|
||||
<if test="writeTimes != null">#{writeTimes},</if>
|
||||
<if test="readTimes != null">#{readTimes},</if>
|
||||
<if test="writeBytes != null">#{writeBytes},</if>
|
||||
<if test="readBytes != null">#{readBytes},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialDiskInfo" parameterType="InitialDiskInfo">
|
||||
update initial_disk_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="serial != null">serial = #{serial},</if>
|
||||
<if test="total != null">total = #{total},</if>
|
||||
<if test="writeSpeed != null">write_speed = #{writeSpeed},</if>
|
||||
<if test="readSpeed != null">read_speed = #{readSpeed},</if>
|
||||
<if test="writeTimes != null">write_times = #{writeTimes},</if>
|
||||
<if test="readTimes != null">read_times = #{readTimes},</if>
|
||||
<if test="writeBytes != null">write_bytes = #{writeBytes},</if>
|
||||
<if test="readBytes != null">read_bytes = #{readBytes},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialDiskInfoById" parameterType="Long">
|
||||
delete from initial_disk_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialDiskInfoByIds" parameterType="String">
|
||||
delete from initial_disk_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialDiskInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_disk_info
|
||||
(
|
||||
id,
|
||||
client_id,
|
||||
`name`,
|
||||
serial,
|
||||
total,
|
||||
write_speed,
|
||||
read_speed,
|
||||
write_times,
|
||||
read_times,
|
||||
write_bytes,
|
||||
read_bytes,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.clientId},
|
||||
#{item.name},
|
||||
#{item.serial},
|
||||
#{item.total},
|
||||
#{item.writeSpeed},
|
||||
#{item.readSpeed},
|
||||
#{item.writeTimes},
|
||||
#{item.readTimes},
|
||||
#{item.writeBytes},
|
||||
#{item.readBytes},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,155 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialDockerInfoMapper">
|
||||
|
||||
<resultMap type="InitialDockerInfo" id="InitialDockerInfoResult">
|
||||
<result property="autoId" column="auto_id" />
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="cpuUtil" column="cpu_util" />
|
||||
<result property="memUtil" column="mem_util" />
|
||||
<result property="netInSpeed" column="net_in_speed" />
|
||||
<result property="netOutSpeed" column="net_out_speed" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<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="selectInitialDockerInfoVo">
|
||||
select auto_id, id, name, status, cpu_util, mem_util, net_in_speed, net_out_speed, client_id, create_time, update_time, create_by, update_by from initial_docker_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialDockerInfoList" parameterType="InitialDockerInfo" resultMap="InitialDockerInfoResult">
|
||||
<include refid="selectInitialDockerInfoVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="cpuUtil != null and cpuUtil != ''"> and cpu_util = #{cpuUtil}</if>
|
||||
<if test="memUtil != null and memUtil != ''"> and mem_util = #{memUtil}</if>
|
||||
<if test="netInSpeed != null and netInSpeed != ''"> and net_in_speed = #{netInSpeed}</if>
|
||||
<if test="netOutSpeed != null and netOutSpeed != ''"> and net_out_speed = #{netOutSpeed}</if>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialDockerInfoById" parameterType="Long" resultMap="InitialDockerInfoResult">
|
||||
<include refid="selectInitialDockerInfoVo"/>
|
||||
where auto_id = #{autoId}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialDockerInfo" parameterType="InitialDockerInfo" useGeneratedKeys="true" keyProperty="auto_id">
|
||||
insert into initial_docker_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="cpuUtil != null">cpu_util,</if>
|
||||
<if test="memUtil != null">mem_util,</if>
|
||||
<if test="netInSpeed != null">net_in_speed,</if>
|
||||
<if test="netOutSpeed != null">net_out_speed,</if>
|
||||
<if test="clientId != null">client_id,</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="id != null and id != ''">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="cpuUtil != null">#{cpuUtil},</if>
|
||||
<if test="memUtil != null">#{memUtil},</if>
|
||||
<if test="netInSpeed != null">#{netInSpeed},</if>
|
||||
<if test="netOutSpeed != null">#{netOutSpeed},</if>
|
||||
<if test="clientId != null">#{clientId},</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="updateInitialDockerInfo" parameterType="InitialDockerInfo">
|
||||
update initial_docker_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id = #{id},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="cpuUtil != null">cpu_util = #{cpuUtil},</if>
|
||||
<if test="memUtil != null">mem_util = #{memUtil},</if>
|
||||
<if test="netInSpeed != null">net_in_speed = #{netInSpeed},</if>
|
||||
<if test="netOutSpeed != null">net_out_speed = #{netOutSpeed},</if>
|
||||
<if test="clientId != null">client_id = #{clientId},</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="deleteInitialDockerInfoById" parameterType="Long">
|
||||
delete from initial_docker_info where auto_id = #{autoId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialDockerInfoByIds" parameterType="String">
|
||||
delete from initial_docker_info where auto_id in
|
||||
<foreach item="autoId" collection="array" open="(" separator="," close=")">
|
||||
#{autoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialDockerInfo" parameterType="java.util.List">
|
||||
INSERT INTO initial_docker_info
|
||||
(
|
||||
`id`,
|
||||
`name`,
|
||||
status,
|
||||
cpu_util,
|
||||
mem_util,
|
||||
net_in_speed,
|
||||
net_out_speed,
|
||||
client_id,
|
||||
create_time,
|
||||
update_time,
|
||||
create_by,
|
||||
update_by
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.id},
|
||||
#{item.name},
|
||||
#{item.status},
|
||||
#{item.cpuUtil},
|
||||
#{item.memUtil},
|
||||
#{item.netInSpeed},
|
||||
#{item.netOutSpeed},
|
||||
#{item.clientId},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
#{item.createBy},
|
||||
#{item.updateBy}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialMemoryInfoMapper">
|
||||
|
||||
<resultMap type="InitialMemoryInfo" id="InitialMemoryInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="swapSizeFree" column="swap_size_free" />
|
||||
<result property="untilzation" column="untilzation" />
|
||||
<result property="swapSizePercent" column="swap_size_percent" />
|
||||
<result property="available" column="available" />
|
||||
<result property="percent" column="percent" />
|
||||
<result property="total" column="total" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialMemoryInfoVo">
|
||||
select id, client_id, swap_size_free, untilzation, swap_size_percent, available, percent, total, create_by, update_by, create_time, update_time from initial_memory_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialMemoryInfoList" parameterType="InitialMemoryInfo" resultMap="InitialMemoryInfoResult">
|
||||
<include refid="selectInitialMemoryInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="swapSizeFree != null "> and swap_size_free = #{swapSizeFree}</if>
|
||||
<if test="untilzation != null "> and untilzation = #{untilzation}</if>
|
||||
<if test="swapSizePercent != null "> and swap_size_percent = #{swapSizePercent}</if>
|
||||
<if test="available != null "> and available = #{available}</if>
|
||||
<if test="percent != null "> and percent = #{percent}</if>
|
||||
<if test="total != null "> and total = #{total}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialMemoryInfoById" parameterType="Long" resultMap="InitialMemoryInfoResult">
|
||||
<include refid="selectInitialMemoryInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialMemoryInfo" parameterType="InitialMemoryInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_memory_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="swapSizeFree != null">swap_size_free,</if>
|
||||
<if test="untilzation != null">untilzation,</if>
|
||||
<if test="swapSizePercent != null">swap_size_percent,</if>
|
||||
<if test="available != null">available,</if>
|
||||
<if test="percent != null">percent,</if>
|
||||
<if test="total != null">total,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="swapSizeFree != null">#{swapSizeFree},</if>
|
||||
<if test="untilzation != null">#{untilzation},</if>
|
||||
<if test="swapSizePercent != null">#{swapSizePercent},</if>
|
||||
<if test="available != null">#{available},</if>
|
||||
<if test="percent != null">#{percent},</if>
|
||||
<if test="total != null">#{total},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialMemoryInfo" parameterType="InitialMemoryInfo">
|
||||
update initial_memory_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="swapSizeFree != null">swap_size_free = #{swapSizeFree},</if>
|
||||
<if test="untilzation != null">untilzation = #{untilzation},</if>
|
||||
<if test="swapSizePercent != null">swap_size_percent = #{swapSizePercent},</if>
|
||||
<if test="available != null">available = #{available},</if>
|
||||
<if test="percent != null">percent = #{percent},</if>
|
||||
<if test="total != null">total = #{total},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialMemoryInfoById" parameterType="Long">
|
||||
delete from initial_memory_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialMemoryInfoByIds" parameterType="String">
|
||||
delete from initial_memory_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialMemoryInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_memory_info
|
||||
(
|
||||
client_id,
|
||||
swap_size_free,
|
||||
untilzation,
|
||||
swap_size_percent,
|
||||
available,
|
||||
percent,
|
||||
total,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.swapSizeFree},
|
||||
#{item.untilzation},
|
||||
#{item.swapSizePercent},
|
||||
#{item.available},
|
||||
#{item.percent},
|
||||
#{item.total},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialMountPointInfoMapper">
|
||||
|
||||
<resultMap type="InitialMountPointInfo" id="InitialMountPointInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="mount" column="mount" />
|
||||
<result property="vfsType" column="vfs_type" />
|
||||
<result property="vfsFree" column="vfs_free" />
|
||||
<result property="vfsTotal" column="vfs_total" />
|
||||
<result property="vfsUtil" column="vfs_util" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialMountPointInfoVo">
|
||||
select id, client_id, mount, vfs_type, vfs_free, vfs_total, vfs_util, create_by, update_by, create_time, update_time from initial_mount_point_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialMountPointInfoList" parameterType="InitialMountPointInfo" resultMap="InitialMountPointInfoResult">
|
||||
<include refid="selectInitialMountPointInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="mount != null and mount != ''"> and mount = #{mount}</if>
|
||||
<if test="vfsType != null and vfsType != ''"> and vfs_type = #{vfsType}</if>
|
||||
<if test="vfsFree != null "> and vfs_free = #{vfsFree}</if>
|
||||
<if test="vfsTotal != null "> and vfs_total = #{vfsTotal}</if>
|
||||
<if test="vfsUtil != null "> and vfs_util = #{vfsUtil}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialMountPointInfoById" parameterType="Long" resultMap="InitialMountPointInfoResult">
|
||||
<include refid="selectInitialMountPointInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialMountPointInfo" parameterType="InitialMountPointInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_mount_point_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="mount != null and mount != ''">mount,</if>
|
||||
<if test="vfsType != null">vfs_type,</if>
|
||||
<if test="vfsFree != null">vfs_free,</if>
|
||||
<if test="vfsTotal != null">vfs_total,</if>
|
||||
<if test="vfsUtil != null">vfs_util,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="mount != null and mount != ''">#{mount},</if>
|
||||
<if test="vfsType != null">#{vfsType},</if>
|
||||
<if test="vfsFree != null">#{vfsFree},</if>
|
||||
<if test="vfsTotal != null">#{vfsTotal},</if>
|
||||
<if test="vfsUtil != null">#{vfsUtil},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialMountPointInfo" parameterType="InitialMountPointInfo">
|
||||
update initial_mount_point_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="mount != null and mount != ''">mount = #{mount},</if>
|
||||
<if test="vfsType != null">vfs_type = #{vfsType},</if>
|
||||
<if test="vfsFree != null">vfs_free = #{vfsFree},</if>
|
||||
<if test="vfsTotal != null">vfs_total = #{vfsTotal},</if>
|
||||
<if test="vfsUtil != null">vfs_util = #{vfsUtil},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialMountPointInfoById" parameterType="Long">
|
||||
delete from initial_mount_point_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialMountPointInfoByIds" parameterType="String">
|
||||
delete from initial_mount_point_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialMountPointInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_mount_point_info
|
||||
(
|
||||
client_id,
|
||||
mount,
|
||||
vfs_type,
|
||||
vfs_free,
|
||||
vfs_total,
|
||||
vfs_util,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.mount},
|
||||
#{item.vfsType},
|
||||
#{item.vfsFree},
|
||||
#{item.vfsTotal},
|
||||
#{item.vfsUtil},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,150 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialSwitchInfoMapper">
|
||||
|
||||
<resultMap type="InitialSwitchInfo" id="InitialSwitchInfoResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="clientId" column="client_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="inBytes" column="in_bytes"/>
|
||||
<result property="outBytes" column="out_bytes"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="inSpeed" column="in_speed"/>
|
||||
<result property="outSpeed" column="out_speed"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoVo">
|
||||
SELECT
|
||||
id, client_id, `name`, in_bytes, out_bytes, status, `type`,
|
||||
in_speed, out_speed, create_by, update_by, create_time, update_time
|
||||
FROM initial_switch_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoList" parameterType="InitialSwitchInfo" resultMap="InitialSwitchInfoResult">
|
||||
<include refid="selectInitialSwitchInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''">
|
||||
AND client_id = #{clientId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND name LIKE CONCAT('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''">
|
||||
AND create_time >= #{params.beginTime}
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''">
|
||||
AND create_time <= #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSwitchInfoById" parameterType="Long" resultMap="InitialSwitchInfoResult">
|
||||
<include refid="selectInitialSwitchInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialSwitchInfo" parameterType="InitialSwitchInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_switch_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
client_id,
|
||||
<if test="name != null">name,</if>
|
||||
<if test="inBytes != null">in_bytes,</if>
|
||||
<if test="outBytes != null">out_bytes,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSeppd != null">out_speed,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
create_time,
|
||||
update_time
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
#{clientId},
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="inBytes != null">#{inBytes},</if>
|
||||
<if test="outBytes != null">#{outBytes},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSeppd != null">#{outSpeed},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
NOW(),
|
||||
NOW()
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialSwitchInfo" parameterType="InitialSwitchInfo">
|
||||
UPDATE initial_switch_info
|
||||
<set>
|
||||
<if test="clientId != null">client_id = #{clientId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="inBytes != null">in_bytes = #{inBytes},</if>
|
||||
<if test="outBytes != null">out_bytes = #{outBytes},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed}</if>
|
||||
<if test="outSeppd != null">out_speed = #{outSpeed}</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoById" parameterType="Long">
|
||||
delete from initial_switch_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoByIds" parameterType="String">
|
||||
delete from initial_switch_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertInitialSwitchInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_switch_info
|
||||
(
|
||||
client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed,
|
||||
create_by, update_by, create_time, update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId}, #{item.name}, #{item.inBytes}, #{item.outBytes},
|
||||
#{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.createBy}, #{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,140 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialSwitchInfoTempMapper">
|
||||
|
||||
<resultMap type="InitialSwitchInfoTemp" id="InitialSwitchInfoTempResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="inBytes" column="in_bytes" />
|
||||
<result property="outBytes" column="out_bytes" />
|
||||
<result property="status" column="status" />
|
||||
<result property="type" column="type" />
|
||||
<result property="inSpeed" column="in_speed" />
|
||||
<result property="outSpeed" column="out_speed" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoTempVo">
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, create_by, update_by, create_time, update_time from initial_switch_info_temp
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoTempList" parameterType="InitialSwitchInfoTemp" resultMap="InitialSwitchInfoTempResult">
|
||||
<include refid="selectInitialSwitchInfoTempVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="inBytes != null "> and in_bytes = #{inBytes}</if>
|
||||
<if test="outBytes != null "> and out_bytes = #{outBytes}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="inSpeed != null "> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null "> and out_speed = #{outSpeed}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSwitchInfoTempById" parameterType="Long" resultMap="InitialSwitchInfoTempResult">
|
||||
<include refid="selectInitialSwitchInfoTempVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialSwitchInfoTemp" parameterType="InitialSwitchInfoTemp" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_switch_info_temp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="inBytes != null">in_bytes,</if>
|
||||
<if test="outBytes != null">out_bytes,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSpeed != null">out_speed,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="inBytes != null">#{inBytes},</if>
|
||||
<if test="outBytes != null">#{outBytes},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSpeed != null">#{outSpeed},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialSwitchInfoTemp" parameterType="InitialSwitchInfoTemp">
|
||||
update initial_switch_info_temp
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="inBytes != null">in_bytes = #{inBytes},</if>
|
||||
<if test="outBytes != null">out_bytes = #{outBytes},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
|
||||
<if test="outSpeed != null">out_speed = #{outSpeed},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoTempById" parameterType="Long">
|
||||
delete from initial_switch_info_temp where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialSwitchInfoTempByIds" parameterType="String">
|
||||
delete from initial_switch_info_temp where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<insert id="batchInsertInitialSwitchInfoTemp" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_switch_info_temp
|
||||
(
|
||||
client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed,
|
||||
create_by, update_by, create_time, update_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId}, #{item.name}, #{item.inBytes}, #{item.outBytes},
|
||||
#{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.createBy}, #{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="truncateSwitchInfoTemp">
|
||||
truncate table initial_switch_info_temp
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,197 @@
|
||||
<?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.ruoyi.rocketmq.mapper.InitialSystemInfoMapper">
|
||||
|
||||
<resultMap type="InitialSystemInfo" id="InitialSystemInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="os" column="os" />
|
||||
<result property="arch" column="arch" />
|
||||
<result property="maxProc" column="max_proc" />
|
||||
<result property="runProcNum" column="run_proc_num" />
|
||||
<result property="usersNum" column="users_num" />
|
||||
<result property="diskSizeTotal" column="disk_size_total" />
|
||||
<result property="bootTime" column="boot_time" />
|
||||
<result property="uname" column="uname" />
|
||||
<result property="localTime" column="local_time" />
|
||||
<result property="upTime" column="up_time" />
|
||||
<result property="procNum" column="proc_num" />
|
||||
<result property="timeStamp" column="time_stamp" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="uuid" column="uuid" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSystemInfoVo">
|
||||
select id, client_id, os, arch, max_proc, run_proc_num, users_num, disk_size_total, boot_time, uname, local_time, up_time, proc_num, time_stamp, create_by, update_by, create_time, update_time, uuid from initial_system_info
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSystemInfoList" parameterType="InitialSystemInfo" resultMap="InitialSystemInfoResult">
|
||||
<include refid="selectInitialSystemInfoVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="os != null and os != ''"> and os = #{os}</if>
|
||||
<if test="arch != null and arch != ''"> and arch = #{arch}</if>
|
||||
<if test="maxProc != null "> and max_proc = #{maxProc}</if>
|
||||
<if test="runProcNum != null "> and run_proc_num = #{runProcNum}</if>
|
||||
<if test="usersNum != null "> and users_num = #{usersNum}</if>
|
||||
<if test="diskSizeTotal != null "> and disk_size_total = #{diskSizeTotal}</if>
|
||||
<if test="bootTime != null "> and boot_time = #{bootTime}</if>
|
||||
<if test="uname != null and uname != ''"> and uname like concat('%', #{uname}, '%')</if>
|
||||
<if test="localTime != null and localTime != ''"> and local_time = #{localTime}</if>
|
||||
<if test="upTime != null "> and up_time = #{upTime}</if>
|
||||
<if test="procNum != null "> and proc_num = #{procNum}</if>
|
||||
<if test="timeStamp != null "> and time_stamp = #{timeStamp}</if>
|
||||
<if test="uuid != null "> and uuid = #{uuid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSystemInfoById" parameterType="Long" resultMap="InitialSystemInfoResult">
|
||||
<include refid="selectInitialSystemInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertInitialSystemInfo" parameterType="InitialSystemInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into initial_system_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id,</if>
|
||||
<if test="os != null">os,</if>
|
||||
<if test="arch != null">arch,</if>
|
||||
<if test="maxProc != null">max_proc,</if>
|
||||
<if test="runProcNum != null">run_proc_num,</if>
|
||||
<if test="usersNum != null">users_num,</if>
|
||||
<if test="diskSizeTotal != null">disk_size_total,</if>
|
||||
<if test="bootTime != null">boot_time,</if>
|
||||
<if test="uname != null">uname,</if>
|
||||
<if test="localTime != null">local_time,</if>
|
||||
<if test="upTime != null">up_time,</if>
|
||||
<if test="procNum != null">proc_num,</if>
|
||||
<if test="timeStamp != null">time_stamp,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="uuid != null">uuid,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">#{clientId},</if>
|
||||
<if test="os != null">#{os},</if>
|
||||
<if test="arch != null">#{arch},</if>
|
||||
<if test="maxProc != null">#{maxProc},</if>
|
||||
<if test="runProcNum != null">#{runProcNum},</if>
|
||||
<if test="usersNum != null">#{usersNum},</if>
|
||||
<if test="diskSizeTotal != null">#{diskSizeTotal},</if>
|
||||
<if test="bootTime != null">#{bootTime},</if>
|
||||
<if test="uname != null">#{uname},</if>
|
||||
<if test="localTime != null">#{localTime},</if>
|
||||
<if test="upTime != null">#{upTime},</if>
|
||||
<if test="procNum != null">#{procNum},</if>
|
||||
<if test="timeStamp != null">#{timeStamp},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="uuid != null">#{uuid},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateInitialSystemInfo" parameterType="InitialSystemInfo">
|
||||
update initial_system_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
|
||||
<if test="os != null">os = #{os},</if>
|
||||
<if test="arch != null">arch = #{arch},</if>
|
||||
<if test="maxProc != null">max_proc = #{maxProc},</if>
|
||||
<if test="runProcNum != null">run_proc_num = #{runProcNum},</if>
|
||||
<if test="usersNum != null">users_num = #{usersNum},</if>
|
||||
<if test="diskSizeTotal != null">disk_size_total = #{diskSizeTotal},</if>
|
||||
<if test="bootTime != null">boot_time = #{bootTime},</if>
|
||||
<if test="uname != null">uname = #{uname},</if>
|
||||
<if test="localTime != null">local_time = #{localTime},</if>
|
||||
<if test="upTime != null">up_time = #{upTime},</if>
|
||||
<if test="procNum != null">proc_num = #{procNum},</if>
|
||||
<if test="timeStamp != null">time_stamp = #{timeStamp},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="uuid != null">uuid = #{uuid},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInitialSystemInfoById" parameterType="Long">
|
||||
delete from initial_system_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteInitialSystemInfoByIds" parameterType="String">
|
||||
delete from initial_system_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<insert id="batchInsertInitialSystemInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO initial_system_info
|
||||
(
|
||||
client_id,
|
||||
os,
|
||||
arch,
|
||||
max_proc,
|
||||
run_proc_num,
|
||||
users_num,
|
||||
disk_size_total,
|
||||
boot_time,
|
||||
uname,
|
||||
local_time,
|
||||
up_time,
|
||||
proc_num,
|
||||
time_stamp,
|
||||
create_by,
|
||||
update_by,
|
||||
create_time,
|
||||
update_time,
|
||||
uuid
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.clientId},
|
||||
#{item.os},
|
||||
#{item.arch},
|
||||
#{item.maxProc},
|
||||
#{item.runProcNum},
|
||||
#{item.usersNum},
|
||||
#{item.diskSizeTotal},
|
||||
#{item.bootTime},
|
||||
#{item.uname},
|
||||
#{item.localTime},
|
||||
#{item.upTime},
|
||||
#{item.procNum},
|
||||
#{item.timeStamp},
|
||||
#{item.createBy},
|
||||
#{item.updateBy},
|
||||
<choose>
|
||||
<when test="item.createTime != null">
|
||||
#{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
<choose>
|
||||
<when test="item.updateTime != null">
|
||||
#{item.updateTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
NOW()
|
||||
</otherwise>
|
||||
</choose>,
|
||||
#{item.uuid}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user