style: 修改codegen命名

This commit is contained in:
橙子
2024-02-16 21:06:34 +08:00
parent 6675376241
commit 3f1f76b2e8
50 changed files with 141 additions and 143 deletions

View File

@@ -105,15 +105,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManageme
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManagement.Application.Contracts", "module\tenant-management\Yi.Framework.TenantManagement.Application.Contracts\Yi.Framework.TenantManagement.Application.Contracts.csproj", "{FA735055-CBDD-4EFD-B84B-85810DA1425E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManagement.Application.Contracts", "module\tenant-management\Yi.Framework.TenantManagement.Application.Contracts\Yi.Framework.TenantManagement.Application.Contracts.csproj", "{FA735055-CBDD-4EFD-B84B-85810DA1425E}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "code-gun", "code-gun", "{4FFE7212-21F2-476D-B628-3C65E6C5075E}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "code-gen", "code-gen", "{4FFE7212-21F2-476D-B628-3C65E6C5075E}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.CodeGun.Application", "module\code-gun\Yi.Framework.CodeGun.Application\Yi.Framework.CodeGun.Application.csproj", "{97EC40D7-DBFA-467A-98CB-221AF27B14F2}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application", "module\code-gen\Yi.Framework.Codegen.Application\Yi.Framework.CodeGen.Application.csproj", "{97EC40D7-DBFA-467A-98CB-221AF27B14F2}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.CodeGun.Application.Contracts", "module\code-gun\Yi.Framework.CodeGun.Application.Contracts\Yi.Framework.CodeGun.Application.Contracts.csproj", "{882BC563-2F75-4B95-AC96-F4BF23F5E69D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application.Contracts", "module\code-gen\Yi.Framework.Codegen.Application.Contracts\Yi.Framework.CodeGen.Application.Contracts.csproj", "{882BC563-2F75-4B95-AC96-F4BF23F5E69D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.CodeGun.Domain", "module\code-gun\Yi.Framework.CodeGun.Domain\Yi.Framework.CodeGun.Domain.csproj", "{85CB8517-2B80-42D8-B954-081079AC9BA0}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain", "module\code-gen\Yi.Framework.Codegen.Domain\Yi.Framework.CodeGen.Domain.csproj", "{85CB8517-2B80-42D8-B954-081079AC9BA0}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.CodeGun.Domain.Shared", "module\code-gun\Yi.Framework.CodeGun.Domain.Shared\Yi.Framework.CodeGun.Domain.Shared.csproj", "{EEFF0F05-2709-4151-A8CE-667935CEAE0B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain.Shared", "module\code-gen\Yi.Framework.Codegen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj", "{EEFF0F05-2709-4151-A8CE-667935CEAE0B}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -5,18 +5,18 @@ using Yi.Framework.AuditLogging.Domain.Repositories;
using Yi.Framework.AuditLogging.SqlSugarCore.Repositories; using Yi.Framework.AuditLogging.SqlSugarCore.Repositories;
using Yi.Framework.SqlSugarCore; using Yi.Framework.SqlSugarCore;
namespace Yi.AuditLogging.SqlSugarCore namespace Yi.Framework.AuditLogging.SqlSugarCore
{ {
[DependsOn( [DependsOn(
typeof(YiFrameworkAuditLoggingDomainModule), typeof(YiFrameworkAuditLoggingDomainModule),
typeof(YiFrameworkSqlSugarCoreModule))] typeof(YiFrameworkSqlSugarCoreModule))]
public class YiFrameworkAuditLoggingSqlSugarCoreModule : AbpModule public class YiFrameworkAuditLoggingSqlSugarCoreModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
context.Services.AddTransient<IAuditLogRepository, SqlSugarCoreAuditLogRepository>(); context.Services.AddTransient<IAuditLogRepository, SqlSugarCoreAuditLogRepository>();
} }
} }
} }

View File

