feat: 完成微信小程序账户应用服务
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
|
||||
|
||||
public class AuthCreateOrUpdateInputDto
|
||||
{
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public string OpenId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string AuthType { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
|
||||
|
||||
public class LoginOutputDto
|
||||
{
|
||||
public string Token { get; set; }
|
||||
public string RefreshToken { get; set; }
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Dtos;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
@@ -8,8 +9,29 @@ namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
Task<UserRoleMenuDto> GetAsync();
|
||||
Task<CaptchaImageDto> GetCaptchaImageAsync();
|
||||
Task<object> PostLoginAsync(LoginInputVo input);
|
||||
Task<LoginOutputDto> PostLoginAsync(LoginInputVo input);
|
||||
Task PostRegisterAsync(RegisterDto input);
|
||||
Task<bool> RestPasswordAsync(Guid userId, RestPasswordDto input);
|
||||
|
||||
/// <summary>
|
||||
/// 提供其他服务使用,根据用户id,直接返回token
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<LoginOutputDto> PostLoginAsync(Guid userId);
|
||||
|
||||
/// <summary>
|
||||
/// 根据信息查询用户,可能为空,代表该用户不存在或禁用
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="phone"></param>
|
||||
/// <returns></returns>
|
||||
Task<UserRoleMenuDto?> GetAsync(string? userName,long? phone);
|
||||
|
||||
/// <summary>
|
||||
/// 手机验证码
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<object> PostCaptchaPhoneAsync(ValidationPhoneTypeEnum validationPhoneType,
|
||||
PhoneCaptchaImageDto input);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.Account;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
|
||||
public interface IAuthService
|
||||
{
|
||||
Task<AuthOutputDto?> TryGetByOpenIdAsync(string openId, string authType);
|
||||
Task<AuthOutputDto> CreateAsync(AuthCreateOrUpdateInputDto input);
|
||||
}
|
||||
Reference in New Issue
Block a user