diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/InitialSwitchInfoDetails.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/InitialSwitchInfoDetails.java index c2b1f47..a27a4f0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/InitialSwitchInfoDetails.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/InitialSwitchInfoDetails.java @@ -96,4 +96,16 @@ public class InitialSwitchInfoDetails extends BaseEntity /** 交换机ip */ private String switchIp; + /** 端口配置速率(Mbps) */ + private BigDecimal ifSpeed; + /** 入站丢包 */ + private Integer ifInDiscards; + /** 出站丢包 */ + private Integer ifOutDiscards; + /** 错误的入站数据包数量 */ + private Integer ifInErrors; + /** 错误的出站数据包数量 */ + private Integer ifOutErrors; + /** 端口索引 */ + private Integer ifIndex; } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RmResourceGroupServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RmResourceGroupServiceImpl.java index eab79bf..8aa9cf0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RmResourceGroupServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RmResourceGroupServiceImpl.java @@ -131,6 +131,7 @@ public class RmResourceGroupServiceImpl implements IRmResourceGroupService StringBuilder resultStr = new StringBuilder(); String[] idArray = ids.split(","); for (String s : idArray) { + rmResourceGroup.setResourceIds(s); int rows = rmResourceGroupMapper.exitsResourceById(rmResourceGroup); if(rows > 0){ resultStr.append(s); diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/InitialSwitchInfoDetailsMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/InitialSwitchInfoDetailsMapper.xml index 846db99..405556a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/InitialSwitchInfoDetailsMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/InitialSwitchInfoDetailsMapper.xml @@ -27,10 +27,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + - select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, create_by, update_by, create_time, update_time, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn, business_code, business_name from initial_switch_info_details + select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, create_by, update_by, create_time, update_time, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn, business_code, business_name, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, if_index from initial_switch_info_details + INSERT IGNORE INTO initial_switch_info_details ( @@ -194,6 +225,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" in_speed, out_speed, switch_ip, + if_index, + if_speed, + if_in_discards, + if_out_discards, + if_in_errors, + if_out_errors, switch_name, interface_device_type, `server_name`, @@ -219,6 +256,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item.inSpeed}, #{item.outSpeed}, #{item.switchIp}, + #{item.ifIndex}, + #{item.ifSpeed}, + #{item.ifInDiscards}, + #{item.ifOutDiscards}, + #{item.ifInErrors}, + #{item.ifOutErrors}, #{item.switchName}, #{item.interfaceDeviceType}, #{item.serverName}, diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialOtherSystemMonitorDataController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialOtherSystemMonitorDataController.java new file mode 100644 index 0000000..27ecbce --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialOtherSystemMonitorDataController.java @@ -0,0 +1,105 @@ +package com.ruoyi.rocketmq.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.rocketmq.domain.InitialOtherSystemMonitorData; +import com.ruoyi.rocketmq.service.IInitialOtherSystemMonitorDataService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 系统其他信息监控数据Controller + * + * @author gyt + * @date 2025-09-23 + */ +@RestController +@RequestMapping("/otherSystemData") +public class InitialOtherSystemMonitorDataController extends BaseController +{ + @Autowired + private IInitialOtherSystemMonitorDataService initialOtherSystemMonitorDataService; + + /** + * 查询系统其他信息监控数据列表 + */ + @RequiresPermissions("rocketmq:otherSystemData:list") + @GetMapping("/list") + public TableDataInfo list(InitialOtherSystemMonitorData initialOtherSystemMonitorData) + { + startPage(); + List list = initialOtherSystemMonitorDataService.selectInitialOtherSystemMonitorDataList(initialOtherSystemMonitorData); + return getDataTable(list); + } + + /** + * 导出系统其他信息监控数据列表 + */ + @RequiresPermissions("rocketmq:otherSystemData:export") + @Log(title = "系统其他信息监控数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InitialOtherSystemMonitorData initialOtherSystemMonitorData) + { + List list = initialOtherSystemMonitorDataService.selectInitialOtherSystemMonitorDataList(initialOtherSystemMonitorData); + ExcelUtil util = new ExcelUtil(InitialOtherSystemMonitorData.class); + util.exportExcel(response, list, "系统其他信息监控数据数据"); + } + + /** + * 获取系统其他信息监控数据详细信息 + */ + @RequiresPermissions("rocketmq:otherSystemData:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(initialOtherSystemMonitorDataService.selectInitialOtherSystemMonitorDataById(id)); + } + + /** + * 新增系统其他信息监控数据 + */ + @RequiresPermissions("rocketmq:otherSystemData:add") + @Log(title = "系统其他信息监控数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody InitialOtherSystemMonitorData initialOtherSystemMonitorData) + { + return toAjax(initialOtherSystemMonitorDataService.insertInitialOtherSystemMonitorData(initialOtherSystemMonitorData)); + } + + /** + * 修改系统其他信息监控数据 + */ + @RequiresPermissions("rocketmq:otherSystemData:edit") + @Log(title = "系统其他信息监控数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody InitialOtherSystemMonitorData initialOtherSystemMonitorData) + { + return toAjax(initialOtherSystemMonitorDataService.updateInitialOtherSystemMonitorData(initialOtherSystemMonitorData)); + } + + /** + * 删除系统其他信息监控数据 + */ + @RequiresPermissions("rocketmq:otherSystemData:remove") + @Log(title = "系统其他信息监控数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(initialOtherSystemMonitorDataService.deleteInitialOtherSystemMonitorDataByIds(ids)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchFanInfoController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchFanInfoController.java new file mode 100644 index 0000000..7623868 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchFanInfoController.java @@ -0,0 +1,98 @@ +package com.ruoyi.rocketmq.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.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.InitialSwitchFanInfo; +import com.ruoyi.rocketmq.service.IInitialSwitchFanInfoService; +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-09-22 + */ +@RestController +@RequestMapping("/switchFanInfo") +public class InitialSwitchFanInfoController extends BaseController +{ + @Autowired + private IInitialSwitchFanInfoService initialSwitchFanInfoService; + + /** + * 查询风扇信息列表 + */ + @RequiresPermissions("rocketmq:info:list") + @GetMapping("/list") + public TableDataInfo list(InitialSwitchFanInfo initialSwitchFanInfo) + { + startPage(); + List list = initialSwitchFanInfoService.selectInitialSwitchFanInfoList(initialSwitchFanInfo); + return getDataTable(list); + } + + /** + * 导出风扇信息列表 + */ + @RequiresPermissions("rocketmq:info:export") + @Log(title = "风扇信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InitialSwitchFanInfo initialSwitchFanInfo) + { + List list = initialSwitchFanInfoService.selectInitialSwitchFanInfoList(initialSwitchFanInfo); + ExcelUtil util = new ExcelUtil(InitialSwitchFanInfo.class); + util.exportExcel(response, list, "风扇信息数据"); + } + + /** + * 获取风扇信息详细信息 + */ + @RequiresPermissions("rocketmq:info:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(initialSwitchFanInfoService.selectInitialSwitchFanInfoById(id)); + } + + /** + * 新增风扇信息 + */ + @RequiresPermissions("rocketmq:info:add") + @Log(title = "风扇信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo) + { + return toAjax(initialSwitchFanInfoService.insertInitialSwitchFanInfo(initialSwitchFanInfo)); + } + + /** + * 修改风扇信息 + */ + @RequiresPermissions("rocketmq:info:edit") + @Log(title = "风扇信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody InitialSwitchFanInfo initialSwitchFanInfo) + { + return toAjax(initialSwitchFanInfoService.updateInitialSwitchFanInfo(initialSwitchFanInfo)); + } + + /** + * 删除风扇信息 + */ + @RequiresPermissions("rocketmq:info:remove") + @Log(title = "风扇信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(initialSwitchFanInfoService.deleteInitialSwitchFanInfoByIds(ids)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchMpuInfoController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchMpuInfoController.java new file mode 100644 index 0000000..09a0c1b --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchMpuInfoController.java @@ -0,0 +1,98 @@ +package com.ruoyi.rocketmq.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.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.InitialSwitchMpuInfo; +import com.ruoyi.rocketmq.service.IInitialSwitchMpuInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * MPU信息Controller + * + * @author gyt + * @date 2025-09-22 + */ +@RestController +@RequestMapping("/switchMpuInfo") +public class InitialSwitchMpuInfoController extends BaseController +{ + @Autowired + private IInitialSwitchMpuInfoService initialSwitchMpuInfoService; + + /** + * 查询MPU信息列表 + */ + @RequiresPermissions("rocketmq:info:list") + @GetMapping("/list") + public TableDataInfo list(InitialSwitchMpuInfo initialSwitchMpuInfo) + { + startPage(); + List list = initialSwitchMpuInfoService.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo); + return getDataTable(list); + } + + /** + * 导出MPU信息列表 + */ + @RequiresPermissions("rocketmq:info:export") + @Log(title = "MPU信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InitialSwitchMpuInfo initialSwitchMpuInfo) + { + List list = initialSwitchMpuInfoService.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo); + ExcelUtil util = new ExcelUtil(InitialSwitchMpuInfo.class); + util.exportExcel(response, list, "MPU信息数据"); + } + + /** + * 获取MPU信息详细信息 + */ + @RequiresPermissions("rocketmq:info:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(initialSwitchMpuInfoService.selectInitialSwitchMpuInfoById(id)); + } + + /** + * 新增MPU信息 + */ + @RequiresPermissions("rocketmq:info:add") + @Log(title = "MPU信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo) + { + return toAjax(initialSwitchMpuInfoService.insertInitialSwitchMpuInfo(initialSwitchMpuInfo)); + } + + /** + * 修改MPU信息 + */ + @RequiresPermissions("rocketmq:info:edit") + @Log(title = "MPU信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody InitialSwitchMpuInfo initialSwitchMpuInfo) + { + return toAjax(initialSwitchMpuInfoService.updateInitialSwitchMpuInfo(initialSwitchMpuInfo)); + } + + /** + * 删除MPU信息 + */ + @RequiresPermissions("rocketmq:info:remove") + @Log(title = "MPU信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(initialSwitchMpuInfoService.deleteInitialSwitchMpuInfoByIds(ids)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchOpticalModuleController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchOpticalModuleController.java new file mode 100644 index 0000000..84a5783 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchOpticalModuleController.java @@ -0,0 +1,105 @@ +package com.ruoyi.rocketmq.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule; +import com.ruoyi.rocketmq.service.IInitialSwitchOpticalModuleService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 光模块信息Controller + * + * @author gyt + * @date 2025-09-22 + */ +@RestController +@RequestMapping("/switchOpticalModule") +public class InitialSwitchOpticalModuleController extends BaseController +{ + @Autowired + private IInitialSwitchOpticalModuleService initialSwitchOpticalModuleService; + + /** + * 查询光模块信息列表 + */ + @RequiresPermissions("rocketmq:module:list") + @GetMapping("/list") + public TableDataInfo list(InitialSwitchOpticalModule initialSwitchOpticalModule) + { + startPage(); + List list = initialSwitchOpticalModuleService.selectInitialSwitchOpticalModuleList(initialSwitchOpticalModule); + return getDataTable(list); + } + + /** + * 导出光模块信息列表 + */ + @RequiresPermissions("rocketmq:module:export") + @Log(title = "光模块信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InitialSwitchOpticalModule initialSwitchOpticalModule) + { + List list = initialSwitchOpticalModuleService.selectInitialSwitchOpticalModuleList(initialSwitchOpticalModule); + ExcelUtil util = new ExcelUtil(InitialSwitchOpticalModule.class); + util.exportExcel(response, list, "光模块信息数据"); + } + + /** + * 获取光模块信息详细信息 + */ + @RequiresPermissions("rocketmq:module:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(initialSwitchOpticalModuleService.selectInitialSwitchOpticalModuleById(id)); + } + + /** + * 新增光模块信息 + */ + @RequiresPermissions("rocketmq:module:add") + @Log(title = "光模块信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule) + { + return toAjax(initialSwitchOpticalModuleService.insertInitialSwitchOpticalModule(initialSwitchOpticalModule)); + } + + /** + * 修改光模块信息 + */ + @RequiresPermissions("rocketmq:module:edit") + @Log(title = "光模块信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody InitialSwitchOpticalModule initialSwitchOpticalModule) + { + return toAjax(initialSwitchOpticalModuleService.updateInitialSwitchOpticalModule(initialSwitchOpticalModule)); + } + + /** + * 删除光模块信息 + */ + @RequiresPermissions("rocketmq:module:remove") + @Log(title = "光模块信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(initialSwitchOpticalModuleService.deleteInitialSwitchOpticalModuleByIds(ids)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchOtherCollectDataController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchOtherCollectDataController.java new file mode 100644 index 0000000..52cb4df --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchOtherCollectDataController.java @@ -0,0 +1,105 @@ +package com.ruoyi.rocketmq.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData; +import com.ruoyi.rocketmq.service.IInitialSwitchOtherCollectDataService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 交换机系统其他信息采集数据Controller + * + * @author gyt + * @date 2025-09-23 + */ +@RestController +@RequestMapping("/switchOtherData") +public class InitialSwitchOtherCollectDataController extends BaseController +{ + @Autowired + private IInitialSwitchOtherCollectDataService initialSwitchOtherCollectDataService; + + /** + * 查询交换机系统其他信息采集数据列表 + */ + @RequiresPermissions("rocketmq:switchOtherData:list") + @GetMapping("/list") + public TableDataInfo list(InitialSwitchOtherCollectData initialSwitchOtherCollectData) + { + startPage(); + List list = initialSwitchOtherCollectDataService.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData); + return getDataTable(list); + } + + /** + * 导出交换机系统其他信息采集数据列表 + */ + @RequiresPermissions("rocketmq:switchOtherData:export") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InitialSwitchOtherCollectData initialSwitchOtherCollectData) + { + List list = initialSwitchOtherCollectDataService.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData); + ExcelUtil util = new ExcelUtil(InitialSwitchOtherCollectData.class); + util.exportExcel(response, list, "交换机系统其他信息采集数据数据"); + } + + /** + * 获取交换机系统其他信息采集数据详细信息 + */ + @RequiresPermissions("rocketmq:switchOtherData:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(initialSwitchOtherCollectDataService.selectInitialSwitchOtherCollectDataById(id)); + } + + /** + * 新增交换机系统其他信息采集数据 + */ + @RequiresPermissions("rocketmq:switchOtherData:add") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData) + { + return toAjax(initialSwitchOtherCollectDataService.insertInitialSwitchOtherCollectData(initialSwitchOtherCollectData)); + } + + /** + * 修改交换机系统其他信息采集数据 + */ + @RequiresPermissions("rocketmq:switchOtherData:edit") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody InitialSwitchOtherCollectData initialSwitchOtherCollectData) + { + return toAjax(initialSwitchOtherCollectDataService.updateInitialSwitchOtherCollectData(initialSwitchOtherCollectData)); + } + + /** + * 删除交换机系统其他信息采集数据 + */ + @RequiresPermissions("rocketmq:switchOtherData:remove") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(initialSwitchOtherCollectDataService.deleteInitialSwitchOtherCollectDataByIds(ids)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchPowerSupplyController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchPowerSupplyController.java new file mode 100644 index 0000000..5648119 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSwitchPowerSupplyController.java @@ -0,0 +1,98 @@ +package com.ruoyi.rocketmq.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.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.InitialSwitchPowerSupply; +import com.ruoyi.rocketmq.service.IInitialSwitchPowerSupplyService; +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-09-22 + */ +@RestController +@RequestMapping("/switchPowerSupply") +public class InitialSwitchPowerSupplyController extends BaseController +{ + @Autowired + private IInitialSwitchPowerSupplyService initialSwitchPowerSupplyService; + + /** + * 查询电源信息列表 + */ + @RequiresPermissions("rocketmq:supply:list") + @GetMapping("/list") + public TableDataInfo list(InitialSwitchPowerSupply initialSwitchPowerSupply) + { + startPage(); + List list = initialSwitchPowerSupplyService.selectInitialSwitchPowerSupplyList(initialSwitchPowerSupply); + return getDataTable(list); + } + + /** + * 导出电源信息列表 + */ + @RequiresPermissions("rocketmq:supply:export") + @Log(title = "电源信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InitialSwitchPowerSupply initialSwitchPowerSupply) + { + List list = initialSwitchPowerSupplyService.selectInitialSwitchPowerSupplyList(initialSwitchPowerSupply); + ExcelUtil util = new ExcelUtil(InitialSwitchPowerSupply.class); + util.exportExcel(response, list, "电源信息数据"); + } + + /** + * 获取电源信息详细信息 + */ + @RequiresPermissions("rocketmq:supply:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(initialSwitchPowerSupplyService.selectInitialSwitchPowerSupplyById(id)); + } + + /** + * 新增电源信息 + */ + @RequiresPermissions("rocketmq:supply:add") + @Log(title = "电源信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply) + { + return toAjax(initialSwitchPowerSupplyService.insertInitialSwitchPowerSupply(initialSwitchPowerSupply)); + } + + /** + * 修改电源信息 + */ + @RequiresPermissions("rocketmq:supply:edit") + @Log(title = "电源信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody InitialSwitchPowerSupply initialSwitchPowerSupply) + { + return toAjax(initialSwitchPowerSupplyService.updateInitialSwitchPowerSupply(initialSwitchPowerSupply)); + } + + /** + * 删除电源信息 + */ + @RequiresPermissions("rocketmq:supply:remove") + @Log(title = "电源信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(initialSwitchPowerSupplyService.deleteInitialSwitchPowerSupplyByIds(ids)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSystemOtherCollectDataController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSystemOtherCollectDataController.java new file mode 100644 index 0000000..d5229f2 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/InitialSystemOtherCollectDataController.java @@ -0,0 +1,105 @@ +package com.ruoyi.rocketmq.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.rocketmq.domain.InitialSystemOtherCollectData; +import com.ruoyi.rocketmq.service.IInitialSystemOtherCollectDataService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 交换机系统其他信息采集数据Controller + * + * @author gyt + * @date 2025-09-23 + */ +@RestController +@RequestMapping("/systemOtherCollectData") +public class InitialSystemOtherCollectDataController extends BaseController +{ + @Autowired + private IInitialSystemOtherCollectDataService initialSystemOtherCollectDataService; + + /** + * 查询交换机系统其他信息采集数据列表 + */ + @RequiresPermissions("rocketmq:systemOtherCollectData:list") + @GetMapping("/list") + public TableDataInfo list(InitialSystemOtherCollectData initialSystemOtherCollectData) + { + startPage(); + List list = initialSystemOtherCollectDataService.selectInitialSystemOtherCollectDataList(initialSystemOtherCollectData); + return getDataTable(list); + } + + /** + * 导出交换机系统其他信息采集数据列表 + */ + @RequiresPermissions("rocketmq:systemOtherCollectData:export") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, InitialSystemOtherCollectData initialSystemOtherCollectData) + { + List list = initialSystemOtherCollectDataService.selectInitialSystemOtherCollectDataList(initialSystemOtherCollectData); + ExcelUtil util = new ExcelUtil(InitialSystemOtherCollectData.class); + util.exportExcel(response, list, "交换机系统其他信息采集数据数据"); + } + + /** + * 获取交换机系统其他信息采集数据详细信息 + */ + @RequiresPermissions("rocketmq:systemOtherCollectData:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(initialSystemOtherCollectDataService.selectInitialSystemOtherCollectDataById(id)); + } + + /** + * 新增交换机系统其他信息采集数据 + */ + @RequiresPermissions("rocketmq:systemOtherCollectData:add") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) + { + return toAjax(initialSystemOtherCollectDataService.insertInitialSystemOtherCollectData(initialSystemOtherCollectData)); + } + + /** + * 修改交换机系统其他信息采集数据 + */ + @RequiresPermissions("rocketmq:systemOtherCollectData:edit") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody InitialSystemOtherCollectData initialSystemOtherCollectData) + { + return toAjax(initialSystemOtherCollectDataService.updateInitialSystemOtherCollectData(initialSystemOtherCollectData)); + } + + /** + * 删除交换机系统其他信息采集数据 + */ + @RequiresPermissions("rocketmq:systemOtherCollectData:remove") + @Log(title = "交换机系统其他信息采集数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(initialSystemOtherCollectDataService.deleteInitialSystemOtherCollectDataByIds(ids)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/RmDeploymentPolicyController.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/RmDeploymentPolicyController.java new file mode 100644 index 0000000..b599bc8 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/controller/RmDeploymentPolicyController.java @@ -0,0 +1,112 @@ +package com.ruoyi.rocketmq.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.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.RmDeploymentPolicy; +import com.ruoyi.rocketmq.service.IRmDeploymentPolicyService; +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-09-15 + */ +@RestController +@RequestMapping("/policy") +public class RmDeploymentPolicyController extends BaseController +{ + @Autowired + private IRmDeploymentPolicyService rmDeploymentPolicyService; + + /** + * 查询服务器脚本策略列表 + */ + @RequiresPermissions("rocketmq:policy:list") + @PostMapping("/list") + public TableDataInfo list(@RequestBody RmDeploymentPolicy rmDeploymentPolicy) + { + PageDomain pageDomain = new PageDomain(); + pageDomain.setPageNum(rmDeploymentPolicy.getPageNum()); + pageDomain.setPageSize(rmDeploymentPolicy.getPageSize()); + startPage(pageDomain); + List list = rmDeploymentPolicyService.selectRmDeploymentPolicyList(rmDeploymentPolicy); + return getDataTable(list); + } + + /** + * 导出服务器脚本策略列表 + */ + @RequiresPermissions("rocketmq:policy:export") + @Log(title = "服务器脚本策略", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, RmDeploymentPolicy rmDeploymentPolicy) + { + List list = rmDeploymentPolicyService.selectRmDeploymentPolicyList(rmDeploymentPolicy); + ExcelUtil util = new ExcelUtil(RmDeploymentPolicy.class); + util.exportExcel(response, list, "服务器脚本策略数据"); + } + + /** + * 获取服务器脚本策略详细信息 + */ + @RequiresPermissions("rocketmq:policy:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(rmDeploymentPolicyService.selectRmDeploymentPolicyById(id)); + } + + /** + * 新增服务器脚本策略 + */ + @RequiresPermissions("rocketmq:policy:add") + @Log(title = "服务器脚本策略", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody RmDeploymentPolicy rmDeploymentPolicy) + { + return toAjax(rmDeploymentPolicyService.insertRmDeploymentPolicy(rmDeploymentPolicy)); + } + + /** + * 修改服务器脚本策略 + */ + @RequiresPermissions("rocketmq:policy:edit") + @Log(title = "服务器脚本策略", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody RmDeploymentPolicy rmDeploymentPolicy) + { + return toAjax(rmDeploymentPolicyService.updateRmDeploymentPolicy(rmDeploymentPolicy)); + } + + /** + * 删除服务器脚本策略 + */ + @RequiresPermissions("rocketmq:policy:remove") + @Log(title = "服务器脚本策略", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(rmDeploymentPolicyService.deleteRmDeploymentPolicyByIds(ids)); + } + + /** + * 下发服务器脚本策略 + */ + @RequiresPermissions("rocketmq:policy:list") + @GetMapping(value = "/issueDeploymentPolicy") + public AjaxResult issueDeploymentPolicy(Long id) + { + return success(rmDeploymentPolicyService.issueDeploymentPolicy(id)); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialOtherSystemMonitorData.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialOtherSystemMonitorData.java new file mode 100644 index 0000000..75b79da --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialOtherSystemMonitorData.java @@ -0,0 +1,316 @@ +package com.ruoyi.rocketmq.domain; + +import java.math.BigDecimal; +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; + +/** + * 系统其他信息监控数据对象 initial_other_system_monitor_data + * + * @author gyt + * @date 2025-09-23 + */ +public class InitialOtherSystemMonitorData extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 客户端ID */ + @Excel(name = "客户端ID") + private String clientId; + + /** 交换卷/文件的可用空间(字节)采集 */ + @Excel(name = "交换卷/文件的可用空间", readConverterExp = "字=节") + private Long systemSwapSizeFreeCollect; + + /** 可用交换空间百分比采集 */ + @Excel(name = "可用交换空间百分比采集") + private BigDecimal systemSwapSizePercentCollect; + + /** 内存利用率采集 */ + @Excel(name = "内存利用率采集") + private BigDecimal memoryUtilizationCollect; + + /** 可用内存采集 */ + @Excel(name = "可用内存采集") + private Long memorySizeAvailableCollect; + + /** 可用内存百分比采集 */ + @Excel(name = "可用内存百分比采集") + private BigDecimal memorySizePercentCollect; + + /** 总内存采集 */ + @Excel(name = "总内存采集") + private Long memorySizeTotalCollect; + + /** 操作系统采集 */ + @Excel(name = "操作系统采集") + private String systemSwOsCollect; + + /** 操作系统架构采集 */ + @Excel(name = "操作系统架构采集") + private String systemSwArchCollect; + + /** 最大进程数采集 */ + @Excel(name = "最大进程数采集") + private Long kernelMaxprocCollect; + + /** 正在运行的进程数采集 */ + @Excel(name = "正在运行的进程数采集") + private Long procNumRunCollect; + + /** 登录用户数采集 */ + @Excel(name = "登录用户数采集") + private Long systemUsersNumCollect; + + /** 硬盘总可用空间采集 */ + @Excel(name = "硬盘总可用空间采集") + private Long systemDiskSizeTotalCollect; + + /** 系统启动时间采集 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "系统启动时间采集", width = 30, dateFormat = "yyyy-MM-dd") + private Date systemBoottimeCollect; + + /** 系统描述采集 */ + @Excel(name = "系统描述采集") + private String systemUnameCollect; + + /** 系统本地时间采集 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "系统本地时间采集", width = 30, dateFormat = "yyyy-MM-dd") + private Date systemLocaltimeCollect; + + /** 系统正常运行时间采集 */ + @Excel(name = "系统正常运行时间采集") + private Long systemUptimeCollect; + + /** 进程数采集 */ + @Excel(name = "进程数采集") + private Long procNumCollect; + + 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 setSystemSwapSizeFreeCollect(Long systemSwapSizeFreeCollect) + { + this.systemSwapSizeFreeCollect = systemSwapSizeFreeCollect; + } + + public Long getSystemSwapSizeFreeCollect() + { + return systemSwapSizeFreeCollect; + } + + public void setSystemSwapSizePercentCollect(BigDecimal systemSwapSizePercentCollect) + { + this.systemSwapSizePercentCollect = systemSwapSizePercentCollect; + } + + public BigDecimal getSystemSwapSizePercentCollect() + { + return systemSwapSizePercentCollect; + } + + public void setMemoryUtilizationCollect(BigDecimal memoryUtilizationCollect) + { + this.memoryUtilizationCollect = memoryUtilizationCollect; + } + + public BigDecimal getMemoryUtilizationCollect() + { + return memoryUtilizationCollect; + } + + public void setMemorySizeAvailableCollect(Long memorySizeAvailableCollect) + { + this.memorySizeAvailableCollect = memorySizeAvailableCollect; + } + + public Long getMemorySizeAvailableCollect() + { + return memorySizeAvailableCollect; + } + + public void setMemorySizePercentCollect(BigDecimal memorySizePercentCollect) + { + this.memorySizePercentCollect = memorySizePercentCollect; + } + + public BigDecimal getMemorySizePercentCollect() + { + return memorySizePercentCollect; + } + + public void setMemorySizeTotalCollect(Long memorySizeTotalCollect) + { + this.memorySizeTotalCollect = memorySizeTotalCollect; + } + + public Long getMemorySizeTotalCollect() + { + return memorySizeTotalCollect; + } + + public void setSystemSwOsCollect(String systemSwOsCollect) + { + this.systemSwOsCollect = systemSwOsCollect; + } + + public String getSystemSwOsCollect() + { + return systemSwOsCollect; + } + + public void setSystemSwArchCollect(String systemSwArchCollect) + { + this.systemSwArchCollect = systemSwArchCollect; + } + + public String getSystemSwArchCollect() + { + return systemSwArchCollect; + } + + public void setKernelMaxprocCollect(Long kernelMaxprocCollect) + { + this.kernelMaxprocCollect = kernelMaxprocCollect; + } + + public Long getKernelMaxprocCollect() + { + return kernelMaxprocCollect; + } + + public void setProcNumRunCollect(Long procNumRunCollect) + { + this.procNumRunCollect = procNumRunCollect; + } + + public Long getProcNumRunCollect() + { + return procNumRunCollect; + } + + public void setSystemUsersNumCollect(Long systemUsersNumCollect) + { + this.systemUsersNumCollect = systemUsersNumCollect; + } + + public Long getSystemUsersNumCollect() + { + return systemUsersNumCollect; + } + + public void setSystemDiskSizeTotalCollect(Long systemDiskSizeTotalCollect) + { + this.systemDiskSizeTotalCollect = systemDiskSizeTotalCollect; + } + + public Long getSystemDiskSizeTotalCollect() + { + return systemDiskSizeTotalCollect; + } + + public void setSystemBoottimeCollect(Date systemBoottimeCollect) + { + this.systemBoottimeCollect = systemBoottimeCollect; + } + + public Date getSystemBoottimeCollect() + { + return systemBoottimeCollect; + } + + public void setSystemUnameCollect(String systemUnameCollect) + { + this.systemUnameCollect = systemUnameCollect; + } + + public String getSystemUnameCollect() + { + return systemUnameCollect; + } + + public void setSystemLocaltimeCollect(Date systemLocaltimeCollect) + { + this.systemLocaltimeCollect = systemLocaltimeCollect; + } + + public Date getSystemLocaltimeCollect() + { + return systemLocaltimeCollect; + } + + public void setSystemUptimeCollect(Long systemUptimeCollect) + { + this.systemUptimeCollect = systemUptimeCollect; + } + + public Long getSystemUptimeCollect() + { + return systemUptimeCollect; + } + + public void setProcNumCollect(Long procNumCollect) + { + this.procNumCollect = procNumCollect; + } + + public Long getProcNumCollect() + { + return procNumCollect; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("clientId", getClientId()) + .append("systemSwapSizeFreeCollect", getSystemSwapSizeFreeCollect()) + .append("systemSwapSizePercentCollect", getSystemSwapSizePercentCollect()) + .append("memoryUtilizationCollect", getMemoryUtilizationCollect()) + .append("memorySizeAvailableCollect", getMemorySizeAvailableCollect()) + .append("memorySizePercentCollect", getMemorySizePercentCollect()) + .append("memorySizeTotalCollect", getMemorySizeTotalCollect()) + .append("systemSwOsCollect", getSystemSwOsCollect()) + .append("systemSwArchCollect", getSystemSwArchCollect()) + .append("kernelMaxprocCollect", getKernelMaxprocCollect()) + .append("procNumRunCollect", getProcNumRunCollect()) + .append("systemUsersNumCollect", getSystemUsersNumCollect()) + .append("systemDiskSizeTotalCollect", getSystemDiskSizeTotalCollect()) + .append("systemBoottimeCollect", getSystemBoottimeCollect()) + .append("systemUnameCollect", getSystemUnameCollect()) + .append("systemLocaltimeCollect", getSystemLocaltimeCollect()) + .append("systemUptimeCollect", getSystemUptimeCollect()) + .append("procNumCollect", getProcNumCollect()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchFanInfo.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchFanInfo.java new file mode 100644 index 0000000..25a74fc --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchFanInfo.java @@ -0,0 +1,101 @@ +package com.ruoyi.rocketmq.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 风扇信息对象 initial_switch_fan_info + * + * @author gyt + * @date 2025-09-22 + */ +public class InitialSwitchFanInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 风扇索引 */ + @Excel(name = "风扇索引") + private String fanEntIndex; + + /** 风扇名称 */ + @Excel(name = "风扇名称") + private String fanName; + + /** 风扇状态 */ + @Excel(name = "风扇状态") + private String fanEntityFanState; + + /** 客户端ID */ + @Excel(name = "客户端ID") + private String clientId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setFanEntIndex(String fanEntIndex) + { + this.fanEntIndex = fanEntIndex; + } + + public String getFanEntIndex() + { + return fanEntIndex; + } + + public void setFanName(String fanName) + { + this.fanName = fanName; + } + + public String getFanName() + { + return fanName; + } + + public void setFanEntityFanState(String fanEntityFanState) + { + this.fanEntityFanState = fanEntityFanState; + } + + public String getFanEntityFanState() + { + return fanEntityFanState; + } + + public void setClientId(String clientId) + { + this.clientId = clientId; + } + + public String getClientId() + { + return clientId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("fanEntIndex", getFanEntIndex()) + .append("fanName", getFanName()) + .append("fanEntityFanState", getFanEntityFanState()) + .append("clientId", getClientId()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfo.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfo.java index d9f3ed0..6f7e3fb 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfo.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfo.java @@ -1,5 +1,7 @@ package com.ruoyi.rocketmq.domain; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; import com.ruoyi.common.core.annotation.Excel; import com.ruoyi.common.core.web.domain.BaseEntity; import lombok.Data; @@ -13,6 +15,7 @@ import java.math.BigDecimal; * @date 2025-08-25 */ @Data +@JsonIgnoreProperties(ignoreUnknown = true) public class InitialSwitchInfo extends BaseEntity { private static final long serialVersionUID = 1L; @@ -26,14 +29,19 @@ public class InitialSwitchInfo extends BaseEntity private String clientId; /** 名称 */ + @JsonProperty("ifDescr") private String name; /** 接收流量 */ + @JsonProperty("ifHCInOctets") private BigDecimal inBytes; /** 发送流量 */ + @JsonProperty("ifHCOutOctets") private BigDecimal outBytes; /** 状态 */ + @JsonProperty("ifOperStatus") private String status; /** 类型 */ + @JsonProperty("ifType") private String type; /** 接收流量(bytes/s) */ private BigDecimal inSpeed; @@ -41,6 +49,18 @@ public class InitialSwitchInfo extends BaseEntity private BigDecimal outSpeed; /** 交换机ip */ private String switchIp; + /** 端口配置速率(Mbps) */ + private BigDecimal ifSpeed; + /** 入站丢包 */ + private Integer ifInDiscards; + /** 出站丢包 */ + private Integer ifOutDiscards; + /** 错误的入站数据包数量 */ + private Integer ifInErrors; + /** 错误的出站数据包数量 */ + private Integer ifOutErrors; + /** 端口索引 */ + private Integer ifIndex; } diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfoTemp.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfoTemp.java index fe8e497..80afcc3 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfoTemp.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchInfoTemp.java @@ -53,4 +53,16 @@ public class InitialSwitchInfoTemp extends BaseEntity private BigDecimal outSpeed; /** 交换机ip */ private String switchIp; + /** 端口配置速率(Mbps) */ + private BigDecimal ifSpeed; + /** 入站丢包 */ + private Integer ifInDiscards; + /** 出站丢包 */ + private Integer ifOutDiscards; + /** 错误的入站数据包数量 */ + private Integer ifInErrors; + /** 错误的出站数据包数量 */ + private Integer ifOutErrors; + /** 端口索引 */ + private Integer ifIndex; } diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchMpuInfo.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchMpuInfo.java new file mode 100644 index 0000000..c31ad3d --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchMpuInfo.java @@ -0,0 +1,147 @@ +package com.ruoyi.rocketmq.domain; + +import java.math.BigDecimal; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * MPU信息对象 initial_switch_mpu_info + * + * @author gyt + * @date 2025-09-22 + */ +public class InitialSwitchMpuInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** MPU索引 */ + @Excel(name = "MPU索引") + private String mpuEntIndex; + + /** MPU名称 */ + @Excel(name = "MPU名称") + private String mpuName; + + /** MPU的CPU使用率(%) */ + @Excel(name = "MPU的CPU使用率(%)") + private BigDecimal mpuEntityCpuUsage; + + /** MPU的内存使用率(%) */ + @Excel(name = "MPU的内存使用率(%)") + private BigDecimal mpuEntityMemUsage; + + /** MPU的操作系统 */ + @Excel(name = "MPU的操作系统") + private String mpuPhysicalSoftwareRev; + + /** MPU的温度(℃) */ + @Excel(name = "MPU的温度(℃)") + private BigDecimal mpuEntityTemperature; + + /** 客户端ID */ + @Excel(name = "客户端ID") + private String clientId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setMpuEntIndex(String mpuEntIndex) + { + this.mpuEntIndex = mpuEntIndex; + } + + public String getMpuEntIndex() + { + return mpuEntIndex; + } + + public void setMpuName(String mpuName) + { + this.mpuName = mpuName; + } + + public String getMpuName() + { + return mpuName; + } + + public void setMpuEntityCpuUsage(BigDecimal mpuEntityCpuUsage) + { + this.mpuEntityCpuUsage = mpuEntityCpuUsage; + } + + public BigDecimal getMpuEntityCpuUsage() + { + return mpuEntityCpuUsage; + } + + public void setMpuEntityMemUsage(BigDecimal mpuEntityMemUsage) + { + this.mpuEntityMemUsage = mpuEntityMemUsage; + } + + public BigDecimal getMpuEntityMemUsage() + { + return mpuEntityMemUsage; + } + + public void setMpuPhysicalSoftwareRev(String mpuPhysicalSoftwareRev) + { + this.mpuPhysicalSoftwareRev = mpuPhysicalSoftwareRev; + } + + public String getMpuPhysicalSoftwareRev() + { + return mpuPhysicalSoftwareRev; + } + + public void setMpuEntityTemperature(BigDecimal mpuEntityTemperature) + { + this.mpuEntityTemperature = mpuEntityTemperature; + } + + public BigDecimal getMpuEntityTemperature() + { + return mpuEntityTemperature; + } + + public void setClientId(String clientId) + { + this.clientId = clientId; + } + + public String getClientId() + { + return clientId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("mpuEntIndex", getMpuEntIndex()) + .append("mpuName", getMpuName()) + .append("mpuEntityCpuUsage", getMpuEntityCpuUsage()) + .append("mpuEntityMemUsage", getMpuEntityMemUsage()) + .append("mpuPhysicalSoftwareRev", getMpuPhysicalSoftwareRev()) + .append("mpuEntityTemperature", getMpuEntityTemperature()) + .append("clientId", getClientId()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchOpticalModule.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchOpticalModule.java new file mode 100644 index 0000000..582ddff --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchOpticalModule.java @@ -0,0 +1,147 @@ +package com.ruoyi.rocketmq.domain; + +import java.math.BigDecimal; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 光模块信息对象 initial_switch_optical_module + * + * @author gyt + * @date 2025-09-22 + */ +public class InitialSwitchOpticalModule extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 光模块端口索引 */ + @Excel(name = "光模块端口索引") + private String fiberEntIndex; + + /** 光模块端口名称 */ + @Excel(name = "光模块端口名称") + private String fiberPortName; + + /** 光模块发送光衰阈值(dBm) */ + @Excel(name = "光模块发送光衰阈值(dBm)") + private BigDecimal hwEntityOpticalTxLowThreshold; + + /** 光模块接收光衰阈值(dBm) */ + @Excel(name = "光模块接收光衰阈值(dBm)") + private BigDecimal hwEntityOpticalRxLowThreshold; + + /** 光模块接收功率(dBm) */ + @Excel(name = "光模块接收功率(dBm)") + private BigDecimal hwEntityOpticalRxPower; + + /** 光模块发送功率(dBm) */ + @Excel(name = "光模块发送功率(dBm)") + private BigDecimal hwEntityOpticalTxPower; + + /** 客户端ID */ + @Excel(name = "客户端ID") + private String clientId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setFiberEntIndex(String fiberEntIndex) + { + this.fiberEntIndex = fiberEntIndex; + } + + public String getFiberEntIndex() + { + return fiberEntIndex; + } + + public void setFiberPortName(String fiberPortName) + { + this.fiberPortName = fiberPortName; + } + + public String getFiberPortName() + { + return fiberPortName; + } + + public void setHwEntityOpticalTxLowThreshold(BigDecimal hwEntityOpticalTxLowThreshold) + { + this.hwEntityOpticalTxLowThreshold = hwEntityOpticalTxLowThreshold; + } + + public BigDecimal getHwEntityOpticalTxLowThreshold() + { + return hwEntityOpticalTxLowThreshold; + } + + public void setHwEntityOpticalRxLowThreshold(BigDecimal hwEntityOpticalRxLowThreshold) + { + this.hwEntityOpticalRxLowThreshold = hwEntityOpticalRxLowThreshold; + } + + public BigDecimal getHwEntityOpticalRxLowThreshold() + { + return hwEntityOpticalRxLowThreshold; + } + + public void setHwEntityOpticalRxPower(BigDecimal hwEntityOpticalRxPower) + { + this.hwEntityOpticalRxPower = hwEntityOpticalRxPower; + } + + public BigDecimal getHwEntityOpticalRxPower() + { + return hwEntityOpticalRxPower; + } + + public void setHwEntityOpticalTxPower(BigDecimal hwEntityOpticalTxPower) + { + this.hwEntityOpticalTxPower = hwEntityOpticalTxPower; + } + + public BigDecimal getHwEntityOpticalTxPower() + { + return hwEntityOpticalTxPower; + } + + public void setClientId(String clientId) + { + this.clientId = clientId; + } + + public String getClientId() + { + return clientId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("fiberEntIndex", getFiberEntIndex()) + .append("fiberPortName", getFiberPortName()) + .append("hwEntityOpticalTxLowThreshold", getHwEntityOpticalTxLowThreshold()) + .append("hwEntityOpticalRxLowThreshold", getHwEntityOpticalRxLowThreshold()) + .append("hwEntityOpticalRxPower", getHwEntityOpticalRxPower()) + .append("hwEntityOpticalTxPower", getHwEntityOpticalTxPower()) + .append("clientId", getClientId()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchOtherCollectData.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchOtherCollectData.java new file mode 100644 index 0000000..8a8d004 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchOtherCollectData.java @@ -0,0 +1,86 @@ +package com.ruoyi.rocketmq.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 交换机系统其他信息采集数据对象 initial_switch_other_collect_data + * + * @author gyt + * @date 2025-09-23 + */ +public class InitialSwitchOtherCollectData extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 客户端ID */ + @Excel(name = "客户端ID") + private String clientId; + + /** 采集类型 */ + @Excel(name = "采集类型") + private String collectType; + + /** 采集值 */ + @Excel(name = "采集值") + private String collectValue; + + 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 setCollectType(String collectType) + { + this.collectType = collectType; + } + + public String getCollectType() + { + return collectType; + } + + public void setCollectValue(String collectValue) + { + this.collectValue = collectValue; + } + + public String getCollectValue() + { + return collectValue; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("clientId", getClientId()) + .append("collectType", getCollectType()) + .append("collectValue", getCollectValue()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchPowerSupply.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchPowerSupply.java new file mode 100644 index 0000000..8b8d8dd --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSwitchPowerSupply.java @@ -0,0 +1,131 @@ +package com.ruoyi.rocketmq.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 电源信息对象 initial_switch_power_supply + * + * @author gyt + * @date 2025-09-22 + */ +public class InitialSwitchPowerSupply extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 电源索引 */ + @Excel(name = "电源索引") + private String pwrEntIndex; + + /** 电源名称 */ + @Excel(name = "电源名称") + private String pwrName; + + /** 电源状态 */ + @Excel(name = "电源状态") + private String pwrEntityPwrState; + + /** 电源电流(mA) */ + @Excel(name = "电源电流(mA)") + private Long pwrEntityPwrCurrent; + + /** 电源电压(mV) */ + @Excel(name = "电源电压(mV)") + private Long pwrEntityPwrVoltage; + + /** 客户端ID */ + @Excel(name = "客户端ID") + private String clientId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setPwrEntIndex(String pwrEntIndex) + { + this.pwrEntIndex = pwrEntIndex; + } + + public String getPwrEntIndex() + { + return pwrEntIndex; + } + + public void setPwrName(String pwrName) + { + this.pwrName = pwrName; + } + + public String getPwrName() + { + return pwrName; + } + + public void setPwrEntityPwrState(String pwrEntityPwrState) + { + this.pwrEntityPwrState = pwrEntityPwrState; + } + + public String getPwrEntityPwrState() + { + return pwrEntityPwrState; + } + + public void setPwrEntityPwrCurrent(Long pwrEntityPwrCurrent) + { + this.pwrEntityPwrCurrent = pwrEntityPwrCurrent; + } + + public Long getPwrEntityPwrCurrent() + { + return pwrEntityPwrCurrent; + } + + public void setPwrEntityPwrVoltage(Long pwrEntityPwrVoltage) + { + this.pwrEntityPwrVoltage = pwrEntityPwrVoltage; + } + + public Long getPwrEntityPwrVoltage() + { + return pwrEntityPwrVoltage; + } + + public void setClientId(String clientId) + { + this.clientId = clientId; + } + + public String getClientId() + { + return clientId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("pwrEntIndex", getPwrEntIndex()) + .append("pwrName", getPwrName()) + .append("pwrEntityPwrState", getPwrEntityPwrState()) + .append("pwrEntityPwrCurrent", getPwrEntityPwrCurrent()) + .append("pwrEntityPwrVoltage", getPwrEntityPwrVoltage()) + .append("clientId", getClientId()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSystemOtherCollectData.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSystemOtherCollectData.java new file mode 100644 index 0000000..b3befa7 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/InitialSystemOtherCollectData.java @@ -0,0 +1,86 @@ +package com.ruoyi.rocketmq.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 交换机系统其他信息采集数据对象 initial_system_other_collect_data + * + * @author gyt + * @date 2025-09-23 + */ +public class InitialSystemOtherCollectData extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 客户端ID */ + @Excel(name = "客户端ID") + private String clientId; + + /** 采集类型 */ + @Excel(name = "采集类型") + private String collectType; + + /** 采集值 */ + @Excel(name = "采集值") + private String collectValue; + + 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 setCollectType(String collectType) + { + this.collectType = collectType; + } + + public String getCollectType() + { + return collectType; + } + + public void setCollectValue(String collectValue) + { + this.collectValue = collectValue; + } + + public String getCollectValue() + { + return collectValue; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("clientId", getClientId()) + .append("collectType", getCollectType()) + .append("collectValue", getCollectValue()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/RmDeploymentPolicy.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/RmDeploymentPolicy.java new file mode 100644 index 0000000..c68d264 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/RmDeploymentPolicy.java @@ -0,0 +1,80 @@ +package com.ruoyi.rocketmq.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; +import lombok.Data; + +import java.util.Date; + +/** + * 服务器脚本策略对象 rm_deployment_policy + * + * @author gyt + * @date 2025-09-15 + */ +@Data +public class RmDeploymentPolicy extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 策略ID */ + private Long id; + + /** 策略名称 */ + @Excel(name = "策略名称") + private String policyName; + + /** 策略描述 */ + @Excel(name = "策略描述") + private String description; + + /** 关联资源组ID */ + @Excel(name = "关联资源组ID") + private Long resourceGroupId; + + /** 包含的设备ID列表(逗号分隔) */ + private String includedDevicesId; + /** 包含设备 */ + @Excel(name = "包含设备") + private String includedDevicesName; + + /** 源文件地址格式 */ + @Excel(name = "源文件地址格式") + private String sourceFilePathType; + /** 源文件路径 */ + @Excel(name = "源文件路径") + private String sourceFilePath; + + /** 目标目录 */ + @Excel(name = "目标目录") + private String targetDirectory; + + /** 命令执行内容 */ + @Excel(name = "命令执行内容") + private String commandContent; + + /** 0=立即执行,1=定时执行 */ + @Excel(name = "执行方式", readConverterExp = "0=立即执行,1=定时执行") + private Integer executionMethod; + + /** 定时执行时间 */ + @Excel(name = "定时执行时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date scheduledTime; + /** 定时执行时间(时间戳秒) */ + private Long policyTime; + + /** 策略状态:0-未下发,1-已下发 */ + @Excel(name = "策略状态:0-未下发,1-已下发") + private String policyStatus; + + /** 策略下发时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "策略下发时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date deployTime; + + /** 脚本类型 */ + @Excel(name = "脚本类型") + private String scriptType; +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/SwitchDataVo.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/CollectDataVo.java similarity index 87% rename from ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/SwitchDataVo.java rename to ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/CollectDataVo.java index 9403234..e76001d 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/SwitchDataVo.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/CollectDataVo.java @@ -3,7 +3,7 @@ package com.ruoyi.rocketmq.domain.vo; import lombok.Data; @Data -public class SwitchDataVo { +public class CollectDataVo { /** 类型 */ private String type; /** 数据 */ diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/RspVo.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/RspVo.java index f38e1c3..f7b8722 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/RspVo.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/RspVo.java @@ -12,6 +12,12 @@ public class RspVo { * 描述 */ private String resMag; + /** + * 描述 + */ + private String resMsg; + + private String result; /** * 时间戳 */ diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/ScriptPolicyVo.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/ScriptPolicyVo.java new file mode 100644 index 0000000..2ea6642 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/domain/vo/ScriptPolicyVo.java @@ -0,0 +1,54 @@ +package com.ruoyi.rocketmq.domain.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.Instant; +import java.util.List; + +@Data +public class ScriptPolicyVo { + /** + * 策略名称 + */ + private String policyName; + /** + * 文件 + */ + private List files; + + // 目标路径地址 + private String filePath; + + // 命令 + private List commands; + + // 执行方式:0、立即执行;1、定时执行; + private int method; + + // 执行方式为1、定时执行时必传-指定时间 + private long policyTime; + // 时间戳 + private long timestamp = Instant.now().getEpochSecond(); + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class ScriptFile{ + + //文件类型:0、平台文件地址;1、外网HTTP(S) + private int fileType; + + //文件类型为1、外网HTTP(S)时必传 + private String fileUrl; + + //文件类型为0、平台文件地址时必传(文件名) + private String fileName; + + //文件类型为0、平台文件地址时必传(文件流) + private String fileData; + + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/handler/DeviceMessageHandler.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/handler/DeviceMessageHandler.java index 8a10b7f..ff7d4b0 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/handler/DeviceMessageHandler.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/handler/DeviceMessageHandler.java @@ -1,13 +1,15 @@ package com.ruoyi.rocketmq.handler; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; import com.ruoyi.common.core.constant.SecurityConstants; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.enums.MsgEnum; import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.rocketmq.domain.*; +import com.ruoyi.rocketmq.domain.vo.CollectDataVo; import com.ruoyi.rocketmq.domain.vo.RspVo; -import com.ruoyi.rocketmq.domain.vo.SwitchDataVo; import com.ruoyi.rocketmq.service.*; import com.ruoyi.rocketmq.utils.JsonDataParser; import com.ruoyi.system.api.RemoteRevenueConfigService; @@ -71,6 +73,20 @@ public class DeviceMessageHandler { private IInitialSwitchInfoTempService initialSwitchInfoTempService; @Autowired private IInitialHeartbeatListenLogService initialHeartbeatListenLog; + @Autowired + private IInitialSwitchPowerSupplyService initialSwitchPowerSupplyService; + @Autowired + private IInitialSwitchFanInfoService initialSwitchFanInfoService; + @Autowired + private IInitialSwitchMpuInfoService initialSwitchMpuInfoService; + @Autowired + private IInitialSwitchOpticalModuleService initialSwitchOpticalModuleService; + @Autowired + private IInitialSwitchOtherCollectDataService insertInitialSwitchOtherInfo; + @Autowired + private IInitialSystemOtherCollectDataService iInitialSystemOtherCollectDataService; + // 在类中添加 + private static final ObjectMapper objectMapper = new ObjectMapper(); /** @@ -90,13 +106,13 @@ public class DeviceMessageHandler { registerHandler(MsgEnum.Agent版本更新应答.getValue(), this::handleResponseMessage); // 其他类型消息可以单独注册处理器 -// registerHandler(MsgEnum.CPU上报.getValue(), this::handleCpuMessage); -// registerHandler(MsgEnum.磁盘上报.getValue(), this::handleDiskMessage); -// registerHandler(MsgEnum.容器上报.getValue(), this::handleDockerMessage); -// registerHandler(MsgEnum.内存上报.getValue(), this::handleMemoryMessage); -// registerHandler(MsgEnum.网络上报.getValue(), this::handleNetMessage); -// registerHandler(MsgEnum.挂载上报.getValue(), this::handleMountPointMessage); -// registerHandler(MsgEnum.系统其他上报.getValue(), this::handleSystemMessage); + registerHandler(MsgEnum.CPU上报.getValue(), this::handleCpuMessage); + registerHandler(MsgEnum.磁盘上报.getValue(), this::handleDiskMessage); + registerHandler(MsgEnum.容器上报.getValue(), this::handleDockerMessage); + registerHandler(MsgEnum.内存上报.getValue(), this::handleMemoryMessage); + registerHandler(MsgEnum.网络上报.getValue(), this::handleNetMessage); + registerHandler(MsgEnum.挂载上报.getValue(), this::handleMountPointMessage); + registerHandler(MsgEnum.系统其他上报.getValue(), this::handleOtherSystemMessage); registerHandler(MsgEnum.交换机上报.getValue(), this::handleSwitchDataMessage); registerHandler(MsgEnum.心跳上报.getValue(), this::handleHeartbeatMessage); } @@ -133,7 +149,7 @@ public class DeviceMessageHandler { if(!interfaces.isEmpty()){ // 时间戳转换 long timestamp = interfaces.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 String timeStr = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",createTime); InitialBandwidthTraffic data = new InitialBandwidthTraffic(); @@ -163,7 +179,7 @@ public class DeviceMessageHandler { if(!dockers.isEmpty()){ // 时间戳转换 long timestamp = dockers.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 dockers.forEach(iface -> { iface.setClientId(message.getClientId()); @@ -183,7 +199,7 @@ public class DeviceMessageHandler { List cpus = JsonDataParser.parseJsonData(message.getData(),InitialCpuInfo.class); // 时间戳转换 long timestamp = cpus.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 if(!cpus.isEmpty()){ cpus.forEach(iface -> { @@ -204,7 +220,7 @@ public class DeviceMessageHandler { List disks = JsonDataParser.parseJsonData(message.getData(), InitialDiskInfo.class); // 时间戳转换 long timestamp = disks.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 if(!disks.isEmpty()){ disks.forEach(iface -> { @@ -226,7 +242,7 @@ public class DeviceMessageHandler { if(!memorys.isEmpty()){ // 时间戳转换 long timestamp = memorys.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 memorys.forEach(iface -> { iface.setClientId(message.getClientId()); @@ -247,7 +263,7 @@ public class DeviceMessageHandler { if(!mountPointInfos.isEmpty()){ // 时间戳转换 long timestamp = mountPointInfos.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 mountPointInfos.forEach(iface -> { iface.setClientId(message.getClientId()); @@ -264,29 +280,230 @@ public class DeviceMessageHandler { * @param message */ private void handleSwitchDataMessage(DeviceMessage message) { - List switchData = JsonDataParser.parseJsonData(message.getData(), SwitchDataVo.class); + List switchData = JsonDataParser.parseJsonData(message.getData(), CollectDataVo.class); if(!switchData.isEmpty()){ - SwitchDataVo switchDataVo = switchData.get(0); - List switchInfos = JsonDataParser.parseJsonData(switchDataVo.getValue(), InitialSwitchInfo.class); + CollectDataVo switchDataVo = switchData.get(0); + switchDataVo.setValue(switchDataVo.getValue().replaceAll("\"noSuchInstance\"", "null")); switch(switchDataVo.getType()){ case "switchNetCollect": -// handleSwitchMessage(message); + handleSwitchMessage(switchDataVo, message.getClientId()); break; case "switchPwrCollect": + handleSwitchPwrMessage(switchDataVo, message.getClientId()); break; case "switchModuleCollect": + handleSwitchModuleMessage(switchDataVo, message.getClientId()); break; case "switchMpuCollect": + handleSwitchMpuMessage(switchDataVo, message.getClientId()); break; case "switchFanCollect": + handleSwitchFanMessage(switchDataVo, message.getClientId()); break; default: + handleSwitchOtherMessage(switchDataVo, message.getClientId()); break; } }else{ throw new RuntimeException("交换机data数据为空"); } } + + /** + * 电源发现数据 + * @param switchDataVo + */ + private void handleSwitchPwrMessage(CollectDataVo switchDataVo, String clientId){ + List powerSupplyList = JsonDataParser.parseJsonData(switchDataVo.getValue(), InitialSwitchPowerSupply.class); + if (!powerSupplyList.isEmpty()){ + InitialSwitchPowerSupply insertData = powerSupplyList.get(0); + // 时间戳转换 + long timestamp = switchDataVo.getTimestamp(); + long millis = timestamp * 1000; + Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 + insertData.setClientId(clientId); + insertData.setCreateTime(createTime); + initialSwitchPowerSupplyService.insertInitialSwitchPowerSupply(insertData); + } + } + /** + * 光模块发现数据 + * @param switchDataVo + */ + private void handleSwitchModuleMessage(CollectDataVo switchDataVo, String clientId){ + List moduleList = JsonDataParser.parseJsonData(switchDataVo.getValue(), InitialSwitchOpticalModule.class); + if (!moduleList.isEmpty()){ + InitialSwitchOpticalModule insertData = moduleList.get(0); + // 时间戳转换 + long timestamp = switchDataVo.getTimestamp(); + long millis = timestamp * 1000; + Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 + insertData.setClientId(clientId); + insertData.setCreateTime(createTime); + initialSwitchOpticalModuleService.insertInitialSwitchOpticalModule(insertData); + } + } + + /** + * MPU发现数据 + * @param switchDataVo + */ + private void handleSwitchMpuMessage(CollectDataVo switchDataVo, String clientId){ + List mpuList = JsonDataParser.parseJsonData(switchDataVo.getValue(), InitialSwitchMpuInfo.class); + if (!mpuList.isEmpty()){ + InitialSwitchMpuInfo insertData = mpuList.get(0); + // 时间戳转换 + long timestamp = switchDataVo.getTimestamp(); + long millis = timestamp * 1000; + Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 + insertData.setClientId(clientId); + insertData.setCreateTime(createTime); + initialSwitchMpuInfoService.insertInitialSwitchMpuInfo(insertData); + } + } + + /** + * 风扇发现数据 + * @param switchDataVo + */ + private void handleSwitchFanMessage(CollectDataVo switchDataVo, String clientId){ + List fanList = JsonDataParser.parseJsonData(switchDataVo.getValue(), InitialSwitchFanInfo.class); + if (!fanList.isEmpty()){ + InitialSwitchFanInfo insertData = fanList.get(0); + // 时间戳转换 + long timestamp = switchDataVo.getTimestamp(); + long millis = timestamp * 1000; + Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 + insertData.setClientId(clientId); + insertData.setCreateTime(createTime); + initialSwitchFanInfoService.insertInitialSwitchFanInfo(insertData); + } + } + + /** + * 其他发现数据(默认处理) + * @param switchDataVo + */ + private void handleSwitchOtherMessage(CollectDataVo switchDataVo, String clientId){ + if (switchDataVo != null){ + try { + InitialSwitchOtherCollectData insertData = new InitialSwitchOtherCollectData(); + + // 时间戳转换 + long timestamp = switchDataVo.getTimestamp(); + long millis = timestamp * 1000; + Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 + + insertData.setClientId(clientId); + insertData.setCreateTime(createTime); + + String value = switchDataVo.getValue(); + + // 解析JSON字符串 + JsonNode jsonNode = objectMapper.readTree(value); + + // 获取第一个字段的key和value + if (jsonNode.isObject() && jsonNode.fields().hasNext()) { + Map.Entry entry = jsonNode.fields().next(); + String fieldName = entry.getKey(); + String fieldValue = entry.getValue().asText(); + + insertData.setCollectType(fieldName); + if(!"null".equals(fieldValue)){ + insertData.setCollectValue(fieldValue); + } + } else if (jsonNode.isArray() && jsonNode.size() > 0) { + // 处理数组格式 [{}] + JsonNode firstElement = jsonNode.get(0); + if (firstElement.isObject() && firstElement.fields().hasNext()) { + Map.Entry entry = firstElement.fields().next(); + String fieldName = entry.getKey(); + String fieldValue = entry.getValue().asText(); + + insertData.setCollectType(fieldName); + if(!"null".equals(fieldValue)){ + insertData.setCollectValue(fieldValue); + } + } + } + + insertInitialSwitchOtherInfo.insertInitialSwitchOtherCollectData(insertData); + + } catch (Exception e) { + log.error("解析JSON数据失败: {}, value: {}", e.getMessage(), switchDataVo.getValue()); + // 可以选择保存原始数据或进行其他错误处理 + } + } + } + /** + * 交换机数据入库 + * @param switchDataVo + */ + private void handleSwitchMessage(CollectDataVo switchDataVo, String clientId) { + List switchInfos = JsonDataParser.parseJsonData(switchDataVo.getValue(), InitialSwitchInfo.class); + if(!switchInfos.isEmpty()){ + // 时间戳转换 + long timestamp = switchDataVo.getTimestamp(); + long millis = timestamp * 1000; + Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 + String timeStr = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",createTime); + // 查询临时表信息,计算实际流量值 + InitialSwitchInfoTemp temp = new InitialSwitchInfoTemp(); + temp.setClientId(clientId); + List tempList = initialSwitchInfoTempService.selectInitialSwitchInfoTempList(temp); + if(!tempList.isEmpty()){ + // 1. 构建快速查找的Map + Map tempMap = tempList.stream() + .collect(Collectors.toMap( + InitialSwitchInfoTemp::getName, + Function.identity(), + (existing, replacement) -> existing + )); + + // 2. 预计算除数(避免重复创建对象) + BigDecimal divisor = new BigDecimal(300); + + // 3. 计算速度 + switchInfos.forEach(switchInfo -> { + switchInfo.setClientId(clientId); + switchInfo.setCreateTime(createTime); + InitialSwitchInfoTemp tempInfo = tempMap.get(switchInfo.getName()); + if (tempInfo != null) { + // 计算inSpeed + if (switchInfo.getInBytes() != null && tempInfo.getInBytes() != null) { + BigDecimal inDiff = switchInfo.getInBytes().subtract(tempInfo.getInBytes()); + switchInfo.setInSpeed(inDiff.divide(divisor, 2, RoundingMode.HALF_UP)); + } + + // 计算outSpeed + if (switchInfo.getOutBytes() != null && tempInfo.getOutBytes() != null) { + BigDecimal outDiff = switchInfo.getOutBytes().subtract(tempInfo.getOutBytes()); + switchInfo.setOutSpeed(outDiff.divide(divisor, 2, RoundingMode.HALF_UP)); + } + } + }); + }else{ + switchInfos.forEach(switchInfo -> { + switchInfo.setClientId(clientId); + switchInfo.setCreateTime(createTime); + }); + } + // 清空临时表对应switch信息 + initialSwitchInfoTempService.truncateSwitchInfoTemp(clientId); + // 临时表 用来计算inSpeed outSeppd + initialSwitchInfoTempService.batchInsertInitialSwitchInfoTemp(switchInfos); + // 初始交换机数据入库 + initialSwitchInfoService.batchInsertInitialSwitchInfo(switchInfos); + // 业务表入库 + InitialSwitchInfoDetailsRemote detailsRemote = new InitialSwitchInfoDetailsRemote(); + detailsRemote.setClientId(clientId); + detailsRemote.setStartTime(timeStr); + detailsRemote.setEndTime(timeStr); + remoteRevenueConfigService.autoSaveSwitchTraffic(detailsRemote, SecurityConstants.INNER); + }else{ + throw new RuntimeException("交换机data数据为空"); + } + } /** * 交换机数据入库 * @param message @@ -296,7 +513,7 @@ public class DeviceMessageHandler { if(!switchInfos.isEmpty()){ // 时间戳转换 long timestamp = switchInfos.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 String timeStr = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",createTime); // 查询临时表信息,计算实际流量值 @@ -356,6 +573,39 @@ public class DeviceMessageHandler { throw new RuntimeException("交换机data数据为空"); } } + + /** + * 系统其他信息 + * @param message + */ + private void handleOtherSystemMessage(DeviceMessage message) { + List otherData = JsonDataParser.parseJsonData(message.getData(), CollectDataVo.class); + if(!otherData.isEmpty()){ + CollectDataVo systemDataVo = otherData.get(0); + if (systemDataVo != null){ + try { + InitialSystemOtherCollectData insertData = new InitialSystemOtherCollectData(); + + // 时间戳转换 + long timestamp = systemDataVo.getTimestamp(); + long millis = timestamp * 1000; + Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 + + insertData.setClientId(message.getClientId()); + insertData.setCreateTime(createTime); + String collectType = systemDataVo.getType(); + String collectValue = systemDataVo.getValue(); + insertData.setCollectType(collectType); + insertData.setCollectValue(collectValue); + iInitialSystemOtherCollectDataService.insertInitialSystemOtherCollectData(insertData); + + } catch (Exception e) { + log.error("解析JSON数据失败: {}, value: {}", e.getMessage(), systemDataVo.getValue()); + // 可以选择保存原始数据或进行其他错误处理 + } + } + } + } /** * 系统数据入库 * @param message @@ -365,7 +615,7 @@ public class DeviceMessageHandler { if(!systemInfos.isEmpty()){ // 时间戳转换 long timestamp = systemInfos.get(0).getTimestamp(); - long millis = timestamp < 1_000_000_000L ? timestamp * 1000 : timestamp; + long millis = timestamp * 1000; Date createTime = new Date(millis / 1000 * 1000); // 去除毫秒 systemInfos.forEach(iface -> { iface.setClientId(message.getClientId()); @@ -544,6 +794,19 @@ public class DeviceMessageHandler { } return null; } + /** + * 脚本策略应答信息 + * @param message + */ + private RspVo handleScriptRspMessage(DeviceMessage message) { + List rspVoList = JsonDataParser.parseJsonData(message.getData(), RspVo.class); + if (!rspVoList.isEmpty()) { + RspVo rsp = rspVoList.get(0); + log.info("应答信息:{}",rsp); + return rsp; + } + return null; + } /** * 注册应答处理 * @param message diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialOtherSystemMonitorDataMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialOtherSystemMonitorDataMapper.java new file mode 100644 index 0000000..e1b1312 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialOtherSystemMonitorDataMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialOtherSystemMonitorData; + +/** + * 系统其他信息监控数据Mapper接口 + * + * @author gyt + * @date 2025-09-23 + */ +public interface InitialOtherSystemMonitorDataMapper +{ + /** + * 查询系统其他信息监控数据 + * + * @param id 系统其他信息监控数据主键 + * @return 系统其他信息监控数据 + */ + public InitialOtherSystemMonitorData selectInitialOtherSystemMonitorDataById(Long id); + + /** + * 查询系统其他信息监控数据列表 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 系统其他信息监控数据集合 + */ + public List selectInitialOtherSystemMonitorDataList(InitialOtherSystemMonitorData initialOtherSystemMonitorData); + + /** + * 新增系统其他信息监控数据 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 结果 + */ + public int insertInitialOtherSystemMonitorData(InitialOtherSystemMonitorData initialOtherSystemMonitorData); + + /** + * 修改系统其他信息监控数据 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 结果 + */ + public int updateInitialOtherSystemMonitorData(InitialOtherSystemMonitorData initialOtherSystemMonitorData); + + /** + * 删除系统其他信息监控数据 + * + * @param id 系统其他信息监控数据主键 + * @return 结果 + */ + public int deleteInitialOtherSystemMonitorDataById(Long id); + + /** + * 批量删除系统其他信息监控数据 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInitialOtherSystemMonitorDataByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchFanInfoMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchFanInfoMapper.java new file mode 100644 index 0000000..e1e9ef2 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchFanInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchFanInfo; + +/** + * 风扇信息Mapper接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface InitialSwitchFanInfoMapper +{ + /** + * 查询风扇信息 + * + * @param id 风扇信息主键 + * @return 风扇信息 + */ + public InitialSwitchFanInfo selectInitialSwitchFanInfoById(Long id); + + /** + * 查询风扇信息列表 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 风扇信息集合 + */ + public List selectInitialSwitchFanInfoList(InitialSwitchFanInfo initialSwitchFanInfo); + + /** + * 新增风扇信息 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 结果 + */ + public int insertInitialSwitchFanInfo(InitialSwitchFanInfo initialSwitchFanInfo); + + /** + * 修改风扇信息 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 结果 + */ + public int updateInitialSwitchFanInfo(InitialSwitchFanInfo initialSwitchFanInfo); + + /** + * 删除风扇信息 + * + * @param id 风扇信息主键 + * @return 结果 + */ + public int deleteInitialSwitchFanInfoById(Long id); + + /** + * 批量删除风扇信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInitialSwitchFanInfoByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchMpuInfoMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchMpuInfoMapper.java new file mode 100644 index 0000000..2704d8a --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchMpuInfoMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo; + +/** + * MPU信息Mapper接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface InitialSwitchMpuInfoMapper +{ + /** + * 查询MPU信息 + * + * @param id MPU信息主键 + * @return MPU信息 + */ + public InitialSwitchMpuInfo selectInitialSwitchMpuInfoById(Long id); + + /** + * 查询MPU信息列表 + * + * @param initialSwitchMpuInfo MPU信息 + * @return MPU信息集合 + */ + public List selectInitialSwitchMpuInfoList(InitialSwitchMpuInfo initialSwitchMpuInfo); + + /** + * 新增MPU信息 + * + * @param initialSwitchMpuInfo MPU信息 + * @return 结果 + */ + public int insertInitialSwitchMpuInfo(InitialSwitchMpuInfo initialSwitchMpuInfo); + + /** + * 修改MPU信息 + * + * @param initialSwitchMpuInfo MPU信息 + * @return 结果 + */ + public int updateInitialSwitchMpuInfo(InitialSwitchMpuInfo initialSwitchMpuInfo); + + /** + * 删除MPU信息 + * + * @param id MPU信息主键 + * @return 结果 + */ + public int deleteInitialSwitchMpuInfoById(Long id); + + /** + * 批量删除MPU信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInitialSwitchMpuInfoByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchOpticalModuleMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchOpticalModuleMapper.java new file mode 100644 index 0000000..219e1b8 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchOpticalModuleMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule; + +/** + * 光模块信息Mapper接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface InitialSwitchOpticalModuleMapper +{ + /** + * 查询光模块信息 + * + * @param id 光模块信息主键 + * @return 光模块信息 + */ + public InitialSwitchOpticalModule selectInitialSwitchOpticalModuleById(Long id); + + /** + * 查询光模块信息列表 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 光模块信息集合 + */ + public List selectInitialSwitchOpticalModuleList(InitialSwitchOpticalModule initialSwitchOpticalModule); + + /** + * 新增光模块信息 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 结果 + */ + public int insertInitialSwitchOpticalModule(InitialSwitchOpticalModule initialSwitchOpticalModule); + + /** + * 修改光模块信息 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 结果 + */ + public int updateInitialSwitchOpticalModule(InitialSwitchOpticalModule initialSwitchOpticalModule); + + /** + * 删除光模块信息 + * + * @param id 光模块信息主键 + * @return 结果 + */ + public int deleteInitialSwitchOpticalModuleById(Long id); + + /** + * 批量删除光模块信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInitialSwitchOpticalModuleByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchOtherCollectDataMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchOtherCollectDataMapper.java new file mode 100644 index 0000000..de22cb9 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchOtherCollectDataMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData; + +/** + * 交换机系统其他信息采集数据Mapper接口 + * + * @author gyt + * @date 2025-09-23 + */ +public interface InitialSwitchOtherCollectDataMapper +{ + /** + * 查询交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 交换机系统其他信息采集数据 + */ + public InitialSwitchOtherCollectData selectInitialSwitchOtherCollectDataById(Long id); + + /** + * 查询交换机系统其他信息采集数据列表 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 交换机系统其他信息采集数据集合 + */ + public List selectInitialSwitchOtherCollectDataList(InitialSwitchOtherCollectData initialSwitchOtherCollectData); + + /** + * 新增交换机系统其他信息采集数据 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int insertInitialSwitchOtherCollectData(InitialSwitchOtherCollectData initialSwitchOtherCollectData); + + /** + * 修改交换机系统其他信息采集数据 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int updateInitialSwitchOtherCollectData(InitialSwitchOtherCollectData initialSwitchOtherCollectData); + + /** + * 删除交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 结果 + */ + public int deleteInitialSwitchOtherCollectDataById(Long id); + + /** + * 批量删除交换机系统其他信息采集数据 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInitialSwitchOtherCollectDataByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchPowerSupplyMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchPowerSupplyMapper.java new file mode 100644 index 0000000..68f918e --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSwitchPowerSupplyMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply; + +/** + * 电源信息Mapper接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface InitialSwitchPowerSupplyMapper +{ + /** + * 查询电源信息 + * + * @param id 电源信息主键 + * @return 电源信息 + */ + public InitialSwitchPowerSupply selectInitialSwitchPowerSupplyById(Long id); + + /** + * 查询电源信息列表 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 电源信息集合 + */ + public List selectInitialSwitchPowerSupplyList(InitialSwitchPowerSupply initialSwitchPowerSupply); + + /** + * 新增电源信息 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 结果 + */ + public int insertInitialSwitchPowerSupply(InitialSwitchPowerSupply initialSwitchPowerSupply); + + /** + * 修改电源信息 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 结果 + */ + public int updateInitialSwitchPowerSupply(InitialSwitchPowerSupply initialSwitchPowerSupply); + + /** + * 删除电源信息 + * + * @param id 电源信息主键 + * @return 结果 + */ + public int deleteInitialSwitchPowerSupplyById(Long id); + + /** + * 批量删除电源信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInitialSwitchPowerSupplyByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSystemOtherCollectDataMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSystemOtherCollectDataMapper.java new file mode 100644 index 0000000..22b75c3 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/InitialSystemOtherCollectDataMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSystemOtherCollectData; + +/** + * 交换机系统其他信息采集数据Mapper接口 + * + * @author gyt + * @date 2025-09-23 + */ +public interface InitialSystemOtherCollectDataMapper +{ + /** + * 查询交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 交换机系统其他信息采集数据 + */ + public InitialSystemOtherCollectData selectInitialSystemOtherCollectDataById(Long id); + + /** + * 查询交换机系统其他信息采集数据列表 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 交换机系统其他信息采集数据集合 + */ + public List selectInitialSystemOtherCollectDataList(InitialSystemOtherCollectData initialSystemOtherCollectData); + + /** + * 新增交换机系统其他信息采集数据 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int insertInitialSystemOtherCollectData(InitialSystemOtherCollectData initialSystemOtherCollectData); + + /** + * 修改交换机系统其他信息采集数据 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int updateInitialSystemOtherCollectData(InitialSystemOtherCollectData initialSystemOtherCollectData); + + /** + * 删除交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 结果 + */ + public int deleteInitialSystemOtherCollectDataById(Long id); + + /** + * 批量删除交换机系统其他信息采集数据 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInitialSystemOtherCollectDataByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/RmDeploymentPolicyMapper.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/RmDeploymentPolicyMapper.java new file mode 100644 index 0000000..d3540f4 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/mapper/RmDeploymentPolicyMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.mapper; + +import java.util.List; +import com.ruoyi.rocketmq.domain.RmDeploymentPolicy; + +/** + * 服务器脚本策略Mapper接口 + * + * @author gyt + * @date 2025-09-15 + */ +public interface RmDeploymentPolicyMapper +{ + /** + * 查询服务器脚本策略 + * + * @param id 服务器脚本策略主键 + * @return 服务器脚本策略 + */ + public RmDeploymentPolicy selectRmDeploymentPolicyById(Long id); + + /** + * 查询服务器脚本策略列表 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 服务器脚本策略集合 + */ + public List selectRmDeploymentPolicyList(RmDeploymentPolicy rmDeploymentPolicy); + + /** + * 新增服务器脚本策略 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 结果 + */ + public int insertRmDeploymentPolicy(RmDeploymentPolicy rmDeploymentPolicy); + + /** + * 修改服务器脚本策略 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 结果 + */ + public int updateRmDeploymentPolicy(RmDeploymentPolicy rmDeploymentPolicy); + + /** + * 删除服务器脚本策略 + * + * @param id 服务器脚本策略主键 + * @return 结果 + */ + public int deleteRmDeploymentPolicyById(Long id); + + /** + * 批量删除服务器脚本策略 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRmDeploymentPolicyByIds(Long[] ids); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialOtherSystemMonitorDataService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialOtherSystemMonitorDataService.java new file mode 100644 index 0000000..4811ec7 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialOtherSystemMonitorDataService.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialOtherSystemMonitorData; + +/** + * 系统其他信息监控数据Service接口 + * + * @author gyt + * @date 2025-09-23 + */ +public interface IInitialOtherSystemMonitorDataService +{ + /** + * 查询系统其他信息监控数据 + * + * @param id 系统其他信息监控数据主键 + * @return 系统其他信息监控数据 + */ + public InitialOtherSystemMonitorData selectInitialOtherSystemMonitorDataById(Long id); + + /** + * 查询系统其他信息监控数据列表 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 系统其他信息监控数据集合 + */ + public List selectInitialOtherSystemMonitorDataList(InitialOtherSystemMonitorData initialOtherSystemMonitorData); + + /** + * 新增系统其他信息监控数据 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 结果 + */ + public int insertInitialOtherSystemMonitorData(InitialOtherSystemMonitorData initialOtherSystemMonitorData); + + /** + * 修改系统其他信息监控数据 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 结果 + */ + public int updateInitialOtherSystemMonitorData(InitialOtherSystemMonitorData initialOtherSystemMonitorData); + + /** + * 批量删除系统其他信息监控数据 + * + * @param ids 需要删除的系统其他信息监控数据主键集合 + * @return 结果 + */ + public int deleteInitialOtherSystemMonitorDataByIds(Long[] ids); + + /** + * 删除系统其他信息监控数据信息 + * + * @param id 系统其他信息监控数据主键 + * @return 结果 + */ + public int deleteInitialOtherSystemMonitorDataById(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchFanInfoService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchFanInfoService.java new file mode 100644 index 0000000..f908336 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchFanInfoService.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchFanInfo; + +/** + * 风扇信息Service接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface IInitialSwitchFanInfoService +{ + /** + * 查询风扇信息 + * + * @param id 风扇信息主键 + * @return 风扇信息 + */ + public InitialSwitchFanInfo selectInitialSwitchFanInfoById(Long id); + + /** + * 查询风扇信息列表 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 风扇信息集合 + */ + public List selectInitialSwitchFanInfoList(InitialSwitchFanInfo initialSwitchFanInfo); + + /** + * 新增风扇信息 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 结果 + */ + public int insertInitialSwitchFanInfo(InitialSwitchFanInfo initialSwitchFanInfo); + + /** + * 修改风扇信息 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 结果 + */ + public int updateInitialSwitchFanInfo(InitialSwitchFanInfo initialSwitchFanInfo); + + /** + * 批量删除风扇信息 + * + * @param ids 需要删除的风扇信息主键集合 + * @return 结果 + */ + public int deleteInitialSwitchFanInfoByIds(Long[] ids); + + /** + * 删除风扇信息信息 + * + * @param id 风扇信息主键 + * @return 结果 + */ + public int deleteInitialSwitchFanInfoById(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchMpuInfoService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchMpuInfoService.java new file mode 100644 index 0000000..7ab1dbc --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchMpuInfoService.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo; + +/** + * MPU信息Service接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface IInitialSwitchMpuInfoService +{ + /** + * 查询MPU信息 + * + * @param id MPU信息主键 + * @return MPU信息 + */ + public InitialSwitchMpuInfo selectInitialSwitchMpuInfoById(Long id); + + /** + * 查询MPU信息列表 + * + * @param initialSwitchMpuInfo MPU信息 + * @return MPU信息集合 + */ + public List selectInitialSwitchMpuInfoList(InitialSwitchMpuInfo initialSwitchMpuInfo); + + /** + * 新增MPU信息 + * + * @param initialSwitchMpuInfo MPU信息 + * @return 结果 + */ + public int insertInitialSwitchMpuInfo(InitialSwitchMpuInfo initialSwitchMpuInfo); + + /** + * 修改MPU信息 + * + * @param initialSwitchMpuInfo MPU信息 + * @return 结果 + */ + public int updateInitialSwitchMpuInfo(InitialSwitchMpuInfo initialSwitchMpuInfo); + + /** + * 批量删除MPU信息 + * + * @param ids 需要删除的MPU信息主键集合 + * @return 结果 + */ + public int deleteInitialSwitchMpuInfoByIds(Long[] ids); + + /** + * 删除MPU信息信息 + * + * @param id MPU信息主键 + * @return 结果 + */ + public int deleteInitialSwitchMpuInfoById(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchOpticalModuleService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchOpticalModuleService.java new file mode 100644 index 0000000..30601f5 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchOpticalModuleService.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule; + +/** + * 光模块信息Service接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface IInitialSwitchOpticalModuleService +{ + /** + * 查询光模块信息 + * + * @param id 光模块信息主键 + * @return 光模块信息 + */ + public InitialSwitchOpticalModule selectInitialSwitchOpticalModuleById(Long id); + + /** + * 查询光模块信息列表 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 光模块信息集合 + */ + public List selectInitialSwitchOpticalModuleList(InitialSwitchOpticalModule initialSwitchOpticalModule); + + /** + * 新增光模块信息 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 结果 + */ + public int insertInitialSwitchOpticalModule(InitialSwitchOpticalModule initialSwitchOpticalModule); + + /** + * 修改光模块信息 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 结果 + */ + public int updateInitialSwitchOpticalModule(InitialSwitchOpticalModule initialSwitchOpticalModule); + + /** + * 批量删除光模块信息 + * + * @param ids 需要删除的光模块信息主键集合 + * @return 结果 + */ + public int deleteInitialSwitchOpticalModuleByIds(Long[] ids); + + /** + * 删除光模块信息信息 + * + * @param id 光模块信息主键 + * @return 结果 + */ + public int deleteInitialSwitchOpticalModuleById(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchOtherCollectDataService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchOtherCollectDataService.java new file mode 100644 index 0000000..c341a25 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchOtherCollectDataService.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData; + +/** + * 交换机系统其他信息采集数据Service接口 + * + * @author gyt + * @date 2025-09-23 + */ +public interface IInitialSwitchOtherCollectDataService +{ + /** + * 查询交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 交换机系统其他信息采集数据 + */ + public InitialSwitchOtherCollectData selectInitialSwitchOtherCollectDataById(Long id); + + /** + * 查询交换机系统其他信息采集数据列表 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 交换机系统其他信息采集数据集合 + */ + public List selectInitialSwitchOtherCollectDataList(InitialSwitchOtherCollectData initialSwitchOtherCollectData); + + /** + * 新增交换机系统其他信息采集数据 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int insertInitialSwitchOtherCollectData(InitialSwitchOtherCollectData initialSwitchOtherCollectData); + + /** + * 修改交换机系统其他信息采集数据 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int updateInitialSwitchOtherCollectData(InitialSwitchOtherCollectData initialSwitchOtherCollectData); + + /** + * 批量删除交换机系统其他信息采集数据 + * + * @param ids 需要删除的交换机系统其他信息采集数据主键集合 + * @return 结果 + */ + public int deleteInitialSwitchOtherCollectDataByIds(Long[] ids); + + /** + * 删除交换机系统其他信息采集数据信息 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 结果 + */ + public int deleteInitialSwitchOtherCollectDataById(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchPowerSupplyService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchPowerSupplyService.java new file mode 100644 index 0000000..084f717 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSwitchPowerSupplyService.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply; + +/** + * 电源信息Service接口 + * + * @author gyt + * @date 2025-09-22 + */ +public interface IInitialSwitchPowerSupplyService +{ + /** + * 查询电源信息 + * + * @param id 电源信息主键 + * @return 电源信息 + */ + public InitialSwitchPowerSupply selectInitialSwitchPowerSupplyById(Long id); + + /** + * 查询电源信息列表 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 电源信息集合 + */ + public List selectInitialSwitchPowerSupplyList(InitialSwitchPowerSupply initialSwitchPowerSupply); + + /** + * 新增电源信息 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 结果 + */ + public int insertInitialSwitchPowerSupply(InitialSwitchPowerSupply initialSwitchPowerSupply); + + /** + * 修改电源信息 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 结果 + */ + public int updateInitialSwitchPowerSupply(InitialSwitchPowerSupply initialSwitchPowerSupply); + + /** + * 批量删除电源信息 + * + * @param ids 需要删除的电源信息主键集合 + * @return 结果 + */ + public int deleteInitialSwitchPowerSupplyByIds(Long[] ids); + + /** + * 删除电源信息信息 + * + * @param id 电源信息主键 + * @return 结果 + */ + public int deleteInitialSwitchPowerSupplyById(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSystemOtherCollectDataService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSystemOtherCollectDataService.java new file mode 100644 index 0000000..e2157d4 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IInitialSystemOtherCollectDataService.java @@ -0,0 +1,61 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.InitialSystemOtherCollectData; + +/** + * 交换机系统其他信息采集数据Service接口 + * + * @author gyt + * @date 2025-09-23 + */ +public interface IInitialSystemOtherCollectDataService +{ + /** + * 查询交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 交换机系统其他信息采集数据 + */ + public InitialSystemOtherCollectData selectInitialSystemOtherCollectDataById(Long id); + + /** + * 查询交换机系统其他信息采集数据列表 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 交换机系统其他信息采集数据集合 + */ + public List selectInitialSystemOtherCollectDataList(InitialSystemOtherCollectData initialSystemOtherCollectData); + + /** + * 新增交换机系统其他信息采集数据 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int insertInitialSystemOtherCollectData(InitialSystemOtherCollectData initialSystemOtherCollectData); + + /** + * 修改交换机系统其他信息采集数据 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + public int updateInitialSystemOtherCollectData(InitialSystemOtherCollectData initialSystemOtherCollectData); + + /** + * 批量删除交换机系统其他信息采集数据 + * + * @param ids 需要删除的交换机系统其他信息采集数据主键集合 + * @return 结果 + */ + public int deleteInitialSystemOtherCollectDataByIds(Long[] ids); + + /** + * 删除交换机系统其他信息采集数据信息 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 结果 + */ + public int deleteInitialSystemOtherCollectDataById(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IRmDeploymentPolicyService.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IRmDeploymentPolicyService.java new file mode 100644 index 0000000..5426738 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/IRmDeploymentPolicyService.java @@ -0,0 +1,63 @@ +package com.ruoyi.rocketmq.service; + +import java.util.List; +import com.ruoyi.rocketmq.domain.RmDeploymentPolicy; + +/** + * 服务器脚本策略Service接口 + * + * @author gyt + * @date 2025-09-15 + */ +public interface IRmDeploymentPolicyService +{ + /** + * 查询服务器脚本策略 + * + * @param id 服务器脚本策略主键 + * @return 服务器脚本策略 + */ + public RmDeploymentPolicy selectRmDeploymentPolicyById(Long id); + + /** + * 查询服务器脚本策略列表 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 服务器脚本策略集合 + */ + public List selectRmDeploymentPolicyList(RmDeploymentPolicy rmDeploymentPolicy); + + /** + * 新增服务器脚本策略 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 结果 + */ + public int insertRmDeploymentPolicy(RmDeploymentPolicy rmDeploymentPolicy); + + /** + * 修改服务器脚本策略 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 结果 + */ + public int updateRmDeploymentPolicy(RmDeploymentPolicy rmDeploymentPolicy); + + /** + * 批量删除服务器脚本策略 + * + * @param ids 需要删除的服务器脚本策略主键集合 + * @return 结果 + */ + public int deleteRmDeploymentPolicyByIds(Long[] ids); + + /** + * 删除服务器脚本策略信息 + * + * @param id 服务器脚本策略主键 + * @return 结果 + */ + public int deleteRmDeploymentPolicyById(Long id); + + int issueDeploymentPolicy(Long id); +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialOtherSystemMonitorDataServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialOtherSystemMonitorDataServiceImpl.java new file mode 100644 index 0000000..57788a1 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialOtherSystemMonitorDataServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.rocketmq.domain.InitialOtherSystemMonitorData; +import com.ruoyi.rocketmq.mapper.InitialOtherSystemMonitorDataMapper; +import com.ruoyi.rocketmq.service.IInitialOtherSystemMonitorDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 系统其他信息监控数据Service业务层处理 + * + * @author gyt + * @date 2025-09-23 + */ +@Service +public class InitialOtherSystemMonitorDataServiceImpl implements IInitialOtherSystemMonitorDataService +{ + @Autowired + private InitialOtherSystemMonitorDataMapper initialOtherSystemMonitorDataMapper; + + /** + * 查询系统其他信息监控数据 + * + * @param id 系统其他信息监控数据主键 + * @return 系统其他信息监控数据 + */ + @Override + public InitialOtherSystemMonitorData selectInitialOtherSystemMonitorDataById(Long id) + { + return initialOtherSystemMonitorDataMapper.selectInitialOtherSystemMonitorDataById(id); + } + + /** + * 查询系统其他信息监控数据列表 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 系统其他信息监控数据 + */ + @Override + public List selectInitialOtherSystemMonitorDataList(InitialOtherSystemMonitorData initialOtherSystemMonitorData) + { + return initialOtherSystemMonitorDataMapper.selectInitialOtherSystemMonitorDataList(initialOtherSystemMonitorData); + } + + /** + * 新增系统其他信息监控数据 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 结果 + */ + @Override + public int insertInitialOtherSystemMonitorData(InitialOtherSystemMonitorData initialOtherSystemMonitorData) + { + return initialOtherSystemMonitorDataMapper.insertInitialOtherSystemMonitorData(initialOtherSystemMonitorData); + } + + /** + * 修改系统其他信息监控数据 + * + * @param initialOtherSystemMonitorData 系统其他信息监控数据 + * @return 结果 + */ + @Override + public int updateInitialOtherSystemMonitorData(InitialOtherSystemMonitorData initialOtherSystemMonitorData) + { + initialOtherSystemMonitorData.setUpdateTime(DateUtils.getNowDate()); + return initialOtherSystemMonitorDataMapper.updateInitialOtherSystemMonitorData(initialOtherSystemMonitorData); + } + + /** + * 批量删除系统其他信息监控数据 + * + * @param ids 需要删除的系统其他信息监控数据主键 + * @return 结果 + */ + @Override + public int deleteInitialOtherSystemMonitorDataByIds(Long[] ids) + { + return initialOtherSystemMonitorDataMapper.deleteInitialOtherSystemMonitorDataByIds(ids); + } + + /** + * 删除系统其他信息监控数据信息 + * + * @param id 系统其他信息监控数据主键 + * @return 结果 + */ + @Override + public int deleteInitialOtherSystemMonitorDataById(Long id) + { + return initialOtherSystemMonitorDataMapper.deleteInitialOtherSystemMonitorDataById(id); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchFanInfoServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchFanInfoServiceImpl.java new file mode 100644 index 0000000..07262ca --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchFanInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.rocketmq.domain.InitialSwitchFanInfo; +import com.ruoyi.rocketmq.mapper.InitialSwitchFanInfoMapper; +import com.ruoyi.rocketmq.service.IInitialSwitchFanInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 风扇信息Service业务层处理 + * + * @author gyt + * @date 2025-09-22 + */ +@Service +public class InitialSwitchFanInfoServiceImpl implements IInitialSwitchFanInfoService +{ + @Autowired + private InitialSwitchFanInfoMapper initialSwitchFanInfoMapper; + + /** + * 查询风扇信息 + * + * @param id 风扇信息主键 + * @return 风扇信息 + */ + @Override + public InitialSwitchFanInfo selectInitialSwitchFanInfoById(Long id) + { + return initialSwitchFanInfoMapper.selectInitialSwitchFanInfoById(id); + } + + /** + * 查询风扇信息列表 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 风扇信息 + */ + @Override + public List selectInitialSwitchFanInfoList(InitialSwitchFanInfo initialSwitchFanInfo) + { + return initialSwitchFanInfoMapper.selectInitialSwitchFanInfoList(initialSwitchFanInfo); + } + + /** + * 新增风扇信息 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 结果 + */ + @Override + public int insertInitialSwitchFanInfo(InitialSwitchFanInfo initialSwitchFanInfo) + { + return initialSwitchFanInfoMapper.insertInitialSwitchFanInfo(initialSwitchFanInfo); + } + + /** + * 修改风扇信息 + * + * @param initialSwitchFanInfo 风扇信息 + * @return 结果 + */ + @Override + public int updateInitialSwitchFanInfo(InitialSwitchFanInfo initialSwitchFanInfo) + { + initialSwitchFanInfo.setUpdateTime(DateUtils.getNowDate()); + return initialSwitchFanInfoMapper.updateInitialSwitchFanInfo(initialSwitchFanInfo); + } + + /** + * 批量删除风扇信息 + * + * @param ids 需要删除的风扇信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchFanInfoByIds(Long[] ids) + { + return initialSwitchFanInfoMapper.deleteInitialSwitchFanInfoByIds(ids); + } + + /** + * 删除风扇信息信息 + * + * @param id 风扇信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchFanInfoById(Long id) + { + return initialSwitchFanInfoMapper.deleteInitialSwitchFanInfoById(id); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchMpuInfoServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchMpuInfoServiceImpl.java new file mode 100644 index 0000000..214a99b --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchMpuInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.rocketmq.domain.InitialSwitchMpuInfo; +import com.ruoyi.rocketmq.mapper.InitialSwitchMpuInfoMapper; +import com.ruoyi.rocketmq.service.IInitialSwitchMpuInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * MPU信息Service业务层处理 + * + * @author gyt + * @date 2025-09-22 + */ +@Service +public class InitialSwitchMpuInfoServiceImpl implements IInitialSwitchMpuInfoService +{ + @Autowired + private InitialSwitchMpuInfoMapper initialSwitchMpuInfoMapper; + + /** + * 查询MPU信息 + * + * @param id MPU信息主键 + * @return MPU信息 + */ + @Override + public InitialSwitchMpuInfo selectInitialSwitchMpuInfoById(Long id) + { + return initialSwitchMpuInfoMapper.selectInitialSwitchMpuInfoById(id); + } + + /** + * 查询MPU信息列表 + * + * @param initialSwitchMpuInfo MPU信息 + * @return MPU信息 + */ + @Override + public List selectInitialSwitchMpuInfoList(InitialSwitchMpuInfo initialSwitchMpuInfo) + { + return initialSwitchMpuInfoMapper.selectInitialSwitchMpuInfoList(initialSwitchMpuInfo); + } + + /** + * 新增MPU信息 + * + * @param initialSwitchMpuInfo MPU信息 + * @return 结果 + */ + @Override + public int insertInitialSwitchMpuInfo(InitialSwitchMpuInfo initialSwitchMpuInfo) + { + return initialSwitchMpuInfoMapper.insertInitialSwitchMpuInfo(initialSwitchMpuInfo); + } + + /** + * 修改MPU信息 + * + * @param initialSwitchMpuInfo MPU信息 + * @return 结果 + */ + @Override + public int updateInitialSwitchMpuInfo(InitialSwitchMpuInfo initialSwitchMpuInfo) + { + initialSwitchMpuInfo.setUpdateTime(DateUtils.getNowDate()); + return initialSwitchMpuInfoMapper.updateInitialSwitchMpuInfo(initialSwitchMpuInfo); + } + + /** + * 批量删除MPU信息 + * + * @param ids 需要删除的MPU信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchMpuInfoByIds(Long[] ids) + { + return initialSwitchMpuInfoMapper.deleteInitialSwitchMpuInfoByIds(ids); + } + + /** + * 删除MPU信息信息 + * + * @param id MPU信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchMpuInfoById(Long id) + { + return initialSwitchMpuInfoMapper.deleteInitialSwitchMpuInfoById(id); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchOpticalModuleServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchOpticalModuleServiceImpl.java new file mode 100644 index 0000000..44b2b65 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchOpticalModuleServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.rocketmq.domain.InitialSwitchOpticalModule; +import com.ruoyi.rocketmq.mapper.InitialSwitchOpticalModuleMapper; +import com.ruoyi.rocketmq.service.IInitialSwitchOpticalModuleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 光模块信息Service业务层处理 + * + * @author gyt + * @date 2025-09-22 + */ +@Service +public class InitialSwitchOpticalModuleServiceImpl implements IInitialSwitchOpticalModuleService +{ + @Autowired + private InitialSwitchOpticalModuleMapper initialSwitchOpticalModuleMapper; + + /** + * 查询光模块信息 + * + * @param id 光模块信息主键 + * @return 光模块信息 + */ + @Override + public InitialSwitchOpticalModule selectInitialSwitchOpticalModuleById(Long id) + { + return initialSwitchOpticalModuleMapper.selectInitialSwitchOpticalModuleById(id); + } + + /** + * 查询光模块信息列表 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 光模块信息 + */ + @Override + public List selectInitialSwitchOpticalModuleList(InitialSwitchOpticalModule initialSwitchOpticalModule) + { + return initialSwitchOpticalModuleMapper.selectInitialSwitchOpticalModuleList(initialSwitchOpticalModule); + } + + /** + * 新增光模块信息 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 结果 + */ + @Override + public int insertInitialSwitchOpticalModule(InitialSwitchOpticalModule initialSwitchOpticalModule) + { + return initialSwitchOpticalModuleMapper.insertInitialSwitchOpticalModule(initialSwitchOpticalModule); + } + + /** + * 修改光模块信息 + * + * @param initialSwitchOpticalModule 光模块信息 + * @return 结果 + */ + @Override + public int updateInitialSwitchOpticalModule(InitialSwitchOpticalModule initialSwitchOpticalModule) + { + initialSwitchOpticalModule.setUpdateTime(DateUtils.getNowDate()); + return initialSwitchOpticalModuleMapper.updateInitialSwitchOpticalModule(initialSwitchOpticalModule); + } + + /** + * 批量删除光模块信息 + * + * @param ids 需要删除的光模块信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchOpticalModuleByIds(Long[] ids) + { + return initialSwitchOpticalModuleMapper.deleteInitialSwitchOpticalModuleByIds(ids); + } + + /** + * 删除光模块信息信息 + * + * @param id 光模块信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchOpticalModuleById(Long id) + { + return initialSwitchOpticalModuleMapper.deleteInitialSwitchOpticalModuleById(id); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchOtherCollectDataServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchOtherCollectDataServiceImpl.java new file mode 100644 index 0000000..b57b1e4 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchOtherCollectDataServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.rocketmq.domain.InitialSwitchOtherCollectData; +import com.ruoyi.rocketmq.mapper.InitialSwitchOtherCollectDataMapper; +import com.ruoyi.rocketmq.service.IInitialSwitchOtherCollectDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 交换机系统其他信息采集数据Service业务层处理 + * + * @author gyt + * @date 2025-09-23 + */ +@Service +public class InitialSwitchOtherCollectDataServiceImpl implements IInitialSwitchOtherCollectDataService +{ + @Autowired + private InitialSwitchOtherCollectDataMapper initialSwitchOtherCollectDataMapper; + + /** + * 查询交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 交换机系统其他信息采集数据 + */ + @Override + public InitialSwitchOtherCollectData selectInitialSwitchOtherCollectDataById(Long id) + { + return initialSwitchOtherCollectDataMapper.selectInitialSwitchOtherCollectDataById(id); + } + + /** + * 查询交换机系统其他信息采集数据列表 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 交换机系统其他信息采集数据 + */ + @Override + public List selectInitialSwitchOtherCollectDataList(InitialSwitchOtherCollectData initialSwitchOtherCollectData) + { + return initialSwitchOtherCollectDataMapper.selectInitialSwitchOtherCollectDataList(initialSwitchOtherCollectData); + } + + /** + * 新增交换机系统其他信息采集数据 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + @Override + public int insertInitialSwitchOtherCollectData(InitialSwitchOtherCollectData initialSwitchOtherCollectData) + { + return initialSwitchOtherCollectDataMapper.insertInitialSwitchOtherCollectData(initialSwitchOtherCollectData); + } + + /** + * 修改交换机系统其他信息采集数据 + * + * @param initialSwitchOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + @Override + public int updateInitialSwitchOtherCollectData(InitialSwitchOtherCollectData initialSwitchOtherCollectData) + { + initialSwitchOtherCollectData.setUpdateTime(DateUtils.getNowDate()); + return initialSwitchOtherCollectDataMapper.updateInitialSwitchOtherCollectData(initialSwitchOtherCollectData); + } + + /** + * 批量删除交换机系统其他信息采集数据 + * + * @param ids 需要删除的交换机系统其他信息采集数据主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchOtherCollectDataByIds(Long[] ids) + { + return initialSwitchOtherCollectDataMapper.deleteInitialSwitchOtherCollectDataByIds(ids); + } + + /** + * 删除交换机系统其他信息采集数据信息 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchOtherCollectDataById(Long id) + { + return initialSwitchOtherCollectDataMapper.deleteInitialSwitchOtherCollectDataById(id); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchPowerSupplyServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchPowerSupplyServiceImpl.java new file mode 100644 index 0000000..122c286 --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSwitchPowerSupplyServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.rocketmq.domain.InitialSwitchPowerSupply; +import com.ruoyi.rocketmq.mapper.InitialSwitchPowerSupplyMapper; +import com.ruoyi.rocketmq.service.IInitialSwitchPowerSupplyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 电源信息Service业务层处理 + * + * @author gyt + * @date 2025-09-22 + */ +@Service +public class InitialSwitchPowerSupplyServiceImpl implements IInitialSwitchPowerSupplyService +{ + @Autowired + private InitialSwitchPowerSupplyMapper initialSwitchPowerSupplyMapper; + + /** + * 查询电源信息 + * + * @param id 电源信息主键 + * @return 电源信息 + */ + @Override + public InitialSwitchPowerSupply selectInitialSwitchPowerSupplyById(Long id) + { + return initialSwitchPowerSupplyMapper.selectInitialSwitchPowerSupplyById(id); + } + + /** + * 查询电源信息列表 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 电源信息 + */ + @Override + public List selectInitialSwitchPowerSupplyList(InitialSwitchPowerSupply initialSwitchPowerSupply) + { + return initialSwitchPowerSupplyMapper.selectInitialSwitchPowerSupplyList(initialSwitchPowerSupply); + } + + /** + * 新增电源信息 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 结果 + */ + @Override + public int insertInitialSwitchPowerSupply(InitialSwitchPowerSupply initialSwitchPowerSupply) + { + return initialSwitchPowerSupplyMapper.insertInitialSwitchPowerSupply(initialSwitchPowerSupply); + } + + /** + * 修改电源信息 + * + * @param initialSwitchPowerSupply 电源信息 + * @return 结果 + */ + @Override + public int updateInitialSwitchPowerSupply(InitialSwitchPowerSupply initialSwitchPowerSupply) + { + initialSwitchPowerSupply.setUpdateTime(DateUtils.getNowDate()); + return initialSwitchPowerSupplyMapper.updateInitialSwitchPowerSupply(initialSwitchPowerSupply); + } + + /** + * 批量删除电源信息 + * + * @param ids 需要删除的电源信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchPowerSupplyByIds(Long[] ids) + { + return initialSwitchPowerSupplyMapper.deleteInitialSwitchPowerSupplyByIds(ids); + } + + /** + * 删除电源信息信息 + * + * @param id 电源信息主键 + * @return 结果 + */ + @Override + public int deleteInitialSwitchPowerSupplyById(Long id) + { + return initialSwitchPowerSupplyMapper.deleteInitialSwitchPowerSupplyById(id); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSystemOtherCollectDataServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSystemOtherCollectDataServiceImpl.java new file mode 100644 index 0000000..c160b8e --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/InitialSystemOtherCollectDataServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.rocketmq.domain.InitialSystemOtherCollectData; +import com.ruoyi.rocketmq.mapper.InitialSystemOtherCollectDataMapper; +import com.ruoyi.rocketmq.service.IInitialSystemOtherCollectDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 交换机系统其他信息采集数据Service业务层处理 + * + * @author gyt + * @date 2025-09-23 + */ +@Service +public class InitialSystemOtherCollectDataServiceImpl implements IInitialSystemOtherCollectDataService +{ + @Autowired + private InitialSystemOtherCollectDataMapper initialSystemOtherCollectDataMapper; + + /** + * 查询交换机系统其他信息采集数据 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 交换机系统其他信息采集数据 + */ + @Override + public InitialSystemOtherCollectData selectInitialSystemOtherCollectDataById(Long id) + { + return initialSystemOtherCollectDataMapper.selectInitialSystemOtherCollectDataById(id); + } + + /** + * 查询交换机系统其他信息采集数据列表 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 交换机系统其他信息采集数据 + */ + @Override + public List selectInitialSystemOtherCollectDataList(InitialSystemOtherCollectData initialSystemOtherCollectData) + { + return initialSystemOtherCollectDataMapper.selectInitialSystemOtherCollectDataList(initialSystemOtherCollectData); + } + + /** + * 新增交换机系统其他信息采集数据 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + @Override + public int insertInitialSystemOtherCollectData(InitialSystemOtherCollectData initialSystemOtherCollectData) + { + return initialSystemOtherCollectDataMapper.insertInitialSystemOtherCollectData(initialSystemOtherCollectData); + } + + /** + * 修改交换机系统其他信息采集数据 + * + * @param initialSystemOtherCollectData 交换机系统其他信息采集数据 + * @return 结果 + */ + @Override + public int updateInitialSystemOtherCollectData(InitialSystemOtherCollectData initialSystemOtherCollectData) + { + initialSystemOtherCollectData.setUpdateTime(DateUtils.getNowDate()); + return initialSystemOtherCollectDataMapper.updateInitialSystemOtherCollectData(initialSystemOtherCollectData); + } + + /** + * 批量删除交换机系统其他信息采集数据 + * + * @param ids 需要删除的交换机系统其他信息采集数据主键 + * @return 结果 + */ + @Override + public int deleteInitialSystemOtherCollectDataByIds(Long[] ids) + { + return initialSystemOtherCollectDataMapper.deleteInitialSystemOtherCollectDataByIds(ids); + } + + /** + * 删除交换机系统其他信息采集数据信息 + * + * @param id 交换机系统其他信息采集数据主键 + * @return 结果 + */ + @Override + public int deleteInitialSystemOtherCollectDataById(Long id) + { + return initialSystemOtherCollectDataMapper.deleteInitialSystemOtherCollectDataById(id); + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmDeploymentPolicyServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmDeploymentPolicyServiceImpl.java new file mode 100644 index 0000000..7bbcccc --- /dev/null +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmDeploymentPolicyServiceImpl.java @@ -0,0 +1,246 @@ +package com.ruoyi.rocketmq.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.common.core.constant.SecurityConstants; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.enums.MsgEnum; +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.common.core.utils.StringUtils; +import com.ruoyi.rocketmq.domain.DeviceMessage; +import com.ruoyi.rocketmq.domain.RmDeploymentPolicy; +import com.ruoyi.rocketmq.domain.vo.ScriptPolicyVo; +import com.ruoyi.rocketmq.mapper.RmDeploymentPolicyMapper; +import com.ruoyi.rocketmq.model.ProducerMode; +import com.ruoyi.rocketmq.producer.MessageProducer; +import com.ruoyi.rocketmq.service.IRmDeploymentPolicyService; +import com.ruoyi.system.api.RemoteRevenueConfigService; +import com.ruoyi.system.api.domain.RmResourceRegistrationRemote; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * 服务器脚本策略Service业务层处理 + * + * @author gyt + * @date 2025-09-15 + */ +@Service +@Slf4j +public class RmDeploymentPolicyServiceImpl implements IRmDeploymentPolicyService +{ + @Autowired + private RmDeploymentPolicyMapper rmDeploymentPolicyMapper; + @Autowired + private RemoteRevenueConfigService remoteRevenueConfigService; + @Autowired + private ProducerMode producerMode; + + /** + * 查询服务器脚本策略 + * + * @param id 服务器脚本策略主键 + * @return 服务器脚本策略 + */ + @Override + public RmDeploymentPolicy selectRmDeploymentPolicyById(Long id) + { + RmDeploymentPolicy rmDeploymentPolicy = rmDeploymentPolicyMapper.selectRmDeploymentPolicyById(id); + // 包含设备名称赋值 + getIncludeNameById(rmDeploymentPolicy); + return rmDeploymentPolicy; + } + + /** + * 查询服务器脚本策略列表 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 服务器脚本策略 + */ + @Override + public List selectRmDeploymentPolicyList(RmDeploymentPolicy rmDeploymentPolicy) + { + List deploymentPolicyList = rmDeploymentPolicyMapper.selectRmDeploymentPolicyList(rmDeploymentPolicy); + // 包含设备名称赋值 + deploymentPolicyList.forEach(policy -> { + getIncludeNameById(policy); + }); + + return deploymentPolicyList; + } + + /** + * 根据资源id查询资源名称 + * @param policy + */ + public void getIncludeNameById(RmDeploymentPolicy policy){ + if (StringUtils.isBlank(policy.getIncludedDevicesId())) { + policy.setIncludedDevicesName(""); + return; + } + + String[] ids = policy.getIncludedDevicesId().split(","); + R> resourceNameList = + remoteRevenueConfigService.getRegistrationByIds(ids, SecurityConstants.INNER); + + if (resourceNameList == null || resourceNameList.getData() == null) { + policy.setIncludedDevicesName(""); + return; + } + + String names = resourceNameList.getData().stream() + .filter(Objects::nonNull) + .map(RmResourceRegistrationRemote::getResourceName) + .filter(StringUtils::isNotBlank) + .collect(Collectors.joining(",")); + + policy.setIncludedDevicesName(names); + } + + /** + * 新增服务器脚本策略 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 结果 + */ + @Override + public int insertRmDeploymentPolicy(RmDeploymentPolicy rmDeploymentPolicy) + { + rmDeploymentPolicy.setCreateTime(DateUtils.getNowDate()); + return rmDeploymentPolicyMapper.insertRmDeploymentPolicy(rmDeploymentPolicy); + } + + /** + * 修改服务器脚本策略 + * + * @param rmDeploymentPolicy 服务器脚本策略 + * @return 结果 + */ + @Override + public int updateRmDeploymentPolicy(RmDeploymentPolicy rmDeploymentPolicy) + { + rmDeploymentPolicy.setUpdateTime(DateUtils.getNowDate()); + return rmDeploymentPolicyMapper.updateRmDeploymentPolicy(rmDeploymentPolicy); + } + + /** + * 批量删除服务器脚本策略 + * + * @param ids 需要删除的服务器脚本策略主键 + * @return 结果 + */ + @Override + public int deleteRmDeploymentPolicyByIds(Long[] ids) + { + return rmDeploymentPolicyMapper.deleteRmDeploymentPolicyByIds(ids); + } + + /** + * 删除服务器脚本策略信息 + * + * @param id 服务器脚本策略主键 + * @return 结果 + */ + @Override + public int deleteRmDeploymentPolicyById(Long id) + { + return rmDeploymentPolicyMapper.deleteRmDeploymentPolicyById(id); + } + + @Override + public int issueDeploymentPolicy(Long id) { + try { + // 获取策略详情和资源设备 + RmDeploymentPolicy policy = rmDeploymentPolicyMapper.selectRmDeploymentPolicyById(id); + if (policy == null) { + log.error("策略不存在,id: {}", id); + return 0; + } + + if (StringUtils.isBlank(policy.getIncludedDevicesId())) { + policy.setIncludedDevicesName(""); + return 0; + } + + String[] ids = policy.getIncludedDevicesId().split(","); + R> resourceNameList = + remoteRevenueConfigService.getRegistrationByIds(ids, SecurityConstants.INNER); + List devices = resourceNameList.getData(); + if (CollectionUtils.isEmpty(devices)) { + return 0; + } + + // 构建并发送脚本配置 + String[] commands = policy.getCommandContent().split(","); + List commandList = new ArrayList<>(Arrays.asList(commands)); + List files = new ArrayList<>(); + ScriptPolicyVo scriptPolicyVo = new ScriptPolicyVo(); + scriptPolicyVo.setPolicyName(policy.getPolicyName()); + scriptPolicyVo.setFilePath(policy.getTargetDirectory()); + scriptPolicyVo.setCommands(commandList); + scriptPolicyVo.setMethod(policy.getExecutionMethod()); + // 定时执行 + if(policy.getExecutionMethod() == 1){ + Date scheduledTime = policy.getScheduledTime(); + // 转化为时间戳(秒) + long timestampInSecondes = scheduledTime.getTime() / 1000; + scriptPolicyVo.setPolicyTime(timestampInSecondes); + } + String[] fileTypes = policy.getSourceFilePathType().split(","); + String[] fileUrls = policy.getSourceFilePath().split(","); + for(int i=0;i< fileTypes.length;i++){ + ScriptPolicyVo.ScriptFile file = new ScriptPolicyVo.ScriptFile(); + file.setFileType(Integer.parseInt(fileTypes[i])); + file.setFileUrl(fileUrls[i]); + String fileUrl = fileUrls[i]; + // 文件名称 + int lastSlashIndex = fileUrl.lastIndexOf("/"); + String fileName = fileUrl.substring(lastSlashIndex + 1); + file.setFileName(fileName); + files.add(file); + } + scriptPolicyVo.setFiles(files); + sendDeploymentPolicyToDevices(devices, scriptPolicyVo); + // 更新策略状态为已下发 + RmDeploymentPolicy deploymentPolicy = new RmDeploymentPolicy(); + deploymentPolicy.setId(id); + deploymentPolicy.setPolicyStatus("1"); + deploymentPolicy.setDeployTime(DateUtils.getNowDate()); + rmDeploymentPolicyMapper.updateRmDeploymentPolicy(deploymentPolicy); + + return 1; + } catch (Exception e) { + log.error("下发策略失败,id: {}", id, e); + return 0; + } + } + /** + * 发送配置到设备 + */ + private void sendDeploymentPolicyToDevices(List devices, ScriptPolicyVo scriptPolicyVo) { + MessageProducer messageProducer = new MessageProducer(); + String configJson = JSONObject.toJSONString(scriptPolicyVo); + + for (RmResourceRegistrationRemote device : devices) { + try { + DeviceMessage message = new DeviceMessage(); + message.setClientId(device.getHardwareSn()); + message.setData(configJson); + message.setDataType(MsgEnum.执行脚本策略.getValue()); + + messageProducer.sendAsyncProducerMessage( + producerMode.getAgentTopic(), + "", + "", + JSONObject.toJSONString(message) + ); + } catch (Exception e) { + log.error("发送设备配置失败,deviceId: {}", device.getHardwareSn(), e); + } + } + } +} diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmInitialMonitorItemServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmInitialMonitorItemServiceImpl.java index 45d0cb8..44786b5 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmInitialMonitorItemServiceImpl.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmInitialMonitorItemServiceImpl.java @@ -120,7 +120,7 @@ public class RmInitialMonitorItemServiceImpl implements IRmInitialMonitorItemSer } else if ("autodiscoverItem".equals(itemType)) { // 挂载点信息 - resultMap.put("point", filterItems(allItems, "POINT")); + resultMap.put("vfs", filterItems(allItems, "POINT")); // 网络接口信息 resultMap.put("net", filterItems(allItems, "NET")); // 磁盘信息 @@ -132,19 +132,19 @@ public class RmInitialMonitorItemServiceImpl implements IRmInitialMonitorItemSer else if ("switch".equals(resourceType)) { if ("monitorItem".equals(itemType)) { // 系统信息 - resultMap.put("system", filterItems(allItems, "SYSTEM")); + resultMap.put("switchOther", filterItems(allItems, "SYSTEM")); // MPU信息 - resultMap.put("mpu", filterItems(allItems, "MPU")); + resultMap.put("switchMpu", filterItems(allItems, "MPU")); // 电源信息 - resultMap.put("power", filterItems(allItems, "POWERSOURCE")); + resultMap.put("switchPwr", filterItems(allItems, "POWERSOURCE")); } else if ("autodiscoverItem".equals(itemType)) { // 网络端口信息 - resultMap.put("netport", filterItems(allItems, "NETPORT")); + resultMap.put("switchNet", filterItems(allItems, "NETPORT")); // 光模块信息 - resultMap.put("lightmodule", filterItems(allItems, "LIGHTMODULE")); + resultMap.put("switchModule", filterItems(allItems, "LIGHTMODULE")); // 风扇信息 - resultMap.put("fan", filterItems(allItems, "FAN")); + resultMap.put("switchFan", filterItems(allItems, "FAN")); } } diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmMonitorPolicyServiceImpl.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmMonitorPolicyServiceImpl.java index 8b666e7..dd4e7c4 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmMonitorPolicyServiceImpl.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/service/impl/RmMonitorPolicyServiceImpl.java @@ -150,7 +150,7 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService rmTemplateLinux.setCollectionCycle(rmMonitorPolicyVo.getCollectionCycle()); rmTemplateLinuxMapper.updateRmTemplateLinux(rmTemplateLinux); } - }else{ + }else if("switch".equals(rmMonitorPolicy.getResourceType())){ for (RmMonitorPolicyVo rmMonitorPolicyVo : collectionAndIdList) { // 添加采集周期 RmTemplateSwitch rmTemplateSwitch = new RmTemplateSwitch(); @@ -158,6 +158,8 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService rmTemplateSwitch.setCollectionCycle(rmMonitorPolicyVo.getCollectionCycle()); rmTemplateSwitchMapper.updateRmTemplateSwitch(rmTemplateSwitch); } + }else { + return 0; } } return 1; @@ -216,11 +218,11 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService if(policyDetails.get("switch") != null){ isSwitch = true; } - SwitchOidVo switchOidVo = buildOids(policyDetails); List collectVos = buildCollectConfigurations(policyDetails); // 去重 List uniqueList = collectVos.stream().distinct().collect(Collectors.toList()); if(isSwitch){ + SwitchOidVo switchOidVo = buildOids(policyDetails); sendSwitchConfigurationsToDevices(devices, uniqueList, switchOidVo); }else{ sendConfigurationsToDevices(devices, uniqueList); @@ -289,7 +291,7 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService } else if (config instanceof RmTemplateSwitch) { RmTemplateSwitch switchConfig = (RmTemplateSwitch) config; if("switchOther".equals(type)){ - vo.setType(FieldNameConverterUtil.convertToJavaProperty(switchConfig.getMetricKey())); + vo.setType(FieldNameConverterUtil.convertToSwitchProperty(switchConfig.getMetricKey())); }else{ vo.setType(type + COLLECT_SUFFIX); } diff --git a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/utils/FieldNameConverterUtil.java b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/utils/FieldNameConverterUtil.java index a412d9b..2e9cb81 100644 --- a/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/utils/FieldNameConverterUtil.java +++ b/ruoyi-rocketmq/src/main/java/com/ruoyi/rocketmq/utils/FieldNameConverterUtil.java @@ -48,6 +48,64 @@ public class FieldNameConverterUtil { return result.toString(); } + /** + * 将SNMP字段名转换为Java属性名(带指定前缀和Collect后缀) + * 示例:sysDescr -> switchSysDescrCollect + * ifHCInOctets -> switchIfHCInOctetsCollect + * + * @param snmpFieldName SNMP字段名 + * @param prefix 前缀(如:switch、router等) + * @return Java属性名 + */ + public static String convertSnmpToJavaProperty(String snmpFieldName, String prefix) { + return convertSnmpToJavaProperty(snmpFieldName, prefix, "Collect"); + } + + /** + * 将SNMP字段名转换为Java属性名(带指定前缀和自定义后缀) + * 示例:sysDescr + "switch" + "Config" -> switchSysDescrConfig + * ifHCInOctets + "router" + "Info" -> routerIfHCInOctetsInfo + * + * @param snmpFieldName SNMP字段名 + * @param prefix 前缀(如:switch、router等) + * @param suffix 自定义后缀 + * @return Java属性名 + */ + public static String convertSnmpToJavaProperty(String snmpFieldName, String prefix, String suffix) { + if (StringUtils.isBlank(snmpFieldName)) { + return ""; + } + + StringBuilder result = new StringBuilder(); + + // 添加前缀 + if (StringUtils.isNotBlank(prefix)) { + result.append(prefix); + } + + // 处理SNMP字段名(将首字母大写) + result.append(StringUtils.capitalize(snmpFieldName)); + + // 添加后缀 + if (StringUtils.isNotBlank(suffix)) { + result.append(suffix); + } + + return result.toString(); + } + + /** + * 将SNMP字段名转换为交换机Java属性名(带switch前缀和Collect后缀) + * 示例:sysDescr -> switchSysDescrCollect + * ifHCInOctets -> switchIfHCInOctetsCollect + * + * @param snmpFieldName SNMP字段名 + * @return Java属性名 + */ + public static String convertToSwitchProperty(String snmpFieldName) { + return convertSnmpToJavaProperty(snmpFieldName, "switch", "Collect"); + } + /** * 将Java属性名转换回数据库字段名 * 示例:systemSwapSizeFreeCollect -> system.swap.size.free @@ -70,4 +128,49 @@ public class FieldNameConverterUtil { return withoutSuffix.replaceAll("(?<=[a-z])(?=[A-Z])", ".") .toLowerCase(); } + + /** + * 将带前缀和后缀的Java属性名转换回原始SNMP字段名 + * 示例:switchSysDescrCollect -> sysDescr + * routerIfHCInOctetsInfo -> ifHCInOctets + * + * @param javaProperty Java属性名 + * @param prefix 需要去除的前缀 + * @param suffix 需要去除的后缀 + * @return 原始SNMP字段名 + */ + public static String convertToSnmpField(String javaProperty, String prefix, String suffix) { + if (StringUtils.isBlank(javaProperty)) { + return ""; + } + + // 去除后缀 + String withoutSuffix = StringUtils.isNotBlank(suffix) + ? StringUtils.removeEnd(javaProperty, suffix) + : javaProperty; + + // 去除前缀 + String withoutPrefix = StringUtils.isNotBlank(prefix) + ? StringUtils.removeStart(withoutSuffix, StringUtils.capitalize(prefix)) + : withoutSuffix; + + // 将首字母转为小写 + if (StringUtils.isNotBlank(withoutPrefix)) { + return StringUtils.uncapitalize(withoutPrefix); + } + + return withoutPrefix; + } + + /** + * 将交换机Java属性名转换回原始SNMP字段名 + * 示例:switchSysDescrCollect -> sysDescr + * switchIfHCInOctetsCollect -> ifHCInOctets + * + * @param switchProperty 交换机Java属性名 + * @return 原始SNMP字段名 + */ + public static String convertFromSwitchProperty(String switchProperty) { + return convertToSnmpField(switchProperty, "switch", "Collect"); + } } \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialOtherSystemMonitorDataMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialOtherSystemMonitorDataMapper.xml new file mode 100644 index 0000000..24cd68f --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialOtherSystemMonitorDataMapper.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, client_id, system_swap_size_free_collect, system_swap_size_percent_collect, memory_utilization_collect, memory_size_available_collect, memory_size_percent_collect, memory_size_total_collect, system_sw_os_collect, system_sw_arch_collect, kernel_maxproc_collect, proc_num_run_collect, system_users_num_collect, system_disk_size_total_collect, system_boottime_collect, system_uname_collect, system_localtime_collect, system_uptime_collect, proc_num_collect, create_time, update_time, create_by, update_by from initial_other_system_monitor_data + + + + + + + + insert into initial_other_system_monitor_data + + client_id, + system_swap_size_free_collect, + system_swap_size_percent_collect, + memory_utilization_collect, + memory_size_available_collect, + memory_size_percent_collect, + memory_size_total_collect, + system_sw_os_collect, + system_sw_arch_collect, + kernel_maxproc_collect, + proc_num_run_collect, + system_users_num_collect, + system_disk_size_total_collect, + system_boottime_collect, + system_uname_collect, + system_localtime_collect, + system_uptime_collect, + proc_num_collect, + create_time, + update_time, + create_by, + update_by, + + + #{clientId}, + #{systemSwapSizeFreeCollect}, + #{systemSwapSizePercentCollect}, + #{memoryUtilizationCollect}, + #{memorySizeAvailableCollect}, + #{memorySizePercentCollect}, + #{memorySizeTotalCollect}, + #{systemSwOsCollect}, + #{systemSwArchCollect}, + #{kernelMaxprocCollect}, + #{procNumRunCollect}, + #{systemUsersNumCollect}, + #{systemDiskSizeTotalCollect}, + #{systemBoottimeCollect}, + #{systemUnameCollect}, + #{systemLocaltimeCollect}, + #{systemUptimeCollect}, + #{procNumCollect}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update initial_other_system_monitor_data + + client_id = #{clientId}, + system_swap_size_free_collect = #{systemSwapSizeFreeCollect}, + system_swap_size_percent_collect = #{systemSwapSizePercentCollect}, + memory_utilization_collect = #{memoryUtilizationCollect}, + memory_size_available_collect = #{memorySizeAvailableCollect}, + memory_size_percent_collect = #{memorySizePercentCollect}, + memory_size_total_collect = #{memorySizeTotalCollect}, + system_sw_os_collect = #{systemSwOsCollect}, + system_sw_arch_collect = #{systemSwArchCollect}, + kernel_maxproc_collect = #{kernelMaxprocCollect}, + proc_num_run_collect = #{procNumRunCollect}, + system_users_num_collect = #{systemUsersNumCollect}, + system_disk_size_total_collect = #{systemDiskSizeTotalCollect}, + system_boottime_collect = #{systemBoottimeCollect}, + system_uname_collect = #{systemUnameCollect}, + system_localtime_collect = #{systemLocaltimeCollect}, + system_uptime_collect = #{systemUptimeCollect}, + proc_num_collect = #{procNumCollect}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from initial_other_system_monitor_data where id = #{id} + + + + delete from initial_other_system_monitor_data where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchFanInfoMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchFanInfoMapper.xml new file mode 100644 index 0000000..aa030ce --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchFanInfoMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + select id, fan_ent_index, fan_name, fan_entity_fan_state, client_id, create_time, update_time, create_by, update_by from initial_switch_fan_info + + + + + + + + insert IGNORE into initial_switch_fan_info + + fan_ent_index, + fan_name, + fan_entity_fan_state, + client_id, + create_time, + update_time, + create_by, + update_by, + + + #{fanEntIndex}, + #{fanName}, + #{fanEntityFanState}, + #{clientId}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update initial_switch_fan_info + + fan_ent_index = #{fanEntIndex}, + fan_name = #{fanName}, + fan_entity_fan_state = #{fanEntityFanState}, + client_id = #{clientId}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from initial_switch_fan_info where id = #{id} + + + + delete from initial_switch_fan_info where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchInfoMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchInfoMapper.xml index 196f656..3b82e48 100644 --- a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchInfoMapper.xml +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchInfoMapper.xml @@ -1,7 +1,7 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> @@ -15,6 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + @@ -22,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, create_by, update_by, create_time, update_time from initial_switch_info + select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, if_index, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, create_by, update_by, create_time, update_time from initial_switch_info @@ -57,6 +69,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" in_speed, out_speed, switch_ip, + if_index, + if_speed, + if_in_discards, + if_out_discards, + if_in_errors, + if_out_errors, create_by, update_by, create_time, @@ -72,6 +90,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{inSpeed}, #{outSpeed}, #{switchIp}, + #{ifIndex}, + #{ifSpeed}, + #{ifInDiscards}, + #{ifOutDiscards}, + #{ifInErrors}, + #{ifOutErrors}, #{createBy}, #{updateBy}, #{createTime}, @@ -91,6 +115,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" in_speed = #{inSpeed}, out_speed = #{outSpeed}, switch_ip = #{switchIp}, + if_index = #{ifIndex}, + if_speed = #{ifSpeed}, + if_in_discards = #{ifInDiscards}, + if_out_discards = #{ifOutDiscards}, + if_in_errors = #{ifInErrors}, + if_out_errors = #{ifOutErrors}, create_by = #{createBy}, update_by = #{updateBy}, create_time = #{createTime}, @@ -114,13 +144,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" INSERT IGNORE INTO initial_switch_info ( client_id, `name`, in_bytes, out_bytes, status, `type`, in_speed, out_speed, switch_ip, + if_index, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, create_by, update_by, create_time, update_time ) VALUES ( #{item.clientId}, #{item.name}, #{item.inBytes}, #{item.outBytes}, - #{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.switchIp}, #{item.createBy}, #{item.updateBy}, + #{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.switchIp}, + #{item.ifIndex}, #{item.ifSpeed}, #{item.ifInDiscards},#{item.ifOutDiscards},#{item.ifInErrors},#{item.ifOutErrors}, + #{item.createBy}, #{item.updateBy}, #{item.createTime} @@ -140,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) + @@ -37,6 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and in_speed = #{inSpeed} and out_speed = #{outSpeed} and switch_ip = #{switchIp} + and if_index = #{ifIndex} + and if_speed = #{ifSpeed} + and if_in_discards = #{ifInDiscards} + and if_out_discards = #{ifOutDiscards} + and if_in_errors = #{ifInErrors} + and if_out_errors = #{ifOutErrors} @@ -56,7 +68,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" type, in_speed, out_speed, - switch_ip, + switch_ip, + if_index, + if_speed, + if_in_discards, + if_out_discards, + if_in_errors, + if_out_errors, create_by, update_by, create_time, @@ -71,7 +89,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{type}, #{inSpeed}, #{outSpeed}, - #{switchIp}, + #{switchIp}, + #{ifIndex}, + #{ifSpeed}, + #{ifInDiscards}, + #{ifOutDiscards}, + #{ifInErrors}, + #{ifOutErrors}, #{createBy}, #{updateBy}, #{createTime}, @@ -90,7 +114,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" type = #{type}, in_speed = #{inSpeed}, out_speed = #{outSpeed}, - switch_ip = #{switchIp}, + switch_ip = #{switchIp}, + if_index = #{ifIndex}, + if_speed = #{ifSpeed}, + if_in_discards = #{ifInDiscards}, + if_out_discards = #{ifOutDiscards}, + if_in_errors = #{ifInErrors}, + if_out_errors = #{ifOutErrors}, create_by = #{createBy}, update_by = #{updateBy}, create_time = #{createTime}, @@ -109,17 +139,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + INSERT IGNORE INTO initial_switch_info_temp ( - client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, + client_id, `name`, in_bytes, out_bytes, status, `type`, in_speed, out_speed, switch_ip, + if_index, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, create_by, update_by, create_time, update_time ) VALUES ( #{item.clientId}, #{item.name}, #{item.inBytes}, #{item.outBytes}, - #{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.switchIp}, #{item.createBy}, #{item.updateBy}, + #{item.status}, #{item.type}, #{item.inSpeed}, #{item.outSpeed}, #{item.switchIp}, + #{item.ifIndex}, #{item.ifSpeed}, #{item.ifInDiscards},#{item.ifOutDiscards},#{item.ifInErrors},#{item.ifOutErrors}, + #{item.createBy}, #{item.updateBy}, #{item.createTime} @@ -139,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) + DELETE FROM initial_switch_info_temp WHERE diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchMpuInfoMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchMpuInfoMapper.xml new file mode 100644 index 0000000..d26b619 --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchMpuInfoMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + select id, mpu_ent_index, mpu_name, mpu_entity_cpu_usage, mpu_entity_mem_usage, mpu_physical_software_rev, mpu_entity_temperature, client_id, create_time, update_time, create_by, update_by from initial_switch_mpu_info + + + + + + + + insert IGNORE into initial_switch_mpu_info + + mpu_ent_index, + mpu_name, + mpu_entity_cpu_usage, + mpu_entity_mem_usage, + mpu_physical_software_rev, + mpu_entity_temperature, + client_id, + create_time, + update_time, + create_by, + update_by, + + + #{mpuEntIndex}, + #{mpuName}, + #{mpuEntityCpuUsage}, + #{mpuEntityMemUsage}, + #{mpuPhysicalSoftwareRev}, + #{mpuEntityTemperature}, + #{clientId}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update initial_switch_mpu_info + + mpu_ent_index = #{mpuEntIndex}, + mpu_name = #{mpuName}, + mpu_entity_cpu_usage = #{mpuEntityCpuUsage}, + mpu_entity_mem_usage = #{mpuEntityMemUsage}, + mpu_physical_software_rev = #{mpuPhysicalSoftwareRev}, + mpu_entity_temperature = #{mpuEntityTemperature}, + client_id = #{clientId}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from initial_switch_mpu_info where id = #{id} + + + + delete from initial_switch_mpu_info where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchOpticalModuleMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchOpticalModuleMapper.xml new file mode 100644 index 0000000..facb76f --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchOpticalModuleMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + select id, fiber_ent_index, fiber_port_name, hw_entity_optical_tx_low_threshold, hw_entity_optical_rx_low_threshold, hw_entity_optical_rx_power, hw_entity_optical_tx_power, client_id, create_time, update_time, create_by, update_by from initial_switch_optical_module + + + + + + + + insert IGNORE into initial_switch_optical_module + + fiber_ent_index, + fiber_port_name, + hw_entity_optical_tx_low_threshold, + hw_entity_optical_rx_low_threshold, + hw_entity_optical_rx_power, + hw_entity_optical_tx_power, + client_id, + create_time, + update_time, + create_by, + update_by, + + + #{fiberEntIndex}, + #{fiberPortName}, + #{hwEntityOpticalTxLowThreshold}, + #{hwEntityOpticalRxLowThreshold}, + #{hwEntityOpticalRxPower}, + #{hwEntityOpticalTxPower}, + #{clientId}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update initial_switch_optical_module + + fiber_ent_index = #{fiberEntIndex}, + fiber_port_name = #{fiberPortName}, + hw_entity_optical_tx_low_threshold = #{hwEntityOpticalTxLowThreshold}, + hw_entity_optical_rx_low_threshold = #{hwEntityOpticalRxLowThreshold}, + hw_entity_optical_rx_power = #{hwEntityOpticalRxPower}, + hw_entity_optical_tx_power = #{hwEntityOpticalTxPower}, + client_id = #{clientId}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from initial_switch_optical_module where id = #{id} + + + + delete from initial_switch_optical_module where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchOtherCollectDataMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchOtherCollectDataMapper.xml new file mode 100644 index 0000000..8115878 --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchOtherCollectDataMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + select id, client_id, collect_type, collect_value, create_time, update_time, create_by, update_by from initial_switch_other_collect_data + + + + + + + + insert IGNORE into initial_switch_other_collect_data + + client_id, + collect_type, + collect_value, + create_time, + update_time, + create_by, + update_by, + + + #{clientId}, + #{collectType}, + #{collectValue}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update initial_switch_other_collect_data + + client_id = #{clientId}, + collect_type = #{collectType}, + collect_value = #{collectValue}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from initial_switch_other_collect_data where id = #{id} + + + + delete from initial_switch_other_collect_data where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchPowerSupplyMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchPowerSupplyMapper.xml new file mode 100644 index 0000000..f940152 --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSwitchPowerSupplyMapper.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + select id, pwr_ent_index, pwr_name, pwr_entity_pwr_state, pwr_entity_pwr_current, pwr_entity_pwr_voltage, client_id, create_time, update_time, create_by, update_by from initial_switch_power_supply + + + + + + + + insert IGNORE into initial_switch_power_supply + + pwr_ent_index, + pwr_name, + pwr_entity_pwr_state, + pwr_entity_pwr_current, + pwr_entity_pwr_voltage, + client_id, + create_time, + update_time, + create_by, + update_by, + + + #{pwrEntIndex}, + #{pwrName}, + #{pwrEntityPwrState}, + #{pwrEntityPwrCurrent}, + #{pwrEntityPwrVoltage}, + #{clientId}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update initial_switch_power_supply + + pwr_ent_index = #{pwrEntIndex}, + pwr_name = #{pwrName}, + pwr_entity_pwr_state = #{pwrEntityPwrState}, + pwr_entity_pwr_current = #{pwrEntityPwrCurrent}, + pwr_entity_pwr_voltage = #{pwrEntityPwrVoltage}, + client_id = #{clientId}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from initial_switch_power_supply where id = #{id} + + + + delete from initial_switch_power_supply where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSystemOtherCollectDataMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSystemOtherCollectDataMapper.xml new file mode 100644 index 0000000..17c80f0 --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/InitialSystemOtherCollectDataMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + select id, client_id, collect_type, collect_value, create_time, update_time, create_by, update_by from initial_system_other_collect_data + + + + + + + + insert IGNORE into initial_system_other_collect_data + + client_id, + collect_type, + collect_value, + create_time, + update_time, + create_by, + update_by, + + + #{clientId}, + #{collectType}, + #{collectValue}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update initial_system_other_collect_data + + client_id = #{clientId}, + collect_type = #{collectType}, + collect_value = #{collectValue}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from initial_system_other_collect_data where id = #{id} + + + + delete from initial_system_other_collect_data where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/RmDeploymentPolicyMapper.xml b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/RmDeploymentPolicyMapper.xml new file mode 100644 index 0000000..6845e06 --- /dev/null +++ b/ruoyi-rocketmq/src/main/resources/mapper/rocketmq/RmDeploymentPolicyMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, policy_name, description, resource_group_id, included_devices_id, source_file_path_type, source_file_path, target_directory, command_content, execution_method, scheduled_time, policy_status, deploy_time, script_type, create_time, update_time, create_by, update_by from rm_deployment_policy + + + + + + + + insert into rm_deployment_policy + + policy_name, + description, + resource_group_id, + included_devices_id, + source_file_path_type, + source_file_path, + target_directory, + command_content, + execution_method, + scheduled_time, + policy_status, + deploy_time, + script_type, + create_time, + update_time, + create_by, + update_by, + + + #{policyName}, + #{description}, + #{resourceGroupId}, + #{includedDevicesId}, + #{sourceFilePathType}, + #{sourceFilePath}, + #{targetDirectory}, + #{commandContent}, + #{executionMethod}, + #{scheduledTime}, + #{policyStatus}, + #{deployTime}, + #{scriptType}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update rm_deployment_policy + + policy_name = #{policyName}, + description = #{description}, + resource_group_id = #{resourceGroupId}, + included_devices_id = #{includedDevicesId}, + source_file_path_type = #{sourceFilePathType}, + source_file_path = #{sourceFilePath}, + target_directory = #{targetDirectory}, + command_content = #{commandContent}, + execution_method = #{executionMethod}, + scheduled_time = #{scheduledTime}, + policy_status = #{policyStatus}, + deploy_time = #{deployTime}, + script_type = #{scriptType}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from rm_deployment_policy where id = #{id} + + + + delete from rm_deployment_policy where id in + + #{id} + + + \ No newline at end of file