From 99595c1993d09470218b78337661041a97d0b370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Fri, 20 May 2022 14:40:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/CodeGenTemplate/MySqlTemplate.txt | 2 +- .../wwwroot/CodeGenTemplate/SqlTemplate.txt | 2 +- .../wwwroot/CodeGenTemplate/TplModel.txt | 2 +- ZR.Model/System/Dto/GenTableDto.cs | 9 +++++---- ZR.Repository/System/GenTableRepository.cs | 3 ++- ZR.Vue/src/views/tool/gen/editTable.vue | 15 ++++++++++----- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/MySqlTemplate.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/MySqlTemplate.txt index 8531aaf..3c0d5d4 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/MySqlTemplate.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/MySqlTemplate.txt @@ -2,7 +2,7 @@ -- 菜单 INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by, create_time) -VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', '', 'system', sysdate()); +VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', 'icon1', 'system', sysdate()); -- 按钮父菜单id SELECT @menuId := LAST_INSERT_ID(); diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/SqlTemplate.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/SqlTemplate.txt index fe01bb2..20e0718 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/SqlTemplate.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/SqlTemplate.txt @@ -2,7 +2,7 @@ -- ${genTable.functionName}菜单 INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by, create_time) -VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', '', 'system', GETDATE()); +VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', 'icon1', 'system', GETDATE()); -- 按钮父菜单id declare @menuId int = @@identity diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt index affee9d..67de9fc 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt @@ -16,7 +16,7 @@ namespace ${options.ModelsNamespace}.Models { $foreach(item in genTable.Columns) /// - /// 描述 :${item.ColumnComment} + /// 描述 :${item.ColumnComment} ${item.Remark} /// 空值 :$if(item.IsRequired == "True") false $else true $end /// $if(replaceDto.ShowBtnExport) diff --git a/ZR.Model/System/Dto/GenTableDto.cs b/ZR.Model/System/Dto/GenTableDto.cs index 24fb31a..742d8e0 100644 --- a/ZR.Model/System/Dto/GenTableDto.cs +++ b/ZR.Model/System/Dto/GenTableDto.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using ZR.Model.System.Generate; +using System.Collections.Generic; namespace ZR.Model.System.Dto { @@ -73,6 +70,10 @@ namespace ZR.Model.System.Dto /// 字典类型 /// public string DictType { get; set; } + /// + /// 备注 + /// + public string Remark { get; set; } } } diff --git a/ZR.Repository/System/GenTableRepository.cs b/ZR.Repository/System/GenTableRepository.cs index 234992a..add6108 100644 --- a/ZR.Repository/System/GenTableRepository.cs +++ b/ZR.Repository/System/GenTableRepository.cs @@ -81,7 +81,8 @@ namespace ZR.Repository.System it.Sort, it.Update_time, it.DictType, - it.Update_by + it.Update_by, + it.Remark }) .ExecuteCommand(); } diff --git a/ZR.Vue/src/views/tool/gen/editTable.vue b/ZR.Vue/src/views/tool/gen/editTable.vue index accfacc..6e7c24e 100644 --- a/ZR.Vue/src/views/tool/gen/editTable.vue +++ b/ZR.Vue/src/views/tool/gen/editTable.vue @@ -9,9 +9,9 @@ - - - + + + - + - + + + +