feat: 前后端联调代码生成接口
This commit is contained in:
@@ -9,6 +9,6 @@ namespace Yi.Framework.CodeGun.Application.Contracts.Dtos.Field
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
public long? TableId { get; set; }
|
||||
public Guid? TableId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Uow;
|
||||
using Yi.Framework.CodeGun.Application.Contracts.IServices;
|
||||
@@ -79,7 +80,8 @@ namespace Yi.Framework.CodeGun.Application.Services
|
||||
/// 打开目录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task PostDir(string path)
|
||||
[HttpPost("code-gun/dir/{**path}")]
|
||||
public async Task PostDir([FromRoute]string path)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Yi.Framework.CodeGun.Application.Services
|
||||
/// 获取类型枚举
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("type")]
|
||||
[Route("field/type")]
|
||||
public object GetFieldTypeEnum()
|
||||
{
|
||||
return typeof(FieldTypeEnum).GetFields(BindingFlags.Static | BindingFlags.Public).Select(x => new { lable = x.Name, value = (int)Enum.Parse(typeof(FieldTypeEnum), x.Name) }).ToList();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Yi.Framework.CodeGun.Application.Contracts.Dtos.Table;
|
||||
using Yi.Framework.CodeGun.Application.Contracts.IServices;
|
||||
using Yi.Framework.CodeGun.Domain.Entities;
|
||||
@@ -11,5 +12,10 @@ namespace Yi.Framework.CodeGun.Application.Services
|
||||
public TableService(IRepository<TableAggregateRoot, Guid> repository) : base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
public override Task<PagedResultDto<TableDto>> GetListAsync(TableGetListInput input)
|
||||
{
|
||||
return base.GetListAsync(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,31 +42,31 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
};
|
||||
entities.Add(system);
|
||||
|
||||
//WebFirst
|
||||
MenuEntity webfirst = new MenuEntity(_guidGenerator.Create(), Guid.Empty)
|
||||
//代码生成
|
||||
MenuEntity code = new MenuEntity(_guidGenerator.Create(), Guid.Empty)
|
||||
{
|
||||
MenuName = "WebFirst",
|
||||
MenuName = "代码生成",
|
||||
MenuType = MenuTypeEnum.Catalogue,
|
||||
Router = "/webfirst",
|
||||
Router = "/code",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
MenuIcon = "build",
|
||||
OrderNum = 91,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(webfirst);
|
||||
entities.Add(code);
|
||||
|
||||
//数据表管理
|
||||
MenuEntity table = new MenuEntity(_guidGenerator.Create(), webfirst.Id)
|
||||
MenuEntity table = new MenuEntity(_guidGenerator.Create(), code.Id)
|
||||
{
|
||||
MenuName = "数据表管理",
|
||||
PermissionCode = "webfirst:table:list",
|
||||
PermissionCode = "code:table:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "table",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "webfirst/table/index",
|
||||
Component = "code/table/index",
|
||||
MenuIcon = "online",
|
||||
OrderNum = 100,
|
||||
IsDeleted = false
|
||||
@@ -74,35 +74,35 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
entities.Add(table);
|
||||
|
||||
//字段管理
|
||||
MenuEntity field = new MenuEntity(_guidGenerator.Create(), webfirst.Id)
|
||||
MenuEntity field = new MenuEntity(_guidGenerator.Create(), code.Id)
|
||||
{
|
||||
MenuName = "字段管理",
|
||||
PermissionCode = "webfirst:field:list",
|
||||
PermissionCode = "code:field:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "field",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "webfirst/field/index",
|
||||
Component = "code/field/index",
|
||||
MenuIcon = "number",
|
||||
OrderNum = 99,
|
||||
ParentId = webfirst.Id,
|
||||
ParentId = code.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(field);
|
||||
|
||||
|
||||
//模板管理
|
||||
MenuEntity template = new MenuEntity(_guidGenerator.Create(), webfirst.Id)
|
||||
MenuEntity template = new MenuEntity(_guidGenerator.Create(), code.Id)
|
||||
{
|
||||
MenuName = "模板管理",
|
||||
PermissionCode = "webfirst:template:list",
|
||||
PermissionCode = "code:template:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "template",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "webfirst/template/index",
|
||||
Component = "code/template/index",
|
||||
MenuIcon = "documentation",
|
||||
OrderNum = 98,
|
||||
IsDeleted = false
|
||||
@@ -230,7 +230,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
//ERP
|
||||
MenuEntity erp = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
MenuName = "ERP",
|
||||
MenuName = "ERP(待更新)",
|
||||
MenuType = MenuTypeEnum.Catalogue,
|
||||
Router = "/erp",
|
||||
IsShow = true,
|
||||
|
||||
Reference in New Issue
Block a user