源数据接口修改,解决接口名称表数据重复bug,增加资源名称同步修改逻辑。
This commit is contained in:
@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.webjars.NotFoundException;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
@@ -197,6 +198,15 @@ public class EpsNodeBandwidthController extends BaseController
|
||||
if ("1".equals(resourceType)) {
|
||||
// 处理服务器流量数据
|
||||
PageInfo<EpsInitialTrafficData> pageInfo = epsNodeBandwidthService.relatedData(epsNodeBandwidth, dailyStartTime, dailyEndTime);;
|
||||
for (EpsInitialTrafficData epsInitialTrafficData : pageInfo.getList()) {
|
||||
if("2".equals(epsInitialTrafficData.getRevenueMethod())){
|
||||
BigDecimal packageBandwidth = epsInitialTrafficData.getPackageBandwidth();
|
||||
BigDecimal outSpeed = (packageBandwidth != null)
|
||||
? packageBandwidth.multiply(new BigDecimal("1000000"))
|
||||
: BigDecimal.ZERO;
|
||||
epsInitialTrafficData.setOutSpeed(outSpeed.toString());
|
||||
}
|
||||
}
|
||||
return getDataTable(pageInfo.getList(), pageInfo.getTotal());
|
||||
} else{
|
||||
// 4. 设置分页参数
|
||||
|
||||
@@ -36,7 +36,7 @@ public class EpsServerRevenueConfigController extends BaseController
|
||||
*/
|
||||
@RequiresPermissions("system:config:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
public TableDataInfo list(@RequestBody EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsServerRevenueConfig.getPageNum());
|
||||
|
||||
@@ -129,6 +129,9 @@ public class EpsNodeBandwidth extends BaseEntity
|
||||
private String monthTime;
|
||||
/** 备注 */
|
||||
private String remark1;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createDatetime;
|
||||
|
||||
private List<String> nodeNames;
|
||||
|
||||
|
||||
@@ -81,4 +81,6 @@ public interface EpsNodeBandwidthMapper
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public int countByAvgMsg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
int updateEpsNodeBandwidthByServerSn(EpsNodeBandwidth epsNodeBandwidth);
|
||||
}
|
||||
|
||||
@@ -77,4 +77,6 @@ public interface EpsServerRevenueConfigMapper
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
public Map getNodeMsgByIp(@Param("ipAddress") String ipAddress);
|
||||
|
||||
int updateEpsServerRevenueConfigByServerSn(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
}
|
||||
|
||||
@@ -59,4 +59,6 @@ public interface RmEpsTopologyManagementMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementByIds(Long[] ids);
|
||||
|
||||
int updateRmEpsTopologyManagementByServerSn(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
}
|
||||
|
||||
@@ -167,7 +167,6 @@ public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// 3. 获取计算数据(防止空指针)
|
||||
EpsNodeBandwidth calculatedData = epsNodeBandwidthMapper.calculateAvg(epsNodeBandwidth);
|
||||
if (calculatedData == null) {
|
||||
@@ -182,8 +181,12 @@ public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
// 5. 计算当月天数
|
||||
LocalDate monthTime;
|
||||
try {
|
||||
monthTime = LocalDate.parse(epsNodeBandwidth.getMonthTime() == null
|
||||
? epsNodeBandwidth.getStartTime().substring(0,10) : epsNodeBandwidth.getMonthTime());
|
||||
String monthStr = epsNodeBandwidth.getMonthTime() == null
|
||||
? epsNodeBandwidth.getStartTime().substring(0, 7)
|
||||
: epsNodeBandwidth.getMonthTime();
|
||||
|
||||
YearMonth yearMonth = YearMonth.parse(monthStr);
|
||||
monthTime = yearMonth.atDay(1); // 转换为当月第一天
|
||||
} catch (Exception e) {
|
||||
log.error("月份时间格式错误: {}", epsNodeBandwidth.getMonthTime() == null
|
||||
? epsNodeBandwidth.getStartTime() : epsNodeBandwidth.getMonthTime(), e);
|
||||
@@ -224,7 +227,11 @@ public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
epsNodeBandwidth.setId(existingRecords.get(0).getId());
|
||||
epsNodeBandwidth.setUpdateTime(DateUtils.getNowDate());
|
||||
}else{
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.parseDate(epsNodeBandwidth.getStartTime()));
|
||||
if(epsNodeBandwidth.getStartTime() == null){
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.parseDate(monthTime));
|
||||
}else{
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.parseDate(epsNodeBandwidth.getStartTime()));
|
||||
}
|
||||
}
|
||||
// 有效-月均日95值
|
||||
BigDecimal effectiveAvg = sumEffectiveBandwidth95Daily.divide(BigDecimal.valueOf(daysInMonth), 2, RoundingMode.HALF_UP);
|
||||
@@ -242,7 +249,11 @@ public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
epsNodeBandwidth.setId(existingRecords.get(0).getId());
|
||||
epsNodeBandwidth.setUpdateTime(DateUtils.getNowDate());
|
||||
}else{
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.parseDate(epsNodeBandwidth.getStartTime()));
|
||||
if(epsNodeBandwidth.getStartTime() == null){
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.parseDate(monthTime));
|
||||
}else{
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.parseDate(epsNodeBandwidth.getStartTime()));
|
||||
}
|
||||
}
|
||||
// 月均日95值
|
||||
BigDecimal avgMonthly = sum95Daily.divide(BigDecimal.valueOf(daysInMonth), 2, RoundingMode.HALF_UP);
|
||||
|
||||
@@ -15,12 +15,11 @@ import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.service.IEpsServerRevenueConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Service业务层处理
|
||||
@@ -176,7 +175,11 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
for (EpsInitialTrafficData initialTrafficData : dataList) {
|
||||
// 根据ip查询节点名称
|
||||
String ip = initialTrafficData.getIpV4() == null ? "" : initialTrafficData.getIpV4();
|
||||
String mac = initialTrafficData.getMac() == null ? "" : initialTrafficData.getMac();
|
||||
Map nodeMsg = epsServerRevenueConfigMapper.getNodeMsgByIp(ip);
|
||||
if(nodeMsg == null){
|
||||
nodeMsg = epsServerRevenueConfigMapper.getNodeMsgByIp(mac);
|
||||
}
|
||||
// 赋值
|
||||
if(nodeMsg != null){
|
||||
initialTrafficData.setServiceSn(getNullableString(nodeMsg, "hardwareSn"));
|
||||
@@ -221,67 +224,97 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
* 批量处理接口名称
|
||||
*/
|
||||
private void processInterfaceNames(List<EpsInitialTrafficData> trafficDataList) {
|
||||
// 收集所有需要检查的接口名称
|
||||
Set<String> interfaceNames = trafficDataList.stream()
|
||||
.map(EpsInitialTrafficData::getName)
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
if (interfaceNames.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 批量查询已存在的接口名称
|
||||
AllInterfaceName allInterfaceName = new AllInterfaceName();
|
||||
if(!trafficDataList.isEmpty()){
|
||||
allInterfaceName.setClientId(trafficDataList.get(0).getClientId());
|
||||
allInterfaceName.setInterfaceNames(interfaceNames);
|
||||
}
|
||||
List<AllInterfaceName> existingNames = allInterfaceNameMapper.selectByNames(allInterfaceName);
|
||||
// 转为 Map<接口名称, 数据库记录> 便于快速查找
|
||||
Map<String, AllInterfaceName> existingNameMap = existingNames.stream()
|
||||
.collect(Collectors.toMap(
|
||||
item -> item.getClientId() + "|" + item.getInterfaceName(), // 关键修改点
|
||||
Function.identity(),
|
||||
(oldValue, newValue) -> oldValue // 重复时保留旧记录
|
||||
));
|
||||
// 分类处理:新增列表 vs 更新列表
|
||||
List<AllInterfaceName> namesToInsert = new ArrayList<>();
|
||||
List<AllInterfaceName> namesToUpdate = new ArrayList<>();
|
||||
|
||||
// 用于去重的临时集合,防止同一批数据中的重复
|
||||
Set<String> processedKeys = new HashSet<>();
|
||||
|
||||
trafficDataList.forEach(data -> {
|
||||
String name = data.getName();
|
||||
if (StringUtils.isBlank(name)) {
|
||||
String ip = data.getMac();
|
||||
String clientId = data.getClientId();
|
||||
if (StringUtils.isBlank(name) || StringUtils.isBlank(ip) || StringUtils.isBlank(clientId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 构造新记录(需更新的字段)
|
||||
// 生成唯一键,防止同一批数据中的重复处理
|
||||
String uniqueKey = name + "|" + clientId + "|" + ip;
|
||||
if (processedKeys.contains(uniqueKey)) {
|
||||
return;
|
||||
}
|
||||
processedKeys.add(uniqueKey);
|
||||
|
||||
// 构造新记录
|
||||
AllInterfaceName newRecord = new AllInterfaceName();
|
||||
newRecord.setInterfaceName(name);
|
||||
newRecord.setClientId(data.getClientId());
|
||||
newRecord.setResourceType("1"); // 固定值
|
||||
newRecord.setResourceType("1");
|
||||
newRecord.setDeviceSn(data.getServiceSn());
|
||||
newRecord.setNodeName(data.getNodeName());
|
||||
newRecord.setBusinessCode(data.getBusinessId());
|
||||
newRecord.setBusinessName(data.getBusinessName());
|
||||
newRecord.setServerIp(data.getIpV4());
|
||||
// 判断是否需要更新
|
||||
String compositeKey = data.getClientId() + "|" + name;
|
||||
if (existingNameMap.containsKey(compositeKey)) {
|
||||
AllInterfaceName oldRecord = existingNameMap.get(compositeKey);
|
||||
if (isRecordChanged(oldRecord, newRecord)) {
|
||||
newRecord.setId(oldRecord.getId()); // 保留原ID
|
||||
namesToUpdate.add(newRecord);
|
||||
newRecord.setServerIp(data.getMac());
|
||||
|
||||
List<AllInterfaceName> existingNames = allInterfaceNameMapper.selectByNames(newRecord);
|
||||
|
||||
if (!existingNames.isEmpty()) {
|
||||
for (AllInterfaceName existingName : existingNames) {
|
||||
if (isRecordChanged(existingName, newRecord)) {
|
||||
newRecord.setId(existingName.getId());
|
||||
newRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
|
||||
// 检查是否已经存在于更新列表中
|
||||
boolean alreadyInUpdateList = namesToUpdate.stream()
|
||||
.anyMatch(item -> item.getId() != null && item.getId().equals(existingName.getId()));
|
||||
if (!alreadyInUpdateList) {
|
||||
namesToUpdate.add(newRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
namesToInsert.add(newRecord);
|
||||
newRecord.setCreateTime(DateUtils.getNowDate());
|
||||
newRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
|
||||
// 检查namesToInsert中是否已有相同记录
|
||||
boolean alreadyInInsertList = namesToInsert.stream()
|
||||
.anyMatch(item -> item.getInterfaceName().equals(name)
|
||||
&& item.getClientId().equals(clientId)
|
||||
&& item.getServerIp().equals(ip));
|
||||
|
||||
if (!alreadyInInsertList) {
|
||||
namesToInsert.add(newRecord);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 批量操作数据库
|
||||
if (!namesToInsert.isEmpty()) {
|
||||
allInterfaceNameMapper.batchInsert(namesToInsert);
|
||||
log.info("新增接口名称数量:{}", namesToInsert.size());
|
||||
try {
|
||||
allInterfaceNameMapper.batchInsert(namesToInsert);
|
||||
log.info("新增接口名称数量:{}", namesToInsert.size());
|
||||
} catch (DuplicateKeyException e) {
|
||||
// 如果批量插入出现重复,转为逐条插入(带异常处理)
|
||||
log.warn("批量插入出现重复,转为逐条处理");
|
||||
namesToInsert.forEach(record -> {
|
||||
try {
|
||||
allInterfaceNameMapper.insertAllInterfaceName(record);
|
||||
} catch (DuplicateKeyException ex) {
|
||||
// 重复记录转为更新
|
||||
AllInterfaceName query = new AllInterfaceName();
|
||||
query.setInterfaceName(record.getInterfaceName());
|
||||
query.setClientId(record.getClientId());
|
||||
query.setServerIp(record.getServerIp());
|
||||
|
||||
List<AllInterfaceName> existing = allInterfaceNameMapper.selectByNames(query);
|
||||
if (!existing.isEmpty()) {
|
||||
record.setId(existing.get(0).getId());
|
||||
allInterfaceNameMapper.updateAllInterfaceName(record);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!namesToUpdate.isEmpty()) {
|
||||
@@ -289,10 +322,10 @@ public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfi
|
||||
log.info("更新接口名称数量:{}", namesToUpdate.size());
|
||||
}
|
||||
}
|
||||
|
||||
// 辅助方法:检查记录是否有变化
|
||||
private boolean isRecordChanged(AllInterfaceName oldRecord, AllInterfaceName newRecord) {
|
||||
return !Objects.equals(oldRecord.getClientId(), newRecord.getClientId()) ||
|
||||
!Objects.equals(oldRecord.getDeviceSn(), newRecord.getDeviceSn()) ||
|
||||
return !Objects.equals(oldRecord.getDeviceSn(), newRecord.getDeviceSn()) ||
|
||||
!Objects.equals(oldRecord.getNodeName(), newRecord.getNodeName()) ||
|
||||
!Objects.equals(oldRecord.getBusinessCode(), newRecord.getBusinessCode()) ||
|
||||
!Objects.equals(oldRecord.getBusinessName(), newRecord.getBusinessName()) ||
|
||||
|
||||
@@ -9,13 +9,14 @@ import com.ruoyi.system.service.IInitialSwitchInfoDetailsService;
|
||||
import com.ruoyi.system.util.CalculateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -28,7 +29,6 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDetailsService
|
||||
{
|
||||
private static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
@Autowired
|
||||
private InitialSwitchInfoDetailsMapper initialSwitchInfoDetailsMapper;
|
||||
@Autowired
|
||||
@@ -134,31 +134,37 @@ public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDe
|
||||
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());
|
||||
details.setServerSn(management.getServerSn());
|
||||
// 根据服务器sn查询业务
|
||||
if(management.getServerSn() != null){
|
||||
EpsServerRevenueConfig epsServerRevenueConfig = new EpsServerRevenueConfig();
|
||||
epsServerRevenueConfig.setHardwareSn(management.getServerSn());
|
||||
List<EpsServerRevenueConfig> businessList = epsServerRevenueConfigMapper.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
if(!businessList.isEmpty()){
|
||||
EpsServerRevenueConfig revenueConfig = businessList.get(0);
|
||||
details.setBusinessName(revenueConfig.getBusinessName());
|
||||
details.setBusinessCode(revenueConfig.getBusinessCode());
|
||||
for (RmEpsTopologyManagement management : managements) {
|
||||
if("1".equals(management.getConnectedDeviceType())){
|
||||
details.setOutSpeed(null);
|
||||
}else{
|
||||
details.setInSpeed(null);
|
||||
}
|
||||
}else {
|
||||
details.setBusinessCode(null);
|
||||
details.setBusinessName(null);
|
||||
details.setSwitchSn(management.getSwitchSn());
|
||||
details.setSwitchName(management.getSwitchName());
|
||||
details.setInterfaceDeviceType(management.getConnectedDeviceType());
|
||||
details.setServerName(management.getServerName());
|
||||
details.setServerPort(management.getServerPort());
|
||||
details.setServerSn(management.getServerSn());
|
||||
// 根据服务器sn查询业务
|
||||
if(management.getServerSn() != null){
|
||||
EpsServerRevenueConfig epsServerRevenueConfig = new EpsServerRevenueConfig();
|
||||
epsServerRevenueConfig.setHardwareSn(management.getServerSn());
|
||||
List<EpsServerRevenueConfig> businessList = epsServerRevenueConfigMapper.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
if(!businessList.isEmpty()){
|
||||
EpsServerRevenueConfig revenueConfig = businessList.get(0);
|
||||
details.setBusinessName(revenueConfig.getBusinessName());
|
||||
details.setBusinessCode(revenueConfig.getBusinessCode());
|
||||
}
|
||||
}else {
|
||||
details.setBusinessCode(null);
|
||||
details.setBusinessName(null);
|
||||
}
|
||||
// id自增
|
||||
details.setId(null);
|
||||
batchList.add(details);
|
||||
}
|
||||
}
|
||||
// id自增
|
||||
details.setId(null);
|
||||
batchList.add(details);
|
||||
}
|
||||
}
|
||||
initialSwitchInfoDetails.setDataList(batchList);
|
||||
@@ -183,38 +189,23 @@ public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDe
|
||||
* 批量处理接口名称
|
||||
*/
|
||||
private void processSwitchInterfaceNames(List<InitialSwitchInfoDetails> initialSwitchInfoDetails) {
|
||||
// 收集所有需要检查的接口名称
|
||||
Set<String> interfaceNames = initialSwitchInfoDetails.stream()
|
||||
.map(InitialSwitchInfoDetails::getName)
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
if (interfaceNames.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
AllInterfaceName allInterfaceName = new AllInterfaceName();
|
||||
if(!initialSwitchInfoDetails.isEmpty()){
|
||||
allInterfaceName.setClientId(initialSwitchInfoDetails.get(0).getClientId());
|
||||
allInterfaceName.setInterfaceNames(interfaceNames);
|
||||
}
|
||||
// 批量查询已存在的接口名称
|
||||
List<AllInterfaceName> existingNames = allInterfaceNameMapper.selectByNames(allInterfaceName);
|
||||
Map<String, AllInterfaceName> existingNameMap = existingNames.stream()
|
||||
.collect(Collectors.toMap(
|
||||
item -> item.getClientId() + "|" + item.getInterfaceName(), // 关键修改点
|
||||
Function.identity(),
|
||||
(oldValue, newValue) -> oldValue // 重复时保留旧记录
|
||||
));
|
||||
// 分类处理:新增列表 vs 更新列表
|
||||
List<AllInterfaceName> namesToInsert = new ArrayList<>();
|
||||
List<AllInterfaceName> namesToUpdate = new ArrayList<>();
|
||||
|
||||
initialSwitchInfoDetails.forEach(data -> {
|
||||
String name = data.getName();
|
||||
if (StringUtils.isBlank(name)) {
|
||||
String ip = data.getSwitchIp();
|
||||
String clientId = data.getClientId();
|
||||
if (StringUtils.isBlank(name) || StringUtils.isBlank(ip) || StringUtils.isBlank(clientId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
AllInterfaceName allInterfaceName = new AllInterfaceName();
|
||||
allInterfaceName.setClientId(clientId);
|
||||
allInterfaceName.setSwitchIp(ip);
|
||||
allInterfaceName.setInterfaceName(name);
|
||||
allInterfaceName.setResourceType("2");
|
||||
List<AllInterfaceName> existingNames = allInterfaceNameMapper.selectByNames(allInterfaceName);
|
||||
AllInterfaceName record = new AllInterfaceName();
|
||||
record.setInterfaceName(name);
|
||||
record.setClientId(data.getClientId());
|
||||
@@ -241,22 +232,57 @@ public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDe
|
||||
record.setBusinessName(null);
|
||||
}
|
||||
// 判断是否需要更新
|
||||
String compositeKey = data.getClientId() + "|" + name;
|
||||
if (existingNameMap.containsKey(compositeKey)) {
|
||||
AllInterfaceName existingRecord = existingNameMap.get(compositeKey);
|
||||
if (isRecordChanged(existingRecord, record)) {
|
||||
record.setId(existingRecord.getId()); // 保留原ID
|
||||
namesToUpdate.add(record);
|
||||
if (!existingNames.isEmpty()) {
|
||||
for (AllInterfaceName existingName : existingNames) {
|
||||
if(isRecordChanged(existingName,record)){
|
||||
record.setId(existingName.getId()); // 保留原ID
|
||||
// 检查是否已经存在于更新列表中
|
||||
boolean alreadyInUpdateList = namesToUpdate.stream()
|
||||
.anyMatch(item -> item.getId() != null && item.getId().equals(existingName.getId()));
|
||||
if (!alreadyInUpdateList) {
|
||||
namesToUpdate.add(record);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
namesToInsert.add(record);
|
||||
// 检查namesToInsert中是否已有相同记录
|
||||
boolean alreadyInInsertList = namesToInsert.stream()
|
||||
.anyMatch(item -> item.getInterfaceName().equals(name)
|
||||
&& item.getClientId().equals(clientId)
|
||||
&& item.getSwitchIp().equals(ip));
|
||||
|
||||
if (!alreadyInInsertList) {
|
||||
namesToInsert.add(record);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 批量操作数据库
|
||||
if (!namesToInsert.isEmpty()) {
|
||||
allInterfaceNameMapper.batchInsert(namesToInsert);
|
||||
log.info("新增接口名称数量:{}", namesToInsert.size());
|
||||
try {
|
||||
allInterfaceNameMapper.batchInsert(namesToInsert);
|
||||
log.info("新增接口名称数量:{}", namesToInsert.size());
|
||||
} catch (DuplicateKeyException e) {
|
||||
// 如果批量插入出现重复,转为逐条插入(带异常处理)
|
||||
log.warn("批量插入出现重复,转为逐条处理");
|
||||
namesToInsert.forEach(record -> {
|
||||
try {
|
||||
allInterfaceNameMapper.insertAllInterfaceName(record);
|
||||
} catch (DuplicateKeyException ex) {
|
||||
// 重复记录转为更新
|
||||
AllInterfaceName query = new AllInterfaceName();
|
||||
query.setInterfaceName(record.getInterfaceName());
|
||||
query.setClientId(record.getClientId());
|
||||
query.setServerIp(record.getServerIp());
|
||||
|
||||
List<AllInterfaceName> existing = allInterfaceNameMapper.selectByNames(query);
|
||||
if (!existing.isEmpty()) {
|
||||
record.setId(existing.get(0).getId());
|
||||
allInterfaceNameMapper.updateAllInterfaceName(record);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!namesToUpdate.isEmpty()) {
|
||||
@@ -267,8 +293,7 @@ public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDe
|
||||
|
||||
// 辅助方法:检查记录是否有变化
|
||||
private boolean isRecordChanged(AllInterfaceName oldRecord, AllInterfaceName newRecord) {
|
||||
return !Objects.equals(oldRecord.getClientId(), newRecord.getClientId()) ||
|
||||
!Objects.equals(oldRecord.getDeviceSn(), newRecord.getDeviceSn()) ||
|
||||
return !Objects.equals(oldRecord.getDeviceSn(), newRecord.getDeviceSn()) ||
|
||||
!Objects.equals(oldRecord.getNodeName(), newRecord.getNodeName()) ||
|
||||
!Objects.equals(oldRecord.getServerPort(), newRecord.getServerPort()) ||
|
||||
!Objects.equals(oldRecord.getInterfaceDeviceType(), newRecord.getInterfaceDeviceType()) ||
|
||||
|
||||
@@ -2,9 +2,13 @@ package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.mapper.EpsNodeBandwidthMapper;
|
||||
import com.ruoyi.system.mapper.EpsServerRevenueConfigMapper;
|
||||
import com.ruoyi.system.mapper.RmEpsTopologyManagementMapper;
|
||||
import com.ruoyi.system.mapper.RmResourceRegistrationMapper;
|
||||
import com.ruoyi.system.service.IRmResourceRegistrationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -26,6 +30,10 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
private RmResourceRegistrationMapper rmResourceRegistrationMapper;
|
||||
@Autowired
|
||||
private EpsServerRevenueConfigMapper epsServerRevenueConfigMapper;
|
||||
@Autowired
|
||||
private RmEpsTopologyManagementMapper rmEpsTopologyManagementMapper;
|
||||
@Autowired
|
||||
private EpsNodeBandwidthMapper epsNodeBandwidthMapper;
|
||||
|
||||
/**
|
||||
* 查询资源注册
|
||||
@@ -84,12 +92,34 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
rmResourceRegistration.setUpdateTime(DateUtils.getNowDate());
|
||||
rmResourceRegistration.setUpdaterId(SecurityUtils.getUserId());
|
||||
rmResourceRegistration.setUpdaterName(SecurityUtils.getUsername());
|
||||
// 拿到需要修改的id
|
||||
Long id = rmResourceRegistration.getId();
|
||||
// 根据id查询sn信息
|
||||
RmResourceRegistration resourceRegistration = rmResourceRegistrationMapper.selectRmResourceRegistrationById(id);
|
||||
// sn
|
||||
String hardwareSn = resourceRegistration.getHardwareSn();
|
||||
// 如果资源名称有修改,同步修改其他表的资源名称
|
||||
if (!resourceRegistration.getResourceName().equals(rmResourceRegistration.getResourceName())){
|
||||
// 拓扑管理配置
|
||||
RmEpsTopologyManagement rmEpsTopologyManagement = new RmEpsTopologyManagement();
|
||||
rmEpsTopologyManagement.setServerSn(hardwareSn);
|
||||
rmEpsTopologyManagement.setServerName(rmResourceRegistration.getResourceName());
|
||||
rmEpsTopologyManagementMapper.updateRmEpsTopologyManagementByServerSn(rmEpsTopologyManagement);
|
||||
// 服务器收益配置表
|
||||
EpsServerRevenueConfig epsServerRevenueConfig = new EpsServerRevenueConfig();
|
||||
epsServerRevenueConfig.setHardwareSn(hardwareSn);
|
||||
epsServerRevenueConfig.setNodeName(rmResourceRegistration.getResourceName());
|
||||
epsServerRevenueConfigMapper.updateEpsServerRevenueConfigByServerSn(epsServerRevenueConfig);
|
||||
// 95收益信息表
|
||||
EpsNodeBandwidth epsNodeBandwidth = new EpsNodeBandwidth();
|
||||
epsNodeBandwidth.setHardwareSn(hardwareSn);
|
||||
epsNodeBandwidth.setNodeName(rmResourceRegistration.getResourceName());
|
||||
epsNodeBandwidthMapper.updateEpsNodeBandwidthByServerSn(epsNodeBandwidth);
|
||||
}
|
||||
// 禁止修改sn序列号
|
||||
rmResourceRegistration.setHardwareSn(null);
|
||||
// 已注册状态修改--仅可修改资源名称,描述
|
||||
if ("1".equals(rmResourceRegistration.getRegistrationStatus())){
|
||||
// 拿到需要修改的id
|
||||
Long id = rmResourceRegistration.getId();
|
||||
// 拿到需要修改的资源名称
|
||||
String resourceName = rmResourceRegistration.getResourceName();
|
||||
// 拿到需要修改的描述
|
||||
|
||||
@@ -148,12 +148,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
server_ip AS serverIp
|
||||
FROM
|
||||
all_interface_name
|
||||
WHERE
|
||||
client_id = #{clientId} and
|
||||
interface_name IN
|
||||
<foreach collection="interfaceNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name = #{interfaceName}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name = #{nodeName}</if>
|
||||
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="switchName != null and switchName != ''"> and switch_name = #{switchName}</if>
|
||||
<if test="interfaceDeviceType != null and interfaceDeviceType != ''"> and interface_device_type = #{interfaceDeviceType}</if>
|
||||
<if test="serverPort != null and serverPort != ''"> and server_port = #{serverPort}</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
<if test="switchIp != null and switchIp != ''"> and switch_ip = #{switchIp}</if>
|
||||
<if test="serverIp != null and serverIp != ''"> and server_ip = #{serverIp}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 批量插入接口名称 -->
|
||||
|
||||
@@ -32,10 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="businessName" column="business_name" />
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="remark1" column="remark1" />
|
||||
<result property="createDatetime" column="create_datetime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsNodeBandwidthVo">
|
||||
select id, node_name, hardware_sn, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, switch_sn, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id, remark1 from eps_node_bandwidth
|
||||
select id, node_name, hardware_sn, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, switch_sn, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id, remark1, create_datetime from eps_node_bandwidth
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsNodeBandwidthList" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
@@ -80,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
<if test="createDatetime != null "> and create_datetime = #{createDatetime}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsNodeBandwidthById" parameterType="Long" resultMap="EpsNodeBandwidthResult">
|
||||
@@ -116,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="businessId != null">business_id,</if>
|
||||
<if test="remark1 != null">remark1,</if>
|
||||
create_datetime,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
@@ -144,6 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="businessId != null">#{businessId},</if>
|
||||
<if test="remark1 != null">#{remark1},</if>
|
||||
NOW(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -176,9 +180,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="businessId != null">business_id = #{businessId},</if>
|
||||
<if test="remark1 != null">remark1 = #{remark1},</if>
|
||||
<if test="createDatetime != null">create_datetime = #{createDatetime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateEpsNodeBandwidthByServerSn" parameterType="EpsNodeBandwidth">
|
||||
update eps_node_bandwidth
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
</trim>
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsNodeBandwidthById" parameterType="Long">
|
||||
delete from eps_node_bandwidth where id = #{id}
|
||||
|
||||
@@ -110,6 +110,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateEpsServerRevenueConfigByServerSn" parameterType="EpsServerRevenueConfig">
|
||||
update eps_server_revenue_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
</trim>
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsServerRevenueConfigById" parameterType="Long">
|
||||
delete from eps_server_revenue_config where id = #{id}
|
||||
|
||||
@@ -105,6 +105,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateRmEpsTopologyManagementByServerSn" parameterType="RmEpsTopologyManagement">
|
||||
update rm_eps_topology_management
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="serverName != null">`server_name` = #{serverName},</if>
|
||||
</trim>
|
||||
where server_sn = #{serverSn}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteRmEpsTopologyManagementById" parameterType="Long">
|
||||
delete from rm_eps_topology_management where id = #{id}
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
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.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.PageDomain;
|
||||
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.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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CPU监控信息Controller
|
||||
@@ -39,10 +33,13 @@ public class InitialCpuInfoController extends BaseController
|
||||
* 查询CPU监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:cpuInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialCpuInfo initialCpuInfo)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialCpuInfo initialCpuInfo)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialCpuInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialCpuInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<InitialCpuInfo> list = initialCpuInfoService.selectInitialCpuInfoList(initialCpuInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
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.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.PageDomain;
|
||||
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.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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息Controller
|
||||
@@ -39,10 +33,13 @@ public class InitialDiskInfoController extends BaseController
|
||||
* 查询磁盘监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:diskInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialDiskInfo initialDiskInfo)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialDiskInfo initialDiskInfo)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialDiskInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialDiskInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<InitialDiskInfo> list = initialDiskInfoService.selectInitialDiskInfoList(initialDiskInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
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.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.PageDomain;
|
||||
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.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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 容器监控信息Controller
|
||||
@@ -39,10 +33,13 @@ public class InitialDockerInfoController extends BaseController
|
||||
* 查询容器监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:dockerInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialDockerInfo initialDockerInfo)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialDockerInfo initialDockerInfo)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialDockerInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialDockerInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<InitialDockerInfo> list = initialDockerInfoService.selectInitialDockerInfoList(initialDockerInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
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.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.PageDomain;
|
||||
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.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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 内存监控信息Controller
|
||||
@@ -39,10 +33,13 @@ public class InitialMemoryInfoController extends BaseController
|
||||
* 查询内存监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:memoryInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialMemoryInfo initialMemoryInfo)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialMemoryInfo initialMemoryInfo)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialMemoryInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialMemoryInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<InitialMemoryInfo> list = initialMemoryInfoService.selectInitialMemoryInfoList(initialMemoryInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
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.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.PageDomain;
|
||||
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.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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂载点监控信息Controller
|
||||
@@ -39,10 +33,13 @@ public class InitialMountPointInfoController extends BaseController
|
||||
* 查询挂载点监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:mountPointInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialMountPointInfo initialMountPointInfo)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialMountPointInfo initialMountPointInfo)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialMountPointInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialMountPointInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<InitialMountPointInfo> list = initialMountPointInfoService.selectInitialMountPointInfoList(initialMountPointInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -1,26 +1,20 @@
|
||||
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.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.PageDomain;
|
||||
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.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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 系统监控信息Controller
|
||||
@@ -39,10 +33,13 @@ public class InitialSystemInfoController extends BaseController
|
||||
* 查询系统监控信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:systemInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(InitialSystemInfo initialSystemInfo)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody InitialSystemInfo initialSystemInfo)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialSystemInfo.getPageNum());
|
||||
pageDomain.setPageSize(initialSystemInfo.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<InitialSystemInfo> list = initialSystemInfoService.selectInitialSystemInfoList(initialSystemInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
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;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* CPU监控信息对象 initial_cpu_info
|
||||
@@ -11,9 +10,10 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialCpuInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
@@ -24,213 +24,49 @@ public class InitialCpuInfo extends BaseEntity
|
||||
|
||||
/** CPU1分钟负载 */
|
||||
@Excel(name = "CPU1分钟负载")
|
||||
private long avg1;
|
||||
private Long avg1;
|
||||
|
||||
/** CPU5分钟负载 */
|
||||
@Excel(name = "CPU5分钟负载")
|
||||
private long avg5;
|
||||
private Long avg5;
|
||||
|
||||
/** CPU15分钟负载 */
|
||||
@Excel(name = "CPU15分钟负载")
|
||||
private long avg15;
|
||||
private Long avg15;
|
||||
|
||||
/** CPU硬件中断提供服务时间(秒) */
|
||||
@Excel(name = "CPU硬件中断提供服务时间(秒)")
|
||||
private long interrupt;
|
||||
private Long interrupt;
|
||||
|
||||
/** CPU使用率(%) */
|
||||
@Excel(name = "CPU使用率(%)")
|
||||
private long uti;
|
||||
private Long uti;
|
||||
|
||||
/** CPU数量(核数) */
|
||||
@Excel(name = "CPU数量(核数)")
|
||||
private long num;
|
||||
@Excel(name = "CPU数量")
|
||||
private Long num;
|
||||
|
||||
/** CPU正常运行时间(秒) */
|
||||
@Excel(name = "CPU正常运行时间(秒)")
|
||||
@Excel(name = "CPU正常运行时间")
|
||||
private Long normal;
|
||||
|
||||
/** CPU空闲时间(秒) */
|
||||
@Excel(name = "CPU空闲时间(秒)")
|
||||
private long idle;
|
||||
@Excel(name = "CPU空闲时间")
|
||||
private Long idle;
|
||||
|
||||
/** CPU等待响应时间(秒) */
|
||||
@Excel(name = "CPU等待响应时间(秒)")
|
||||
private long iowait;
|
||||
@Excel(name = "CPU等待响应时间")
|
||||
private Long iowait;
|
||||
|
||||
/** CPU系统时间(秒) */
|
||||
@Excel(name = "CPU系统时间(秒)")
|
||||
private long system;
|
||||
@Excel(name = "CPU系统时间")
|
||||
private Long system;
|
||||
|
||||
/** CPU软件无响应时间(秒) */
|
||||
@Excel(name = "CPU软件无响应时间(秒)")
|
||||
private long noresp;
|
||||
@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();
|
||||
}
|
||||
@Excel(name = "CPU用户进程所花费的时间")
|
||||
private Long user;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
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;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 磁盘监控信息对象 initial_disk_info
|
||||
@@ -11,6 +10,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
* @author gyt
|
||||
* @date 2025-08-25
|
||||
*/
|
||||
@Data
|
||||
public class InitialDiskInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -58,134 +58,4 @@ public class InitialDiskInfo extends BaseEntity
|
||||
@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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class NetInterfaceInfo {
|
||||
private String name;
|
||||
private String type;
|
||||
private String status;
|
||||
private String ipV4;
|
||||
private String mac;
|
||||
private String inSpeed;
|
||||
private String outSpeed;
|
||||
private int inDropped;
|
||||
private int outDropped;
|
||||
public static List<NetInterfaceInfo> parseNetData(String jsonData) {
|
||||
return JSON.parseArray(jsonData, NetInterfaceInfo.class);
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="noresp != null "> and noresp = #{noresp}</if>
|
||||
<if test="user != null "> and user = #{user}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectInitialCpuInfoById" parameterType="Long" resultMap="InitialCpuInfoResult">
|
||||
|
||||
@@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="writeBytes != null "> and write_bytes = #{writeBytes}</if>
|
||||
<if test="readBytes != null "> and read_bytes = #{readBytes}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectInitialDiskInfoById" parameterType="Long" resultMap="InitialDiskInfoResult">
|
||||
|
||||
@@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="netOutSpeed != null and netOutSpeed != ''"> and net_out_speed = #{netOutSpeed}</if>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectInitialDockerInfoById" parameterType="Long" resultMap="InitialDockerInfoResult">
|
||||
|
||||
@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="percent != null "> and percent = #{percent}</if>
|
||||
<if test="total != null "> and total = #{total}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectInitialMemoryInfoById" parameterType="Long" resultMap="InitialMemoryInfoResult">
|
||||
|
||||
@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="vfsTotal != null "> and vfs_total = #{vfsTotal}</if>
|
||||
<if test="vfsUtil != null "> and vfs_util = #{vfsUtil}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectInitialMountPointInfoById" parameterType="Long" resultMap="InitialMountPointInfoResult">
|
||||
|
||||
@@ -48,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="timeStamp != null "> and time_stamp = #{timeStamp}</if>
|
||||
<if test="uuid != null "> and uuid = #{uuid}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectInitialSystemInfoById" parameterType="Long" resultMap="InitialSystemInfoResult">
|
||||
|
||||
Reference in New Issue
Block a user