优化配置文件查询

This commit is contained in:
不做码农
2022-02-23 18:30:17 +08:00
parent 3981fa2303
commit e98bde7ad5
13 changed files with 121 additions and 24 deletions

View File

@@ -78,7 +78,7 @@ namespace ZR.CodeGenerator
InitJntTemplate(dto, replaceDto);
replaceDto.VueViewListHtml = GenerateVueTableList();
replaceDto.VueQueryFormHtml = GenerateVueQueryForm();
GenerateModels(replaceDto, dto);
GenerateInputDto(replaceDto, dto);
GenerateRepository(replaceDto, dto);
@@ -277,8 +277,8 @@ namespace ZR.CodeGenerator
/// <returns></returns>
public static string GetClassName(string tableName)
{
bool autoRemovePre = ConfigUtils.Instance.GetAppConfig(GenConstants.Gen_autoPre, false);
string tablePrefix = ConfigUtils.Instance.GetAppConfig<string>(GenConstants.Gen_tablePrefix);
bool autoRemovePre = AppSettings.GetAppConfig(GenConstants.Gen_autoPre, false);
string tablePrefix = AppSettings.GetAppConfig<string>(GenConstants.Gen_tablePrefix);
if (!string.IsNullOrEmpty(tablePrefix) && autoRemovePre)
{
@@ -364,7 +364,7 @@ namespace ZR.CodeGenerator
ModuleName = "business",//导入默认模块名
ClassName = GetClassName(tableName).FirstUpperCase(),
BusinessName = tableName.UnderScoreToCamelCase().FirstUpperCase(),
FunctionAuthor = ConfigUtils.Instance.GetConfig(GenConstants.Gen_author),
FunctionAuthor = AppSettings.GetConfig(GenConstants.Gen_author),
TableName = tableName,
TableComment = desc,
FunctionName = desc,