⚡优化代码生成
This commit is contained in:
parent
eef8962974
commit
3337b9abb3
@ -256,8 +256,18 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
if (genTableInfo.GenType == "1")
|
||||
{
|
||||
var genPath = genTableInfo.GenPath;
|
||||
string parentPath;
|
||||
string tempPath = WebHostEnvironment.ContentRootPath;
|
||||
var parentPath = tempPath[..tempPath.LastIndexOf(@"\")];
|
||||
|
||||
if (ComputerHelper.IsUnix())
|
||||
{
|
||||
parentPath = Path.Combine(WebHostEnvironment.WebRootPath, "Generatecode");
|
||||
}
|
||||
else
|
||||
{
|
||||
parentPath = tempPath[..tempPath.LastIndexOf(@"\")];
|
||||
}
|
||||
Console.WriteLine("代码生成路径" + parentPath);
|
||||
//代码生成文件夹路径
|
||||
dto.GenCodePath = (genPath.IsEmpty() || genPath.Equals("/")) ? parentPath : genTableInfo.GenPath;
|
||||
}
|
||||
|
||||
@ -447,7 +447,7 @@ namespace ZR.CodeGenerator
|
||||
CheckedBtn = new int[] { 1, 2, 3 }
|
||||
}
|
||||
};
|
||||
genTable.Options.PermissionPrefix = $"{genTable.ModuleName.ToLower()}:{genTable.ClassName.ToLower()}";//权限
|
||||
genTable.Options.PermissionPrefix = $"{genTable.ClassName.ToLower()}";//权限
|
||||
|
||||
return genTable;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user