|
@@ -79,6 +79,11 @@ namespace GxPress.Api.AppControllers
|
|
public async Task<UserSignInResult> SignIn(UserSignInRequest request)
|
|
public async Task<UserSignInResult> SignIn(UserSignInRequest request)
|
|
{
|
|
{
|
|
var result = await _userRepository.SignInAsync(request);
|
|
var result = await _userRepository.SignInAsync(request);
|
|
|
|
+ if (result.IsAddUser)
|
|
|
|
+ {
|
|
|
|
+ //添加环信
|
|
|
|
+ await _userRepository.CreateMiUserAsync(result.UserEntity);
|
|
|
|
+ }
|
|
var claims = new[]
|
|
var claims = new[]
|
|
{
|
|
{
|
|
new Claim(ClaimTypes.NameIdentifier, result.UserId.ToString()),
|
|
new Claim(ClaimTypes.NameIdentifier, result.UserId.ToString()),
|
|
@@ -102,8 +107,10 @@ namespace GxPress.Api.AppControllers
|
|
{
|
|
{
|
|
var result = await _userRepository.SignInAsync(request);
|
|
var result = await _userRepository.SignInAsync(request);
|
|
if (result.IsAddUser)
|
|
if (result.IsAddUser)
|
|
|
|
+ {
|
|
//添加环信
|
|
//添加环信
|
|
await _userRepository.CreateMiUserAsync(result.UserEntity);
|
|
await _userRepository.CreateMiUserAsync(result.UserEntity);
|
|
|
|
+ }
|
|
var claims = new[]
|
|
var claims = new[]
|
|
{
|
|
{
|
|
new Claim(ClaimTypes.NameIdentifier, result.UserId.ToString()),
|
|
new Claim(ClaimTypes.NameIdentifier, result.UserId.ToString()),
|