rocketmq,收益管理,资源管理模块代码
This commit is contained in:
@@ -70,6 +70,10 @@
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.system.config;
|
||||
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
/**
|
||||
* 自动生成数据表
|
||||
*/
|
||||
@Configuration
|
||||
@EnableScheduling
|
||||
public class TableScheduleConfig {
|
||||
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
|
||||
// 每月25号创建下月表
|
||||
@Scheduled(cron = "0 0 0 25 * ?")
|
||||
// @Scheduled(initialDelay = 5000, fixedDelay = Long.MAX_VALUE)
|
||||
public void createNextMonthTables() {
|
||||
epsInitialTrafficDataService.createNextMonthTables();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.system.domain.EpsBusiness;
|
||||
import com.ruoyi.system.service.IEpsBusinessService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 业务信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business")
|
||||
public class EpsBusinessController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsBusinessService epsBusinessService;
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsBusiness.getPageNum());
|
||||
pageDomain.setPageSize(epsBusiness.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsBusiness> list = epsBusinessService.selectEpsBusinessList(epsBusiness);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@PostMapping("/getAllBusinessMsg")
|
||||
public AjaxResult getAllBusinessMsg(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
List<EpsBusiness> list = epsBusinessService.selectEpsBusinessList(epsBusiness);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出业务信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:business:export")
|
||||
@Log(title = "业务信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsBusiness epsBusiness)
|
||||
{
|
||||
List<EpsBusiness> list = epsBusinessService.selectEpsBusinessList(epsBusiness);
|
||||
ExcelUtil<EpsBusiness> util = new ExcelUtil<EpsBusiness>(EpsBusiness.class);
|
||||
util.showColumn(epsBusiness.getProperties());
|
||||
util.exportExcel(response, list, "业务信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:business:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(epsBusinessService.selectEpsBusinessById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*/
|
||||
@RequiresPermissions("system:business:add")
|
||||
@Log(title = "业务信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
int rows = epsBusinessService.insertEpsBusiness(epsBusiness);
|
||||
if(-1==rows){
|
||||
return AjaxResult.error(500,"业务名称不可重复");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*/
|
||||
@RequiresPermissions("system:business:edit")
|
||||
@Log(title = "业务信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
int rows = epsBusinessService.updateEpsBusiness(epsBusiness);
|
||||
if(-1==rows){
|
||||
return AjaxResult.error(500,"业务名称不可重复");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成12位唯一标识
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@GetMapping("/getBusinessCode")
|
||||
public String getBusinessCode()
|
||||
{
|
||||
long timestamp = System.currentTimeMillis() / 100; // 取前10位(精确到0.1秒)
|
||||
int random = new Random().nextInt(100); // 2位随机数(00~99)
|
||||
return String.format("%010d%02d", timestamp, random);
|
||||
}
|
||||
/**
|
||||
* 验证业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("system:business:list")
|
||||
@PostMapping("/countByBusinessName")
|
||||
public AjaxResult countByBusinessName(@RequestBody EpsBusiness epsBusiness)
|
||||
{
|
||||
int rows = epsBusinessService.countByBusinessName(epsBusiness);
|
||||
if(rows>0){
|
||||
return AjaxResult.error(500,"业务名称不可重复");
|
||||
}else {
|
||||
return AjaxResult.success("添加成功");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* EPS初始流量数据控制器
|
||||
* 提供流量数据的REST接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/eps-traffic-data")
|
||||
@RequiredArgsConstructor
|
||||
public class EpsInitialTrafficDataController {
|
||||
|
||||
private final EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
|
||||
/**
|
||||
* 保存单条流量数据
|
||||
* @param data 流量数据实体
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseEntity<Void> save(@RequestBody EpsInitialTrafficData data) {
|
||||
epsInitialTrafficDataService.save(data);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存流量数据
|
||||
* @param dataList 流量数据表
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/batch")
|
||||
public ResponseEntity<Void> saveBatch(@RequestBody EpsInitialTrafficData dataList) {
|
||||
epsInitialTrafficDataService.saveBatch(dataList);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
/**
|
||||
* 查询流量数据(POST方式)
|
||||
* @param queryParam 查询参数实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
@PostMapping("/query")
|
||||
public ResponseEntity<List<EpsInitialTrafficData>> query(@RequestBody EpsInitialTrafficData queryParam) {
|
||||
List<EpsInitialTrafficData> result = epsInitialTrafficDataService.query(queryParam);
|
||||
return ResponseEntity.ok(result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.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.system.domain.EpsMethodChangeRecord;
|
||||
import com.ruoyi.system.service.IEpsMethodChangeRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/record")
|
||||
public class EpsMethodChangeRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsMethodChangeRecordService epsMethodChangeRecordService;
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*/
|
||||
@RequiresPermissions("system:record:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsMethodChangeRecord.getPageNum());
|
||||
pageDomain.setPageSize(epsMethodChangeRecord.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsMethodChangeRecord> list = epsMethodChangeRecordService.selectEpsMethodChangeRecordList(epsMethodChangeRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出收益方式修改记录列表
|
||||
*/
|
||||
@RequiresPermissions("system:record:export")
|
||||
@Log(title = "收益方式修改记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
List<EpsMethodChangeRecord> list = epsMethodChangeRecordService.selectEpsMethodChangeRecordList(epsMethodChangeRecord);
|
||||
ExcelUtil<EpsMethodChangeRecord> util = new ExcelUtil<EpsMethodChangeRecord>(EpsMethodChangeRecord.class);
|
||||
util.showColumn(epsMethodChangeRecord.getProperties());
|
||||
util.exportExcel(response, list, "收益方式修改记录数据");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.system.domain.EpsNodeBandwidth;
|
||||
import com.ruoyi.system.service.IEpsNodeBandwidthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bandwidth")
|
||||
public class EpsNodeBandwidthController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsNodeBandwidthService epsNodeBandwidthService;
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsNodeBandwidth.getPageNum());
|
||||
pageDomain.setPageSize(epsNodeBandwidth.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsNodeBandwidth> list = epsNodeBandwidthService.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出节点带宽信息列表
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:export")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
List<EpsNodeBandwidth> list = epsNodeBandwidthService.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
ExcelUtil<EpsNodeBandwidth> util = new ExcelUtil<EpsNodeBandwidth>(EpsNodeBandwidth.class);
|
||||
util.showColumn(epsNodeBandwidth.getProperties());
|
||||
util.exportExcel(response, list, "节点带宽信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取节点带宽信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.selectEpsNodeBandwidthById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:add")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return toAjax(epsNodeBandwidthService.insertEpsNodeBandwidth(epsNodeBandwidth));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:edit")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return toAjax(epsNodeBandwidthService.updateEpsNodeBandwidth(epsNodeBandwidth));
|
||||
}
|
||||
/**
|
||||
* 重新计算
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "recalculate/{id}")
|
||||
public AjaxResult recalculate(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.selectEpsNodeBandwidthById(id));//TODO 待逻辑处理
|
||||
}
|
||||
|
||||
/**
|
||||
* 相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "relatedData/{id}")
|
||||
public AjaxResult relatedData(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.relatedData(id));
|
||||
}
|
||||
/**
|
||||
* 相关数据-月均日95值
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "getAvgDetailMsg/{id}")
|
||||
public AjaxResult getAvgDetailMsg(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsNodeBandwidthService.getAvgDetailMsg(id));
|
||||
}
|
||||
/**
|
||||
* 生成月均日95值
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:add")
|
||||
@Log(title = "节点带宽信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/calculateAvg")
|
||||
public AjaxResult calculateAvg(@RequestBody EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return toAjax(epsNodeBandwidthService.insertEpsNodeBandwidth(epsNodeBandwidth));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.service.IEpsServerRevenueConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/revenueConfig")
|
||||
public class EpsServerRevenueConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsServerRevenueConfigService epsServerRevenueConfigService;
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:config:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsServerRevenueConfig.getPageNum());
|
||||
pageDomain.setPageSize(epsServerRevenueConfig.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsServerRevenueConfig> list = epsServerRevenueConfigService.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出服务器收益方式配置列表
|
||||
*/
|
||||
@RequiresPermissions("system:config:export")
|
||||
@Log(title = "服务器收益方式配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
List<EpsServerRevenueConfig> list = epsServerRevenueConfigService.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
ExcelUtil<EpsServerRevenueConfig> util = new ExcelUtil<EpsServerRevenueConfig>(EpsServerRevenueConfig.class);
|
||||
util.showColumn(epsServerRevenueConfig.getProperties());
|
||||
util.exportExcel(response, list, "服务器收益方式配置数据");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*/
|
||||
@RequiresPermissions("system:config:edit")
|
||||
@Log(title = "服务器收益方式配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
return toAjax(epsServerRevenueConfigService.updateEpsServerRevenueConfig(epsServerRevenueConfig));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.system.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.system.domain.EpsTrafficData;
|
||||
import com.ruoyi.system.service.IEpsTrafficDataService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 流量相关数据Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data")
|
||||
public class EpsTrafficDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsTrafficDataService epsTrafficDataService;
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*/
|
||||
@RequiresPermissions("system:data:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
startPage();
|
||||
List<EpsTrafficData> list = epsTrafficDataService.selectEpsTrafficDataList(epsTrafficData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出流量相关数据列表
|
||||
*/
|
||||
@RequiresPermissions("system:data:export")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EpsTrafficData epsTrafficData)
|
||||
{
|
||||
List<EpsTrafficData> list = epsTrafficDataService.selectEpsTrafficDataList(epsTrafficData);
|
||||
ExcelUtil<EpsTrafficData> util = new ExcelUtil<EpsTrafficData>(EpsTrafficData.class);
|
||||
util.exportExcel(response, list, "流量相关数据数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流量相关数据详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:data:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsTrafficDataService.selectEpsTrafficDataById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:data:add")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsTrafficData epsTrafficData)
|
||||
{
|
||||
return toAjax(epsTrafficDataService.insertEpsTrafficData(epsTrafficData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:data:edit")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsTrafficData epsTrafficData)
|
||||
{
|
||||
return toAjax(epsTrafficDataService.updateEpsTrafficData(epsTrafficData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流量相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:data:remove")
|
||||
@Log(title = "流量相关数据", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(epsTrafficDataService.deleteEpsTrafficDataByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.system.domain.KnowledgeBase;
|
||||
import com.ruoyi.system.service.IKnowledgeBaseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 知识库Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/knowledgebase")
|
||||
public class KnowledgeBaseController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IKnowledgeBaseService knowledgeBaseService;
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody KnowledgeBase knowledgeBase)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(knowledgeBase.getPageNum());
|
||||
pageDomain.setPageSize(knowledgeBase.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<KnowledgeBase> list = knowledgeBaseService.selectKnowledgeBaseList(knowledgeBase);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出知识库列表
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:export")
|
||||
@Log(title = "知识库", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, KnowledgeBase knowledgeBase)
|
||||
{
|
||||
List<KnowledgeBase> list = knowledgeBaseService.selectKnowledgeBaseList(knowledgeBase);
|
||||
ExcelUtil<KnowledgeBase> util = new ExcelUtil<KnowledgeBase>(KnowledgeBase.class);
|
||||
util.exportExcel(response, list, "知识库数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取知识库详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(knowledgeBaseService.selectKnowledgeBaseById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:add")
|
||||
@Log(title = "知识库", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase)
|
||||
{
|
||||
return toAjax(knowledgeBaseService.insertKnowledgeBase(knowledgeBase));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:edit")
|
||||
@Log(title = "知识库", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody KnowledgeBase knowledgeBase)
|
||||
{
|
||||
return toAjax(knowledgeBaseService.updateKnowledgeBase(knowledgeBase));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除知识库
|
||||
*/
|
||||
@RequiresPermissions("system:knowledgebase:remove")
|
||||
@Log(title = "知识库", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(knowledgeBaseService.deleteKnowledgeBaseByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.ruoyi.system.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.system.domain.MtmMonitoringTemplate;
|
||||
import com.ruoyi.system.service.IMtmMonitoringTemplateService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 监控模板管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/template")
|
||||
public class MtmMonitoringTemplateController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMtmMonitoringTemplateService mtmMonitoringTemplateService;
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:template:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
startPage();
|
||||
List<MtmMonitoringTemplate> list = mtmMonitoringTemplateService.selectMtmMonitoringTemplateList(mtmMonitoringTemplate);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出监控模板管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:template:export")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
List<MtmMonitoringTemplate> list = mtmMonitoringTemplateService.selectMtmMonitoringTemplateList(mtmMonitoringTemplate);
|
||||
ExcelUtil<MtmMonitoringTemplate> util = new ExcelUtil<MtmMonitoringTemplate>(MtmMonitoringTemplate.class);
|
||||
util.exportExcel(response, list, "监控模板管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控模板管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:template:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(mtmMonitoringTemplateService.selectMtmMonitoringTemplateById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*/
|
||||
@RequiresPermissions("system:template:add")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
return toAjax(mtmMonitoringTemplateService.insertMtmMonitoringTemplate(mtmMonitoringTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*/
|
||||
@RequiresPermissions("system:template:edit")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
return toAjax(mtmMonitoringTemplateService.updateMtmMonitoringTemplate(mtmMonitoringTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控模板管理
|
||||
*/
|
||||
@RequiresPermissions("system:template:remove")
|
||||
@Log(title = "监控模板管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(mtmMonitoringTemplateService.deleteMtmMonitoringTemplateByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.service.IRmEpsTopologyManagementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拓扑管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/management")
|
||||
public class RmEpsTopologyManagementController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmEpsTopologyManagementService rmEpsTopologyManagementService;
|
||||
|
||||
/**
|
||||
* 查询交换机/服务器名称
|
||||
*/
|
||||
@RequiresPermissions("system:management:list")
|
||||
@PostMapping ("/getNamesByResoureType")
|
||||
public List<RmEpsTopologyManagement> getNamesByResoureType(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
List<RmEpsTopologyManagement> list = rmEpsTopologyManagementService.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:management:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmEpsTopologyManagement.getPageNum());
|
||||
pageDomain.setPageSize(rmEpsTopologyManagement.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmEpsTopologyManagement> list = rmEpsTopologyManagementService.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出拓扑管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:management:export")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
List<RmEpsTopologyManagement> list = rmEpsTopologyManagementService.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
ExcelUtil<RmEpsTopologyManagement> util = new ExcelUtil<RmEpsTopologyManagement>(RmEpsTopologyManagement.class);
|
||||
util.showColumn(rmEpsTopologyManagement.getProperties());
|
||||
util.exportExcel(response, list, "拓扑管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取拓扑管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:management:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmEpsTopologyManagementService.selectRmEpsTopologyManagementById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*/
|
||||
@RequiresPermissions("system:management:add")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
return toAjax(rmEpsTopologyManagementService.insertRmEpsTopologyManagement(rmEpsTopologyManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*/
|
||||
@RequiresPermissions("system:management:edit")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
return toAjax(rmEpsTopologyManagementService.updateRmEpsTopologyManagement(rmEpsTopologyManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除拓扑管理
|
||||
*/
|
||||
@RequiresPermissions("system:management:remove")
|
||||
@Log(title = "拓扑管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmEpsTopologyManagementService.deleteRmEpsTopologyManagementByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.system.domain.RmResourceGroup;
|
||||
import com.ruoyi.system.service.IRmResourceGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源分组Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/group")
|
||||
public class RmResourceGroupController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmResourceGroupService rmResourceGroupService;
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*/
|
||||
@RequiresPermissions("system:group:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmResourceGroup.getPageNum());
|
||||
pageDomain.setPageSize(rmResourceGroup.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmResourceGroup> list = rmResourceGroupService.selectRmResourceGroupList(rmResourceGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资源分组列表
|
||||
*/
|
||||
@RequiresPermissions("system:group:export")
|
||||
@Log(title = "资源分组", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
List<RmResourceGroup> list = rmResourceGroupService.selectRmResourceGroupList(rmResourceGroup);
|
||||
ExcelUtil<RmResourceGroup> util = new ExcelUtil<RmResourceGroup>(RmResourceGroup.class);
|
||||
util.showColumn(rmResourceGroup.getProperties());
|
||||
util.exportExcel(response, list, "资源分组数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资源分组详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:group:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(rmResourceGroupService.selectRmResourceGroupById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*/
|
||||
@RequiresPermissions("system:group:add")
|
||||
@Log(title = "资源分组", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
return toAjax(rmResourceGroupService.insertRmResourceGroup(rmResourceGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*/
|
||||
@RequiresPermissions("system:group:edit")
|
||||
@Log(title = "资源分组", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
return toAjax(rmResourceGroupService.updateRmResourceGroup(rmResourceGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源分组
|
||||
*/
|
||||
@RequiresPermissions("system:group:remove")
|
||||
@Log(title = "资源分组", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmResourceGroupService.deleteRmResourceGroupByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,21 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.web.page.PageDomain;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.service.IRmResourceRegistrationService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Controller
|
||||
@@ -38,10 +34,13 @@ public class RmResourceRegistrationController extends BaseController
|
||||
* 查询资源注册列表
|
||||
*/
|
||||
@RequiresPermissions("system:registration:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RmResourceRegistration rmResourceRegistration)
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
startPage();
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmResourceRegistration.getPageNum());
|
||||
pageDomain.setPageSize(rmResourceRegistration.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<RmResourceRegistration> list = rmResourceRegistrationService.selectRmResourceRegistrationList(rmResourceRegistration);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -55,7 +54,16 @@ public class RmResourceRegistrationController extends BaseController
|
||||
public void export(HttpServletResponse response, RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
List<RmResourceRegistration> list = rmResourceRegistrationService.selectRmResourceRegistrationList(rmResourceRegistration);
|
||||
for (RmResourceRegistration resourceRegistration : list) {
|
||||
// 根据端口类型导出端口名称
|
||||
if("1".equals(resourceRegistration.getResourcePort())){
|
||||
resourceRegistration.setResourcePort("162(SNMP)");
|
||||
}else{
|
||||
resourceRegistration.setResourcePort(resourceRegistration.getOtherPortName());
|
||||
}
|
||||
}
|
||||
ExcelUtil<RmResourceRegistration> util = new ExcelUtil<RmResourceRegistration>(RmResourceRegistration.class);
|
||||
util.showColumn(rmResourceRegistration.getProperties());
|
||||
util.exportExcel(response, list, "资源注册数据");
|
||||
}
|
||||
|
||||
@@ -77,7 +85,11 @@ public class RmResourceRegistrationController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
return toAjax(rmResourceRegistrationService.insertRmResourceRegistration(rmResourceRegistration));
|
||||
int rows = rmResourceRegistrationService.insertRmResourceRegistration(rmResourceRegistration);
|
||||
if(-1==rows){
|
||||
return AjaxResult.error(500,"硬件SN不可重复");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,13 +104,37 @@ public class RmResourceRegistrationController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源注册
|
||||
* 资源注册-注册
|
||||
*/
|
||||
@RequiresPermissions("system:registration:remove")
|
||||
@Log(title = "资源注册", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
@RequiresPermissions("system:registration:edit")
|
||||
@Log(title = "资源注册-注册", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/register")
|
||||
public AjaxResult register(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
return toAjax(rmResourceRegistrationService.deleteRmResourceRegistrationByIds(ids));
|
||||
return toAjax(rmResourceRegistrationService.register(rmResourceRegistration));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有资源名称(包含设备使用)
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
@RequiresPermissions("system:group:list")
|
||||
@GetMapping("/selectAllResourceName")
|
||||
public List<Map> selectAllResourceName()
|
||||
{
|
||||
List<Map> list = rmResourceRegistrationService.selectAllResourceName();
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 查询所有资源名称
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
@RequiresPermissions("system:group:list")
|
||||
@PostMapping("/selectAllResourceNameByType")
|
||||
public List<Map> selectAllResourceNameByType(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
List<Map> list = rmResourceRegistrationService.selectAllResourceNameByType(rmResourceRegistration);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 业务信息对象 eps_business
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public class EpsBusiness extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 业务代码(12位唯一标识) */
|
||||
private String id;
|
||||
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 业务描述 */
|
||||
private String description;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName)
|
||||
{
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessName()
|
||||
{
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("businessName", getBusinessName())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("description", getDescription())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* EPS初始流量数据实体类
|
||||
* 用于存储设备的接收和发送流量数据
|
||||
* 支持按时间自动分表存储(每月分成3个表)
|
||||
*/
|
||||
@Data
|
||||
public class EpsInitialTrafficData {
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 动态表名
|
||||
* 格式:eps_traffic_[年]_[月]_[日期范围]
|
||||
* 示例:eps_traffic_2023_08_1_10
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
/** 流量统计开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/** 流量统计结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/** 接收流量(单位:MB) */
|
||||
private Double receiveTraffic;
|
||||
|
||||
/** 发送流量(单位:MB) */
|
||||
private Double sendTraffic;
|
||||
|
||||
/** 设备序列号 */
|
||||
private String deviceSn;
|
||||
/** 流量端口 */
|
||||
private String trafficPort;
|
||||
/** 业务代码 */
|
||||
private String businesId;
|
||||
|
||||
/** 数据创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/** 备用字段1 */
|
||||
private String remark1;
|
||||
|
||||
/** 备用字段2 */
|
||||
private String remark2;
|
||||
|
||||
/** 备用字段3 */
|
||||
private String remark3;
|
||||
|
||||
/** 备用字段4 */
|
||||
private String remark4;
|
||||
/** 批量插入集合 **/
|
||||
private List<EpsInitialTrafficData> dataList;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录对象 eps_method_change_record
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public class EpsMethodChangeRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 记录ID */
|
||||
private Long id;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 修改内容 */
|
||||
@Excel(name = "修改内容")
|
||||
private String changeContent;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "修改人")
|
||||
private String creatBy;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setChangeContent(String changeContent)
|
||||
{
|
||||
this.changeContent = changeContent;
|
||||
}
|
||||
|
||||
public String getChangeContent()
|
||||
{
|
||||
return changeContent;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setCreatBy(String creatBy)
|
||||
{
|
||||
this.creatBy = creatBy;
|
||||
}
|
||||
|
||||
public String getCreatBy()
|
||||
{
|
||||
return creatBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("changeContent", getChangeContent())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatBy", getCreatBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 节点带宽信息对象 eps_node_bandwidth
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class EpsNodeBandwidth extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
/** 带宽值类型
|
||||
* 1-95带宽值Mbps/日
|
||||
* 2-95带宽值Mbps/月
|
||||
* 3-包端带宽值Mbps/日
|
||||
* 4-月均日95值Mbps
|
||||
* 5-有效-95带宽值Mbps/日
|
||||
* 6-有效-95带宽值Mbps/月
|
||||
* 7-有效-月均日95值
|
||||
* */
|
||||
private String bandwidthType;
|
||||
|
||||
/** 带宽值结果 */
|
||||
private BigDecimal bandwidthResult;
|
||||
|
||||
/** 95带宽值Mbps/日 */
|
||||
@Excel(name = "95带宽值Mbps/日")
|
||||
private BigDecimal bandwidth95Daily;
|
||||
|
||||
/** 95带宽值Mbps/月 */
|
||||
@Excel(name = "95带宽值Mbps/月")
|
||||
private BigDecimal bandwidth95Monthly;
|
||||
|
||||
/** 月均日95值 */
|
||||
@Excel(name = "月均日95值")
|
||||
private BigDecimal avgMonthlyBandwidth95;
|
||||
|
||||
/** 包端带宽值Mbps/日 */
|
||||
@Excel(name = "包端带宽值Mbps/日")
|
||||
private BigDecimal packageBandwidthDaily;
|
||||
|
||||
/** 有效-95带宽值Mbps/日 */
|
||||
@Excel(name = "有效-95带宽值Mbps/日")
|
||||
private BigDecimal effectiveBandwidth95Daily;
|
||||
|
||||
/** 有效-95带宽值Mbps/月 */
|
||||
@Excel(name = "有效-95带宽值Mbps/月")
|
||||
private BigDecimal effectiveBandwidth95Monthly;
|
||||
|
||||
/** 有效-月均95值 */
|
||||
@Excel(name = "有效-月均95值")
|
||||
private BigDecimal effectiveAvgMonthlyBandwidth95;
|
||||
|
||||
/** 设备业务客户id */
|
||||
@Excel(name = "设备业务客户id")
|
||||
private String customerId;
|
||||
|
||||
/** 设备业务客户名称 */
|
||||
@Excel(name = "设备业务客户名称")
|
||||
private String customerName;
|
||||
|
||||
/** 业务号 */
|
||||
@Excel(name = "业务号")
|
||||
private String serviceNumber;
|
||||
|
||||
/** 上联交换机 */
|
||||
@Excel(name = "上联交换机")
|
||||
private String uplinkSwitch;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
/** remark1 */
|
||||
@Excel(name = "remark1")
|
||||
private String remark1;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
|
||||
/** 资源类型(1服务器,2交换机) */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
|
||||
/** 接口连接设备类型(1服务器,2机房出口) */
|
||||
@Excel(name = "接口连接设备类型")
|
||||
private String interfaceLinkDeviceType;
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 业务代码 */
|
||||
@Excel(name = "业务代码")
|
||||
private String businessId;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/** 开始时间 */
|
||||
private String startTime;
|
||||
/** 结束时间 */
|
||||
private String endTime;
|
||||
/** 月份 */
|
||||
@JsonFormat(pattern = "yyyy-MM")
|
||||
private LocalDate monthTime;
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public LocalDate getMonthTime() {
|
||||
return monthTime;
|
||||
}
|
||||
|
||||
public void setMonthTime(LocalDate monthTime) {
|
||||
this.monthTime = monthTime;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getResourceType() {
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
public void setResourceType(String resourceType) {
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getInterfaceLinkDeviceType() {
|
||||
return interfaceLinkDeviceType;
|
||||
}
|
||||
|
||||
public void setInterfaceLinkDeviceType(String interfaceLinkDeviceType) {
|
||||
this.interfaceLinkDeviceType = interfaceLinkDeviceType;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setBandwidth95Daily(BigDecimal bandwidth95Daily)
|
||||
{
|
||||
this.bandwidth95Daily = bandwidth95Daily;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidth95Daily()
|
||||
{
|
||||
return bandwidth95Daily;
|
||||
}
|
||||
|
||||
public void setBandwidth95Monthly(BigDecimal bandwidth95Monthly)
|
||||
{
|
||||
this.bandwidth95Monthly = bandwidth95Monthly;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidth95Monthly()
|
||||
{
|
||||
return bandwidth95Monthly;
|
||||
}
|
||||
|
||||
public void setPackageBandwidthDaily(BigDecimal packageBandwidthDaily)
|
||||
{
|
||||
this.packageBandwidthDaily = packageBandwidthDaily;
|
||||
}
|
||||
|
||||
public BigDecimal getPackageBandwidthDaily()
|
||||
{
|
||||
return packageBandwidthDaily;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName)
|
||||
{
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getCustomerName()
|
||||
{
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setServiceNumber(String serviceNumber)
|
||||
{
|
||||
this.serviceNumber = serviceNumber;
|
||||
}
|
||||
|
||||
public String getServiceNumber()
|
||||
{
|
||||
return serviceNumber;
|
||||
}
|
||||
|
||||
public void setUplinkSwitch(String uplinkSwitch)
|
||||
{
|
||||
this.uplinkSwitch = uplinkSwitch;
|
||||
}
|
||||
|
||||
public String getUplinkSwitch()
|
||||
{
|
||||
return uplinkSwitch;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setRemark1(String remark1)
|
||||
{
|
||||
this.remark1 = remark1;
|
||||
}
|
||||
|
||||
public String getRemark1()
|
||||
{
|
||||
return remark1;
|
||||
}
|
||||
|
||||
public String getInterfaceName() {
|
||||
return interfaceName;
|
||||
}
|
||||
|
||||
public void setInterfaceName(String interfaceName) {
|
||||
this.interfaceName = interfaceName;
|
||||
}
|
||||
|
||||
public String getBandwidthType() {
|
||||
return bandwidthType;
|
||||
}
|
||||
|
||||
public void setBandwidthType(String bandwidthType) {
|
||||
this.bandwidthType = bandwidthType;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidthResult() {
|
||||
return bandwidthResult;
|
||||
}
|
||||
|
||||
public void setBandwidthResult(BigDecimal bandwidthResult) {
|
||||
this.bandwidthResult = bandwidthResult;
|
||||
}
|
||||
|
||||
public BigDecimal getAvgMonthlyBandwidth95() {
|
||||
return avgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
public void setAvgMonthlyBandwidth95(BigDecimal avgMonthlyBandwidth95) {
|
||||
this.avgMonthlyBandwidth95 = avgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
public BigDecimal getEffectiveBandwidth95Daily() {
|
||||
return effectiveBandwidth95Daily;
|
||||
}
|
||||
|
||||
public void setEffectiveBandwidth95Daily(BigDecimal effectiveBandwidth95Daily) {
|
||||
this.effectiveBandwidth95Daily = effectiveBandwidth95Daily;
|
||||
}
|
||||
|
||||
public BigDecimal getEffectiveBandwidth95Monthly() {
|
||||
return effectiveBandwidth95Monthly;
|
||||
}
|
||||
|
||||
public void setEffectiveBandwidth95Monthly(BigDecimal effectiveBandwidth95Monthly) {
|
||||
this.effectiveBandwidth95Monthly = effectiveBandwidth95Monthly;
|
||||
}
|
||||
|
||||
public BigDecimal getEffectiveAvgMonthlyBandwidth95() {
|
||||
return effectiveAvgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
public void setEffectiveAvgMonthlyBandwidth95(BigDecimal effectiveAvgMonthlyBandwidth95) {
|
||||
this.effectiveAvgMonthlyBandwidth95 = effectiveAvgMonthlyBandwidth95;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("bandwidth95Daily", getBandwidth95Daily())
|
||||
.append("bandwidth95Monthly", getBandwidth95Monthly())
|
||||
.append("packageBandwidthDaily", getPackageBandwidthDaily())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("serviceNumber", getServiceNumber())
|
||||
.append("uplinkSwitch", getUplinkSwitch())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("remark1", getRemark1())
|
||||
.append("interfaceName", getInterfaceName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.ruoyi.system.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;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置对象 eps_server_revenue_config
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public class EpsServerRevenueConfig extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 唯一标识ID */
|
||||
private Long id;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 收益方式(1.流量,2包端) */
|
||||
@Excel(name = "收益方式(1.流量,2包端)")
|
||||
private String revenueMethod;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 流量网口 */
|
||||
@Excel(name = "流量网口")
|
||||
private String trafficPort;
|
||||
|
||||
/** 95带宽值(Mbps) */
|
||||
@Excel(name = "95带宽值(Mbps)")
|
||||
private BigDecimal bandwidth95;
|
||||
|
||||
/** 包端带宽值 */
|
||||
@Excel(name = "包端带宽值")
|
||||
private BigDecimal packageBandwidth;
|
||||
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 业务代码(12位) */
|
||||
@Excel(name = "业务代码(12位)")
|
||||
private String businessCode;
|
||||
|
||||
/** 注册状态 */
|
||||
@Excel(name = "注册状态")
|
||||
private String registrationStatus;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setRevenueMethod(String revenueMethod)
|
||||
{
|
||||
this.revenueMethod = revenueMethod;
|
||||
}
|
||||
|
||||
public String getRevenueMethod()
|
||||
{
|
||||
return revenueMethod;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setTrafficPort(String trafficPort)
|
||||
{
|
||||
this.trafficPort = trafficPort;
|
||||
}
|
||||
|
||||
public String getTrafficPort()
|
||||
{
|
||||
return trafficPort;
|
||||
}
|
||||
|
||||
public void setBandwidth95(BigDecimal bandwidth95)
|
||||
{
|
||||
this.bandwidth95 = bandwidth95;
|
||||
}
|
||||
|
||||
public BigDecimal getBandwidth95()
|
||||
{
|
||||
return bandwidth95;
|
||||
}
|
||||
|
||||
public void setPackageBandwidth(BigDecimal packageBandwidth)
|
||||
{
|
||||
this.packageBandwidth = packageBandwidth;
|
||||
}
|
||||
|
||||
public BigDecimal getPackageBandwidth()
|
||||
{
|
||||
return packageBandwidth;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName)
|
||||
{
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessName()
|
||||
{
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode)
|
||||
{
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
public String getBusinessCode()
|
||||
{
|
||||
return businessCode;
|
||||
}
|
||||
|
||||
public void setRegistrationStatus(String registrationStatus)
|
||||
{
|
||||
this.registrationStatus = registrationStatus;
|
||||
}
|
||||
|
||||
public String getRegistrationStatus()
|
||||
{
|
||||
return registrationStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("revenueMethod", getRevenueMethod())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("trafficPort", getTrafficPort())
|
||||
.append("bandwidth95", getBandwidth95())
|
||||
.append("packageBandwidth", getPackageBandwidth())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("businessName", getBusinessName())
|
||||
.append("businessCode", getBusinessCode())
|
||||
.append("registrationStatus", getRegistrationStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 流量相关数据对象 eps_traffic_data
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class EpsTrafficData extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 硬件SN */
|
||||
@Excel(name = "硬件SN")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 节点名称 */
|
||||
@Excel(name = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
/** 收益方式 */
|
||||
@Excel(name = "收益方式")
|
||||
private String revenueMethod;
|
||||
|
||||
/** 流量端口 */
|
||||
@Excel(name = "流量端口")
|
||||
private String trafficPort;
|
||||
|
||||
/** 发送流量值(bytes) */
|
||||
@Excel(name = "发送流量值", readConverterExp = "b=ytes")
|
||||
private Long txBytes;
|
||||
|
||||
/** 接收流量值(bytes) */
|
||||
@Excel(name = "接收流量值", readConverterExp = "b=ytes")
|
||||
private Long rxBytes;
|
||||
|
||||
/** 包端带宽值(Mbps) */
|
||||
@Excel(name = "包端带宽值", readConverterExp = "M=bps")
|
||||
private BigDecimal packageBandwidth;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
@Excel(name = "修改人id")
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
@Excel(name = "修改人名称")
|
||||
private String updaterName;
|
||||
/** 业务名称 */
|
||||
private String businessName;
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName;
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setHardwareSn(String hardwareSn)
|
||||
{
|
||||
this.hardwareSn = hardwareSn;
|
||||
}
|
||||
|
||||
public String getHardwareSn()
|
||||
{
|
||||
return hardwareSn;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName)
|
||||
{
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeName()
|
||||
{
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setRevenueMethod(String revenueMethod)
|
||||
{
|
||||
this.revenueMethod = revenueMethod;
|
||||
}
|
||||
|
||||
public String getRevenueMethod()
|
||||
{
|
||||
return revenueMethod;
|
||||
}
|
||||
|
||||
public void setTrafficPort(String trafficPort)
|
||||
{
|
||||
this.trafficPort = trafficPort;
|
||||
}
|
||||
|
||||
public String getTrafficPort()
|
||||
{
|
||||
return trafficPort;
|
||||
}
|
||||
|
||||
public void setTxBytes(Long txBytes)
|
||||
{
|
||||
this.txBytes = txBytes;
|
||||
}
|
||||
|
||||
public Long getTxBytes()
|
||||
{
|
||||
return txBytes;
|
||||
}
|
||||
|
||||
public void setRxBytes(Long rxBytes)
|
||||
{
|
||||
this.rxBytes = rxBytes;
|
||||
}
|
||||
|
||||
public Long getRxBytes()
|
||||
{
|
||||
return rxBytes;
|
||||
}
|
||||
|
||||
public void setPackageBandwidth(BigDecimal packageBandwidth)
|
||||
{
|
||||
this.packageBandwidth = packageBandwidth;
|
||||
}
|
||||
|
||||
public BigDecimal getPackageBandwidth()
|
||||
{
|
||||
return packageBandwidth;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("hardwareSn", getHardwareSn())
|
||||
.append("nodeName", getNodeName())
|
||||
.append("revenueMethod", getRevenueMethod())
|
||||
.append("trafficPort", getTrafficPort())
|
||||
.append("txBytes", getTxBytes())
|
||||
.append("rxBytes", getRxBytes())
|
||||
.append("packageBandwidth", getPackageBandwidth())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 知识库对象 knowledge_base
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public class KnowledgeBase extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 标题 */
|
||||
@Excel(name = "标题")
|
||||
private String title;
|
||||
|
||||
/** 问题类型 */
|
||||
@Excel(name = "问题类型")
|
||||
private String issueType;
|
||||
|
||||
/** 解决方案 */
|
||||
@Excel(name = "解决方案")
|
||||
private String solution;
|
||||
|
||||
/** 创建人 */
|
||||
private String creatBy;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setIssueType(String issueType)
|
||||
{
|
||||
this.issueType = issueType;
|
||||
}
|
||||
|
||||
public String getIssueType()
|
||||
{
|
||||
return issueType;
|
||||
}
|
||||
|
||||
public void setSolution(String solution)
|
||||
{
|
||||
this.solution = solution;
|
||||
}
|
||||
|
||||
public String getSolution()
|
||||
{
|
||||
return solution;
|
||||
}
|
||||
|
||||
public void setCreatBy(String creatBy)
|
||||
{
|
||||
this.creatBy = creatBy;
|
||||
}
|
||||
|
||||
public String getCreatBy()
|
||||
{
|
||||
return creatBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("title", getTitle())
|
||||
.append("issueType", getIssueType())
|
||||
.append("solution", getSolution())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("creatBy", getCreatBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 监控模板管理对象 mtm_monitoring_template
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class MtmMonitoringTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 模板名称 */
|
||||
@Excel(name = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 项类型 */
|
||||
@Excel(name = "项类型")
|
||||
private String itemType;
|
||||
|
||||
/** 包含资源 */
|
||||
@Excel(name = "包含资源")
|
||||
private String includedResources;
|
||||
|
||||
/** 发现项类型 */
|
||||
@Excel(name = "发现项类型")
|
||||
private String discoveryItemType;
|
||||
|
||||
/** 项名 */
|
||||
@Excel(name = "项名")
|
||||
private String itemName;
|
||||
|
||||
/** 项描述 */
|
||||
@Excel(name = "项描述")
|
||||
private String itemDescription;
|
||||
|
||||
/** 创建人id */
|
||||
@Excel(name = "创建人id")
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
@Excel(name = "修改人id")
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
@Excel(name = "修改人名称")
|
||||
private String updaterName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName)
|
||||
{
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
public String getTemplateName()
|
||||
{
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setItemType(String itemType)
|
||||
{
|
||||
this.itemType = itemType;
|
||||
}
|
||||
|
||||
public String getItemType()
|
||||
{
|
||||
return itemType;
|
||||
}
|
||||
|
||||
public void setIncludedResources(String includedResources)
|
||||
{
|
||||
this.includedResources = includedResources;
|
||||
}
|
||||
|
||||
public String getIncludedResources()
|
||||
{
|
||||
return includedResources;
|
||||
}
|
||||
|
||||
public void setDiscoveryItemType(String discoveryItemType)
|
||||
{
|
||||
this.discoveryItemType = discoveryItemType;
|
||||
}
|
||||
|
||||
public String getDiscoveryItemType()
|
||||
{
|
||||
return discoveryItemType;
|
||||
}
|
||||
|
||||
public void setItemName(String itemName)
|
||||
{
|
||||
this.itemName = itemName;
|
||||
}
|
||||
|
||||
public String getItemName()
|
||||
{
|
||||
return itemName;
|
||||
}
|
||||
|
||||
public void setItemDescription(String itemDescription)
|
||||
{
|
||||
this.itemDescription = itemDescription;
|
||||
}
|
||||
|
||||
public String getItemDescription()
|
||||
{
|
||||
return itemDescription;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("templateName", getTemplateName())
|
||||
.append("description", getDescription())
|
||||
.append("itemType", getItemType())
|
||||
.append("includedResources", getIncludedResources())
|
||||
.append("discoveryItemType", getDiscoveryItemType())
|
||||
.append("itemName", getItemName())
|
||||
.append("itemDescription", getItemDescription())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 拓扑管理对象 rm_eps_topology_management
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class RmEpsTopologyManagement extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 交换机名称 */
|
||||
@Excel(name = "交换机名称")
|
||||
private String switchName;
|
||||
|
||||
/** 交换机硬件SN */
|
||||
@Excel(name = "交换机硬件SN")
|
||||
private String switchSn;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
|
||||
/** 接口连接设备类型 */
|
||||
@Excel(name = "接口连接设备类型",readConverterExp = "1=服务器,2=机房出口")
|
||||
private String connectedDeviceType;
|
||||
|
||||
/** 服务器名称 */
|
||||
@Excel(name = "服务器名称")
|
||||
private String serverName;
|
||||
|
||||
/** 服务器硬件SN */
|
||||
@Excel(name = "服务器硬件SN")
|
||||
private String serverSn;
|
||||
|
||||
/** 服务器网口 */
|
||||
@Excel(name = "服务器网口")
|
||||
private String serverPort;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 修改时间 */
|
||||
@Excel(name = "修改时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
/** 创建人id */
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
private String updaterName;
|
||||
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSwitchName(String switchName)
|
||||
{
|
||||
this.switchName = switchName;
|
||||
}
|
||||
|
||||
public String getSwitchName()
|
||||
{
|
||||
return switchName;
|
||||
}
|
||||
|
||||
public void setSwitchSn(String switchSn)
|
||||
{
|
||||
this.switchSn = switchSn;
|
||||
}
|
||||
|
||||
public String getSwitchSn()
|
||||
{
|
||||
return switchSn;
|
||||
}
|
||||
|
||||
public void setInterfaceName(String interfaceName)
|
||||
{
|
||||
this.interfaceName = interfaceName;
|
||||
}
|
||||
|
||||
public String getInterfaceName()
|
||||
{
|
||||
return interfaceName;
|
||||
}
|
||||
|
||||
public void setConnectedDeviceType(String connectedDeviceType)
|
||||
{
|
||||
this.connectedDeviceType = connectedDeviceType;
|
||||
}
|
||||
|
||||
public String getConnectedDeviceType()
|
||||
{
|
||||
return connectedDeviceType;
|
||||
}
|
||||
|
||||
public void setServerName(String serverName)
|
||||
{
|
||||
this.serverName = serverName;
|
||||
}
|
||||
|
||||
public String getServerName()
|
||||
{
|
||||
return serverName;
|
||||
}
|
||||
|
||||
public void setServerSn(String serverSn)
|
||||
{
|
||||
this.serverSn = serverSn;
|
||||
}
|
||||
|
||||
public String getServerSn()
|
||||
{
|
||||
return serverSn;
|
||||
}
|
||||
|
||||
public void setServerPort(String serverPort)
|
||||
{
|
||||
this.serverPort = serverPort;
|
||||
}
|
||||
|
||||
public String getServerPort()
|
||||
{
|
||||
return serverPort;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("switchName", getSwitchName())
|
||||
.append("switchSn", getSwitchSn())
|
||||
.append("interfaceName", getInterfaceName())
|
||||
.append("connectedDeviceType", getConnectedDeviceType())
|
||||
.append("serverName", getServerName())
|
||||
.append("serverSn", getServerSn())
|
||||
.append("serverPort", getServerPort())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 资源分组对象 rm_resource_group
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public class RmResourceGroup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 组名 */
|
||||
@Excel(name = "组名")
|
||||
private String groupName;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
/** 包含设备 */
|
||||
@Excel(name = "包含设备")
|
||||
private String includedDevices;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 修改时间 */
|
||||
@Excel(name = "修改时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/** 创建人id */
|
||||
private Long creatorId;
|
||||
|
||||
/** 创建人名称 */
|
||||
private String creatorName;
|
||||
|
||||
/** 修改人id */
|
||||
private Long updaterId;
|
||||
|
||||
/** 修改人名称 */
|
||||
private String updaterName;
|
||||
|
||||
@Override
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName)
|
||||
{
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setIncludedDevices(String includedDevices)
|
||||
{
|
||||
this.includedDevices = includedDevices;
|
||||
}
|
||||
|
||||
public String getIncludedDevices()
|
||||
{
|
||||
return includedDevices;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName)
|
||||
{
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getCreatorName()
|
||||
{
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setUpdaterId(Long updaterId)
|
||||
{
|
||||
this.updaterId = updaterId;
|
||||
}
|
||||
|
||||
public Long getUpdaterId()
|
||||
{
|
||||
return updaterId;
|
||||
}
|
||||
|
||||
public void setUpdaterName(String updaterName)
|
||||
{
|
||||
this.updaterName = updaterName;
|
||||
}
|
||||
|
||||
public String getUpdaterName()
|
||||
{
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("groupName", getGroupName())
|
||||
.append("description", getDescription())
|
||||
.append("includedDevices", getIncludedDevices())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("creatorName", getCreatorName())
|
||||
.append("updaterId", getUpdaterId())
|
||||
.append("updaterName", getUpdaterName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ public class RmResourceRegistration extends BaseEntity
|
||||
|
||||
/** 资源类型
|
||||
* 1 服务器,2 交换机*/
|
||||
@Excel(name = "资源类型")
|
||||
@Excel(name = "资源类型",readConverterExp = "1=服务器,2=交换机")
|
||||
private String resourceType;
|
||||
|
||||
/** 资源名称 */
|
||||
@@ -39,38 +39,44 @@ public class RmResourceRegistration extends BaseEntity
|
||||
@Excel(name = "端口")
|
||||
private String resourcePort;
|
||||
|
||||
/**其他端口名称 */
|
||||
private String otherPortName;
|
||||
|
||||
|
||||
/** 协议 1.TCP,2.UDP */
|
||||
@Excel(name = "协议")
|
||||
@Excel(name = "协议",readConverterExp = "1=TCP,2=UDP")
|
||||
private String protocol;
|
||||
|
||||
|
||||
/** 版本(1.SNMPv2,2.SNMPv3) */
|
||||
@Excel(name = "版本")
|
||||
@Excel(name = "版本",readConverterExp = "1=SNMPv2,2=SNMPv3")
|
||||
private String resourceVersion;
|
||||
|
||||
/** 读写权限(1.RW,2.ReadOnly) */
|
||||
@Excel(name = "读写权限")
|
||||
@Excel(name = "读写权限",readConverterExp = "1=RW,2=ReadOnly")
|
||||
private String rwPermission;
|
||||
|
||||
/** 安全级别(1.authPriv、2.authNoPriv,3.noAuthNoPriv) */
|
||||
@Excel(name = "安全级别")
|
||||
@Excel(name = "安全级别",readConverterExp = "1=authPriv,2=authNoPriv,3=noAuthNoPriv")
|
||||
private String securityLevel;
|
||||
|
||||
/** 加密方式 1.md5,2.SHA */
|
||||
@Excel(name = "加密方式")
|
||||
@Excel(name = "加密方式",readConverterExp = "1=MD5,2=SHA")
|
||||
private String encryption;
|
||||
|
||||
/** 密码 */
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String resourceUserName;
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String resourcePwd;
|
||||
|
||||
/** 注册状态 0-未注册,1-未注册 */
|
||||
@Excel(name = "注册状态")
|
||||
/** 注册状态 0-未注册,1-已注册 */
|
||||
@Excel(name = "注册状态",readConverterExp = "0=未注册,1=已注册")
|
||||
private String registrationStatus;
|
||||
|
||||
/** 在线状态 0-离线,1-在线 */
|
||||
@Excel(name = "在线状态")
|
||||
@Excel(name = "在线状态",readConverterExp = "0=离线,1=在线")
|
||||
private String onlineStatus;
|
||||
|
||||
/** 描述 */
|
||||
@@ -100,7 +106,15 @@ public class RmResourceRegistration extends BaseEntity
|
||||
/** 修改人名称 */
|
||||
private String updaterName;
|
||||
|
||||
public void setId(Long id)
|
||||
public String getOtherPortName() {
|
||||
return otherPortName;
|
||||
}
|
||||
|
||||
public void setOtherPortName(String otherPortName) {
|
||||
this.otherPortName = otherPortName;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
@@ -320,9 +334,15 @@ public class RmResourceRegistration extends BaseEntity
|
||||
return updaterName;
|
||||
}
|
||||
|
||||
public String getResourceUserName() {
|
||||
return resourceUserName;
|
||||
}
|
||||
|
||||
public void setResourceUserName(String resourceUserName) {
|
||||
this.resourceUserName = resourceUserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
@@ -331,12 +351,14 @@ public class RmResourceRegistration extends BaseEntity
|
||||
.append("resourceName", getResourceName())
|
||||
.append("ipAddress", getIpAddress())
|
||||
.append("resourcePort", getResourcePort())
|
||||
.append("otherPortName", getOtherPortName())
|
||||
.append("protocol", getProtocol())
|
||||
.append("resourceVersion", getResourceVersion())
|
||||
.append("rwPermission", getRwPermission())
|
||||
.append("securityLevel", getSecurityLevel())
|
||||
.append("encryption", getEncryption())
|
||||
.append("resourcePwd", getResourcePwd())
|
||||
.append("resourceUserName", getResourceName())
|
||||
.append("registrationStatus", getRegistrationStatus())
|
||||
.append("onlineStatus", getOnlineStatus())
|
||||
.append("description", getDescription())
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsBusiness;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface EpsBusinessMapper
|
||||
{
|
||||
/**
|
||||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 业务信息
|
||||
*/
|
||||
public EpsBusiness selectEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 业务信息集合
|
||||
*/
|
||||
public List<EpsBusiness> selectEpsBusinessList(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 删除业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除业务信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 验证业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
Integer countByBusinessName(EpsBusiness epsBusiness);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EpsInitialTrafficDataMapper {
|
||||
/**
|
||||
* 创建指定名称的EPS流量表
|
||||
* @param tableName 表名
|
||||
*/
|
||||
void createEpsTrafficTable(@Param("tableName") String tableName);
|
||||
/**
|
||||
* 创建指定名称的EPS流量初始表
|
||||
* @param tableName 表名
|
||||
*/
|
||||
void createEpsInitialTrafficTable(@Param("tableName") String tableName);
|
||||
/**
|
||||
* 单条插入数据
|
||||
* @param data 流量数据
|
||||
*/
|
||||
void insert(EpsInitialTrafficData data);
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
* @param epsInitialTrafficData 流量数据实体类
|
||||
*/
|
||||
void batchInsert(EpsInitialTrafficData epsInitialTrafficData);
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
* @param condition 查询条件实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
List<EpsInitialTrafficData> selectByCondition(EpsInitialTrafficData condition);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface EpsMethodChangeRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
public EpsMethodChangeRecord selectEpsMethodChangeRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 收益方式修改记录集合
|
||||
*/
|
||||
public List<EpsMethodChangeRecord> selectEpsMethodChangeRecordList(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 新增收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 修改收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 删除收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除收益方式修改记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface EpsNodeBandwidthMapper
|
||||
{
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public EpsNodeBandwidth selectEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息集合
|
||||
*/
|
||||
public List<EpsNodeBandwidth> selectEpsNodeBandwidthList(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 删除节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除节点带宽信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 计算月均日95值
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public EpsNodeBandwidth calculateAvg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
/**
|
||||
* 月均日95值-相关数据
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public List<EpsNodeBandwidth> getAvgDetailMsg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
/**
|
||||
* 查询月均日95值是否存在
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public int countByAvgMsg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public interface EpsServerRevenueConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
public EpsServerRevenueConfig selectEpsServerRevenueConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 服务器收益方式配置集合
|
||||
*/
|
||||
public List<EpsServerRevenueConfig> selectEpsServerRevenueConfigList(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 新增服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 删除服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除服务器收益方式配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询该数据是否存在
|
||||
*
|
||||
* @param hardwareSn 服务器sn
|
||||
* @return 数据条数
|
||||
*/
|
||||
public int countBySn(@Param("hardwareSn") String hardwareSn);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsTrafficData;
|
||||
|
||||
/**
|
||||
* 流量相关数据Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface EpsTrafficDataMapper
|
||||
{
|
||||
/**
|
||||
* 查询流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
public EpsTrafficData selectEpsTrafficDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 流量相关数据集合
|
||||
*/
|
||||
public List<EpsTrafficData> selectEpsTrafficDataList(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 删除流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除流量相关数据
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.KnowledgeBase;
|
||||
|
||||
/**
|
||||
* 知识库Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface KnowledgeBaseMapper
|
||||
{
|
||||
/**
|
||||
* 查询知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 知识库
|
||||
*/
|
||||
public KnowledgeBase selectKnowledgeBaseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 知识库集合
|
||||
*/
|
||||
public List<KnowledgeBase> selectKnowledgeBaseList(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 删除知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除知识库
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.MtmMonitoringTemplate;
|
||||
|
||||
/**
|
||||
* 监控模板管理Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface MtmMonitoringTemplateMapper
|
||||
{
|
||||
/**
|
||||
* 查询监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
public MtmMonitoringTemplate selectMtmMonitoringTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 监控模板管理集合
|
||||
*/
|
||||
public List<MtmMonitoringTemplate> selectMtmMonitoringTemplateList(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 删除监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除监控模板管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
|
||||
/**
|
||||
* 拓扑管理Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface RmEpsTopologyManagementMapper
|
||||
{
|
||||
/**
|
||||
* 查询拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
public RmEpsTopologyManagement selectRmEpsTopologyManagementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 拓扑管理集合
|
||||
*/
|
||||
public List<RmEpsTopologyManagement> selectRmEpsTopologyManagementList(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 删除拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除拓扑管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceGroup;
|
||||
|
||||
/**
|
||||
* 资源分组Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface RmResourceGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 资源分组
|
||||
*/
|
||||
public RmResourceGroup selectRmResourceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 资源分组集合
|
||||
*/
|
||||
public List<RmResourceGroup> selectRmResourceGroupList(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 删除资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除资源分组
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupByIds(Long[] ids);
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Mapper接口
|
||||
*
|
||||
@@ -58,4 +60,21 @@ public interface RmResourceRegistrationMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRegistrationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询所有资源名称([包含设备]功能使用)
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceName();
|
||||
/**
|
||||
* 查询是否有此设备
|
||||
* @param hardwareSn 资源sn
|
||||
* @return 结果
|
||||
*/
|
||||
public int countBySn(String hardwareSn);
|
||||
/**
|
||||
* 查询所有资源名称
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceNameByType(RmResourceRegistration resourceRegistration);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* EPS表创建服务接口
|
||||
* 定义定时创建分表的契约
|
||||
*/
|
||||
public interface EpsInitialTrafficDataService {
|
||||
|
||||
/**
|
||||
* 创建下个月的三张分表
|
||||
* 每月25日0点自动执行
|
||||
*/
|
||||
void createNextMonthTables();
|
||||
/**
|
||||
* 保存单条流量数据
|
||||
* @param data 流量数据
|
||||
*/
|
||||
void save(EpsInitialTrafficData data);
|
||||
|
||||
/**
|
||||
* 批量保存流量数据
|
||||
* @param dataList 流量数据列表
|
||||
*/
|
||||
void saveBatch(EpsInitialTrafficData dataList);
|
||||
|
||||
/**
|
||||
* 查询流量数据
|
||||
* @param queryParam 查询参数实体
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
List<EpsInitialTrafficData> query(EpsInitialTrafficData queryParam);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsBusiness;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface IEpsBusinessService
|
||||
{
|
||||
/**
|
||||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 业务信息
|
||||
*/
|
||||
public EpsBusiness selectEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 业务信息集合
|
||||
*/
|
||||
public List<EpsBusiness> selectEpsBusinessList(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusiness(EpsBusiness epsBusiness);
|
||||
|
||||
/**
|
||||
* 批量删除业务信息
|
||||
*
|
||||
* @param ids 需要删除的业务信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除业务信息信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessById(String id);
|
||||
|
||||
/**
|
||||
* 验证 业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
Integer countByBusinessName(EpsBusiness epsBusiness);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface IEpsMethodChangeRecordService
|
||||
{
|
||||
/**
|
||||
* 查询收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
public EpsMethodChangeRecord selectEpsMethodChangeRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 收益方式修改记录集合
|
||||
*/
|
||||
public List<EpsMethodChangeRecord> selectEpsMethodChangeRecordList(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 新增收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 修改收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord);
|
||||
|
||||
/**
|
||||
* 批量删除收益方式修改记录
|
||||
*
|
||||
* @param ids 需要删除的收益方式修改记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除收益方式修改记录信息
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsMethodChangeRecordById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IEpsNodeBandwidthService
|
||||
{
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
public EpsNodeBandwidth selectEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 相关数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<EpsInitialTrafficData> relatedData(Long id);
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息集合
|
||||
*/
|
||||
public List<EpsNodeBandwidth> selectEpsNodeBandwidthList(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
/**
|
||||
* 批量删除节点带宽信息
|
||||
*
|
||||
* @param ids 需要删除的节点带宽信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除节点带宽信息信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsNodeBandwidthById(Long id);
|
||||
|
||||
/**
|
||||
* 计算月均日95值
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int calculateAvg(EpsNodeBandwidth epsNodeBandwidth);
|
||||
|
||||
List<EpsNodeBandwidth> getAvgDetailMsg(Long id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public interface IEpsServerRevenueConfigService
|
||||
{
|
||||
/**
|
||||
* 查询服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
public EpsServerRevenueConfig selectEpsServerRevenueConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 服务器收益方式配置集合
|
||||
*/
|
||||
public List<EpsServerRevenueConfig> selectEpsServerRevenueConfigList(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 新增服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig);
|
||||
|
||||
/**
|
||||
* 批量删除服务器收益方式配置
|
||||
*
|
||||
* @param ids 需要删除的服务器收益方式配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除服务器收益方式配置信息
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsServerRevenueConfigById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsTrafficData;
|
||||
|
||||
/**
|
||||
* 流量相关数据Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IEpsTrafficDataService
|
||||
{
|
||||
/**
|
||||
* 查询流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
public EpsTrafficData selectEpsTrafficDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 流量相关数据集合
|
||||
*/
|
||||
public List<EpsTrafficData> selectEpsTrafficDataList(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsTrafficData(EpsTrafficData epsTrafficData);
|
||||
|
||||
/**
|
||||
* 批量删除流量相关数据
|
||||
*
|
||||
* @param ids 需要删除的流量相关数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除流量相关数据信息
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsTrafficDataById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.KnowledgeBase;
|
||||
|
||||
/**
|
||||
* 知识库Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
public interface IKnowledgeBaseService
|
||||
{
|
||||
/**
|
||||
* 查询知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 知识库
|
||||
*/
|
||||
public KnowledgeBase selectKnowledgeBaseById(Long id);
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 知识库集合
|
||||
*/
|
||||
public List<KnowledgeBase> selectKnowledgeBaseList(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateKnowledgeBase(KnowledgeBase knowledgeBase);
|
||||
|
||||
/**
|
||||
* 批量删除知识库
|
||||
*
|
||||
* @param ids 需要删除的知识库主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除知识库信息
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKnowledgeBaseById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.MtmMonitoringTemplate;
|
||||
|
||||
/**
|
||||
* 监控模板管理Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IMtmMonitoringTemplateService
|
||||
{
|
||||
/**
|
||||
* 查询监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
public MtmMonitoringTemplate selectMtmMonitoringTemplateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 监控模板管理集合
|
||||
*/
|
||||
public List<MtmMonitoringTemplate> selectMtmMonitoringTemplateList(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate);
|
||||
|
||||
/**
|
||||
* 批量删除监控模板管理
|
||||
*
|
||||
* @param ids 需要删除的监控模板管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除监控模板管理信息
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMtmMonitoringTemplateById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
|
||||
/**
|
||||
* 拓扑管理Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IRmEpsTopologyManagementService
|
||||
{
|
||||
/**
|
||||
* 查询拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
public RmEpsTopologyManagement selectRmEpsTopologyManagementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 拓扑管理集合
|
||||
*/
|
||||
public List<RmEpsTopologyManagement> selectRmEpsTopologyManagementList(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement);
|
||||
|
||||
/**
|
||||
* 批量删除拓扑管理
|
||||
*
|
||||
* @param ids 需要删除的拓扑管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除拓扑管理信息
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmEpsTopologyManagementById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceGroup;
|
||||
|
||||
/**
|
||||
* 资源分组Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
public interface IRmResourceGroupService
|
||||
{
|
||||
/**
|
||||
* 查询资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 资源分组
|
||||
*/
|
||||
public RmResourceGroup selectRmResourceGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 资源分组集合
|
||||
*/
|
||||
public List<RmResourceGroup> selectRmResourceGroupList(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmResourceGroup(RmResourceGroup rmResourceGroup);
|
||||
|
||||
/**
|
||||
* 批量删除资源分组
|
||||
*
|
||||
* @param ids 需要删除的资源分组主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除资源分组信息
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceGroupById(Long id);
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Service接口
|
||||
*
|
||||
@@ -43,6 +45,13 @@ public interface IRmResourceRegistrationService
|
||||
*/
|
||||
public int updateRmResourceRegistration(RmResourceRegistration rmResourceRegistration);
|
||||
|
||||
/**
|
||||
* 资源注册-注册
|
||||
* @param rmResourceRegistration
|
||||
* @return
|
||||
*/
|
||||
public int register(RmResourceRegistration rmResourceRegistration);
|
||||
|
||||
/**
|
||||
* 批量删除资源注册
|
||||
*
|
||||
@@ -58,4 +67,16 @@ public interface IRmResourceRegistrationService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRegistrationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询所有资源名称(包含设备使用)
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceName();
|
||||
/**
|
||||
* 查询所有资源名称
|
||||
* @return 资源注册集合
|
||||
*/
|
||||
public List<Map> selectAllResourceNameByType(RmResourceRegistration resourceRegistration);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.EpsBusiness;
|
||||
import com.ruoyi.system.mapper.EpsBusinessMapper;
|
||||
import com.ruoyi.system.service.IEpsBusinessService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Service
|
||||
public class EpsBusinessServiceImpl implements IEpsBusinessService
|
||||
{
|
||||
@Autowired
|
||||
private EpsBusinessMapper epsBusinessMapper;
|
||||
|
||||
/**
|
||||
* 查询业务信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 业务信息
|
||||
*/
|
||||
@Override
|
||||
public EpsBusiness selectEpsBusinessById(String id)
|
||||
{
|
||||
return epsBusinessMapper.selectEpsBusinessById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务信息列表
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 业务信息
|
||||
*/
|
||||
@Override
|
||||
public List<EpsBusiness> selectEpsBusinessList(EpsBusiness epsBusiness)
|
||||
{
|
||||
return epsBusinessMapper.selectEpsBusinessList(epsBusiness);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsBusiness(EpsBusiness epsBusiness)
|
||||
{
|
||||
epsBusiness.setCreateTime(DateUtils.getNowDate());
|
||||
// 查询业务名称是否存在
|
||||
Integer exits = epsBusinessMapper.countByBusinessName(epsBusiness);
|
||||
if(exits>0){
|
||||
return -1;
|
||||
}
|
||||
return epsBusinessMapper.insertEpsBusiness(epsBusiness);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务信息
|
||||
*
|
||||
* @param epsBusiness 业务信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsBusiness(EpsBusiness epsBusiness)
|
||||
{
|
||||
epsBusiness.setUpdateTime(DateUtils.getNowDate());
|
||||
// 查询业务名称是否存在
|
||||
Integer exits = epsBusinessMapper.countByBusinessName(epsBusiness);
|
||||
if(exits>0){
|
||||
return -1;
|
||||
}
|
||||
return epsBusinessMapper.updateEpsBusiness(epsBusiness);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务信息
|
||||
*
|
||||
* @param ids 需要删除的业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessByIds(String[] ids)
|
||||
{
|
||||
return epsBusinessMapper.deleteEpsBusinessByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务信息信息
|
||||
*
|
||||
* @param id 业务信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessById(String id)
|
||||
{
|
||||
return epsBusinessMapper.deleteEpsBusinessById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证业务名称是否存在
|
||||
* @param epsBusiness
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Integer countByBusinessName(EpsBusiness epsBusiness) {
|
||||
// 查询业务名称是否存在
|
||||
Integer rows = epsBusinessMapper.countByBusinessName(epsBusiness);
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.mapper.EpsInitialTrafficDataMapper;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.util.TableRouterUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataMapper epsInitialTrafficDataMapper;
|
||||
@Override
|
||||
public void createNextMonthTables() {
|
||||
LocalDate nextMonth = LocalDate.now().plusMonths(1);
|
||||
// LocalDate nextMonth = LocalDate.now();
|
||||
int year = nextMonth.getYear();
|
||||
int month = nextMonth.getMonthValue();
|
||||
|
||||
// 创建流量详情表
|
||||
createTrafficDetailsTable(year, month);
|
||||
// 创建流量初始表
|
||||
createTrafficStatsTable(year, month);
|
||||
}
|
||||
|
||||
private void createTrafficDetailsTable(int year, int month) {
|
||||
createRangeTables(year, month, "eps_traffic_details", (tableName) -> {
|
||||
epsInitialTrafficDataMapper.createEpsTrafficTable(tableName);
|
||||
});
|
||||
}
|
||||
|
||||
private void createTrafficStatsTable(int year, int month) {
|
||||
createRangeTables(year, month, "initial_bandwidth_traffic", (tableName) -> {
|
||||
epsInitialTrafficDataMapper.createEpsInitialTrafficTable(tableName);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通用创建表方法
|
||||
* @param year 年份
|
||||
* @param month 月份
|
||||
* @param tablePrefix 表前缀
|
||||
* @param creator 表创建函数
|
||||
*/
|
||||
private void createRangeTables(int year, int month, String tablePrefix, Consumer<String> creator) {
|
||||
String[] ranges = {"1_10", "11_20", "21_31"};
|
||||
|
||||
for (String range : ranges) {
|
||||
String tableName = String.format("%s_%d_%02d_%s", tablePrefix, year, month, range);
|
||||
try {
|
||||
creator.accept(tableName);
|
||||
log.info("成功创建表: {}", tableName);
|
||||
} catch (Exception e) {
|
||||
log.error("创建表失败: {}", tableName, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 保存单条数据到对应分表
|
||||
* @param data 流量数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(EpsInitialTrafficData data) {
|
||||
if (data.getCreateTime() == null) {
|
||||
data.setCreateTime(LocalDateTime.now());
|
||||
}
|
||||
data.setTableName(TableRouterUtil.getTableName(data.getCreateTime()));
|
||||
epsInitialTrafficDataMapper.insert(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存数据到对应分表
|
||||
* @param epsInitialTrafficData 流量数据表
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveBatch(EpsInitialTrafficData epsInitialTrafficData) {
|
||||
if (epsInitialTrafficData == null) {
|
||||
return;
|
||||
}
|
||||
List<EpsInitialTrafficData> dataList = epsInitialTrafficData.getDataList();
|
||||
if (dataList.isEmpty()){
|
||||
return;
|
||||
}
|
||||
// 按表名分组批量插入
|
||||
Map<String, List<EpsInitialTrafficData>> groupedData = dataList.stream()
|
||||
.map(data -> {
|
||||
try {
|
||||
EpsInitialTrafficData processed = new EpsInitialTrafficData();
|
||||
BeanUtils.copyProperties(data,processed);
|
||||
if (data.getCreateTime() == null) {
|
||||
data.setCreateTime(LocalDateTime.now());
|
||||
}
|
||||
processed.setTableName(TableRouterUtil.getTableName(data.getCreateTime()));
|
||||
return processed;
|
||||
} catch (Exception e){
|
||||
log.error("数据处理失败",e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}).collect(Collectors.groupingBy(
|
||||
EpsInitialTrafficData::getTableName,
|
||||
LinkedHashMap::new, // 保持插入顺序
|
||||
Collectors.toList()));
|
||||
|
||||
groupedData.forEach((tableName, list) -> {
|
||||
try {
|
||||
EpsInitialTrafficData data = new EpsInitialTrafficData();
|
||||
BeanUtils.copyProperties(epsInitialTrafficData,data);
|
||||
data.setTableName(tableName);
|
||||
data.setDataList(list);
|
||||
epsInitialTrafficDataMapper.batchInsert(data);
|
||||
} catch (Exception e) {
|
||||
log.error("表{}插入失败", tableName, e);
|
||||
throw new RuntimeException("批量插入失败", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询流量数据
|
||||
*/
|
||||
@Override
|
||||
public List<EpsInitialTrafficData> query(EpsInitialTrafficData queryParam) {
|
||||
// 参数校验
|
||||
// if (StringUtils.isBlank(queryParam.getDeviceSn())) {
|
||||
// throw new IllegalArgumentException("设备序列号不能为空");
|
||||
// }
|
||||
|
||||
// 获取涉及的表名
|
||||
Set<String> tableNames = TableRouterUtil.getTableNamesBetween(queryParam.getStartTime(), queryParam.getEndTime());
|
||||
|
||||
// 并行查询各表
|
||||
return tableNames.parallelStream()
|
||||
.flatMap(tableName -> {
|
||||
EpsInitialTrafficData condition = new EpsInitialTrafficData();
|
||||
condition.setTableName(tableName);
|
||||
condition.setDeviceSn(queryParam.getDeviceSn());
|
||||
condition.setStartTime(queryParam.getStartTime());
|
||||
condition.setEndTime(queryParam.getEndTime());
|
||||
condition.setReceiveTraffic(queryParam.getReceiveTraffic());
|
||||
condition.setSendTraffic(queryParam.getSendTraffic());
|
||||
return epsInitialTrafficDataMapper.selectByCondition(condition).stream();
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.EpsMethodChangeRecordMapper;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
import com.ruoyi.system.service.IEpsMethodChangeRecordService;
|
||||
|
||||
/**
|
||||
* 收益方式修改记录Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@Service
|
||||
public class EpsMethodChangeRecordServiceImpl implements IEpsMethodChangeRecordService
|
||||
{
|
||||
@Autowired
|
||||
private EpsMethodChangeRecordMapper epsMethodChangeRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
@Override
|
||||
public EpsMethodChangeRecord selectEpsMethodChangeRecordById(Long id)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.selectEpsMethodChangeRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询收益方式修改记录列表
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 收益方式修改记录
|
||||
*/
|
||||
@Override
|
||||
public List<EpsMethodChangeRecord> selectEpsMethodChangeRecordList(EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.selectEpsMethodChangeRecordList(epsMethodChangeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
epsMethodChangeRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return epsMethodChangeRecordMapper.insertEpsMethodChangeRecord(epsMethodChangeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改收益方式修改记录
|
||||
*
|
||||
* @param epsMethodChangeRecord 收益方式修改记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsMethodChangeRecord(EpsMethodChangeRecord epsMethodChangeRecord)
|
||||
{
|
||||
epsMethodChangeRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return epsMethodChangeRecordMapper.updateEpsMethodChangeRecord(epsMethodChangeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除收益方式修改记录
|
||||
*
|
||||
* @param ids 需要删除的收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsMethodChangeRecordByIds(Long[] ids)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.deleteEpsMethodChangeRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收益方式修改记录信息
|
||||
*
|
||||
* @param id 收益方式修改记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsMethodChangeRecordById(Long id)
|
||||
{
|
||||
return epsMethodChangeRecordMapper.deleteEpsMethodChangeRecordById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.EpsInitialTrafficData;
|
||||
import com.ruoyi.system.domain.EpsNodeBandwidth;
|
||||
import com.ruoyi.system.mapper.EpsNodeBandwidthMapper;
|
||||
import com.ruoyi.system.service.EpsInitialTrafficDataService;
|
||||
import com.ruoyi.system.service.IEpsNodeBandwidthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.webjars.NotFoundException;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 节点带宽信息Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
{
|
||||
@Autowired
|
||||
private EpsNodeBandwidthMapper epsNodeBandwidthMapper;
|
||||
@Autowired
|
||||
private EpsInitialTrafficDataService epsInitialTrafficDataService;
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
@Override
|
||||
public EpsNodeBandwidth selectEpsNodeBandwidthById(Long id)
|
||||
{
|
||||
return epsNodeBandwidthMapper.selectEpsNodeBandwidthById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询节点带宽信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
@Override
|
||||
public List<EpsInitialTrafficData> relatedData(Long id)
|
||||
{
|
||||
// 1. 根据ID查询服务器信息
|
||||
EpsNodeBandwidth epsNodeBandwidth = epsNodeBandwidthMapper.selectEpsNodeBandwidthById(id);
|
||||
if (epsNodeBandwidth == null) {
|
||||
throw new NotFoundException("未找到ID为" + id + "的服务器信息");
|
||||
}
|
||||
|
||||
// 2. 设置查询条件
|
||||
EpsInitialTrafficData queryParams = new EpsInitialTrafficData();
|
||||
queryParams.setDeviceSn(epsNodeBandwidth.getHardwareSn());
|
||||
|
||||
// 3. 根据带宽类型设置时间范围
|
||||
LocalDateTime createTime = dateToLocalDateTime(epsNodeBandwidth.getCreateTime());
|
||||
setTimeRangeByBandwidthType(queryParams, epsNodeBandwidth.getBandwidthType(), createTime);
|
||||
|
||||
// 4. 查询并返回数据
|
||||
return epsInitialTrafficDataService.query(queryParams);
|
||||
}
|
||||
/**
|
||||
* 查询节点带宽信息列表
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 节点带宽信息
|
||||
*/
|
||||
@Override
|
||||
public List<EpsNodeBandwidth> selectEpsNodeBandwidthList(EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
return epsNodeBandwidthMapper.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
epsNodeBandwidth.setCreateTime(DateUtils.getNowDate());
|
||||
return epsNodeBandwidthMapper.insertEpsNodeBandwidth(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改节点带宽信息
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsNodeBandwidth(EpsNodeBandwidth epsNodeBandwidth)
|
||||
{
|
||||
epsNodeBandwidth.setUpdateTime(DateUtils.getNowDate());
|
||||
return epsNodeBandwidthMapper.updateEpsNodeBandwidth(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除节点带宽信息
|
||||
*
|
||||
* @param ids 需要删除的节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsNodeBandwidthByIds(Long[] ids)
|
||||
{
|
||||
return epsNodeBandwidthMapper.deleteEpsNodeBandwidthByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除节点带宽信息信息
|
||||
*
|
||||
* @param id 节点带宽信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsNodeBandwidthById(Long id)
|
||||
{
|
||||
return epsNodeBandwidthMapper.deleteEpsNodeBandwidthById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算月均日95值
|
||||
*
|
||||
* @param epsNodeBandwidth 节点带宽信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int calculateAvg(EpsNodeBandwidth epsNodeBandwidth) {
|
||||
// 验证是否已经存在记录
|
||||
List<EpsNodeBandwidth> existingRecords = epsNodeBandwidthMapper.selectEpsNodeBandwidthList(epsNodeBandwidth);
|
||||
|
||||
EpsNodeBandwidth calculatedData = epsNodeBandwidthMapper.calculateAvg(epsNodeBandwidth);
|
||||
// 日95值总和
|
||||
BigDecimal sum95Daily = calculatedData.getBandwidth95Daily();
|
||||
// 日有效95值总和
|
||||
BigDecimal sumEffectiveBandwidth95Daily = calculatedData.getEffectiveBandwidth95Daily();
|
||||
// 计算当月天数并求平均值
|
||||
LocalDate monthTime = epsNodeBandwidth.getMonthTime();
|
||||
int daysInMonth = YearMonth.from(monthTime).lengthOfMonth();
|
||||
// 月均日95值
|
||||
BigDecimal avgMonthlyBandwidth95 = daysInMonth == 0 ? BigDecimal.ZERO :
|
||||
sum95Daily.divide(BigDecimal.valueOf(daysInMonth), 2, RoundingMode.HALF_UP);
|
||||
epsNodeBandwidth.setAvgMonthlyBandwidth95(avgMonthlyBandwidth95);
|
||||
// 有效-月均日95值
|
||||
BigDecimal effectiveAvgMonthlyBandwidth95 = daysInMonth == 0 ? BigDecimal.ZERO :
|
||||
sumEffectiveBandwidth95Daily.divide(BigDecimal.valueOf(daysInMonth), 2, RoundingMode.HALF_UP);
|
||||
epsNodeBandwidth.setEffectiveAvgMonthlyBandwidth95(effectiveAvgMonthlyBandwidth95);
|
||||
|
||||
// 根据是否存在记录执行更新或插入操作
|
||||
return existingRecords.isEmpty() ?
|
||||
epsNodeBandwidthMapper.insertEpsNodeBandwidth(epsNodeBandwidth) :
|
||||
epsNodeBandwidthMapper.updateEpsNodeBandwidth(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EpsNodeBandwidth> getAvgDetailMsg(Long id) {
|
||||
// 1. 根据ID查询服务器信息
|
||||
EpsNodeBandwidth epsNodeBandwidth = epsNodeBandwidthMapper.selectEpsNodeBandwidthById(id);
|
||||
if (epsNodeBandwidth == null) {
|
||||
throw new NotFoundException("未找到ID为" + id + "的服务器信息");
|
||||
}
|
||||
return epsNodeBandwidthMapper.getAvgDetailMsg(epsNodeBandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* Date 类型 转为 LocalDateTime 类型
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime dateToLocalDateTime(Date date) {
|
||||
return date.toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDateTime();
|
||||
}
|
||||
/**
|
||||
* 根据带宽类型设置时间范围
|
||||
*/
|
||||
private void setTimeRangeByBandwidthType(EpsInitialTrafficData data, String bandwidthType, LocalDateTime baseTime) {
|
||||
switch (bandwidthType) {
|
||||
case "1":
|
||||
case "3":
|
||||
case "5": // 日带宽
|
||||
data.setStartTime(baseTime.with(LocalTime.MIN)); // 00:00:00
|
||||
data.setEndTime(baseTime.with(LocalTime.MAX).withNano(0)); // 23:59:59
|
||||
break;
|
||||
case "2":
|
||||
case "4":
|
||||
case "6":
|
||||
case "7": // 月带宽
|
||||
YearMonth month = YearMonth.from(baseTime);
|
||||
data.setStartTime(month.atDay(1).atStartOfDay()); // 当月第一天 00:00:00
|
||||
data.setEndTime(month.atEndOfMonth().atTime(23, 59, 59)); // 当月最后一天 23:59:59
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("不支持的带宽类型: " + bandwidthType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.domain.EpsMethodChangeRecord;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.mapper.EpsServerRevenueConfigMapper;
|
||||
import com.ruoyi.system.service.IEpsServerRevenueConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务器收益方式配置Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@Service
|
||||
public class EpsServerRevenueConfigServiceImpl implements IEpsServerRevenueConfigService
|
||||
{
|
||||
@Autowired
|
||||
private EpsServerRevenueConfigMapper epsServerRevenueConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
@Override
|
||||
public EpsServerRevenueConfig selectEpsServerRevenueConfigById(Long id)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.selectEpsServerRevenueConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务器收益方式配置列表
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 服务器收益方式配置
|
||||
*/
|
||||
@Override
|
||||
public List<EpsServerRevenueConfig> selectEpsServerRevenueConfigList(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.selectEpsServerRevenueConfigList(epsServerRevenueConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
epsServerRevenueConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return epsServerRevenueConfigMapper.insertEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务器收益方式配置
|
||||
*
|
||||
* @param epsServerRevenueConfig 服务器收益方式配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsServerRevenueConfig(EpsServerRevenueConfig epsServerRevenueConfig)
|
||||
{
|
||||
epsServerRevenueConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
//原来的收益方式
|
||||
EpsServerRevenueConfig serverRevenueConfig = epsServerRevenueConfigMapper.selectEpsServerRevenueConfigById(epsServerRevenueConfig.getId());
|
||||
String revenueMethod = getMethodName(serverRevenueConfig.getRevenueMethod());
|
||||
//现在的收益方式
|
||||
String nowRevenueMethod = getMethodName(epsServerRevenueConfig.getRevenueMethod());
|
||||
// 修改条数
|
||||
int rows = epsServerRevenueConfigMapper.updateEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
if(rows>=0){
|
||||
EpsMethodChangeRecord epsMethodChangeRecord = new EpsMethodChangeRecord();
|
||||
// 节点名称
|
||||
epsMethodChangeRecord.setNodeName(epsServerRevenueConfig.getNodeName());
|
||||
// 硬件sn
|
||||
epsMethodChangeRecord.setHardwareSn(epsServerRevenueConfig.getHardwareSn());
|
||||
// 修改时间
|
||||
epsMethodChangeRecord.setCreateTime(DateUtils.getNowDate());
|
||||
// 修改人
|
||||
epsMethodChangeRecord.setCreatBy(SecurityUtils.getUsername());
|
||||
// 修改内容
|
||||
String content = "";
|
||||
if("流量".equals(nowRevenueMethod)){
|
||||
// 修改内容
|
||||
content = "收益方式变为【"+nowRevenueMethod+"】,流量网口设置为"+epsServerRevenueConfig.getTrafficPort()+
|
||||
",业务为"+epsServerRevenueConfig.getBusinessName();
|
||||
}
|
||||
if("包端".equals(nowRevenueMethod)){
|
||||
// 修改内容
|
||||
content = "收益方式变为【"+nowRevenueMethod+"】,流量网口设置为"+epsServerRevenueConfig.getTrafficPort()+
|
||||
",带宽值设置为"+epsServerRevenueConfig.getPackageBandwidth()+"Mbps,"+"业务为"+epsServerRevenueConfig.getBusinessName();
|
||||
}
|
||||
epsMethodChangeRecord.setChangeContent(content);
|
||||
// 添加操作记录
|
||||
epsServerRevenueConfigMapper.insertEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务器收益方式配置
|
||||
*
|
||||
* @param ids 需要删除的服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsServerRevenueConfigByIds(Long[] ids)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.deleteEpsServerRevenueConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务器收益方式配置信息
|
||||
*
|
||||
* @param id 服务器收益方式配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsServerRevenueConfigById(Long id)
|
||||
{
|
||||
return epsServerRevenueConfigMapper.deleteEpsServerRevenueConfigById(id);
|
||||
}
|
||||
/**
|
||||
* 把收益方式转化为文字
|
||||
* @param method
|
||||
* @return
|
||||
*/
|
||||
public String getMethodName(String method){
|
||||
String revenueMethod = "";
|
||||
if("1".equals(method)){
|
||||
revenueMethod = "流量";
|
||||
}
|
||||
if("2".equals(method)){
|
||||
revenueMethod = "包端";
|
||||
}
|
||||
return revenueMethod;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.system.domain.EpsTrafficData;
|
||||
import com.ruoyi.system.mapper.EpsMethodChangeRecordMapper;
|
||||
import com.ruoyi.system.mapper.EpsTrafficDataMapper;
|
||||
import com.ruoyi.system.service.IEpsTrafficDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 流量相关数据Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class EpsTrafficDataServiceImpl implements IEpsTrafficDataService
|
||||
{
|
||||
@Autowired
|
||||
private EpsTrafficDataMapper epsTrafficDataMapper;
|
||||
@Autowired
|
||||
private EpsMethodChangeRecordMapper epsMethodChangeRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询流量相关数据
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
@Override
|
||||
public EpsTrafficData selectEpsTrafficDataById(Long id)
|
||||
{
|
||||
return epsTrafficDataMapper.selectEpsTrafficDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流量相关数据列表
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 流量相关数据
|
||||
*/
|
||||
@Override
|
||||
public List<EpsTrafficData> selectEpsTrafficDataList(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
return epsTrafficDataMapper.selectEpsTrafficDataList(epsTrafficData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsTrafficData(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
epsTrafficData.setCreateTime(DateUtils.getNowDate());
|
||||
return epsTrafficDataMapper.insertEpsTrafficData(epsTrafficData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流量相关数据
|
||||
*
|
||||
* @param epsTrafficData 流量相关数据
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsTrafficData(EpsTrafficData epsTrafficData)
|
||||
{
|
||||
epsTrafficData.setUpdateTime(DateUtils.getNowDate());
|
||||
// 修改条数
|
||||
int rows = epsTrafficDataMapper.updateEpsTrafficData(epsTrafficData);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除流量相关数据
|
||||
*
|
||||
* @param ids 需要删除的流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsTrafficDataByIds(Long[] ids)
|
||||
{
|
||||
return epsTrafficDataMapper.deleteEpsTrafficDataByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流量相关数据信息
|
||||
*
|
||||
* @param id 流量相关数据主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsTrafficDataById(Long id)
|
||||
{
|
||||
return epsTrafficDataMapper.deleteEpsTrafficDataById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 把收益方式转化为文字
|
||||
* @param method
|
||||
* @return
|
||||
*/
|
||||
public String getMethodName(String method){
|
||||
String revenueMethod = "";
|
||||
if("1".equals(method)){
|
||||
revenueMethod = "流量";
|
||||
}
|
||||
if("2".equals(method)){
|
||||
revenueMethod = "包端";
|
||||
}
|
||||
return revenueMethod;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.KnowledgeBaseMapper;
|
||||
import com.ruoyi.system.domain.KnowledgeBase;
|
||||
import com.ruoyi.system.service.IKnowledgeBaseService;
|
||||
|
||||
/**
|
||||
* 知识库Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-15
|
||||
*/
|
||||
@Service
|
||||
public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService
|
||||
{
|
||||
@Autowired
|
||||
private KnowledgeBaseMapper knowledgeBaseMapper;
|
||||
|
||||
/**
|
||||
* 查询知识库
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 知识库
|
||||
*/
|
||||
@Override
|
||||
public KnowledgeBase selectKnowledgeBaseById(Long id)
|
||||
{
|
||||
return knowledgeBaseMapper.selectKnowledgeBaseById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询知识库列表
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 知识库
|
||||
*/
|
||||
@Override
|
||||
public List<KnowledgeBase> selectKnowledgeBaseList(KnowledgeBase knowledgeBase)
|
||||
{
|
||||
return knowledgeBaseMapper.selectKnowledgeBaseList(knowledgeBase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertKnowledgeBase(KnowledgeBase knowledgeBase)
|
||||
{
|
||||
knowledgeBase.setCreateTime(DateUtils.getNowDate());
|
||||
return knowledgeBaseMapper.insertKnowledgeBase(knowledgeBase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改知识库
|
||||
*
|
||||
* @param knowledgeBase 知识库
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateKnowledgeBase(KnowledgeBase knowledgeBase)
|
||||
{
|
||||
knowledgeBase.setUpdateTime(DateUtils.getNowDate());
|
||||
return knowledgeBaseMapper.updateKnowledgeBase(knowledgeBase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除知识库
|
||||
*
|
||||
* @param ids 需要删除的知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteKnowledgeBaseByIds(Long[] ids)
|
||||
{
|
||||
return knowledgeBaseMapper.deleteKnowledgeBaseByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除知识库信息
|
||||
*
|
||||
* @param id 知识库主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteKnowledgeBaseById(Long id)
|
||||
{
|
||||
return knowledgeBaseMapper.deleteKnowledgeBaseById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.MtmMonitoringTemplateMapper;
|
||||
import com.ruoyi.system.domain.MtmMonitoringTemplate;
|
||||
import com.ruoyi.system.service.IMtmMonitoringTemplateService;
|
||||
|
||||
/**
|
||||
* 监控模板管理Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class MtmMonitoringTemplateServiceImpl implements IMtmMonitoringTemplateService
|
||||
{
|
||||
@Autowired
|
||||
private MtmMonitoringTemplateMapper mtmMonitoringTemplateMapper;
|
||||
|
||||
/**
|
||||
* 查询监控模板管理
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
@Override
|
||||
public MtmMonitoringTemplate selectMtmMonitoringTemplateById(Long id)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.selectMtmMonitoringTemplateById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询监控模板管理列表
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 监控模板管理
|
||||
*/
|
||||
@Override
|
||||
public List<MtmMonitoringTemplate> selectMtmMonitoringTemplateList(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.selectMtmMonitoringTemplateList(mtmMonitoringTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
mtmMonitoringTemplate.setCreateTime(DateUtils.getNowDate());
|
||||
return mtmMonitoringTemplateMapper.insertMtmMonitoringTemplate(mtmMonitoringTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改监控模板管理
|
||||
*
|
||||
* @param mtmMonitoringTemplate 监控模板管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMtmMonitoringTemplate(MtmMonitoringTemplate mtmMonitoringTemplate)
|
||||
{
|
||||
mtmMonitoringTemplate.setUpdateTime(DateUtils.getNowDate());
|
||||
return mtmMonitoringTemplateMapper.updateMtmMonitoringTemplate(mtmMonitoringTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除监控模板管理
|
||||
*
|
||||
* @param ids 需要删除的监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMtmMonitoringTemplateByIds(Long[] ids)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.deleteMtmMonitoringTemplateByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控模板管理信息
|
||||
*
|
||||
* @param id 监控模板管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMtmMonitoringTemplateById(Long id)
|
||||
{
|
||||
return mtmMonitoringTemplateMapper.deleteMtmMonitoringTemplateById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmEpsTopologyManagementMapper;
|
||||
import com.ruoyi.system.domain.RmEpsTopologyManagement;
|
||||
import com.ruoyi.system.service.IRmEpsTopologyManagementService;
|
||||
|
||||
/**
|
||||
* 拓扑管理Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class RmEpsTopologyManagementServiceImpl implements IRmEpsTopologyManagementService
|
||||
{
|
||||
@Autowired
|
||||
private RmEpsTopologyManagementMapper rmEpsTopologyManagementMapper;
|
||||
|
||||
/**
|
||||
* 查询拓扑管理
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
@Override
|
||||
public RmEpsTopologyManagement selectRmEpsTopologyManagementById(Long id)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.selectRmEpsTopologyManagementById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询拓扑管理列表
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 拓扑管理
|
||||
*/
|
||||
@Override
|
||||
public List<RmEpsTopologyManagement> selectRmEpsTopologyManagementList(RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.selectRmEpsTopologyManagementList(rmEpsTopologyManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
rmEpsTopologyManagement.setCreateTime(DateUtils.getNowDate());
|
||||
return rmEpsTopologyManagementMapper.insertRmEpsTopologyManagement(rmEpsTopologyManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改拓扑管理
|
||||
*
|
||||
* @param rmEpsTopologyManagement 拓扑管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRmEpsTopologyManagement(RmEpsTopologyManagement rmEpsTopologyManagement)
|
||||
{
|
||||
rmEpsTopologyManagement.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmEpsTopologyManagementMapper.updateRmEpsTopologyManagement(rmEpsTopologyManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除拓扑管理
|
||||
*
|
||||
* @param ids 需要删除的拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmEpsTopologyManagementByIds(Long[] ids)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.deleteRmEpsTopologyManagementByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除拓扑管理信息
|
||||
*
|
||||
* @param id 拓扑管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmEpsTopologyManagementById(Long id)
|
||||
{
|
||||
return rmEpsTopologyManagementMapper.deleteRmEpsTopologyManagementById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmResourceGroupMapper;
|
||||
import com.ruoyi.system.domain.RmResourceGroup;
|
||||
import com.ruoyi.system.service.IRmResourceGroupService;
|
||||
|
||||
/**
|
||||
* 资源分组Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-12
|
||||
*/
|
||||
@Service
|
||||
public class RmResourceGroupServiceImpl implements IRmResourceGroupService
|
||||
{
|
||||
@Autowired
|
||||
private RmResourceGroupMapper rmResourceGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询资源分组
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 资源分组
|
||||
*/
|
||||
@Override
|
||||
public RmResourceGroup selectRmResourceGroupById(Long id)
|
||||
{
|
||||
return rmResourceGroupMapper.selectRmResourceGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资源分组列表
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 资源分组
|
||||
*/
|
||||
@Override
|
||||
public List<RmResourceGroup> selectRmResourceGroupList(RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
return rmResourceGroupMapper.selectRmResourceGroupList(rmResourceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRmResourceGroup(RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
rmResourceGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return rmResourceGroupMapper.insertRmResourceGroup(rmResourceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资源分组
|
||||
*
|
||||
* @param rmResourceGroup 资源分组
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRmResourceGroup(RmResourceGroup rmResourceGroup)
|
||||
{
|
||||
rmResourceGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmResourceGroupMapper.updateRmResourceGroup(rmResourceGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资源分组
|
||||
*
|
||||
* @param ids 需要删除的资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmResourceGroupByIds(Long[] ids)
|
||||
{
|
||||
return rmResourceGroupMapper.deleteRmResourceGroupByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源分组信息
|
||||
*
|
||||
* @param id 资源分组主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmResourceGroupById(Long id)
|
||||
{
|
||||
return rmResourceGroupMapper.deleteRmResourceGroupById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,17 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||
import com.ruoyi.system.domain.EpsServerRevenueConfig;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.mapper.EpsServerRevenueConfigMapper;
|
||||
import com.ruoyi.system.mapper.RmResourceRegistrationMapper;
|
||||
import com.ruoyi.system.service.IRmResourceRegistrationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.RmResourceRegistrationMapper;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.service.IRmResourceRegistrationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源注册Service业务层处理
|
||||
@@ -22,7 +25,7 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
@Autowired
|
||||
private RmResourceRegistrationMapper rmResourceRegistrationMapper;
|
||||
@Autowired
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
private EpsServerRevenueConfigMapper epsServerRevenueConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询资源注册
|
||||
@@ -61,6 +64,11 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
rmResourceRegistration.setCreatorId(SecurityUtils.getUserId());
|
||||
rmResourceRegistration.setCreatorName(SecurityUtils.getUsername());
|
||||
rmResourceRegistration.setCreateTime(DateUtils.getNowDate());
|
||||
// 查询此硬件sn是否已存在
|
||||
int exits = rmResourceRegistrationMapper.countBySn(rmResourceRegistration.getHardwareSn());
|
||||
if(exits>0){
|
||||
return -1;
|
||||
}
|
||||
return rmResourceRegistrationMapper.insertRmResourceRegistration(rmResourceRegistration);
|
||||
}
|
||||
|
||||
@@ -76,9 +84,63 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
rmResourceRegistration.setUpdateTime(DateUtils.getNowDate());
|
||||
rmResourceRegistration.setUpdaterId(SecurityUtils.getUserId());
|
||||
rmResourceRegistration.setUpdaterName(SecurityUtils.getUsername());
|
||||
// 禁止修改sn序列号
|
||||
rmResourceRegistration.setHardwareSn(null);
|
||||
// 已注册状态修改--仅可修改资源名称,描述
|
||||
if ("1".equals(rmResourceRegistration.getRegistrationStatus())){
|
||||
// 拿到需要修改的id
|
||||
Long id = rmResourceRegistration.getId();
|
||||
// 拿到需要修改的资源名称
|
||||
String resourceName = rmResourceRegistration.getResourceName();
|
||||
// 拿到需要修改的描述
|
||||
String description = rmResourceRegistration.getDescription();
|
||||
// 初始化
|
||||
rmResourceRegistration = new RmResourceRegistration();
|
||||
// id赋值
|
||||
rmResourceRegistration.setId(id);
|
||||
// 可修改资源名称
|
||||
rmResourceRegistration.setResourceName(resourceName);
|
||||
// 可修改描述
|
||||
rmResourceRegistration.setDescription(description);
|
||||
|
||||
}
|
||||
return rmResourceRegistrationMapper.updateRmResourceRegistration(rmResourceRegistration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 资源注册-注册
|
||||
*
|
||||
* @param rmResourceRegistration 资源注册
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int register(RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
rmResourceRegistration.setUpdateTime(DateUtils.getNowDate());
|
||||
rmResourceRegistration.setUpdaterId(SecurityUtils.getUserId());
|
||||
rmResourceRegistration.setUpdaterName(SecurityUtils.getUsername());
|
||||
if("1".equals(rmResourceRegistration.getResourceType())){
|
||||
// 注册服务器 添加到服务器收益配置表
|
||||
EpsServerRevenueConfig epsServerRevenueConfig = new EpsServerRevenueConfig();
|
||||
epsServerRevenueConfig.setHardwareSn(rmResourceRegistration.getHardwareSn());
|
||||
epsServerRevenueConfig.setNodeName(rmResourceRegistration.getResourceName());
|
||||
epsServerRevenueConfig.setCreateTime(DateUtils.getNowDate());
|
||||
// 新增前判断是否存在
|
||||
int exits = epsServerRevenueConfigMapper.countBySn(epsServerRevenueConfig.getHardwareSn());
|
||||
if(exits>0){
|
||||
// 存在 修改
|
||||
epsServerRevenueConfigMapper.updateEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}else{
|
||||
// 不存在 新增
|
||||
epsServerRevenueConfigMapper.insertEpsServerRevenueConfig(epsServerRevenueConfig);
|
||||
}
|
||||
}
|
||||
// 仅注册
|
||||
RmResourceRegistration resourceRegistration = new RmResourceRegistration();
|
||||
resourceRegistration.setId(rmResourceRegistration.getId());
|
||||
resourceRegistration.setRegistrationStatus(rmResourceRegistration.getRegistrationStatus());
|
||||
return rmResourceRegistrationMapper.updateRmResourceRegistration(resourceRegistration);
|
||||
}
|
||||
/**
|
||||
* 批量删除资源注册
|
||||
*
|
||||
@@ -102,4 +164,15 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
{
|
||||
return rmResourceRegistrationMapper.deleteRmResourceRegistrationById(id);
|
||||
}
|
||||
@Override
|
||||
public List<Map> selectAllResourceName()
|
||||
{
|
||||
return rmResourceRegistrationMapper.selectAllResourceName();
|
||||
}
|
||||
@Override
|
||||
public List<Map> selectAllResourceNameByType(RmResourceRegistration resourceRegistration)
|
||||
{
|
||||
return rmResourceRegistrationMapper.selectAllResourceNameByType(resourceRegistration);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.ruoyi.system.util;
|
||||
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 获取表明util
|
||||
*/
|
||||
public class TableRouterUtil {
|
||||
|
||||
// 表名前缀
|
||||
private static final String TABLE_PREFIX = "eps_initial_traffic";
|
||||
|
||||
// 日期格式
|
||||
private static final DateTimeFormatter YEAR_MONTH_FORMAT =
|
||||
DateTimeFormatter.ofPattern("yyyy_MM");
|
||||
|
||||
/**
|
||||
* 根据创建时间获取表名
|
||||
* @param createTime 记录创建时间
|
||||
* @return 对应的分表名称
|
||||
* @throws IllegalArgumentException 如果createTime为null
|
||||
*
|
||||
* 示例:
|
||||
* 2023-08-05 14:30:00 → eps_initial_traffic_2023_08_1_10
|
||||
* 2023-08-15 09:15:00 → eps_initial_traffic_2023_08_11_20
|
||||
* 2023-08-25 18:45:00 → eps_initial_traffic_2023_08_21_31
|
||||
*/
|
||||
public static String getTableName(LocalDateTime createTime) {
|
||||
if (createTime == null) {
|
||||
throw new IllegalArgumentException("创建时间不能为null");
|
||||
}
|
||||
|
||||
String yearMonth = createTime.format(YEAR_MONTH_FORMAT);
|
||||
int day = createTime.getDayOfMonth();
|
||||
|
||||
return String.format("%s_%s_%s",
|
||||
TABLE_PREFIX,
|
||||
yearMonth,
|
||||
getDayRange(day));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时间范围内涉及的所有表名
|
||||
* @param startTime 开始时间(包含)
|
||||
* @param endTime 结束时间(包含)
|
||||
* @return 按时间顺序排列的表名集合
|
||||
*/
|
||||
public static Set<String> getTableNamesBetween(LocalDateTime startTime, LocalDateTime endTime) {
|
||||
validateTimeRange(startTime, endTime);
|
||||
|
||||
Set<String> tableNames = new LinkedHashSet<>();
|
||||
LocalDateTime current = startTime.withHour(0).withMinute(0).withSecond(0);
|
||||
|
||||
while (!current.isAfter(endTime)) {
|
||||
tableNames.add(getTableName(current));
|
||||
current = current.plusDays(1);
|
||||
}
|
||||
|
||||
return tableNames;
|
||||
}
|
||||
|
||||
|
||||
// 获取日期区间
|
||||
private static String getDayRange(int day) {
|
||||
if (day < 1 || day > 31) {
|
||||
throw new IllegalArgumentException("日期必须在1-31之间");
|
||||
}
|
||||
|
||||
if (day <= 10) return "1_10";
|
||||
if (day <= 20) return "11_20";
|
||||
return "21_31";
|
||||
}
|
||||
|
||||
// 验证时间范围
|
||||
private static void validateTimeRange(LocalDateTime start, LocalDateTime end) {
|
||||
if (start == null || end == null) {
|
||||
throw new IllegalArgumentException("时间范围参数不能为null");
|
||||
}
|
||||
if (start.isAfter(end)) {
|
||||
throw new IllegalArgumentException("开始时间不能晚于结束时间");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.EpsBusinessMapper">
|
||||
|
||||
<resultMap type="EpsBusiness" id="EpsBusinessResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="businessName" column="business_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="description" column="description" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsBusinessVo">
|
||||
select id, business_name, create_time, update_time, create_by, update_by, description from eps_business
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsBusinessList" parameterType="EpsBusiness" resultMap="EpsBusinessResult">
|
||||
<include refid="selectEpsBusinessVo"/>
|
||||
<where>
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsBusinessById" parameterType="String" resultMap="EpsBusinessResult">
|
||||
<include refid="selectEpsBusinessVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsBusiness" parameterType="EpsBusiness">
|
||||
insert into eps_business
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="businessName != null and businessName != ''">business_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="description != null">description,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="businessName != null and businessName != ''">#{businessName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsBusiness" parameterType="EpsBusiness">
|
||||
update eps_business
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="businessName != null and businessName != ''">business_name = #{businessName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsBusinessById" parameterType="String">
|
||||
delete from eps_business where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsBusinessByIds" parameterType="String">
|
||||
delete from eps_business where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="countByBusinessName" parameterType="EpsBusiness" resultType="java.lang.Integer">
|
||||
select count(1) from eps_business
|
||||
<where>
|
||||
<if test="businessName != '' and businessName != null">
|
||||
and business_name = #{businessName}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.EpsInitialTrafficDataMapper">
|
||||
|
||||
<update id="createEpsTrafficTable">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id BIGINT(20) COMMENT '唯一标识ID',
|
||||
interface_name VARCHAR(50) COMMENT '接口名称',
|
||||
mac_address VARCHAR(17) COMMENT 'MAC地址',
|
||||
operation_status VARCHAR(20) COMMENT '运行状态',
|
||||
interface_type VARCHAR(30) COMMENT '接口类型',
|
||||
ipv4_address VARCHAR(15) COMMENT 'IPv4地址',
|
||||
inbound_packet_loss DECIMAL(5,2) COMMENT '入站丢包率(%)',
|
||||
outbound_packet_loss DECIMAL(5,2) COMMENT '出站丢包率(%)',
|
||||
receive_bandwidth DECIMAL(10,2) COMMENT '接收带宽(Mbps)',
|
||||
send_bandwidth DECIMAL(10,2) COMMENT '发送带宽(Mbps)',
|
||||
business_id varchar(12) COMMENT '业务代码',
|
||||
business_name varchar(50) COMMENT '业务名称',
|
||||
service_sn varchar(50) COMMENT '服务器SN',
|
||||
node_name varchar(50) COMMENT '服务器名称',
|
||||
revenue_method varchar(50) COMMENT '收益方式(1.流量,2包端)',
|
||||
package_bandwidth DECIMAL(10,2) COMMENT '包端带宽值',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
create_by VARCHAR(50) COMMENT '创建人',
|
||||
update_by VARCHAR(50) COMMENT '修改人',
|
||||
PRIMARY KEY (id),
|
||||
INDEX idx_name_time (interface_name,create_time),
|
||||
INDEX idx_revenue_method (revenue_method),
|
||||
INDEX idx_service_sn (service_sn)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='EPS设备流量初始数据表';
|
||||
</update>
|
||||
<update id="createEpsInitialTrafficTable">
|
||||
CREATE TABLE IF NOT EXISTS ${tableName} (
|
||||
id BIGINT(20) COMMENT '唯一标识ID',
|
||||
interface_name VARCHAR(50) COMMENT '接口名称',
|
||||
mac_address VARCHAR(17) COMMENT 'MAC地址',
|
||||
operation_status VARCHAR(20) COMMENT '运行状态',
|
||||
interface_type VARCHAR(30) COMMENT '接口类型',
|
||||
ipv4_address VARCHAR(15) COMMENT 'IPv4地址',
|
||||
inbound_packet_loss DECIMAL(5,2) COMMENT '入站丢包率(%)',
|
||||
outbound_packet_loss DECIMAL(5,2) COMMENT '出站丢包率(%)',
|
||||
receive_bandwidth DECIMAL(10,2) COMMENT '接收带宽(Mbps)',
|
||||
send_bandwidth DECIMAL(10,2) COMMENT '发送带宽(Mbps)',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
create_by VARCHAR(50) COMMENT '创建人',
|
||||
update_by VARCHAR(50) COMMENT '修改人',
|
||||
PRIMARY KEY (id),
|
||||
INDEX idx_name_time (interface_name,create_time)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='初始带宽流量表';
|
||||
</update>
|
||||
<!-- 单条插入 -->
|
||||
<insert id="insert">
|
||||
INSERT INTO ${tableName} (
|
||||
receive_traffic,
|
||||
send_traffic,
|
||||
device_sn,
|
||||
business_id,
|
||||
traffic_port,
|
||||
create_time,
|
||||
remark1, remark2, remark3, remark4
|
||||
) VALUES (
|
||||
#{receiveTraffic},
|
||||
#{sendTraffic},
|
||||
#{deviceSn},
|
||||
#{businessId},
|
||||
#{trafficPort},
|
||||
#{createTime},
|
||||
#{remark1}, #{remark2},
|
||||
#{remark3}, #{remark4}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO ${tableName} (
|
||||
receive_traffic,
|
||||
send_traffic,
|
||||
device_sn,
|
||||
business_id,
|
||||
traffic_port,
|
||||
create_time,
|
||||
remark1, remark2, remark3, remark4
|
||||
) VALUES
|
||||
<foreach collection="dataList" item="data" separator=",">
|
||||
(
|
||||
#{data.receiveTraffic},
|
||||
#{data.sendTraffic},
|
||||
#{data.deviceSn},
|
||||
#{data.businessId},
|
||||
#{data.trafficPort},
|
||||
#{data.createTime},
|
||||
#{data.remark1}, #{data.remark2},
|
||||
#{data.remark3}, #{data.remark4}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 条件查询 -->
|
||||
<select id="selectByCondition" resultType="EpsInitialTrafficData">
|
||||
SELECT
|
||||
id,
|
||||
receive_traffic as receiveTraffic,
|
||||
send_traffic as sendTraffic,
|
||||
device_sn as deviceSn,
|
||||
business_id as businessId,
|
||||
traffic_port as trafficPort,
|
||||
create_time as createTime,
|
||||
remark1, remark2, remark3, remark4
|
||||
FROM ${tableName}
|
||||
<where>
|
||||
<if test="deviceSn != '' and deviceSn != null">
|
||||
and device_sn = #{deviceSn}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
and create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
ORDER BY create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.EpsMethodChangeRecordMapper">
|
||||
|
||||
<resultMap type="EpsMethodChangeRecord" id="EpsMethodChangeRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
<result property="changeContent" column="change_content" />
|
||||
<result property="hardwareSn" column="hardware_sn" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creatBy" column="creat_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsMethodChangeRecordVo">
|
||||
select id, node_name, change_content, hardware_sn, create_time, creat_by, update_time, update_by from eps_method_change_record
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsMethodChangeRecordList" parameterType="EpsMethodChangeRecord" resultMap="EpsMethodChangeRecordResult">
|
||||
<include refid="selectEpsMethodChangeRecordVo"/>
|
||||
<where>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="changeContent != null and changeContent != ''"> and change_content like concat('%', #{changeContent}, '%')</if>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="creatBy != null and creatBy != ''"> and creat_by = #{creatBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsMethodChangeRecordById" parameterType="Long" resultMap="EpsMethodChangeRecordResult">
|
||||
<include refid="selectEpsMethodChangeRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsMethodChangeRecord" parameterType="EpsMethodChangeRecord">
|
||||
insert into eps_method_change_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="nodeName != null">node_name,</if>
|
||||
<if test="changeContent != null">change_content,</if>
|
||||
<if test="hardwareSn != null">hardware_sn,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="creatBy != null">creat_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
<if test="changeContent != null">#{changeContent},</if>
|
||||
<if test="hardwareSn != null">#{hardwareSn},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="creatBy != null">#{creatBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsMethodChangeRecord" parameterType="EpsMethodChangeRecord">
|
||||
update eps_method_change_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
<if test="changeContent != null">change_content = #{changeContent},</if>
|
||||
<if test="hardwareSn != null">hardware_sn = #{hardwareSn},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="creatBy != null">creat_by = #{creatBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsMethodChangeRecordById" parameterType="Long">
|
||||
delete from eps_method_change_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsMethodChangeRecordByIds" parameterType="String">
|
||||
delete from eps_method_change_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.EpsNodeBandwidthMapper">
|
||||
|
||||
<resultMap type="EpsNodeBandwidth" id="EpsNodeBandwidthResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
<result property="hardwareSn" column="hardware_sn" />
|
||||
<result property="bandwidthType" column="bandwidth_type" />
|
||||
<result property="bandwidthResult" column="bandwidth_result" />
|
||||
<result property="bandwidth95Daily" column="bandwidth_95_daily" />
|
||||
<result property="bandwidth95Monthly" column="bandwidth_95_monthly" />
|
||||
<result property="avgMonthlyBandwidth95" column="avg_monthly_bandwidth_95" />
|
||||
<result property="packageBandwidthDaily" column="package_bandwidth_daily" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="serviceNumber" column="service_number" />
|
||||
<result property="uplinkSwitch" column="uplink_switch" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="remark1" column="remark1" />
|
||||
<result property="interfaceName" column="interface_name" />
|
||||
<result property="resourceType" column="resource_type" />
|
||||
<result property="interfaceLinkDeviceType" column="interface_link_device_type" />
|
||||
<result property="effectiveBandwidth95Daily" column="effective_bandwidth_95_daily" />
|
||||
<result property="effectiveBandwidth95Monthly" column="effective_bandwidth_95_monthly" />
|
||||
<result property="effectiveAvgMonthlyBandwidth95" column="effective_avg_monthly_bandwidth_95" />
|
||||
<result property="businessName" column="business_name" />
|
||||
<result property="businessId" column="business_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsNodeBandwidthVo">
|
||||
select id, node_name, hardware_sn, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, remark1, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id from eps_node_bandwidth
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsNodeBandwidthList" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
<include refid="selectEpsNodeBandwidthVo"/>
|
||||
<where>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="bandwidthType != null and bandwidthType != ''"> and bandwidth_type = #{bandwidthType}</if>
|
||||
<if test="bandwidthResult != null "> and bandwidth_result = #{bandwidthResult}</if>
|
||||
<if test="bandwidth95Daily != null "> and bandwidth_95_daily = #{bandwidth95Daily}</if>
|
||||
<if test="bandwidth95Monthly != null "> and bandwidth_95_monthly = #{bandwidth95Monthly}</if>
|
||||
<if test="avgMonthlyBandwidth95 != null "> and avg_monthly_bandwidth_95 = #{avgMonthlyBandwidth95}</if>
|
||||
<if test="packageBandwidthDaily != null "> and package_bandwidth_daily = #{packageBandwidthDaily}</if>
|
||||
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="serviceNumber != null and serviceNumber != ''"> and service_number = #{serviceNumber}</if>
|
||||
<if test="uplinkSwitch != null and uplinkSwitch != ''"> and uplink_switch like concat('%', #{uplinkSwitch}, '%')</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="remark1 != null and remark1 != ''"> and remark1 = #{remark1}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name = #{interfaceName}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="interfaceLinkDeviceType != null and interfaceLinkDeviceType != ''"> and interface_link_device_type = #{interfaceLinkDeviceType}</if>
|
||||
<if test="effectiveBandwidth95Daily != null "> and effective_bandwidth_95_daily = #{effectiveBandwidth95Daily}</if>
|
||||
<if test="effectiveBandwidth95Monthly != null "> and effective_bandwidth_95_monthly = #{effectiveBandwidth95Monthly}</if>
|
||||
<if test="effectiveAvgMonthlyBandwidth95 != null "> and effective_avg_monthly_bandwidth_95 = #{effectiveAvgMonthlyBandwidth95}</if>
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
|
||||
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsNodeBandwidthById" parameterType="Long" resultMap="EpsNodeBandwidthResult">
|
||||
<include refid="selectEpsNodeBandwidthVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsNodeBandwidth" parameterType="EpsNodeBandwidth" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into eps_node_bandwidth
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="nodeName != null">node_name,</if>
|
||||
<if test="hardwareSn != null">hardware_sn,</if>
|
||||
<if test="bandwidthType != null">bandwidth_type,</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result,</if>
|
||||
<if test="bandwidth95Daily != null">bandwidth_95_daily,</if>
|
||||
<if test="bandwidth95Monthly != null">bandwidth_95_monthly,</if>
|
||||
<if test="avgMonthlyBandwidth95 != null">avg_monthly_bandwidth_95,</if>
|
||||
<if test="packageBandwidthDaily != null">package_bandwidth_daily,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
<if test="serviceNumber != null">service_number,</if>
|
||||
<if test="uplinkSwitch != null">uplink_switch,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="remark1 != null">remark1,</if>
|
||||
<if test="interfaceName != null">interface_name,</if>
|
||||
<if test="resourceType != null">resource_type,</if>
|
||||
<if test="interfaceLinkDeviceType != null">interface_link_device_type,</if>
|
||||
<if test="effectiveBandwidth95Daily != null">effective_bandwidth_95_daily,</if>
|
||||
<if test="effectiveBandwidth95Monthly != null">effective_bandwidth_95_monthly,</if>
|
||||
<if test="effectiveAvgMonthlyBandwidth95 != null">effective_avg_monthly_bandwidth_95,</if>
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="businessId != null">business_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
<if test="hardwareSn != null">#{hardwareSn},</if>
|
||||
<if test="bandwidthType != null">#{bandwidthType},</if>
|
||||
<if test="bandwidthResult != null">#{bandwidthResult},</if>
|
||||
<if test="bandwidth95Daily != null">#{bandwidth95Daily},</if>
|
||||
<if test="bandwidth95Monthly != null">#{bandwidth95Monthly},</if>
|
||||
<if test="avgMonthlyBandwidth95 != null">#{avgMonthlyBandwidth95},</if>
|
||||
<if test="packageBandwidthDaily != null">#{packageBandwidthDaily},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
<if test="serviceNumber != null">#{serviceNumber},</if>
|
||||
<if test="uplinkSwitch != null">#{uplinkSwitch},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="remark1 != null">#{remark1},</if>
|
||||
<if test="interfaceName != null">#{interfaceName},</if>
|
||||
<if test="resourceType != null">#{resourceType},</if>
|
||||
<if test="interfaceLinkDeviceType != null">#{interfaceLinkDeviceType},</if>
|
||||
<if test="effectiveBandwidth95Daily != null">#{effectiveBandwidth95Daily},</if>
|
||||
<if test="effectiveBandwidth95Monthly != null">#{effectiveBandwidth95Monthly},</if>
|
||||
<if test="effectiveAvgMonthlyBandwidth95 != null">#{effectiveAvgMonthlyBandwidth95},</if>
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="businessId != null">#{businessId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsNodeBandwidth" parameterType="EpsNodeBandwidth">
|
||||
update eps_node_bandwidth
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
<if test="hardwareSn != null">hardware_sn = #{hardwareSn},</if>
|
||||
<if test="bandwidthType != null">bandwidth_type = #{bandwidthType},</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result = #{bandwidthResult},</if>
|
||||
<if test="bandwidth95Daily != null">bandwidth_95_daily = #{bandwidth95Daily},</if>
|
||||
<if test="bandwidth95Monthly != null">bandwidth_95_monthly = #{bandwidth95Monthly},</if>
|
||||
<if test="avgMonthlyBandwidth95 != null">avg_monthly_bandwidth_95 = #{avgMonthlyBandwidth95},</if>
|
||||
<if test="packageBandwidthDaily != null">package_bandwidth_daily = #{packageBandwidthDaily},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
<if test="serviceNumber != null">service_number = #{serviceNumber},</if>
|
||||
<if test="uplinkSwitch != null">uplink_switch = #{uplinkSwitch},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="remark1 != null">remark1 = #{remark1},</if>
|
||||
<if test="interfaceName != null">interface_name = #{interfaceName},</if>
|
||||
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
||||
<if test="interfaceLinkDeviceType != null">interface_link_device_type = #{interfaceLinkDeviceType},</if>
|
||||
<if test="effectiveBandwidth95Daily != null">effective_bandwidth_95_daily = #{effectiveBandwidth95Daily},</if>
|
||||
<if test="effectiveBandwidth95Monthly != null">effective_bandwidth_95_monthly = #{effectiveBandwidth95Monthly},</if>
|
||||
<if test="effectiveAvgMonthlyBandwidth95 != null">effective_avg_monthly_bandwidth_95 = #{effectiveAvgMonthlyBandwidth95},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="businessId != null">business_id = #{businessId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsNodeBandwidthById" parameterType="Long">
|
||||
delete from eps_node_bandwidth where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsNodeBandwidthByIds" parameterType="String">
|
||||
delete from eps_node_bandwidth where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="calculateAvg" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
select sum(ifnull(bandwidth_95_daily,0)) bandwidth95Daily,
|
||||
sum(ifnull(effective_bandwidth_95_daily,0)) effectiveBandwidth95Daily
|
||||
from eps_node_bandwidth
|
||||
<where>
|
||||
<if test="createTime != null">
|
||||
and left(create_time,7) = #{createTime}
|
||||
</if>
|
||||
<if test="nodeName != '' and nodeName != null">
|
||||
and node_name = #{nodeName}
|
||||
</if>
|
||||
<if test="businessName != '' and businessName != null">
|
||||
and business_name = #{businessName}
|
||||
</if>
|
||||
<if test="businessId != '' and businessId != null">
|
||||
and business_id = #{businessId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getAvgDetailMsg" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
<include refid="selectEpsNodeBandwidthVo"/>
|
||||
<where>
|
||||
<if test="createTime != null">
|
||||
and left(create_time,7) = left(#{createTime},7)
|
||||
</if>
|
||||
<if test="nodeName != '' and nodeName != null">
|
||||
and node_name = #{nodeName}
|
||||
</if>
|
||||
<if test="businessName != '' and businessName != null">
|
||||
and business_name = #{businessName}
|
||||
</if>
|
||||
<if test="businessId != '' and businessId != null">
|
||||
and business_id = #{businessId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="countByAvgMsg" parameterType="EpsNodeBandwidth">
|
||||
select count(1) from from eps_node_bandwidth
|
||||
<where>
|
||||
<if test="createTime != null">
|
||||
and left(create_time,7) = #{createTime}
|
||||
</if>
|
||||
<if test="nodeName != '' and nodeName != null">
|
||||
and node_name = #{nodeName}
|
||||
</if>
|
||||
<if test="businessName != '' and businessName != null">
|
||||
and business_name = #{businessName}
|
||||
</if>
|
||||
<if test="businessId != '' and businessId != null">
|
||||
and business_id = #{businessId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.EpsServerRevenueConfigMapper">
|
||||
|
||||
<resultMap type="EpsServerRevenueConfig" id="EpsServerRevenueConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
<result property="revenueMethod" column="revenue_method" />
|
||||
<result property="hardwareSn" column="hardware_sn" />
|
||||
<result property="trafficPort" column="traffic_port" />
|
||||
<result property="bandwidth95" column="bandwidth_95" />
|
||||
<result property="packageBandwidth" column="package_bandwidth" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="businessName" column="business_name" />
|
||||
<result property="businessCode" column="business_code" />
|
||||
<result property="registrationStatus" column="registration_status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsServerRevenueConfigVo">
|
||||
select id, node_name, revenue_method, hardware_sn, traffic_port, bandwidth_95, package_bandwidth, update_time, business_name, business_code, registration_status, create_by, update_by, create_time from eps_server_revenue_config
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsServerRevenueConfigList" parameterType="EpsServerRevenueConfig" resultMap="EpsServerRevenueConfigResult">
|
||||
<include refid="selectEpsServerRevenueConfigVo"/>
|
||||
<where>
|
||||
and registration_status = '1'
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="revenueMethod != null and revenueMethod != ''"> and revenue_method = #{revenueMethod}</if>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="trafficPort != null and trafficPort != ''"> and traffic_port = #{trafficPort}</if>
|
||||
<if test="bandwidth95 != null "> and bandwidth_95 = #{bandwidth95}</if>
|
||||
<if test="packageBandwidth != null "> and package_bandwidth = #{packageBandwidth}</if>
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsServerRevenueConfigById" parameterType="Long" resultMap="EpsServerRevenueConfigResult">
|
||||
<include refid="selectEpsServerRevenueConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="countBySn" parameterType="String">
|
||||
select count(1) from eps_server_revenue_config
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsServerRevenueConfig" parameterType="EpsServerRevenueConfig">
|
||||
insert into eps_server_revenue_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="nodeName != null">node_name,</if>
|
||||
<if test="revenueMethod != null">revenue_method,</if>
|
||||
<if test="hardwareSn != null">hardware_sn,</if>
|
||||
<if test="trafficPort != null">traffic_port,</if>
|
||||
<if test="bandwidth95 != null">bandwidth_95,</if>
|
||||
<if test="packageBandwidth != null">package_bandwidth,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="businessCode != null">business_code,</if>
|
||||
<if test="registrationStatus != null">registration_status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
<if test="revenueMethod != null">#{revenueMethod},</if>
|
||||
<if test="hardwareSn != null">#{hardwareSn},</if>
|
||||
<if test="trafficPort != null">#{trafficPort},</if>
|
||||
<if test="bandwidth95 != null">#{bandwidth95},</if>
|
||||
<if test="packageBandwidth != null">#{packageBandwidth},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="businessCode != null">#{businessCode},</if>
|
||||
<if test="registrationStatus != null">#{registrationStatus},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsServerRevenueConfig" parameterType="EpsServerRevenueConfig">
|
||||
update eps_server_revenue_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
<if test="revenueMethod != null">revenue_method = #{revenueMethod},</if>
|
||||
<if test="hardwareSn != null">hardware_sn = #{hardwareSn},</if>
|
||||
<if test="trafficPort != null">traffic_port = #{trafficPort},</if>
|
||||
<if test="bandwidth95 != null">bandwidth_95 = #{bandwidth95},</if>
|
||||
<if test="packageBandwidth != null">package_bandwidth = #{packageBandwidth},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="businessCode != null">business_code = #{businessCode},</if>
|
||||
<if test="registrationStatus != null">registration_status = #{registrationStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsServerRevenueConfigById" parameterType="Long">
|
||||
delete from eps_server_revenue_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsServerRevenueConfigByIds" parameterType="String">
|
||||
delete from eps_server_revenue_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.EpsTrafficDataMapper">
|
||||
|
||||
<resultMap type="EpsTrafficData" id="EpsTrafficDataResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="hardwareSn" column="hardware_sn" />
|
||||
<result property="nodeName" column="node_name" />
|
||||
<result property="revenueMethod" column="revenue_method" />
|
||||
<result property="trafficPort" column="traffic_port" />
|
||||
<result property="txBytes" column="tx_bytes" />
|
||||
<result property="rxBytes" column="rx_bytes" />
|
||||
<result property="packageBandwidth" column="package_bandwidth" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="updaterId" column="updater_id" />
|
||||
<result property="updaterName" column="updater_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsTrafficDataVo">
|
||||
select id, hardware_sn, node_name, revenue_method, traffic_port, tx_bytes, rx_bytes, package_bandwidth, create_time, update_time, creator_id, creator_name, updater_id, updater_name from eps_traffic_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsTrafficDataList" parameterType="EpsTrafficData" resultMap="EpsTrafficDataResult">
|
||||
<include refid="selectEpsTrafficDataVo"/>
|
||||
<where>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="revenueMethod != null and revenueMethod != ''"> and revenue_method = #{revenueMethod}</if>
|
||||
<if test="trafficPort != null and trafficPort != ''"> and traffic_port = #{trafficPort}</if>
|
||||
<if test="txBytes != null "> and tx_bytes = #{txBytes}</if>
|
||||
<if test="rxBytes != null "> and rx_bytes = #{rxBytes}</if>
|
||||
<if test="packageBandwidth != null "> and package_bandwidth = #{packageBandwidth}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsTrafficDataById" parameterType="Long" resultMap="EpsTrafficDataResult">
|
||||
<include refid="selectEpsTrafficDataVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsTrafficData" parameterType="EpsTrafficData" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into eps_traffic_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="hardwareSn != null">hardware_sn,</if>
|
||||
<if test="nodeName != null">node_name,</if>
|
||||
<if test="revenueMethod != null">revenue_method,</if>
|
||||
<if test="trafficPort != null">traffic_port,</if>
|
||||
<if test="txBytes != null">tx_bytes,</if>
|
||||
<if test="rxBytes != null">rx_bytes,</if>
|
||||
<if test="packageBandwidth != null">package_bandwidth,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="updaterName != null">updater_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="hardwareSn != null">#{hardwareSn},</if>
|
||||
<if test="nodeName != null">#{nodeName},</if>
|
||||
<if test="revenueMethod != null">#{revenueMethod},</if>
|
||||
<if test="trafficPort != null">#{trafficPort},</if>
|
||||
<if test="txBytes != null">#{txBytes},</if>
|
||||
<if test="rxBytes != null">#{rxBytes},</if>
|
||||
<if test="packageBandwidth != null">#{packageBandwidth},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="updaterName != null">#{updaterName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsTrafficData" parameterType="EpsTrafficData">
|
||||
update eps_traffic_data
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="hardwareSn != null">hardware_sn = #{hardwareSn},</if>
|
||||
<if test="nodeName != null">node_name = #{nodeName},</if>
|
||||
<if test="revenueMethod != null">revenue_method = #{revenueMethod},</if>
|
||||
<if test="trafficPort != null">traffic_port = #{trafficPort},</if>
|
||||
<if test="txBytes != null">tx_bytes = #{txBytes},</if>
|
||||
<if test="rxBytes != null">rx_bytes = #{rxBytes},</if>
|
||||
<if test="packageBandwidth != null">package_bandwidth = #{packageBandwidth},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsTrafficDataById" parameterType="Long">
|
||||
delete from eps_traffic_data where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsTrafficDataByIds" parameterType="String">
|
||||
delete from eps_traffic_data where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.KnowledgeBaseMapper">
|
||||
|
||||
<resultMap type="KnowledgeBase" id="KnowledgeBaseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="issueType" column="issue_type" />
|
||||
<result property="solution" column="solution" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creatBy" column="creat_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectKnowledgeBaseVo">
|
||||
select id, title, issue_type, solution, create_time, creat_by, update_time, update_by from knowledge_base
|
||||
</sql>
|
||||
|
||||
<select id="selectKnowledgeBaseList" parameterType="KnowledgeBase" resultMap="KnowledgeBaseResult">
|
||||
<include refid="selectKnowledgeBaseVo"/>
|
||||
<where>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="issueType != null and issueType != ''"> and issue_type = #{issueType}</if>
|
||||
<if test="solution != null and solution != ''"> and solution like concat('%', #{solution}, '%')</if>
|
||||
<if test="creatBy != null and creatBy != ''"> and creat_by = #{creatBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectKnowledgeBaseById" parameterType="Long" resultMap="KnowledgeBaseResult">
|
||||
<include refid="selectKnowledgeBaseVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertKnowledgeBase" parameterType="KnowledgeBase" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into knowledge_base
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">title,</if>
|
||||
<if test="issueType != null">issue_type,</if>
|
||||
<if test="solution != null">solution,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="creatBy != null">creat_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="issueType != null">#{issueType},</if>
|
||||
<if test="solution != null">#{solution},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="creatBy != null">#{creatBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateKnowledgeBase" parameterType="KnowledgeBase">
|
||||
update knowledge_base
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="issueType != null">issue_type = #{issueType},</if>
|
||||
<if test="solution != null">solution = #{solution},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="creatBy != null">creat_by = #{creatBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteKnowledgeBaseById" parameterType="Long">
|
||||
delete from knowledge_base where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteKnowledgeBaseByIds" parameterType="String">
|
||||
delete from knowledge_base where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.MtmMonitoringTemplateMapper">
|
||||
|
||||
<resultMap type="MtmMonitoringTemplate" id="MtmMonitoringTemplateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="templateName" column="template_name" />
|
||||
<result property="description" column="description" />
|
||||
<result property="itemType" column="item_type" />
|
||||
<result property="includedResources" column="included_resources" />
|
||||
<result property="discoveryItemType" column="discovery_item_type" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="itemDescription" column="item_description" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="updaterId" column="updater_id" />
|
||||
<result property="updaterName" column="updater_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMtmMonitoringTemplateVo">
|
||||
select id, template_name, description, item_type, included_resources, discovery_item_type, item_name, item_description, create_time, update_time, creator_id, creator_name, updater_id, updater_name from mtm_monitoring_template
|
||||
</sql>
|
||||
|
||||
<select id="selectMtmMonitoringTemplateList" parameterType="MtmMonitoringTemplate" resultMap="MtmMonitoringTemplateResult">
|
||||
<include refid="selectMtmMonitoringTemplateVo"/>
|
||||
<where>
|
||||
<if test="templateName != null and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="itemType != null and itemType != ''"> and item_type = #{itemType}</if>
|
||||
<if test="includedResources != null and includedResources != ''"> and included_resources = #{includedResources}</if>
|
||||
<if test="discoveryItemType != null and discoveryItemType != ''"> and discovery_item_type = #{discoveryItemType}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="itemDescription != null and itemDescription != ''"> and item_description = #{itemDescription}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMtmMonitoringTemplateById" parameterType="Long" resultMap="MtmMonitoringTemplateResult">
|
||||
<include refid="selectMtmMonitoringTemplateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMtmMonitoringTemplate" parameterType="MtmMonitoringTemplate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into mtm_monitoring_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="templateName != null">template_name,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="itemType != null">item_type,</if>
|
||||
<if test="includedResources != null">included_resources,</if>
|
||||
<if test="discoveryItemType != null">discovery_item_type,</if>
|
||||
<if test="itemName != null">item_name,</if>
|
||||
<if test="itemDescription != null">item_description,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="updaterName != null">updater_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="templateName != null">#{templateName},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="itemType != null">#{itemType},</if>
|
||||
<if test="includedResources != null">#{includedResources},</if>
|
||||
<if test="discoveryItemType != null">#{discoveryItemType},</if>
|
||||
<if test="itemName != null">#{itemName},</if>
|
||||
<if test="itemDescription != null">#{itemDescription},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="updaterName != null">#{updaterName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMtmMonitoringTemplate" parameterType="MtmMonitoringTemplate">
|
||||
update mtm_monitoring_template
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="templateName != null">template_name = #{templateName},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="itemType != null">item_type = #{itemType},</if>
|
||||
<if test="includedResources != null">included_resources = #{includedResources},</if>
|
||||
<if test="discoveryItemType != null">discovery_item_type = #{discoveryItemType},</if>
|
||||
<if test="itemName != null">item_name = #{itemName},</if>
|
||||
<if test="itemDescription != null">item_description = #{itemDescription},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMtmMonitoringTemplateById" parameterType="Long">
|
||||
delete from mtm_monitoring_template where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMtmMonitoringTemplateByIds" parameterType="String">
|
||||
delete from mtm_monitoring_template where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.RmEpsTopologyManagementMapper">
|
||||
|
||||
<resultMap type="RmEpsTopologyManagement" id="RmEpsTopologyManagementResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="switchName" column="switch_name" />
|
||||
<result property="switchSn" column="switch_sn" />
|
||||
<result property="interfaceName" column="interface_name" />
|
||||
<result property="connectedDeviceType" column="connected_device_type" />
|
||||
<result property="serverName" column="server_name" />
|
||||
<result property="serverSn" column="server_sn" />
|
||||
<result property="serverPort" column="server_port" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="updaterId" column="updater_id" />
|
||||
<result property="updaterName" column="updater_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmEpsTopologyManagementVo">
|
||||
select id, switch_name, switch_sn, interface_name, connected_device_type, server_name, server_sn, server_port, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_eps_topology_management
|
||||
</sql>
|
||||
|
||||
<select id="selectRmEpsTopologyManagementList" parameterType="RmEpsTopologyManagement" resultMap="RmEpsTopologyManagementResult">
|
||||
<include refid="selectRmEpsTopologyManagementVo"/>
|
||||
<where>
|
||||
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
|
||||
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
||||
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
||||
<if test="connectedDeviceType != null and connectedDeviceType != ''"> and connected_device_type = #{connectedDeviceType}</if>
|
||||
<if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if>
|
||||
<if test="serverSn != null and serverSn != ''"> and server_sn = #{serverSn}</if>
|
||||
<if test="serverPort != null and serverPort != ''"> and server_port = #{serverPort}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRmEpsTopologyManagementById" parameterType="Long" resultMap="RmEpsTopologyManagementResult">
|
||||
<include refid="selectRmEpsTopologyManagementVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmEpsTopologyManagement" parameterType="RmEpsTopologyManagement" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_eps_topology_management
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="switchName != null">switch_name,</if>
|
||||
<if test="switchSn != null">switch_sn,</if>
|
||||
<if test="interfaceName != null">interface_name,</if>
|
||||
<if test="connectedDeviceType != null">connected_device_type,</if>
|
||||
<if test="serverName != null">server_name,</if>
|
||||
<if test="serverSn != null">server_sn,</if>
|
||||
<if test="serverPort != null">server_port,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="updaterName != null">updater_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="switchName != null">#{switchName},</if>
|
||||
<if test="switchSn != null">#{switchSn},</if>
|
||||
<if test="interfaceName != null">#{interfaceName},</if>
|
||||
<if test="connectedDeviceType != null">#{connectedDeviceType},</if>
|
||||
<if test="serverName != null">#{serverName},</if>
|
||||
<if test="serverSn != null">#{serverSn},</if>
|
||||
<if test="serverPort != null">#{serverPort},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="updaterName != null">#{updaterName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmEpsTopologyManagement" parameterType="RmEpsTopologyManagement">
|
||||
update rm_eps_topology_management
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="switchName != null">switch_name = #{switchName},</if>
|
||||
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
||||
<if test="interfaceName != null">interface_name = #{interfaceName},</if>
|
||||
<if test="connectedDeviceType != null">connected_device_type = #{connectedDeviceType},</if>
|
||||
<if test="serverName != null">server_name = #{serverName},</if>
|
||||
<if test="serverSn != null">server_sn = #{serverSn},</if>
|
||||
<if test="serverPort != null">server_port = #{serverPort},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRmEpsTopologyManagementById" parameterType="Long">
|
||||
delete from rm_eps_topology_management where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmEpsTopologyManagementByIds" parameterType="String">
|
||||
delete from rm_eps_topology_management where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.RmResourceGroupMapper">
|
||||
|
||||
<resultMap type="RmResourceGroup" id="RmResourceGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
<result property="description" column="description" />
|
||||
<result property="includedDevices" column="included_devices" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="updaterId" column="updater_id" />
|
||||
<result property="updaterName" column="updater_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmResourceGroupVo">
|
||||
select id, group_name, description, included_devices, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_resource_group
|
||||
</sql>
|
||||
|
||||
<select id="selectRmResourceGroupList" parameterType="RmResourceGroup" resultMap="RmResourceGroupResult">
|
||||
<include refid="selectRmResourceGroupVo"/>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="includedDevices != null and includedDevices != ''"> and included_devices = #{includedDevices}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRmResourceGroupById" parameterType="Long" resultMap="RmResourceGroupResult">
|
||||
<include refid="selectRmResourceGroupVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmResourceGroup" parameterType="RmResourceGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_resource_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="groupName != null">group_name,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="includedDevices != null">included_devices,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="updaterName != null">updater_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="groupName != null">#{groupName},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="includedDevices != null">#{includedDevices},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="updaterName != null">#{updaterName},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmResourceGroup" parameterType="RmResourceGroup">
|
||||
update rm_resource_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="groupName != null">group_name = #{groupName},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="includedDevices != null">included_devices = #{includedDevices},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRmResourceGroupById" parameterType="Long">
|
||||
delete from rm_resource_group where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmResourceGroupByIds" parameterType="String">
|
||||
delete from rm_resource_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -11,11 +11,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="resourceName" column="resource_name" />
|
||||
<result property="ipAddress" column="ip_address" />
|
||||
<result property="resourcePort" column="resource_port" />
|
||||
<result property="otherPortName" column="other_port_name" />
|
||||
<result property="protocol" column="protocol" />
|
||||
<result property="resourceVersion" column="resource_version" />
|
||||
<result property="rwPermission" column="rw_permission" />
|
||||
<result property="securityLevel" column="security_level" />
|
||||
<result property="encryption" column="encryption" />
|
||||
<result property="resourceUserName" column="resource_user_name" />
|
||||
<result property="resourcePwd" column="resource_pwd" />
|
||||
<result property="registrationStatus" column="registration_status" />
|
||||
<result property="onlineStatus" column="online_status" />
|
||||
@@ -32,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmResourceRegistrationVo">
|
||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, protocol, resource_version, rw_permission, security_level, encryption, resource_pwd, registration_status, online_status, description, customer_id, customer_name, service_number, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_resource_registration
|
||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, other_port_name, protocol, resource_version, rw_permission, security_level, encryption, resource_user_name,resource_pwd, registration_status, online_status, description, customer_id, customer_name, service_number, create_time, update_time, creator_id, creator_name, updater_id, updater_name from rm_resource_registration
|
||||
</sql>
|
||||
|
||||
<select id="selectRmResourceRegistrationList" parameterType="RmResourceRegistration" resultMap="RmResourceRegistrationResult">
|
||||
@@ -43,11 +45,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
|
||||
<if test="resourcePort != null and resourcePort != ''"> and resource_port = #{resourcePort}</if>
|
||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name = #{otherPortName}</if>
|
||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
||||
<if test="resourceVersion != null and resourceVersion != ''"> and resource_version = #{resourceVersion}</if>
|
||||
<if test="rwPermission != null and rwPermission != ''"> and rw_permission = #{rwPermission}</if>
|
||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
||||
<if test="encryption != null and encryption != ''"> and encryption = #{encryption}</if>
|
||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name = #{resourceUserName}</if>
|
||||
<if test="resourcePwd != null and resourcePwd != ''"> and resource_pwd = #{resourcePwd}</if>
|
||||
<if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||
@@ -66,6 +70,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectRmResourceRegistrationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="countBySn" parameterType="String">
|
||||
select count(1) from rm_resource_registration
|
||||
where hardware_sn = #{hardwareSn}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmResourceRegistration" parameterType="RmResourceRegistration" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rm_resource_registration
|
||||
@@ -75,11 +83,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null">resource_name,</if>
|
||||
<if test="ipAddress != null">ip_address,</if>
|
||||
<if test="resourcePort != null">resource_port,</if>
|
||||
<if test="otherPortName != null">other_port_name,</if>
|
||||
<if test="protocol != null">protocol,</if>
|
||||
<if test="resourceVersion != null">resource_version,</if>
|
||||
<if test="rwPermission != null">rw_permission,</if>
|
||||
<if test="securityLevel != null">security_level,</if>
|
||||
<if test="encryption != null">encryption,</if>
|
||||
<if test="resourceUserName != null">resource_user_name,</if>
|
||||
<if test="resourcePwd != null">resource_pwd,</if>
|
||||
<if test="registrationStatus != null">registration_status,</if>
|
||||
<if test="onlineStatus != null">online_status,</if>
|
||||
@@ -100,11 +110,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null">#{resourceName},</if>
|
||||
<if test="ipAddress != null">#{ipAddress},</if>
|
||||
<if test="resourcePort != null">#{resourcePort},</if>
|
||||
<if test="otherPortName != null">#{otherPortName},</if>
|
||||
<if test="protocol != null">#{protocol},</if>
|
||||
<if test="resourceVersion != null">#{resourceVersion},</if>
|
||||
<if test="rwPermission != null">#{rwPermission},</if>
|
||||
<if test="securityLevel != null">#{securityLevel},</if>
|
||||
<if test="encryption != null">#{encryption},</if>
|
||||
<if test="resourceUserName != null">#{resourceUserName},</if>
|
||||
<if test="resourcePwd != null">#{resourcePwd},</if>
|
||||
<if test="registrationStatus != null">#{registrationStatus},</if>
|
||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
||||
@@ -129,11 +141,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="resourceName != null">resource_name = #{resourceName},</if>
|
||||
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
|
||||
<if test="resourcePort != null">resource_port = #{resourcePort},</if>
|
||||
<if test="otherPortName != null">other_port_name = #{otherPortName},</if>
|
||||
<if test="protocol != null">protocol = #{protocol},</if>
|
||||
<if test="resourceVersion != null">resource_version = #{resourceVersion},</if>
|
||||
<if test="rwPermission != null">rw_permission = #{rwPermission},</if>
|
||||
<if test="securityLevel != null">security_level = #{securityLevel},</if>
|
||||
<if test="encryption != null">encryption = #{encryption},</if>
|
||||
<if test="resourceUserName != null">resource_user_name = #{resourceUserName},</if>
|
||||
<if test="resourcePwd != null">resource_pwd = #{resourcePwd},</if>
|
||||
<if test="registrationStatus != null">registration_status = #{registrationStatus},</if>
|
||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
||||
@@ -161,4 +175,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<!-- 查询所有资源名称(包含设备使用)-->
|
||||
<select id="selectAllResourceName" resultType="java.util.Map">
|
||||
select resource_name resourceName from rm_resource_registration
|
||||
<where>
|
||||
and registration_status = 1
|
||||
</where>
|
||||
group by resource_name
|
||||
</select>
|
||||
<!-- 查询所有资源名称-->
|
||||
<select id="selectAllResourceNameByType" parameterType="RmResourceRegistration" resultType="java.util.Map">
|
||||
select resource_name resourceName from rm_resource_registration
|
||||
<where>
|
||||
and registration_status = 1
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
|
||||
<if test="resourcePort != null and resourcePort != ''"> and resource_port = #{resourcePort}</if>
|
||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name = #{otherPortName}</if>
|
||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
||||
<if test="resourceVersion != null and resourceVersion != ''"> and resource_version = #{resourceVersion}</if>
|
||||
<if test="rwPermission != null and rwPermission != ''"> and rw_permission = #{rwPermission}</if>
|
||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
||||
<if test="encryption != null and encryption != ''"> and encryption = #{encryption}</if>
|
||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name = #{resourceUserName}</if>
|
||||
<if test="resourcePwd != null and resourcePwd != ''"> and resource_pwd = #{resourcePwd}</if>
|
||||
<if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="customerId != null "> and customer_id = #{customerId}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="serviceNumber != null and serviceNumber != ''"> and service_number = #{serviceNumber}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
</where>
|
||||
group by resource_name
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user