业务脚本管理、业务下发管理、相关数据分页优化
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.system;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum ReviewEnum {
|
||||
未提交(0),
|
||||
待审核(1),
|
||||
通过(2),
|
||||
驳回(3);
|
||||
private Integer code;
|
||||
ReviewEnum(Integer code){
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.EpsBusinessDeploy;
|
||||
import com.ruoyi.system.service.IEpsBusinessDeployService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务下发管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/businessDeploy")
|
||||
public class EpsBusinessDeployController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsBusinessDeployService epsBusinessDeployService;
|
||||
|
||||
/**
|
||||
* 查询业务下发管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:businessDeploy:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsBusinessDeploy epsBusinessDeploy)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsBusinessDeploy.getPageNum());
|
||||
pageDomain.setPageSize(epsBusinessDeploy.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsBusinessDeploy> list = epsBusinessDeployService.selectEpsBusinessDeployList(epsBusinessDeploy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取业务下发管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:businessDeploy:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsBusinessDeployService.selectEpsBusinessDeployById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务下发管理
|
||||
*/
|
||||
@RequiresPermissions("system:businessDeploy:add")
|
||||
@Log(title = "业务下发管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsBusinessDeploy epsBusinessDeploy)
|
||||
{
|
||||
return toAjax(epsBusinessDeployService.insertEpsBusinessDeploy(epsBusinessDeploy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务下发管理
|
||||
*/
|
||||
@RequiresPermissions("system:businessDeploy:edit")
|
||||
@Log(title = "业务下发管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsBusinessDeploy epsBusinessDeploy)
|
||||
{
|
||||
return toAjax(epsBusinessDeployService.updateEpsBusinessDeploy(epsBusinessDeploy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务下发管理
|
||||
*/
|
||||
@RequiresPermissions("system:businessDeploy:remove")
|
||||
@Log(title = "业务下发管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(epsBusinessDeployService.deleteEpsBusinessDeployByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* @param epsBusinessDeploy
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("system:businessDeploy:review")
|
||||
@PostMapping("/reviewBusiness")
|
||||
public AjaxResult reviewBusiness(@RequestBody EpsBusinessDeploy epsBusinessDeploy){
|
||||
return toAjax(epsBusinessDeployService.reviewBusiness(epsBusinessDeploy));
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.system.controller;
|
||||
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.EpsBusinessScript;
|
||||
import com.ruoyi.system.service.IEpsBusinessScriptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务脚本管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/businessScript")
|
||||
public class EpsBusinessScriptController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEpsBusinessScriptService epsBusinessScriptService;
|
||||
|
||||
/**
|
||||
* 查询业务脚本管理列表
|
||||
*/
|
||||
@RequiresPermissions("system:businessScript:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody EpsBusinessScript epsBusinessScript)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsBusinessScript.getPageNum());
|
||||
pageDomain.setPageSize(epsBusinessScript.getPageSize());
|
||||
startPage(pageDomain);
|
||||
List<EpsBusinessScript> list = epsBusinessScriptService.selectEpsBusinessScriptList(epsBusinessScript);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取业务脚本管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("system:businessScript:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(epsBusinessScriptService.selectEpsBusinessScriptById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务脚本管理
|
||||
*/
|
||||
@RequiresPermissions("system:businessScript:add")
|
||||
@Log(title = "业务脚本管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EpsBusinessScript epsBusinessScript)
|
||||
{
|
||||
return toAjax(epsBusinessScriptService.insertEpsBusinessScript(epsBusinessScript));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务脚本管理
|
||||
*/
|
||||
@RequiresPermissions("system:businessScript:edit")
|
||||
@Log(title = "业务脚本管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EpsBusinessScript epsBusinessScript)
|
||||
{
|
||||
return toAjax(epsBusinessScriptService.updateEpsBusinessScript(epsBusinessScript));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务脚本管理
|
||||
*/
|
||||
@RequiresPermissions("system:businessScript:remove")
|
||||
@Log(title = "业务脚本管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(epsBusinessScriptService.deleteEpsBusinessScriptByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有业务脚本名称
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("system:businessScript:list")
|
||||
@GetMapping("/getAllScriptName")
|
||||
public AjaxResult getAllScriptName(){
|
||||
List<EpsBusinessScript> list = epsBusinessScriptService.selectEpsBusinessScriptList(new EpsBusinessScript());
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
+2
-5
@@ -154,16 +154,13 @@ public class EpsNodeBandwidthController extends BaseController
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 相关数据
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "relatedData/traffic")
|
||||
/**
|
||||
* 根据ID获取相关数据
|
||||
* @param id 资源ID
|
||||
* @return 表格数据信息
|
||||
*/
|
||||
@RequiresPermissions("system:bandwidth:query")
|
||||
@GetMapping(value = "relatedData/traffic")
|
||||
public TableDataInfo relatedData(Long id,Integer pageNum,Integer pageSize) {
|
||||
// 1. 参数校验
|
||||
if (id == null || id <= 0) {
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
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 lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 业务下发管理对象 eps_business_deploy
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
public class EpsBusinessDeploy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 任务名称 */
|
||||
@Excel(name = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
/** 业务code */
|
||||
@Excel(name = "业务code")
|
||||
private String businessCode;
|
||||
|
||||
/** 业务名称 */
|
||||
@Excel(name = "业务名称")
|
||||
private String businessName;
|
||||
|
||||
/** 脚本名称 */
|
||||
@Excel(name = "脚本名称")
|
||||
private String scriptName;
|
||||
|
||||
/** 脚本文件地址 */
|
||||
@Excel(name = "脚本文件地址")
|
||||
private String scriptPath;
|
||||
|
||||
/** 脚本参数 */
|
||||
@Excel(name = "脚本参数")
|
||||
private String scriptParams;
|
||||
|
||||
/** 部署设备 */
|
||||
@Excel(name = "部署设备")
|
||||
private String deployDevice;
|
||||
|
||||
/** 提交人 */
|
||||
@Excel(name = "提交人")
|
||||
private String submitBy;
|
||||
|
||||
/** 审核人 */
|
||||
@Excel(name = "审核人")
|
||||
private String reviewBy;
|
||||
|
||||
/** 审核状态(0-未提交,1-待审核,2-审核通过,3-审核驳回) */
|
||||
@Excel(name = "审核状态")
|
||||
private String reviewStatus;
|
||||
|
||||
/** 审核时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date reviewTime;
|
||||
|
||||
/** 审核意见 */
|
||||
@Excel(name = "审核意见")
|
||||
private String reviewComment;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 业务脚本管理对象 eps_business_script
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Data
|
||||
public class EpsBusinessScript extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 脚本名称 */
|
||||
@Excel(name = "脚本名称")
|
||||
private String scriptName;
|
||||
|
||||
/** 脚本文件地址 */
|
||||
@Excel(name = "脚本文件地址")
|
||||
private String scriptPath;
|
||||
|
||||
/** 脚本默认参数 */
|
||||
@Excel(name = "脚本默认参数")
|
||||
private String defaultParams;
|
||||
}
|
||||
+43
@@ -129,5 +129,48 @@ public class RmResourceRegistration extends BaseEntity
|
||||
private String discoveryRules;
|
||||
/** 查询名称 */
|
||||
private String queryName;
|
||||
/**
|
||||
* 客户端ID
|
||||
*/
|
||||
private String clientId;
|
||||
|
||||
/**
|
||||
* 运营商
|
||||
*/
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 省
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 公网IP
|
||||
*/
|
||||
private String publicIp;
|
||||
|
||||
/**
|
||||
* 业务名称
|
||||
*/
|
||||
private String businessName;
|
||||
|
||||
/**
|
||||
* 逻辑节点标识
|
||||
*/
|
||||
private String logicalNodeId;
|
||||
|
||||
/**
|
||||
* 多公网IP状态
|
||||
*/
|
||||
private String multiPublicIpStatus;
|
||||
|
||||
/**
|
||||
* 心跳次数
|
||||
*/
|
||||
private Integer heartbeatCount;
|
||||
|
||||
/**
|
||||
* 心跳周期(单位:秒)
|
||||
*/
|
||||
private Integer heartbeatInterval;
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsBusinessDeploy;
|
||||
|
||||
/**
|
||||
* 业务下发管理Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface EpsBusinessDeployMapper
|
||||
{
|
||||
/**
|
||||
* 查询业务下发管理
|
||||
*
|
||||
* @param id 业务下发管理主键
|
||||
* @return 业务下发管理
|
||||
*/
|
||||
public EpsBusinessDeploy selectEpsBusinessDeployById(Long id);
|
||||
|
||||
/**
|
||||
* 查询业务下发管理列表
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 业务下发管理集合
|
||||
*/
|
||||
public List<EpsBusinessDeploy> selectEpsBusinessDeployList(EpsBusinessDeploy epsBusinessDeploy);
|
||||
|
||||
/**
|
||||
* 新增业务下发管理
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusinessDeploy(EpsBusinessDeploy epsBusinessDeploy);
|
||||
|
||||
/**
|
||||
* 修改业务下发管理
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusinessDeploy(EpsBusinessDeploy epsBusinessDeploy);
|
||||
|
||||
/**
|
||||
* 删除业务下发管理
|
||||
*
|
||||
* @param id 业务下发管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessDeployById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除业务下发管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessDeployByIds(Long[] ids);
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.EpsBusinessScript;
|
||||
|
||||
/**
|
||||
* 业务脚本管理Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface EpsBusinessScriptMapper
|
||||
{
|
||||
/**
|
||||
* 查询业务脚本管理
|
||||
*
|
||||
* @param id 业务脚本管理主键
|
||||
* @return 业务脚本管理
|
||||
*/
|
||||
public EpsBusinessScript selectEpsBusinessScriptById(Long id);
|
||||
|
||||
/**
|
||||
* 查询业务脚本管理列表
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 业务脚本管理集合
|
||||
*/
|
||||
public List<EpsBusinessScript> selectEpsBusinessScriptList(EpsBusinessScript epsBusinessScript);
|
||||
|
||||
/**
|
||||
* 新增业务脚本管理
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusinessScript(EpsBusinessScript epsBusinessScript);
|
||||
|
||||
/**
|
||||
* 修改业务脚本管理
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusinessScript(EpsBusinessScript epsBusinessScript);
|
||||
|
||||
/**
|
||||
* 删除业务脚本管理
|
||||
*
|
||||
* @param id 业务脚本管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessScriptById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除业务脚本管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessScriptByIds(Long[] ids);
|
||||
}
|
||||
+7
@@ -86,4 +86,11 @@ public interface RmResourceRegistrationMapper
|
||||
Integer updateStatusByResource(RmResourceRegistration rmResourceRegistration);
|
||||
|
||||
List<RmResourceRegistration> getRegistrationByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 根据clientId获取注册信息
|
||||
* @param rmResourceRegistration
|
||||
* @return
|
||||
*/
|
||||
RmResourceRegistration selectRegistMsgByClientId(RmResourceRegistration rmResourceRegistration);
|
||||
}
|
||||
|
||||
+2
-1
@@ -36,7 +36,8 @@ public interface EpsInitialTrafficDataService {
|
||||
* @return 流量数据列表
|
||||
*/
|
||||
List<EpsInitialTrafficData> query(EpsInitialTrafficData queryParam);
|
||||
/**
|
||||
|
||||
/**
|
||||
* 查询初始流量信息
|
||||
* @param queryParam 查询参数实体
|
||||
* @return 初始流量数据列表
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsBusinessDeploy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务下发管理Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface IEpsBusinessDeployService
|
||||
{
|
||||
/**
|
||||
* 查询业务下发管理
|
||||
*
|
||||
* @param id 业务下发管理主键
|
||||
* @return 业务下发管理
|
||||
*/
|
||||
public EpsBusinessDeploy selectEpsBusinessDeployById(Long id);
|
||||
|
||||
/**
|
||||
* 查询业务下发管理列表
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 业务下发管理集合
|
||||
*/
|
||||
public List<EpsBusinessDeploy> selectEpsBusinessDeployList(EpsBusinessDeploy epsBusinessDeploy);
|
||||
|
||||
/**
|
||||
* 新增业务下发管理
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusinessDeploy(EpsBusinessDeploy epsBusinessDeploy);
|
||||
|
||||
/**
|
||||
* 修改业务下发管理
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusinessDeploy(EpsBusinessDeploy epsBusinessDeploy);
|
||||
|
||||
/**
|
||||
* 批量删除业务下发管理
|
||||
*
|
||||
* @param ids 需要删除的业务下发管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessDeployByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除业务下发管理信息
|
||||
*
|
||||
* @param id 业务下发管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessDeployById(Long id);
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* @param epsBusinessDeploy
|
||||
* @return
|
||||
*/
|
||||
int reviewBusiness(EpsBusinessDeploy epsBusinessDeploy);
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.EpsBusinessScript;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务脚本管理Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
public interface IEpsBusinessScriptService
|
||||
{
|
||||
/**
|
||||
* 查询业务脚本管理
|
||||
*
|
||||
* @param id 业务脚本管理主键
|
||||
* @return 业务脚本管理
|
||||
*/
|
||||
public EpsBusinessScript selectEpsBusinessScriptById(Long id);
|
||||
|
||||
/**
|
||||
* 查询业务脚本管理列表
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 业务脚本管理集合
|
||||
*/
|
||||
public List<EpsBusinessScript> selectEpsBusinessScriptList(EpsBusinessScript epsBusinessScript);
|
||||
|
||||
/**
|
||||
* 新增业务脚本管理
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEpsBusinessScript(EpsBusinessScript epsBusinessScript);
|
||||
|
||||
/**
|
||||
* 修改业务脚本管理
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEpsBusinessScript(EpsBusinessScript epsBusinessScript);
|
||||
|
||||
/**
|
||||
* 批量删除业务脚本管理
|
||||
*
|
||||
* @param ids 需要删除的业务脚本管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessScriptByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除业务脚本管理信息
|
||||
*
|
||||
* @param id 业务脚本管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEpsBusinessScriptById(Long id);
|
||||
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.domain.EpsBusinessDeploy;
|
||||
import com.ruoyi.system.domain.RmResourceRegistration;
|
||||
import com.ruoyi.system.mapper.EpsBusinessDeployMapper;
|
||||
import com.ruoyi.system.mapper.RmResourceRegistrationMapper;
|
||||
import com.ruoyi.system.service.IEpsBusinessDeployService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务下发管理Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Service
|
||||
public class EpsBusinessDeployServiceImpl implements IEpsBusinessDeployService
|
||||
{
|
||||
@Autowired
|
||||
private EpsBusinessDeployMapper epsBusinessDeployMapper;
|
||||
@Autowired
|
||||
private RmResourceRegistrationMapper rmResourceRegistrationMapper;
|
||||
|
||||
/**
|
||||
* 查询业务下发管理
|
||||
*
|
||||
* @param id 业务下发管理主键
|
||||
* @return 业务下发管理
|
||||
*/
|
||||
@Override
|
||||
public EpsBusinessDeploy selectEpsBusinessDeployById(Long id)
|
||||
{
|
||||
EpsBusinessDeploy detailMsg = epsBusinessDeployMapper.selectEpsBusinessDeployById(id);
|
||||
String[] clientIds = detailMsg.getDeployDevice().split("\n");
|
||||
|
||||
// 创建一个列表来存储处理后的clientId信息
|
||||
List<String> processedClientIds = new ArrayList<>();
|
||||
|
||||
// 根据clientId获取服务器公网ip
|
||||
for (String clientId : clientIds) {
|
||||
if (StringUtils.isNotBlank(clientId)) {
|
||||
RmResourceRegistration rmResourceRegistration = new RmResourceRegistration();
|
||||
rmResourceRegistration.setClientId(clientId.trim()); // 使用clientId字段查询
|
||||
|
||||
// 根据clientId查询注册信息
|
||||
RmResourceRegistration publicIpVo = rmResourceRegistrationMapper.selectRegistMsgByClientId(rmResourceRegistration);
|
||||
|
||||
String processedClientId;
|
||||
if (publicIpVo != null && StringUtils.isNotBlank(publicIpVo.getPublicIp())) {
|
||||
// 如果有公网IP,格式为:公网IP + 空格 + 原clientId
|
||||
processedClientId = publicIpVo.getPublicIp() + " " + clientId.trim();
|
||||
} else {
|
||||
// 如果没有公网IP,保持原样
|
||||
processedClientId = clientId.trim();
|
||||
}
|
||||
processedClientIds.add(processedClientId);
|
||||
}
|
||||
}
|
||||
|
||||
// 将处理后的结果重新设置回detailMsg
|
||||
if (detailMsg != null) {
|
||||
// 如果需要修改原对象的deployDevice字段
|
||||
String processedDeployDevice = String.join("\n", processedClientIds);
|
||||
detailMsg.setDeployDevice(processedDeployDevice);
|
||||
}
|
||||
|
||||
return detailMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务下发管理列表
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 业务下发管理
|
||||
*/
|
||||
@Override
|
||||
public List<EpsBusinessDeploy> selectEpsBusinessDeployList(EpsBusinessDeploy epsBusinessDeploy)
|
||||
{
|
||||
return epsBusinessDeployMapper.selectEpsBusinessDeployList(epsBusinessDeploy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务下发管理
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsBusinessDeploy(EpsBusinessDeploy epsBusinessDeploy)
|
||||
{
|
||||
epsBusinessDeploy.setCreateTime(DateUtils.getNowDate());
|
||||
epsBusinessDeploy.setSubmitBy(SecurityUtils.getUsername());
|
||||
return epsBusinessDeployMapper.insertEpsBusinessDeploy(epsBusinessDeploy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务下发管理
|
||||
*
|
||||
* @param epsBusinessDeploy 业务下发管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsBusinessDeploy(EpsBusinessDeploy epsBusinessDeploy)
|
||||
{
|
||||
epsBusinessDeploy.setUpdateTime(DateUtils.getNowDate());
|
||||
return epsBusinessDeployMapper.updateEpsBusinessDeploy(epsBusinessDeploy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务下发管理
|
||||
*
|
||||
* @param ids 需要删除的业务下发管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessDeployByIds(Long[] ids)
|
||||
{
|
||||
return epsBusinessDeployMapper.deleteEpsBusinessDeployByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务下发管理信息
|
||||
*
|
||||
* @param id 业务下发管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessDeployById(Long id)
|
||||
{
|
||||
return epsBusinessDeployMapper.deleteEpsBusinessDeployById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* @param epsBusinessDeploy
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int reviewBusiness(EpsBusinessDeploy epsBusinessDeploy) {
|
||||
// 设置审核信息
|
||||
epsBusinessDeploy.setReviewBy(SecurityUtils.getUsername());
|
||||
epsBusinessDeploy.setReviewTime(DateUtils.getNowDate());
|
||||
return epsBusinessDeployMapper.updateEpsBusinessDeploy(epsBusinessDeploy);
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
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.EpsBusinessScript;
|
||||
import com.ruoyi.system.mapper.EpsBusinessScriptMapper;
|
||||
import com.ruoyi.system.service.IEpsBusinessScriptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 业务脚本管理Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-13
|
||||
*/
|
||||
@Service
|
||||
public class EpsBusinessScriptServiceImpl implements IEpsBusinessScriptService
|
||||
{
|
||||
@Autowired
|
||||
private EpsBusinessScriptMapper epsBusinessScriptMapper;
|
||||
|
||||
/**
|
||||
* 查询业务脚本管理
|
||||
*
|
||||
* @param id 业务脚本管理主键
|
||||
* @return 业务脚本管理
|
||||
*/
|
||||
@Override
|
||||
public EpsBusinessScript selectEpsBusinessScriptById(Long id)
|
||||
{
|
||||
return epsBusinessScriptMapper.selectEpsBusinessScriptById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务脚本管理列表
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 业务脚本管理
|
||||
*/
|
||||
@Override
|
||||
public List<EpsBusinessScript> selectEpsBusinessScriptList(EpsBusinessScript epsBusinessScript)
|
||||
{
|
||||
return epsBusinessScriptMapper.selectEpsBusinessScriptList(epsBusinessScript);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增业务脚本管理
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEpsBusinessScript(EpsBusinessScript epsBusinessScript)
|
||||
{
|
||||
epsBusinessScript.setCreateTime(DateUtils.getNowDate());
|
||||
epsBusinessScript.setCreateBy(SecurityUtils.getUsername());
|
||||
return epsBusinessScriptMapper.insertEpsBusinessScript(epsBusinessScript);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改业务脚本管理
|
||||
*
|
||||
* @param epsBusinessScript 业务脚本管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEpsBusinessScript(EpsBusinessScript epsBusinessScript)
|
||||
{
|
||||
epsBusinessScript.setUpdateTime(DateUtils.getNowDate());
|
||||
return epsBusinessScriptMapper.updateEpsBusinessScript(epsBusinessScript);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除业务脚本管理
|
||||
*
|
||||
* @param ids 需要删除的业务脚本管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessScriptByIds(Long[] ids)
|
||||
{
|
||||
return epsBusinessScriptMapper.deleteEpsBusinessScriptByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除业务脚本管理信息
|
||||
*
|
||||
* @param id 业务脚本管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEpsBusinessScriptById(Long id)
|
||||
{
|
||||
return epsBusinessScriptMapper.deleteEpsBusinessScriptById(id);
|
||||
}
|
||||
}
|
||||
+1
@@ -193,6 +193,7 @@ public class EpsInitialTrafficDataServiceImpl implements EpsInitialTrafficDataSe
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EpsInitialTrafficData> getAllTraficMsg(EpsInitialTrafficData queryParam) {
|
||||
|
||||
|
||||
+22
-10
@@ -71,19 +71,31 @@ public class EpsNodeBandwidthServiceImpl implements IEpsNodeBandwidthService
|
||||
queryParams.setStartTime(dailyStartTime);
|
||||
queryParams.setEndTime(dailyEndTime);
|
||||
// 获取总数
|
||||
List<EpsInitialTrafficData> totalList = epsInitialTrafficDataService.query(queryParams);
|
||||
// List<EpsInitialTrafficData> totalList = epsInitialTrafficDataService.query(queryParams);
|
||||
// 4. 设置分页参数
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(epsNodeBandwidth.getPageNum());
|
||||
pageDomain.setPageSize(epsNodeBandwidth.getPageSize());
|
||||
startPage(pageDomain);
|
||||
// PageDomain pageDomain = new PageDomain();
|
||||
// pageDomain.setPageNum(epsNodeBandwidth.getPageNum());
|
||||
// pageDomain.setPageSize(epsNodeBandwidth.getPageSize());
|
||||
// startPage(pageDomain);
|
||||
List<EpsInitialTrafficData> resultList = epsInitialTrafficDataService.query(queryParams);
|
||||
int pageNum = epsNodeBandwidth.getPageNum();
|
||||
int pageSize = epsNodeBandwidth.getPageSize();
|
||||
int startIndex = (pageNum - 1) * pageSize;
|
||||
int endIndex = Math.min(startIndex + pageSize, resultList.size());
|
||||
List<EpsInitialTrafficData> pageData;
|
||||
// 如果startIndex超出范围,返回空列表
|
||||
if (startIndex >= resultList.size()) {
|
||||
pageData = new ArrayList<>();
|
||||
} else {
|
||||
// 截取当前分页的数据
|
||||
pageData = resultList.subList(startIndex, endIndex);
|
||||
}
|
||||
PageInfo<EpsInitialTrafficData> pageInfo = new PageInfo<>();
|
||||
pageInfo.setList(resultList);
|
||||
pageInfo.setTotal(totalList.size());
|
||||
pageInfo.setPageNum(pageDomain.getPageNum());
|
||||
pageInfo.setPageSize(pageDomain.getPageSize());
|
||||
pageInfo.setPages((int) Math.ceil((double) totalList.size() / pageDomain.getPageSize()));
|
||||
pageInfo.setList(pageData);
|
||||
pageInfo.setTotal(resultList.size());
|
||||
pageInfo.setPageNum(epsNodeBandwidth.getPageNum());
|
||||
pageInfo.setPageSize(epsNodeBandwidth.getPageSize());
|
||||
pageInfo.setPages((int) Math.ceil((double) resultList.size() / epsNodeBandwidth.getPageSize()));
|
||||
return pageInfo;
|
||||
}
|
||||
/**
|
||||
|
||||
+2
-2
@@ -382,12 +382,12 @@ public class InitialSwitchInfoDetailsServiceImpl implements IInitialSwitchInfoDe
|
||||
switchInfoDetails.setStartTime(dailyStartTime);
|
||||
switchInfoDetails.setEndTime(dailyEndTime);
|
||||
switchInfoDetails.setSwitchSn(epsNodeBandwidth.getSwitchSn());
|
||||
switchInfoDetails.setSwitchName(epsNodeBandwidth.getUplinkSwitch());
|
||||
// switchInfoDetails.setSwitchName(epsNodeBandwidth.getUplinkSwitch());
|
||||
switchInfoDetails.setServerSn(epsNodeBandwidth.getHardwareSn());
|
||||
switchInfoDetails.setInterfaceDeviceType(epsNodeBandwidth.getInterfaceLinkDeviceType());
|
||||
switchInfoDetails.setName(epsNodeBandwidth.getInterfaceName());
|
||||
switchInfoDetails.setBusinessCode(epsNodeBandwidth.getBusinessId());
|
||||
switchInfoDetails.setBusinessName(epsNodeBandwidth.getBusinessName());
|
||||
// switchInfoDetails.setBusinessName(epsNodeBandwidth.getBusinessName());
|
||||
List<InitialSwitchInfoDetails> dataList = initialSwitchInfoDetailsMapper
|
||||
.selectInitialSwitchInfoDetailsList(switchInfoDetails);
|
||||
return dataList;
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
<?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.EpsBusinessDeployMapper">
|
||||
|
||||
<resultMap type="EpsBusinessDeploy" id="EpsBusinessDeployResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="taskName" column="task_name" />
|
||||
<result property="businessCode" column="business_code" />
|
||||
<result property="businessName" column="business_name" />
|
||||
<result property="scriptName" column="script_name" />
|
||||
<result property="scriptPath" column="script_path" />
|
||||
<result property="scriptParams" column="script_params" />
|
||||
<result property="deployDevice" column="deploy_device" />
|
||||
<result property="submitBy" column="submit_by" />
|
||||
<result property="reviewBy" column="review_by" />
|
||||
<result property="reviewStatus" column="review_status" />
|
||||
<result property="reviewTime" column="review_time" />
|
||||
<result property="reviewComment" column="review_comment" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsBusinessDeployVo">
|
||||
select id, task_name, business_code, business_name, script_name, script_path, script_params, deploy_device, submit_by, review_by, review_status, review_time, review_comment, create_time, update_time, create_by, update_by from eps_business_deploy
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsBusinessDeployList" parameterType="EpsBusinessDeploy" resultMap="EpsBusinessDeployResult">
|
||||
<include refid="selectEpsBusinessDeployVo"/>
|
||||
<where>
|
||||
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
|
||||
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="scriptName != null and scriptName != ''"> and script_name like concat('%', #{scriptName}, '%')</if>
|
||||
<if test="scriptPath != null and scriptPath != ''"> and script_path = #{scriptPath}</if>
|
||||
<if test="scriptParams != null and scriptParams != ''"> and script_params = #{scriptParams}</if>
|
||||
<if test="deployDevice != null and deployDevice != ''"> and deploy_device = #{deployDevice}</if>
|
||||
<if test="submitBy != null and submitBy != ''"> and submit_by = #{submitBy}</if>
|
||||
<if test="reviewBy != null and reviewBy != ''"> and review_by = #{reviewBy}</if>
|
||||
<if test="reviewStatus != null and reviewStatus != ''"> and review_status = #{reviewStatus}</if>
|
||||
<if test="reviewTime != null "> and review_time = #{reviewTime}</if>
|
||||
<if test="reviewComment != null and reviewComment != ''"> and review_comment = #{reviewComment}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsBusinessDeployById" parameterType="Long" resultMap="EpsBusinessDeployResult">
|
||||
<include refid="selectEpsBusinessDeployVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsBusinessDeploy" parameterType="EpsBusinessDeploy" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into eps_business_deploy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="taskName != null">task_name,</if>
|
||||
<if test="businessCode != null">business_code,</if>
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="scriptName != null">script_name,</if>
|
||||
<if test="scriptPath != null">script_path,</if>
|
||||
<if test="scriptParams != null">script_params,</if>
|
||||
<if test="deployDevice != null">deploy_device,</if>
|
||||
<if test="submitBy != null">submit_by,</if>
|
||||
<if test="reviewBy != null">review_by,</if>
|
||||
<if test="reviewStatus != null">review_status,</if>
|
||||
<if test="reviewTime != null">review_time,</if>
|
||||
<if test="reviewComment != null">review_comment,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="taskName != null">#{taskName},</if>
|
||||
<if test="businessCode != null">#{businessCode},</if>
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="scriptName != null">#{scriptName},</if>
|
||||
<if test="scriptPath != null">#{scriptPath},</if>
|
||||
<if test="scriptParams != null">#{scriptParams},</if>
|
||||
<if test="deployDevice != null">#{deployDevice},</if>
|
||||
<if test="submitBy != null">#{submitBy},</if>
|
||||
<if test="reviewBy != null">#{reviewBy},</if>
|
||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||
<if test="reviewTime != null">#{reviewTime},</if>
|
||||
<if test="reviewComment != null">#{reviewComment},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsBusinessDeploy" parameterType="EpsBusinessDeploy">
|
||||
update eps_business_deploy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskName != null">task_name = #{taskName},</if>
|
||||
<if test="businessCode != null">business_code = #{businessCode},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="scriptName != null">script_name = #{scriptName},</if>
|
||||
<if test="scriptPath != null">script_path = #{scriptPath},</if>
|
||||
<if test="scriptParams != null">script_params = #{scriptParams},</if>
|
||||
<if test="deployDevice != null">deploy_device = #{deployDevice},</if>
|
||||
<if test="submitBy != null">submit_by = #{submitBy},</if>
|
||||
<if test="reviewBy != null">review_by = #{reviewBy},</if>
|
||||
<if test="reviewStatus != null">review_status = #{reviewStatus},</if>
|
||||
<if test="reviewTime != null">review_time = #{reviewTime},</if>
|
||||
<if test="reviewComment != null">review_comment = #{reviewComment},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsBusinessDeployById" parameterType="Long">
|
||||
delete from eps_business_deploy where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsBusinessDeployByIds" parameterType="String">
|
||||
delete from eps_business_deploy where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
<?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.EpsBusinessScriptMapper">
|
||||
|
||||
<resultMap type="EpsBusinessScript" id="EpsBusinessScriptResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="scriptName" column="script_name" />
|
||||
<result property="scriptPath" column="script_path" />
|
||||
<result property="defaultParams" column="default_params" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsBusinessScriptVo">
|
||||
select id, script_name, script_path, default_params, create_time, update_time, create_by, update_by from eps_business_script
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsBusinessScriptList" parameterType="EpsBusinessScript" resultMap="EpsBusinessScriptResult">
|
||||
<include refid="selectEpsBusinessScriptVo"/>
|
||||
<where>
|
||||
<if test="scriptName != null and scriptName != ''"> and script_name like concat('%', #{scriptName}, '%')</if>
|
||||
<if test="scriptPath != null and scriptPath != ''"> and script_path = #{scriptPath}</if>
|
||||
<if test="defaultParams != null and defaultParams != ''"> and default_params = #{defaultParams}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEpsBusinessScriptById" parameterType="Long" resultMap="EpsBusinessScriptResult">
|
||||
<include refid="selectEpsBusinessScriptVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEpsBusinessScript" parameterType="EpsBusinessScript" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into eps_business_script
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="scriptName != null">script_name,</if>
|
||||
<if test="scriptPath != null">script_path,</if>
|
||||
<if test="defaultParams != null">default_params,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="scriptName != null">#{scriptName},</if>
|
||||
<if test="scriptPath != null">#{scriptPath},</if>
|
||||
<if test="defaultParams != null">#{defaultParams},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEpsBusinessScript" parameterType="EpsBusinessScript">
|
||||
update eps_business_script
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="scriptName != null">script_name = #{scriptName},</if>
|
||||
<if test="scriptPath != null">script_path = #{scriptPath},</if>
|
||||
<if test="defaultParams != null">default_params = #{defaultParams},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEpsBusinessScriptById" parameterType="Long">
|
||||
delete from eps_business_script where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEpsBusinessScriptByIds" parameterType="String">
|
||||
delete from eps_business_script where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
+52
-1
@@ -37,10 +37,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="creatorName" column="creator_name" />
|
||||
<result property="updaterId" column="updater_id" />
|
||||
<result property="updaterName" column="updater_name" />
|
||||
<result property="clientId" column="client_id" />
|
||||
<result property="operator" column="operator" />
|
||||
<result property="province" column="province" />
|
||||
<result property="publicIp" column="public_ip" />
|
||||
<result property="businessName" column="business_name" />
|
||||
<result property="logicalNodeId" column="logical_node_id" />
|
||||
<result property="multiPublicIpStatus" column="multi_public_ip_status" />
|
||||
<result property="heartbeatCount" column="heartbeat_count" />
|
||||
<result property="heartbeatInterval" column="heartbeat_interval" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmResourceRegistrationVo">
|
||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, other_port_name, agent_version, protocol, resource_version, rw_permission, snmp_detect, team_name, snmp_collect_addr, snmp_collect_port, security_level, encryption, resource_user_name, resource_pwd, registration_status, online_status, switch_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, agent_version, protocol, resource_version, rw_permission, snmp_detect, team_name, snmp_collect_addr, snmp_collect_port, security_level, encryption, resource_user_name, resource_pwd, registration_status, online_status, switch_online_status, description, customer_id, customer_name, service_number, create_time, update_time, creator_id, creator_name, updater_id, updater_name, client_id, operator, province, public_ip, business_name, logical_node_id, multi_public_ip_status, heartbeat_count, heartbeat_interval from rm_resource_registration
|
||||
</sql>
|
||||
|
||||
<select id="selectRmResourceRegistrationList" parameterType="RmResourceRegistration" resultMap="RmResourceRegistrationResult">
|
||||
@@ -76,6 +85,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
||||
<if test="queryName != null and queryName != ''"> and (hardware_sn = #{queryName} or resource_name like concat('%', #{queryName}, '%')) </if>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="operator != null and operator != ''"> and operator = #{operator}</if>
|
||||
<if test="province != null and province != ''"> and province = #{province}</if>
|
||||
<if test="publicIp != null and publicIp != ''"> and public_ip = #{publicIp}</if>
|
||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
||||
<if test="logicalNodeId != null and logicalNodeId != ''"> and logical_node_id = #{logicalNodeId}</if>
|
||||
<if test="multiPublicIpStatus != null and multiPublicIpStatus != ''"> and multi_public_ip_status = #{multiPublicIpStatus}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
@@ -119,6 +135,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">creator_name,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="updaterName != null">updater_name,</if>
|
||||
<if test="clientId != null">client_id,</if>
|
||||
<if test="operator != null">operator,</if>
|
||||
<if test="province != null">province,</if>
|
||||
<if test="publicIp != null">public_ip,</if>
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="logicalNodeId != null">logical_node_id,</if>
|
||||
<if test="multiPublicIpStatus != null">multi_public_ip_status,</if>
|
||||
<if test="heartbeatCount != null">heartbeat_count,</if>
|
||||
<if test="heartbeatInterval != null">heartbeat_interval,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="hardwareSn != null">#{hardwareSn},</if>
|
||||
@@ -152,6 +177,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">#{creatorName},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="updaterName != null">#{updaterName},</if>
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
<if test="operator != null">#{operator},</if>
|
||||
<if test="province != null">#{province},</if>
|
||||
<if test="publicIp != null">#{publicIp},</if>
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="logicalNodeId != null">#{logicalNodeId},</if>
|
||||
<if test="multiPublicIpStatus != null">#{multiPublicIpStatus},</if>
|
||||
<if test="heartbeatCount != null">#{heartbeatCount},</if>
|
||||
<if test="heartbeatInterval != null">#{heartbeatInterval},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -189,6 +223,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
||||
<if test="clientId != null">client_id = #{clientId},</if>
|
||||
<if test="operator != null">operator = #{operator},</if>
|
||||
<if test="province != null">province = #{province},</if>
|
||||
<if test="publicIp != null">public_ip = #{publicIp},</if>
|
||||
<if test="businessName != null">business_name = #{businessName},</if>
|
||||
<if test="logicalNodeId != null">logical_node_id = #{logicalNodeId},</if>
|
||||
<if test="multiPublicIpStatus != null">multi_public_ip_status = #{multiPublicIpStatus},</if>
|
||||
<if test="heartbeatCount != null">heartbeat_count = #{heartbeatCount},</if>
|
||||
<if test="heartbeatInterval != null">heartbeat_interval = #{heartbeatInterval},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -289,4 +332,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectRegistMsgByClientId" parameterType="RmResourceRegistration" resultMap="RmResourceRegistrationResult">
|
||||
<include refid="selectRmResourceRegistrationVo"/>
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user