@@ -1,7 +1,7 @@
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Yi.Framework.CodeGun.Domain.Shared.Enums; using Yi.Framework.CodeGen.Domain.Shared.Enums;
namespace Yi.Framework.CodeGun.Application.Contracts.Dtos.Field namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Field
{ {
public class FieldDto : EntityDto<Guid> public class FieldDto : EntityDto<Guid>
{ {

View File

@@ -1,6 +1,6 @@
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGun.Application.Contracts.Dtos.Field namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Field
{ {
public class FieldGetListInput : PagedAndSortedResultRequestDto public class FieldGetListInput : PagedAndSortedResultRequestDto
{ {

View File

@@ -1,7 +1,7 @@
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Field; using Yi.Framework.CodeGen.Application.Contracts.Dtos.Field;
namespace Yi.Framework.CodeGun.Application.Contracts.Dtos.Table namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Table
{ {
public class TableDto : EntityDto<Guid> public class TableDto : EntityDto<Guid>
{ {

View File

@@ -1,6 +1,6 @@
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGun.Application.Contracts.Dtos.Table namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Table
{ {
public class TableGetListInput : PagedAndSortedResultRequestDto public class TableGetListInput : PagedAndSortedResultRequestDto
{ {

View File

@@ -1,6 +1,6 @@
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGun.Application.Contracts.Dtos.Template namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Template
{ {
public class TemplateDto : EntityDto<Guid> public class TemplateDto : EntityDto<Guid>
{ {

View File

@@ -1,6 +1,6 @@
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
namespace Yi.Framework.CodeGun.Application.Contracts.Dtos.Template namespace Yi.Framework.CodeGen.Application.Contracts.Dtos.Template
{ {
public class TemplateGetListInput : PagedAndSortedResultRequestDto public class TemplateGetListInput : PagedAndSortedResultRequestDto
{ {

View File

@@ -0,0 +1,8 @@
using Volo.Abp.Application.Services;
namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{
public interface ICodeGenService : IApplicationService
{
}
}

View File

@@ -1,7 +1,7 @@
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Field; using Yi.Framework.CodeGen.Application.Contracts.Dtos.Field;
using Yi.Framework.Ddd.Application.Contracts; using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGun.Application.Contracts.IServices namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{ {
public interface IFieldService : IYiCrudAppService<FieldDto, Guid, FieldGetListInput> public interface IFieldService : IYiCrudAppService<FieldDto, Guid, FieldGetListInput>
{ {

View File

@@ -1,7 +1,7 @@
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Table; using Yi.Framework.CodeGen.Application.Contracts.Dtos.Table;
using Yi.Framework.Ddd.Application.Contracts; using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGun.Application.Contracts.IServices namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{ {
public interface ITableService : IYiCrudAppService<TableDto, Guid, TableGetListInput> public interface ITableService : IYiCrudAppService<TableDto, Guid, TableGetListInput>
{ {

View File

@@ -1,7 +1,7 @@
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Template; using Yi.Framework.CodeGen.Application.Contracts.Dtos.Template;
using Yi.Framework.Ddd.Application.Contracts; using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGun.Application.Contracts.IServices namespace Yi.Framework.CodeGen.Application.Contracts.IServices
{ {
public interface ITemplateService : IYiCrudAppService<TemplateDto, Guid, TemplateGetListInput> public interface ITemplateService : IYiCrudAppService<TemplateDto, Guid, TemplateGetListInput>
{ {

View File

@@ -8,7 +8,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj" /> <ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj" />
<ProjectReference Include="..\Yi.Framework.CodeGun.Domain.Shared\Yi.Framework.CodeGun.Domain.Shared.csproj" /> <ProjectReference Include="..\Yi.Framework.CodeGen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -0,0 +1,12 @@
using Yi.Framework.CodeGen.Domain.Shared;
using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGen.Application.Contracts
{
[DependsOn(typeof(YiFrameworkCodeGenDomainSharedModule),
typeof(YiFrameworkDddApplicationContractsModule))]
public class YiFrameworkCodeGenApplicationContractsModule : AbpModule
{
}
}

View File

@@ -3,22 +3,22 @@ using System.Runtime.InteropServices;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using Yi.Framework.CodeGun.Application.Contracts.IServices; using Yi.Framework.CodeGen.Application.Contracts.IServices;
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
using Yi.Framework.CodeGun.Domain.Managers; using Yi.Framework.CodeGen.Domain.Managers;
using Yi.Framework.SqlSugarCore.Abstractions; using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.CodeGun.Application.Services namespace Yi.Framework.CodeGen.Application.Services
{ {
/// <summary> /// <summary>
/// CodeGun /// CodeGen
/// </summary> /// </summary>
public class CodeGunService : ApplicationService, ICodeGunService public class CodeGenService : ApplicationService, ICodeGenService
{ {
private ISqlSugarRepository<TableAggregateRoot, Guid> _tableRepository; private ISqlSugarRepository<TableAggregateRoot, Guid> _tableRepository;
private CodeFileManager _codeFileManager; private CodeFileManager _codeFileManager;
private WebTemplateManager _webTemplateManager; private WebTemplateManager _webTemplateManager;
public CodeGunService(ISqlSugarRepository<TableAggregateRoot, Guid> tableRepository, CodeFileManager codeFileManager, WebTemplateManager webTemplateManager) public CodeGenService(ISqlSugarRepository<TableAggregateRoot, Guid> tableRepository, CodeFileManager codeFileManager, WebTemplateManager webTemplateManager)
{ {
_tableRepository = tableRepository; _tableRepository = tableRepository;
_codeFileManager = codeFileManager; _codeFileManager = codeFileManager;
@@ -80,8 +80,8 @@ namespace Yi.Framework.CodeGun.Application.Services
/// 打开目录 /// 打开目录
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost("code-gun/dir/{**path}")] [HttpPost("code-gen/dir/{**path}")]
public async Task PostDir([FromRoute]string path) public async Task PostDir([FromRoute] string path)
{ {
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{ {

View File

@@ -6,14 +6,14 @@ using Newtonsoft.Json.Linq;
using SqlSugar; using SqlSugar;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Field; using Yi.Framework.CodeGen.Application.Contracts.Dtos.Field;
using Yi.Framework.CodeGun.Application.Contracts.IServices; using Yi.Framework.CodeGen.Application.Contracts.IServices;
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
using Yi.Framework.CodeGun.Domain.Shared.Enums; using Yi.Framework.CodeGen.Domain.Shared.Enums;
using Yi.Framework.Ddd.Application; using Yi.Framework.Ddd.Application;
using Yi.Framework.SqlSugarCore.Abstractions; using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.CodeGun.Application.Services namespace Yi.Framework.CodeGen.Application.Services
{ {
/// <summary> /// <summary>
/// 字段管理 /// 字段管理

View File

@@ -1,11 +1,11 @@
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Table; using Yi.Framework.CodeGen.Application.Contracts.Dtos.Table;
using Yi.Framework.CodeGun.Application.Contracts.IServices; using Yi.Framework.CodeGen.Application.Contracts.IServices;
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
using Yi.Framework.Ddd.Application; using Yi.Framework.Ddd.Application;
namespace Yi.Framework.CodeGun.Application.Services namespace Yi.Framework.CodeGen.Application.Services
{ {
public class TableService : YiCrudAppService<TableAggregateRoot, TableDto, Guid, TableGetListInput>, ITableService public class TableService : YiCrudAppService<TableAggregateRoot, TableDto, Guid, TableGetListInput>, ITableService
{ {

View File

@@ -1,16 +1,16 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SqlSugar; using SqlSugar;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Template; using Yi.Framework.CodeGen.Application.Contracts.Dtos.Template;
using Yi.Framework.CodeGun.Application.Contracts.IServices; using Yi.Framework.CodeGen.Application.Contracts.IServices;
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
using Yi.Framework.Ddd.Application; using Yi.Framework.Ddd.Application;
using Yi.Framework.SqlSugarCore.Abstractions; using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.CodeGun.Application.Services; namespace Yi.Framework.CodeGen.Application.Services;
public class TemplateService : YiCrudAppService<TemplateEntity, TemplateDto, Guid, TemplateGetListInput>, ITemplateService public class TemplateService : YiCrudAppService<TemplateEntity, TemplateDto, Guid, TemplateGetListInput>, ITemplateService
{ {
private ISqlSugarRepository<TemplateEntity, Guid> _repository; private ISqlSugarRepository<TemplateEntity, Guid> _repository;
public TemplateService(ISqlSugarRepository<TemplateEntity, Guid> repository) : base(repository) public TemplateService(ISqlSugarRepository<TemplateEntity, Guid> repository) : base(repository)
{ {

View File

@@ -8,8 +8,8 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" /> <ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" />
<ProjectReference Include="..\Yi.Framework.CodeGun.Application.Contracts\Yi.Framework.CodeGun.Application.Contracts.csproj" /> <ProjectReference Include="..\Yi.Framework.CodeGen.Application.Contracts\Yi.Framework.CodeGen.Application.Contracts.csproj" />
<ProjectReference Include="..\Yi.Framework.CodeGun.Domain\Yi.Framework.CodeGun.Domain.csproj" /> <ProjectReference Include="..\Yi.Framework.CodeGen.Domain\Yi.Framework.CodeGen.Domain.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -0,0 +1,14 @@
using Yi.Framework.CodeGen.Application.Contracts;
using Yi.Framework.CodeGen.Domain;
using Yi.Framework.Ddd.Application;
namespace Yi.Framework.CodeGen.Application
{
[DependsOn(typeof(YiFrameworkCodeGenApplicationContractsModule),
typeof(YiFrameworkCodeGenDomainModule),
typeof(YiFrameworkDddApplicationModule))]
public class YiFrameworkCodeGenApplicationModule : AbpModule
{
}
}

View File

@@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Yi.Framework.CodeGun.Domain.Shared.Enums namespace Yi.Framework.CodeGen.Domain.Shared.Enums
{ {
public enum FieldTypeEnum public enum FieldTypeEnum
{ {

View File

@@ -1,10 +1,10 @@
using Volo.Abp.Domain; using Volo.Abp.Domain;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
namespace Yi.Framework.CodeGun.Domain.Shared namespace Yi.Framework.CodeGen.Domain.Shared
{ {
[DependsOn(typeof(AbpDddDomainSharedModule))] [DependsOn(typeof(AbpDddDomainSharedModule))]
public class YiFrameworkCodeGunDomainSharedModule:AbpModule public class YiFrameworkCodeGenDomainSharedModule : AbpModule
{ {
} }

View File

@@ -1,8 +1,8 @@
using SqlSugar; using SqlSugar;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
using Yi.Framework.CodeGun.Domain.Shared.Enums; using Yi.Framework.CodeGen.Domain.Shared.Enums;
namespace Yi.Framework.CodeGun.Domain.Entities namespace Yi.Framework.CodeGen.Domain.Entities
{ {
[SugarTable("YiField")] [SugarTable("YiField")]
public class FieldEntity : Entity<Guid> public class FieldEntity : Entity<Guid>

View File

@@ -1,7 +1,7 @@
using SqlSugar; using SqlSugar;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
namespace Yi.Framework.CodeGun.Domain.Entities namespace Yi.Framework.CodeGen.Domain.Entities
{ {
[SugarTable("YiTable")] [SugarTable("YiTable")]
public class TableAggregateRoot : AggregateRoot<Guid> public class TableAggregateRoot : AggregateRoot<Guid>

View File

@@ -1,7 +1,7 @@
using SqlSugar; using SqlSugar;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
namespace Yi.Framework.CodeGun.Domain.Entities namespace Yi.Framework.CodeGen.Domain.Entities
{ {
[SugarTable("YiTemplate")] [SugarTable("YiTemplate")]
public class TemplateEntity : Entity<Guid> public class TemplateEntity : Entity<Guid>

View File

@@ -1,9 +1,9 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using Yi.Framework.CodeGun.Domain.Shared.Enums; using Yi.Framework.CodeGen.Domain.Shared.Enums;
namespace Yi.Framework.CodeGun.Domain.Handlers namespace Yi.Framework.CodeGen.Domain.Handlers
{ {
public class FieldTemplateHandler : TemplateHandlerBase, ITemplateHandler public class FieldTemplateHandler : TemplateHandlerBase, ITemplateHandler
{ {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Yi.Framework.CodeGun.Domain.Handlers namespace Yi.Framework.CodeGen.Domain.Handlers
{ {
public class HandledTemplate public class HandledTemplate
{ {

View File

@@ -1,9 +1,9 @@
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
namespace Yi.Framework.CodeGun.Domain.Handlers namespace Yi.Framework.CodeGen.Domain.Handlers
{ {
public interface ITemplateHandler: ISingletonDependency public interface ITemplateHandler : ISingletonDependency
{ {
void SetTable(TableAggregateRoot table); void SetTable(TableAggregateRoot table);
HandledTemplate Invoker(string str, string path); HandledTemplate Invoker(string str, string path);

View File

@@ -1,4 +1,4 @@
namespace Yi.Framework.CodeGun.Domain.Handlers namespace Yi.Framework.CodeGen.Domain.Handlers
{ {
public class ModelTemplateHandler : TemplateHandlerBase, ITemplateHandler public class ModelTemplateHandler : TemplateHandlerBase, ITemplateHandler
{ {

View File

@@ -1,4 +1,4 @@
namespace Yi.Framework.CodeGun.Domain.Handlers namespace Yi.Framework.CodeGen.Domain.Handlers
{ {
public class NameSpaceTemplateHandler : TemplateHandlerBase, ITemplateHandler public class NameSpaceTemplateHandler : TemplateHandlerBase, ITemplateHandler
{ {

View File

@@ -1,6 +1,6 @@
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
namespace Yi.Framework.CodeGun.Domain.Handlers namespace Yi.Framework.CodeGen.Domain.Handlers
{ {
public class TemplateHandlerBase public class TemplateHandlerBase
{ {

View File

@@ -1,9 +1,9 @@
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
using Yi.Framework.CodeGun.Domain.Handlers; using Yi.Framework.CodeGen.Domain.Handlers;
using Yi.Framework.SqlSugarCore.Abstractions; using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.CodeGun.Domain.Managers namespace Yi.Framework.CodeGen.Domain.Managers
{ {
/// <summary> /// <summary>
/// 代码文件领域服务,与代码文件生成相关web to code /// 代码文件领域服务,与代码文件生成相关web to code

View File

@@ -1,6 +1,6 @@
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
namespace Yi.Framework.CodeGun.Domain.Managers namespace Yi.Framework.CodeGen.Domain.Managers
{ {
/// <summary> /// <summary>
/// 数据库领域服务与数据库相关同步到数据库web to db code to db /// 数据库领域服务与数据库相关同步到数据库web to db code to db

View File

@@ -2,11 +2,11 @@
using System.Reflection; using System.Reflection;
using SqlSugar; using SqlSugar;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Yi.Framework.CodeGun.Domain.Entities; using Yi.Framework.CodeGen.Domain.Entities;
using Yi.Framework.CodeGun.Domain.Shared.Enums; using Yi.Framework.CodeGen.Domain.Shared.Enums;
using Yi.Framework.SqlSugarCore.Abstractions; using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.CodeGun.Domain.Managers namespace Yi.Framework.CodeGen.Domain.Managers
{ {
/// <summary> /// <summary>
/// 与webfrist相关同步到webcode to web /// 与webfrist相关同步到webcode to web
@@ -18,7 +18,7 @@ namespace Yi.Framework.CodeGun.Domain.Managers
public WebTemplateManager(ISqlSugarRepository<TableAggregateRoot> repository, IModuleContainer moduleContainer) public WebTemplateManager(ISqlSugarRepository<TableAggregateRoot> repository, IModuleContainer moduleContainer)
{ {
_repository = repository; _repository = repository;
_moduleContainer= moduleContainer; _moduleContainer = moduleContainer;
} }
/// <summary> /// <summary>
/// 通过当前的实体代码获取表存储 /// 通过当前的实体代码获取表存储

View File

@@ -17,6 +17,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj" /> <ProjectReference Include="..\..\..\framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj" />
<ProjectReference Include="..\Yi.Framework.CodeGun.Domain.Shared\Yi.Framework.CodeGun.Domain.Shared.csproj" /> <ProjectReference Include="..\Yi.Framework.CodeGen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1,14 +1,14 @@
using Volo.Abp.Domain; using Volo.Abp.Domain;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Yi.Framework.CodeGun.Domain.Shared; using Yi.Framework.CodeGen.Domain.Shared;
using Yi.Framework.SqlSugarCore.Abstractions; using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.CodeGun.Domain namespace Yi.Framework.CodeGen.Domain
{ {
[DependsOn(typeof(YiFrameworkCodeGunDomainSharedModule), [DependsOn(typeof(YiFrameworkCodeGenDomainSharedModule),
typeof(AbpDddDomainModule), typeof(AbpDddDomainModule),
typeof(YiFrameworkSqlSugarCoreAbstractionsModule))] typeof(YiFrameworkSqlSugarCoreAbstractionsModule))]
public class YiFrameworkCodeGunDomainModule : AbpModule public class YiFrameworkCodeGenDomainModule : AbpModule
{ {
} }

View File

@@ -1,8 +0,0 @@
using Volo.Abp.Application.Services;
namespace Yi.Framework.CodeGun.Application.Contracts.IServices
{
public interface ICodeGunService : IApplicationService
{
}
}

View File

@@ -1,12 +0,0 @@
using Yi.Framework.CodeGun.Domain.Shared;
using Yi.Framework.Ddd.Application.Contracts;
namespace Yi.Framework.CodeGun.Application.Contracts
{
[DependsOn(typeof(YiFrameworkCodeGunDomainSharedModule),
typeof(YiFrameworkDddApplicationContractsModule))]
public class YiFrameworkCodeGunApplicationContractsModule:AbpModule
{
}
}

View File

@@ -1,14 +0,0 @@
using Yi.Framework.CodeGun.Application.Contracts;
using Yi.Framework.CodeGun.Domain;
using Yi.Framework.Ddd.Application;
namespace Yi.Framework.CodeGun.Application
{
[DependsOn(typeof(YiFrameworkCodeGunApplicationContractsModule),
typeof(YiFrameworkCodeGunDomainModule),
typeof(YiFrameworkDddApplicationModule))]
public class YiFrameworkCodeGunApplicationModule : AbpModule
{
}
}

View File

@@ -5,8 +5,9 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.MultiTenancy; namespace Yi.Framework.TenantManagement.Domain;
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
public class YiMultiTenantConnectionStringResolver : DefaultConnectionStringResolver public class YiMultiTenantConnectionStringResolver : DefaultConnectionStringResolver

View File

@@ -8,7 +8,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" /> <ProjectReference Include="..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" />
<ProjectReference Include="..\..\module\bbs\Yi.Framework.Bbs.Application\Yi.Framework.Bbs.Application.csproj" /> <ProjectReference Include="..\..\module\bbs\Yi.Framework.Bbs.Application\Yi.Framework.Bbs.Application.csproj" />
<ProjectReference Include="..\..\module\code-gun\Yi.Framework.CodeGun.Application\Yi.Framework.CodeGun.Application.csproj" /> <ProjectReference Include="..\..\module\code-gen\Yi.Framework.CodeGen.Application\Yi.Framework.CodeGen.Application.csproj" />
<ProjectReference Include="..\..\module\rbac\Yi.Framework.Rbac.Application\Yi.Framework.Rbac.Application.csproj" /> <ProjectReference Include="..\..\module\rbac\Yi.Framework.Rbac.Application\Yi.Framework.Rbac.Application.csproj" />
<ProjectReference Include="..\..\module\tenant-management\Yi.Framework.TenantManagement.Application\Yi.Framework.TenantManagement.Application.csproj" /> <ProjectReference Include="..\..\module\tenant-management\Yi.Framework.TenantManagement.Application\Yi.Framework.TenantManagement.Application.csproj" />
<ProjectReference Include="..\Yi.Abp.Application.Contracts\Yi.Abp.Application.Contracts.csproj" /> <ProjectReference Include="..\Yi.Abp.Application.Contracts\Yi.Abp.Application.Contracts.csproj" />

View File

@@ -1,8 +1,7 @@
using Volo.Abp.Modularity; using Yi.Abp.Application.Contracts;
using Yi.Abp.Application.Contracts;
using Yi.Abp.Domain; using Yi.Abp.Domain;
using Yi.Framework.Bbs.Application; using Yi.Framework.Bbs.Application;
using Yi.Framework.CodeGun.Application; using Yi.Framework.CodeGen.Application;
using Yi.Framework.Ddd.Application; using Yi.Framework.Ddd.Application;
using Yi.Framework.Rbac.Application; using Yi.Framework.Rbac.Application;
using Yi.Framework.TenantManagement.Application; using Yi.Framework.TenantManagement.Application;
@@ -17,7 +16,7 @@ namespace Yi.Abp.Application
typeof(YiFrameworkRbacApplicationModule), typeof(YiFrameworkRbacApplicationModule),
typeof(YiFrameworkBbsApplicationModule), typeof(YiFrameworkBbsApplicationModule),
typeof(YiFrameworkTenantManagementApplicationModule), typeof(YiFrameworkTenantManagementApplicationModule),
typeof(YiFrameworkCodeGunApplicationModule), typeof(YiFrameworkCodeGenApplicationModule),
typeof(YiFrameworkDddApplicationModule) typeof(YiFrameworkDddApplicationModule)
)] )]

View File

@@ -2,7 +2,7 @@
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Yi.Abp.Domain; using Yi.Abp.Domain;
using Yi.Abp.SqlSugarCore; using Yi.Abp.SqlSugarCore;
using Yi.AuditLogging.SqlSugarCore; using Yi.Framework.AuditLogging.SqlSugarCore;
using Yi.Framework.Bbs.SqlSugarCore; using Yi.Framework.Bbs.SqlSugarCore;
using Yi.Framework.Mapster; using Yi.Framework.Mapster;
using Yi.Framework.Rbac.SqlSugarCore; using Yi.Framework.Rbac.SqlSugarCore;

View File

@@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
using Volo.Abp;
using Volo.Abp.AspNetCore.Authentication.JwtBearer; using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
@@ -13,7 +12,6 @@ using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Auditing; using Volo.Abp.Auditing;
using Volo.Abp.Autofac; using Volo.Abp.Autofac;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.Swashbuckle; using Volo.Abp.Swashbuckle;
using Yi.Abp.Application; using Yi.Abp.Application;
@@ -25,7 +23,7 @@ using Yi.Framework.AspNetCore.Authentication.OAuth.QQ;
using Yi.Framework.AspNetCore.Microsoft.AspNetCore.Builder; using Yi.Framework.AspNetCore.Microsoft.AspNetCore.Builder;
using Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection; using Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection;
using Yi.Framework.Bbs.Application; using Yi.Framework.Bbs.Application;
using Yi.Framework.CodeGun.Application; using Yi.Framework.CodeGen.Application;
using Yi.Framework.Rbac.Application; using Yi.Framework.Rbac.Application;
using Yi.Framework.Rbac.Domain.Authorization; using Yi.Framework.Rbac.Domain.Authorization;
using Yi.Framework.Rbac.Domain.Shared.Consts; using Yi.Framework.Rbac.Domain.Shared.Consts;
@@ -75,7 +73,7 @@ namespace Yi.Abp.Web
options.ConventionalControllers.Create(typeof(YiFrameworkRbacApplicationModule).Assembly, options => options.RemoteServiceName = "rbac"); options.ConventionalControllers.Create(typeof(YiFrameworkRbacApplicationModule).Assembly, options => options.RemoteServiceName = "rbac");
options.ConventionalControllers.Create(typeof(YiFrameworkBbsApplicationModule).Assembly, options => options.RemoteServiceName = "bbs"); options.ConventionalControllers.Create(typeof(YiFrameworkBbsApplicationModule).Assembly, options => options.RemoteServiceName = "bbs");
options.ConventionalControllers.Create(typeof(YiFrameworkTenantManagementApplicationModule).Assembly, options => options.RemoteServiceName = "tenant-management"); options.ConventionalControllers.Create(typeof(YiFrameworkTenantManagementApplicationModule).Assembly, options => options.RemoteServiceName = "tenant-management");
options.ConventionalControllers.Create(typeof(YiFrameworkCodeGunApplicationModule).Assembly, options => options.RemoteServiceName = "code-gun"); options.ConventionalControllers.Create(typeof(YiFrameworkCodeGenApplicationModule).Assembly, options => options.RemoteServiceName = "code-gun");
}); });
//设置api格式 //设置api格式

Binary file not shown.

View File

@@ -2,14 +2,14 @@ import request from '@/utils/request'
// code to web // code to web
export function codeToWeb() { export function codeToWeb() {
return request({ return request({
url: 'code-gun/code-build-web', url: 'code-gen/code-build-web',
method: 'post' method: 'post'
}) })
} }
// code to web // code to web
export function webToCode(ids) { export function webToCode(ids) {
return request({ return request({
url: 'code-gun/web-build-code', url: 'code-gen/web-build-code',
method: 'post', method: 'post',
data:ids data:ids
}) })
@@ -18,7 +18,7 @@ export function webToCode(ids) {
// open zhe path // open zhe path
export function openPath(path) { export function openPath(path) {
return request({ return request({
url: `code-gun/dir/${encodeURIComponent(path)}`, url: `code-gen/dir/${encodeURIComponent(path)}`,
method: 'post' method: 'post'
}) })
} }

View File

@@ -61,7 +61,7 @@
plain plain
icon="Plus" icon="Plus"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['codeGun:table:add']" v-hasPermi="['codeGen:table:add']"
>新增</el-button >新增</el-button
> >
</el-col> </el-col>
@@ -72,7 +72,7 @@
icon="Edit" icon="Edit"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['codeGun:table:edit']" v-hasPermi="['codeGen:table:edit']"
>修改</el-button >修改</el-button
> >
</el-col> </el-col>
@@ -83,7 +83,7 @@
icon="Delete" icon="Delete"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['codeGun:table:remove']" v-hasPermi="['codeGen:table:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col>
@@ -93,7 +93,7 @@
plain plain
icon="Download" icon="Download"
@click="handleExport" @click="handleExport"
v-hasPermi="['codeGun:table:export']" v-hasPermi="['codeGen:table:export']"
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
@@ -104,7 +104,7 @@
plain plain
icon="Switch" icon="Switch"
@click="handleExport" @click="handleExport"
v-hasPermi="['codeGun:table:export']" v-hasPermi="['codeGen:table:export']"
>同步数据库WebToDb</el-button >同步数据库WebToDb</el-button
> >
</el-col> --> </el-col> -->
@@ -115,7 +115,7 @@
icon="Switch" icon="Switch"
@click="handleWebToCode" @click="handleWebToCode"
:disabled="ids.length==0" :disabled="ids.length==0"
v-hasPermi="['codeGun:table:export']" v-hasPermi="['codeGen:table:export']"
>代码生成WebToCode</el-button >代码生成WebToCode</el-button
> >
</el-col> </el-col>
@@ -126,7 +126,7 @@
plain plain
icon="Switch" icon="Switch"
@click="handleCodeToWeb" @click="handleCodeToWeb"
v-hasPermi="['codeGun:table:export']" v-hasPermi="['codeGen:table:export']"
>实体同步CodeToWeb</el-button >实体同步CodeToWeb</el-button
> >
</el-col> </el-col>
@@ -243,7 +243,7 @@ import {
addData, addData,
updateData, updateData,
} from "@/api/code/tableApi"; } from "@/api/code/tableApi";
import { codeToWeb,webToCode } from "@/api/code/codeGunApi"; import { codeToWeb,webToCode } from "@/api/code/codeGenApi";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable"); const { sys_normal_disable } = proxy.useDict("sys_normal_disable");

View File

@@ -46,7 +46,7 @@
plain plain
icon="Plus" icon="Plus"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['codeGun:template:add']" v-hasPermi="['codeGen:template:add']"
>新增</el-button >新增</el-button
> >
</el-col> </el-col>
@@ -57,7 +57,7 @@
icon="Edit" icon="Edit"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['codeGun:template:edit']" v-hasPermi="['codeGen:template:edit']"
>修改</el-button >修改</el-button
> >
</el-col> </el-col>
@@ -68,7 +68,7 @@
icon="Delete" icon="Delete"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['codeGun:template:remove']" v-hasPermi="['codeGen:template:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col>
@@ -78,7 +78,7 @@
plain plain
icon="Download" icon="Download"
@click="handleExport" @click="handleExport"
v-hasPermi="['codeGun:template:export']" v-hasPermi="['codeGen:template:export']"
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
@@ -145,14 +145,14 @@
type="text" type="text"
icon="Edit" icon="Edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['codeGun:template:edit']" v-hasPermi="['codeGen:template:edit']"
>修改</el-button >修改</el-button
> >
<el-button <el-button
type="text" type="text"
icon="Delete" icon="Delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['codeGun:template:remove']" v-hasPermi="['codeGen:template:remove']"
>删除</el-button >删除</el-button
> >
</template> </template>
@@ -232,7 +232,7 @@ import {
addData, addData,
updateData, updateData,
} from "@/api/code/templateApi"; } from "@/api/code/templateApi";
import {openPath} from "@/api/code/codeGunApi"; import {openPath} from "@/api/code/codeGenApi";
import { ref } from "@vue/reactivity"; import { ref } from "@vue/reactivity";
import ReplaceText from './components/ReplaceText' import ReplaceText from './components/ReplaceText'
import TempalteTip from './components/TempalteTip.vue' import TempalteTip from './components/TempalteTip.vue'

View File

@@ -6,7 +6,7 @@
该文件为通用Crud模板文件按照规范只需要 替换以下变量即可 该文件为通用Crud模板文件按照规范只需要 替换以下变量即可
租户 实体中文名称 租户 实体中文名称
system:tenant crud权限编码 system:tenant crud权限编码
system/tenant : api文件路径,例如codeGun/tableApi system/tenant : api文件路径,例如codeGen/tableApi
</div> --> </div> -->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="租户名称" prop="name"> <el-form-item label="租户名称" prop="name">