public async Task <LoginClientValueModel> LoginByClientAsync(LoginApiModel login) { var user = _tokenContext.Login(login); var extend = await _userClientContext.GetIndexByUserIdAsync(user.Id); if (extend == null) { throw new DefaultException("该账号还在维护基础资料, 请等待."); } return(new LoginClientValueModel { Client = extend.Client, Id = user.Id, User = extend.User, Name = extend.Name, }); }
public async Task <UserClientIndexApiModel> GetIndexByUserIdAsync(int userId) { return(await _userClientContext.GetIndexByUserIdAsync(userId)); }