Yuebon.WebApi/Areas/Tenants/Controllers/TenantController.cs
(开头部分) 15KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Yuebon.SecurityApi.Areas.Tenants.Controllers
{
/// <summary>
/// 租户接口
/// </summary>
[ApiController]
[Route("api/Tenants/[controller]")]
public class TenantController : AreaApiController<Tenant, TenantOutputDto,TenantInputDto,ITenantService>
{
private IFilterIPService _filterIPService;
private IMenuService _menuService;
private IAPPService _appService;
private ISystemTypeService _systemTypeService;
private ILogService _logService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="_iService"></param>
/// <param name="filterIPService"></param>
/// <param name="menuService"></param>
/// <param name="appService"></param>
/// <param name="systemTypeService"></param>
/// <param name="logService"></param>
public TenantController(ITenantService _iService, IFilterIPService filterIPService, IMenuService menuService, IAPPService appService, ISystemTypeService systemTypeService, ILogService logService) : base(_iService)
{
iService = _iService;
_filterIPService = filterIPService;
_menuService = menuService;
_appService = appService;
_systemTypeService = systemTypeService;
_logService = logService;
}
/// <summary>
/// 新增前处理数据
/// </summary>
/// <param name="info"></param>
protected override void OnBeforeInsert(Tenant info)
{
info.Id = IdGeneratorHelper.IdSnowflake();
info.CreatorTime = DateTime.Now;
info.CreatorUserId = CurrentUser.UserId;
info.CompanyId = CurrentUser.OrganizeId;
info.DeptId = CurrentUser.DeptId;
info.DeleteMark = false;
}
/// <summary>
/// 在更新数据前对数据的修改操作
/// </summary>
/// <param name="info"></param>
/// <returns></returns>
protected override void OnBeforeUpdate(Tenant info)
{
info.LastModifyUserId = CurrentUser.UserId;
info.LastModifyTime = DateTime.Now;
}
后面还有 321 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。