feat: 新增微信小程序模块
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Account;
|
||||
|
||||
public class LoginInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信小程序code
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Yi.Framework.DigitalCollectibles.Domain.Shared.Enums;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Contracts.Dtos.Account;
|
||||
|
||||
public class LoginOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 后端访问token
|
||||
/// </summary>
|
||||
public string? Token { get; set; }
|
||||
|
||||
public LoginResultEnum Result{ get; set; }
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application.Contracts\Yi.Framework.Ddd.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.DigitalCollectibles.Domain.Shared\Yi.Framework.DigitalCollectibles.Domain.Shared.csproj" />
|
||||
<ProjectReference Include="..\..\rbac\Yi.Framework.Rbac.Application.Contracts\Yi.Framework.Rbac.Application.Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using Yi.Framework.DigitalCollectibles.Domain.Shared;
|
||||
using Yi.Framework.Ddd.Application.Contracts;
|
||||
using Yi.Framework.Rbac.Application.Contracts;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Contracts
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkDigitalCollectiblesDomainSharedModule),
|
||||
|
||||
typeof(YiFrameworkRbacApplicationContractsModule),
|
||||
typeof(YiFrameworkDddApplicationContractsModule))]
|
||||
public class YiFrameworkDigitalCollectiblesApplicationContractsModule:AbpModule
|
||||
{
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
using Volo.Abp.Application.Services;
|
||||
|
||||
namespace Yi.Framework.DigitalCollectibles.Application.Services.Account;
|
||||
|
||||
public class CollectiblesAccountService: ApplicationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 小程序登录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task PostLoginAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
//根据code去获取wxid
|
||||
//判断wxid中是否有对应的userid关系
|
||||
//果然有,直接根据userid返回该用户token
|
||||
//如果没有,返回结果即可
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 小程序绑定账号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task PostBindAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
//根据code去获取wxid
|
||||
//校验手机号
|
||||
//根据手机号查询用户信息
|
||||
//将wxid和用户user绑定
|
||||
}
|
||||
|
||||
//小程序注册
|
||||
public Task PostRegisterAsync()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
//走普通注册流程
|
||||
//同时再加一个小程序绑定即可
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" />
|
||||
|
||||
<ProjectReference Include="..\Yi.Framework.DigitalCollectibles.Application.Contracts\Yi.Framework.DigitalCollectibles.Application.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.DigitalCollectibles.Domain\Yi.Framework.DigitalCollectibles.Domain.csproj" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundWorkers.Quartz" Version="$(AbpVersion)" />
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Yi.Framework.DigitalCollectibles.Domain.Shared.Enums;
|
||||
|
||||
public enum LoginResultEnum
|
||||
{
|
||||
Error,
|
||||
Success
|
||||
}
|
||||
@@ -114,6 +114,7 @@ public class MiningPoolManager : DomainService
|
||||
//虽然新增的是一天,但是每次刷新是早上10点,矿池刷新时,还需要清除限制
|
||||
AbsoluteExpirationRelativeToNow = TimeSpan.FromDays(1)
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
//已上过锁,并且没有到限制时间,必定失败
|
||||
|
||||
Reference in New Issue
Block a user