告警日志、推送消息接口、图形监控排序优化
监控看板相关接口、单点击计数接口开发
This commit is contained in:
+14
-2
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.ruoyi.common.core.web.domain.AjaxResult.success;
|
||||
|
||||
/**
|
||||
* EPS初始流量数据控制器
|
||||
* 提供流量数据的REST接口
|
||||
@@ -65,7 +67,7 @@ public class EpsInitialTrafficDataController {
|
||||
@PostMapping("/getServerGraphicalAnalysisDaily")
|
||||
public AjaxResult getServerGraphicalAnalysisDaily(@RequestBody EpsInitialTrafficData queryParam){
|
||||
List<Map<String, Object>> echartsData = epsInitialTrafficDataService.getServerGraphicalAnalysisDaily(queryParam);
|
||||
return AjaxResult.success(echartsData);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 图形分析 - 95值/日
|
||||
@@ -75,6 +77,16 @@ public class EpsInitialTrafficDataController {
|
||||
@PostMapping("/getServerGraphicalAnalysisMonthy")
|
||||
public AjaxResult getServerGraphicalAnalysisMonthy(@RequestBody EpsInitialTrafficData queryParam){
|
||||
List<Map<String, Object>> echartsData = epsInitialTrafficDataService.getServerGraphicalAnalysisMonthy(queryParam);
|
||||
return AjaxResult.success(echartsData);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:list")
|
||||
@PostMapping("/getServerTrafficByMonitorView")
|
||||
public AjaxResult getServerTrafficByMonitorView(@RequestBody EpsInitialTrafficData queryParam)
|
||||
{
|
||||
Map<String, Object> echartsData = epsInitialTrafficDataService.getServerTrafficByMonitorView(queryParam);
|
||||
return success(echartsData);
|
||||
}
|
||||
}
|
||||
+17
@@ -329,4 +329,21 @@ public class EpsNodeBandwidthController extends BaseController
|
||||
List<EpsNodeBandwidth> list = epsNodeBandwidthService.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 95值列表
|
||||
* @param epsNodeBandwidth
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:list")
|
||||
@PostMapping("/getListByMonitorView")
|
||||
public TableDataInfo getListByMonitorView(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsNodeBandwidth.getPageNum());
|
||||
pageDomain.setPageSize(epsNodeBandwidth.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsNodeBandwidth> list = epsNodeBandwidthService.getListByMonitorView(epsNodeBandwidth);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -126,4 +126,25 @@ public class InitialSwitchInfoDetailsController extends BaseController
|
||||
List<Map<String, Object>> echartsData = initialSwitchInfoDetailsService.getGraphicalAnalysisMonthy(initialSwitchInfoDetails);
|
||||
return success(echartsData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:list")
|
||||
@PostMapping("/getSwitchTrafficByMonitorView")
|
||||
public AjaxResult getSwitchTrafficByMonitorView(@RequestBody InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
Map<String, Object> echartsData = initialSwitchInfoDetailsService.getMonitorViewDetails(initialSwitchInfoDetails);
|
||||
return success(echartsData);
|
||||
}
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量列表
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:list")
|
||||
@PostMapping("/geSwitchListByMonitorView")
|
||||
public TableDataInfo geSwitchListByMonitorView(@RequestBody InitialSwitchInfoDetails initialSwitchInfoDetails)
|
||||
{
|
||||
List<InitialSwitchInfoDetails> list = initialSwitchInfoDetailsService.geSwitchListByMonitorView(initialSwitchInfoDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
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.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.RmMonitorConfig;
|
||||
import com.ruoyi.system.service.IRmMonitorConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 监控配置Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitorConfig")
|
||||
public class RmMonitorConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmMonitorConfigService rmMonitorConfigService;
|
||||
|
||||
/**
|
||||
* 查询监控配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:monitorConfig:list")
|
||||
@PostMapping("/list")
|
||||
public AjaxResult list(@RequestBody RmMonitorConfig rmMonitorConfig)
|
||||
{
|
||||
List<RmMonitorConfig> list = rmMonitorConfigService.selectRmMonitorConfigList(rmMonitorConfig);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出监控配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:monitorConfig:export")
|
||||
@Log(title = "监控配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmMonitorConfig rmMonitorConfig)
|
||||
{
|
||||
List<RmMonitorConfig> list = rmMonitorConfigService.selectRmMonitorConfigList(rmMonitorConfig);
|
||||
ExcelUtil<RmMonitorConfig> util = new ExcelUtil<RmMonitorConfig>(RmMonitorConfig.class);
|
||||
util.exportExcel(response, list, "监控配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控配置详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:monitorConfig:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmMonitorConfigService.selectRmMonitorConfigById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控配置
|
||||
*/
|
||||
@RequiresPermissions("system:monitorConfig:add")
|
||||
@Log(title = "监控配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmMonitorConfig rmMonitorConfig)
|
||||
{
|
||||
return toAjax(rmMonitorConfigService.insertRmMonitorConfig(rmMonitorConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控配置
|
||||
*/
|
||||
@RequiresPermissions("system:monitorConfig:edit")
|
||||
@Log(title = "监控配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmMonitorConfig rmMonitorConfig)
|
||||
{
|
||||
return toAjax(rmMonitorConfigService.updateRmMonitorConfig(rmMonitorConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控配置
|
||||
*/
|
||||
@RequiresPermissions("system:monitorConfig:remove")
|
||||
@Log(title = "监控配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmMonitorConfigService.deleteRmMonitorConfigByIds(ids));
|
||||
}
|
||||
}
|
||||
+14
@@ -235,5 +235,19 @@ public class RmResourceRegistrationController extends BaseController
|
||||
int rows = rmResourceRegistrationService.bindBusinessByClientIds(rmResourceRegistration);
|
||||
return toAjax(rows);
|
||||
}
|
||||
/**
|
||||
* 根据clientId查询详情
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
@RequiresPermissions("system:registration:list")
|
||||
@PostMapping("/getServerMsgByClientId")
|
||||
public AjaxResult getServerMsgByClientId(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
List<RmResourceRegistration> list = rmResourceRegistrationService.selectRmResourceRegistrationList(rmResourceRegistration);
|
||||
if(list != null && !list.isEmpty()){
|
||||
return success(list.get(0));
|
||||
}
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.SysMenuClick;
|
||||
import com.ruoyi.system.service.ISysMenuClickService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 菜单点击计数Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sysMenuClick")
|
||||
public class SysMenuClickController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysMenuClickService sysMenuClickService;
|
||||
|
||||
/**
|
||||
* 查询菜单点击计数列表
|
||||
*/
|
||||
@RequiresPermissions("system:sysMenuClick:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SysMenuClick sysMenuClick)
|
||||
{
|
||||
List<SysMenuClick> list = sysMenuClickService.selectSysMenuClickList(sysMenuClick);
|
||||
return success(list);
|
||||
}
|
||||
/**
|
||||
* 新增菜单点击计数
|
||||
*/
|
||||
@RequiresPermissions("system:sysMenuClick:add")
|
||||
@Log(title = "菜单点击计数", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SysMenuClick sysMenuClick)
|
||||
{
|
||||
return toAjax(sysMenuClickService.insertSysMenuClick(sysMenuClick));
|
||||
}
|
||||
}
|
||||
@@ -79,5 +79,7 @@ public class AllInterfaceName extends BaseEntity
|
||||
private String value;
|
||||
/** 前端需要 name 别名 */
|
||||
private String label;
|
||||
/** 是否需要展开 */
|
||||
private boolean expand;
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -126,6 +126,8 @@ public class EpsInitialTrafficData extends BaseEntity {
|
||||
private String totalInSpeed;
|
||||
/** 总发送带宽 */
|
||||
private String totalOutSpeed;
|
||||
/** 监控看板id */
|
||||
private Long monitorId;
|
||||
|
||||
|
||||
}
|
||||
+4
-2
@@ -125,7 +125,9 @@ public class EpsNodeBandwidth extends BaseEntity
|
||||
private String clientId;
|
||||
/** 交换机连接的服务器客户端id */
|
||||
private String serverClientId;
|
||||
|
||||
|
||||
/** 监控看板配置id */
|
||||
private Long monitorId;
|
||||
/** 服务器id \n 分割 */
|
||||
private String clientIds;
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -126,4 +126,6 @@ public class InitialSwitchInfoDetails extends BaseEntity
|
||||
private BigDecimal percentile95;
|
||||
/** 单位 */
|
||||
private String unit;
|
||||
/** 监控看板概览id */
|
||||
private Long monitorId;
|
||||
}
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.system.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;
|
||||
|
||||
/**
|
||||
* 监控配置对象 rm_monitor_config
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public class RmMonitorConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 配置名称 */
|
||||
@Excel(name = "配置名称")
|
||||
private String configName;
|
||||
|
||||
/** 监控数据开始时间 */
|
||||
@Excel(name = "监控数据开始时间")
|
||||
private String monitorStartTime;
|
||||
|
||||
/** 资源类型 */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
|
||||
/** 部署设备 */
|
||||
@Excel(name = "部署设备")
|
||||
private String deployDevice;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setConfigName(String configName)
|
||||
{
|
||||
this.configName = configName;
|
||||
}
|
||||
|
||||
public String getConfigName()
|
||||
{
|
||||
return configName;
|
||||
}
|
||||
|
||||
public void setMonitorStartTime(String monitorStartTime)
|
||||
{
|
||||
this.monitorStartTime = monitorStartTime;
|
||||
}
|
||||
|
||||
public String getMonitorStartTime()
|
||||
{
|
||||
return monitorStartTime;
|
||||
}
|
||||
|
||||
public void setResourceType(String resourceType)
|
||||
{
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getResourceType()
|
||||
{
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
public void setDeployDevice(String deployDevice)
|
||||
{
|
||||
this.deployDevice = deployDevice;
|
||||
}
|
||||
|
||||
public String getDeployDevice()
|
||||
{
|
||||
return deployDevice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("configName", getConfigName())
|
||||
.append("monitorStartTime", getMonitorStartTime())
|
||||
.append("resourceType", getResourceType())
|
||||
.append("deployDevice", getDeployDevice())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 菜单点击计数对象 sys_menu_click
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public class SysMenuClick extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 页面路由标识(例如:system:user:list, business:order:manage) */
|
||||
@Excel(name = "页面路由标识", readConverterExp = "例=如:system:user:list,,b=usiness:order:manage")
|
||||
private String pageRoute;
|
||||
|
||||
/** 页面名称 */
|
||||
@Excel(name = "页面名称")
|
||||
private String pageName;
|
||||
|
||||
/** 点击次数 */
|
||||
@Excel(name = "点击次数")
|
||||
private Long clickCount;
|
||||
|
||||
/** 最后点击时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "最后点击时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date lastClickTime;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setPageRoute(String pageRoute)
|
||||
{
|
||||
this.pageRoute = pageRoute;
|
||||
}
|
||||
|
||||
public String getPageRoute()
|
||||
{
|
||||
return pageRoute;
|
||||
}
|
||||
|
||||
public void setPageName(String pageName)
|
||||
{
|
||||
this.pageName = pageName;
|
||||
}
|
||||
|
||||
public String getPageName()
|
||||
{
|
||||
return pageName;
|
||||
}
|
||||
|
||||
public void setClickCount(Long clickCount)
|
||||
{
|
||||
this.clickCount = clickCount;
|
||||
}
|
||||
|
||||
public Long getClickCount()
|
||||
{
|
||||
return clickCount;
|
||||
}
|
||||
|
||||
public void setLastClickTime(Date lastClickTime)
|
||||
{
|
||||
this.lastClickTime = lastClickTime;
|
||||
}
|
||||
|
||||
public Date getLastClickTime()
|
||||
{
|
||||
return lastClickTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("pageRoute", getPageRoute())
|
||||
.append("pageName", getPageName())
|
||||
.append("clickCount", getClickCount())
|
||||
.append("lastClickTime", getLastClickTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
+7
@@ -85,4 +85,11 @@ public interface EpsNodeBandwidthMapper
|
||||
int updateEpsNodeBandwidthByServerSn(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
int updateEpsNodeBandwidthBySwitchSn(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 95值列表
|
||||
* @param epsNodeBandwidth
|
||||
* @return
|
||||
*/
|
||||
List<EpsNodeBandwidth> getListByMonitorView(EpsNodeBandwidth epsNodeBandwidth);
|
||||
}
|
||||
|
||||
+7
@@ -82,4 +82,11 @@ public interface InitialSwitchInfoDetailsMapper
|
||||
* @return
|
||||
*/
|
||||
List<InitialSwitchInfoDetails> sumSwitchTrafficByclientIds(InitialSwitchInfoDetails queryParam);
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量列表
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
List<InitialSwitchInfoDetails> geSwitchListByMonitorView(InitialSwitchInfoDetails queryParam);
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmMonitorConfig;
|
||||
|
||||
/**
|
||||
* 监控配置Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface RmMonitorConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控配置
|
||||
*
|
||||
* @param id 监控配置主键
|
||||
* @return 监控配置
|
||||
*/
|
||||
public RmMonitorConfig selectRmMonitorConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询监控配置列表
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 监控配置集合
|
||||
*/
|
||||
public List<RmMonitorConfig> selectRmMonitorConfigList(RmMonitorConfig rmMonitorConfig);
|
||||
|
||||
/**
|
||||
* 新增监控配置
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmMonitorConfig(RmMonitorConfig rmMonitorConfig);
|
||||
|
||||
/**
|
||||
* 修改监控配置
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmMonitorConfig(RmMonitorConfig rmMonitorConfig);
|
||||
|
||||
/**
|
||||
* 删除监控配置
|
||||
*
|
||||
* @param id 监控配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmMonitorConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除监控配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmMonitorConfigByIds(Long[] ids);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysMenuClick;
|
||||
|
||||
/**
|
||||
* 菜单点击计数Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface SysMenuClickMapper
|
||||
{
|
||||
/**
|
||||
* 查询菜单点击计数
|
||||
*
|
||||
* @param id 菜单点击计数主键
|
||||
* @return 菜单点击计数
|
||||
*/
|
||||
public SysMenuClick selectSysMenuClickById(Long id);
|
||||
|
||||
/**
|
||||
* 查询菜单点击计数列表
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 菜单点击计数集合
|
||||
*/
|
||||
public List<SysMenuClick> selectSysMenuClickList(SysMenuClick sysMenuClick);
|
||||
|
||||
/**
|
||||
* 新增菜单点击计数
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysMenuClick(SysMenuClick sysMenuClick);
|
||||
|
||||
/**
|
||||
* 修改菜单点击计数
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysMenuClick(SysMenuClick sysMenuClick);
|
||||
|
||||
/**
|
||||
* 删除菜单点击计数
|
||||
*
|
||||
* @param id 菜单点击计数主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysMenuClickById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除菜单点击计数
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysMenuClickByIds(Long[] ids);
|
||||
}
|
||||
+7
@@ -87,4 +87,11 @@ public interface EpsInitialTrafficDataService {
|
||||
List<Map<String, Object>> getServerGraphicalAnalysisDaily(EpsInitialTrafficData queryParam);
|
||||
|
||||
List<Map<String, Object>> getServerGraphicalAnalysisMonthy(EpsInitialTrafficData queryParam);
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getServerTrafficByMonitorView(EpsInitialTrafficData queryParam);
|
||||
}
|
||||
|
||||
+7
@@ -87,4 +87,11 @@ public interface IEpsNodeBandwidthService
|
||||
* @return
|
||||
*/
|
||||
List<Map> graphicalAnalysis(EpsNodeBandwidth epsNodeBandwidth, String bandwidthType, ChronoUnit timeUnit);
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 95值列表
|
||||
* @param epsNodeBandwidth
|
||||
* @return
|
||||
*/
|
||||
List<EpsNodeBandwidth> getListByMonitorView(EpsNodeBandwidth epsNodeBandwidth);
|
||||
}
|
||||
|
||||
+14
@@ -109,4 +109,18 @@ public interface IInitialSwitchInfoDetailsService
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getGraphicalAnalysisMonthy(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量
|
||||
* @param initialSwitchInfoDetails
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getMonitorViewDetails(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量列表
|
||||
* @param initialSwitchInfoDetails
|
||||
* @return
|
||||
*/
|
||||
List<InitialSwitchInfoDetails> geSwitchListByMonitorView(InitialSwitchInfoDetails initialSwitchInfoDetails);
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmMonitorConfig;
|
||||
|
||||
/**
|
||||
* 监控配置Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface IRmMonitorConfigService
|
||||
{
|
||||
/**
|
||||
* 查询监控配置
|
||||
*
|
||||
* @param id 监控配置主键
|
||||
* @return 监控配置
|
||||
*/
|
||||
public RmMonitorConfig selectRmMonitorConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询监控配置列表
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 监控配置集合
|
||||
*/
|
||||
public List<RmMonitorConfig> selectRmMonitorConfigList(RmMonitorConfig rmMonitorConfig);
|
||||
|
||||
/**
|
||||
* 新增监控配置
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmMonitorConfig(RmMonitorConfig rmMonitorConfig);
|
||||
|
||||
/**
|
||||
* 修改监控配置
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmMonitorConfig(RmMonitorConfig rmMonitorConfig);
|
||||
|
||||
/**
|
||||
* 批量删除监控配置
|
||||
*
|
||||
* @param ids 需要删除的监控配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmMonitorConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除监控配置信息
|
||||
*
|
||||
* @param id 监控配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmMonitorConfigById(Long id);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysMenuClick;
|
||||
|
||||
/**
|
||||
* 菜单点击计数Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
public interface ISysMenuClickService
|
||||
{
|
||||
/**
|
||||
* 查询菜单点击计数
|
||||
*
|
||||
* @param id 菜单点击计数主键
|
||||
* @return 菜单点击计数
|
||||
*/
|
||||
public SysMenuClick selectSysMenuClickById(Long id);
|
||||
|
||||
/**
|
||||
* 查询菜单点击计数列表
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 菜单点击计数集合
|
||||
*/
|
||||
public List<SysMenuClick> selectSysMenuClickList(SysMenuClick sysMenuClick);
|
||||
|
||||
/**
|
||||
* 新增菜单点击计数
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysMenuClick(SysMenuClick sysMenuClick);
|
||||
|
||||
/**
|
||||
* 修改菜单点击计数
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysMenuClick(SysMenuClick sysMenuClick);
|
||||
|
||||
/**
|
||||
* 批量删除菜单点击计数
|
||||
*
|
||||
* @param ids 需要删除的菜单点击计数主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysMenuClickByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除菜单点击计数信息
|
||||
*
|
||||
* @param id 菜单点击计数主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysMenuClickById(Long id);
|
||||
}
|
||||
+86
-2
@@ -1,13 +1,20 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.api.RemoteRocketMqService;
|
||||
import com.ruoyi.system.api.domain.RmNetworkInterfaceRemote;
|
||||
import com.ruoyi.system.domain.AllInterfaceName;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.mapper.AllInterfaceNameMapper;
|
||||
import com.ruoyi.system.service.IAllInterfaceNameService;
|
||||
import com.ruoyi.system.service.IRmEpsTopologyManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 所有接口名称Service业务层处理
|
||||
@@ -20,6 +27,10 @@ public class AllInterfaceNameServiceImpl implements IAllInterfaceNameService
|
||||
{
|
||||
@Autowired
|
||||
private AllInterfaceNameMapper allInterfaceNameMapper;
|
||||
@Autowired
|
||||
private RemoteRocketMqService remoteRocketMqService;
|
||||
@Autowired
|
||||
private IRmEpsTopologyManagementService rmEpsTopologyManagementService;
|
||||
|
||||
/**
|
||||
* 查询所有接口名称
|
||||
@@ -35,14 +46,87 @@ public class AllInterfaceNameServiceImpl implements IAllInterfaceNameService
|
||||
|
||||
/**
|
||||
* 查询所有接口名称列表
|
||||
*
|
||||
*
|
||||
* @param allInterfaceName 所有接口名称
|
||||
* @return 所有接口名称
|
||||
*/
|
||||
@Override
|
||||
public List<AllInterfaceName> selectAllInterfaceNameList(AllInterfaceName allInterfaceName)
|
||||
{
|
||||
return allInterfaceNameMapper.selectAllInterfaceNameList(allInterfaceName);
|
||||
List<AllInterfaceName> allInterfaceNameList = allInterfaceNameMapper.selectAllInterfaceNameList(allInterfaceName);
|
||||
|
||||
if (allInterfaceNameList == null || allInterfaceNameList.isEmpty()) {
|
||||
return allInterfaceNameList;
|
||||
}
|
||||
|
||||
// 使用自定义排序
|
||||
return allInterfaceNameList.stream()
|
||||
.sorted((a, b) -> {
|
||||
boolean aMatched = isInterfaceMatched(a);
|
||||
boolean bMatched = isInterfaceMatched(b);
|
||||
|
||||
// 匹配的排在前面(返回-1),不匹配的排在后面(返回1)
|
||||
if (aMatched && !bMatched) {
|
||||
return -1;
|
||||
} else if (!aMatched && bMatched) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0; // 都匹配或都不匹配,保持原有顺序
|
||||
}
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 辅助方法,匹配的项排序在前
|
||||
* @param interfaceName
|
||||
* @return
|
||||
*/
|
||||
private boolean isInterfaceMatched(AllInterfaceName interfaceName) {
|
||||
String resourceType = interfaceName.getResourceType();
|
||||
|
||||
if ("1".equals(resourceType)) {
|
||||
// 服务器类型匹配逻辑
|
||||
RmNetworkInterfaceRemote rmNetworkInterfaceRemote = new RmNetworkInterfaceRemote();
|
||||
rmNetworkInterfaceRemote.setClientId(interfaceName.getClientId());
|
||||
R<List<RmNetworkInterfaceRemote>> netWorkListR = remoteRocketMqService.getNetworkInterfaceList(rmNetworkInterfaceRemote, SecurityConstants.INNER);
|
||||
|
||||
if (netWorkListR == null || netWorkListR.getData() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<RmNetworkInterfaceRemote> interfaceRemoteList = netWorkListR.getData();
|
||||
return interfaceRemoteList.stream()
|
||||
.filter(info -> "1".equals(info.getBindIp()) || "3".equals(info.getBindIp()))
|
||||
.anyMatch(internet ->
|
||||
interfaceName.getServerIp() != null && internet.getMacAddress() != null &&
|
||||
interfaceName.getServerIp().equalsIgnoreCase(internet.getMacAddress())
|
||||
);
|
||||
|
||||
} else if ("2".equals(resourceType)) {
|
||||
// 交换机类型匹配逻辑
|
||||
RmEpsTopologyManagement query = new RmEpsTopologyManagement();
|
||||
query.setClientId(interfaceName.getClientId());
|
||||
List<RmEpsTopologyManagement> topologyManagementList = rmEpsTopologyManagementService.selectRmEpsTopologyManagementList(query);
|
||||
|
||||
if (topologyManagementList == null || topologyManagementList.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
boolean isMatched = topologyManagementList.stream()
|
||||
.anyMatch(topologyManagement ->
|
||||
interfaceName.getInterfaceName() != null && topologyManagement.getInterfaceName() != null &&
|
||||
interfaceName.getInterfaceName().equalsIgnoreCase(topologyManagement.getInterfaceName())
|
||||
);
|
||||
|
||||
// 如果匹配成功,设置 expand 属性为 true
|
||||
if (isMatched) {
|
||||
interfaceName.setExpand(true);
|
||||
}
|
||||
|
||||
return isMatched;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+53
@@ -7,6 +7,7 @@ import com.ruoyi.system.domain.*;
|
||||
import com.ruoyi.system.enums.ReviewEnum;
|
||||
import com.ruoyi.system.mapper.*;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.service.IRmMonitorConfigService;
|
||||
import com.ruoyi.system.util.CalculateUtil;
|
||||
import com.ruoyi.system.util.DateUtil;
|
||||
import com.ruoyi.system.util.TableRouterUtil;
|
||||
@@ -51,6 +52,8 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
private RmEpsTopologyManagementMapper rmEpsTopologyManagementMapper;
|
||||
@Autowired
|
||||
private RmRegistrationMachineMapper rmRegistrationMachineMapper;
|
||||
@Autowired
|
||||
private IRmMonitorConfigService rmMonitorConfigService;
|
||||
@Override
|
||||
public void createNextMonthTables() {
|
||||
LocalDate nextMonth = LocalDate.now().plusMonths(1);
|
||||
@@ -584,6 +587,56 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
}
|
||||
return resultList.isEmpty() ? new ArrayList<>() : resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getServerTrafficByMonitorView(EpsInitialTrafficData queryParam) {
|
||||
// 查询概览配置内容
|
||||
RmMonitorConfig rmMonitorConfig = rmMonitorConfigService.selectRmMonitorConfigById(queryParam.getMonitorId());
|
||||
if(rmMonitorConfig != null){
|
||||
// 拿到开始时间
|
||||
String startTime = rmMonitorConfig.getMonitorStartTime();
|
||||
// 拿到部署设备
|
||||
String deoloyDevice = rmMonitorConfig.getDeployDevice();
|
||||
String clientIds = deoloyDevice.replace("\n",",");
|
||||
queryParam.setStartTime(startTime);
|
||||
queryParam.setClientIds(clientIds);
|
||||
List<EpsInitialTrafficData> list = getTrafficListByClientIds(queryParam);
|
||||
if(list == null){
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
try {
|
||||
String unit = SpeedUtils.calculateUnit(list, "inSpeed", "outSpeed");
|
||||
if(queryParam.getUnit() != null){
|
||||
unit = queryParam.getUnit();
|
||||
}
|
||||
BigDecimal divisor = SpeedUtils.getDivisor(unit);
|
||||
Map<String, Function<EpsInitialTrafficData, ?>> extractors = new LinkedHashMap<>();
|
||||
|
||||
extractors.put("netOutSpeedData", info ->
|
||||
info != null && info.getOutSpeed() != null ?
|
||||
new BigDecimal(info.getOutSpeed()).divide(divisor, 2, RoundingMode.HALF_UP) :
|
||||
0);
|
||||
extractors.put("netMachineFlowData", info ->
|
||||
info != null && info.getMachineFlow() != null ?
|
||||
new BigDecimal(info.getMachineFlow()).divide(divisor, 2, RoundingMode.HALF_UP) :
|
||||
0);
|
||||
Map<String, Object> resultMap = EchartsDataUtils.buildEchartsDataAutoPadding(
|
||||
list, EpsInitialTrafficData::getCreateTime, extractors, queryParam.getStartTime(), queryParam.getEndTime()
|
||||
);
|
||||
resultMap.put("unit", unit);
|
||||
return resultMap;
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务器网口网络速率
|
||||
* @param epsInitialTrafficData
|
||||
|
||||
+38
-6
@@ -5,13 +5,13 @@ import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
import com.ruoyi.system.domain.RmMonitorConfig;
|
||||
import com.ruoyi.system.domain.RmSwitchManagement;
|
||||
import com.ruoyi.system.mapper.EpsMethodChangeRecordMapper;
|
||||
import com.ruoyi.system.mapper.EpsNodeBandwidthMapper;
|
||||
import com.ruoyi.system.mapper.EpsServerRevenueConfigMapper;
|
||||
import com.ruoyi.system.mapper.RmSwitchManagementMapper;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.service.IEpsNodeBandwidthService;
|
||||
import com.ruoyi.system.service.IRmMonitorConfigService;
|
||||
import com.ruoyi.system.util.EchartsDataConverter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -44,11 +44,9 @@ public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
@Autowired
|
||||
private EpsServerRevenueConfigMapper epsServerRevenueConfigMapper;
|
||||
@Autowired
|
||||
private EpsMethodChangeRecordMapper epsMethodChangeRecordMapper;
|
||||
@Autowired
|
||||
private RmSwitchManagementMapper rmSwitchManagementMapper;
|
||||
@Autowired
|
||||
private IRmMonitorConfigService rmMonitorConfigService;
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
@@ -329,6 +327,40 @@ public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
/**
|
||||
* 监控看板-详情视图 95值列表
|
||||
* @param epsNodeBandwidth
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<EpsNodeBandwidth> getListByMonitorView(EpsNodeBandwidth epsNodeBandwidth) {
|
||||
// 查询概览配置内容
|
||||
RmMonitorConfig rmMonitorConfig = rmMonitorConfigService.selectRmMonitorConfigById(epsNodeBandwidth.getMonitorId());
|
||||
if(rmMonitorConfig != null){
|
||||
// 拿到部署设备
|
||||
String deoloyDevice = rmMonitorConfig.getDeployDevice();
|
||||
if(deoloyDevice == null){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
String clientIds = deoloyDevice.replace("\n",",");
|
||||
epsNodeBandwidth.setClientIds(clientIds);
|
||||
if(epsNodeBandwidth.getCalculationMode() == null){
|
||||
// 计算方式 默认1000
|
||||
epsNodeBandwidth.setCalculationMode("1000");
|
||||
}
|
||||
if(epsNodeBandwidth.getResourceType() == null){
|
||||
// 资源类型 默认服务器
|
||||
epsNodeBandwidth.setResourceType("1");
|
||||
}
|
||||
if(epsNodeBandwidth.getBandwidthType() == null){
|
||||
// 默认日95值
|
||||
epsNodeBandwidth.setBandwidthType("1");
|
||||
}
|
||||
List<EpsNodeBandwidth> list = epsNodeBandwidthMapper.getListByMonitorView(epsNodeBandwidth);
|
||||
return list;
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
// 动态生成复合键
|
||||
private String generateCompositeKey(EpsNodeBandwidth item) {
|
||||
|
||||
+101
@@ -5,10 +5,12 @@ import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.EchartsDataUtils;
|
||||
import com.ruoyi.common.core.utils.SpeedUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.system.domain.*;
|
||||
import com.ruoyi.system.enums.ReviewEnum;
|
||||
import com.ruoyi.system.mapper.*;
|
||||
import com.ruoyi.system.service.IInitialSwitchInfoDetailsService;
|
||||
import com.ruoyi.system.service.IRmMonitorConfigService;
|
||||
import com.ruoyi.system.util.CalculateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -28,6 +30,8 @@ import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.core.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* 交换机监控信息Service业务层处理
|
||||
*
|
||||
@@ -56,6 +60,8 @@ public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDe
|
||||
private RmSwitchInterfaceInfoMapper rmSwitchInterfaceInfoMapper;
|
||||
@Autowired
|
||||
private EpsBusinessDeployMapper epsBusinessDeployMapper;
|
||||
@Autowired
|
||||
private IRmMonitorConfigService rmMonitorConfigService;
|
||||
|
||||
private static final String DATE_TIME_FORMATTER = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
@@ -918,6 +924,101 @@ public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDe
|
||||
}
|
||||
return resultList.isEmpty() ? new ArrayList<>() : resultList;
|
||||
}
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量
|
||||
* @param initialSwitchInfoDetails
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> getMonitorViewDetails(InitialSwitchInfoDetails initialSwitchInfoDetails) {
|
||||
// 查询概览配置内容
|
||||
RmMonitorConfig rmMonitorConfig = rmMonitorConfigService.selectRmMonitorConfigById(initialSwitchInfoDetails.getMonitorId());
|
||||
if(rmMonitorConfig != null){
|
||||
// 拿到开始时间
|
||||
String startTime = rmMonitorConfig.getMonitorStartTime();
|
||||
// 拿到结束时间
|
||||
String endTime = initialSwitchInfoDetails.getEndTime();
|
||||
// 拿到选中的交换机
|
||||
String resources = rmMonitorConfig.getDeployDevice();
|
||||
String clientIds = Arrays.stream(resources.split(","))
|
||||
.map(msg -> msg.split(";"))
|
||||
.filter(resource -> resource.length >= 3)
|
||||
.map(resource -> resource[1])
|
||||
.collect(Collectors.joining(","));
|
||||
String interfaceNames = Arrays.stream(resources.split(","))
|
||||
.map(msg -> msg.split(";"))
|
||||
.filter(resource -> resource.length >= 3)
|
||||
.map(resource -> resource[2])
|
||||
.collect(Collectors.joining(","));
|
||||
// 查询流量信息
|
||||
InitialSwitchInfoDetails queryParam = new InitialSwitchInfoDetails();
|
||||
queryParam.setStartTime(startTime);
|
||||
queryParam.setEndTime(endTime);
|
||||
queryParam.setClientIds(clientIds);
|
||||
queryParam.setInterfaceNames(interfaceNames);
|
||||
List<InitialSwitchInfoDetails> list = initialSwitchInfoDetailsMapper.sumSwitchTrafficByclientIds(queryParam);
|
||||
try {
|
||||
String unit = SpeedUtils.calculateUnit(list, "inSpeed", "outSpeed");
|
||||
if(initialSwitchInfoDetails.getUnit() != null){
|
||||
unit = initialSwitchInfoDetails.getUnit();
|
||||
}
|
||||
BigDecimal divisor = SpeedUtils.getDivisor(unit);
|
||||
Map<String, Function<InitialSwitchInfoDetails, ?>> extractors = new LinkedHashMap<>();
|
||||
extractors.put("netInSpeedData", info ->
|
||||
info != null && info.getInSpeed() != null ?
|
||||
info.getInSpeed().divide(divisor, 2, RoundingMode.HALF_UP) :
|
||||
0);
|
||||
|
||||
extractors.put("netOutSpeedData", info ->
|
||||
info != null && info.getOutSpeed() != null ?
|
||||
info.getOutSpeed().divide(divisor, 2, RoundingMode.HALF_UP) :
|
||||
0);
|
||||
Map<String, Object> resultMap = EchartsDataUtils.buildEchartsDataAutoPadding(
|
||||
list, InitialSwitchInfoDetails::getCreateTime, extractors,
|
||||
queryParam.getStartTime(), queryParam.getEndTime());
|
||||
resultMap.put("unit", unit);
|
||||
return resultMap;
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 监控看板-详情视图 出入流量列表
|
||||
* @param initialSwitchInfoDetails
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<InitialSwitchInfoDetails> geSwitchListByMonitorView(InitialSwitchInfoDetails initialSwitchInfoDetails) {
|
||||
// 查询概览配置内容
|
||||
RmMonitorConfig rmMonitorConfig = rmMonitorConfigService.selectRmMonitorConfigById(initialSwitchInfoDetails.getMonitorId());
|
||||
if(rmMonitorConfig != null){
|
||||
// 拿到选中的交换机
|
||||
String resources = rmMonitorConfig.getDeployDevice();
|
||||
String clientIds = Arrays.stream(resources.split(","))
|
||||
.map(msg -> msg.split(";"))
|
||||
.filter(resource -> resource.length >= 3)
|
||||
.map(resource -> resource[1])
|
||||
.collect(Collectors.joining(","));
|
||||
String interfaceNames = Arrays.stream(resources.split(","))
|
||||
.map(msg -> msg.split(";"))
|
||||
.filter(resource -> resource.length >= 3)
|
||||
.map(resource -> resource[2])
|
||||
.collect(Collectors.joining(","));
|
||||
// 查询流量信息
|
||||
initialSwitchInfoDetails.setClientIds(clientIds);
|
||||
initialSwitchInfoDetails.setInterfaceNames(interfaceNames);
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(initialSwitchInfoDetails.getPageNum());
|
||||
pageDomain.setPageSize(initialSwitchInfoDetails.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<InitialSwitchInfoDetails> list = initialSwitchInfoDetailsMapper.geSwitchListByMonitorView(initialSwitchInfoDetails);
|
||||
return list;
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交换机网口网络速率
|
||||
* @param initialSwitchInfoDetails
|
||||
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmMonitorConfigMapper;
|
||||
import com.ruoyi.system.domain.RmMonitorConfig;
|
||||
import com.ruoyi.system.service.IRmMonitorConfigService;
|
||||
|
||||
/**
|
||||
* 监控配置Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Service
|
||||
public class RmMonitorConfigServiceImpl implements IRmMonitorConfigService
|
||||
{
|
||||
@Autowired
|
||||
private RmMonitorConfigMapper rmMonitorConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询监控配置
|
||||
*
|
||||
* @param id 监控配置主键
|
||||
* @return 监控配置
|
||||
*/
|
||||
@Override
|
||||
public RmMonitorConfig selectRmMonitorConfigById(Long id)
|
||||
{
|
||||
return rmMonitorConfigMapper.selectRmMonitorConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控配置列表
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 监控配置
|
||||
*/
|
||||
@Override
|
||||
public List<RmMonitorConfig> selectRmMonitorConfigList(RmMonitorConfig rmMonitorConfig)
|
||||
{
|
||||
return rmMonitorConfigMapper.selectRmMonitorConfigList(rmMonitorConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控配置
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRmMonitorConfig(RmMonitorConfig rmMonitorConfig)
|
||||
{
|
||||
rmMonitorConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return rmMonitorConfigMapper.insertRmMonitorConfig(rmMonitorConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控配置
|
||||
*
|
||||
* @param rmMonitorConfig 监控配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRmMonitorConfig(RmMonitorConfig rmMonitorConfig)
|
||||
{
|
||||
rmMonitorConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmMonitorConfigMapper.updateRmMonitorConfig(rmMonitorConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除监控配置
|
||||
*
|
||||
* @param ids 需要删除的监控配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmMonitorConfigByIds(Long[] ids)
|
||||
{
|
||||
return rmMonitorConfigMapper.deleteRmMonitorConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控配置信息
|
||||
*
|
||||
* @param id 监控配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmMonitorConfigById(Long id)
|
||||
{
|
||||
return rmMonitorConfigMapper.deleteRmMonitorConfigById(id);
|
||||
}
|
||||
}
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.SysMenuClick;
|
||||
import com.ruoyi.system.mapper.SysMenuClickMapper;
|
||||
import com.ruoyi.system.service.ISysMenuClickService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 菜单点击计数Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Service
|
||||
public class SysMenuClickServiceImpl implements ISysMenuClickService
|
||||
{
|
||||
@Autowired
|
||||
private SysMenuClickMapper sysMenuClickMapper;
|
||||
|
||||
/**
|
||||
* 查询菜单点击计数
|
||||
*
|
||||
* @param id 菜单点击计数主键
|
||||
* @return 菜单点击计数
|
||||
*/
|
||||
@Override
|
||||
public SysMenuClick selectSysMenuClickById(Long id)
|
||||
{
|
||||
return sysMenuClickMapper.selectSysMenuClickById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单点击计数列表
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 菜单点击计数
|
||||
*/
|
||||
@Override
|
||||
public List<SysMenuClick> selectSysMenuClickList(SysMenuClick sysMenuClick)
|
||||
{
|
||||
return sysMenuClickMapper.selectSysMenuClickList(sysMenuClick);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜单点击计数
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysMenuClick(SysMenuClick sysMenuClick)
|
||||
{
|
||||
// 查询该路由是否存在
|
||||
SysMenuClick query = new SysMenuClick();
|
||||
query.setPageRoute(sysMenuClick.getPageRoute());
|
||||
List<SysMenuClick> menuClickList = sysMenuClickMapper.selectSysMenuClickList(query);
|
||||
if(menuClickList != null && !menuClickList.isEmpty()){
|
||||
SysMenuClick menuClick = menuClickList.get(0);
|
||||
// 如果存在 计数
|
||||
Long count = menuClick.getClickCount() + 1;
|
||||
SysMenuClick updateData = new SysMenuClick();
|
||||
updateData.setId(menuClick.getId());
|
||||
updateData.setClickCount(count);
|
||||
updateData.setLastClickTime(DateUtils.getNowDate());
|
||||
sysMenuClickMapper.updateSysMenuClick(updateData);
|
||||
}else{
|
||||
sysMenuClick.setCreateTime(DateUtils.getNowDate());
|
||||
sysMenuClick.setLastClickTime(DateUtils.getNowDate());
|
||||
sysMenuClickMapper.insertSysMenuClick(sysMenuClick);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改菜单点击计数
|
||||
*
|
||||
* @param sysMenuClick 菜单点击计数
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysMenuClick(SysMenuClick sysMenuClick)
|
||||
{
|
||||
sysMenuClick.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysMenuClickMapper.updateSysMenuClick(sysMenuClick);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除菜单点击计数
|
||||
*
|
||||
* @param ids 需要删除的菜单点击计数主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysMenuClickByIds(Long[] ids)
|
||||
{
|
||||
return sysMenuClickMapper.deleteSysMenuClickByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单点击计数信息
|
||||
*
|
||||
* @param id 菜单点击计数主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysMenuClickById(Long id)
|
||||
{
|
||||
return sysMenuClickMapper.deleteSysMenuClickById(id);
|
||||
}
|
||||
}
|
||||
+1
@@ -273,6 +273,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="getTrafficListByClientIds" resultType="EpsInitialTrafficData">
|
||||
SELECT
|
||||
CAST(sum(ifnull(in_speed,0)) AS DECIMAL(20,0)) AS inSpeed,
|
||||
CAST(sum(ifnull(out_speed,0)) AS DECIMAL(20,0)) AS outSpeed,
|
||||
create_time AS createTime
|
||||
FROM ${tableName}
|
||||
|
||||
+18
@@ -314,4 +314,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getListByMonitorView" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
<include refid="selectEpsNodeBandwidthVo"/>
|
||||
<where>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="calculationMode != null and calculationMode != ''"> and calculation_mode = #{calculationMode}</if>
|
||||
<if test="bandwidthType != null and bandwidthType != ''"> and bandwidth_type = #{bandwidthType}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
<if test="clientIds != '' and clientIds != null">
|
||||
and client_id in
|
||||
<foreach collection="clientIds.split(',')" item="clientId" open="(" separator="," close=")">
|
||||
#{clientId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by bandwidth_95_daily asc
|
||||
</select>
|
||||
</mapper>
|
||||
+23
@@ -369,4 +369,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
group by create_time
|
||||
ORDER BY max_speed desc
|
||||
</select>
|
||||
<select id="geSwitchListByMonitorView" parameterType="InitialSwitchInfoDetails" resultType="InitialSwitchInfoDetails">
|
||||
select client_id clientId, name, in_speed inSpeed, out_speed outSpeed, create_time createTime from initial_switch_info_details
|
||||
<where>
|
||||
<if test="startTime != null">
|
||||
and create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="clientIds != '' and clientIds != null">
|
||||
and client_id in
|
||||
<foreach collection="clientIds.split(',')" item="clientId" open="(" separator="," close=")">
|
||||
#{clientId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="interfaceNames != null and interfaceNames != ''">
|
||||
and name in
|
||||
<foreach collection="interfaceNames.split(',')" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.RmMonitorConfigMapper">
|
||||
|
||||
<resultMap type="RmMonitorConfig" id="RmMonitorConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="configName" column="config_name" />
|
||||
<result property="monitorStartTime" column="monitor_start_time" />
|
||||
<result property="resourceType" column="resource_type" />
|
||||
<result property="deployDevice" column="deploy_device" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmMonitorConfigVo">
|
||||
select id, config_name, monitor_start_time, resource_type, deploy_device, create_time, update_time, create_by, update_by from rm_monitor_config
|
||||
</sql>
|
||||
|
||||
<select id="selectRmMonitorConfigList" parameterType="RmMonitorConfig" resultMap="RmMonitorConfigResult">
|
||||
<include refid="selectRmMonitorConfigVo"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''"> and config_name = #{configName}</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''"> and monitor_start_time = #{monitorStartTime}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="deployDevice != null and deployDevice != ''"> and deploy_device = #{deployDevice}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRmMonitorConfigById" parameterType="Long" resultMap="RmMonitorConfigResult">
|
||||
<include refid="selectRmMonitorConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmMonitorConfig" parameterType="RmMonitorConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_monitor_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="configName != null and configName != ''">config_name,</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''">monitor_start_time,</if>
|
||||
<if test="resourceType != null and resourceType != ''">resource_type,</if>
|
||||
<if test="deployDevice != null and deployDevice != ''">deploy_device,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="configName != null and configName != ''">#{configName},</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''">#{monitorStartTime},</if>
|
||||
<if test="resourceType != null and resourceType != ''">#{resourceType},</if>
|
||||
<if test="deployDevice != null and deployDevice != ''">#{deployDevice},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmMonitorConfig" parameterType="RmMonitorConfig">
|
||||
update rm_monitor_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||
<if test="monitorStartTime != null and monitorStartTime != ''">monitor_start_time = #{monitorStartTime},</if>
|
||||
<if test="resourceType != null and resourceType != ''">resource_type = #{resourceType},</if>
|
||||
<if test="deployDevice != null and deployDevice != ''">deploy_device = #{deployDevice},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRmMonitorConfigById" parameterType="Long">
|
||||
delete from rm_monitor_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmMonitorConfigByIds" parameterType="String">
|
||||
delete from rm_monitor_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.SysMenuClickMapper">
|
||||
|
||||
<resultMap type="SysMenuClick" id="SysMenuClickResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="pageRoute" column="page_route" />
|
||||
<result property="pageName" column="page_name" />
|
||||
<result property="clickCount" column="click_count" />
|
||||
<result property="lastClickTime" column="last_click_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysMenuClickVo">
|
||||
select id, page_route, page_name, click_count, last_click_time, create_by, create_time, update_by, update_time, remark from sys_menu_click
|
||||
</sql>
|
||||
|
||||
<select id="selectSysMenuClickList" parameterType="SysMenuClick" resultMap="SysMenuClickResult">
|
||||
<include refid="selectSysMenuClickVo"/>
|
||||
<where>
|
||||
<if test="pageRoute != null and pageRoute != ''"> and page_route = #{pageRoute}</if>
|
||||
<if test="pageName != null and pageName != ''"> and page_name like concat('%', #{pageName}, '%')</if>
|
||||
<if test="clickCount != null "> and click_count = #{clickCount}</if>
|
||||
<if test="lastClickTime != null "> and last_click_time = #{lastClickTime}</if>
|
||||
</where>
|
||||
order by click_count desc
|
||||
limit 8
|
||||
</select>
|
||||
|
||||
<select id="selectSysMenuClickById" parameterType="Long" resultMap="SysMenuClickResult">
|
||||
<include refid="selectSysMenuClickVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysMenuClick" parameterType="SysMenuClick" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_menu_click
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pageRoute != null and pageRoute != ''">page_route,</if>
|
||||
<if test="pageName != null">page_name,</if>
|
||||
<if test="clickCount != null">click_count,</if>
|
||||
<if test="lastClickTime != null">last_click_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pageRoute != null and pageRoute != ''">#{pageRoute},</if>
|
||||
<if test="pageName != null">#{pageName},</if>
|
||||
<if test="clickCount != null">#{clickCount},</if>
|
||||
<if test="lastClickTime != null">#{lastClickTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysMenuClick" parameterType="SysMenuClick">
|
||||
update sys_menu_click
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="pageRoute != null and pageRoute != ''">page_route = #{pageRoute},</if>
|
||||
<if test="pageName != null">page_name = #{pageName},</if>
|
||||
<if test="clickCount != null">click_count = #{clickCount},</if>
|
||||
<if test="lastClickTime != null">last_click_time = #{lastClickTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysMenuClickById" parameterType="Long">
|
||||
delete from sys_menu_click where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysMenuClickByIds" parameterType="String">
|
||||
delete from sys_menu_click where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
+17
-19
@@ -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.RmAlarmLog;
|
||||
import com.ruoyi.rocketmq.service.IRmAlarmLogService;
|
||||
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 RmAlarmLogController extends BaseController
|
||||
* 查询客户端告警信息列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmLog:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmAlarmLog rmAlarmLog)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmAlarmLog rmAlarmLog)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmAlarmLog.getPageNum());
|
||||
pageDomain.setPageSize(rmAlarmLog.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmAlarmLog> list = rmAlarmLogService.selectRmAlarmLogList(rmAlarmLog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -57,6 +54,7 @@ public class RmAlarmLogController extends BaseController
|
||||
{
|
||||
List<RmAlarmLog> list = rmAlarmLogService.selectRmAlarmLogList(rmAlarmLog);
|
||||
ExcelUtil<RmAlarmLog> util = new ExcelUtil<RmAlarmLog>(RmAlarmLog.class);
|
||||
util.showColumn(rmAlarmLog.getProperties());
|
||||
util.exportExcel(response, list, "客户端告警信息数据");
|
||||
}
|
||||
|
||||
|
||||
+17
-19
@@ -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.RmAlarmPushConfig;
|
||||
import com.ruoyi.rocketmq.service.IRmAlarmPushConfigService;
|
||||
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 RmAlarmPushConfigController extends BaseController
|
||||
* 查询告警推送配置列表
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:alarmPushConfig:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmAlarmPushConfig rmAlarmPushConfig)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmAlarmPushConfig rmAlarmPushConfig)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmAlarmPushConfig.getPageNum());
|
||||
pageDomain.setPageSize(rmAlarmPushConfig.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmAlarmPushConfig> list = rmAlarmPushConfigService.selectRmAlarmPushConfigList(rmAlarmPushConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -57,6 +54,7 @@ public class RmAlarmPushConfigController extends BaseController
|
||||
{
|
||||
List<RmAlarmPushConfig> list = rmAlarmPushConfigService.selectRmAlarmPushConfigList(rmAlarmPushConfig);
|
||||
ExcelUtil<RmAlarmPushConfig> util = new ExcelUtil<RmAlarmPushConfig>(RmAlarmPushConfig.class);
|
||||
util.showColumn(rmAlarmPushConfig.getProperties());
|
||||
util.exportExcel(response, list, "告警推送配置数据");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user