This commit is contained in:
zpc 2025-11-10 21:52:46 +08:00
parent 3eff16f73b
commit 546eaad4d4
3 changed files with 101 additions and 78 deletions

View File

@ -1,16 +1,19 @@
using HZY.Framework.Repository.EntityFramework.Models.Standard;
using MiaoYu.Repository.Admin.Entities.LowCode;
using MiaoYu.Repository.ChatAI.Admin.Entities;
using MiaoYu.Shared.Admin.Models.LowCodes;
using CoreIDatabaseTableService = MiaoYu.Core.CodeGenerator.Services.IDatabaseTableService;
using CoreICodeGenerationService = MiaoYu.Core.CodeGenerator.Services.ICodeGenerationService;
using CoreColumnMetaConfig = MiaoYu.Core.CodeGenerator.Models.ColumnMetaConfig;
using CoreDataSourceManager = MiaoYu.Core.CodeGenerator.Core.DataSourceManager;
using CoreEntityNamingStrategy = MiaoYu.Core.CodeGenerator.Abstractions.EntityNamingStrategy;
using CoreGenDbTableDto = MiaoYu.Core.CodeGenerator.Models.GenDbTableDto;
using CoreICodeGenerationService = MiaoYu.Core.CodeGenerator.Services.ICodeGenerationService;
using CoreIDatabaseTableService = MiaoYu.Core.CodeGenerator.Services.IDatabaseTableService;
using CoreITableMetaConfigService = MiaoYu.Core.CodeGenerator.Services.ITableMetaConfigService;
using CoreITableSchemaCache = MiaoYu.Core.CodeGenerator.Services.ITableSchemaCache;
using CoreEntityNamingStrategy = MiaoYu.Core.CodeGenerator.Abstractions.EntityNamingStrategy;
using CorePathResolver = MiaoYu.Core.CodeGenerator.Core.PathResolver;
using CoreGenDbTableDto = MiaoYu.Core.CodeGenerator.Models.GenDbTableDto;
using CoreTableMetaConfig = MiaoYu.Core.CodeGenerator.Models.TableMetaConfig;
using CoreColumnMetaConfig = MiaoYu.Core.CodeGenerator.Models.ColumnMetaConfig;
namespace MiaoYu.Api.Admin.ApplicationServices.DevelopmentTools.LowCode.Impl;

View File

@ -54,6 +54,16 @@
前端Service路径模板
</summary>
</member>
<member name="P:MiaoYu.Core.CodeGenerator.Abstractions.DataSourceConfig.MenuPathTemplate">
<summary>
前端菜单路径模板(支持占位符:{TableName}, {TableNameLower}
</summary>
</member>
<member name="P:MiaoYu.Core.CodeGenerator.Abstractions.DataSourceConfig.RouterPathTemplate">
<summary>
前端路由路径模板(支持占位符:{TableName}, {TableNameLower}
</summary>
</member>
<member name="P:MiaoYu.Core.CodeGenerator.Abstractions.DataSourceConfig.TemplatePath">
<summary>
代码生成模板目录
@ -489,6 +499,16 @@
前端服务保存位置
</summary>
</member>
<member name="P:MiaoYu.Core.CodeGenerator.Models.LowCodeTable.MenuPath">
<summary>
前端菜单路径
</summary>
</member>
<member name="P:MiaoYu.Core.CodeGenerator.Models.LowCodeTable.RouterPath">
<summary>
前端路由路径
</summary>
</member>
<member name="P:MiaoYu.Core.CodeGenerator.Models.LowCodeTable.IsCover">
<summary>
是否覆盖生成

View File

@ -177,19 +177,19 @@ public class CodeGenerationService : ICodeGenerationService, IScopedDependency
if (string.IsNullOrWhiteSpace(lowCodeTable.ClientIndexPath))
{
lowCodeTable.ClientIndexPath = _pathResolver.ResolvePath(
config.ClientIndexPathTemplate, config, lowCodeTable.TableName ?? string.Empty);
config.ClientIndexPathTemplate, config, lowCodeTable.TableName?.ToLower());
}
if (string.IsNullOrWhiteSpace(lowCodeTable.ClientInfoPath))
{
lowCodeTable.ClientInfoPath = _pathResolver.ResolvePath(
config.ClientInfoPathTemplate, config, lowCodeTable.TableName ?? string.Empty);
config.ClientInfoPathTemplate, config, lowCodeTable.TableName?.ToLower());
}
if (string.IsNullOrWhiteSpace(lowCodeTable.ClientServicePath))
{
lowCodeTable.ClientServicePath = _pathResolver.ResolvePath(
config.ClientServicePathTemplate, config, lowCodeTable.TableName ?? string.Empty);
config.ClientServicePathTemplate, config, lowCodeTable.TableName?.ToLower());
}
if (string.IsNullOrWhiteSpace(lowCodeTable.MenuPath))