feat: 完成abp-tool的接口调用

This commit is contained in:
橙子
2024-06-02 13:27:41 +08:00
parent cbc34ade78
commit bca3ce1e5f
6 changed files with 13 additions and 17 deletions

View File

@@ -1,14 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Services;
using Yi.Abp.Tool.Application.Contracts.Dtos;
namespace Yi.Abp.Tool.Application.Contracts
{
public interface ITemplateGenService
public interface ITemplateGenService: IApplicationService
{
Task<IActionResult> CreateModuleAsync(TemplateGenCreateInputDto moduleCreateInputDto);
Task<IActionResult> CreateProjectAsync(TemplateGenCreateInputDto moduleCreateInputDto);

View File

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

View File

@@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Services;
using Volo.Abp.DependencyInjection;
using Yi.Abp.Tool.Application.Contracts;
using Yi.Abp.Tool.Application.Contracts.Dtos;
@@ -15,7 +16,7 @@ using Yi.Framework.Core.Helper;
namespace Yi.Abp.Tool.Application
{
public class TemplateGenService : IRemoteService, ITemplateGenService, ITransientDependency
public class TemplateGenService : ApplicationService,ITemplateGenService
{
private readonly TemplateGenManager _templateGenManager;
public TemplateGenService(TemplateGenManager templateGenManager) { _templateGenManager = templateGenManager; }

View File

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

View File

@@ -1,7 +1,7 @@
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Yi.Abp.Tool;
using Yi.Abp.Tool.Application.Contracts;
class Program
{
@@ -27,6 +27,7 @@ class Program
.UseAutofac()
.Build();
var sss= host.Services.GetRequiredService<ITemplateGenService>();
var commandSelector = host.Services.GetRequiredService<CommandSelector>();
await commandSelector.SelectorAsync(args);
}

View File

@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Abp.Tool.HttpApi.Client;
using Yi.Abp.Tool.HttpApi.Client;
namespace Yi.Abp.Tool
{
[DependsOn(typeof(YiAbpToolHttpApiClientModule))]
[DependsOn(typeof(YiAbpToolHttpApiClientModule)
)]
public class YiAbpToolModule : AbpModule
{
}