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