优化代码生成
This commit is contained in:
@@ -46,10 +46,10 @@ namespace ZR.CodeGenerator
|
||||
replaceDto.ModelTypeName = dto.GenTable.ClassName;//表名对应C# 实体类名
|
||||
replaceDto.PermissionPrefix = $"{dto.GenTable.ModuleName.ToLower()}:{dto.GenTable.ClassName.ToLower()}";//权限
|
||||
replaceDto.Author = dto.GenTable.FunctionAuthor;
|
||||
replaceDto.ShowBtnAdd = dto.CheckedBtn.Any(f => f == 1);
|
||||
replaceDto.ShowBtnEdit = dto.CheckedBtn.Any(f => f == 2);
|
||||
replaceDto.ShowBtnDelete = dto.CheckedBtn.Any(f => f == 3);
|
||||
replaceDto.ShowBtnExport = dto.CheckedBtn.Any(f => f == 4);
|
||||
replaceDto.ShowBtnAdd = dto.GenTable.CheckedBtn.Any(f => f == 1);
|
||||
replaceDto.ShowBtnEdit = dto.GenTable.CheckedBtn.Any(f => f == 2);
|
||||
replaceDto.ShowBtnDelete = dto.GenTable.CheckedBtn.Any(f => f == 3);
|
||||
replaceDto.ShowBtnExport = dto.GenTable.CheckedBtn.Any(f => f == 4);
|
||||
|
||||
//循环表字段信息
|
||||
foreach (GenTableColumn dbFieldInfo in dto.GenTable.Columns.OrderBy(x => x.Sort))
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
using JinianNet.JNTemplate;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.CodeGenerator.Model;
|
||||
|
||||
namespace ZR.CodeGenerator
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace ZR.CodeGenerator.Model
|
||||
/// 生成代码方式(0zip压缩包 1自定义路径)
|
||||
/// </summary>
|
||||
public string GenType { get; set; }
|
||||
public string GenPath { get; set; } = "/";
|
||||
public string GenPath { get; set; } = "";
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user