保留生成的表名前缀
This commit is contained in:
parent
1504250380
commit
46c36f2aaf
19
pom.xml
19
pom.xml
|
|
@ -4,13 +4,12 @@
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>rms</artifactId>
|
||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>rms</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<description>资源管理系统</description>
|
||||||
<description>若依管理系统</description>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>3.4</ruoyi.version>
|
<ruoyi.version>3.4</ruoyi.version>
|
||||||
|
|
@ -170,35 +169,35 @@
|
||||||
|
|
||||||
<!-- 定时任务-->
|
<!-- 定时任务-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-quartz</artifactId>
|
<artifactId>ruoyi-quartz</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 代码生成-->
|
<!-- 代码生成-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 核心模块-->
|
<!-- 核心模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-framework</artifactId>
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 系统模块-->
|
<!-- 系统模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-system</artifactId>
|
<artifactId>ruoyi-system</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>rms</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
@ -57,19 +57,19 @@
|
||||||
|
|
||||||
<!-- 核心模块-->
|
<!-- 核心模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-framework</artifactId>
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 定时任务-->
|
<!-- 定时任务-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-quartz</artifactId>
|
<artifactId>ruoyi-quartz</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 代码生成-->
|
<!-- 代码生成-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
package com.ruoyi.web.controller.template;
|
|
||||||
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.template.domain.Server;
|
|
||||||
import com.ruoyi.template.service.IServerService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.ModelMap;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务器模板 信息操作处理
|
|
||||||
*
|
|
||||||
* @author TP
|
|
||||||
* @date 2019-06-11
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@RequestMapping("/template/server")
|
|
||||||
public class ServerlController extends BaseController
|
|
||||||
{
|
|
||||||
private String prefix = "template/server";
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IServerService serverService;
|
|
||||||
|
|
||||||
@RequiresPermissions("template:server:view")
|
|
||||||
@GetMapping()
|
|
||||||
public String server()
|
|
||||||
{
|
|
||||||
return prefix + "/server";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询服务器模板列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:server:list")
|
|
||||||
@PostMapping("/list")
|
|
||||||
@ResponseBody
|
|
||||||
public TableDataInfo list(Server server)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<Server> list = serverService.selectServerList(server);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出服务器模板列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:server:export")
|
|
||||||
@PostMapping("/export")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult export(Server server)
|
|
||||||
{
|
|
||||||
List<Server> list = serverService.selectServerList(server);
|
|
||||||
ExcelUtil<Server> util = new ExcelUtil<Server>(Server.class);
|
|
||||||
return util.exportExcel(list, "server");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增服务器模板
|
|
||||||
*/
|
|
||||||
@GetMapping("/add")
|
|
||||||
public String add()
|
|
||||||
{
|
|
||||||
return prefix + "/add";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增保存服务器模板
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:server:add")
|
|
||||||
@Log(title = "服务器模板", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping("/add")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult addSave(Server server)
|
|
||||||
{
|
|
||||||
return toAjax(serverService.insertServer(server));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改服务器模板
|
|
||||||
*/
|
|
||||||
@GetMapping("/edit/{serverId}")
|
|
||||||
public String edit(@PathVariable("serverId") Integer serverId, ModelMap mmap)
|
|
||||||
{
|
|
||||||
Server server = serverService.selectServerById(serverId);
|
|
||||||
mmap.put("server", server);
|
|
||||||
return prefix + "/edit";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改保存服务器模板
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:server:edit")
|
|
||||||
@Log(title = "服务器模板", businessType = BusinessType.UPDATE)
|
|
||||||
@PostMapping("/edit")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult editSave(Server server)
|
|
||||||
{
|
|
||||||
return toAjax(serverService.updateServer(server));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除服务器模板
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:server:remove")
|
|
||||||
@Log(title = "服务器模板", businessType = BusinessType.DELETE)
|
|
||||||
@PostMapping( "/remove")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult remove(String ids)
|
|
||||||
{
|
|
||||||
return toAjax(serverService.deleteServerByIds(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
package com.ruoyi.web.controller.template;
|
|
||||||
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.template.domain.Switch;
|
|
||||||
import com.ruoyi.template.service.ISwitchService;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.ModelMap;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 交换机模板 信息操作处理
|
|
||||||
*
|
|
||||||
* @author TP
|
|
||||||
* @date 2019-06-12
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@RequestMapping("/template/switch")
|
|
||||||
public class SwitchController extends BaseController
|
|
||||||
{
|
|
||||||
private String prefix = "template/switch";
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISwitchService switchService;
|
|
||||||
|
|
||||||
@RequiresPermissions("template:switch:view")
|
|
||||||
@GetMapping()
|
|
||||||
public String switchTemplate()
|
|
||||||
{
|
|
||||||
return prefix + "/switch";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交换机模板列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:switch:list")
|
|
||||||
@PostMapping("/list")
|
|
||||||
@ResponseBody
|
|
||||||
public TableDataInfo list(Switch switchTemplate)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<Switch> list = switchService.selectSwitchList(switchTemplate);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出交换机模板列表
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:switch:export")
|
|
||||||
@PostMapping("/export")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult export(Switch switchTemplate)
|
|
||||||
{
|
|
||||||
List<Switch> list = switchService.selectSwitchList(switchTemplate);
|
|
||||||
ExcelUtil<Switch> util = new ExcelUtil<Switch>(Switch.class);
|
|
||||||
return util.exportExcel(list, "switch");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增交换机模板
|
|
||||||
*/
|
|
||||||
@GetMapping("/add")
|
|
||||||
public String add()
|
|
||||||
{
|
|
||||||
return prefix + "/add";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增保存交换机模板
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:switch:add")
|
|
||||||
@Log(title = "交换机模板", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping("/add")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult addSave(Switch switchTemplate)
|
|
||||||
{
|
|
||||||
return toAjax(switchService.insertSwitch(switchTemplate));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改交换机模板
|
|
||||||
*/
|
|
||||||
@GetMapping("/edit/{switchId}")
|
|
||||||
public String edit(@PathVariable("switchId") Integer switchId, ModelMap mmap)
|
|
||||||
{
|
|
||||||
Switch switchTemplate = switchService.selectSwitchById(switchId);
|
|
||||||
mmap.put("switch", switchTemplate);
|
|
||||||
return prefix + "/edit";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改保存交换机模板
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:switch:edit")
|
|
||||||
@Log(title = "交换机模板", businessType = BusinessType.UPDATE)
|
|
||||||
@PostMapping("/edit")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult editSave(Switch switchTemplate)
|
|
||||||
{
|
|
||||||
return toAjax(switchService.updateSwitch(switchTemplate));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除交换机模板
|
|
||||||
*/
|
|
||||||
@RequiresPermissions("template:switch:remove")
|
|
||||||
@Log(title = "交换机模板", businessType = BusinessType.DELETE)
|
|
||||||
@PostMapping( "/remove")
|
|
||||||
@ResponseBody
|
|
||||||
public AjaxResult remove(String ids)
|
|
||||||
{
|
|
||||||
return toAjax(switchService.deleteSwitchByIds(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.ruoyi.web.controller.template;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.template.domain.TmplServer;
|
||||||
|
import com.ruoyi.template.service.ITmplServerService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务器模板 信息操作处理
|
||||||
|
*
|
||||||
|
* @author TP
|
||||||
|
* @date 2019-06-12
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/template/tmplServer")
|
||||||
|
public class TmplServerController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "template/tmplServer";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITmplServerService tmplServerService;
|
||||||
|
|
||||||
|
@RequiresPermissions("template:tmplServer:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String tmplServer()
|
||||||
|
{
|
||||||
|
return prefix + "/tmplServer";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询服务器模板列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplServer:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(TmplServer tmplServer)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<TmplServer> list = tmplServerService.selectTmplServerList(tmplServer);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出服务器模板列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplServer:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(TmplServer tmplServer)
|
||||||
|
{
|
||||||
|
List<TmplServer> list = tmplServerService.selectTmplServerList(tmplServer);
|
||||||
|
ExcelUtil<TmplServer> util = new ExcelUtil<TmplServer>(TmplServer.class);
|
||||||
|
return util.exportExcel(list, "tmplServer");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增服务器模板
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存服务器模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplServer:add")
|
||||||
|
@Log(title = "服务器模板", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(TmplServer tmplServer)
|
||||||
|
{
|
||||||
|
return toAjax(tmplServerService.insertTmplServer(tmplServer));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改服务器模板
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{serverId}")
|
||||||
|
public String edit(@PathVariable("serverId") Integer serverId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
TmplServer tmplServer = tmplServerService.selectTmplServerById(serverId);
|
||||||
|
mmap.put("tmplServer", tmplServer);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存服务器模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplServer:edit")
|
||||||
|
@Log(title = "服务器模板", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(TmplServer tmplServer)
|
||||||
|
{
|
||||||
|
return toAjax(tmplServerService.updateTmplServer(tmplServer));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除服务器模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplServer:remove")
|
||||||
|
@Log(title = "服务器模板", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(tmplServerService.deleteTmplServerByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.ruoyi.web.controller.template;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.template.domain.TmplSwitch;
|
||||||
|
import com.ruoyi.template.service.ITmplSwitchService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交换机模板 信息操作处理
|
||||||
|
*
|
||||||
|
* @author TP
|
||||||
|
* @date 2019-06-12
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/template/tmplSwitch")
|
||||||
|
public class TmplSwitchController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "template/tmplSwitch";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITmplSwitchService tmplSwitchService;
|
||||||
|
|
||||||
|
@RequiresPermissions("template:tmplSwitch:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String tmplSwitch()
|
||||||
|
{
|
||||||
|
return prefix + "/tmplSwitch";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询交换机模板列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplSwitch:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(TmplSwitch tmplSwitch)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<TmplSwitch> list = tmplSwitchService.selectTmplSwitchList(tmplSwitch);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出交换机模板列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplSwitch:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(TmplSwitch tmplSwitch)
|
||||||
|
{
|
||||||
|
List<TmplSwitch> list = tmplSwitchService.selectTmplSwitchList(tmplSwitch);
|
||||||
|
ExcelUtil<TmplSwitch> util = new ExcelUtil<TmplSwitch>(TmplSwitch.class);
|
||||||
|
return util.exportExcel(list, "tmplSwitch");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增交换机模板
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存交换机模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplSwitch:add")
|
||||||
|
@Log(title = "交换机模板", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(TmplSwitch tmplSwitch)
|
||||||
|
{
|
||||||
|
return toAjax(tmplSwitchService.insertTmplSwitch(tmplSwitch));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改交换机模板
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{switchId}")
|
||||||
|
public String edit(@PathVariable("switchId") Integer switchId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
TmplSwitch tmplSwitch = tmplSwitchService.selectTmplSwitchById(switchId);
|
||||||
|
mmap.put("tmplSwitch", tmplSwitch);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存交换机模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplSwitch:edit")
|
||||||
|
@Log(title = "交换机模板", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(TmplSwitch tmplSwitch)
|
||||||
|
{
|
||||||
|
return toAjax(tmplSwitchService.updateTmplSwitch(tmplSwitch));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除交换机模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("template:tmplSwitch:remove")
|
||||||
|
@Log(title = "交换机模板", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(tmplSwitchService.deleteTmplSwitchByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-server-add">
|
<form class="form-horizontal m" id="form-tmplServer-add">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">服务器品牌:</label>
|
<label class="col-sm-3 control-label">服务器品牌:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -52,8 +52,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include::footer"></div>
|
<div th:include="include::footer"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "template/server"
|
var prefix = ctx + "template/tmplServer"
|
||||||
$("#form-server-add").validate({
|
$("#form-tmplServer-add").validate({
|
||||||
rules:{
|
rules:{
|
||||||
xxxx:{
|
xxxx:{
|
||||||
required:true,
|
required:true,
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.save(prefix + "/add", $('#form-server-add').serialize());
|
$.operate.save(prefix + "/add", $('#form-tmplServer-add').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-server-edit" th:object="${server}">
|
<form class="form-horizontal m" id="form-tmplServer-edit" th:object="${tmplServer}">
|
||||||
<input id="serverId" name="serverId" th:field="*{serverId}" type="hidden">
|
<input id="serverId" name="serverId" th:field="*{serverId}" type="hidden">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">服务器品牌:</label>
|
<label class="col-sm-3 control-label">服务器品牌:</label>
|
||||||
|
|
@ -53,8 +53,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include::footer"></div>
|
<div th:include="include::footer"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "template/server";
|
var prefix = ctx + "template/tmplServer";
|
||||||
$("#form-server-edit").validate({
|
$("#form-tmplServer-edit").validate({
|
||||||
rules:{
|
rules:{
|
||||||
xxxx:{
|
xxxx:{
|
||||||
required:true,
|
required:true,
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.save(prefix + "/edit", $('#form-server-edit').serialize());
|
$.operate.save(prefix + "/edit", $('#form-tmplServer-edit').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -48,16 +48,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group-sm" id="toolbar" role="group">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="template:server:add">
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="template:tmplServer:add">
|
||||||
<i class="fa fa-plus"></i> 添加
|
<i class="fa fa-plus"></i> 添加
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="template:server:edit">
|
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="template:tmplServer:edit">
|
||||||
<i class="fa fa-edit"></i> 修改
|
<i class="fa fa-edit"></i> 修改
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="template:server:remove">
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="template:tmplServer:remove">
|
||||||
<i class="fa fa-remove"></i> 删除
|
<i class="fa fa-remove"></i> 删除
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="template:server:export">
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="template:tmplServer:export">
|
||||||
<i class="fa fa-download"></i> 导出
|
<i class="fa fa-download"></i> 导出
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -68,9 +68,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include :: footer"></div>
|
<div th:include="include :: footer"></div>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var editFlag = [[${@permission.hasPermi('template:server:edit')}]];
|
var editFlag = [[${@permission.hasPermi('template:tmplServer:edit')}]];
|
||||||
var removeFlag = [[${@permission.hasPermi('template:server:remove')}]];
|
var removeFlag = [[${@permission.hasPermi('template:tmplServer:remove')}]];
|
||||||
var prefix = ctx + "template/server";
|
var prefix = ctx + "template/tmplServer";
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var options = {
|
var options = {
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-switch-add">
|
<form class="form-horizontal m" id="form-tmplSwitch-add">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">交换机品牌:</label>
|
<label class="col-sm-3 control-label">交换机品牌:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
@ -28,8 +28,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include::footer"></div>
|
<div th:include="include::footer"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "template/switch"
|
var prefix = ctx + "template/tmplSwitch"
|
||||||
$("#form-switch-add").validate({
|
$("#form-tmplSwitch-add").validate({
|
||||||
rules:{
|
rules:{
|
||||||
xxxx:{
|
xxxx:{
|
||||||
required:true,
|
required:true,
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.save(prefix + "/add", $('#form-switch-add').serialize());
|
$.operate.save(prefix + "/add", $('#form-tmplSwitch-add').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-switch-edit" th:object="${switch}">
|
<form class="form-horizontal m" id="form-tmplSwitch-edit" th:object="${tmplSwitch}">
|
||||||
<input id="switchId" name="switchId" th:field="*{switchId}" type="hidden">
|
<input id="switchId" name="switchId" th:field="*{switchId}" type="hidden">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">交换机品牌:</label>
|
<label class="col-sm-3 control-label">交换机品牌:</label>
|
||||||
|
|
@ -29,8 +29,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include::footer"></div>
|
<div th:include="include::footer"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var prefix = ctx + "template/switch";
|
var prefix = ctx + "template/tmplSwitch";
|
||||||
$("#form-switch-edit").validate({
|
$("#form-tmplSwitch-edit").validate({
|
||||||
rules:{
|
rules:{
|
||||||
xxxx:{
|
xxxx:{
|
||||||
required:true,
|
required:true,
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
$.operate.save(prefix + "/edit", $('#form-switch-edit').serialize());
|
$.operate.save(prefix + "/edit", $('#form-tmplSwitch-edit').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -32,16 +32,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group-sm" id="toolbar" role="group">
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="template:switch:add">
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="template:tmplSwitch:add">
|
||||||
<i class="fa fa-plus"></i> 添加
|
<i class="fa fa-plus"></i> 添加
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="template:switch:edit">
|
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="template:tmplSwitch:edit">
|
||||||
<i class="fa fa-edit"></i> 修改
|
<i class="fa fa-edit"></i> 修改
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="template:switch:remove">
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="template:tmplSwitch:remove">
|
||||||
<i class="fa fa-remove"></i> 删除
|
<i class="fa fa-remove"></i> 删除
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="template:switch:export">
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="template:tmplSwitch:export">
|
||||||
<i class="fa fa-download"></i> 导出
|
<i class="fa fa-download"></i> 导出
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -52,9 +52,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div th:include="include :: footer"></div>
|
<div th:include="include :: footer"></div>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var editFlag = [[${@permission.hasPermi('template:switch:edit')}]];
|
var editFlag = [[${@permission.hasPermi('template:tmplSwitch:edit')}]];
|
||||||
var removeFlag = [[${@permission.hasPermi('template:switch:remove')}]];
|
var removeFlag = [[${@permission.hasPermi('template:tmplSwitch:remove')}]];
|
||||||
var prefix = ctx + "template/switch";
|
var prefix = ctx + "template/tmplSwitch";
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var options = {
|
var options = {
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>rms</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>rms</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
<!-- 系统模块-->
|
<!-- 系统模块-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-system</artifactId>
|
<artifactId>ruoyi-system</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>rms</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,6 @@ gen:
|
||||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.template
|
packageName: com.ruoyi.template
|
||||||
# 自动去除表前缀,默认是true
|
# 自动去除表前缀,默认是true
|
||||||
autoRemovePre: true
|
autoRemovePre: fasle
|
||||||
# 表前缀(类名不会包含表前缀)
|
# 表前缀(类名不会包含表前缀)
|
||||||
tablePrefix: tmpl_
|
tablePrefix: sys_
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>rms</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>rms</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<version>3.4</version>
|
<version>3.4</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ezsvs</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.ruoyi.template.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交换机端口类型(不用代码生成工具)表 tmpl_switch_port
|
||||||
|
*
|
||||||
|
* @author TP
|
||||||
|
* @date 2019-06-12
|
||||||
|
*/
|
||||||
|
public class SwitchPort extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 交换机端口编号 */
|
||||||
|
private Integer switchPortId;
|
||||||
|
/** 交换机模板编号 */
|
||||||
|
private Integer switchId;
|
||||||
|
/** 交换机端口类型 */
|
||||||
|
private Integer switchPortType;
|
||||||
|
/** 交换机端口数量 */
|
||||||
|
private Integer switchPortNum;
|
||||||
|
|
||||||
|
public void setSwitchPortId(Integer switchPortId)
|
||||||
|
{
|
||||||
|
this.switchPortId = switchPortId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSwitchPortId()
|
||||||
|
{
|
||||||
|
return switchPortId;
|
||||||
|
}
|
||||||
|
public void setSwitchId(Integer switchId)
|
||||||
|
{
|
||||||
|
this.switchId = switchId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSwitchId()
|
||||||
|
{
|
||||||
|
return switchId;
|
||||||
|
}
|
||||||
|
public void setSwitchPortType(Integer switchPortType)
|
||||||
|
{
|
||||||
|
this.switchPortType = switchPortType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSwitchPortType()
|
||||||
|
{
|
||||||
|
return switchPortType;
|
||||||
|
}
|
||||||
|
public void setSwitchPortNum(Integer switchPortNum)
|
||||||
|
{
|
||||||
|
this.switchPortNum = switchPortNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSwitchPortNum()
|
||||||
|
{
|
||||||
|
return switchPortNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("switchPortId", getSwitchPortId())
|
||||||
|
.append("switchId", getSwitchId())
|
||||||
|
.append("switchPortType", getSwitchPortType())
|
||||||
|
.append("switchPortNum", getSwitchPortNum())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,18 +2,15 @@ package com.ruoyi.template.domain;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import org.apache.ibatis.type.Alias;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务器模板表 tmpl_server
|
* 服务器模板表 tmpl_server
|
||||||
*
|
*
|
||||||
* @author TP
|
* @author TP
|
||||||
* @date 2019-06-11
|
* @date 2019-06-12
|
||||||
*/
|
*/
|
||||||
@Alias("serverTemplte")
|
public class TmplServer extends BaseEntity
|
||||||
public class Server extends BaseEntity
|
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
* @author TP
|
* @author TP
|
||||||
* @date 2019-06-12
|
* @date 2019-06-12
|
||||||
*/
|
*/
|
||||||
public class Switch extends BaseEntity
|
public class TmplSwitch extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
package com.ruoyi.template.mapper;
|
package com.ruoyi.template.mapper;
|
||||||
|
|
||||||
import com.ruoyi.template.domain.Server;
|
import com.ruoyi.template.domain.TmplServer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务器模板 数据层
|
* 服务器模板 数据层
|
||||||
*
|
*
|
||||||
* @author TP
|
* @author TP
|
||||||
* @date 2019-06-11
|
* @date 2019-06-12
|
||||||
*/
|
*/
|
||||||
public interface ServerMapper
|
public interface TmplServerMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询服务器模板信息
|
* 查询服务器模板信息
|
||||||
|
|
@ -17,31 +17,31 @@ public interface ServerMapper
|
||||||
* @param serverId 服务器模板ID
|
* @param serverId 服务器模板ID
|
||||||
* @return 服务器模板信息
|
* @return 服务器模板信息
|
||||||
*/
|
*/
|
||||||
public Server selectServerById(Integer serverId);
|
public TmplServer selectTmplServerById(Integer serverId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询服务器模板列表
|
* 查询服务器模板列表
|
||||||
*
|
*
|
||||||
* @param server 服务器模板信息
|
* @param tmplServer 服务器模板信息
|
||||||
* @return 服务器模板集合
|
* @return 服务器模板集合
|
||||||
*/
|
*/
|
||||||
public List<Server> selectServerList(Server server);
|
public List<TmplServer> selectTmplServerList(TmplServer tmplServer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增服务器模板
|
* 新增服务器模板
|
||||||
*
|
*
|
||||||
* @param server 服务器模板信息
|
* @param tmplServer 服务器模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertServer(Server server);
|
public int insertTmplServer(TmplServer tmplServer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改服务器模板
|
* 修改服务器模板
|
||||||
*
|
*
|
||||||
* @param server 服务器模板信息
|
* @param tmplServer 服务器模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateServer(Server server);
|
public int updateTmplServer(TmplServer tmplServer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除服务器模板
|
* 删除服务器模板
|
||||||
|
|
@ -49,7 +49,7 @@ public interface ServerMapper
|
||||||
* @param serverId 服务器模板ID
|
* @param serverId 服务器模板ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteServerById(Integer serverId);
|
public int deleteTmplServerById(Integer serverId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除服务器模板
|
* 批量删除服务器模板
|
||||||
|
|
@ -57,6 +57,6 @@ public interface ServerMapper
|
||||||
* @param serverIds 需要删除的数据ID
|
* @param serverIds 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteServerByIds(String[] serverIds);
|
public int deleteTmplServerByIds(String[] serverIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package com.ruoyi.template.mapper;
|
package com.ruoyi.template.mapper;
|
||||||
|
|
||||||
import com.ruoyi.template.domain.Switch;
|
import com.ruoyi.template.domain.TmplSwitch;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||||
* @author TP
|
* @author TP
|
||||||
* @date 2019-06-12
|
* @date 2019-06-12
|
||||||
*/
|
*/
|
||||||
public interface SwitchMapper
|
public interface TmplSwitchMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询交换机模板信息
|
* 查询交换机模板信息
|
||||||
|
|
@ -17,31 +17,31 @@ public interface SwitchMapper
|
||||||
* @param switchId 交换机模板ID
|
* @param switchId 交换机模板ID
|
||||||
* @return 交换机模板信息
|
* @return 交换机模板信息
|
||||||
*/
|
*/
|
||||||
public Switch selectSwitchById(Integer switchId);
|
public TmplSwitch selectTmplSwitchById(Integer switchId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询交换机模板列表
|
* 查询交换机模板列表
|
||||||
*
|
*
|
||||||
* @param switchTemplate 交换机模板信息
|
* @param tmplSwitch 交换机模板信息
|
||||||
* @return 交换机模板集合
|
* @return 交换机模板集合
|
||||||
*/
|
*/
|
||||||
public List<Switch> selectSwitchList(Switch switchTemplate);
|
public List<TmplSwitch> selectTmplSwitchList(TmplSwitch tmplSwitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增交换机模板
|
* 新增交换机模板
|
||||||
*
|
*
|
||||||
* @param switchTemplate 交换机模板信息
|
* @param tmplSwitch 交换机模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertSwitch(Switch switchTemplate);
|
public int insertTmplSwitch(TmplSwitch tmplSwitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改交换机模板
|
* 修改交换机模板
|
||||||
*
|
*
|
||||||
* @param switchTemplate 交换机模板信息
|
* @param tmplSwitch 交换机模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateSwitch(Switch switchTemplate);
|
public int updateTmplSwitch(TmplSwitch tmplSwitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除交换机模板
|
* 删除交换机模板
|
||||||
|
|
@ -49,7 +49,7 @@ public interface SwitchMapper
|
||||||
* @param switchId 交换机模板ID
|
* @param switchId 交换机模板ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSwitchById(Integer switchId);
|
public int deleteTmplSwitchById(Integer switchId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除交换机模板
|
* 批量删除交换机模板
|
||||||
|
|
@ -57,6 +57,6 @@ public interface SwitchMapper
|
||||||
* @param switchIds 需要删除的数据ID
|
* @param switchIds 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSwitchByIds(String[] switchIds);
|
public int deleteTmplSwitchByIds(String[] switchIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
package com.ruoyi.template.service;
|
package com.ruoyi.template.service;
|
||||||
|
|
||||||
import com.ruoyi.template.domain.Server;
|
import com.ruoyi.template.domain.TmplServer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务器模板 服务层
|
* 服务器模板 服务层
|
||||||
*
|
*
|
||||||
* @author TP
|
* @author TP
|
||||||
* @date 2019-06-11
|
* @date 2019-06-12
|
||||||
*/
|
*/
|
||||||
public interface IServerService
|
public interface ITmplServerService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询服务器模板信息
|
* 查询服务器模板信息
|
||||||
|
|
@ -17,31 +17,31 @@ public interface IServerService
|
||||||
* @param serverId 服务器模板ID
|
* @param serverId 服务器模板ID
|
||||||
* @return 服务器模板信息
|
* @return 服务器模板信息
|
||||||
*/
|
*/
|
||||||
public Server selectServerById(Integer serverId);
|
public TmplServer selectTmplServerById(Integer serverId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询服务器模板列表
|
* 查询服务器模板列表
|
||||||
*
|
*
|
||||||
* @param server 服务器模板信息
|
* @param tmplServer 服务器模板信息
|
||||||
* @return 服务器模板集合
|
* @return 服务器模板集合
|
||||||
*/
|
*/
|
||||||
public List<Server> selectServerList(Server server);
|
public List<TmplServer> selectTmplServerList(TmplServer tmplServer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增服务器模板
|
* 新增服务器模板
|
||||||
*
|
*
|
||||||
* @param server 服务器模板信息
|
* @param tmplServer 服务器模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertServer(Server server);
|
public int insertTmplServer(TmplServer tmplServer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改服务器模板
|
* 修改服务器模板
|
||||||
*
|
*
|
||||||
* @param server 服务器模板信息
|
* @param tmplServer 服务器模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateServer(Server server);
|
public int updateTmplServer(TmplServer tmplServer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除服务器模板信息
|
* 删除服务器模板信息
|
||||||
|
|
@ -49,6 +49,6 @@ public interface IServerService
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteServerByIds(String ids);
|
public int deleteTmplServerByIds(String ids);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package com.ruoyi.template.service;
|
package com.ruoyi.template.service;
|
||||||
|
|
||||||
import com.ruoyi.template.domain.Switch;
|
import com.ruoyi.template.domain.TmplSwitch;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||||
* @author TP
|
* @author TP
|
||||||
* @date 2019-06-12
|
* @date 2019-06-12
|
||||||
*/
|
*/
|
||||||
public interface ISwitchService
|
public interface ITmplSwitchService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询交换机模板信息
|
* 查询交换机模板信息
|
||||||
|
|
@ -17,31 +17,31 @@ public interface ISwitchService
|
||||||
* @param switchId 交换机模板ID
|
* @param switchId 交换机模板ID
|
||||||
* @return 交换机模板信息
|
* @return 交换机模板信息
|
||||||
*/
|
*/
|
||||||
public Switch selectSwitchById(Integer switchId);
|
public TmplSwitch selectTmplSwitchById(Integer switchId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询交换机模板列表
|
* 查询交换机模板列表
|
||||||
*
|
*
|
||||||
* @param switchTemplate 交换机模板信息
|
* @param tmplSwitch 交换机模板信息
|
||||||
* @return 交换机模板集合
|
* @return 交换机模板集合
|
||||||
*/
|
*/
|
||||||
public List<Switch> selectSwitchList(Switch switchTemplate);
|
public List<TmplSwitch> selectTmplSwitchList(TmplSwitch tmplSwitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增交换机模板
|
* 新增交换机模板
|
||||||
*
|
*
|
||||||
* @param switchTemplate 交换机模板信息
|
* @param tmplSwitch 交换机模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertSwitch(Switch switchTemplate);
|
public int insertTmplSwitch(TmplSwitch tmplSwitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改交换机模板
|
* 修改交换机模板
|
||||||
*
|
*
|
||||||
* @param switchTemplate 交换机模板信息
|
* @param tmplSwitch 交换机模板信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateSwitch(Switch switchTemplate);
|
public int updateTmplSwitch(TmplSwitch tmplSwitch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除交换机模板信息
|
* 删除交换机模板信息
|
||||||
|
|
@ -49,6 +49,6 @@ public interface ISwitchService
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSwitchByIds(String ids);
|
public int deleteTmplSwitchByIds(String ids);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,84 +0,0 @@
|
||||||
package com.ruoyi.template.service.impl;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.text.Convert;
|
|
||||||
import com.ruoyi.template.domain.Server;
|
|
||||||
import com.ruoyi.template.mapper.ServerMapper;
|
|
||||||
import com.ruoyi.template.service.IServerService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务器模板 服务层实现
|
|
||||||
*
|
|
||||||
* @author TP
|
|
||||||
* @date 2019-06-11
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class ServerServiceImpl implements IServerService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private ServerMapper serverMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询服务器模板信息
|
|
||||||
*
|
|
||||||
* @param serverId 服务器模板ID
|
|
||||||
* @return 服务器模板信息
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Server selectServerById(Integer serverId)
|
|
||||||
{
|
|
||||||
return serverMapper.selectServerById(serverId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询服务器模板列表
|
|
||||||
*
|
|
||||||
* @param server 服务器模板信息
|
|
||||||
* @return 服务器模板集合
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Server> selectServerList(Server server)
|
|
||||||
{
|
|
||||||
return serverMapper.selectServerList(server);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增服务器模板
|
|
||||||
*
|
|
||||||
* @param server 服务器模板信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertServer(Server server)
|
|
||||||
{
|
|
||||||
return serverMapper.insertServer(server);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改服务器模板
|
|
||||||
*
|
|
||||||
* @param server 服务器模板信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateServer(Server server)
|
|
||||||
{
|
|
||||||
return serverMapper.updateServer(server);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除服务器模板对象
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据ID
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteServerByIds(String ids)
|
|
||||||
{
|
|
||||||
return serverMapper.deleteServerByIds(Convert.toStrArray(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
package com.ruoyi.template.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.template.mapper.SwitchMapper;
|
|
||||||
import com.ruoyi.template.domain.Switch;
|
|
||||||
import com.ruoyi.template.service.ISwitchService;
|
|
||||||
import com.ruoyi.common.core.text.Convert;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 交换机模板 服务层实现
|
|
||||||
*
|
|
||||||
* @author TP
|
|
||||||
* @date 2019-06-12
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class SwitchServiceImpl implements ISwitchService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private SwitchMapper switchMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交换机模板信息
|
|
||||||
*
|
|
||||||
* @param switchId 交换机模板ID
|
|
||||||
* @return 交换机模板信息
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Switch selectSwitchById(Integer switchId)
|
|
||||||
{
|
|
||||||
return switchMapper.selectSwitchById(switchId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交换机模板列表
|
|
||||||
*
|
|
||||||
* @param switchTemplate 交换机模板信息
|
|
||||||
* @return 交换机模板集合
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Switch> selectSwitchList(Switch switchTemplate)
|
|
||||||
{
|
|
||||||
return switchMapper.selectSwitchList(switchTemplate);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增交换机模板
|
|
||||||
*
|
|
||||||
* @param switchTemplate 交换机模板信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertSwitch(Switch switchTemplate)
|
|
||||||
{
|
|
||||||
return switchMapper.insertSwitch(switchTemplate);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改交换机模板
|
|
||||||
*
|
|
||||||
* @param switchTemplate 交换机模板信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateSwitch(Switch switchTemplate)
|
|
||||||
{
|
|
||||||
return switchMapper.updateSwitch(switchTemplate);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除交换机模板对象
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据ID
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteSwitchByIds(String ids)
|
|
||||||
{
|
|
||||||
return switchMapper.deleteSwitchByIds(Convert.toStrArray(ids));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,84 @@
|
||||||
|
package com.ruoyi.template.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.template.domain.TmplServer;
|
||||||
|
import com.ruoyi.template.mapper.TmplServerMapper;
|
||||||
|
import com.ruoyi.template.service.ITmplServerService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务器模板 服务层实现
|
||||||
|
*
|
||||||
|
* @author TP
|
||||||
|
* @date 2019-06-12
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TmplServerServiceImpl implements ITmplServerService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TmplServerMapper tmplServerMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询服务器模板信息
|
||||||
|
*
|
||||||
|
* @param serverId 服务器模板ID
|
||||||
|
* @return 服务器模板信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TmplServer selectTmplServerById(Integer serverId)
|
||||||
|
{
|
||||||
|
return tmplServerMapper.selectTmplServerById(serverId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询服务器模板列表
|
||||||
|
*
|
||||||
|
* @param tmplServer 服务器模板信息
|
||||||
|
* @return 服务器模板集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TmplServer> selectTmplServerList(TmplServer tmplServer)
|
||||||
|
{
|
||||||
|
return tmplServerMapper.selectTmplServerList(tmplServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增服务器模板
|
||||||
|
*
|
||||||
|
* @param tmplServer 服务器模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTmplServer(TmplServer tmplServer)
|
||||||
|
{
|
||||||
|
return tmplServerMapper.insertTmplServer(tmplServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改服务器模板
|
||||||
|
*
|
||||||
|
* @param tmplServer 服务器模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTmplServer(TmplServer tmplServer)
|
||||||
|
{
|
||||||
|
return tmplServerMapper.updateTmplServer(tmplServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除服务器模板对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTmplServerByIds(String ids)
|
||||||
|
{
|
||||||
|
return tmplServerMapper.deleteTmplServerByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.ruoyi.template.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.template.mapper.TmplSwitchMapper;
|
||||||
|
import com.ruoyi.template.domain.TmplSwitch;
|
||||||
|
import com.ruoyi.template.service.ITmplSwitchService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交换机模板 服务层实现
|
||||||
|
*
|
||||||
|
* @author TP
|
||||||
|
* @date 2019-06-12
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TmplSwitchServiceImpl implements ITmplSwitchService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TmplSwitchMapper tmplSwitchMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询交换机模板信息
|
||||||
|
*
|
||||||
|
* @param switchId 交换机模板ID
|
||||||
|
* @return 交换机模板信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TmplSwitch selectTmplSwitchById(Integer switchId)
|
||||||
|
{
|
||||||
|
return tmplSwitchMapper.selectTmplSwitchById(switchId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询交换机模板列表
|
||||||
|
*
|
||||||
|
* @param tmplSwitch 交换机模板信息
|
||||||
|
* @return 交换机模板集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TmplSwitch> selectTmplSwitchList(TmplSwitch tmplSwitch)
|
||||||
|
{
|
||||||
|
return tmplSwitchMapper.selectTmplSwitchList(tmplSwitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增交换机模板
|
||||||
|
*
|
||||||
|
* @param tmplSwitch 交换机模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTmplSwitch(TmplSwitch tmplSwitch)
|
||||||
|
{
|
||||||
|
return tmplSwitchMapper.insertTmplSwitch(tmplSwitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改交换机模板
|
||||||
|
*
|
||||||
|
* @param tmplSwitch 交换机模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTmplSwitch(TmplSwitch tmplSwitch)
|
||||||
|
{
|
||||||
|
return tmplSwitchMapper.updateTmplSwitch(tmplSwitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除交换机模板对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTmplSwitchByIds(String ids)
|
||||||
|
{
|
||||||
|
return tmplSwitchMapper.deleteTmplSwitchByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.template.mapper.ServerMapper">
|
<mapper namespace="com.ruoyi.template.mapper.TmplServerMapper">
|
||||||
|
|
||||||
<resultMap type="serverTemplte" id="ServerResult">
|
<resultMap type="TmplServer" id="TmplServerResult">
|
||||||
<result property="serverId" column="server_id" />
|
<result property="serverId" column="server_id" />
|
||||||
<result property="serverBrand" column="server_brand" />
|
<result property="serverBrand" column="server_brand" />
|
||||||
<result property="serverType" column="server_type" />
|
<result property="serverType" column="server_type" />
|
||||||
|
|
@ -15,12 +15,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="raidCard" column="raid_card" />
|
<result property="raidCard" column="raid_card" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectServerVo">
|
<sql id="selectTmplServerVo">
|
||||||
select server_id, server_brand, server_type, cpu_freq, cpu_num, ipmi_port, power_num, raid_card from tmpl_server
|
select server_id, server_brand, server_type, cpu_freq, cpu_num, ipmi_port, power_num, raid_card from tmpl_server
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectServerList" parameterType="serverTemplte" resultMap="ServerResult">
|
<select id="selectTmplServerList" parameterType="TmplServer" resultMap="TmplServerResult">
|
||||||
<include refid="selectServerVo"/>
|
<include refid="selectTmplServerVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="serverId != null "> and server_id = #{serverId}</if>
|
<if test="serverId != null "> and server_id = #{serverId}</if>
|
||||||
<if test="serverBrand != null and serverBrand != '' "> and server_brand = #{serverBrand}</if>
|
<if test="serverBrand != null and serverBrand != '' "> and server_brand = #{serverBrand}</if>
|
||||||
|
|
@ -33,15 +33,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectServerById" parameterType="Integer" resultMap="ServerResult">
|
<select id="selectTmplServerById" parameterType="Integer" resultMap="TmplServerResult">
|
||||||
<include refid="selectServerVo"/>
|
<include refid="selectTmplServerVo"/>
|
||||||
where server_id = #{serverId}
|
where server_id = #{serverId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertServer" parameterType="serverTemplte">
|
<insert id="insertTmplServer" parameterType="TmplServer" useGeneratedKeys="true" keyProperty="serverId">
|
||||||
insert into tmpl_server
|
insert into tmpl_server
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="serverId != null ">server_id,</if>
|
|
||||||
<if test="serverBrand != null and serverBrand != '' ">server_brand,</if>
|
<if test="serverBrand != null and serverBrand != '' ">server_brand,</if>
|
||||||
<if test="serverType != null and serverType != '' ">server_type,</if>
|
<if test="serverType != null and serverType != '' ">server_type,</if>
|
||||||
<if test="cpuFreq != null and cpuFreq != '' ">cpu_freq,</if>
|
<if test="cpuFreq != null and cpuFreq != '' ">cpu_freq,</if>
|
||||||
|
|
@ -51,7 +50,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="raidCard != null and raidCard != '' ">raid_card,</if>
|
<if test="raidCard != null and raidCard != '' ">raid_card,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="serverId != null ">#{serverId},</if>
|
|
||||||
<if test="serverBrand != null and serverBrand != '' ">#{serverBrand},</if>
|
<if test="serverBrand != null and serverBrand != '' ">#{serverBrand},</if>
|
||||||
<if test="serverType != null and serverType != '' ">#{serverType},</if>
|
<if test="serverType != null and serverType != '' ">#{serverType},</if>
|
||||||
<if test="cpuFreq != null and cpuFreq != '' ">#{cpuFreq},</if>
|
<if test="cpuFreq != null and cpuFreq != '' ">#{cpuFreq},</if>
|
||||||
|
|
@ -62,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateServer" parameterType="serverTemplte">
|
<update id="updateTmplServer" parameterType="TmplServer">
|
||||||
update tmpl_server
|
update tmpl_server
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="serverBrand != null and serverBrand != '' ">server_brand = #{serverBrand},</if>
|
<if test="serverBrand != null and serverBrand != '' ">server_brand = #{serverBrand},</if>
|
||||||
|
|
@ -76,11 +74,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where server_id = #{serverId}
|
where server_id = #{serverId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteServerById" parameterType="Integer">
|
<delete id="deleteTmplServerById" parameterType="Integer">
|
||||||
delete from tmpl_server where server_id = #{serverId}
|
delete from tmpl_server where server_id = #{serverId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteServerByIds" parameterType="String">
|
<delete id="deleteTmplServerByIds" parameterType="String">
|
||||||
delete from tmpl_server where server_id in
|
delete from tmpl_server where server_id in
|
||||||
<foreach item="serverId" collection="array" open="(" separator="," close=")">
|
<foreach item="serverId" collection="array" open="(" separator="," close=")">
|
||||||
#{serverId}
|
#{serverId}
|
||||||
|
|
@ -2,21 +2,21 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.template.mapper.SwitchMapper">
|
<mapper namespace="com.ruoyi.template.mapper.TmplSwitchMapper">
|
||||||
|
|
||||||
<resultMap type="Switch" id="SwitchResult">
|
<resultMap type="TmplSwitch" id="TmplSwitchResult">
|
||||||
<result property="switchId" column="switch_id" />
|
<result property="switchId" column="switch_id" />
|
||||||
<result property="switchBrand" column="switch_brand" />
|
<result property="switchBrand" column="switch_brand" />
|
||||||
<result property="switchType" column="switch_type" />
|
<result property="switchType" column="switch_type" />
|
||||||
<result property="powerNum" column="power_num" />
|
<result property="powerNum" column="power_num" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSwitchVo">
|
<sql id="selectTmplSwitchVo">
|
||||||
select switch_id, switch_brand, switch_type, power_num from tmpl_switch
|
select switch_id, switch_brand, switch_type, power_num from tmpl_switch
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSwitchList" parameterType="Switch" resultMap="SwitchResult">
|
<select id="selectTmplSwitchList" parameterType="TmplSwitch" resultMap="TmplSwitchResult">
|
||||||
<include refid="selectSwitchVo"/>
|
<include refid="selectTmplSwitchVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="switchId != null "> and switch_id = #{switchId}</if>
|
<if test="switchId != null "> and switch_id = #{switchId}</if>
|
||||||
<if test="switchBrand != null and switchBrand != '' "> and switch_brand = #{switchBrand}</if>
|
<if test="switchBrand != null and switchBrand != '' "> and switch_brand = #{switchBrand}</if>
|
||||||
|
|
@ -25,12 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSwitchById" parameterType="Integer" resultMap="SwitchResult">
|
<select id="selectTmplSwitchById" parameterType="Integer" resultMap="TmplSwitchResult">
|
||||||
<include refid="selectSwitchVo"/>
|
<include refid="selectTmplSwitchVo"/>
|
||||||
where switch_id = #{switchId}
|
where switch_id = #{switchId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSwitch" parameterType="Switch" useGeneratedKeys="true" keyProperty="switchId">
|
<insert id="insertTmplSwitch" parameterType="TmplSwitch" useGeneratedKeys="true" keyProperty="switchId">
|
||||||
insert into tmpl_switch
|
insert into tmpl_switch
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="switchBrand != null and switchBrand != '' ">switch_brand,</if>
|
<if test="switchBrand != null and switchBrand != '' ">switch_brand,</if>
|
||||||
|
|
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSwitch" parameterType="Switch">
|
<update id="updateTmplSwitch" parameterType="TmplSwitch">
|
||||||
update tmpl_switch
|
update tmpl_switch
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="switchBrand != null and switchBrand != '' ">switch_brand = #{switchBrand},</if>
|
<if test="switchBrand != null and switchBrand != '' ">switch_brand = #{switchBrand},</if>
|
||||||
|
|
@ -54,11 +54,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where switch_id = #{switchId}
|
where switch_id = #{switchId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteSwitchById" parameterType="Integer">
|
<delete id="deleteTmplSwitchById" parameterType="Integer">
|
||||||
delete from tmpl_switch where switch_id = #{switchId}
|
delete from tmpl_switch where switch_id = #{switchId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteSwitchByIds" parameterType="String">
|
<delete id="deleteTmplSwitchByIds" parameterType="String">
|
||||||
delete from tmpl_switch where switch_id in
|
delete from tmpl_switch where switch_id in
|
||||||
<foreach item="switchId" collection="array" open="(" separator="," close=")">
|
<foreach item="switchId" collection="array" open="(" separator="," close=")">
|
||||||
#{switchId}
|
#{switchId}
|
||||||
Loading…
Reference in New Issue