| | |
| | |  |
| | | |
| | | using GenerateCode_WeiBen_WMS.Model; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | /// </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; |
| | | } |
| | | } |