diff --git a/ruoyi-admin/src/main/resources/templates/template/tmplServer/edit.html b/ruoyi-admin/src/main/resources/templates/template/tmplServer/edit.html index b82c4b41b..8d41cb027 100755 --- a/ruoyi-admin/src/main/resources/templates/template/tmplServer/edit.html +++ b/ruoyi-admin/src/main/resources/templates/template/tmplServer/edit.html @@ -65,12 +65,27 @@ + +
+
+
+
+ +
+ +
+
+
+
+
diff --git a/ruoyi-admin/src/main/resources/templates/template/tmplServer/tmplServer.html b/ruoyi-admin/src/main/resources/templates/template/tmplServer/tmplServer.html index 37d434eca..6f8aaec95 100755 --- a/ruoyi-admin/src/main/resources/templates/template/tmplServer/tmplServer.html +++ b/ruoyi-admin/src/main/resources/templates/template/tmplServer/tmplServer.html @@ -154,7 +154,7 @@ formatter: function (value, row, index) { if (row.serverDisks) { $.each(row.serverDisks, function (index, serverDisk) { - if (serverDisk.serverNetcardType == dict.dictCode) { + if (serverDisk.serverDiskType == dict.dictCode) { value = serverDisk.serverDiskNum; } }); diff --git a/ruoyi-admin/src/main/resources/templates/template/tmplSwitch/edit.html b/ruoyi-admin/src/main/resources/templates/template/tmplSwitch/edit.html index 62884df12..dd1ca3682 100644 --- a/ruoyi-admin/src/main/resources/templates/template/tmplSwitch/edit.html +++ b/ruoyi-admin/src/main/resources/templates/template/tmplSwitch/edit.html @@ -63,7 +63,7 @@ required: true, minlength: 1, maxlength: 2 - }, + } }, focusCleanup: true }); diff --git a/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-generator/src/main/resources/generator.yml index 9fcc65c2b..67c537295 100644 --- a/ruoyi-generator/src/main/resources/generator.yml +++ b/ruoyi-generator/src/main/resources/generator.yml @@ -4,7 +4,7 @@ gen: # 作者 author: TP # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool - packageName: com.ruoyi.network + packageName: com.ruoyi.template # 自动去除表前缀,默认是true autoRemovePre: fasle # 表前缀(类名不会包含表前缀) diff --git a/ruoyi-system/src/main/java/com/ruoyi/template/mapper/TmplServerDiskMapper.java b/ruoyi-system/src/main/java/com/ruoyi/template/mapper/TmplServerDiskMapper.java index 6ce07f01e..dab138a04 100755 --- a/ruoyi-system/src/main/java/com/ruoyi/template/mapper/TmplServerDiskMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/template/mapper/TmplServerDiskMapper.java @@ -1,6 +1,8 @@ package com.ruoyi.template.mapper; import com.ruoyi.template.domain.TmplServerDisk; +import com.ruoyi.template.domain.TmplServerNetcard; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -19,6 +21,15 @@ public interface TmplServerDiskMapper { */ public TmplServerDisk selectTmplServerDiskById(Integer serverDiskId); + /** + * 查询服务器硬盘类型信息 + * + * @param serverId 服务器ID + * @return 服务器硬盘类型信息 + */ + public TmplServerNetcard selectByServerId(@Param("serverId") Integer serverId); + + /** * 查询服务器硬盘类型列表 * diff --git a/ruoyi-system/src/main/resources/mapper/template/TmplServerDiskMapper.xml b/ruoyi-system/src/main/resources/mapper/template/TmplServerDiskMapper.xml index 55846b375..f6fc72497 100755 --- a/ruoyi-system/src/main/resources/mapper/template/TmplServerDiskMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/template/TmplServerDiskMapper.xml @@ -30,6 +30,12 @@ where server_disk_id = #{serverDiskId} + + insert into tmpl_server_disk diff --git a/ruoyi-system/src/main/resources/mapper/template/TmplServerMapper.xml b/ruoyi-system/src/main/resources/mapper/template/TmplServerMapper.xml index 3a2e6ea1a..5400f7c88 100755 --- a/ruoyi-system/src/main/resources/mapper/template/TmplServerMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/template/TmplServerMapper.xml @@ -17,6 +17,9 @@ + +