From dbb886f05af928ec4bd8b632fe7204f2551ef866 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 04 5月 2025 22:09:04 +0800 Subject: [PATCH] 2222 --- Weben_CMS专用代码生成器/Code/Generate/Controller/Controller_Generate.cs | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Generate/Controller/Controller_Generate.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Generate/Controller/Controller_Generate.cs" index 3889b30..99dc295 100644 --- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Generate/Controller/Controller_Generate.cs" +++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Generate/Controller/Controller_Generate.cs" @@ -1,5 +1,6 @@ 锘� +using GenerateCode_WeiBen_WMS.Model; using System; using System.Collections.Generic; using System.Linq; @@ -12,24 +13,16 @@ /// </summary> public class Controller_Generate : BaseGenerate { - public static string CreateText(string Modulelogo, - string ChinaComment, List<ColumnModel> columnNameList, string entityName, string orderByName = "") + public static string CreateText(GenerateCodeParam param) { var str = TextHelper.ReadText(@"Templete\Controller妯℃澘.txt"); CommonReplace(ref str); - str = str.Replace("$ChinaComment$", ChinaComment);//涓枃娉ㄩ噴 - str = str.Replace("$EntityName$", entityName); - str = str.Replace("$Modulelogo$", Modulelogo);//妯″潡绠�鍐� - str = str.Replace("$OrderByName$", orderByName == "" ? "Id" : orderByName);//妯″潡绠�鍐� - str = str.Replace("$ValidateEmptyForInsert$", StructStrHelper.GetValidateEmptyStrForController(columnNameList)); - str = str.Replace("$ValidateEmptyForUpdate$", StructStrHelper.GetValidateEmptyStrForController(columnNameList, false)); + CommonReplace(ref str); + CommonHelper.CommonReplaceStr(param, ref str); - - var pageStr = StructStrHelper.GetPageFilterStrForController(columnNameList); - str = str.Replace("$PageSearchFilter$", pageStr); - + return str; } } -- Gitblit v1.9.3