This commit is contained in:
2026-02-06 18:34:35 +08:00
commit f7f4c94c00
3285 changed files with 563208 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/*
* 此代码由框架生成,请勿随意更改
*/
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using {Namespace}.IServices;
using {StartName}.Core.Controllers.Basic;
using Microsoft.AspNetCore.Mvc;
using iMES.Entity.AttributeManager;
namespace {Namespace}.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
[PermissionTable(Name = "{TableName}")]
public partial class {TableName}Controller : BaseController<I{TableName}Service>
{
public {TableName}Controller(I{TableName}Service service)
: base({BaseOptions}, service)
{
}
}
}

View File

@@ -0,0 +1,21 @@
/*
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
*如果要增加方法请在当前目录下Partial文件夹{TableName}Controller编写
*/
using Microsoft.AspNetCore.Mvc;
using iMES.Core.Controllers.Basic;
using iMES.Entity.AttributeManager;
using {Namespace}.IServices;
namespace {Namespace}.Controllers
{
[Route("api/{TableName}")]
[PermissionTable(Name = "{TableName}")]
public partial class {TableName}Controller : ApiBaseController<I{TableName}Service>
{
public {TableName}Controller(I{TableName}Service service)
: base(service)
{
}
}
}

View File

@@ -0,0 +1,33 @@
/*
*接口编写处...
*如果接口需要做Action的权限验证请在Action上使用属性
*如: [ApiActionPermission("{TableName}",Enums.ActionPermissionOptions.Search)]
*/
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using {StartName}.Entity.DomainModels;
using {Namespace}.IServices;
namespace {Namespace}.Controllers
{
public partial class {TableName}Controller
{
private readonly I{TableName}Service _service;//访问业务代码
private readonly IHttpContextAccessor _httpContextAccessor;
[ActivatorUtilitiesConstructor]
public {TableName}Controller(
I{TableName}Service service,
IHttpContextAccessor httpContextAccessor
)
: base(service)
{
_service = service;
_httpContextAccessor = httpContextAccessor;
}
}
}

View File

@@ -0,0 +1,15 @@
using {StartName}.Core.Extensions;
using {StartName}.Core.Filter;
using {StartName}.Core.Utility;
using {StartName}.Entity.DomainModels;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace {Namespace}.Controllers
{
public partial class {TableName}Controller
{
}
}