feat: 完成账号逻辑处理

This commit is contained in:
chenchun
2024-10-22 12:20:53 +08:00
parent 0e6d380b7e
commit 7eab4dd5b1
6 changed files with 60 additions and 68 deletions

View File

@@ -152,13 +152,15 @@ namespace Yi.Framework.Rbac.Application.Services.Authentication
{
return base.DeleteAsync(id);
}
[RemoteService(IsEnabled = false)]
public override async Task<AuthOutputDto> CreateAsync(AuthCreateOrUpdateInputDto input)
{
var entity = await MapToEntityAsync(input);
//还需要一步如果当前openid已经存在被人绑定移除
await _repository.DeleteAsync(x => x.AuthType == input.AuthType && x.OpenId == input.OpenId);
await _repository.InsertAsync(entity);
return MapToGetOutputDto(entity);
return await MapToGetOutputDtoAsync(entity);
}
protected override async Task CheckCreateInputDtoAsync(AuthCreateOrUpdateInputDto input)