@@ -205,13 +205,11 @@ namespace GxPress.Api.AppControllers
user = new User();
user.Name = phone;
user.Phone = phone;
- if (await _userRepository.CreateMiUserAsync(user))
+ user.ImId = phone;
+ user.Id = await _userRepository.InsertAsync(user);
+ if (user.Id > 0 && await _userRepository.CreateMiUserAsync(user))
{
- user = new User();
- user.Name = phone;
- user.Phone = phone;
- user.ImId = phone;
- user.Id = await _userRepository.InsertAsync(user);
+
}
//TODO 短信验证码发送