chore: 构建稳定版本
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account
|
||||
{
|
||||
public class CaptchaImageDto
|
||||
{
|
||||
public Guid Uuid { get; set; } = Guid.Empty;
|
||||
public byte[] Img { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account
|
||||
{
|
||||
public class LoginInputVo
|
||||
{
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
public string Uuid { get; set; }
|
||||
|
||||
public string Code { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account
|
||||
{
|
||||
public class PhoneCaptchaImageDto
|
||||
{
|
||||
public string Phone { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account
|
||||
{
|
||||
public class RegisterDto
|
||||
{
|
||||
|
||||
//电话号码,根据code的表示来获取
|
||||
|
||||
/// <summary>
|
||||
/// 账号
|
||||
/// </summary>
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 唯一标识码
|
||||
/// </summary>
|
||||
public string? Uuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电话
|
||||
/// </summary>
|
||||
public long Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
public string? Code { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account
|
||||
{
|
||||
public class RestPasswordDto
|
||||
{
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account
|
||||
{
|
||||
public class UpdateIconDto
|
||||
{
|
||||
public string? Icon { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account
|
||||
{
|
||||
public class UpdatePasswordDto
|
||||
{
|
||||
public string NewPassword { get; set; } = string.Empty;
|
||||
public string OldPassword { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Config输入创建对象
|
||||
/// </summary>
|
||||
public class ConfigCreateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string ConfigName { get; set; } = string.Empty;
|
||||
public string ConfigKey { get; set; } = string.Empty;
|
||||
public string ConfigValue { get; set; } = string.Empty;
|
||||
public string? ConfigType { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public DateTime CreationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD>ò<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public class ConfigGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string? ConfigName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD>ü<EFBFBD>
|
||||
/// </summary>
|
||||
public string? ConfigKey { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config
|
||||
{
|
||||
public class ConfigGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string ConfigName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string ConfigKey { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD>ֵ
|
||||
/// </summary>
|
||||
public string ConfigValue { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public string? ConfigType { get; set; }
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
|
||||
/// </summary>
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20><>ע
|
||||
/// </summary>
|
||||
public string? Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
/// </summary>
|
||||
public DateTime CreationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config
|
||||
{
|
||||
public class ConfigGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public string ConfigName { get; set; } = string.Empty;
|
||||
public string ConfigKey { get; set; } = string.Empty;
|
||||
public string ConfigValue { get; set; } = string.Empty;
|
||||
public string? ConfigType { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public DateTime CreationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Config
|
||||
{
|
||||
public class ConfigUpdateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string ConfigName { get; set; } = string.Empty;
|
||||
public string ConfigKey { get; set; } = string.Empty;
|
||||
public string ConfigValue { get; set; } = string.Empty;
|
||||
public string? ConfigType { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public DateTime CreationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept
|
||||
{
|
||||
/// <summary>
|
||||
/// Dept输入创建对象
|
||||
/// </summary>
|
||||
public class DeptCreateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string DeptName { get; set; } = string.Empty;
|
||||
public string DeptCode { get; set; } = string.Empty;
|
||||
public string? Leader { get; set; }
|
||||
public Guid ParentId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept
|
||||
{
|
||||
public class DeptGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public bool? State { get; set; }
|
||||
public string? DeptName { get; set; }
|
||||
public string? DeptCode { get; set; }
|
||||
public string? Leader { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept
|
||||
{
|
||||
public class DeptGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string DeptName { get; set; } = string.Empty;
|
||||
public string DeptCode { get; set; } = string.Empty;
|
||||
public string? Leader { get; set; }
|
||||
public Guid ParentId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept
|
||||
{
|
||||
public class DeptGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public bool State { get; set; }
|
||||
public string DeptName { get; set; } = string.Empty;
|
||||
public string DeptCode { get; set; } = string.Empty;
|
||||
public string? Leader { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public Guid? deptId { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
public Guid ParentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dept
|
||||
{
|
||||
public class DeptUpdateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string DeptName { get; set; } = string.Empty;
|
||||
public string DeptCode { get; set; } = string.Empty;
|
||||
public string? Leader { get; set; }
|
||||
public Guid ParentId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary输入创建对象
|
||||
/// </summary>
|
||||
public class DictionaryCreateInputVo
|
||||
{
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
{
|
||||
public class DictionaryGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string? DictType { get; set; }
|
||||
public string? DictLabel { get; set; }
|
||||
public bool? State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
{
|
||||
public class DictionaryGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
{
|
||||
public class DictionaryGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
{
|
||||
public class DictionaryUpdateInputVo
|
||||
{
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? DictLabel { get; set; }
|
||||
public string DictValue { get; set; } = string.Empty;
|
||||
public bool IsDefault { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType
|
||||
{
|
||||
/// <summary>
|
||||
/// DictionaryType输入创建对象
|
||||
/// </summary>
|
||||
public class DictionaryTypeCreateInputVo
|
||||
{
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType
|
||||
{
|
||||
public class DictionaryTypeGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
public string? DictName { get; set; }
|
||||
public string? DictType { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool? State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType
|
||||
{
|
||||
public class DictionaryTypeGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType
|
||||
{
|
||||
public class DictionaryTypeGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType
|
||||
{
|
||||
public class DictionaryTypeUpdateInputVo
|
||||
{
|
||||
public string DictName { get; set; } = string.Empty;
|
||||
public string DictType { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
public bool State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog
|
||||
{
|
||||
public class LoginLogGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
public string? LoginUser { get; set; }
|
||||
|
||||
public string? LoginIp { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog
|
||||
{
|
||||
public class LoginLogGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; }
|
||||
|
||||
public string? LoginUser { get; set; }
|
||||
|
||||
public string? LoginLocation { get; set; }
|
||||
/// <summary>
|
||||
/// 登录Ip
|
||||
///</summary>
|
||||
public string? LoginIp { get; set; }
|
||||
/// <summary>
|
||||
/// 浏览器
|
||||
///</summary>
|
||||
public string? Browser { get; set; }
|
||||
/// <summary>
|
||||
/// 操作系统
|
||||
///</summary>
|
||||
public string? Os { get; set; }
|
||||
/// <summary>
|
||||
/// 登录信息
|
||||
///</summary>
|
||||
public string? LogMsg { get; set; }
|
||||
|
||||
public Guid? CreatorId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
|
||||
{
|
||||
/// <summary>
|
||||
/// Menu输入创建对象
|
||||
/// </summary>
|
||||
public class MenuCreateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string MenuName { get; set; } = string.Empty;
|
||||
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
|
||||
public string? PermissionCode { get; set; }
|
||||
public Guid ParentId { get; set; }
|
||||
public string? MenuIcon { get; set; }
|
||||
public string? Router { get; set; }
|
||||
public bool IsLink { get; set; }
|
||||
public bool IsCache { get; set; }
|
||||
public bool IsShow { get; set; } = true;
|
||||
public string? Remark { get; set; }
|
||||
public string? Component { get; set; }
|
||||
public string? Query { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
|
||||
{
|
||||
public class MenuGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
|
||||
public bool? State { get; set; }
|
||||
public string? MenuName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
|
||||
{
|
||||
public class MenuGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string MenuName { get; set; } = string.Empty;
|
||||
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
|
||||
public string? PermissionCode { get; set; }
|
||||
public Guid ParentId { get; set; }
|
||||
public string? MenuIcon { get; set; }
|
||||
public string? Router { get; set; }
|
||||
public bool IsLink { get; set; }
|
||||
public bool IsCache { get; set; }
|
||||
public bool IsShow { get; set; } = true;
|
||||
public string? Remark { get; set; }
|
||||
public string? Component { get; set; }
|
||||
public string? Query { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
//public List<MenuEntity>? Children { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
|
||||
{
|
||||
public class MenuGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string MenuName { get; set; } = string.Empty;
|
||||
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
|
||||
public string? PermissionCode { get; set; }
|
||||
public Guid ParentId { get; set; }
|
||||
public string? MenuIcon { get; set; }
|
||||
public string? Router { get; set; }
|
||||
public bool IsLink { get; set; }
|
||||
public bool IsCache { get; set; }
|
||||
public bool IsShow { get; set; } = true;
|
||||
public string? Remark { get; set; }
|
||||
public string? Component { get; set; }
|
||||
public string? Query { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
//public List<MenuEntity>? Children { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Menu
|
||||
{
|
||||
public class MenuUpdateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string MenuName { get; set; } = string.Empty;
|
||||
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
|
||||
public string? PermissionCode { get; set; }
|
||||
public Guid ParentId { get; set; }
|
||||
public string? MenuIcon { get; set; }
|
||||
public string? Router { get; set; }
|
||||
public bool IsLink { get; set; }
|
||||
public bool IsCache { get; set; }
|
||||
public bool IsShow { get; set; } = true;
|
||||
public string? Remark { get; set; }
|
||||
public string? Component { get; set; }
|
||||
public string? Query { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
//public List<MenuEntity>? Children { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.MonitorCache
|
||||
{
|
||||
public class MonitorCacheGetListOutputDto
|
||||
{
|
||||
public string CacheName { get; set; }
|
||||
public string CacheKey { get; set; }
|
||||
public string CacheValue { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.MonitorCache
|
||||
{
|
||||
public class MonitorCacheNameGetListOutputDto
|
||||
{
|
||||
public string CacheName { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Domain.Shared.OperLog;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog
|
||||
{
|
||||
public class OperationLogGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
public OperEnum? OperType { get; set; }
|
||||
public string? OperUser { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.OperLog;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog
|
||||
{
|
||||
public class OperationLogGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
public OperEnum OperType { get; set; }
|
||||
public string? RequestMethod { get; set; }
|
||||
public string? OperUser { get; set; }
|
||||
public string? OperIp { get; set; }
|
||||
public string? OperLocation { get; set; }
|
||||
public string? Method { get; set; }
|
||||
public string? RequestParam { get; set; }
|
||||
public string? RequestResult { get; set; }
|
||||
public DateTime CreationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post
|
||||
{
|
||||
/// <summary>
|
||||
/// Post输入创建对象
|
||||
/// </summary>
|
||||
public class PostCreateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public long? CreatorId { get; set; }
|
||||
public Guid State { get; set; }
|
||||
public string PostCode { get; set; } = string.Empty;
|
||||
public string PostName { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post
|
||||
{
|
||||
public class PostGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public bool? State { get; set; }
|
||||
//public string? PostCode { get; set; }=string.Empty;
|
||||
public string? PostName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post
|
||||
{
|
||||
public class PostGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public bool State { get; set; }
|
||||
public string PostCode { get; set; } = string.Empty;
|
||||
public string PostName { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post
|
||||
{
|
||||
public class PostGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string PostCode { get; set; } = string.Empty;
|
||||
public string PostName { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post
|
||||
{
|
||||
public class PostUpdateInputVo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public bool State { get; set; }
|
||||
public string PostCode { get; set; } = string.Empty;
|
||||
public string PostName { get; set; } = string.Empty;
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
public class RoleAuthUserCreateOrDeleteInput
|
||||
{
|
||||
[Required]
|
||||
public Guid RoleId { get; set; }
|
||||
|
||||
[Required]
|
||||
public List<Guid> UserIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
public class RoleAuthUserGetListInput : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string? UserName { get; set; }
|
||||
|
||||
public long? Phone { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
/// <summary>
|
||||
/// Role输入创建对象
|
||||
/// </summary>
|
||||
public class RoleCreateInputVo
|
||||
{
|
||||
public string? RoleName { get; set; }
|
||||
public string? RoleCode { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
|
||||
public bool State { get; set; } = true;
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
public List<Guid> DeptIds { get; set; }
|
||||
|
||||
public List<Guid> MenuIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
public class RoleGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
public string? RoleName { get; set; }
|
||||
public string? RoleCode { get; set; }
|
||||
public bool? State { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
public class RoleGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string? RoleName { get; set; }
|
||||
public string? RoleCode { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
|
||||
public bool State { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
public class RoleGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string? RoleName { get; set; }
|
||||
public string? RoleCode { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
|
||||
public bool State { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
public class RoleUpdateInputVo
|
||||
{
|
||||
public string? RoleName { get; set; }
|
||||
public string? RoleCode { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
|
||||
public bool State { get; set; }
|
||||
|
||||
public int OrderNum { get; set; }
|
||||
|
||||
public List<Guid>? DeptIds { get; set; }
|
||||
|
||||
public List<Guid>? MenuIds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
|
||||
{
|
||||
public class UpdateDataScpoceInput
|
||||
{
|
||||
public Guid RoleId { get; set; }
|
||||
|
||||
public List<Guid>? DeptIds { get; set; }
|
||||
|
||||
public DataScopeEnum DataScope { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task
|
||||
{
|
||||
public class TaskCreateInput
|
||||
{
|
||||
public string AssemblyName { get; set; }
|
||||
|
||||
public string JobType { get; set; }
|
||||
|
||||
public string JobId { get; set; }
|
||||
|
||||
public string? GroupName { get; set; }
|
||||
|
||||
public JobTypeEnum Type { get; set; }
|
||||
|
||||
public string Cron { get; set; }
|
||||
|
||||
public int Millisecond { get; set; }
|
||||
|
||||
public bool Concurrent { get; set; }
|
||||
|
||||
//public Dictionary<string, object>? Properties { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task
|
||||
{
|
||||
public class TaskGetListInput : PagedAllResultRequestDto
|
||||
{
|
||||
public string JobId { get; set; }
|
||||
public string GroupName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task
|
||||
{
|
||||
public class TaskGetListOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 作业 Id
|
||||
/// </summary>
|
||||
|
||||
public string JobId { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业组名称
|
||||
/// </summary>
|
||||
|
||||
public string GroupName { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业处理程序类型
|
||||
/// </summary>
|
||||
/// <remarks>存储的是类型的 FullName</remarks>
|
||||
|
||||
public string JobType { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业处理程序类型所在程序集
|
||||
/// </summary>
|
||||
/// <remarks>存储的是程序集 Name</remarks>
|
||||
|
||||
public string AssemblyName { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述信息
|
||||
/// </summary>
|
||||
|
||||
public string Description { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否采用并行执行
|
||||
/// </summary>
|
||||
/// <remarks>如果设置为 false,那么使用串行执行</remarks>
|
||||
|
||||
public bool Concurrent { get; internal set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否扫描 IJob 实现类 [Trigger] 特性触发器
|
||||
/// </summary>
|
||||
|
||||
public bool IncludeAnnotations { get; internal set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 作业信息额外数据
|
||||
/// </summary>
|
||||
|
||||
public string Properties { get; internal set; } = "{}";
|
||||
|
||||
/// <summary>
|
||||
/// 作业更新时间
|
||||
/// </summary>
|
||||
|
||||
public DateTime? UpdatedTime { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标记其他作业正在执行
|
||||
/// </summary>
|
||||
/// <remarks>当 <see cref="Concurrent"/> 为 false 时有效,也就是串行执行</remarks>
|
||||
internal bool Blocked { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 作业处理程序运行时类型
|
||||
/// </summary>
|
||||
internal string RuntimeJobType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业信息额外数据运行时实例
|
||||
/// </summary>
|
||||
internal string RuntimeProperties { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 触发器参数
|
||||
/// </summary>
|
||||
public string TriggerArgs { get; set; }
|
||||
|
||||
//状态
|
||||
public string Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task
|
||||
{
|
||||
public class TaskGetOutput
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 作业 Id
|
||||
/// </summary>
|
||||
|
||||
public string JobId { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业组名称
|
||||
/// </summary>
|
||||
|
||||
public string GroupName { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业处理程序类型
|
||||
/// </summary>
|
||||
/// <remarks>存储的是类型的 FullName</remarks>
|
||||
|
||||
public string JobType { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业处理程序类型所在程序集
|
||||
/// </summary>
|
||||
/// <remarks>存储的是程序集 Name</remarks>
|
||||
|
||||
public string AssemblyName { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述信息
|
||||
/// </summary>
|
||||
|
||||
public string Description { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否采用并行执行
|
||||
/// </summary>
|
||||
/// <remarks>如果设置为 false,那么使用串行执行</remarks>
|
||||
|
||||
public bool Concurrent { get; internal set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否扫描 IJob 实现类 [Trigger] 特性触发器
|
||||
/// </summary>
|
||||
|
||||
public bool IncludeAnnotations { get; internal set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 作业信息额外数据
|
||||
/// </summary>
|
||||
|
||||
public string Properties { get; internal set; } = "{}";
|
||||
|
||||
/// <summary>
|
||||
/// 作业更新时间
|
||||
/// </summary>
|
||||
|
||||
public DateTime? UpdatedTime { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标记其他作业正在执行
|
||||
/// </summary>
|
||||
/// <remarks>当 <see cref="Concurrent"/> 为 false 时有效,也就是串行执行</remarks>
|
||||
internal bool Blocked { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 作业处理程序运行时类型
|
||||
/// </summary>
|
||||
internal string RuntimeJobType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作业信息额外数据运行时实例
|
||||
/// </summary>
|
||||
internal string RuntimeProperties { get; set; }
|
||||
|
||||
public string TriggerArgs { get; set; }
|
||||
|
||||
public DateTime? NextRunTime { get; set; }
|
||||
|
||||
public DateTime? LastRunTime { get; set; }
|
||||
|
||||
public long NumberOfRuns { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Task
|
||||
{
|
||||
public class TaskUpdateInput
|
||||
{
|
||||
public string AssemblyName { get; set; }
|
||||
|
||||
public string JobType { get; set; }
|
||||
|
||||
public string? GroupName { get; set; }
|
||||
|
||||
public JobTypeEnum Type { get; set; }
|
||||
|
||||
public string? Cron { get; set; }
|
||||
|
||||
public int Millisecond { get; set; }
|
||||
|
||||
public bool Concurrent { get; set; }
|
||||
|
||||
// public Dictionary<string, object>? Properties { get; set; }
|
||||
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User
|
||||
{
|
||||
public class ProfileUpdateInputVo
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum? Sex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User
|
||||
{
|
||||
/// <summary>
|
||||
/// User输入创建对象
|
||||
/// </summary>
|
||||
public class UserCreateInputVo
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public List<Guid>? RoleIds { get; set; }
|
||||
public List<Guid>? PostIds { get; set; }
|
||||
public Guid? DeptId { get; set; }
|
||||
public bool State { get; set; } = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Yi.Framework.Ddd;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User
|
||||
{
|
||||
public class UserGetListInputVo : PagedAllResultRequestDto
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public string? UserName { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
|
||||
public bool? State { get; set; }
|
||||
|
||||
public Guid? DeptId { get; set; }
|
||||
|
||||
public string? Ids { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User
|
||||
{
|
||||
public class UserGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public Guid? DeptId { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
|
||||
public bool State { get; set; }
|
||||
|
||||
|
||||
public string DeptName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Dept;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Post;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Role;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User
|
||||
{
|
||||
public class UserGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum Sex { get; set; } = SexEnum.Unknown;
|
||||
public bool State { get; set; }
|
||||
public DateTime CreationTime { get; set; }
|
||||
|
||||
public Guid? DeptId { get; set; }
|
||||
|
||||
public DeptGetOutputDto? Dept { get; set; }
|
||||
|
||||
public List<PostGetListOutputDto>? Posts { get; set; }
|
||||
|
||||
public List<RoleGetListOutputDto>? Roles { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using Mapster;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.User
|
||||
{
|
||||
public class UserUpdateInputVo
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Age { get; set; }
|
||||
public string? UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <20>ó<EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
[AdaptIgnore]
|
||||
public string? Password { get; set; }
|
||||
public string? Icon { get; set; }
|
||||
public string? Nick { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Ip { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public long? Phone { get; set; }
|
||||
public string? Introduction { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public SexEnum? Sex { get; set; }
|
||||
public Guid? DeptId { get; set; }
|
||||
public List<Guid>? PostIds { get; set; }
|
||||
|
||||
public List<Guid>? RoleIds { get; set; }
|
||||
public bool? State { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
public interface IAccountService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Config;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Config服务抽象
|
||||
/// </summary>
|
||||
public interface IConfigService : IYiCrudAppService<ConfigGetOutputDto, ConfigGetListOutputDto, Guid, ConfigGetListInputVo, ConfigCreateInputVo, ConfigUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Dept;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Dept服务抽象
|
||||
/// </summary>
|
||||
public interface IDeptService : IYiCrudAppService<DeptGetOutputDto, DeptGetListOutputDto, Guid, DeptGetListInputVo, DeptCreateInputVo, DeptUpdateInputVo>
|
||||
{
|
||||
Task<List<Guid>> GetChildListAsync(Guid deptId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary服务抽象
|
||||
/// </summary>
|
||||
public interface IDictionaryService : IYiCrudAppService<DictionaryGetOutputDto, DictionaryGetListOutputDto, Guid, DictionaryGetListInputVo, DictionaryCreateInputVo, DictionaryUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// DictionaryType服务抽象
|
||||
/// </summary>
|
||||
public interface IDictionaryTypeService : IYiCrudAppService<DictionaryTypeGetOutputDto, DictionaryTypeGetListOutputDto, Guid, DictionaryTypeGetListInputVo, DictionaryTypeCreateInputVo, DictionaryTypeUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Menu;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Menu服务抽象
|
||||
/// </summary>
|
||||
public interface IMenuService : IYiCrudAppService<MenuGetOutputDto, MenuGetListOutputDto, Guid, MenuGetListInputVo, MenuCreateInputVo, MenuUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
public interface IMonitorCacheService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
public interface IMonitorServerService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
public interface IOnlineService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// OperationLog服务抽象
|
||||
/// </summary>
|
||||
public interface IOperationLogService : IYiCrudAppService<OperationLogGetListOutputDto, Guid, OperationLogGetListInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Post;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Post服务抽象
|
||||
/// </summary>
|
||||
public interface IPostService : IYiCrudAppService<PostGetOutputDto, PostGetListOutputDto, Guid, PostGetListInputVo, PostCreateInputVo, PostUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Role;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Role服务抽象
|
||||
/// </summary>
|
||||
public interface IRoleService : IYiCrudAppService<RoleGetOutputDto, RoleGetListOutputDto, Guid, RoleGetListInputVo, RoleCreateInputVo, RoleUpdateInputVo>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
public interface ITaskService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务抽象
|
||||
/// </summary>
|
||||
public interface IUserService : IYiCrudAppService<UserGetOutputDto, UserGetListOutputDto, Guid, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Rbac.Domain.Shared\Yi.Framework.Rbac.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,326 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Framework.Rbac.Application.Contracts</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RegisterDto.UserName">
|
||||
<summary>
|
||||
账号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RegisterDto.Password">
|
||||
<summary>
|
||||
密码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RegisterDto.Uuid">
|
||||
<summary>
|
||||
唯一标识码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RegisterDto.Phone">
|
||||
<summary>
|
||||
电话
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RegisterDto.Code">
|
||||
<summary>
|
||||
验证码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigCreateInputVo">
|
||||
<summary>
|
||||
Config输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListInputVo">
|
||||
<summary>
|
||||
配置查询参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListInputVo.ConfigName">
|
||||
<summary>
|
||||
配置名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListInputVo.ConfigKey">
|
||||
<summary>
|
||||
配置键
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListOutputDto.ConfigName">
|
||||
<summary>
|
||||
配置名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListOutputDto.ConfigKey">
|
||||
<summary>
|
||||
配置主键
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListOutputDto.ConfigValue">
|
||||
<summary>
|
||||
配置值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListOutputDto.ConfigType">
|
||||
<summary>
|
||||
配置类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListOutputDto.OrderNum">
|
||||
<summary>
|
||||
排序字段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListOutputDto.Remark">
|
||||
<summary>
|
||||
备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListOutputDto.CreationTime">
|
||||
<summary>
|
||||
创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.Dept.DeptCreateInputVo">
|
||||
<summary>
|
||||
Dept输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType.DictionaryTypeCreateInputVo">
|
||||
<summary>
|
||||
DictionaryType输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary.DictionaryCreateInputVo">
|
||||
<summary>
|
||||
Dictionary输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog.LoginLogGetListOutputDto.LoginIp">
|
||||
<summary>
|
||||
登录Ip
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog.LoginLogGetListOutputDto.Browser">
|
||||
<summary>
|
||||
浏览器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog.LoginLogGetListOutputDto.Os">
|
||||
<summary>
|
||||
操作系统
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog.LoginLogGetListOutputDto.LogMsg">
|
||||
<summary>
|
||||
登录信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.Menu.MenuCreateInputVo">
|
||||
<summary>
|
||||
Menu输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.Post.PostCreateInputVo">
|
||||
<summary>
|
||||
Post输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.Role.RoleCreateInputVo">
|
||||
<summary>
|
||||
Role输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.JobId">
|
||||
<summary>
|
||||
作业 Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.GroupName">
|
||||
<summary>
|
||||
作业组名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.JobType">
|
||||
<summary>
|
||||
作业处理程序类型
|
||||
</summary>
|
||||
<remarks>存储的是类型的 FullName</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.AssemblyName">
|
||||
<summary>
|
||||
作业处理程序类型所在程序集
|
||||
</summary>
|
||||
<remarks>存储的是程序集 Name</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.Description">
|
||||
<summary>
|
||||
描述信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.Concurrent">
|
||||
<summary>
|
||||
是否采用并行执行
|
||||
</summary>
|
||||
<remarks>如果设置为 false,那么使用串行执行</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.IncludeAnnotations">
|
||||
<summary>
|
||||
是否扫描 IJob 实现类 [Trigger] 特性触发器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.Properties">
|
||||
<summary>
|
||||
作业信息额外数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.UpdatedTime">
|
||||
<summary>
|
||||
作业更新时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.Blocked">
|
||||
<summary>
|
||||
标记其他作业正在执行
|
||||
</summary>
|
||||
<remarks>当 <see cref="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.Concurrent"/> 为 false 时有效,也就是串行执行</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.RuntimeJobType">
|
||||
<summary>
|
||||
作业处理程序运行时类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.RuntimeProperties">
|
||||
<summary>
|
||||
作业信息额外数据运行时实例
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetListOutput.TriggerArgs">
|
||||
<summary>
|
||||
触发器参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.JobId">
|
||||
<summary>
|
||||
作业 Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.GroupName">
|
||||
<summary>
|
||||
作业组名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.JobType">
|
||||
<summary>
|
||||
作业处理程序类型
|
||||
</summary>
|
||||
<remarks>存储的是类型的 FullName</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.AssemblyName">
|
||||
<summary>
|
||||
作业处理程序类型所在程序集
|
||||
</summary>
|
||||
<remarks>存储的是程序集 Name</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.Description">
|
||||
<summary>
|
||||
描述信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.Concurrent">
|
||||
<summary>
|
||||
是否采用并行执行
|
||||
</summary>
|
||||
<remarks>如果设置为 false,那么使用串行执行</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.IncludeAnnotations">
|
||||
<summary>
|
||||
是否扫描 IJob 实现类 [Trigger] 特性触发器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.Properties">
|
||||
<summary>
|
||||
作业信息额外数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.UpdatedTime">
|
||||
<summary>
|
||||
作业更新时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.Blocked">
|
||||
<summary>
|
||||
标记其他作业正在执行
|
||||
</summary>
|
||||
<remarks>当 <see cref="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.Concurrent"/> 为 false 时有效,也就是串行执行</remarks>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.RuntimeJobType">
|
||||
<summary>
|
||||
作业处理程序运行时类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.Task.TaskGetOutput.RuntimeProperties">
|
||||
<summary>
|
||||
作业信息额外数据运行时实例
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.Dtos.User.UserCreateInputVo">
|
||||
<summary>
|
||||
User输入创建对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Yi.Framework.Rbac.Application.Contracts.Dtos.User.UserUpdateInputVo.Password">
|
||||
<summary>
|
||||
该成员需忽略
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IConfigService">
|
||||
<summary>
|
||||
Config服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IDeptService">
|
||||
<summary>
|
||||
Dept服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IDictionaryService">
|
||||
<summary>
|
||||
Dictionary服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IDictionaryTypeService">
|
||||
<summary>
|
||||
DictionaryType服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IMenuService">
|
||||
<summary>
|
||||
Menu服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IOperationLogService">
|
||||
<summary>
|
||||
OperationLog服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IPostService">
|
||||
<summary>
|
||||
Post服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IRoleService">
|
||||
<summary>
|
||||
Role服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Contracts.IServices.IUserService">
|
||||
<summary>
|
||||
User服务抽象
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -0,0 +1,16 @@
|
||||
using Volo.Abp.Modularity;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Domain.Shared;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkRbacDomainSharedModule),
|
||||
|
||||
|
||||
typeof(YiFrameworkDddApplicationContractsModule))]
|
||||
public class YiFrameworkRbacApplicationContractsModule : AbpModule
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.EventBus;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Etos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Events
|
||||
{
|
||||
public class LoginEventHandler : ILocalEventHandler<LoginEventArgs>,
|
||||
ITransientDependency
|
||||
{
|
||||
private readonly ILogger<LoginEventHandler> _logger;
|
||||
private readonly IRepository<LoginLogEntity> _loginLogRepository;
|
||||
public LoginEventHandler(ILogger<LoginEventHandler> logger, IRepository<LoginLogEntity> loginLogRepository) { _logger = logger; _loginLogRepository = loginLogRepository; }
|
||||
public Task HandleEventAsync(LoginEventArgs eventData)
|
||||
{
|
||||
_logger.LogInformation($"用户【{eventData.UserId}:{eventData.UserName}】登入系统");
|
||||
var loginLogEntity = eventData.Adapt<LoginLogEntity>();
|
||||
loginLogEntity.LogMsg = eventData.UserName + "登录系统";
|
||||
loginLogEntity.LoginUser = eventData.UserName;
|
||||
loginLogEntity.CreatorId = eventData.UserId;
|
||||
//异步插入
|
||||
_loginLogRepository.InsertAsync(loginLogEntity);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Quartz;
|
||||
using Volo.Abp.BackgroundWorkers.Quartz;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Jobs
|
||||
{
|
||||
public class TestJob : QuartzBackgroundWorkerBase
|
||||
{
|
||||
public TestJob()
|
||||
{
|
||||
JobDetail = JobBuilder.Create<TestJob>().WithIdentity(nameof(TestJob)).Build();
|
||||
Trigger = TriggerBuilder.Create().WithIdentity(nameof(TestJob)).WithCronSchedule("* * * * * ? *").Build();
|
||||
}
|
||||
public override Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
Console.WriteLine("你好,世界");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,407 @@
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Lazy.Captcha.Core;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using SqlSugar;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Authorization;
|
||||
using Volo.Abp.Caching;
|
||||
using Volo.Abp.EventBus.Local;
|
||||
using Volo.Abp.Guids;
|
||||
using Volo.Abp.Uow;
|
||||
using Volo.Abp.Users;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.Rbac.Domain.Managers;
|
||||
using Yi.Framework.Rbac.Domain.Repositories;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Caches;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Consts;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Etos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Options;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
|
||||
public class AccountService : ApplicationService, IAccountService
|
||||
{
|
||||
private readonly ILocalEventBus _localEventBus;
|
||||
private readonly JwtOptions _jwtOptions;
|
||||
private IDistributedCache<CaptchaPhoneCacheItem, CaptchaPhoneCacheKey> _phoneCache;
|
||||
private readonly ICaptcha _captcha;
|
||||
private readonly IGuidGenerator _guidGenerator;
|
||||
public AccountService(IUserRepository userRepository,
|
||||
ICurrentUser currentUser,
|
||||
AccountManager accountManager,
|
||||
ISqlSugarRepository<MenuEntity> menuRepository,
|
||||
IHttpContextAccessor httpContextAccessor,
|
||||
ILocalEventBus localEventBus,
|
||||
IOptions<JwtOptions> jwtOptions,
|
||||
IDistributedCache<CaptchaPhoneCacheItem, CaptchaPhoneCacheKey> phoneCache,
|
||||
ICaptcha captcha,
|
||||
IGuidGenerator guidGenerator)
|
||||
{
|
||||
_userRepository = userRepository;
|
||||
_currentUser = currentUser;
|
||||
_accountManager = accountManager;
|
||||
_menuRepository = menuRepository;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
_localEventBus = localEventBus;
|
||||
_jwtOptions = jwtOptions.Value;
|
||||
_phoneCache = phoneCache;
|
||||
_captcha = captcha;
|
||||
_guidGenerator = guidGenerator;
|
||||
}
|
||||
|
||||
|
||||
private IUserRepository _userRepository;
|
||||
private ICurrentUser _currentUser;
|
||||
private AccountManager _accountManager;
|
||||
private ISqlSugarRepository<MenuEntity> _menuRepository;
|
||||
private IUserService _userService;
|
||||
private UserManager _userManager;
|
||||
private ISqlSugarRepository<RoleEntity> _roleRepository;
|
||||
private IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
/// <summary>
|
||||
/// 效验图片登录验证码,无需和账号绑定
|
||||
/// </summary>
|
||||
private void ValidationImageCaptcha(LoginInputVo input)
|
||||
{
|
||||
//登录不想要验证码 ,可不效验
|
||||
if (!_captcha.Validate(input.Uuid, input.Code))
|
||||
{
|
||||
throw new UserFriendlyException("验证码错误");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 效验电话验证码,需要与电话号码绑定
|
||||
/// </summary>
|
||||
private void ValidationPhoneCaptcha(RegisterDto input)
|
||||
{
|
||||
//var value = _memoryCache.Get<string>($"Yi:Phone:{input.Phone}");
|
||||
//if (value is not null && value.Equals($"{input.Code}"))
|
||||
//{
|
||||
// //成功,需要清空
|
||||
// _memoryCache.Remove($"Yi:Phone:{input.Phone}");
|
||||
// return;
|
||||
//}
|
||||
//throw new UserFriendlyException("验证码错误");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 登录
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> PostLoginAsync(LoginInputVo input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.Password) || string.IsNullOrEmpty(input.UserName))
|
||||
{
|
||||
throw new UserFriendlyException("请输入合理数据!");
|
||||
}
|
||||
|
||||
//效验验证码
|
||||
// ValidationImageCaptcha(input);
|
||||
|
||||
UserEntity user = new();
|
||||
//登录成功
|
||||
await _accountManager.LoginValidationAsync(input.UserName, input.Password, x => user = x);
|
||||
|
||||
//获取用户信息
|
||||
var userInfo = await _userRepository.GetUserAllInfoAsync(user.Id);
|
||||
|
||||
if (userInfo.RoleCodes.Count == 0)
|
||||
{
|
||||
throw new UserFriendlyException(UserConst.No_Role);
|
||||
}
|
||||
//这里抛出一个登录的事件
|
||||
var loginEntity = new LoginLogEntity().GetInfoByHttpContext(_httpContextAccessor.HttpContext);
|
||||
var loginEto = loginEntity.Adapt<LoginEventArgs>();
|
||||
loginEto.UserName = input.UserName;
|
||||
loginEto.UserId = userInfo.User.Id;
|
||||
await _localEventBus.PublishAsync(loginEto);
|
||||
//将用户信息添加到缓存中,需要考虑的是更改了用户、角色、菜单等整个体系都需要将缓存进行刷新,看具体业务进行选择
|
||||
|
||||
|
||||
|
||||
//创建token
|
||||
var accessToken = CreateToken(_accountManager.UserInfoToClaim(userInfo));
|
||||
return new { Token = accessToken };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建令牌
|
||||
/// </summary>
|
||||
/// <param name="dic"></param>
|
||||
/// <returns></returns>
|
||||
private string CreateToken(Dictionary<string, object> dic)
|
||||
{
|
||||
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_jwtOptions.SecurityKey));
|
||||
var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
|
||||
var claims = dic.Select(x => new Claim(x.Key, x.Value.ToString())).ToList();
|
||||
var token = new JwtSecurityToken(
|
||||
issuer: _jwtOptions.Issuer,
|
||||
audience: _jwtOptions.Audience,
|
||||
claims: claims,
|
||||
expires: DateTime.Now.AddSeconds(_jwtOptions.ExpiresMinuteTime),
|
||||
notBefore: DateTime.Now,
|
||||
signingCredentials: creds);
|
||||
string returnToken = new JwtSecurityTokenHandler().WriteToken(token);
|
||||
|
||||
return returnToken;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生成验证码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task<CaptchaImageDto> GetCaptchaImageAsync()
|
||||
{
|
||||
var uuid = _guidGenerator.Create();
|
||||
var captcha = _captcha.Generate(uuid.ToString());
|
||||
return new CaptchaImageDto { Img = captcha.Bytes, Uuid = uuid };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证电话号码
|
||||
/// </summary>
|
||||
/// <param name="str_handset"></param>
|
||||
private async Task ValidationPhone(string str_handset)
|
||||
{
|
||||
var res = Regex.IsMatch(str_handset, "^(0\\d{2,3}-?\\d{7,8}(-\\d{3,5}){0,1})|(((13[0-9])|(15([0-3]|[5-9]))|(18[0-9])|(17[0-9])|(14[0-9]))\\d{8})$");
|
||||
if (res == false)
|
||||
{
|
||||
throw new UserFriendlyException("手机号码格式错误!请检查");
|
||||
}
|
||||
if (await _userRepository.IsAnyAsync(x => x.Phone.ToString() == str_handset))
|
||||
{
|
||||
throw new UserFriendlyException("该手机号已被注册!");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 注册 手机验证码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<object> PostCaptchaPhone(PhoneCaptchaImageDto input)
|
||||
{
|
||||
await ValidationPhone(input.Phone);
|
||||
var value = await _phoneCache.GetAsync(new CaptchaPhoneCacheKey(input.Phone));
|
||||
|
||||
//防止暴刷
|
||||
if (value is not null)
|
||||
{
|
||||
throw new UserFriendlyException($"{input.Phone}已发送过验证码,10分钟后可重试");
|
||||
}
|
||||
//生成一个4位数的验证码
|
||||
//发送短信,同时生成uuid
|
||||
////key: 电话号码 value:验证码+uuid
|
||||
//var code = _securityCode.GetRandomEnDigitalText(4);
|
||||
var uuid = Guid.NewGuid();
|
||||
|
||||
//未开启短信验证,默认8888
|
||||
//if (_smsAliyunManagerOptions.Value.EnableFeature)
|
||||
//{
|
||||
// await _smsAliyunManager.Send(input.Phone, code);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
var code = "8888";
|
||||
//}
|
||||
//_memoryCache.Set($"Yi:Phone:{input.Phone}", $"{code}", new TimeSpan(0, 10, 0));
|
||||
|
||||
await _phoneCache.SetAsync(new CaptchaPhoneCacheKey(input.Phone), new CaptchaPhoneCacheItem(code), new DistributedCacheEntryOptions { SlidingExpiration = TimeSpan.FromMinutes(10) });
|
||||
return new
|
||||
{
|
||||
Uuid = uuid
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册,需要验证码通过
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[UnitOfWork]
|
||||
public async Task<object> PostRegisterAsync(RegisterDto input)
|
||||
{
|
||||
if (input.UserName == UserConst.Admin)
|
||||
{
|
||||
throw new UserFriendlyException("用户名无效注册!");
|
||||
}
|
||||
|
||||
if (input.UserName.Length < 2)
|
||||
{
|
||||
throw new UserFriendlyException("账号名需大于等于2位!");
|
||||
}
|
||||
if (input.Password.Length < 6)
|
||||
{
|
||||
throw new UserFriendlyException("密码需大于等于6位!");
|
||||
}
|
||||
//效验验证码,根据电话号码获取 value,比对验证码已经uuid
|
||||
ValidationPhoneCaptcha(input);
|
||||
|
||||
|
||||
|
||||
//输入的用户名与电话号码都不能在数据库中存在
|
||||
UserEntity user = new();
|
||||
var isExist = await _userRepository.IsAnyAsync(x =>
|
||||
x.UserName == input.UserName
|
||||
|| x.Phone == input.Phone);
|
||||
if (isExist)
|
||||
{
|
||||
throw new UserFriendlyException("用户已存在,注册失败");
|
||||
}
|
||||
|
||||
var newUser = new UserEntity(input.UserName, input.Password, input.Phone);
|
||||
|
||||
var entity = await _userRepository.InsertReturnEntityAsync(newUser);
|
||||
//赋上一个初始角色
|
||||
var roleRepository = _roleRepository;
|
||||
var role = await roleRepository.GetFirstAsync(x => x.RoleCode == UserConst.GuestRoleCode);
|
||||
if (role is not null)
|
||||
{
|
||||
await _userManager.GiveUserSetRoleAsync(new List<Guid> { entity.Id }, new List<Guid> { role.Id });
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询已登录的账户信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("account")]
|
||||
[Authorize]
|
||||
|
||||
public async Task<UserRoleMenuDto> Get()
|
||||
{
|
||||
//通过鉴权jwt获取到用户的id
|
||||
var userId = _currentUser.Id;
|
||||
if (userId is null)
|
||||
{
|
||||
throw new UserFriendlyException("用户未登录");
|
||||
}
|
||||
//此处从缓存中获取即可
|
||||
//var data = _cacheManager.Get<UserRoleMenuDto>($"Yi:UserInfo:{userId}");
|
||||
await Console.Out.WriteLineAsync(userId.ToString() + "99999999");
|
||||
var data = await _userRepository.GetUserAllInfoAsync(userId ?? Guid.Empty);
|
||||
//系统用户数据被重置,老前端访问重新授权
|
||||
if (data is null)
|
||||
{
|
||||
throw new AbpAuthorizationException();
|
||||
}
|
||||
|
||||
data.Menus.Clear();
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前登录用户的前端路由
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Authorize]
|
||||
[Route("account/Vue3Router")]
|
||||
public async Task<List<Vue3RouterDto>> GetVue3Router()
|
||||
{
|
||||
var userId = _currentUser.Id;
|
||||
if (_currentUser.Id is null)
|
||||
{
|
||||
throw new AbpAuthorizationException("用户未登录");
|
||||
|
||||
}
|
||||
var data = await _userRepository.GetUserAllInfoAsync(userId ?? Guid.Empty);
|
||||
var menus = data.Menus.ToList();
|
||||
|
||||
//为超级管理员直接给全部路由
|
||||
if (UserConst.Admin.Equals(data.User.UserName))
|
||||
{
|
||||
menus = ObjectMapper.Map<List<MenuEntity>, List<MenuDto>>(await _menuRepository.GetListAsync());
|
||||
}
|
||||
//将后端菜单转换成前端路由,组件级别需要过滤
|
||||
List<Vue3RouterDto> routers = ObjectMapper.Map<List<MenuDto>, List<MenuEntity>>(menus).Vue3RouterBuild();
|
||||
return routers;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 退出登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task<bool> PostLogout()
|
||||
{
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新密码
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UpdatePasswordAsync(UpdatePasswordDto input)
|
||||
{
|
||||
if (input.OldPassword.Equals(input.NewPassword))
|
||||
{
|
||||
throw new UserFriendlyException("无效更新!输入的数据,新密码不能与老密码相同");
|
||||
}
|
||||
if (_currentUser.Id is null)
|
||||
{
|
||||
throw new UserFriendlyException("用户未登录");
|
||||
}
|
||||
await _accountManager.UpdatePasswordAsync(_currentUser.Id ?? Guid.Empty, input.NewPassword, input.OldPassword);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置密码
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public async Task<bool> RestPasswordAsync(Guid userId, RestPasswordDto input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.Password))
|
||||
{
|
||||
throw new UserFriendlyException("重置密码不能为空!");
|
||||
}
|
||||
await _accountManager.RestPasswordAsync(userId, input.Password);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新头像
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UpdateIconAsync(UpdateIconDto input)
|
||||
{
|
||||
var entity = await _userRepository.GetByIdAsync(_currentUser.Id);
|
||||
entity.Icon = input.Icon;
|
||||
await _userRepository.UpdateAsync(entity);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Config;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Config服务实现
|
||||
/// </summary>
|
||||
public class ConfigService : YiCrudAppService<ConfigEntity, ConfigGetOutputDto, ConfigGetListOutputDto, Guid, ConfigGetListInputVo, ConfigCreateInputVo, ConfigUpdateInputVo>,
|
||||
IConfigService
|
||||
{
|
||||
private ISqlSugarRepository<ConfigEntity, Guid> _repository;
|
||||
public ConfigService(ISqlSugarRepository<ConfigEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 多查
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<PagedResultDto<ConfigGetListOutputDto>> GetListAsync(ConfigGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
|
||||
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.ConfigKey), x => x.ConfigKey.Contains(input.ConfigKey!))
|
||||
.WhereIF(!string.IsNullOrEmpty(input.ConfigName), x => x.ConfigName!.Contains(input.ConfigName!))
|
||||
.WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<ConfigGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Dept;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.Rbac.Domain.Repositories;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Dept服务实现
|
||||
/// </summary>
|
||||
public class DeptService : YiCrudAppService<DeptEntity, DeptGetOutputDto, DeptGetListOutputDto, Guid, DeptGetListInputVo, DeptCreateInputVo, DeptUpdateInputVo>, IDeptService
|
||||
{
|
||||
private IDeptRepository _deptRepository;
|
||||
public DeptService(IDeptRepository deptRepository) : base(deptRepository)
|
||||
{ _deptRepository = deptRepository; }
|
||||
|
||||
[RemoteService(false)]
|
||||
public async Task<List<Guid>> GetChildListAsync(Guid deptId)
|
||||
{
|
||||
return await _deptRepository.GetChildListAsync(deptId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过角色id查询该角色全部部门
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
//[Route("{roleId}")]
|
||||
public async Task<List<DeptGetListOutputDto>> GetRoleIdAsync(Guid roleId)
|
||||
{
|
||||
var entities = await _deptRepository.GetListRoleIdAsync(roleId);
|
||||
return await MapToGetListOutputDtosAsync(entities);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 多查
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<PagedResultDto<DeptGetListOutputDto>> GetListAsync(DeptGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _deptRepository._DbQueryable
|
||||
.WhereIF(!string.IsNullOrEmpty(input.DeptName), u => u.DeptName.Contains(input.DeptName!))
|
||||
.WhereIF(input.State is not null, u => u.State == input.State)
|
||||
.OrderBy(u => u.OrderNum, OrderByType.Asc)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<DeptGetListOutputDto>
|
||||
{
|
||||
Items = await MapToGetListOutputDtosAsync(entities),
|
||||
TotalCount = total
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Dictionary服务实现
|
||||
/// </summary>
|
||||
public class DictionaryService : YiCrudAppService<DictionaryEntity, DictionaryGetOutputDto, DictionaryGetListOutputDto, Guid, DictionaryGetListInputVo, DictionaryCreateInputVo, DictionaryUpdateInputVo>,
|
||||
IDictionaryService
|
||||
{
|
||||
private ISqlSugarRepository<DictionaryEntity, Guid> _repository;
|
||||
public DictionaryService(ISqlSugarRepository<DictionaryEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
_repository= repository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
|
||||
public override async Task<PagedResultDto<DictionaryGetListOutputDto>> GetListAsync(DictionaryGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _repository._DbQueryable.WhereIF(input.DictType is not null, x => x.DictType == input.DictType)
|
||||
.WhereIF(input.DictLabel is not null, x => x.DictLabel!.Contains(input.DictLabel!))
|
||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<DictionaryGetListOutputDto>
|
||||
{
|
||||
TotalCount = total,
|
||||
Items = await MapToGetListOutputDtosAsync(entities)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据字典类型获取字典列表
|
||||
/// </summary>
|
||||
/// <param name="dicType"></param>
|
||||
/// <returns></returns>
|
||||
[Route("dictionary/dic-type/{dicType}")]
|
||||
public async Task<List<DictionaryGetListOutputDto>> GetDicType([FromRoute] string dicType)
|
||||
{
|
||||
var entities = await _repository.GetListAsync(u => u.DictType == dicType && u.State == true);
|
||||
var result = await MapToGetListOutputDtosAsync(entities);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.DictionaryType;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// DictionaryType服务实现
|
||||
/// </summary>
|
||||
public class DictionaryTypeService : YiCrudAppService<DictionaryTypeEntity, DictionaryTypeGetOutputDto, DictionaryTypeGetListOutputDto, Guid, DictionaryTypeGetListInputVo, DictionaryTypeCreateInputVo, DictionaryTypeUpdateInputVo>,
|
||||
IDictionaryTypeService
|
||||
{
|
||||
private ISqlSugarRepository<DictionaryTypeEntity, Guid> _repository;
|
||||
public DictionaryTypeService(ISqlSugarRepository<DictionaryTypeEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public async override Task<PagedResultDto<DictionaryTypeGetListOutputDto>> GetListAsync(DictionaryTypeGetListInputVo input)
|
||||
{
|
||||
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _repository._DbQueryable.WhereIF(input.DictName is not null, x => x.DictName.Contains(input.DictName!))
|
||||
.WhereIF(input.DictType is not null, x => x.DictType!.Contains(input.DictType!))
|
||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||
.WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
|
||||
return new PagedResultDto<DictionaryTypeGetListOutputDto>
|
||||
{
|
||||
TotalCount = total,
|
||||
Items = await MapToGetListOutputDtosAsync(entities)
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.LoginLog;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
public class LoginLogService : YiCrudAppService<LoginLogEntity, LoginLogGetListOutputDto, Guid, LoginLogGetListInputVo>
|
||||
{
|
||||
private readonly ISqlSugarRepository<LoginLogEntity> _repository;
|
||||
public LoginLogService(ISqlSugarRepository<LoginLogEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public override async Task<PagedResultDto<LoginLogGetListOutputDto>> GetListAsync(LoginLogGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
|
||||
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.LoginIp), x => x.LoginIp.Contains(input.LoginIp!))
|
||||
.WhereIF(!string.IsNullOrEmpty(input.LoginUser), x => x.LoginUser!.Contains(input.LoginUser!))
|
||||
.WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<LoginLogGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
||||
}
|
||||
|
||||
[RemoteService(false)]
|
||||
public override Task<LoginLogGetListOutputDto> UpdateAsync(Guid id, LoginLogGetListOutputDto input)
|
||||
{
|
||||
return base.UpdateAsync(id, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Menu;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Menu服务实现
|
||||
/// </summary>
|
||||
public class MenuService : YiCrudAppService<MenuEntity, MenuGetOutputDto, MenuGetListOutputDto, Guid, MenuGetListInputVo, MenuCreateInputVo, MenuUpdateInputVo>,
|
||||
IMenuService
|
||||
{
|
||||
private readonly ISqlSugarRepository<MenuEntity, Guid> _repository;
|
||||
public MenuService(ISqlSugarRepository<MenuEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public override async Task<PagedResultDto<MenuGetListOutputDto>> GetListAsync(MenuGetListInputVo input)
|
||||
{
|
||||
|
||||
RefAsync<int> total = 0;
|
||||
|
||||
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.MenuName), x => x.MenuName.Contains(input.MenuName!))
|
||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||
.OrderByDescending(x => x.OrderNum)
|
||||
.ToListAsync();
|
||||
//.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<MenuGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询当前角色的菜单
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<MenuGetListOutputDto>> GetListRoleIdAsync(Guid roleId)
|
||||
{
|
||||
var entities = await _repository._DbQueryable.Where(m => SqlFunc.Subqueryable<RoleMenuEntity>().Where(rm => rm.RoleId == roleId && rm.MenuId == m.Id).Any()).ToListAsync();
|
||||
|
||||
return await MapToGetListOutputDtosAsync(entities);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.MonitorCache;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
public class MonitorCacheService : ApplicationService, IMonitorCacheService
|
||||
{
|
||||
private static List<MonitorCacheNameGetListOutputDto> monitorCacheNames => new List<MonitorCacheNameGetListOutputDto>()
|
||||
{
|
||||
new MonitorCacheNameGetListOutputDto{ CacheName="Yi:Login",Remark="登录验证码"},
|
||||
new MonitorCacheNameGetListOutputDto{ CacheName="Yi:User",Remark="用户信息"}
|
||||
};
|
||||
private Dictionary<string, string> monitorCacheNamesDic => monitorCacheNames.ToDictionary(x => x.CacheName, x => x.Remark);
|
||||
//private CSRedisClient _cacheClient;
|
||||
public MonitorCacheService()
|
||||
{
|
||||
//_cacheClient = redisCacheClient.Client;
|
||||
}
|
||||
//cacheKey value为空,只要name和备注
|
||||
|
||||
public List<MonitorCacheNameGetListOutputDto> GetName()
|
||||
{
|
||||
//固定的
|
||||
return monitorCacheNames;
|
||||
}
|
||||
[HttpGet("key/{cacaheName}")]
|
||||
public List<string> GetKey(string cacaheName)
|
||||
{
|
||||
//var output = _cacheClient.Keys($"{cacaheName}:*");
|
||||
return new List<string>() { "1233124", "3124", "1231251", "12312412" };
|
||||
}
|
||||
|
||||
//全部不为空
|
||||
[HttpGet("value/{cacaheName}/{cacaheKey}")]
|
||||
public MonitorCacheGetListOutputDto GetValue(string cacaheName, string cacaheKey)
|
||||
{
|
||||
//var value = _cacheClient.Get($"{cacaheName}:{cacaheKey}");
|
||||
return new MonitorCacheGetListOutputDto() { CacheKey = cacaheKey, CacheName = cacaheName, CacheValue = "ttt", Remark = monitorCacheNamesDic[cacaheName] };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Core.Helper;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
public class MonitorServerService : ApplicationService, IMonitorServerService
|
||||
{
|
||||
private IWebHostEnvironment _hostEnvironment;
|
||||
private IHttpContextAccessor _httpContextAccessor;
|
||||
public MonitorServerService(IWebHostEnvironment hostEnvironment, IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
_hostEnvironment = hostEnvironment;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
[HttpGet("monitor-server/info")]
|
||||
public object GetInfo()
|
||||
{
|
||||
int cpuNum = Environment.ProcessorCount;
|
||||
string computerName = Environment.MachineName;
|
||||
string osName = RuntimeInformation.OSDescription;
|
||||
string osArch = RuntimeInformation.OSArchitecture.ToString();
|
||||
string version = RuntimeInformation.FrameworkDescription;
|
||||
string appRAM = ((double)Process.GetCurrentProcess().WorkingSet64 / 1048576).ToString("N2") + " MB";
|
||||
string startTime = Process.GetCurrentProcess().StartTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
string sysRunTime = ComputerHelper.GetRunTime();
|
||||
string serverIP = _httpContextAccessor.HttpContext.Connection.LocalIpAddress.MapToIPv4().ToString() + ":" + _httpContextAccessor.HttpContext.Connection.LocalPort;//获取服务器IP
|
||||
|
||||
var programStartTime = Process.GetCurrentProcess().StartTime;
|
||||
string programRunTime = DateTimeHelper.FormatTime(long.Parse((DateTime.Now - programStartTime).TotalMilliseconds.ToString().Split('.')[0]));
|
||||
var data = new
|
||||
{
|
||||
cpu = ComputerHelper.GetComputerInfo(),
|
||||
disk = ComputerHelper.GetDiskInfos(),
|
||||
sys = new { cpuNum, computerName, osName, osArch, serverIP, runTime = sysRunTime },
|
||||
app = new
|
||||
{
|
||||
name = _hostEnvironment.EnvironmentName,
|
||||
rootPath = _hostEnvironment.ContentRootPath,
|
||||
webRootPath = _hostEnvironment.WebRootPath,
|
||||
version,
|
||||
appRAM,
|
||||
startTime,
|
||||
runTime = programRunTime,
|
||||
host = serverIP
|
||||
},
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.SignalRHubs;
|
||||
using Yi.Framework.Rbac.Domain.SignalRHubs.Model;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
public class OnlineService : ApplicationService, IOnlineService
|
||||
{
|
||||
private ILogger<OnlineService> _logger;
|
||||
private IHubContext<OnlineUserHub> _hub;
|
||||
public OnlineService(ILogger<OnlineService> logger, IHubContext<OnlineUserHub> hub)
|
||||
{
|
||||
_logger = logger;
|
||||
_hub = hub;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 动态条件获取当前在线用户
|
||||
/// </summary>
|
||||
/// <param name="online"></param>
|
||||
/// <returns></returns>
|
||||
public PagedResultDto<OnlineUserModel> GetListAsync([FromQuery] OnlineUserModel online)
|
||||
{
|
||||
var data = OnlineUserHub.clientUsers;
|
||||
IEnumerable<OnlineUserModel> dataWhere = data.AsEnumerable();
|
||||
|
||||
if (!string.IsNullOrEmpty(online.Ipaddr))
|
||||
{
|
||||
dataWhere = dataWhere.Where((u) => u.Ipaddr!.Contains(online.Ipaddr));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(online.UserName))
|
||||
{
|
||||
dataWhere = dataWhere.Where((u) => u.UserName!.Contains(online.UserName));
|
||||
}
|
||||
return new PagedResultDto<OnlineUserModel>() { TotalCount = data.Count, Items = dataWhere.ToList() };
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强制退出用户
|
||||
/// </summary>
|
||||
/// <param name="connnectionId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete]
|
||||
[Route("online/{connnectionId}")]
|
||||
public async Task<bool> ForceOut(string connnectionId)
|
||||
{
|
||||
if (OnlineUserHub.clientUsers.Exists(u => u.ConnnectionId == connnectionId))
|
||||
{
|
||||
//前端接受到这个事件后,触发前端自动退出
|
||||
await _hub.Clients.Client(connnectionId).SendAsync("forceOut", "你已被强制退出!");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.OperLog;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// OperationLog服务实现
|
||||
/// </summary>
|
||||
public class OperationLogService : YiCrudAppService<OperationLogEntity, OperationLogGetListOutputDto, Guid, OperationLogGetListInputVo>,
|
||||
IOperationLogService
|
||||
{
|
||||
private ISqlSugarRepository<OperationLogEntity, Guid> _repository;
|
||||
public OperationLogService(ISqlSugarRepository<OperationLogEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
_repository=repository;
|
||||
}
|
||||
|
||||
public override async Task<PagedResultDto<OperationLogGetListOutputDto>> GetListAsync(OperationLogGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.OperUser), x => x.OperUser.Contains(input.OperUser!))
|
||||
.WhereIF(input.OperType is not null, x => x.OperType == input.OperType)
|
||||
.WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<OperationLogGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
||||
}
|
||||
|
||||
[RemoteService(false)]
|
||||
public override Task<OperationLogGetListOutputDto> UpdateAsync(Guid id, OperationLogGetListOutputDto input)
|
||||
{
|
||||
return base.UpdateAsync(id, input);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Post;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Post服务实现
|
||||
/// </summary>
|
||||
public class PostService : YiCrudAppService<PostEntity, PostGetOutputDto, PostGetListOutputDto, Guid, PostGetListInputVo, PostCreateInputVo, PostUpdateInputVo>,
|
||||
IPostService
|
||||
{
|
||||
private readonly ISqlSugarRepository<PostEntity, Guid> _repository;
|
||||
public PostService(ISqlSugarRepository<PostEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public override async Task<PagedResultDto<PostGetListOutputDto>> GetListAsync(PostGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
|
||||
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.PostName), x => x.PostName.Contains(input.PostName!))
|
||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<PostGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
using Volo.Abp.Uow;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Role;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.Rbac.Domain.Managers;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Role服务实现
|
||||
/// </summary>
|
||||
public class RoleService : YiCrudAppService<RoleEntity, RoleGetOutputDto, RoleGetListOutputDto, Guid, RoleGetListInputVo, RoleCreateInputVo, RoleUpdateInputVo>,
|
||||
IRoleService
|
||||
{
|
||||
public RoleService(RoleManager roleManager, ISqlSugarRepository<RoleDeptEntity> roleDeptRepository, ISqlSugarRepository<UserRoleEntity> userRoleRepository, ISqlSugarRepository<RoleEntity, Guid> repository) : base(repository)
|
||||
{
|
||||
(_roleManager, _roleDeptRepository, _userRoleRepository, _repository) =
|
||||
(roleManager, roleDeptRepository, userRoleRepository, repository);
|
||||
}
|
||||
|
||||
private ISqlSugarRepository<RoleEntity, Guid> _repository;
|
||||
private RoleManager _roleManager { get; set; }
|
||||
|
||||
private ISqlSugarRepository<RoleDeptEntity> _roleDeptRepository;
|
||||
|
||||
private ISqlSugarRepository<UserRoleEntity> _userRoleRepository;
|
||||
[UnitOfWork]
|
||||
public async Task UpdateDataScpoceAsync(UpdateDataScpoceInput input)
|
||||
{
|
||||
//只有自定义的需要特殊处理
|
||||
if (input.DataScope == DataScopeEnum.CUSTOM)
|
||||
{
|
||||
await _roleDeptRepository.DeleteAsync(x => x.RoleId == input.RoleId);
|
||||
var insertEntities = input.DeptIds.Select(x => new RoleDeptEntity { DeptId = x, RoleId = input.RoleId }).ToList();
|
||||
await _roleDeptRepository.InsertRangeAsync(insertEntities);
|
||||
}
|
||||
var entity = new RoleEntity() { DataScope = input.DataScope };
|
||||
EntityHelper.TrySetId(entity, () => input.RoleId);
|
||||
await _repository._Db.Updateable(entity).UpdateColumns(x => x.DataScope).ExecuteCommandAsync();
|
||||
|
||||
}
|
||||
|
||||
public override async Task<PagedResultDto<RoleGetListOutputDto>> GetListAsync(RoleGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
|
||||
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.RoleCode), x => x.RoleCode.Contains(input.RoleCode!))
|
||||
.WhereIF(!string.IsNullOrEmpty(input.RoleName), x => x.RoleName.Contains(input.RoleName!))
|
||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<RoleGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加角色
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[UnitOfWork]
|
||||
public override async Task<RoleGetOutputDto> CreateAsync(RoleCreateInputVo input)
|
||||
{
|
||||
RoleGetOutputDto outputDto;
|
||||
//using (var uow = _unitOfWorkManager.CreateContext())
|
||||
//{
|
||||
var entity = await MapToEntityAsync(input);
|
||||
await _repository.InsertAsync(entity);
|
||||
outputDto = await MapToGetOutputDtoAsync(entity);
|
||||
await _roleManager.GiveRoleSetMenuAsync(new List<Guid> { entity.Id }, input.MenuIds);
|
||||
// uow.Commit();
|
||||
//}
|
||||
|
||||
return outputDto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改角色
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[UnitOfWork]
|
||||
public override async Task<RoleGetOutputDto> UpdateAsync(Guid id, RoleUpdateInputVo input)
|
||||
{
|
||||
var dto = new RoleGetOutputDto();
|
||||
//using (var uow = _unitOfWorkManager.CreateContext())
|
||||
//{
|
||||
var entity = await _repository.GetByIdAsync(id);
|
||||
await MapToEntityAsync(input, entity);
|
||||
await _repository.UpdateAsync(entity);
|
||||
|
||||
await _roleManager.GiveRoleSetMenuAsync(new List<Guid> { id }, input.MenuIds);
|
||||
|
||||
dto = await MapToGetOutputDtoAsync(entity);
|
||||
// uow.Commit();
|
||||
//}
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新状态
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
[Route("role/{id}/{state}")]
|
||||
public async Task<RoleGetOutputDto> UpdateStateAsync([FromRoute] Guid id, [FromRoute] bool state)
|
||||
{
|
||||
var entity = await _repository.GetByIdAsync(id);
|
||||
if (entity is null)
|
||||
{
|
||||
throw new ApplicationException("角色未存在");
|
||||
}
|
||||
|
||||
entity.State = state;
|
||||
await _repository.UpdateAsync(entity);
|
||||
return await MapToGetOutputDtoAsync(entity);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取角色下的用户
|
||||
/// </summary>
|
||||
/// <param name="roleId"></param>
|
||||
/// <param name="input"></param>
|
||||
/// <param name="isAllocated">是否在该角色下</param>
|
||||
/// <returns></returns>
|
||||
[Route("role/auth-user/{roleId}/{isAllocated}")]
|
||||
public async Task<PagedResultDto<UserGetListOutputDto>> GetAuthUserByRoleIdAsync([FromRoute] Guid roleId, [FromRoute] bool isAllocated, [FromQuery] RoleAuthUserGetListInput input)
|
||||
{
|
||||
PagedResultDto<UserGetListOutputDto> output;
|
||||
//角色下已授权用户
|
||||
if (isAllocated == true)
|
||||
{
|
||||
output = await GetAllocatedAuthUserByRoleIdAsync(roleId, input);
|
||||
}
|
||||
//角色下未授权用户
|
||||
else
|
||||
{
|
||||
output = await GetNotAllocatedAuthUserByRoleIdAsync(roleId, input);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
private async Task<PagedResultDto<UserGetListOutputDto>> GetAllocatedAuthUserByRoleIdAsync(Guid roleId, RoleAuthUserGetListInput input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var output = await _userRoleRepository._DbQueryable
|
||||
.LeftJoin<UserEntity>((ur, u) => ur.UserId == u.Id && ur.RoleId == roleId)
|
||||
.Where((ur, u) => ur.RoleId == roleId)
|
||||
.WhereIF(!string.IsNullOrEmpty(input.UserName), (ur, u) => u.UserName.Contains(input.UserName))
|
||||
.WhereIF(input.Phone is not null, (ur, u) => u.Phone.ToString().Contains(input.Phone.ToString()))
|
||||
.Select((ur, u) => new UserGetListOutputDto { Id = u.Id }, true)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
return new PagedResultDto<UserGetListOutputDto>(total, output);
|
||||
}
|
||||
|
||||
private async Task<PagedResultDto<UserGetListOutputDto>> GetNotAllocatedAuthUserByRoleIdAsync(Guid roleId, RoleAuthUserGetListInput input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _userRoleRepository._Db.Queryable<UserEntity>()
|
||||
.Where(u => SqlFunc.Subqueryable<UserRoleEntity>().Where(x => x.RoleId == roleId).Where(x => x.UserId == u.Id).NotAny())
|
||||
.WhereIF(!string.IsNullOrEmpty(input.UserName), u => u.UserName.Contains(input.UserName))
|
||||
.WhereIF(input.Phone is not null, u => u.Phone.ToString().Contains(input.Phone.ToString()))
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
var output = entities.Adapt<List<UserGetListOutputDto>>();
|
||||
return new PagedResultDto<UserGetListOutputDto>(total, output);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量给用户授权
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task CreateAuthUserAsync(RoleAuthUserCreateOrDeleteInput input)
|
||||
{
|
||||
var userRoleEntities = input.UserIds.Select(u => new UserRoleEntity { RoleId = input.RoleId, UserId = u }).ToList();
|
||||
await _userRoleRepository.InsertRangeAsync(userRoleEntities);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量取消授权
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task DeleteAuthUserAsync(RoleAuthUserCreateOrDeleteInput input)
|
||||
{
|
||||
await _userRoleRepository._Db.Deleteable<UserRoleEntity>().Where(x => x.RoleId == input.RoleId)
|
||||
.Where(x => input.UserIds.Contains(x.UserId))
|
||||
.ExecuteCommandAsync(); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
public class TaskService : ApplicationService, ITaskService
|
||||
{
|
||||
//private readonly ISchedulerFactory _schedulerFactory;
|
||||
//public TaskService(ISchedulerFactory schedulerFactory)
|
||||
//{
|
||||
// _schedulerFactory = schedulerFactory;
|
||||
//}
|
||||
///// <summary>
|
||||
///// 单查job
|
||||
///// </summary>
|
||||
///// <param name="jobId"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpGet("{jobId}")]
|
||||
//public TaskGetOutput GetById([FromRoute] string jobId)
|
||||
//{
|
||||
// var result = _schedulerFactory.TryGetJob(jobId, out var scheduler);
|
||||
// var data = scheduler.GetModel();
|
||||
// var output = data.JobDetail.Adapt<TaskGetOutput>();
|
||||
// output.TriggerArgs = data.Triggers[0].Args;
|
||||
// output.NextRunTime = data.Triggers[0].NextRunTime;
|
||||
// output.LastRunTime = data.Triggers[0].LastRunTime;
|
||||
// output.NumberOfRuns = data.Triggers[0].NumberOfRuns;
|
||||
// return output;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 多查job
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//[HttpGet("")]
|
||||
//public PagedResultDto<TaskGetListOutput> GetList([FromQuery] TaskGetListInput input)
|
||||
//{
|
||||
// var data = _schedulerFactory.GetJobsOfModels().Skip((input.PageNum - 1) * input.PageSize).Take(input.PageSize).OrderByDescending(x => x.JobDetail.UpdatedTime)
|
||||
|
||||
// .ToList();
|
||||
// var output = data.Select(x =>
|
||||
// {
|
||||
|
||||
// var res = new TaskGetListOutput();
|
||||
// res = x.JobDetail.Adapt<TaskGetListOutput>();
|
||||
// res.TriggerArgs = x.Triggers[0].Args;
|
||||
// res.Status = x.Triggers[0].Status.ToString();
|
||||
// return res;
|
||||
// }).ToList();
|
||||
// return new PagedResultDto<TaskGetListOutput>(data.Count(), output);
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 创建job
|
||||
///// </summary>
|
||||
///// <param name="input"></param>
|
||||
///// <returns></returns>
|
||||
//public ScheduleResult Create(TaskCreateInput input)
|
||||
//{
|
||||
|
||||
|
||||
// //jobBuilder
|
||||
// var jobBuilder = JobBuilder.Create(input.AssemblyName, input.JobType).SetJobId(input.JobId).SetGroupName(input.GroupName)
|
||||
// .SetConcurrent(input.Concurrent).SetDescription(input.Description);
|
||||
|
||||
// //triggerBuilder
|
||||
// //毫秒
|
||||
// TriggerBuilder triggerBuilder = null;
|
||||
// switch (input.Type)
|
||||
// {
|
||||
// case Core.Rbac.Enums.JobTypeEnum.Cron:
|
||||
// triggerBuilder = Triggers.Cron(input.Cron, CronStringFormat.WithSeconds);
|
||||
// break;
|
||||
// case Core.Rbac.Enums.JobTypeEnum.Millisecond:
|
||||
// triggerBuilder = Triggers.Period(input.Millisecond);
|
||||
// break;
|
||||
// }
|
||||
|
||||
// //作业计划,单个jobBuilder与多个triggerBuilder组合
|
||||
// var schedulerBuilder = SchedulerBuilder.Create(jobBuilder, triggerBuilder);
|
||||
|
||||
|
||||
// //调度中心工厂,使用作业计划管理job,返回调度中心单个
|
||||
// var result = _schedulerFactory.TryAddJob(schedulerBuilder, out var scheduler);
|
||||
|
||||
// return result;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 移除job
|
||||
///// </summary>
|
||||
///// <param name="jobId"></param>
|
||||
///// <returns></returns>
|
||||
//public ScheduleResult Remove(string jobId)
|
||||
//{
|
||||
// var res = _schedulerFactory.TryRemoveJob(jobId, out var scheduler);
|
||||
// return res;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 暂停job
|
||||
///// </summary>
|
||||
///// <param name="jobId"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPut]
|
||||
//public ScheduleResult Pause(string jobId)
|
||||
//{
|
||||
// var res = _schedulerFactory.TryGetJob(jobId, out var scheduler);
|
||||
|
||||
// scheduler.Pause();
|
||||
// return res;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 开始job
|
||||
///// </summary>
|
||||
///// <param name="jobId"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPut]
|
||||
//public ScheduleResult Start(string jobId)
|
||||
//{
|
||||
// var res = _schedulerFactory.TryGetJob(jobId, out var scheduler);
|
||||
// scheduler.Start();
|
||||
// return res;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 更新job
|
||||
///// </summary>
|
||||
///// <param name="jobId"></param>
|
||||
///// <param name="input"></param>
|
||||
///// <returns></returns>
|
||||
//public ScheduleResult Update(string jobId, TaskUpdateInput input)
|
||||
//{
|
||||
// //jobBuilder
|
||||
// var jobBuilder = JobBuilder.Create(input.AssemblyName, input.JobType).SetJobId(jobId).SetGroupName(input.GroupName)
|
||||
// .SetConcurrent(input.Concurrent).SetDescription(input.Description);
|
||||
|
||||
// //triggerBuilder
|
||||
// //毫秒
|
||||
// TriggerBuilder triggerBuilder = null;
|
||||
// switch (input.Type)
|
||||
// {
|
||||
// case Core.Rbac.Enums.JobTypeEnum.Cron:
|
||||
// triggerBuilder = Triggers.Cron(input.Cron, CronStringFormat.WithSeconds);
|
||||
// break;
|
||||
// case Core.Rbac.Enums.JobTypeEnum.Millisecond:
|
||||
// triggerBuilder = Triggers.Period(input.Millisecond);
|
||||
// break;
|
||||
// }
|
||||
|
||||
// //作业计划,单个jobBuilder与多个triggerBuilder组合
|
||||
// var schedulerBuilder = SchedulerBuilder.Create(jobBuilder, triggerBuilder);
|
||||
|
||||
|
||||
// var result = _schedulerFactory.TryUpdateJob(schedulerBuilder, out var scheduler);
|
||||
// return result;
|
||||
//}
|
||||
|
||||
//[HttpPost]
|
||||
//public bool RunOnce(string jobId)
|
||||
//{
|
||||
// var result = _schedulerFactory.TryGetJob(jobId, out var scheduler);
|
||||
|
||||
// var triggerBuilder = Triggers.Period(100).SetRunOnStart(true).SetMaxNumberOfRuns(1);
|
||||
// scheduler.AddTrigger(triggerBuilder);
|
||||
// //设置启动时执行一次,然后最大只执行一次
|
||||
// return true;
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.Uow;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Options;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 测试文档控制器
|
||||
/// </summary>
|
||||
public class TestServcie : ApplicationService
|
||||
{
|
||||
private IRepository<StudentEntity> _repository;
|
||||
private IUnitOfWorkManager _unitOfWork;
|
||||
private ISqlSugarRepository<StudentEntity> _sqlsugarRepository;
|
||||
|
||||
public IOptions<JwtOptions> options { get; set; }
|
||||
public TestServcie(IRepository<StudentEntity> repository, IUnitOfWorkManager unitOfWork, ISqlSugarRepository<StudentEntity> sqlsugarRepository, IRepository<StudentEntity, Guid> repository2)
|
||||
{
|
||||
_unitOfWork = unitOfWork;
|
||||
_repository = repository;
|
||||
_sqlsugarRepository = sqlsugarRepository;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 你好,多线程
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetTaskTest()
|
||||
{
|
||||
var tasks = Enumerable.Range(0, 2).Select(x =>
|
||||
{
|
||||
return Task.Run(async () =>
|
||||
{
|
||||
using (var uow = _unitOfWork.Begin(true))
|
||||
{
|
||||
// await _repository.GetListAsync();
|
||||
await _sqlsugarRepository._DbQueryable.ToListAsync();
|
||||
await uow.CompleteAsync();
|
||||
}
|
||||
});
|
||||
}).ToList();
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
return "你哈";
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public async Task<List<StudentEntity>> GetTest()
|
||||
{
|
||||
//using (var uow = _unitOfWork.Begin(true))
|
||||
//{
|
||||
var data = await _repository.GetListAsync();
|
||||
var data2 = await _repository.GetListAsync();
|
||||
//await uow.CompleteAsync();
|
||||
return data;
|
||||
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//[UnitOfWork]
|
||||
public async Task<StudentEntity> PostTest()
|
||||
{
|
||||
//using (var uow = _unitOfWork.Begin())
|
||||
//{
|
||||
var stu = new StudentEntity() { Name = $"{DateTime.Now.ToString()}你好" };
|
||||
|
||||
var data = await _repository.InsertAsync(stu);
|
||||
//await uow.CompleteAsync();
|
||||
return data;
|
||||
//}
|
||||
}
|
||||
|
||||
public async Task<StudentEntity> PostError()
|
||||
{
|
||||
throw new ApplicationException();
|
||||
}
|
||||
|
||||
public async Task<StudentEntity> PostUserError()
|
||||
{
|
||||
throw new UserFriendlyException("直接爆炸");
|
||||
}
|
||||
|
||||
public string Login()
|
||||
{
|
||||
var data = options.Value;
|
||||
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(data.SecurityKey));
|
||||
|
||||
var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
|
||||
var claims = new List<Claim>()
|
||||
{
|
||||
new Claim("name","admin")
|
||||
};
|
||||
var token = new JwtSecurityToken(
|
||||
issuer: data.Issuer,
|
||||
audience: data.Audience,
|
||||
claims: claims,
|
||||
expires: DateTime.Now.AddSeconds(60 * 60 * 2),
|
||||
notBefore: DateTime.Now,
|
||||
signingCredentials: creds);
|
||||
string returnToken = new JwtSecurityTokenHandler().WriteToken(token);
|
||||
|
||||
return returnToken;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Uow;
|
||||
using Volo.Abp.Users;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Domain.Authorization;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.Rbac.Domain.Managers;
|
||||
using Yi.Framework.Rbac.Domain.Repositories;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Consts;
|
||||
using Yi.Framework.Rbac.Domain.Shared.OperLog;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// User服务实现
|
||||
/// </summary>
|
||||
public class UserService : YiCrudAppService<UserEntity, UserGetOutputDto, UserGetListOutputDto, Guid, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>
|
||||
//IUserService
|
||||
{
|
||||
public UserService(ISqlSugarRepository<UserEntity, Guid> repository, UserManager userManager, IUserRepository userRepository, ICurrentUser currentUser, IDeptService deptService) : base(repository)
|
||||
=>
|
||||
(_userManager, _userRepository, _currentUser, _deptService, _repository) =
|
||||
(userManager, userRepository, currentUser, deptService, repository);
|
||||
private UserManager _userManager { get; set; }
|
||||
private ISqlSugarRepository<UserEntity, Guid> _repository;
|
||||
private IUserRepository _userRepository { get; set; }
|
||||
private IDeptService _deptService { get; set; }
|
||||
|
||||
private ICurrentUser _currentUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询用户
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[Permission("system:user:list")]
|
||||
public override async Task<PagedResultDto<UserGetListOutputDto>> GetListAsync(UserGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
List<Guid> deptIds = null;
|
||||
if (input.DeptId is not null)
|
||||
{
|
||||
deptIds = await _deptService.GetChildListAsync(input.DeptId ?? Guid.Empty);
|
||||
}
|
||||
|
||||
|
||||
List<Guid> ids = input.Ids?.Split(",").Select(x => Guid.Parse(x)).ToList();
|
||||
var outPut = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.UserName), x => x.UserName.Contains(input.UserName!))
|
||||
.WhereIF(input.Phone is not null, x => x.Phone.ToString()!.Contains(input.Phone.ToString()!))
|
||||
.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name!.Contains(input.Name!))
|
||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||
.WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)
|
||||
|
||||
//这个为过滤当前部门,加入数据权限后,将由数据权限控制
|
||||
.WhereIF(input.DeptId is not null, x => deptIds.Contains(x.DeptId ?? Guid.Empty))
|
||||
|
||||
.WhereIF(ids is not null, x => ids.Contains(x.Id))
|
||||
|
||||
|
||||
.LeftJoin<DeptEntity>((user, dept) => user.DeptId == dept.Id)
|
||||
.Select((user, dept) => new UserGetListOutputDto(), true)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
|
||||
var result = new PagedResultDto<UserGetListOutputDto>();
|
||||
result.Items = outPut;
|
||||
result.TotalCount = total;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加用户
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[OperLog("添加用户", OperEnum.Insert)]
|
||||
[UnitOfWork]
|
||||
public async override Task<UserGetOutputDto> CreateAsync(UserCreateInputVo input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.Password))
|
||||
{
|
||||
throw new UserFriendlyException(UserConst.Login_Passworld_Error);
|
||||
}
|
||||
if (await _repository.IsAnyAsync(u => input.UserName.Equals(u.UserName)))
|
||||
{
|
||||
throw new UserFriendlyException(UserConst.User_Exist);
|
||||
}
|
||||
var entities = await MapToEntityAsync(input);
|
||||
|
||||
entities.BuildPassword();
|
||||
|
||||
//using (var uow = _unitOfWorkManager.CreateContext())
|
||||
//{
|
||||
var returnEntity = await _repository.InsertReturnEntityAsync(entities);
|
||||
await _userManager.GiveUserSetRoleAsync(new List<Guid> { returnEntity.Id }, input.RoleIds);
|
||||
await _userManager.GiveUserSetPostAsync(new List<Guid> { returnEntity.Id }, input.PostIds);
|
||||
//uow.Commit();
|
||||
|
||||
var result = await MapToGetOutputDtoAsync(returnEntity);
|
||||
return result;
|
||||
//}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单查
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public override async Task<UserGetOutputDto> GetAsync(Guid id)
|
||||
{
|
||||
//使用导航树形查询
|
||||
var entity = await _repository._DbQueryable.Includes(u => u.Roles).Includes(u => u.Posts).Includes(u => u.Dept).InSingleAsync(id);
|
||||
|
||||
return await MapToGetOutputDtoAsync(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新用户
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[OperLog("更新用户", OperEnum.Update)]
|
||||
[UnitOfWork]
|
||||
public async override Task<UserGetOutputDto> UpdateAsync(Guid id, UserUpdateInputVo input)
|
||||
{
|
||||
if (await _repository.IsAnyAsync(u => input.UserName!.Equals(u.UserName) && !id.Equals(u.Id)))
|
||||
{
|
||||
throw new UserFriendlyException("用户已经存在,更新失败");
|
||||
}
|
||||
var entity = await _repository.GetByIdAsync(id);
|
||||
//更新密码,特殊处理
|
||||
if (input.Password is not null)
|
||||
{
|
||||
entity.Password = input.Password;
|
||||
entity.BuildPassword();
|
||||
}
|
||||
await MapToEntityAsync(input, entity);
|
||||
//using (var uow = _unitOfWorkManager.CreateContext())
|
||||
//{
|
||||
var res1 = await _repository.UpdateAsync(entity);
|
||||
await _userManager.GiveUserSetRoleAsync(new List<Guid> { id }, input.RoleIds);
|
||||
await _userManager.GiveUserSetPostAsync(new List<Guid> { id }, input.PostIds);
|
||||
// uow.Commit();
|
||||
//}
|
||||
return await MapToGetOutputDtoAsync(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新个人中心
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[OperLog("更新个人信息", OperEnum.Update)]
|
||||
public async Task<UserGetOutputDto> UpdateProfileAsync(ProfileUpdateInputVo input)
|
||||
{
|
||||
var entity = await _repository.GetByIdAsync(_currentUser.Id);
|
||||
ObjectMapper.Map(input, entity);
|
||||
|
||||
await _repository.UpdateAsync(entity);
|
||||
var dto = await MapToGetOutputDtoAsync(entity);
|
||||
return dto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新状态
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="state"></param>
|
||||
/// <returns></returns>
|
||||
[Route("user/{id}/{state}")]
|
||||
[OperLog("更新用户状态", OperEnum.Update)]
|
||||
public async Task<UserGetOutputDto> UpdateStateAsync([FromRoute] Guid id, [FromRoute] bool state)
|
||||
{
|
||||
var entity = await _repository.GetByIdAsync(id);
|
||||
if (entity is null)
|
||||
{
|
||||
throw new ApplicationException("用户未存在");
|
||||
}
|
||||
entity.State = state;
|
||||
await _repository.UpdateAsync(entity);
|
||||
return await MapToGetOutputDtoAsync(entity);
|
||||
}
|
||||
[OperLog("删除用户", OperEnum.Delete)]
|
||||
public override async Task DeleteAsync(Guid id)
|
||||
{
|
||||
await base.DeleteAsync(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||
<PackageReference Include="Lazy.Captcha.Core" Version="2.0.7" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundWorkers.Quartz" Version="7.4.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Rbac.Application.Contracts\Yi.Framework.Rbac.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.Rbac.Domain\Yi.Framework.Rbac.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,296 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Yi.Framework.Rbac.Application</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.ValidationImageCaptcha(Yi.Framework.Rbac.Application.Contracts.Dtos.Account.LoginInputVo)">
|
||||
<summary>
|
||||
效验图片登录验证码,无需和账号绑定
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.ValidationPhoneCaptcha(Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RegisterDto)">
|
||||
<summary>
|
||||
效验电话验证码,需要与电话号码绑定
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.PostLoginAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Account.LoginInputVo)">
|
||||
<summary>
|
||||
登录
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.CreateToken(System.Collections.Generic.Dictionary{System.String,System.Object})">
|
||||
<summary>
|
||||
创建令牌
|
||||
</summary>
|
||||
<param name="dic"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.GetCaptchaImageAsync">
|
||||
<summary>
|
||||
生成验证码
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.ValidationPhone(System.String)">
|
||||
<summary>
|
||||
验证电话号码
|
||||
</summary>
|
||||
<param name="str_handset"></param>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.PostCaptchaPhone(Yi.Framework.Rbac.Application.Contracts.Dtos.Account.PhoneCaptchaImageDto)">
|
||||
<summary>
|
||||
注册 手机验证码
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.PostRegisterAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RegisterDto)">
|
||||
<summary>
|
||||
注册,需要验证码通过
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.Get">
|
||||
<summary>
|
||||
查询已登录的账户信息
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.GetVue3Router">
|
||||
<summary>
|
||||
获取当前登录用户的前端路由
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.PostLogout">
|
||||
<summary>
|
||||
退出登录
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.UpdatePasswordAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Account.UpdatePasswordDto)">
|
||||
<summary>
|
||||
更新密码
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.RestPasswordAsync(System.Guid,Yi.Framework.Rbac.Application.Contracts.Dtos.Account.RestPasswordDto)">
|
||||
<summary>
|
||||
重置密码
|
||||
</summary>
|
||||
<param name="userId"></param>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.AccountService.UpdateIconAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Account.UpdateIconDto)">
|
||||
<summary>
|
||||
更新头像
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.ConfigService">
|
||||
<summary>
|
||||
Config服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.ConfigService.GetListAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Config.ConfigGetListInputVo)">
|
||||
<summary>
|
||||
多查
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.DeptService">
|
||||
<summary>
|
||||
Dept服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.DeptService.GetRoleIdAsync(System.Guid)">
|
||||
<summary>
|
||||
通过角色id查询该角色全部部门
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.DeptService.GetListAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Dept.DeptGetListInputVo)">
|
||||
<summary>
|
||||
多查
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.DictionaryService">
|
||||
<summary>
|
||||
Dictionary服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.DictionaryService.GetListAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary.DictionaryGetListInputVo)">
|
||||
<summary>
|
||||
查询
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.DictionaryService.GetDicType(System.String)">
|
||||
<summary>
|
||||
根据字典类型获取字典列表
|
||||
</summary>
|
||||
<param name="dicType"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.DictionaryTypeService">
|
||||
<summary>
|
||||
DictionaryType服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.MenuService">
|
||||
<summary>
|
||||
Menu服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.MenuService.GetListRoleIdAsync(System.Guid)">
|
||||
<summary>
|
||||
查询当前角色的菜单
|
||||
</summary>
|
||||
<param name="roleId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.OnlineService.GetListAsync(Yi.Framework.Rbac.Domain.SignalRHubs.Model.OnlineUserModel)">
|
||||
<summary>
|
||||
动态条件获取当前在线用户
|
||||
</summary>
|
||||
<param name="online"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.OnlineService.ForceOut(System.String)">
|
||||
<summary>
|
||||
强制退出用户
|
||||
</summary>
|
||||
<param name="connnectionId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.OperationLogService">
|
||||
<summary>
|
||||
OperationLog服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.PostService">
|
||||
<summary>
|
||||
Post服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.RoleService">
|
||||
<summary>
|
||||
Role服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.RoleService.CreateAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Role.RoleCreateInputVo)">
|
||||
<summary>
|
||||
添加角色
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.RoleService.UpdateAsync(System.Guid,Yi.Framework.Rbac.Application.Contracts.Dtos.Role.RoleUpdateInputVo)">
|
||||
<summary>
|
||||
修改角色
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.RoleService.UpdateStateAsync(System.Guid,System.Boolean)">
|
||||
<summary>
|
||||
更新状态
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="state"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.RoleService.GetAuthUserByRoleIdAsync(System.Guid,System.Boolean,Yi.Framework.Rbac.Application.Contracts.Dtos.Role.RoleAuthUserGetListInput)">
|
||||
<summary>
|
||||
获取角色下的用户
|
||||
</summary>
|
||||
<param name="roleId"></param>
|
||||
<param name="input"></param>
|
||||
<param name="isAllocated">是否在该角色下</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.RoleService.CreateAuthUserAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Role.RoleAuthUserCreateOrDeleteInput)">
|
||||
<summary>
|
||||
批量给用户授权
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.RoleService.DeleteAuthUserAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.Role.RoleAuthUserCreateOrDeleteInput)">
|
||||
<summary>
|
||||
批量取消授权
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.TestServcie">
|
||||
<summary>
|
||||
测试文档控制器
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.TestServcie.GetTaskTest">
|
||||
<summary>
|
||||
你好,多线程
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Yi.Framework.Rbac.Application.Services.UserService">
|
||||
<summary>
|
||||
User服务实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.UserService.GetListAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.User.UserGetListInputVo)">
|
||||
<summary>
|
||||
查询用户
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.UserService.CreateAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.User.UserCreateInputVo)">
|
||||
<summary>
|
||||
添加用户
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.UserService.GetAsync(System.Guid)">
|
||||
<summary>
|
||||
单查
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.UserService.UpdateAsync(System.Guid,Yi.Framework.Rbac.Application.Contracts.Dtos.User.UserUpdateInputVo)">
|
||||
<summary>
|
||||
更新用户
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.UserService.UpdateProfileAsync(Yi.Framework.Rbac.Application.Contracts.Dtos.User.ProfileUpdateInputVo)">
|
||||
<summary>
|
||||
更新个人中心
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Rbac.Application.Services.UserService.UpdateStateAsync(System.Guid,System.Boolean)">
|
||||
<summary>
|
||||
更新状态
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="state"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -0,0 +1,35 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.BackgroundWorkers;
|
||||
using Volo.Abp.BackgroundWorkers.Quartz;
|
||||
using Volo.Abp.Modularity;
|
||||
using Yi.Framework.Ddd.Application;
|
||||
using Yi.Framework.Rbac.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Jobs;
|
||||
using Yi.Framework.Rbac.Domain;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkRbacApplicationContractsModule),
|
||||
typeof(YiFrameworkRbacDomainModule),
|
||||
|
||||
|
||||
typeof(YiFrameworkDddApplicationModule),
|
||||
typeof(AbpBackgroundWorkersQuartzModule)
|
||||
)]
|
||||
public class YiFrameworkRbacApplicationModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
var service = context.Services;
|
||||
|
||||
service.AddCaptcha();
|
||||
}
|
||||
|
||||
public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
|
||||
{
|
||||
//await context.AddBackgroundWorkerAsync<TestJob>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user